]> git.sur5r.net Git - openldap/blob - configure
cleanup
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.522 2004/04/07 04:26:03 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-bdb          enable Berkeley DB backend [yes]"
86 ac_help="$ac_help
87     --with-bdb-module     module type static|dynamic [static]"
88 ac_help="$ac_help
89     --enable-dnssrv       enable dnssrv backend [no]"
90 ac_help="$ac_help
91     --with-dnssrv-module  module type static|dynamic [static]"
92 ac_help="$ac_help
93     --enable-hdb          enable Hierarchical DB backend [no]"
94 ac_help="$ac_help
95     --with-hdb-module     module type static|dynamic [static]"
96 ac_help="$ac_help
97     --enable-ldap         enable ldap backend [no]"
98 ac_help="$ac_help
99     --with-ldap-module    module type static|dynamic [static]"
100 ac_help="$ac_help
101     --enable-ldbm         enable ldbm backend [no]"
102 ac_help="$ac_help
103     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
104 ac_help="$ac_help
105     --with-ldbm-module    module type static|dynamic [static]"
106 ac_help="$ac_help
107     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
108 ac_help="$ac_help
109     --enable-meta         enable metadirectory backend [no]"
110 ac_help="$ac_help
111     --with-meta-module    module type static|dynamic [static]"
112 ac_help="$ac_help
113     --enable-monitor      enable monitor backend [yes]"
114 ac_help="$ac_help
115     --with-monitor-module module type static|dynamic [static]"
116 ac_help="$ac_help
117     --enable-null         enable null backend [no]"
118 ac_help="$ac_help
119     --with-null-module    module type static|dynamic [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type static|dynamic [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type static|dynamic [static]"
128 ac_help="$ac_help
129     --enable-relay        enable relay backend [yes]"
130 ac_help="$ac_help
131     --with-relay-module   module type static|dynamic [static]"
132 ac_help="$ac_help
133     --enable-shell        enable shell backend [no]"
134 ac_help="$ac_help
135     --with-shell-module   module type static|dynamic [static]"
136 ac_help="$ac_help
137     --enable-sql          enable sql backend [no]"
138 ac_help="$ac_help
139     --with-sql-module     module type static|dynamic [static]"
140 ac_help="$ac_help
141
142 SLAPD Overlay Options:"
143 ac_help="$ac_help
144     --enable-chain        LDAP Chain Response no|yes|mod [no]"
145 ac_help="$ac_help
146     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
147 ac_help="$ac_help
148     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
149 ac_help="$ac_help
150     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
151 ac_help="$ac_help
152     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
153 ac_help="$ac_help
154     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
155 ac_help="$ac_help
156
157 SLURPD (Replication Daemon) Options:"
158 ac_help="$ac_help
159   --enable-slurpd         enable building slurpd [auto]"
160 ac_help="$ac_help
161
162 Library Generation & Linking Options"
163 ac_help="$ac_help
164   --enable-static[=PKGS]  build static libraries [default=yes]"
165 ac_help="$ac_help
166   --enable-shared[=PKGS]  build shared libraries [default=yes]"
167 ac_help="$ac_help
168   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
169 ac_help="$ac_help
170   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
171
172 # Find the correct PATH separator.  Usually this is `:', but
173 # DJGPP uses `;' like DOS.
174 if test "X${PATH_SEPARATOR+set}" != Xset; then
175   UNAME=${UNAME-`uname 2>/dev/null`}
176   case X$UNAME in
177     *-DOS) lt_cv_sys_path_separator=';' ;;
178     *)     lt_cv_sys_path_separator=':' ;;
179   esac
180   PATH_SEPARATOR=$lt_cv_sys_path_separator
181 fi
182
183
184 # Check that we are running under the correct shell.
185 SHELL=${CONFIG_SHELL-/bin/sh}
186
187 case X$ECHO in
188 X*--fallback-echo)
189   # Remove one level of quotation (which was required for Make).
190   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
191   ;;
192 esac
193
194 echo=${ECHO-echo}
195 if test "X$1" = X--no-reexec; then
196   # Discard the --no-reexec flag, and continue.
197   shift
198 elif test "X$1" = X--fallback-echo; then
199   # Avoid inline document here, it may be left over
200   :
201 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
202   # Yippee, $echo works!
203   :
204 else
205   # Restart under the correct shell.
206   exec $SHELL "$0" --no-reexec ${1+"$@"}
207 fi
208
209 if test "X$1" = X--fallback-echo; then
210   # used as fallback echo
211   shift
212   cat <<EOF
213
214 EOF
215   exit 0
216 fi
217
218 # The HP-UX ksh and POSIX shell print the target directory to stdout
219 # if CDPATH is set.
220 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
221
222 if test -z "$ECHO"; then
223 if test "X${echo_test_string+set}" != Xset; then
224 # find a string as large as possible, as long as the shell can cope with it
225   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
226     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
227     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
228        echo_test_string="`eval $cmd`" &&
229        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
230     then
231       break
232     fi
233   done
234 fi
235
236 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
237    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
238    test "X$echo_testing_string" = "X$echo_test_string"; then
239   :
240 else
241   # The Solaris, AIX, and Digital Unix default echo programs unquote
242   # backslashes.  This makes it impossible to quote backslashes using
243   #   echo "$something" | sed 's/\\/\\\\/g'
244   #
245   # So, first we look for a working echo in the user's PATH.
246
247   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
248   for dir in $PATH /usr/ucb; do
249     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
250        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
251        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
252        test "X$echo_testing_string" = "X$echo_test_string"; then
253       echo="$dir/echo"
254       break
255     fi
256   done
257   IFS="$save_ifs"
258
259   if test "X$echo" = Xecho; then
260     # We didn't find a better echo, so look for alternatives.
261     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
262        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
263        test "X$echo_testing_string" = "X$echo_test_string"; then
264       # This shell has a builtin print -r that does the trick.
265       echo='print -r'
266     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
267          test "X$CONFIG_SHELL" != X/bin/ksh; then
268       # If we have ksh, try running configure again with it.
269       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
270       export ORIGINAL_CONFIG_SHELL
271       CONFIG_SHELL=/bin/ksh
272       export CONFIG_SHELL
273       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
274     else
275       # Try using printf.
276       echo='printf %s\n'
277       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
278          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
279          test "X$echo_testing_string" = "X$echo_test_string"; then
280         # Cool, printf works
281         :
282       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
283            test "X$echo_testing_string" = 'X\t' &&
284            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
285            test "X$echo_testing_string" = "X$echo_test_string"; then
286         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
287         export CONFIG_SHELL
288         SHELL="$CONFIG_SHELL"
289         export SHELL
290         echo="$CONFIG_SHELL $0 --fallback-echo"
291       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
292            test "X$echo_testing_string" = 'X\t' &&
293            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
294            test "X$echo_testing_string" = "X$echo_test_string"; then
295         echo="$CONFIG_SHELL $0 --fallback-echo"
296       else
297         # maybe with a smaller string...
298         prev=:
299
300         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
301           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
302           then
303             break
304           fi
305           prev="$cmd"
306         done
307
308         if test "$prev" != 'sed 50q "$0"'; then
309           echo_test_string=`eval $prev`
310           export echo_test_string
311           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
312         else
313           # Oops.  We lost completely, so just stick with echo.
314           echo=echo
315         fi
316       fi
317     fi
318   fi
319 fi
320 fi
321
322 # Copy echo and quote the copy suitably for passing to libtool from
323 # the Makefile, instead of quoting the original, which is used later.
324 ECHO=$echo
325 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
326    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
327 fi
328
329
330 ac_help="$ac_help
331   --disable-libtool-lock  avoid locking (might break parallel builds)"
332 ac_help="$ac_help
333   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
334 ac_help="$ac_help
335
336 See INSTALL file for further details."
337
338 # Initialize some variables set by options.
339 # The variables have the same names as the options, with
340 # dashes changed to underlines.
341 build=NONE
342 cache_file=./config.cache
343 exec_prefix=NONE
344 host=NONE
345 no_create=
346 nonopt=NONE
347 no_recursion=
348 prefix=NONE
349 program_prefix=NONE
350 program_suffix=NONE
351 program_transform_name=s,x,x,
352 silent=
353 site=
354 srcdir=
355 target=NONE
356 verbose=
357 x_includes=NONE
358 x_libraries=NONE
359 bindir='${exec_prefix}/bin'
360 sbindir='${exec_prefix}/sbin'
361 libexecdir='${exec_prefix}/libexec'
362 datadir='${prefix}/share'
363 sysconfdir='${prefix}/etc'
364 sharedstatedir='${prefix}/com'
365 localstatedir='${prefix}/var'
366 libdir='${exec_prefix}/lib'
367 includedir='${prefix}/include'
368 oldincludedir='/usr/include'
369 infodir='${prefix}/info'
370 mandir='${prefix}/man'
371
372 # Initialize some other variables.
373 subdirs=
374 MFLAGS= MAKEFLAGS=
375 SHELL=${CONFIG_SHELL-/bin/sh}
376 # Maximum number of lines to put in a shell here document.
377 ac_max_here_lines=12
378
379 ac_prev=
380 for ac_option
381 do
382
383   # If the previous option needs an argument, assign it.
384   if test -n "$ac_prev"; then
385     eval "$ac_prev=\$ac_option"
386     ac_prev=
387     continue
388   fi
389
390   case "$ac_option" in
391   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
392   *) ac_optarg= ;;
393   esac
394
395   # Accept the important Cygnus configure options, so we can diagnose typos.
396
397   case "$ac_option" in
398
399   -bindir | --bindir | --bindi | --bind | --bin | --bi)
400     ac_prev=bindir ;;
401   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
402     bindir="$ac_optarg" ;;
403
404   -build | --build | --buil | --bui | --bu)
405     ac_prev=build ;;
406   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
407     build="$ac_optarg" ;;
408
409   -cache-file | --cache-file | --cache-fil | --cache-fi \
410   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
411     ac_prev=cache_file ;;
412   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
413   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
414     cache_file="$ac_optarg" ;;
415
416   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
417     ac_prev=datadir ;;
418   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
419   | --da=*)
420     datadir="$ac_optarg" ;;
421
422   -disable-* | --disable-*)
423     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
424     # Reject names that are not valid shell variable names.
425     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
426       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
427     fi
428     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
429     eval "enable_${ac_feature}=no" ;;
430
431   -enable-* | --enable-*)
432     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
433     # Reject names that are not valid shell variable names.
434     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
435       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
436     fi
437     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
438     case "$ac_option" in
439       *=*) ;;
440       *) ac_optarg=yes ;;
441     esac
442     eval "enable_${ac_feature}='$ac_optarg'" ;;
443
444   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
445   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
446   | --exec | --exe | --ex)
447     ac_prev=exec_prefix ;;
448   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
449   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
450   | --exec=* | --exe=* | --ex=*)
451     exec_prefix="$ac_optarg" ;;
452
453   -gas | --gas | --ga | --g)
454     # Obsolete; use --with-gas.
455     with_gas=yes ;;
456
457   -help | --help | --hel | --he)
458     # Omit some internal or obsolete options to make the list less imposing.
459     # This message is too long to be a string in the A/UX 3.1 sh.
460     cat << EOF
461 Usage: configure [options] [host]
462 Options: [defaults in brackets after descriptions]
463 Configuration:
464   --cache-file=FILE       cache test results in FILE
465   --help                  print this message
466   --no-create             do not create output files
467   --quiet, --silent       do not print \`checking...' messages
468   --version               print the version of autoconf that created configure
469 Directory and file names:
470   --prefix=PREFIX         install architecture-independent files in PREFIX
471                           [$ac_default_prefix]
472   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
473                           [same as prefix]
474   --bindir=DIR            user executables in DIR [EPREFIX/bin]
475   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
476   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
477   --datadir=DIR           read-only architecture-independent data in DIR
478                           [PREFIX/share]
479   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
480   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
481                           [PREFIX/com]
482   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
483   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
484   --includedir=DIR        C header files in DIR [PREFIX/include]
485   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
486   --infodir=DIR           info documentation in DIR [PREFIX/info]
487   --mandir=DIR            man documentation in DIR [PREFIX/man]
488   --srcdir=DIR            find the sources in DIR [configure dir or ..]
489   --program-prefix=PREFIX prepend PREFIX to installed program names
490   --program-suffix=SUFFIX append SUFFIX to installed program names
491   --program-transform-name=PROGRAM
492                           run sed PROGRAM on installed program names
493 EOF
494     cat << EOF
495 Host type:
496   --build=BUILD           configure for building on BUILD [BUILD=HOST]
497   --host=HOST             configure for HOST [guessed]
498   --target=TARGET         configure for TARGET [TARGET=HOST]
499 Features and packages:
500   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
501   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
502   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
503   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
504   --x-includes=DIR        X include files are in DIR
505   --x-libraries=DIR       X library files are in DIR
506 EOF
507     if test -n "$ac_help"; then
508       echo "--enable and --with options recognized:$ac_help"
509     fi
510     exit 0 ;;
511
512   -host | --host | --hos | --ho)
513     ac_prev=host ;;
514   -host=* | --host=* | --hos=* | --ho=*)
515     host="$ac_optarg" ;;
516
517   -includedir | --includedir | --includedi | --included | --include \
518   | --includ | --inclu | --incl | --inc)
519     ac_prev=includedir ;;
520   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
521   | --includ=* | --inclu=* | --incl=* | --inc=*)
522     includedir="$ac_optarg" ;;
523
524   -infodir | --infodir | --infodi | --infod | --info | --inf)
525     ac_prev=infodir ;;
526   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
527     infodir="$ac_optarg" ;;
528
529   -libdir | --libdir | --libdi | --libd)
530     ac_prev=libdir ;;
531   -libdir=* | --libdir=* | --libdi=* | --libd=*)
532     libdir="$ac_optarg" ;;
533
534   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
535   | --libexe | --libex | --libe)
536     ac_prev=libexecdir ;;
537   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
538   | --libexe=* | --libex=* | --libe=*)
539     libexecdir="$ac_optarg" ;;
540
541   -localstatedir | --localstatedir | --localstatedi | --localstated \
542   | --localstate | --localstat | --localsta | --localst \
543   | --locals | --local | --loca | --loc | --lo)
544     ac_prev=localstatedir ;;
545   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
546   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
547   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
548     localstatedir="$ac_optarg" ;;
549
550   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
551     ac_prev=mandir ;;
552   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
553     mandir="$ac_optarg" ;;
554
555   -nfp | --nfp | --nf)
556     # Obsolete; use --without-fp.
557     with_fp=no ;;
558
559   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
560   | --no-cr | --no-c)
561     no_create=yes ;;
562
563   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
564   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
565     no_recursion=yes ;;
566
567   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
568   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
569   | --oldin | --oldi | --old | --ol | --o)
570     ac_prev=oldincludedir ;;
571   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
572   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
573   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
574     oldincludedir="$ac_optarg" ;;
575
576   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
577     ac_prev=prefix ;;
578   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
579     prefix="$ac_optarg" ;;
580
581   -program-prefix | --program-prefix | --program-prefi | --program-pref \
582   | --program-pre | --program-pr | --program-p)
583     ac_prev=program_prefix ;;
584   -program-prefix=* | --program-prefix=* | --program-prefi=* \
585   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
586     program_prefix="$ac_optarg" ;;
587
588   -program-suffix | --program-suffix | --program-suffi | --program-suff \
589   | --program-suf | --program-su | --program-s)
590     ac_prev=program_suffix ;;
591   -program-suffix=* | --program-suffix=* | --program-suffi=* \
592   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
593     program_suffix="$ac_optarg" ;;
594
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     ac_prev=program_transform_name ;;
603   -program-transform-name=* | --program-transform-name=* \
604   | --program-transform-nam=* | --program-transform-na=* \
605   | --program-transform-n=* | --program-transform-=* \
606   | --program-transform=* | --program-transfor=* \
607   | --program-transfo=* | --program-transf=* \
608   | --program-trans=* | --program-tran=* \
609   | --progr-tra=* | --program-tr=* | --program-t=*)
610     program_transform_name="$ac_optarg" ;;
611
612   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
613   | -silent | --silent | --silen | --sile | --sil)
614     silent=yes ;;
615
616   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
617     ac_prev=sbindir ;;
618   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
619   | --sbi=* | --sb=*)
620     sbindir="$ac_optarg" ;;
621
622   -sharedstatedir | --sharedstatedir | --sharedstatedi \
623   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
624   | --sharedst | --shareds | --shared | --share | --shar \
625   | --sha | --sh)
626     ac_prev=sharedstatedir ;;
627   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
628   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
629   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
630   | --sha=* | --sh=*)
631     sharedstatedir="$ac_optarg" ;;
632
633   -site | --site | --sit)
634     ac_prev=site ;;
635   -site=* | --site=* | --sit=*)
636     site="$ac_optarg" ;;
637
638   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
639     ac_prev=srcdir ;;
640   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
641     srcdir="$ac_optarg" ;;
642
643   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
644   | --syscon | --sysco | --sysc | --sys | --sy)
645     ac_prev=sysconfdir ;;
646   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
647   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
648     sysconfdir="$ac_optarg" ;;
649
650   -target | --target | --targe | --targ | --tar | --ta | --t)
651     ac_prev=target ;;
652   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
653     target="$ac_optarg" ;;
654
655   -v | -verbose | --verbose | --verbos | --verbo | --verb)
656     verbose=yes ;;
657
658   -version | --version | --versio | --versi | --vers)
659     echo "configure generated by autoconf version 2.13.1"
660     exit 0 ;;
661
662   -with-* | --with-*)
663     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
664     # Reject names that are not valid shell variable names.
665     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
666       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
667     fi
668     ac_package=`echo $ac_package| sed 's/-/_/g'`
669     case "$ac_option" in
670       *=*) ;;
671       *) ac_optarg=yes ;;
672     esac
673     eval "with_${ac_package}='$ac_optarg'" ;;
674
675   -without-* | --without-*)
676     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
677     # Reject names that are not valid shell variable names.
678     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
679       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
680     fi
681     ac_package=`echo $ac_package| sed 's/-/_/g'`
682     eval "with_${ac_package}=no" ;;
683
684   --x)
685     # Obsolete; use --with-x.
686     with_x=yes ;;
687
688   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
689   | --x-incl | --x-inc | --x-in | --x-i)
690     ac_prev=x_includes ;;
691   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
692   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
693     x_includes="$ac_optarg" ;;
694
695   -x-libraries | --x-libraries | --x-librarie | --x-librari \
696   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
697     ac_prev=x_libraries ;;
698   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
699   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
700     x_libraries="$ac_optarg" ;;
701
702   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
703     ;;
704
705   *)
706     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
707       echo "configure: warning: $ac_option: invalid host type" 1>&2
708     fi
709     if test "x$nonopt" != xNONE; then
710       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
711     fi
712     nonopt="$ac_option"
713     ;;
714
715   esac
716 done
717
718 if test -n "$ac_prev"; then
719   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
720 fi
721
722 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
723
724 # File descriptor usage:
725 # 0 standard input
726 # 1 file creation
727 # 2 errors and warnings
728 # 3 some systems may open it to /dev/tty
729 # 4 used on the Kubota Titan
730 # 6 checking for... messages and results
731 # 5 compiler messages saved in config.log
732 if test "$silent" = yes; then
733   exec 6>/dev/null
734 else
735   exec 6>&1
736 fi
737 exec 5>./config.log
738
739 echo "\
740 This file contains any messages produced by compilers while
741 running configure, to aid debugging if configure makes a mistake.
742 " 1>&5
743
744 # Strip out --no-create and --no-recursion so they do not pile up.
745 # Also quote any args containing shell metacharacters.
746 ac_configure_args=
747 for ac_arg
748 do
749   case "$ac_arg" in
750   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
751   | --no-cr | --no-c) ;;
752   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
753   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
754   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
755   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
756   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
757   esac
758 done
759
760 # NLS nuisances.
761 # Only set these to C if already set.  These must not be set unconditionally
762 # because not all systems understand e.g. LANG=C (notably SCO).
763 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
764 # Non-C LC_CTYPE values break the ctype check.
765 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
766 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
767 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
768 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
769
770 # confdefs.h avoids OS command line length limits that DEFS can exceed.
771 rm -rf conftest* confdefs.h
772 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
773 echo > confdefs.h
774
775 # A filename unique to this package, relative to the directory that
776 # configure is in, which we can look for to find out if srcdir is correct.
777 ac_unique_file=build/version.sh
778
779 # Find the source files, if location was not specified.
780 if test -z "$srcdir"; then
781   ac_srcdir_defaulted=yes
782   # Try the directory containing this script, then its parent.
783   ac_prog=$0
784   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
785   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
786   srcdir=$ac_confdir
787   if test ! -r $srcdir/$ac_unique_file; then
788     srcdir=..
789   fi
790 else
791   ac_srcdir_defaulted=no
792 fi
793 if test ! -r $srcdir/$ac_unique_file; then
794   if test "$ac_srcdir_defaulted" = yes; then
795     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
796   else
797     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
798   fi
799 fi
800 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
801
802 # Prefer explicitly selected file to automatically selected ones.
803 if test -z "$CONFIG_SITE"; then
804   if test "x$prefix" != xNONE; then
805     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
806   else
807     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
808   fi
809 fi
810 for ac_site_file in $CONFIG_SITE; do
811   if test -r "$ac_site_file"; then
812     echo "loading site script $ac_site_file"
813     . "$ac_site_file"
814   fi
815 done
816
817
818 ac_ext=c
819 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
820 ac_cpp='$CPP $CPPFLAGS'
821 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
822 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
823 cross_compiling=$ac_cv_prog_cc_cross
824
825 ac_exeext=
826 ac_objext=o
827 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
828   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
829   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
830     ac_n= ac_c='
831 ' ac_t='        '
832   else
833     ac_n=-n ac_c= ac_t=
834   fi
835 else
836   ac_n= ac_c='\c' ac_t=
837 fi
838
839
840 # set unset (borrowed from autoconf 2.49c)
841 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
842   ol_unset=unset
843 else
844   ol_unset=false
845 fi
846 # unset CDPATH
847 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
848
849 ac_aux_dir=
850 for ac_dir in build $srcdir/build; do
851   if test -f $ac_dir/install-sh; then
852     ac_aux_dir=$ac_dir
853     ac_install_sh="$ac_aux_dir/install-sh -c"
854     break
855   elif test -f $ac_dir/install.sh; then
856     ac_aux_dir=$ac_dir
857     ac_install_sh="$ac_aux_dir/install.sh -c"
858     break
859   elif test -f $ac_dir/shtool; then
860     ac_aux_dir=$ac_dir
861     ac_install_sh="$ac_aux_dir/shtool install -c"
862     break
863   fi
864 done
865 if test -z "$ac_aux_dir"; then
866   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
867 fi
868 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
869 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
870 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
871
872 eval `$ac_aux_dir/version.sh`
873 if test -z "$OL_STRING"; then
874         { echo "configure: error: could not determine version" 1>&2; exit 1; }
875 fi
876
877 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
878         ac_cv_shtool="$ac_aux_dir/shtool"
879 else
880         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
881 fi
882
883 SHTOOL="$ac_cv_shtool"
884
885 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
886 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
887
888 OPENLDAP_CVS=""
889 if test -d $ac_aux_dir/CVS; then
890         OPENLDAP_CVS="(from CVS sources) "
891 fi
892
893 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
894
895
896 echo $ac_n "checking host system type""... $ac_c" 1>&6
897 echo "configure:898: checking host system type" >&5
898 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
899
900 # Make sure we can run config.sub.
901   if $ac_config_sub sun4 >/dev/null 2>&1; then :
902     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
903   fi
904
905   ac_cv_host_alias=$host
906   case "$ac_cv_host_alias" in
907   NONE)
908     case $nonopt in
909     NONE)
910       if ac_cv_host_alias=`$ac_config_guess`; then :
911       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
912       fi ;;
913     *) ac_cv_host_alias=$nonopt ;;
914     esac ;;
915   esac
916
917   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
918   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
919   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
920   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
921 else
922   echo $ac_n "(cached) $ac_c" 1>&6
923 fi
924
925 echo "$ac_t""$ac_cv_host" 1>&6
926
927 host=$ac_cv_host
928 host_alias=$ac_cv_host_alias
929 host_cpu=$ac_cv_host_cpu
930 host_vendor=$ac_cv_host_vendor
931 host_os=$ac_cv_host_os
932
933
934
935
936
937 echo $ac_n "checking target system type""... $ac_c" 1>&6
938 echo "configure:939: checking target system type" >&5
939 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
940
941 # Make sure we can run config.sub.
942   if $ac_config_sub sun4 >/dev/null 2>&1; then :
943     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
944   fi
945
946   ac_cv_target_alias=$target
947   case "$ac_cv_target_alias" in
948   NONE)
949     case $nonopt in
950     NONE)
951       ac_cv_target_alias=$host_alias ;;
952
953     *) ac_cv_target_alias=$nonopt ;;
954     esac ;;
955   esac
956
957   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
958   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
959   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
960   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
961 else
962   echo $ac_n "(cached) $ac_c" 1>&6
963 fi
964
965 echo "$ac_t""$ac_cv_target" 1>&6
966
967 target=$ac_cv_target
968 target_alias=$ac_cv_target_alias
969 target_cpu=$ac_cv_target_cpu
970 target_vendor=$ac_cv_target_vendor
971 target_os=$ac_cv_target_os
972
973
974
975
976
977 echo $ac_n "checking build system type""... $ac_c" 1>&6
978 echo "configure:979: checking build system type" >&5
979 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
980
981 # Make sure we can run config.sub.
982   if $ac_config_sub sun4 >/dev/null 2>&1; then :
983     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
984   fi
985
986   ac_cv_build_alias=$build
987   case "$ac_cv_build_alias" in
988   NONE)
989     case $nonopt in
990     NONE)
991       ac_cv_build_alias=$host_alias ;;
992
993     *) ac_cv_build_alias=$nonopt ;;
994     esac ;;
995   esac
996
997   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
998   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
999   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1000   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1001 else
1002   echo $ac_n "(cached) $ac_c" 1>&6
1003 fi
1004
1005 echo "$ac_t""$ac_cv_build" 1>&6
1006
1007 build=$ac_cv_build
1008 build_alias=$ac_cv_build_alias
1009 build_cpu=$ac_cv_build_cpu
1010 build_vendor=$ac_cv_build_vendor
1011 build_os=$ac_cv_build_os
1012
1013
1014
1015
1016
1017 # Do some error checking and defaulting for the host and target type.
1018 # The inputs are:
1019 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1020 #
1021 # The rules are:
1022 # 1. You are not allowed to specify --host, --target, and nonopt at the
1023 #    same time.
1024 # 2. Host defaults to nonopt.
1025 # 3. If nonopt is not specified, then host defaults to the current host,
1026 #    as determined by config.guess.
1027 # 4. Target and build default to nonopt.
1028 # 5. If nonopt is not specified, then target and build default to host.
1029
1030 # The aliases save the names the user supplied, while $host etc.
1031 # will get canonicalized.
1032 case $host---$target---$nonopt in
1033 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1034 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1035 esac
1036
1037 test "$host_alias" != "$target_alias" &&
1038   test "$program_prefix$program_suffix$program_transform_name" = \
1039     NONENONEs,x,x, &&
1040   program_prefix=${target_alias}-
1041
1042
1043 # Find a good install program.  We prefer a C program (faster),
1044 # so one script is as good as another.  But avoid the broken or
1045 # incompatible versions:
1046 # SysV /etc/install, /usr/sbin/install
1047 # SunOS /usr/etc/install
1048 # IRIX /sbin/install
1049 # AIX /bin/install
1050 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1051 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1052 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1053 # ./install, which can be erroneously created by make from ./install.sh.
1054 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1055 echo "configure:1056: checking for a BSD compatible install" >&5
1056 if test -z "$INSTALL"; then
1057 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1058   echo $ac_n "(cached) $ac_c" 1>&6
1059 else
1060     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1061   for ac_dir in $PATH; do
1062     # Account for people who put trailing slashes in PATH elements.
1063     case "$ac_dir/" in
1064     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1065     *)
1066       # OSF1 and SCO ODT 3.0 have their own names for install.
1067       # Don't use installbsd from OSF since it installs stuff as root
1068       # by default.
1069       for ac_prog in ginstall scoinst install; do
1070         if test -f $ac_dir/$ac_prog; then
1071           if test $ac_prog = install &&
1072             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1073             # AIX install.  It has an incompatible calling convention.
1074             :
1075           elif test $ac_prog = install &&
1076             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1077             # program-specific install script used by HP pwplus--don't use.
1078             :
1079           else
1080             ac_cv_path_install="$ac_dir/$ac_prog -c"
1081             break 2
1082           fi
1083         fi
1084       done
1085       ;;
1086     esac
1087   done
1088   IFS="$ac_save_IFS"
1089
1090 fi
1091   if test "${ac_cv_path_install+set}" = set; then
1092     INSTALL="$ac_cv_path_install"
1093   else
1094     # As a last resort, use the slow shell script.  We don't cache a
1095     # path for INSTALL within a source directory, because that will
1096     # break other packages using the cache if that directory is
1097     # removed, or if the path is relative.
1098     INSTALL="$ac_install_sh"
1099   fi
1100 fi
1101 echo "$ac_t""$INSTALL" 1>&6
1102
1103 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1104 # It thinks the first close brace ends the variable substitution.
1105 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1106
1107 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1108
1109 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1110
1111 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1112 echo "configure:1113: checking whether build environment is sane" >&5
1113 # Just in case
1114 sleep 1
1115 echo timestamp > conftestfile
1116 # Do `set' in a subshell so we don't clobber the current shell's
1117 # arguments.  Must try -L first in case configure is actually a
1118 # symlink; some systems play weird games with the mod time of symlinks
1119 # (eg FreeBSD returns the mod time of the symlink's containing
1120 # directory).
1121 if (
1122    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1123    if test "$*" = "X"; then
1124       # -L didn't work.
1125       set X `ls -t $srcdir/configure conftestfile`
1126    fi
1127    if test "$*" != "X $srcdir/configure conftestfile" \
1128       && test "$*" != "X conftestfile $srcdir/configure"; then
1129
1130       # If neither matched, then we have a broken ls.  This can happen
1131       # if, for instance, CONFIG_SHELL is bash and it inherits a
1132       # broken ls alias from the environment.  This has actually
1133       # happened.  Such a system could not be considered "sane".
1134       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1135 alias in your environment" 1>&2; exit 1; }
1136    fi
1137
1138    test "$2" = conftestfile
1139    )
1140 then
1141    # Ok.
1142    :
1143 else
1144    { echo "configure: error: newly created file is older than distributed files!
1145 Check your system clock" 1>&2; exit 1; }
1146 fi
1147 rm -f conftest*
1148 echo "$ac_t""yes" 1>&6
1149 if test "$program_transform_name" = s,x,x,; then
1150   program_transform_name=
1151 else
1152   # Double any \ or $.  echo might interpret backslashes.
1153   cat <<\EOF_SED > conftestsed
1154 s,\\,\\\\,g; s,\$,$$,g
1155 EOF_SED
1156   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1157   rm -f conftestsed
1158 fi
1159 test "$program_prefix" != NONE &&
1160   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1161 # Use a double $ so make ignores it.
1162 test "$program_suffix" != NONE &&
1163   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1164
1165 # sed with no file args requires a program.
1166 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1167
1168 for ac_prog in mawk gawk nawk awk
1169 do
1170 # Extract the first word of "$ac_prog", so it can be a program name with args.
1171 set dummy $ac_prog; ac_word=$2
1172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1173 echo "configure:1174: checking for $ac_word" >&5
1174 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1175   echo $ac_n "(cached) $ac_c" 1>&6
1176 else
1177   if test -n "$AWK"; then
1178   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1179 else
1180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1181   ac_dummy="$PATH"
1182   for ac_dir in $ac_dummy; do
1183     test -z "$ac_dir" && ac_dir=.
1184     if test -f $ac_dir/$ac_word; then
1185       ac_cv_prog_AWK="$ac_prog"
1186       break
1187     fi
1188   done
1189   IFS="$ac_save_ifs"
1190 fi
1191 fi
1192 AWK="$ac_cv_prog_AWK"
1193 if test -n "$AWK"; then
1194   echo "$ac_t""$AWK" 1>&6
1195 else
1196   echo "$ac_t""no" 1>&6
1197 fi
1198
1199 test -n "$AWK" && break
1200 done
1201
1202 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1203 echo "configure:1204: checking whether ${MAKE-make} sets \${MAKE}" >&5
1204 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1205 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1206   echo $ac_n "(cached) $ac_c" 1>&6
1207 else
1208   cat > conftestmake <<\EOF
1209 all:
1210         @echo 'ac_maketemp="${MAKE}"'
1211 EOF
1212 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1213 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1214 if test -n "$ac_maketemp"; then
1215   eval ac_cv_prog_make_${ac_make}_set=yes
1216 else
1217   eval ac_cv_prog_make_${ac_make}_set=no
1218 fi
1219 rm -f conftestmake
1220 fi
1221 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1222   echo "$ac_t""yes" 1>&6
1223   SET_MAKE=
1224 else
1225   echo "$ac_t""no" 1>&6
1226   SET_MAKE="MAKE=${MAKE-make}"
1227 fi
1228
1229
1230
1231 PACKAGE=$OL_PACKAGE
1232
1233 VERSION=$OL_VERSION
1234
1235 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1236   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1237 fi
1238
1239
1240
1241 missing_dir=`cd $ac_aux_dir && pwd`
1242 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working aclocal" >&5
1244 # Run test in a subshell; some versions of sh will print an error if
1245 # an executable is not found, even if stderr is redirected.
1246 # Redirect stdin to placate older versions of autoconf.  Sigh.
1247 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1248    ACLOCAL=aclocal
1249    echo "$ac_t""found" 1>&6
1250 else
1251    ACLOCAL="$missing_dir/missing aclocal"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working autoconf" >&5
1257 # Run test in a subshell; some versions of sh will print an error if
1258 # an executable is not found, even if stderr is redirected.
1259 # Redirect stdin to placate older versions of autoconf.  Sigh.
1260 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOCONF=autoconf
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOCONF="$missing_dir/missing autoconf"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working automake" >&5
1270 # Run test in a subshell; some versions of sh will print an error if
1271 # an executable is not found, even if stderr is redirected.
1272 # Redirect stdin to placate older versions of autoconf.  Sigh.
1273 if (automake --version) < /dev/null > /dev/null 2>&1; then
1274    AUTOMAKE=automake
1275    echo "$ac_t""found" 1>&6
1276 else
1277    AUTOMAKE="$missing_dir/missing automake"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1282 echo "configure:1283: checking for working autoheader" >&5
1283 # Run test in a subshell; some versions of sh will print an error if
1284 # an executable is not found, even if stderr is redirected.
1285 # Redirect stdin to placate older versions of autoconf.  Sigh.
1286 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1287    AUTOHEADER=autoheader
1288    echo "$ac_t""found" 1>&6
1289 else
1290    AUTOHEADER="$missing_dir/missing autoheader"
1291    echo "$ac_t""missing" 1>&6
1292 fi
1293
1294 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1295 echo "configure:1296: checking for working makeinfo" >&5
1296 # Run test in a subshell; some versions of sh will print an error if
1297 # an executable is not found, even if stderr is redirected.
1298 # Redirect stdin to placate older versions of autoconf.  Sigh.
1299 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1300    MAKEINFO=makeinfo
1301    echo "$ac_t""found" 1>&6
1302 else
1303    MAKEINFO="$missing_dir/missing makeinfo"
1304    echo "$ac_t""missing" 1>&6
1305 fi
1306
1307 install_sh="$missing_dir/install-sh"
1308 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1309
1310 for ac_prog in gnutar gtar tar
1311 do
1312 # Extract the first word of "$ac_prog", so it can be a program name with args.
1313 set dummy $ac_prog; ac_word=$2
1314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1315 echo "configure:1316: checking for $ac_word" >&5
1316 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1317   echo $ac_n "(cached) $ac_c" 1>&6
1318 else
1319   if test -n "$AMTAR"; then
1320   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1321 else
1322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1323   ac_dummy="$PATH"
1324   for ac_dir in $ac_dummy; do
1325     test -z "$ac_dir" && ac_dir=.
1326     if test -f $ac_dir/$ac_word; then
1327       ac_cv_prog_AMTAR="$ac_prog"
1328       break
1329     fi
1330   done
1331   IFS="$ac_save_ifs"
1332 fi
1333 fi
1334 AMTAR="$ac_cv_prog_AMTAR"
1335 if test -n "$AMTAR"; then
1336   echo "$ac_t""$AMTAR" 1>&6
1337 else
1338   echo "$ac_t""no" 1>&6
1339 fi
1340
1341 test -n "$AMTAR" && break
1342 done
1343
1344
1345 AMTARFLAGS=
1346 if test -n "$AMTAR"; then
1347   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1348         AMTARFLAGS=o
1349   fi
1350 fi
1351
1352 cat >> confdefs.h <<EOF
1353 #define OPENLDAP_PACKAGE "$PACKAGE"
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define OPENLDAP_VERSION "$VERSION"
1358 EOF
1359
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION $OL_API_INC
1363 EOF
1364
1365 cat >> confdefs.h <<EOF
1366 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1367 EOF
1368
1369 cat >> confdefs.h <<EOF
1370 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1371 EOF
1372
1373 cat >> confdefs.h <<EOF
1374 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1375 EOF
1376
1377
1378 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1379
1380 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1381
1382 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1383
1384
1385
1386 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1387 echo "configure:1388: checking configure arguments" >&5
1388
1389
1390 top_builddir=`pwd`
1391
1392 ldap_subdir="/openldap"
1393
1394 # Check whether --with-subdir or --without-subdir was given.
1395 if test "${with_subdir+set}" = set; then
1396   withval="$with_subdir"
1397   case "$withval" in
1398         no) ldap_subdir=""
1399                 ;;
1400         yes)
1401                 ;;
1402         /*|\\*)
1403                 ldap_subdir="$withval"
1404                 ;;
1405         *)
1406                 ldap_subdir="/$withval"
1407                 ;;
1408 esac
1409
1410 fi
1411
1412
1413 # OpenLDAP --enable-debug
1414         # Check whether --enable-debug or --disable-debug was given.
1415 if test "${enable_debug+set}" = set; then
1416   enableval="$enable_debug"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1426         fi
1427         ol_enable_debug="$ol_arg"
1428
1429 else
1430         ol_enable_debug="yes"
1431 fi
1432 # end --enable-debug
1433 # OpenLDAP --enable-dynamic
1434         # Check whether --enable-dynamic or --disable-dynamic was given.
1435 if test "${enable_dynamic+set}" = set; then
1436   enableval="$enable_dynamic"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no ; do
1440                 if test "$enableval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1446         fi
1447         ol_enable_dynamic="$ol_arg"
1448
1449 else
1450         ol_enable_dynamic="no"
1451 fi
1452 # end --enable-dynamic
1453 # OpenLDAP --enable-syslog
1454         # Check whether --enable-syslog or --disable-syslog was given.
1455 if test "${enable_syslog+set}" = set; then
1456   enableval="$enable_syslog"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1466         fi
1467         ol_enable_syslog="$ol_arg"
1468
1469 else
1470         ol_enable_syslog="auto"
1471 fi
1472 # end --enable-syslog
1473 # OpenLDAP --enable-proctitle
1474         # Check whether --enable-proctitle or --disable-proctitle was given.
1475 if test "${enable_proctitle+set}" = set; then
1476   enableval="$enable_proctitle"
1477   
1478         ol_arg=invalid
1479         for ol_val in auto yes no ; do
1480                 if test "$enableval" = "$ol_val" ; then
1481                         ol_arg="$ol_val"
1482                 fi
1483         done
1484         if test "$ol_arg" = "invalid" ; then
1485                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1486         fi
1487         ol_enable_proctitle="$ol_arg"
1488
1489 else
1490         ol_enable_proctitle="yes"
1491 fi
1492 # end --enable-proctitle
1493 ol_enable_referrals=${ol_enable_referrals-no}
1494 ol_enable_kbind=${ol_enable_kbind-no}
1495 # OpenLDAP --enable-ipv6
1496         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1497 if test "${enable_ipv6+set}" = set; then
1498   enableval="$enable_ipv6"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1508         fi
1509         ol_enable_ipv6="$ol_arg"
1510
1511 else
1512         ol_enable_ipv6="auto"
1513 fi
1514 # end --enable-ipv6
1515 # OpenLDAP --enable-local
1516         # Check whether --enable-local or --disable-local was given.
1517 if test "${enable_local+set}" = set; then
1518   enableval="$enable_local"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1528         fi
1529         ol_enable_local="$ol_arg"
1530
1531 else
1532         ol_enable_local="auto"
1533 fi
1534 # end --enable-local
1535
1536
1537 # OpenLDAP --with-cyrus_sasl
1538         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1539 if test "${with_cyrus_sasl+set}" = set; then
1540   withval="$with_cyrus_sasl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1550         fi
1551         ol_with_cyrus_sasl="$ol_arg"
1552
1553 else
1554         ol_with_cyrus_sasl="auto"
1555 fi
1556 # end --with-cyrus_sasl
1557
1558 # OpenLDAP --with-fetch
1559         # Check whether --with-fetch or --without-fetch was given.
1560 if test "${with_fetch+set}" = set; then
1561   withval="$with_fetch"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no  ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1571         fi
1572         ol_with_fetch="$ol_arg"
1573
1574 else
1575         ol_with_fetch="auto"
1576 fi
1577 # end --with-fetch
1578
1579 ol_with_kerberos=${ol_with_kerberos-auto}
1580 # OpenLDAP --with-threads
1581         # Check whether --with-threads or --without-threads was given.
1582 if test "${with_threads+set}" = set; then
1583   withval="$with_threads"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1593         fi
1594         ol_with_threads="$ol_arg"
1595
1596 else
1597         ol_with_threads="auto"
1598 fi
1599 # end --with-threads
1600
1601 # OpenLDAP --with-tls
1602         # Check whether --with-tls or --without-tls was given.
1603 if test "${with_tls+set}" = set; then
1604   withval="$with_tls"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto ssleay openssl yes no  ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1614         fi
1615         ol_with_tls="$ol_arg"
1616
1617 else
1618         ol_with_tls="auto"
1619 fi
1620 # end --with-tls
1621
1622 # OpenLDAP --with-yielding_select
1623         # Check whether --with-yielding_select or --without-yielding_select was given.
1624 if test "${with_yielding_select+set}" = set; then
1625   withval="$with_yielding_select"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no manual  ; do
1629                 if test "$withval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1635         fi
1636         ol_with_yielding_select="$ol_arg"
1637
1638 else
1639         ol_with_yielding_select="auto"
1640 fi
1641 # end --with-yielding_select
1642
1643
1644
1645 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1646 if test "${with_xxslapdoptions+set}" = set; then
1647   withval="$with_xxslapdoptions"
1648   :
1649 fi
1650
1651 # OpenLDAP --enable-slapd
1652         # Check whether --enable-slapd or --disable-slapd was given.
1653 if test "${enable_slapd+set}" = set; then
1654   enableval="$enable_slapd"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1664         fi
1665         ol_enable_slapd="$ol_arg"
1666
1667 else
1668         ol_enable_slapd="yes"
1669 fi
1670 # end --enable-slapd
1671 # OpenLDAP --enable-aci
1672         # Check whether --enable-aci or --disable-aci was given.
1673 if test "${enable_aci+set}" = set; then
1674   enableval="$enable_aci"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1684         fi
1685         ol_enable_aci="$ol_arg"
1686
1687 else
1688         ol_enable_aci="no"
1689 fi
1690 # end --enable-aci
1691 # OpenLDAP --enable-cleartext
1692         # Check whether --enable-cleartext or --disable-cleartext was given.
1693 if test "${enable_cleartext+set}" = set; then
1694   enableval="$enable_cleartext"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1704         fi
1705         ol_enable_cleartext="$ol_arg"
1706
1707 else
1708         ol_enable_cleartext="yes"
1709 fi
1710 # end --enable-cleartext
1711 # OpenLDAP --enable-crypt
1712         # Check whether --enable-crypt or --disable-crypt was given.
1713 if test "${enable_crypt+set}" = set; then
1714   enableval="$enable_crypt"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1724         fi
1725         ol_enable_crypt="$ol_arg"
1726
1727 else
1728         ol_enable_crypt="no"
1729 fi
1730 # end --enable-crypt
1731 # OpenLDAP --enable-lmpasswd
1732         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1733 if test "${enable_lmpasswd+set}" = set; then
1734   enableval="$enable_lmpasswd"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1744         fi
1745         ol_enable_lmpasswd="$ol_arg"
1746
1747 else
1748         ol_enable_lmpasswd="no"
1749 fi
1750 # end --enable-lmpasswd
1751 # OpenLDAP --enable-spasswd
1752         # Check whether --enable-spasswd or --disable-spasswd was given.
1753 if test "${enable_spasswd+set}" = set; then
1754   enableval="$enable_spasswd"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_spasswd="$ol_arg"
1766
1767 else
1768         ol_enable_spasswd="no"
1769 fi
1770 # end --enable-spasswd
1771 # OpenLDAP --enable-modules
1772         # Check whether --enable-modules or --disable-modules was given.
1773 if test "${enable_modules+set}" = set; then
1774   enableval="$enable_modules"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1784         fi
1785         ol_enable_modules="$ol_arg"
1786
1787 else
1788         ol_enable_modules="no"
1789 fi
1790 # end --enable-modules
1791 ol_enable_multimaster=${ol_enable_multimaster-no}
1792 # OpenLDAP --enable-rewrite
1793         # Check whether --enable-rewrite or --disable-rewrite was given.
1794 if test "${enable_rewrite+set}" = set; then
1795   enableval="$enable_rewrite"
1796   
1797         ol_arg=invalid
1798         for ol_val in auto yes no ; do
1799                 if test "$enableval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1805         fi
1806         ol_enable_rewrite="$ol_arg"
1807
1808 else
1809         ol_enable_rewrite="auto"
1810 fi
1811 # end --enable-rewrite
1812 # OpenLDAP --enable-rlookups
1813         # Check whether --enable-rlookups or --disable-rlookups was given.
1814 if test "${enable_rlookups+set}" = set; then
1815   enableval="$enable_rlookups"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1825         fi
1826         ol_enable_rlookups="$ol_arg"
1827
1828 else
1829         ol_enable_rlookups="no"
1830 fi
1831 # end --enable-rlookups
1832 # OpenLDAP --enable-slapi
1833         # Check whether --enable-slapi or --disable-slapi was given.
1834 if test "${enable_slapi+set}" = set; then
1835   enableval="$enable_slapi"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1845         fi
1846         ol_enable_slapi="$ol_arg"
1847
1848 else
1849         ol_enable_slapi="no"
1850 fi
1851 # end --enable-slapi
1852 # OpenLDAP --enable-slp
1853         # Check whether --enable-slp or --disable-slp was given.
1854 if test "${enable_slp+set}" = set; then
1855   enableval="$enable_slp"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1865         fi
1866         ol_enable_slp="$ol_arg"
1867
1868 else
1869         ol_enable_slp="no"
1870 fi
1871 # end --enable-slp
1872 # OpenLDAP --enable-wrappers
1873         # Check whether --enable-wrappers or --disable-wrappers was given.
1874 if test "${enable_wrappers+set}" = set; then
1875   enableval="$enable_wrappers"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1885         fi
1886         ol_enable_wrappers="$ol_arg"
1887
1888 else
1889         ol_enable_wrappers="no"
1890 fi
1891 # end --enable-wrappers
1892
1893
1894 # OpenLDAP --enable-bdb
1895         # Check whether --enable-bdb or --disable-bdb was given.
1896 if test "${enable_bdb+set}" = set; then
1897   enableval="$enable_bdb"
1898   
1899         ol_arg=invalid
1900         for ol_val in auto yes no ; do
1901                 if test "$enableval" = "$ol_val" ; then
1902                         ol_arg="$ol_val"
1903                 fi
1904         done
1905         if test "$ol_arg" = "invalid" ; then
1906                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1907         fi
1908         ol_enable_bdb="$ol_arg"
1909
1910 else
1911         ol_enable_bdb="yes"
1912 fi
1913 # end --enable-bdb
1914 # OpenLDAP --with-bdb_module
1915         # Check whether --with-bdb_module or --without-bdb_module was given.
1916 if test "${with_bdb_module+set}" = set; then
1917   withval="$with_bdb_module"
1918   
1919         ol_arg=invalid
1920         for ol_val in static dynamic ; do
1921                 if test "$withval" = "$ol_val" ; then
1922                         ol_arg="$ol_val"
1923                 fi
1924         done
1925         if test "$ol_arg" = "invalid" ; then
1926                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1927         fi
1928         ol_with_bdb_module="$ol_arg"
1929
1930 else
1931         ol_with_bdb_module="static"
1932 fi
1933 # end --with-bdb_module
1934
1935 # OpenLDAP --enable-dnssrv
1936         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1937 if test "${enable_dnssrv+set}" = set; then
1938   enableval="$enable_dnssrv"
1939   
1940         ol_arg=invalid
1941         for ol_val in auto yes no ; do
1942                 if test "$enableval" = "$ol_val" ; then
1943                         ol_arg="$ol_val"
1944                 fi
1945         done
1946         if test "$ol_arg" = "invalid" ; then
1947                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1948         fi
1949         ol_enable_dnssrv="$ol_arg"
1950
1951 else
1952         ol_enable_dnssrv="no"
1953 fi
1954 # end --enable-dnssrv
1955 # OpenLDAP --with-dnssrv_module
1956         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1957 if test "${with_dnssrv_module+set}" = set; then
1958   withval="$with_dnssrv_module"
1959   
1960         ol_arg=invalid
1961         for ol_val in static dynamic ; do
1962                 if test "$withval" = "$ol_val" ; then
1963                         ol_arg="$ol_val"
1964                 fi
1965         done
1966         if test "$ol_arg" = "invalid" ; then
1967                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1968         fi
1969         ol_with_dnssrv_module="$ol_arg"
1970
1971 else
1972         ol_with_dnssrv_module="static"
1973 fi
1974 # end --with-dnssrv_module
1975
1976 # OpenLDAP --enable-hdb
1977         # Check whether --enable-hdb or --disable-hdb was given.
1978 if test "${enable_hdb+set}" = set; then
1979   enableval="$enable_hdb"
1980   
1981         ol_arg=invalid
1982         for ol_val in auto yes no ; do
1983                 if test "$enableval" = "$ol_val" ; then
1984                         ol_arg="$ol_val"
1985                 fi
1986         done
1987         if test "$ol_arg" = "invalid" ; then
1988                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1989         fi
1990         ol_enable_hdb="$ol_arg"
1991
1992 else
1993         ol_enable_hdb="no"
1994 fi
1995 # end --enable-hdb
1996 # OpenLDAP --with-hdb_module
1997         # Check whether --with-hdb_module or --without-hdb_module was given.
1998 if test "${with_hdb_module+set}" = set; then
1999   withval="$with_hdb_module"
2000   
2001         ol_arg=invalid
2002         for ol_val in static dynamic ; do
2003                 if test "$withval" = "$ol_val" ; then
2004                         ol_arg="$ol_val"
2005                 fi
2006         done
2007         if test "$ol_arg" = "invalid" ; then
2008                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2009         fi
2010         ol_with_hdb_module="$ol_arg"
2011
2012 else
2013         ol_with_hdb_module="static"
2014 fi
2015 # end --with-hdb_module
2016
2017 # OpenLDAP --enable-ldap
2018         # Check whether --enable-ldap or --disable-ldap was given.
2019 if test "${enable_ldap+set}" = set; then
2020   enableval="$enable_ldap"
2021   
2022         ol_arg=invalid
2023         for ol_val in auto yes no ; do
2024                 if test "$enableval" = "$ol_val" ; then
2025                         ol_arg="$ol_val"
2026                 fi
2027         done
2028         if test "$ol_arg" = "invalid" ; then
2029                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2030         fi
2031         ol_enable_ldap="$ol_arg"
2032
2033 else
2034         ol_enable_ldap="no"
2035 fi
2036 # end --enable-ldap
2037 # OpenLDAP --with-ldap_module
2038         # Check whether --with-ldap_module or --without-ldap_module was given.
2039 if test "${with_ldap_module+set}" = set; then
2040   withval="$with_ldap_module"
2041   
2042         ol_arg=invalid
2043         for ol_val in static dynamic ; do
2044                 if test "$withval" = "$ol_val" ; then
2045                         ol_arg="$ol_val"
2046                 fi
2047         done
2048         if test "$ol_arg" = "invalid" ; then
2049                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2050         fi
2051         ol_with_ldap_module="$ol_arg"
2052
2053 else
2054         ol_with_ldap_module="static"
2055 fi
2056 # end --with-ldap_module
2057
2058 # OpenLDAP --enable-ldbm
2059         # Check whether --enable-ldbm or --disable-ldbm was given.
2060 if test "${enable_ldbm+set}" = set; then
2061   enableval="$enable_ldbm"
2062   
2063         ol_arg=invalid
2064         for ol_val in auto yes no ; do
2065                 if test "$enableval" = "$ol_val" ; then
2066                         ol_arg="$ol_val"
2067                 fi
2068         done
2069         if test "$ol_arg" = "invalid" ; then
2070                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2071         fi
2072         ol_enable_ldbm="$ol_arg"
2073
2074 else
2075         ol_enable_ldbm="no"
2076 fi
2077 # end --enable-ldbm
2078 # OpenLDAP --with-ldbm_api
2079         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2080 if test "${with_ldbm_api+set}" = set; then
2081   withval="$with_ldbm_api"
2082   
2083         ol_arg=invalid
2084         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2085                 if test "$withval" = "$ol_val" ; then
2086                         ol_arg="$ol_val"
2087                 fi
2088         done
2089         if test "$ol_arg" = "invalid" ; then
2090                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2091         fi
2092         ol_with_ldbm_api="$ol_arg"
2093
2094 else
2095         ol_with_ldbm_api="auto"
2096 fi
2097 # end --with-ldbm_api
2098
2099 # OpenLDAP --with-ldbm_module
2100         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2101 if test "${with_ldbm_module+set}" = set; then
2102   withval="$with_ldbm_module"
2103   
2104         ol_arg=invalid
2105         for ol_val in static dynamic ; do
2106                 if test "$withval" = "$ol_val" ; then
2107                         ol_arg="$ol_val"
2108                 fi
2109         done
2110         if test "$ol_arg" = "invalid" ; then
2111                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2112         fi
2113         ol_with_ldbm_module="$ol_arg"
2114
2115 else
2116         ol_with_ldbm_module="static"
2117 fi
2118 # end --with-ldbm_module
2119
2120 # OpenLDAP --with-ldbm_type
2121         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2122 if test "${with_ldbm_type+set}" = set; then
2123   withval="$with_ldbm_type"
2124   
2125         ol_arg=invalid
2126         for ol_val in auto btree hash ; do
2127                 if test "$withval" = "$ol_val" ; then
2128                         ol_arg="$ol_val"
2129                 fi
2130         done
2131         if test "$ol_arg" = "invalid" ; then
2132                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2133         fi
2134         ol_with_ldbm_type="$ol_arg"
2135
2136 else
2137         ol_with_ldbm_type="auto"
2138 fi
2139 # end --with-ldbm_type
2140
2141 # OpenLDAP --enable-meta
2142         # Check whether --enable-meta or --disable-meta was given.
2143 if test "${enable_meta+set}" = set; then
2144   enableval="$enable_meta"
2145   
2146         ol_arg=invalid
2147         for ol_val in auto yes no ; do
2148                 if test "$enableval" = "$ol_val" ; then
2149                         ol_arg="$ol_val"
2150                 fi
2151         done
2152         if test "$ol_arg" = "invalid" ; then
2153                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2154         fi
2155         ol_enable_meta="$ol_arg"
2156
2157 else
2158         ol_enable_meta="no"
2159 fi
2160 # end --enable-meta
2161 # OpenLDAP --with-meta_module
2162         # Check whether --with-meta_module or --without-meta_module was given.
2163 if test "${with_meta_module+set}" = set; then
2164   withval="$with_meta_module"
2165   
2166         ol_arg=invalid
2167         for ol_val in static dynamic ; do
2168                 if test "$withval" = "$ol_val" ; then
2169                         ol_arg="$ol_val"
2170                 fi
2171         done
2172         if test "$ol_arg" = "invalid" ; then
2173                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2174         fi
2175         ol_with_meta_module="$ol_arg"
2176
2177 else
2178         ol_with_meta_module="static"
2179 fi
2180 # end --with-meta_module
2181
2182 # OpenLDAP --enable-monitor
2183         # Check whether --enable-monitor or --disable-monitor was given.
2184 if test "${enable_monitor+set}" = set; then
2185   enableval="$enable_monitor"
2186   
2187         ol_arg=invalid
2188         for ol_val in auto yes no ; do
2189                 if test "$enableval" = "$ol_val" ; then
2190                         ol_arg="$ol_val"
2191                 fi
2192         done
2193         if test "$ol_arg" = "invalid" ; then
2194                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2195         fi
2196         ol_enable_monitor="$ol_arg"
2197
2198 else
2199         ol_enable_monitor="yes"
2200 fi
2201 # end --enable-monitor
2202 # OpenLDAP --with-monitor_module
2203         # Check whether --with-monitor_module or --without-monitor_module was given.
2204 if test "${with_monitor_module+set}" = set; then
2205   withval="$with_monitor_module"
2206   
2207         ol_arg=invalid
2208         for ol_val in static dynamic ; do
2209                 if test "$withval" = "$ol_val" ; then
2210                         ol_arg="$ol_val"
2211                 fi
2212         done
2213         if test "$ol_arg" = "invalid" ; then
2214                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2215         fi
2216         ol_with_monitor_module="$ol_arg"
2217
2218 else
2219         ol_with_monitor_module="static"
2220 fi
2221 # end --with-monitor_module
2222
2223 # OpenLDAP --enable-null
2224         # Check whether --enable-null or --disable-null was given.
2225 if test "${enable_null+set}" = set; then
2226   enableval="$enable_null"
2227   
2228         ol_arg=invalid
2229         for ol_val in auto yes no ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2236         fi
2237         ol_enable_null="$ol_arg"
2238
2239 else
2240         ol_enable_null="no"
2241 fi
2242 # end --enable-null
2243 # OpenLDAP --with-null_module
2244         # Check whether --with-null_module or --without-null_module was given.
2245 if test "${with_null_module+set}" = set; then
2246   withval="$with_null_module"
2247   
2248         ol_arg=invalid
2249         for ol_val in static dynamic ; do
2250                 if test "$withval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2256         fi
2257         ol_with_null_module="$ol_arg"
2258
2259 else
2260         ol_with_null_module="static"
2261 fi
2262 # end --with-null_module
2263
2264 # OpenLDAP --enable-passwd
2265         # Check whether --enable-passwd or --disable-passwd was given.
2266 if test "${enable_passwd+set}" = set; then
2267   enableval="$enable_passwd"
2268   
2269         ol_arg=invalid
2270         for ol_val in auto yes no ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2277         fi
2278         ol_enable_passwd="$ol_arg"
2279
2280 else
2281         ol_enable_passwd="no"
2282 fi
2283 # end --enable-passwd
2284 # OpenLDAP --with-passwd_module
2285         # Check whether --with-passwd_module or --without-passwd_module was given.
2286 if test "${with_passwd_module+set}" = set; then
2287   withval="$with_passwd_module"
2288   
2289         ol_arg=invalid
2290         for ol_val in static dynamic ; do
2291                 if test "$withval" = "$ol_val" ; then
2292                         ol_arg="$ol_val"
2293                 fi
2294         done
2295         if test "$ol_arg" = "invalid" ; then
2296                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2297         fi
2298         ol_with_passwd_module="$ol_arg"
2299
2300 else
2301         ol_with_passwd_module="static"
2302 fi
2303 # end --with-passwd_module
2304
2305 # OpenLDAP --enable-perl
2306         # Check whether --enable-perl or --disable-perl was given.
2307 if test "${enable_perl+set}" = set; then
2308   enableval="$enable_perl"
2309   
2310         ol_arg=invalid
2311         for ol_val in auto yes no ; do
2312                 if test "$enableval" = "$ol_val" ; then
2313                         ol_arg="$ol_val"
2314                 fi
2315         done
2316         if test "$ol_arg" = "invalid" ; then
2317                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2318         fi
2319         ol_enable_perl="$ol_arg"
2320
2321 else
2322         ol_enable_perl="no"
2323 fi
2324 # end --enable-perl
2325 # OpenLDAP --with-perl_module
2326         # Check whether --with-perl_module or --without-perl_module was given.
2327 if test "${with_perl_module+set}" = set; then
2328   withval="$with_perl_module"
2329   
2330         ol_arg=invalid
2331         for ol_val in static dynamic ; do
2332                 if test "$withval" = "$ol_val" ; then
2333                         ol_arg="$ol_val"
2334                 fi
2335         done
2336         if test "$ol_arg" = "invalid" ; then
2337                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2338         fi
2339         ol_with_perl_module="$ol_arg"
2340
2341 else
2342         ol_with_perl_module="static"
2343 fi
2344 # end --with-perl_module
2345
2346 # OpenLDAP --enable-relay
2347         # Check whether --enable-relay or --disable-relay was given.
2348 if test "${enable_relay+set}" = set; then
2349   enableval="$enable_relay"
2350   
2351         ol_arg=invalid
2352         for ol_val in auto yes no ; do
2353                 if test "$enableval" = "$ol_val" ; then
2354                         ol_arg="$ol_val"
2355                 fi
2356         done
2357         if test "$ol_arg" = "invalid" ; then
2358                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2359         fi
2360         ol_enable_relay="$ol_arg"
2361
2362 else
2363         ol_enable_relay="yes"
2364 fi
2365 # end --enable-relay
2366 # OpenLDAP --with-relay_module
2367         # Check whether --with-relay_module or --without-relay_module was given.
2368 if test "${with_relay_module+set}" = set; then
2369   withval="$with_relay_module"
2370   
2371         ol_arg=invalid
2372         for ol_val in static dynamic ; do
2373                 if test "$withval" = "$ol_val" ; then
2374                         ol_arg="$ol_val"
2375                 fi
2376         done
2377         if test "$ol_arg" = "invalid" ; then
2378                 { echo "configure: error: bad value $withval for --with-relay_module" 1>&2; exit 1; }
2379         fi
2380         ol_with_relay_module="$ol_arg"
2381
2382 else
2383         ol_with_relay_module="static"
2384 fi
2385 # end --with-relay_module
2386
2387 # OpenLDAP --enable-shell
2388         # Check whether --enable-shell or --disable-shell was given.
2389 if test "${enable_shell+set}" = set; then
2390   enableval="$enable_shell"
2391   
2392         ol_arg=invalid
2393         for ol_val in auto yes no ; do
2394                 if test "$enableval" = "$ol_val" ; then
2395                         ol_arg="$ol_val"
2396                 fi
2397         done
2398         if test "$ol_arg" = "invalid" ; then
2399                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2400         fi
2401         ol_enable_shell="$ol_arg"
2402
2403 else
2404         ol_enable_shell="no"
2405 fi
2406 # end --enable-shell
2407 # OpenLDAP --with-shell_module
2408         # Check whether --with-shell_module or --without-shell_module was given.
2409 if test "${with_shell_module+set}" = set; then
2410   withval="$with_shell_module"
2411   
2412         ol_arg=invalid
2413         for ol_val in static dynamic ; do
2414                 if test "$withval" = "$ol_val" ; then
2415                         ol_arg="$ol_val"
2416                 fi
2417         done
2418         if test "$ol_arg" = "invalid" ; then
2419                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2420         fi
2421         ol_with_shell_module="$ol_arg"
2422
2423 else
2424         ol_with_shell_module="static"
2425 fi
2426 # end --with-shell_module
2427
2428 # OpenLDAP --enable-sql
2429         # Check whether --enable-sql or --disable-sql was given.
2430 if test "${enable_sql+set}" = set; then
2431   enableval="$enable_sql"
2432   
2433         ol_arg=invalid
2434         for ol_val in auto yes no ; do
2435                 if test "$enableval" = "$ol_val" ; then
2436                         ol_arg="$ol_val"
2437                 fi
2438         done
2439         if test "$ol_arg" = "invalid" ; then
2440                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2441         fi
2442         ol_enable_sql="$ol_arg"
2443
2444 else
2445         ol_enable_sql="no"
2446 fi
2447 # end --enable-sql
2448 # OpenLDAP --with-sql_module
2449         # Check whether --with-sql_module or --without-sql_module was given.
2450 if test "${with_sql_module+set}" = set; then
2451   withval="$with_sql_module"
2452   
2453         ol_arg=invalid
2454         for ol_val in static dynamic ; do
2455                 if test "$withval" = "$ol_val" ; then
2456                         ol_arg="$ol_val"
2457                 fi
2458         done
2459         if test "$ol_arg" = "invalid" ; then
2460                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2461         fi
2462         ol_with_sql_module="$ol_arg"
2463
2464 else
2465         ol_with_sql_module="static"
2466 fi
2467 # end --with-sql_module
2468
2469
2470 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2471 if test "${with_xxslapoverlays+set}" = set; then
2472   withval="$with_xxslapoverlays"
2473   :
2474 fi
2475
2476 # OpenLDAP --enable-chain
2477         # Check whether --enable-chain or --disable-chain was given.
2478 if test "${enable_chain+set}" = set; then
2479   enableval="$enable_chain"
2480   
2481         ol_arg=invalid
2482         for ol_val in no yes mod ; do
2483                 if test "$enableval" = "$ol_val" ; then
2484                         ol_arg="$ol_val"
2485                 fi
2486         done
2487         if test "$ol_arg" = "invalid" ; then
2488                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2489         fi
2490         ol_enable_chain="$ol_arg"
2491
2492 else
2493         ol_enable_chain="no"
2494 fi
2495 # end --enable-chain
2496
2497 # OpenLDAP --enable-denyop
2498         # Check whether --enable-denyop or --disable-denyop was given.
2499 if test "${enable_denyop+set}" = set; then
2500   enableval="$enable_denyop"
2501   
2502         ol_arg=invalid
2503         for ol_val in no yes mod ; do
2504                 if test "$enableval" = "$ol_val" ; then
2505                         ol_arg="$ol_val"
2506                 fi
2507         done
2508         if test "$ol_arg" = "invalid" ; then
2509                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2510         fi
2511         ol_enable_denyop="$ol_arg"
2512
2513 else
2514         ol_enable_denyop="no"
2515 fi
2516 # end --enable-denyop
2517
2518 # OpenLDAP --enable-dyngroup
2519         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2520 if test "${enable_dyngroup+set}" = set; then
2521   enableval="$enable_dyngroup"
2522   
2523         ol_arg=invalid
2524         for ol_val in no yes mod ; do
2525                 if test "$enableval" = "$ol_val" ; then
2526                         ol_arg="$ol_val"
2527                 fi
2528         done
2529         if test "$ol_arg" = "invalid" ; then
2530                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2531         fi
2532         ol_enable_dyngroup="$ol_arg"
2533
2534 else
2535         ol_enable_dyngroup="no"
2536 fi
2537 # end --enable-dyngroup
2538
2539 # OpenLDAP --enable-ppolicy
2540         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2541 if test "${enable_ppolicy+set}" = set; then
2542   enableval="$enable_ppolicy"
2543   
2544         ol_arg=invalid
2545         for ol_val in no yes mod ; do
2546                 if test "$enableval" = "$ol_val" ; then
2547                         ol_arg="$ol_val"
2548                 fi
2549         done
2550         if test "$ol_arg" = "invalid" ; then
2551                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2552         fi
2553         ol_enable_ppolicy="$ol_arg"
2554
2555 else
2556         ol_enable_ppolicy="no"
2557 fi
2558 # end --enable-ppolicy
2559
2560 # OpenLDAP --enable-proxycache
2561         # Check whether --enable-proxycache or --disable-proxycache was given.
2562 if test "${enable_proxycache+set}" = set; then
2563   enableval="$enable_proxycache"
2564   
2565         ol_arg=invalid
2566         for ol_val in no yes mod ; do
2567                 if test "$enableval" = "$ol_val" ; then
2568                         ol_arg="$ol_val"
2569                 fi
2570         done
2571         if test "$ol_arg" = "invalid" ; then
2572                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2573         fi
2574         ol_enable_proxycache="$ol_arg"
2575
2576 else
2577         ol_enable_proxycache="no"
2578 fi
2579 # end --enable-proxycache
2580
2581 # OpenLDAP --enable-rwm
2582         # Check whether --enable-rwm or --disable-rwm was given.
2583 if test "${enable_rwm+set}" = set; then
2584   enableval="$enable_rwm"
2585   
2586         ol_arg=invalid
2587         for ol_val in no yes mod ; do
2588                 if test "$enableval" = "$ol_val" ; then
2589                         ol_arg="$ol_val"
2590                 fi
2591         done
2592         if test "$ol_arg" = "invalid" ; then
2593                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2594         fi
2595         ol_enable_rwm="$ol_arg"
2596
2597 else
2598         ol_enable_rwm="no"
2599 fi
2600 # end --enable-rwm
2601
2602
2603 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2604 if test "${with_xxslurpdoptions+set}" = set; then
2605   withval="$with_xxslurpdoptions"
2606   :
2607 fi
2608
2609 # OpenLDAP --enable-slurpd
2610         # Check whether --enable-slurpd or --disable-slurpd was given.
2611 if test "${enable_slurpd+set}" = set; then
2612   enableval="$enable_slurpd"
2613   
2614         ol_arg=invalid
2615         for ol_val in auto yes no ; do
2616                 if test "$enableval" = "$ol_val" ; then
2617                         ol_arg="$ol_val"
2618                 fi
2619         done
2620         if test "$ol_arg" = "invalid" ; then
2621                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2622         fi
2623         ol_enable_slurpd="$ol_arg"
2624
2625 else
2626         ol_enable_slurpd="auto"
2627 fi
2628 # end --enable-slurpd
2629
2630 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2631 if test "${with_xxliboptions+set}" = set; then
2632   withval="$with_xxliboptions"
2633   :
2634 fi
2635
2636 # Check whether --enable-static or --disable-static was given.
2637 if test "${enable_static+set}" = set; then
2638   enableval="$enable_static"
2639   p=${PACKAGE-default}
2640 case $enableval in
2641 yes) enable_static=yes ;;
2642 no) enable_static=no ;;
2643 *)
2644   enable_static=no
2645   # Look at the argument we got.  We use all the common list separators.
2646   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2647   for pkg in $enableval; do
2648     if test "X$pkg" = "X$p"; then
2649       enable_static=yes
2650     fi
2651   done
2652   IFS="$ac_save_ifs"
2653   ;;
2654 esac
2655 else
2656   enable_static=yes
2657 fi
2658
2659 # Check whether --enable-shared or --disable-shared was given.
2660 if test "${enable_shared+set}" = set; then
2661   enableval="$enable_shared"
2662   p=${PACKAGE-default}
2663 case $enableval in
2664 yes) enable_shared=yes ;;
2665 no) enable_shared=no ;;
2666 *)
2667   enable_shared=no
2668   # Look at the argument we got.  We use all the common list separators.
2669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2670   for pkg in $enableval; do
2671     if test "X$pkg" = "X$p"; then
2672       enable_shared=yes
2673     fi
2674   done
2675   IFS="$ac_save_ifs"
2676   ;;
2677 esac
2678 else
2679   enable_shared=yes
2680 fi
2681
2682
2683
2684 # validate options
2685 if test $ol_enable_slapd = no ; then
2686                 if test $ol_enable_slapi = yes ; then
2687                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2688         fi
2689         if test $ol_enable_bdb = yes ; then
2690                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2691         fi
2692         if test $ol_enable_dnssrv = yes ; then
2693                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2694         fi
2695         if test $ol_enable_hdb = yes ; then
2696                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2697         fi
2698         if test $ol_enable_ldap = yes ; then
2699                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2700         fi
2701         if test $ol_enable_ldbm = yes ; then
2702                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2703         fi
2704         if test $ol_enable_meta = yes ; then
2705                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2706         fi
2707         if test $ol_enable_monitor = yes ; then
2708                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2709         fi
2710         if test $ol_enable_null = yes ; then
2711                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2712         fi
2713         if test $ol_enable_passwd = yes ; then
2714                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2715         fi
2716         if test $ol_enable_perl = yes ; then
2717                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2718         fi
2719         if test $ol_enable_relay = yes ; then
2720                 echo "configure: warning: slapd disabled, ignoring --enable-relay argument" 1>&2
2721         fi
2722         if test $ol_enable_shell = yes ; then
2723                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2724         fi
2725         if test $ol_enable_sql = yes ; then
2726                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2727         fi
2728         if test $ol_enable_modules = yes ; then
2729                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2730         fi
2731         if test $ol_enable_multimaster = yes ; then
2732                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2733         fi
2734         if test $ol_enable_wrappers = yes ; then
2735                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2736         fi
2737         if test $ol_enable_rlookups = yes ; then
2738                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2739         fi
2740         if test $ol_enable_aci = yes ; then
2741                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2742         fi
2743         if test $ol_with_ldbm_api != auto ; then
2744                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2745         fi
2746         if test $ol_with_ldbm_type != auto ; then
2747                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2748         fi
2749         if test $ol_with_bdb_module != static ; then
2750                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2751         fi
2752         if test $ol_with_dnssrv_module != static ; then
2753                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2754         fi
2755         if test $ol_with_hdb_module != static ; then
2756                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2757         fi
2758         if test $ol_with_ldap_module != static ; then
2759                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2760         fi
2761         if test $ol_with_ldbm_module != static ; then
2762                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2763         fi
2764         if test $ol_with_meta_module != static ; then
2765                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2766         fi
2767         if test $ol_with_monitor_module != static ; then
2768                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2769         fi
2770         if test $ol_with_null_module != static ; then
2771                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2772         fi
2773         if test $ol_with_passwd_module != static ; then
2774                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2775         fi
2776         if test $ol_with_perl_module != static ; then
2777                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2778         fi
2779         if test $ol_with_relay_module != static ; then
2780                 echo "configure: warning: slapd disabled, ignoring --with-relay-module argument" 1>&2
2781         fi
2782         if test $ol_with_shell_module != static ; then
2783                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2784         fi
2785         if test $ol_with_sql_module != static ; then
2786                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2787         fi
2788         if test $ol_enable_slurpd = yes ; then
2789                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2790         fi
2791         if test $ol_enable_rewrite = yes ; then
2792                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2793         fi
2794                 if test $ol_with_chain != no ; then
2795                 echo "configure: warning: slapd disabled, ignoring --with-chain argument" 1>&2
2796         fi
2797         if test $ol_with_denyop != no ; then
2798                 echo "configure: warning: slapd disabled, ignoring --with-denyop argument" 1>&2
2799         fi
2800         if test $ol_with_dyngroup != no ; then
2801                 echo "configure: warning: slapd disabled, ignoring --with-dyngroup argument" 1>&2
2802         fi
2803         if test $ol_with_ppolicy != no ; then
2804                 echo "configure: warning: slapd disabled, ignoring --with-ppolicy argument" 1>&2
2805         fi
2806         if test $ol_with_proxycache != no ; then
2807                 echo "configure: warning: slapd disabled, ignoring --with-proxycache argument" 1>&2
2808         fi
2809         if test $ol_with_rwm != no ; then
2810                 echo "configure: warning: slapd disabled, ignoring --with-rwm argument" 1>&2
2811         fi
2812
2813         # force settings to no
2814         ol_enable_slapi=no
2815         ol_enable_bdb=no
2816         ol_enable_dnssrv=no
2817         ol_enable_hdb=no
2818         ol_enable_ldap=no
2819         ol_enable_ldbm=no
2820         ol_enable_meta=no
2821         ol_enable_monitor=no
2822         ol_enable_null=no
2823         ol_enable_passwd=no
2824         ol_enable_perl=no
2825         ol_enable_relay=no
2826         ol_enable_shell=no
2827         ol_enable_sql=no
2828
2829         ol_enable_modules=no
2830         ol_enable_multimaster=no
2831         ol_enable_rlookups=no
2832         ol_enable_aci=no
2833         ol_enable_wrappers=no
2834
2835         ol_with_ldbm_api=no
2836         ol_with_ldbm_type=no
2837
2838         ol_with_bdb_module=static
2839         ol_with_dnssrv_module=static
2840         ol_with_hdb_module=static
2841         ol_with_ldap_module=static
2842         ol_with_ldbm_module=static
2843         ol_with_meta_module=static
2844         ol_with_monitor_module=static
2845         ol_with_null_module=static
2846         ol_with_passwd_module=static
2847         ol_with_perl_module=static
2848         ol_with_relay_module=static
2849         ol_with_shell_module=static
2850         ol_with_sql_module=static
2851
2852         ol_enable_slurpd=no
2853
2854         ol_enable_rewrite=no
2855
2856         ol_enable_chain=no
2857         ol_enable_denyop=no
2858         ol_enable_dyngroup=no
2859         ol_enable_ppolicy=no
2860         ol_enable_proxycache=no
2861         ol_enable_rwm=no
2862
2863 elif test $ol_enable_ldbm = no ; then
2864         
2865         if test $ol_with_ldbm_api != auto ; then
2866                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2867         fi
2868
2869         if test $ol_with_ldbm_type != auto ; then
2870                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2871         fi
2872
2873         if test $ol_with_ldbm_module != static ; then
2874                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2875         fi
2876
2877         if test $ol_enable_modules != yes -a \
2878                 $ol_enable_bdb = no -a \
2879                 $ol_enable_dnssrv = no -a \
2880                 $ol_enable_hdb = no -a \
2881                 $ol_enable_ldap = no -a \
2882                 $ol_enable_meta = no -a \
2883                 $ol_enable_monitor = no -a \
2884                 $ol_enable_null = no -a \
2885                 $ol_enable_passwd = no -a \
2886                 $ol_enable_perl = no -a \
2887                 $ol_enable_relay = no -a \
2888                 $ol_enable_shell = no -a \
2889                 $ol_enable_sql = no ; then
2890
2891                 if test $ol_enable_slapd = yes ; then
2892                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2893                 else
2894                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2895                         ol_enable_slapd=no
2896                 fi
2897         fi
2898
2899         ol_with_ldbm_api=no
2900         ol_with_ldbm_type=no
2901         ol_with_ldbm_module=static
2902
2903         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2904                 ol_with_ldbm_api=berkeley
2905         fi
2906
2907 else
2908                 if test $ol_with_ldbm_api = gdbm -a \
2909                 $ol_with_ldbm_type = btree ; then
2910                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2911         fi
2912         if test $ol_with_ldbm_api = mdbm -a \
2913                 $ol_with_ldbm_type = btree ; then
2914                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2915         fi
2916         if test $ol_with_ldbm_api = ndbm -a \
2917                 $ol_with_ldbm_type = btree ; then
2918                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2919         fi
2920
2921         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2922                 if test $ol_with_ldbm_api = auto ; then
2923                         ol_with_ldbm_api=berkeley
2924                 elif test $ol_with_ldbm_api != berkeley ; then
2925                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2926                 fi
2927
2928         elif test $ol_enable_bdb = auto ; then
2929                 if test $ol_with_ldbm_api != berkeley \
2930                         -o $ol_with_ldbm_api != auto ; then
2931                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2932                         ol_enable_bdb=no
2933                 fi
2934         fi
2935 fi
2936
2937 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2938         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2939 fi
2940
2941 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2942         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2943 fi
2944
2945 if test $ol_enable_slurpd = yes ; then
2946                 if test $ol_with_threads = no ; then
2947                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2948         fi
2949 fi
2950
2951 if test $ol_enable_lmpasswd = yes ; then
2952         if test $ol_with_tls = no ; then
2953                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2954         fi
2955 fi
2956
2957 if test $ol_enable_kbind = yes ; then
2958         if test $ol_with_kerberos = no ; then
2959                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2960         elif test $ol_with_kerberos = auto ; then
2961                 ol_with_kerberos=yes
2962         fi
2963
2964 elif test $ol_enable_kbind = no ; then
2965         if test $ol_with_kerberos = auto ; then
2966                 ol_with_kerberos=no
2967         elif test $ol_with_kerberos != no ; then
2968                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2969                 ol_with_kerberos=no
2970         fi
2971 fi
2972
2973 if test $ol_enable_spasswd = yes ; then
2974         if test $ol_with_cyrus_sasl = no ; then
2975                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2976         fi
2977         ol_with_cyrus_sasl=yes
2978 fi
2979
2980 echo "$ac_t""done" 1>&6
2981
2982 LDAP_LIBS=
2983 LDBM_LIBS=
2984 LTHREAD_LIBS=
2985 LUTIL_LIBS=
2986
2987 SLAPD_LIBS=
2988 SLURPD_LIBS=
2989
2990 BUILD_SLAPD=no
2991 BUILD_SLURPD=no
2992
2993 BUILD_THREAD=no
2994
2995 BUILD_SLAPI=no
2996 SLAPD_SLAPI_DEPEND=
2997
2998 BUILD_BDB=no
2999 BUILD_DNSSRV=no
3000 BUILD_HDB=no
3001 BUILD_LDAP=no
3002 BUILD_LDBM=no
3003 BUILD_META=no
3004 BUILD_MONITOR=no
3005 BUILD_NULL=no
3006 BUILD_PASSWD=no
3007 BUILD_PERL=no
3008 BUILD_RELAY=no
3009 BUILD_SHELL=no
3010 BUILD_SQL=no
3011
3012 BUILD_BDB_DYNAMIC=static
3013 BUILD_DNSSRV_DYNAMIC=static
3014 BUILD_HDB_DYNAMIC=static
3015 BUILD_LDAP_DYNAMIC=static
3016 BUILD_LDBM_DYNAMIC=static
3017 BUILD_META_DYNAMIC=static
3018 BUILD_MONITOR_DYNAMIC=static
3019 BUILD_NULL_DYNAMIC=static
3020 BUILD_PASSWD_DYNAMIC=static
3021 BUILD_PERL_DYNAMIC=static
3022 BUILD_RELAY_DYNAMIC=static
3023 BUILD_SHELL_DYNAMIC=static
3024 BUILD_SQL_DYNAMIC=static
3025
3026 BUILD_CHAIN=no
3027 BUILD_DENYOP=no
3028 BUILD_DYNGROUP=no
3029 BUILD_PPOLICY=no
3030 BUILD_PROXYCACHE=no
3031 BUILD_RWM=no
3032
3033 SLAPD_DYNAMIC_OVERLAYS=
3034
3035 SLAPD_MODULES_LDFLAGS=
3036 SLAPD_MODULES_CPPFLAGS=
3037
3038 SLAPD_STATIC_BACKENDS=
3039 SLAPD_DYNAMIC_BACKENDS=
3040
3041 SLAPD_PERL_LDFLAGS=
3042 MOD_PERL_LDFLAGS=
3043 PERL_CPPFLAGS=
3044
3045 SLAPD_SQL_LDFLAGS=
3046 SLAPD_SQL_LIBS=
3047 SLAPD_SQL_INCLUDES=
3048
3049 KRB4_LIBS=
3050 KRB5_LIBS=
3051 SASL_LIBS=
3052 TLS_LIBS=
3053 MODULES_LIBS=
3054 SLAPI_LIBS=
3055 LIBSLAPI=
3056 LIBSLAPITOOLS=
3057 AUTH_LIBS=
3058
3059 SLAPD_SLP_LIBS=
3060
3061
3062 # Find a good install program.  We prefer a C program (faster),
3063 # so one script is as good as another.  But avoid the broken or
3064 # incompatible versions:
3065 # SysV /etc/install, /usr/sbin/install
3066 # SunOS /usr/etc/install
3067 # IRIX /sbin/install
3068 # AIX /bin/install
3069 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3070 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3071 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3072 # ./install, which can be erroneously created by make from ./install.sh.
3073 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3074 echo "configure:3075: checking for a BSD compatible install" >&5
3075 if test -z "$INSTALL"; then
3076 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
3077   echo $ac_n "(cached) $ac_c" 1>&6
3078 else
3079     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3080   for ac_dir in $PATH; do
3081     # Account for people who put trailing slashes in PATH elements.
3082     case "$ac_dir/" in
3083     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3084     *)
3085       # OSF1 and SCO ODT 3.0 have their own names for install.
3086       # Don't use installbsd from OSF since it installs stuff as root
3087       # by default.
3088       for ac_prog in ginstall scoinst install; do
3089         if test -f $ac_dir/$ac_prog; then
3090           if test $ac_prog = install &&
3091             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3092             # AIX install.  It has an incompatible calling convention.
3093             :
3094           elif test $ac_prog = install &&
3095             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3096             # program-specific install script used by HP pwplus--don't use.
3097             :
3098           else
3099             ac_cv_path_install="$ac_dir/$ac_prog -c"
3100             break 2
3101           fi
3102         fi
3103       done
3104       ;;
3105     esac
3106   done
3107   IFS="$ac_save_IFS"
3108
3109 fi
3110   if test "${ac_cv_path_install+set}" = set; then
3111     INSTALL="$ac_cv_path_install"
3112   else
3113     # As a last resort, use the slow shell script.  We don't cache a
3114     # path for INSTALL within a source directory, because that will
3115     # break other packages using the cache if that directory is
3116     # removed, or if the path is relative.
3117     INSTALL="$ac_install_sh"
3118   fi
3119 fi
3120 echo "$ac_t""$INSTALL" 1>&6
3121
3122 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3123 # It thinks the first close brace ends the variable substitution.
3124 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3125
3126 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3127
3128 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3129
3130
3131 cat >> confdefs.h <<\EOF
3132 #define HAVE_MKVERSION 1
3133 EOF
3134
3135
3136
3137
3138 ol_aix_threads=no
3139 case "$target" in
3140 *-*-aix*)       if test -z "$CC" ; then
3141                 case "$ol_with_threads" in
3142                 auto | yes |  posix) ol_aix_threads=yes ;;
3143                 esac
3144         fi
3145 ;;
3146 esac
3147
3148 if test $ol_aix_threads = yes ; then
3149         if test -z "${CC}" ; then
3150                 for ac_prog in cc_r xlc_r cc
3151 do
3152 # Extract the first word of "$ac_prog", so it can be a program name with args.
3153 set dummy $ac_prog; ac_word=$2
3154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3155 echo "configure:3156: checking for $ac_word" >&5
3156 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3157   echo $ac_n "(cached) $ac_c" 1>&6
3158 else
3159   if test -n "$CC"; then
3160   ac_cv_prog_CC="$CC" # Let the user override the test.
3161 else
3162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3163   ac_dummy="$PATH"
3164   for ac_dir in $ac_dummy; do
3165     test -z "$ac_dir" && ac_dir=.
3166     if test -f $ac_dir/$ac_word; then
3167       ac_cv_prog_CC="$ac_prog"
3168       break
3169     fi
3170   done
3171   IFS="$ac_save_ifs"
3172 fi
3173 fi
3174 CC="$ac_cv_prog_CC"
3175 if test -n "$CC"; then
3176   echo "$ac_t""$CC" 1>&6
3177 else
3178   echo "$ac_t""no" 1>&6
3179 fi
3180
3181 test -n "$CC" && break
3182 done
3183
3184
3185                 if test "$CC" = cc ; then
3186                                                 if test $ol_with_threads != auto ; then
3187                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3188                         else
3189                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3190                         fi
3191                         ol_with_threads=no
3192                 fi
3193         fi
3194
3195         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3196                 ol_with_threads=posix
3197                 ol_cv_pthread_create=yes
3198         fi
3199 fi
3200
3201 if test -z "${CC}"; then
3202         for ac_prog in cc gcc
3203 do
3204 # Extract the first word of "$ac_prog", so it can be a program name with args.
3205 set dummy $ac_prog; ac_word=$2
3206 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3207 echo "configure:3208: checking for $ac_word" >&5
3208 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   if test -n "$CC"; then
3212   ac_cv_prog_CC="$CC" # Let the user override the test.
3213 else
3214   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3215   ac_dummy="$PATH"
3216   for ac_dir in $ac_dummy; do
3217     test -z "$ac_dir" && ac_dir=.
3218     if test -f $ac_dir/$ac_word; then
3219       ac_cv_prog_CC="$ac_prog"
3220       break
3221     fi
3222   done
3223   IFS="$ac_save_ifs"
3224 fi
3225 fi
3226 CC="$ac_cv_prog_CC"
3227 if test -n "$CC"; then
3228   echo "$ac_t""$CC" 1>&6
3229 else
3230   echo "$ac_t""no" 1>&6
3231 fi
3232
3233 test -n "$CC" && break
3234 done
3235 test -n "$CC" || CC="missing"
3236
3237
3238         if test "${CC}" = "missing" ; then
3239                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3240         fi
3241 fi
3242
3243 if test -z "${AR}"; then
3244         for ac_prog in ar gar
3245 do
3246 # Extract the first word of "$ac_prog", so it can be a program name with args.
3247 set dummy $ac_prog; ac_word=$2
3248 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3249 echo "configure:3250: checking for $ac_word" >&5
3250 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3251   echo $ac_n "(cached) $ac_c" 1>&6
3252 else
3253   if test -n "$AR"; then
3254   ac_cv_prog_AR="$AR" # Let the user override the test.
3255 else
3256   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3257   ac_dummy="$PATH"
3258   for ac_dir in $ac_dummy; do
3259     test -z "$ac_dir" && ac_dir=.
3260     if test -f $ac_dir/$ac_word; then
3261       ac_cv_prog_AR="$ac_prog"
3262       break
3263     fi
3264   done
3265   IFS="$ac_save_ifs"
3266 fi
3267 fi
3268 AR="$ac_cv_prog_AR"
3269 if test -n "$AR"; then
3270   echo "$ac_t""$AR" 1>&6
3271 else
3272   echo "$ac_t""no" 1>&6
3273 fi
3274
3275 test -n "$AR" && break
3276 done
3277 test -n "$AR" || AR="missing"
3278
3279
3280         if test "${AR}" = "missing" ; then
3281                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3282         fi
3283 fi
3284
3285
3286
3287 # Find the correct PATH separator.  Usually this is `:', but
3288 # DJGPP uses `;' like DOS.
3289 if test "X${PATH_SEPARATOR+set}" != Xset; then
3290   UNAME=${UNAME-`uname 2>/dev/null`}
3291   case X$UNAME in
3292     *-DOS) lt_cv_sys_path_separator=';' ;;
3293     *)     lt_cv_sys_path_separator=':' ;;
3294   esac
3295   PATH_SEPARATOR=$lt_cv_sys_path_separator
3296 fi
3297
3298 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3299 echo "configure:3300: checking for Cygwin environment" >&5
3300 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3301   echo $ac_n "(cached) $ac_c" 1>&6
3302 else
3303   cat > conftest.$ac_ext <<EOF
3304 #line 3305 "configure"
3305 #include "confdefs.h"
3306
3307 int main() {
3308
3309 #ifndef __CYGWIN__
3310 #define __CYGWIN__ __CYGWIN32__
3311 #endif
3312 return __CYGWIN__;
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3316   rm -rf conftest*
3317   ac_cv_cygwin=yes
3318 else
3319   echo "configure: failed program was:" >&5
3320   cat conftest.$ac_ext >&5
3321   rm -rf conftest*
3322   ac_cv_cygwin=no
3323 fi
3324 rm -f conftest*
3325 fi
3326
3327 echo "$ac_t""$ac_cv_cygwin" 1>&6
3328 CYGWIN=
3329 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3330 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3331 echo "configure:3332: checking for mingw32 environment" >&5
3332 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3333   echo $ac_n "(cached) $ac_c" 1>&6
3334 else
3335   cat > conftest.$ac_ext <<EOF
3336 #line 3337 "configure"
3337 #include "confdefs.h"
3338
3339 int main() {
3340 return __MINGW32__;
3341 ; return 0; }
3342 EOF
3343 if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3344   rm -rf conftest*
3345   ac_cv_mingw32=yes
3346 else
3347   echo "configure: failed program was:" >&5
3348   cat conftest.$ac_ext >&5
3349   rm -rf conftest*
3350   ac_cv_mingw32=no
3351 fi
3352 rm -f conftest*
3353 fi
3354
3355 echo "$ac_t""$ac_cv_mingw32" 1>&6
3356 MINGW32=
3357 test "$ac_cv_mingw32" = yes && MINGW32=yes
3358 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3359 echo "configure:3360: checking for EMX OS/2 environment" >&5
3360 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366
3367 int main() {
3368 return __EMX__;
3369 ; return 0; }
3370 EOF
3371 if { (eval echo configure:3372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3372   rm -rf conftest*
3373   ac_cv_emxos2=yes
3374 else
3375   echo "configure: failed program was:" >&5
3376   cat conftest.$ac_ext >&5
3377   rm -rf conftest*
3378   ac_cv_emxos2=no
3379 fi
3380 rm -f conftest*
3381 fi
3382
3383 echo "$ac_t""$ac_cv_emxos2" 1>&6
3384 EMXOS2=
3385 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3386 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3387 echo "configure:3388: checking how to run the C preprocessor" >&5
3388 # On Suns, sometimes $CPP names a directory.
3389 if test -n "$CPP" && test -d "$CPP"; then
3390   CPP=
3391 fi
3392 if test -z "$CPP"; then
3393 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3394   echo $ac_n "(cached) $ac_c" 1>&6
3395 else
3396     # This must be in double quotes, not single quotes, because CPP may get
3397   # substituted into the Makefile and "${CC-cc}" will confuse make.
3398   CPP="${CC-cc} -E"
3399   # On the NeXT, cc -E runs the code through the compiler's parser,
3400   # not just through cpp.
3401   cat > conftest.$ac_ext <<EOF
3402 #line 3403 "configure"
3403 #include "confdefs.h"
3404 #include <assert.h>
3405 Syntax Error
3406 EOF
3407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3408 { (eval echo configure:3409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3410 if test -z "$ac_err"; then
3411   :
3412 else
3413   echo "$ac_err" >&5
3414   echo "configure: failed program was:" >&5
3415   cat conftest.$ac_ext >&5
3416   rm -rf conftest*
3417   CPP="${CC-cc} -E -traditional-cpp"
3418   cat > conftest.$ac_ext <<EOF
3419 #line 3420 "configure"
3420 #include "confdefs.h"
3421 #include <assert.h>
3422 Syntax Error
3423 EOF
3424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3425 { (eval echo configure:3426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3427 if test -z "$ac_err"; then
3428   :
3429 else
3430   echo "$ac_err" >&5
3431   echo "configure: failed program was:" >&5
3432   cat conftest.$ac_ext >&5
3433   rm -rf conftest*
3434   CPP="${CC-cc} -nologo -E"
3435   cat > conftest.$ac_ext <<EOF
3436 #line 3437 "configure"
3437 #include "confdefs.h"
3438 #include <assert.h>
3439 Syntax Error
3440 EOF
3441 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3442 { (eval echo configure:3443: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3443 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3444 if test -z "$ac_err"; then
3445   :
3446 else
3447   echo "$ac_err" >&5
3448   echo "configure: failed program was:" >&5
3449   cat conftest.$ac_ext >&5
3450   rm -rf conftest*
3451   CPP=/lib/cpp
3452 fi
3453 rm -f conftest*
3454 fi
3455 rm -f conftest*
3456 fi
3457 rm -f conftest*
3458   ac_cv_prog_CPP="$CPP"
3459 fi
3460   CPP="$ac_cv_prog_CPP"
3461 else
3462   ac_cv_prog_CPP="$CPP"
3463 fi
3464 echo "$ac_t""$CPP" 1>&6
3465
3466 # Check whether --enable-fast-install or --disable-fast-install was given.
3467 if test "${enable_fast_install+set}" = set; then
3468   enableval="$enable_fast_install"
3469   p=${PACKAGE-default}
3470 case $enableval in
3471 yes) enable_fast_install=yes ;;
3472 no) enable_fast_install=no ;;
3473 *)
3474   enable_fast_install=no
3475   # Look at the argument we got.  We use all the common list separators.
3476   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3477   for pkg in $enableval; do
3478     if test "X$pkg" = "X$p"; then
3479       enable_fast_install=yes
3480     fi
3481   done
3482   IFS="$ac_save_ifs"
3483   ;;
3484 esac
3485 else
3486   enable_fast_install=yes
3487 fi
3488
3489 # Extract the first word of "gcc", so it can be a program name with args.
3490 set dummy gcc; ac_word=$2
3491 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3492 echo "configure:3493: checking for $ac_word" >&5
3493 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3494   echo $ac_n "(cached) $ac_c" 1>&6
3495 else
3496   if test -n "$CC"; then
3497   ac_cv_prog_CC="$CC" # Let the user override the test.
3498 else
3499   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3500   ac_dummy="$PATH"
3501   for ac_dir in $ac_dummy; do
3502     test -z "$ac_dir" && ac_dir=.
3503     if test -f $ac_dir/$ac_word; then
3504       ac_cv_prog_CC="gcc"
3505       break
3506     fi
3507   done
3508   IFS="$ac_save_ifs"
3509 fi
3510 fi
3511 CC="$ac_cv_prog_CC"
3512 if test -n "$CC"; then
3513   echo "$ac_t""$CC" 1>&6
3514 else
3515   echo "$ac_t""no" 1>&6
3516 fi
3517
3518 if test -z "$CC"; then
3519   # Extract the first word of "cc", so it can be a program name with args.
3520 set dummy cc; ac_word=$2
3521 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3522 echo "configure:3523: checking for $ac_word" >&5
3523 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3524   echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526   if test -n "$CC"; then
3527   ac_cv_prog_CC="$CC" # Let the user override the test.
3528 else
3529   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3530   ac_prog_rejected=no
3531   ac_dummy="$PATH"
3532   for ac_dir in $ac_dummy; do
3533     test -z "$ac_dir" && ac_dir=.
3534     if test -f $ac_dir/$ac_word; then
3535       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3536         ac_prog_rejected=yes
3537         continue
3538       fi
3539       ac_cv_prog_CC="cc"
3540       break
3541     fi
3542   done
3543   IFS="$ac_save_ifs"
3544 if test $ac_prog_rejected = yes; then
3545   # We found a bogon in the path, so make sure we never use it.
3546   set dummy $ac_cv_prog_CC
3547   shift
3548   if test $# -gt 0; then
3549     # We chose a different compiler from the bogus one.
3550     # However, it has the same basename, so the bogon will be chosen
3551     # first if we set CC to just the basename; use the full file name.
3552     shift
3553     set dummy "$ac_dir/$ac_word" "$@"
3554     shift
3555     ac_cv_prog_CC="$@"
3556   fi
3557 fi
3558 fi
3559 fi
3560 CC="$ac_cv_prog_CC"
3561 if test -n "$CC"; then
3562   echo "$ac_t""$CC" 1>&6
3563 else
3564   echo "$ac_t""no" 1>&6
3565 fi
3566
3567   if test -z "$CC"; then
3568     case "`uname -s`" in
3569     *win32* | *WIN32* | *CYGWIN*)
3570       # Extract the first word of "cl", so it can be a program name with args.
3571 set dummy cl; ac_word=$2
3572 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3573 echo "configure:3574: checking for $ac_word" >&5
3574 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3575   echo $ac_n "(cached) $ac_c" 1>&6
3576 else
3577   if test -n "$CC"; then
3578   ac_cv_prog_CC="$CC" # Let the user override the test.
3579 else
3580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3581   ac_dummy="$PATH"
3582   for ac_dir in $ac_dummy; do
3583     test -z "$ac_dir" && ac_dir=.
3584     if test -f $ac_dir/$ac_word; then
3585       ac_cv_prog_CC="cl"
3586       break
3587     fi
3588   done
3589   IFS="$ac_save_ifs"
3590 fi
3591 fi
3592 CC="$ac_cv_prog_CC"
3593 if test -n "$CC"; then
3594   echo "$ac_t""$CC" 1>&6
3595 else
3596   echo "$ac_t""no" 1>&6
3597 fi
3598  ;;
3599     esac
3600   fi
3601   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3602 fi
3603
3604 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3605 echo "configure:3606: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3606
3607 ac_ext=c
3608 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3609 ac_cpp='$CPP $CPPFLAGS'
3610 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3611 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3612 cross_compiling=$ac_cv_prog_cc_cross
3613
3614 cat > conftest.$ac_ext << EOF
3615
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618
3619 main(){return(0);}
3620 EOF
3621 if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3622   ac_cv_prog_cc_works=yes
3623   # If we can't run a trivial program, we are probably using a cross compiler.
3624   if (./conftest; exit) 2>/dev/null; then
3625     ac_cv_prog_cc_cross=no
3626   else
3627     ac_cv_prog_cc_cross=yes
3628   fi
3629 else
3630   echo "configure: failed program was:" >&5
3631   cat conftest.$ac_ext >&5
3632   ac_cv_prog_cc_works=no
3633 fi
3634 rm -fr conftest*
3635 ac_ext=c
3636 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3637 ac_cpp='$CPP $CPPFLAGS'
3638 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3639 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3640 cross_compiling=$ac_cv_prog_cc_cross
3641
3642 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3643 if test $ac_cv_prog_cc_works = no; then
3644   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3645 fi
3646 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3647 echo "configure:3648: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3648 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3649 cross_compiling=$ac_cv_prog_cc_cross
3650
3651 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3652 echo "configure:3653: checking whether we are using GNU C" >&5
3653 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3654   echo $ac_n "(cached) $ac_c" 1>&6
3655 else
3656   cat > conftest.c <<EOF
3657 #ifdef __GNUC__
3658   yes;
3659 #endif
3660 EOF
3661 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3662   ac_cv_prog_gcc=yes
3663 else
3664   ac_cv_prog_gcc=no
3665 fi
3666 fi
3667
3668 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3669
3670 if test $ac_cv_prog_gcc = yes; then
3671   GCC=yes
3672 else
3673   GCC=
3674 fi
3675
3676 ac_test_CFLAGS="${CFLAGS+set}"
3677 ac_save_CFLAGS="$CFLAGS"
3678 CFLAGS=
3679 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3680 echo "configure:3681: checking whether ${CC-cc} accepts -g" >&5
3681 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3682   echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684   echo 'void f(){}' > conftest.c
3685 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3686   ac_cv_prog_cc_g=yes
3687 else
3688   ac_cv_prog_cc_g=no
3689 fi
3690 rm -f conftest*
3691
3692 fi
3693
3694 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3695 if test "$ac_test_CFLAGS" = set; then
3696   CFLAGS="$ac_save_CFLAGS"
3697 elif test $ac_cv_prog_cc_g = yes; then
3698   if test "$GCC" = yes; then
3699     CFLAGS="-g -O2"
3700   else
3701     CFLAGS="-g"
3702   fi
3703 else
3704   if test "$GCC" = yes; then
3705     CFLAGS="-O2"
3706   else
3707     CFLAGS=
3708   fi
3709 fi
3710
3711 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3712 if test "${with_gnu_ld+set}" = set; then
3713   withval="$with_gnu_ld"
3714   test "$withval" = no || with_gnu_ld=yes
3715 else
3716   with_gnu_ld=no
3717 fi
3718
3719 ac_prog=ld
3720 if test "$GCC" = yes; then
3721   # Check if gcc -print-prog-name=ld gives a path.
3722   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3723 echo "configure:3724: checking for ld used by GCC" >&5
3724   case $host in
3725   *-*-mingw*)
3726     # gcc leaves a trailing carriage return which upsets mingw
3727     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3728   *)
3729     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3730   esac
3731   case $ac_prog in
3732     # Accept absolute paths.
3733     [\\/]* | [A-Za-z]:[\\/]*)
3734       re_direlt='/[^/][^/]*/\.\./'
3735       # Canonicalize the path of ld
3736       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3737       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3738         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3739       done
3740       test -z "$LD" && LD="$ac_prog"
3741       ;;
3742   "")
3743     # If it fails, then pretend we aren't using GCC.
3744     ac_prog=ld
3745     ;;
3746   *)
3747     # If it is relative, then search for the first ld in PATH.
3748     with_gnu_ld=unknown
3749     ;;
3750   esac
3751 elif test "$with_gnu_ld" = yes; then
3752   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3753 echo "configure:3754: checking for GNU ld" >&5
3754 else
3755   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3756 echo "configure:3757: checking for non-GNU ld" >&5
3757 fi
3758 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   if test -z "$LD"; then
3762   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3763   for ac_dir in $PATH; do
3764     test -z "$ac_dir" && ac_dir=.
3765     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3766       lt_cv_path_LD="$ac_dir/$ac_prog"
3767       # Check to see if the program is GNU ld.  I'd rather use --version,
3768       # but apparently some GNU ld's only accept -v.
3769       # Break only if it was the GNU/non-GNU ld that we prefer.
3770       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3771         test "$with_gnu_ld" != no && break
3772       else
3773         test "$with_gnu_ld" != yes && break
3774       fi
3775     fi
3776   done
3777   IFS="$ac_save_ifs"
3778 else
3779   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3780 fi
3781 fi
3782
3783 LD="$lt_cv_path_LD"
3784 if test -n "$LD"; then
3785   echo "$ac_t""$LD" 1>&6
3786 else
3787   echo "$ac_t""no" 1>&6
3788 fi
3789 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3790 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3791 echo "configure:3792: checking if the linker ($LD) is GNU ld" >&5
3792 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3793   echo $ac_n "(cached) $ac_c" 1>&6
3794 else
3795   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3796 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3797   lt_cv_prog_gnu_ld=yes
3798 else
3799   lt_cv_prog_gnu_ld=no
3800 fi
3801 fi
3802
3803 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3804 with_gnu_ld=$lt_cv_prog_gnu_ld
3805
3806
3807 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3808 echo "configure:3809: checking for $LD option to reload object files" >&5
3809 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3810   echo $ac_n "(cached) $ac_c" 1>&6
3811 else
3812   lt_cv_ld_reload_flag='-r'
3813 fi
3814
3815 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3816 reload_flag=$lt_cv_ld_reload_flag
3817 test -n "$reload_flag" && reload_flag=" $reload_flag"
3818
3819 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3820 echo "configure:3821: checking for BSD-compatible nm" >&5
3821 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3822   echo $ac_n "(cached) $ac_c" 1>&6
3823 else
3824   if test -n "$NM"; then
3825   # Let the user override the test.
3826   lt_cv_path_NM="$NM"
3827 else
3828   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3829   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3830     test -z "$ac_dir" && ac_dir=.
3831     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3832     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3833       # Check to see if the nm accepts a BSD-compat flag.
3834       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3835       #   nm: unknown option "B" ignored
3836       # Tru64's nm complains that /dev/null is an invalid object file
3837       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3838         lt_cv_path_NM="$tmp_nm -B"
3839         break
3840       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3841         lt_cv_path_NM="$tmp_nm -p"
3842         break
3843       else
3844         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3845         continue # so that we can try to find one that supports BSD flags
3846       fi
3847     fi
3848   done
3849   IFS="$ac_save_ifs"
3850   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3851 fi
3852 fi
3853
3854 NM="$lt_cv_path_NM"
3855 echo "$ac_t""$NM" 1>&6
3856
3857 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3858 echo "configure:3859: checking for a sed that does not truncate output" >&5
3859 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3860   echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862   # Loop through the user's path and test for sed and gsed.
3863 # Then use that list of sed's as ones to test for truncation.
3864 as_executable_p="test -f"
3865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3866 for as_dir in $PATH
3867 do
3868   IFS=$as_save_IFS
3869   test -z "$as_dir" && as_dir=.
3870   for ac_prog in sed gsed; do
3871     for ac_exec_ext in '' $ac_executable_extensions; do
3872       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3873         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3874       fi
3875     done
3876   done
3877 done
3878
3879   # Create a temporary directory, and hook for its removal unless debugging.
3880 $debug ||
3881 {
3882   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3883   trap '{ (exit 1); exit 1; }' 1 2 13 15
3884 }
3885
3886 # Create a (secure) tmp directory for tmp files.
3887 : ${TMPDIR=/tmp}
3888 {
3889   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3890   test -n "$tmp" && test -d "$tmp"
3891 }  ||
3892 {
3893   tmp=$TMPDIR/sed$$-$RANDOM
3894   (umask 077 && mkdir $tmp)
3895 } ||
3896 {
3897    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3898    { (exit 1); exit 1; }
3899 }
3900   _max=0
3901   _count=0
3902   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3903   # along with /bin/sed that truncates output.
3904   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3905     test ! -f ${_sed} && break
3906     cat /dev/null > "$tmp/sed.in"
3907     _count=0
3908     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3909     # Check for GNU sed and select it if it is found.
3910     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3911       lt_cv_path_SED=${_sed}
3912       break
3913     fi
3914     while true; do
3915       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3916       mv "$tmp/sed.tmp" "$tmp/sed.in"
3917       cp "$tmp/sed.in" "$tmp/sed.nl"
3918       echo >>"$tmp/sed.nl"
3919       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3920       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3921       # 40000 chars as input seems more than enough
3922       test $_count -gt 10 && break
3923       _count=`expr $_count + 1`
3924       if test $_count -gt $_max; then
3925         _max=$_count
3926         lt_cv_path_SED=$_sed
3927       fi
3928     done
3929   done
3930   rm -rf "$tmp"
3931
3932 fi
3933
3934 if test "X$SED" != "X"; then
3935   lt_cv_path_SED=$SED
3936 else
3937   SED=$lt_cv_path_SED
3938 fi
3939 echo "$ac_t""$SED" 1>&6
3940
3941 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3942 echo "configure:3943: checking whether ln -s works" >&5
3943 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3944   echo $ac_n "(cached) $ac_c" 1>&6
3945 else
3946   rm -f conftestdata
3947 if ln -s X conftestdata 2>/dev/null
3948 then
3949   rm -f conftestdata
3950   ac_cv_prog_LN_S="ln -s"
3951 else
3952   ac_cv_prog_LN_S=ln
3953 fi
3954 fi
3955 LN_S="$ac_cv_prog_LN_S"
3956 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3957   echo "$ac_t""yes" 1>&6
3958 else
3959   echo "$ac_t""no" 1>&6
3960 fi
3961
3962 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3963 echo "configure:3964: checking how to recognise dependent libraries" >&5
3964 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   lt_cv_file_magic_cmd='$MAGIC_CMD'
3968 lt_cv_file_magic_test_file=
3969 lt_cv_deplibs_check_method='unknown'
3970 # Need to set the preceding variable on all platforms that support
3971 # interlibrary dependencies.
3972 # 'none' -- dependencies not supported.
3973 # `unknown' -- same as none, but documents that we really don't know.
3974 # 'pass_all' -- all dependencies passed with no checks.
3975 # 'test_compile' -- check by making test program.
3976 # 'file_magic [[regex]]' -- check by looking for files in library path
3977 # which responds to the $file_magic_cmd with a given egrep regex.
3978 # If you have `file' or equivalent on your system and you're not sure
3979 # whether `pass_all' will *always* work, you probably want this one.
3980
3981 case $host_os in
3982 aix4* | aix5*)
3983   lt_cv_deplibs_check_method=pass_all
3984   ;;
3985
3986 beos*)
3987   lt_cv_deplibs_check_method=pass_all
3988   ;;
3989
3990 bsdi4*)
3991   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3992   lt_cv_file_magic_cmd='/usr/bin/file -L'
3993   lt_cv_file_magic_test_file=/shlib/libc.so
3994   ;;
3995
3996 cygwin* | mingw* | pw32*)
3997   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3998   lt_cv_file_magic_cmd='$OBJDUMP -f'
3999   ;;
4000
4001 darwin* | rhapsody*)
4002   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4003   lt_cv_file_magic_cmd='/usr/bin/file -L'
4004   case "$host_os" in
4005   rhapsody* | darwin1.[012])
4006     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4007     ;;
4008   *) # Darwin 1.3 on
4009     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4010     ;;
4011   esac
4012   ;;
4013
4014 freebsd*)
4015   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4016     case $host_cpu in
4017     i*86 )
4018       # Not sure whether the presence of OpenBSD here was a mistake.
4019       # Let's accept both of them until this is cleared up.
4020       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
4021       lt_cv_file_magic_cmd=/usr/bin/file
4022       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4023       ;;
4024     esac
4025   else
4026     lt_cv_deplibs_check_method=pass_all
4027   fi
4028   ;;
4029
4030 gnu*)
4031   lt_cv_deplibs_check_method=pass_all
4032   ;;
4033
4034 hpux10.20*|hpux11*)
4035   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4036   lt_cv_file_magic_cmd=/usr/bin/file
4037   lt_cv_file_magic_test_file=/usr/lib/libc.sl
4038   ;;
4039
4040 irix5* | irix6* | nonstopux*)
4041   case $host_os in
4042   irix5* | nonstopux*)
4043     # this will be overridden with pass_all, but let us keep it just in case
4044     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4045     ;;
4046   *)
4047     case $LD in
4048     *-32|*"-32 ") libmagic=32-bit;;
4049     *-n32|*"-n32 ") libmagic=N32;;
4050     *-64|*"-64 ") libmagic=64-bit;;
4051     *) libmagic=never-match;;
4052     esac
4053     # this will be overridden with pass_all, but let us keep it just in case
4054     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
4055     ;;
4056   esac
4057   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4058   lt_cv_deplibs_check_method=pass_all
4059   ;;
4060
4061 # This must be Linux ELF.
4062 linux-gnu*)
4063   case $host_cpu in
4064   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4065     lt_cv_deplibs_check_method=pass_all ;;
4066   *)
4067     # glibc up to 2.1.1 does not perform some relocations on ARM
4068     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
4069   esac
4070   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4071   ;;
4072
4073 netbsd*)
4074   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4075     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
4076   else
4077     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
4078   fi
4079   ;;
4080
4081 newos6*)
4082   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4083   lt_cv_file_magic_cmd=/usr/bin/file
4084   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4085   ;;
4086
4087 openbsd*)
4088   lt_cv_file_magic_cmd=/usr/bin/file
4089   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4090   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4091     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4092   else
4093     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4094   fi
4095   ;;
4096
4097 openedition*)
4098   lt_cv_deplibs_check_method=pass_all
4099   ;;
4100
4101 osf3* | osf4* | osf5*)
4102   # this will be overridden with pass_all, but let us keep it just in case
4103   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4104   lt_cv_file_magic_test_file=/shlib/libc.so
4105   lt_cv_deplibs_check_method=pass_all
4106   ;;
4107
4108 sco3.2v5*)
4109   lt_cv_deplibs_check_method=pass_all
4110   ;;
4111
4112 solaris*)
4113   lt_cv_deplibs_check_method=pass_all
4114   lt_cv_file_magic_test_file=/lib/libc.so
4115   ;;
4116
4117 sysv5uw[78]* | sysv4*uw2*)
4118   lt_cv_deplibs_check_method=pass_all
4119   ;;
4120
4121 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4122   case $host_vendor in
4123   motorola)
4124     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]'
4125     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4126     ;;
4127   ncr)
4128     lt_cv_deplibs_check_method=pass_all
4129     ;;
4130   sequent)
4131     lt_cv_file_magic_cmd='/bin/file'
4132     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4133     ;;
4134   sni)
4135     lt_cv_file_magic_cmd='/bin/file'
4136     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4137     lt_cv_file_magic_test_file=/lib/libc.so
4138     ;;
4139   siemens)
4140     lt_cv_deplibs_check_method=pass_all
4141     ;;
4142   esac
4143   ;;
4144 esac
4145
4146 fi
4147
4148 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4149 file_magic_cmd=$lt_cv_file_magic_cmd
4150 deplibs_check_method=$lt_cv_deplibs_check_method
4151
4152 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4153 echo "configure:4154: checking for object suffix" >&5
4154 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4155   echo $ac_n "(cached) $ac_c" 1>&6
4156 else
4157   rm -f conftest*
4158 echo 'int i = 1;' > conftest.$ac_ext
4159 if { (eval echo configure:4160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4160   for ac_file in conftest.*; do
4161     case $ac_file in
4162     *.c) ;;
4163     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4164     esac
4165   done
4166 else
4167   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4168 fi
4169 rm -f conftest*
4170 fi
4171
4172 echo "$ac_t""$ac_cv_objext" 1>&6
4173 OBJEXT=$ac_cv_objext
4174 ac_objext=$ac_cv_objext
4175
4176
4177
4178
4179 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4180 echo "configure:4181: checking for executable suffix" >&5
4181 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4182   echo $ac_n "(cached) $ac_c" 1>&6
4183 else
4184   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4185   ac_cv_exeext=.exe
4186 else
4187   rm -f conftest*
4188   echo 'int main () { return 0; }' > conftest.$ac_ext
4189   ac_cv_exeext=
4190   if { (eval echo configure:4191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4191     for file in conftest.*; do
4192       case $file in
4193       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4194       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4195       esac
4196     done
4197   else
4198     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4199   fi
4200   rm -f conftest*
4201   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4202 fi
4203 fi
4204
4205 EXEEXT=""
4206 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4207 echo "$ac_t""${ac_cv_exeext}" 1>&6
4208 ac_exeext=$EXEEXT
4209
4210 if test $host != $build; then
4211   ac_tool_prefix=${host_alias}-
4212 else
4213   ac_tool_prefix=
4214 fi
4215
4216
4217
4218
4219 # Check for command to grab the raw symbol name followed by C symbol from nm.
4220 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4221 echo "configure:4222: checking command to parse $NM output" >&5
4222 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   
4226 # These are sane defaults that work on at least a few old systems.
4227 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4228
4229 # Character class describing NM global symbol codes.
4230 symcode='[BCDEGRST]'
4231
4232 # Regexp to match symbols that can be accessed directly from C.
4233 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4234
4235 # Transform the above into a raw symbol and a C symbol.
4236 symxfrm='\1 \2\3 \3'
4237
4238 # Transform an extracted symbol line into a proper C declaration
4239 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4240
4241 # Transform an extracted symbol line into symbol name and symbol address
4242 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'"
4243
4244 # Define system-specific variables.
4245 case $host_os in
4246 aix*)
4247   symcode='[BCDT]'
4248   ;;
4249 cygwin* | mingw* | pw32*)
4250   symcode='[ABCDGISTW]'
4251   ;;
4252 hpux*) # Its linker distinguishes data from code symbols
4253   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4254   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'"
4255   ;;
4256 irix* | nonstopux*)
4257   symcode='[BCDEGRST]'
4258   ;;
4259 osf*)
4260   symcode='[BCDEGQRST]'
4261   ;;
4262 solaris* | sysv5*)
4263   symcode='[BDT]'
4264   ;;
4265 sysv4)
4266   symcode='[DFNSTU]'
4267   ;;
4268 esac
4269
4270 # Handle CRLF in mingw tool chain
4271 opt_cr=
4272 case $host_os in
4273 mingw*)
4274   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4275   ;;
4276 esac
4277
4278 # If we're using GNU nm, then use its standard symbol codes.
4279 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4280   symcode='[ABCDGISTW]'
4281 fi
4282
4283 # Try without a prefix undercore, then with it.
4284 for ac_symprfx in "" "_"; do
4285
4286   # Write the raw and C identifiers.
4287 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4288
4289   # Check to see that the pipe works correctly.
4290   pipe_works=no
4291   rm -f conftest*
4292   cat > conftest.$ac_ext <<EOF
4293 #ifdef __cplusplus
4294 extern "C" {
4295 #endif
4296 char nm_test_var;
4297 void nm_test_func(){}
4298 #ifdef __cplusplus
4299 }
4300 #endif
4301 int main(){nm_test_var='a';nm_test_func();return(0);}
4302 EOF
4303
4304   if { (eval echo configure:4305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4305     # Now try to grab the symbols.
4306     nlist=conftest.nm
4307     if { (eval echo configure:4308: \"$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
4308       # Try sorting and uniquifying the output.
4309       if sort "$nlist" | uniq > "$nlist"T; then
4310         mv -f "$nlist"T "$nlist"
4311       else
4312         rm -f "$nlist"T
4313       fi
4314
4315       # Make sure that we snagged all the symbols we need.
4316       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4317         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4318           cat <<EOF > conftest.$ac_ext
4319 #ifdef __cplusplus
4320 extern "C" {
4321 #endif
4322
4323 EOF
4324           # Now generate the symbol file.
4325           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4326
4327           cat <<EOF >> conftest.$ac_ext
4328 #if defined (__STDC__) && __STDC__
4329 # define lt_ptr void *
4330 #else
4331 # define lt_ptr char *
4332 # define const
4333 #endif
4334
4335 /* The mapping between symbol names and symbols. */
4336 const struct {
4337   const char *name;
4338   lt_ptr address;
4339 }
4340 lt_preloaded_symbols[] =
4341 {
4342 EOF
4343           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4344           cat <<\EOF >> conftest.$ac_ext
4345   {0, (lt_ptr) 0}
4346 };
4347
4348 #ifdef __cplusplus
4349 }
4350 #endif
4351 EOF
4352           # Now try linking the two files.
4353           mv conftest.$ac_objext conftstm.$ac_objext
4354           save_LIBS="$LIBS"
4355           save_CFLAGS="$CFLAGS"
4356           LIBS="conftstm.$ac_objext"
4357           CFLAGS="$CFLAGS$no_builtin_flag"
4358           if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4359             pipe_works=yes
4360           fi
4361           LIBS="$save_LIBS"
4362           CFLAGS="$save_CFLAGS"
4363         else
4364           echo "cannot find nm_test_func in $nlist" >&5
4365         fi
4366       else
4367         echo "cannot find nm_test_var in $nlist" >&5
4368       fi
4369     else
4370       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4371     fi
4372   else
4373     echo "$progname: failed program was:" >&5
4374     cat conftest.$ac_ext >&5
4375   fi
4376   rm -f conftest* conftst*
4377
4378   # Do not use the global_symbol_pipe unless it works.
4379   if test "$pipe_works" = yes; then
4380     break
4381   else
4382     lt_cv_sys_global_symbol_pipe=
4383   fi
4384 done
4385
4386 fi
4387
4388 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4389 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4390   global_symbol_to_cdecl=
4391   global_symbol_to_c_name_address=
4392 else
4393   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4394   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4395 fi
4396 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4397 then
4398   echo "$ac_t""failed" 1>&6
4399 else
4400   echo "$ac_t""ok" 1>&6
4401 fi
4402
4403 for ac_hdr in dlfcn.h
4404 do
4405 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4406 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4407 echo "configure:4408: checking for $ac_hdr" >&5
4408 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414 #include <$ac_hdr>
4415 EOF
4416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4417 { (eval echo configure:4418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4419 if test -z "$ac_err"; then
4420   rm -rf conftest*
4421   eval "ac_cv_header_$ac_safe=yes"
4422 else
4423   echo "$ac_err" >&5
4424   echo "configure: failed program was:" >&5
4425   cat conftest.$ac_ext >&5
4426   rm -rf conftest*
4427   eval "ac_cv_header_$ac_safe=no"
4428 fi
4429 rm -f conftest*
4430 fi
4431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4432   echo "$ac_t""yes" 1>&6
4433     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4434   cat >> confdefs.h <<EOF
4435 #define $ac_tr_hdr 1
4436 EOF
4437  
4438 else
4439   echo "$ac_t""no" 1>&6
4440 fi
4441 done
4442
4443
4444
4445
4446
4447
4448 # Only perform the check for file, if the check method requires it
4449 case $deplibs_check_method in
4450 file_magic*)
4451   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4452     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4453 echo "configure:4454: checking for ${ac_tool_prefix}file" >&5
4454 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4455   echo $ac_n "(cached) $ac_c" 1>&6
4456 else
4457   case $MAGIC_CMD in
4458   /*)
4459   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4460   ;;
4461   ?:/*)
4462   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4463   ;;
4464   *)
4465   ac_save_MAGIC_CMD="$MAGIC_CMD"
4466   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4467   ac_dummy="/usr/bin:$PATH"
4468   for ac_dir in $ac_dummy; do
4469     test -z "$ac_dir" && ac_dir=.
4470     if test -f $ac_dir/${ac_tool_prefix}file; then
4471       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4472       if test -n "$file_magic_test_file"; then
4473         case $deplibs_check_method in
4474         "file_magic "*)
4475           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4476           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4477           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4478             egrep "$file_magic_regex" > /dev/null; then
4479             :
4480           else
4481             cat <<EOF 1>&2
4482
4483 *** Warning: the command libtool uses to detect shared libraries,
4484 *** $file_magic_cmd, produces output that libtool cannot recognize.
4485 *** The result is that libtool may fail to recognize shared libraries
4486 *** as such.  This will affect the creation of libtool libraries that
4487 *** depend on shared libraries, but programs linked with such libtool
4488 *** libraries will work regardless of this problem.  Nevertheless, you
4489 *** may want to report the problem to your system manager and/or to
4490 *** bug-libtool@gnu.org
4491
4492 EOF
4493           fi ;;
4494         esac
4495       fi
4496       break
4497     fi
4498   done
4499   IFS="$ac_save_ifs"
4500   MAGIC_CMD="$ac_save_MAGIC_CMD"
4501   ;;
4502 esac
4503 fi
4504
4505 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4506 if test -n "$MAGIC_CMD"; then
4507   echo "$ac_t""$MAGIC_CMD" 1>&6
4508 else
4509   echo "$ac_t""no" 1>&6
4510 fi
4511
4512 if test -z "$lt_cv_path_MAGIC_CMD"; then
4513   if test -n "$ac_tool_prefix"; then
4514     echo $ac_n "checking for file""... $ac_c" 1>&6
4515 echo "configure:4516: checking for file" >&5
4516 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4517   echo $ac_n "(cached) $ac_c" 1>&6
4518 else
4519   case $MAGIC_CMD in
4520   /*)
4521   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4522   ;;
4523   ?:/*)
4524   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4525   ;;
4526   *)
4527   ac_save_MAGIC_CMD="$MAGIC_CMD"
4528   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4529   ac_dummy="/usr/bin:$PATH"
4530   for ac_dir in $ac_dummy; do
4531     test -z "$ac_dir" && ac_dir=.
4532     if test -f $ac_dir/file; then
4533       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4534       if test -n "$file_magic_test_file"; then
4535         case $deplibs_check_method in
4536         "file_magic "*)
4537           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4538           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4539           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4540             egrep "$file_magic_regex" > /dev/null; then
4541             :
4542           else
4543             cat <<EOF 1>&2
4544
4545 *** Warning: the command libtool uses to detect shared libraries,
4546 *** $file_magic_cmd, produces output that libtool cannot recognize.
4547 *** The result is that libtool may fail to recognize shared libraries
4548 *** as such.  This will affect the creation of libtool libraries that
4549 *** depend on shared libraries, but programs linked with such libtool
4550 *** libraries will work regardless of this problem.  Nevertheless, you
4551 *** may want to report the problem to your system manager and/or to
4552 *** bug-libtool@gnu.org
4553
4554 EOF
4555           fi ;;
4556         esac
4557       fi
4558       break
4559     fi
4560   done
4561   IFS="$ac_save_ifs"
4562   MAGIC_CMD="$ac_save_MAGIC_CMD"
4563   ;;
4564 esac
4565 fi
4566
4567 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4568 if test -n "$MAGIC_CMD"; then
4569   echo "$ac_t""$MAGIC_CMD" 1>&6
4570 else
4571   echo "$ac_t""no" 1>&6
4572 fi
4573
4574   else
4575     MAGIC_CMD=:
4576   fi
4577 fi
4578
4579   fi
4580   ;;
4581 esac
4582
4583 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4584 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4585 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4586 echo "configure:4587: checking for $ac_word" >&5
4587 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   if test -n "$RANLIB"; then
4591   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4592 else
4593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4594   ac_dummy="$PATH"
4595   for ac_dir in $ac_dummy; do
4596     test -z "$ac_dir" && ac_dir=.
4597     if test -f $ac_dir/$ac_word; then
4598       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4599       break
4600     fi
4601   done
4602   IFS="$ac_save_ifs"
4603 fi
4604 fi
4605 RANLIB="$ac_cv_prog_RANLIB"
4606 if test -n "$RANLIB"; then
4607   echo "$ac_t""$RANLIB" 1>&6
4608 else
4609   echo "$ac_t""no" 1>&6
4610 fi
4611
4612
4613 if test -z "$ac_cv_prog_RANLIB"; then
4614 if test -n "$ac_tool_prefix"; then
4615   # Extract the first word of "ranlib", so it can be a program name with args.
4616 set dummy ranlib; ac_word=$2
4617 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4618 echo "configure:4619: checking for $ac_word" >&5
4619 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4620   echo $ac_n "(cached) $ac_c" 1>&6
4621 else
4622   if test -n "$RANLIB"; then
4623   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4624 else
4625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4626   ac_dummy="$PATH"
4627   for ac_dir in $ac_dummy; do
4628     test -z "$ac_dir" && ac_dir=.
4629     if test -f $ac_dir/$ac_word; then
4630       ac_cv_prog_RANLIB="ranlib"
4631       break
4632     fi
4633   done
4634   IFS="$ac_save_ifs"
4635   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4636 fi
4637 fi
4638 RANLIB="$ac_cv_prog_RANLIB"
4639 if test -n "$RANLIB"; then
4640   echo "$ac_t""$RANLIB" 1>&6
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644
4645 else
4646   RANLIB=":"
4647 fi
4648 fi
4649
4650 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4651 set dummy ${ac_tool_prefix}strip; ac_word=$2
4652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4653 echo "configure:4654: checking for $ac_word" >&5
4654 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4655   echo $ac_n "(cached) $ac_c" 1>&6
4656 else
4657   if test -n "$STRIP"; then
4658   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4659 else
4660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4661   ac_dummy="$PATH"
4662   for ac_dir in $ac_dummy; do
4663     test -z "$ac_dir" && ac_dir=.
4664     if test -f $ac_dir/$ac_word; then
4665       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4666       break
4667     fi
4668   done
4669   IFS="$ac_save_ifs"
4670 fi
4671 fi
4672 STRIP="$ac_cv_prog_STRIP"
4673 if test -n "$STRIP"; then
4674   echo "$ac_t""$STRIP" 1>&6
4675 else
4676   echo "$ac_t""no" 1>&6
4677 fi
4678
4679
4680 if test -z "$ac_cv_prog_STRIP"; then
4681 if test -n "$ac_tool_prefix"; then
4682   # Extract the first word of "strip", so it can be a program name with args.
4683 set dummy strip; ac_word=$2
4684 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4685 echo "configure:4686: checking for $ac_word" >&5
4686 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4687   echo $ac_n "(cached) $ac_c" 1>&6
4688 else
4689   if test -n "$STRIP"; then
4690   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4691 else
4692   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4693   ac_dummy="$PATH"
4694   for ac_dir in $ac_dummy; do
4695     test -z "$ac_dir" && ac_dir=.
4696     if test -f $ac_dir/$ac_word; then
4697       ac_cv_prog_STRIP="strip"
4698       break
4699     fi
4700   done
4701   IFS="$ac_save_ifs"
4702   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4703 fi
4704 fi
4705 STRIP="$ac_cv_prog_STRIP"
4706 if test -n "$STRIP"; then
4707   echo "$ac_t""$STRIP" 1>&6
4708 else
4709   echo "$ac_t""no" 1>&6
4710 fi
4711
4712 else
4713   STRIP=":"
4714 fi
4715 fi
4716
4717
4718 enable_dlopen=yes
4719 enable_win32_dll=yes
4720
4721 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4722 if test "${enable_libtool_lock+set}" = set; then
4723   enableval="$enable_libtool_lock"
4724   :
4725 fi
4726
4727 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4728
4729 # Some flags need to be propagated to the compiler or linker for good
4730 # libtool support.
4731 case $host in
4732 *-*-irix6*)
4733   # Find out which ABI we are using.
4734   echo '#line 4735 "configure"' > conftest.$ac_ext
4735   if { (eval echo configure:4736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4736     case `/usr/bin/file conftest.$ac_objext` in
4737     *32-bit*)
4738       LD="${LD-ld} -32"
4739       ;;
4740     *N32*)
4741       LD="${LD-ld} -n32"
4742       ;;
4743     *64-bit*)
4744       LD="${LD-ld} -64"
4745       ;;
4746     esac
4747   fi
4748   rm -rf conftest*
4749   ;;
4750
4751 *-*-sco3.2v5*)
4752   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4753   SAVE_CFLAGS="$CFLAGS"
4754   CFLAGS="$CFLAGS -belf"
4755   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4756 echo "configure:4757: checking whether the C compiler needs -belf" >&5
4757 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4758   echo $ac_n "(cached) $ac_c" 1>&6
4759 else
4760   
4761      ac_ext=c
4762 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4763 ac_cpp='$CPP $CPPFLAGS'
4764 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4765 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4766 cross_compiling=$ac_cv_prog_cc_cross
4767
4768      cat > conftest.$ac_ext <<EOF
4769 #line 4770 "configure"
4770 #include "confdefs.h"
4771
4772 int main() {
4773
4774 ; return 0; }
4775 EOF
4776 if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4777   rm -rf conftest*
4778   lt_cv_cc_needs_belf=yes
4779 else
4780   echo "configure: failed program was:" >&5
4781   cat conftest.$ac_ext >&5
4782   rm -rf conftest*
4783   lt_cv_cc_needs_belf=no
4784 fi
4785 rm -f conftest*
4786      ac_ext=c
4787 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4788 ac_cpp='$CPP $CPPFLAGS'
4789 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4790 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4791 cross_compiling=$ac_cv_prog_cc_cross
4792
4793 fi
4794
4795 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4796   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4797     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4798     CFLAGS="$SAVE_CFLAGS"
4799   fi
4800   ;;
4801
4802 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4803   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4804 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4805 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4806 echo "configure:4807: checking for $ac_word" >&5
4807 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4808   echo $ac_n "(cached) $ac_c" 1>&6
4809 else
4810   if test -n "$DLLTOOL"; then
4811   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4812 else
4813   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4814   ac_dummy="$PATH"
4815   for ac_dir in $ac_dummy; do
4816     test -z "$ac_dir" && ac_dir=.
4817     if test -f $ac_dir/$ac_word; then
4818       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4819       break
4820     fi
4821   done
4822   IFS="$ac_save_ifs"
4823 fi
4824 fi
4825 DLLTOOL="$ac_cv_prog_DLLTOOL"
4826 if test -n "$DLLTOOL"; then
4827   echo "$ac_t""$DLLTOOL" 1>&6
4828 else
4829   echo "$ac_t""no" 1>&6
4830 fi
4831
4832
4833 if test -z "$ac_cv_prog_DLLTOOL"; then
4834 if test -n "$ac_tool_prefix"; then
4835   # Extract the first word of "dlltool", so it can be a program name with args.
4836 set dummy dlltool; ac_word=$2
4837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4838 echo "configure:4839: checking for $ac_word" >&5
4839 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4840   echo $ac_n "(cached) $ac_c" 1>&6
4841 else
4842   if test -n "$DLLTOOL"; then
4843   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4844 else
4845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4846   ac_dummy="$PATH"
4847   for ac_dir in $ac_dummy; do
4848     test -z "$ac_dir" && ac_dir=.
4849     if test -f $ac_dir/$ac_word; then
4850       ac_cv_prog_DLLTOOL="dlltool"
4851       break
4852     fi
4853   done
4854   IFS="$ac_save_ifs"
4855   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4856 fi
4857 fi
4858 DLLTOOL="$ac_cv_prog_DLLTOOL"
4859 if test -n "$DLLTOOL"; then
4860   echo "$ac_t""$DLLTOOL" 1>&6
4861 else
4862   echo "$ac_t""no" 1>&6
4863 fi
4864
4865 else
4866   DLLTOOL="false"
4867 fi
4868 fi
4869
4870   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4871 set dummy ${ac_tool_prefix}as; ac_word=$2
4872 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4873 echo "configure:4874: checking for $ac_word" >&5
4874 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   if test -n "$AS"; then
4878   ac_cv_prog_AS="$AS" # Let the user override the test.
4879 else
4880   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4881   ac_dummy="$PATH"
4882   for ac_dir in $ac_dummy; do
4883     test -z "$ac_dir" && ac_dir=.
4884     if test -f $ac_dir/$ac_word; then
4885       ac_cv_prog_AS="${ac_tool_prefix}as"
4886       break
4887     fi
4888   done
4889   IFS="$ac_save_ifs"
4890 fi
4891 fi
4892 AS="$ac_cv_prog_AS"
4893 if test -n "$AS"; then
4894   echo "$ac_t""$AS" 1>&6
4895 else
4896   echo "$ac_t""no" 1>&6
4897 fi
4898
4899
4900 if test -z "$ac_cv_prog_AS"; then
4901 if test -n "$ac_tool_prefix"; then
4902   # Extract the first word of "as", so it can be a program name with args.
4903 set dummy as; ac_word=$2
4904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4905 echo "configure:4906: checking for $ac_word" >&5
4906 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4907   echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909   if test -n "$AS"; then
4910   ac_cv_prog_AS="$AS" # Let the user override the test.
4911 else
4912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4913   ac_dummy="$PATH"
4914   for ac_dir in $ac_dummy; do
4915     test -z "$ac_dir" && ac_dir=.
4916     if test -f $ac_dir/$ac_word; then
4917       ac_cv_prog_AS="as"
4918       break
4919     fi
4920   done
4921   IFS="$ac_save_ifs"
4922   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4923 fi
4924 fi
4925 AS="$ac_cv_prog_AS"
4926 if test -n "$AS"; then
4927   echo "$ac_t""$AS" 1>&6
4928 else
4929   echo "$ac_t""no" 1>&6
4930 fi
4931
4932 else
4933   AS="false"
4934 fi
4935 fi
4936
4937   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4938 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4940 echo "configure:4941: checking for $ac_word" >&5
4941 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4942   echo $ac_n "(cached) $ac_c" 1>&6
4943 else
4944   if test -n "$OBJDUMP"; then
4945   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4946 else
4947   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4948   ac_dummy="$PATH"
4949   for ac_dir in $ac_dummy; do
4950     test -z "$ac_dir" && ac_dir=.
4951     if test -f $ac_dir/$ac_word; then
4952       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4953       break
4954     fi
4955   done
4956   IFS="$ac_save_ifs"
4957 fi
4958 fi
4959 OBJDUMP="$ac_cv_prog_OBJDUMP"
4960 if test -n "$OBJDUMP"; then
4961   echo "$ac_t""$OBJDUMP" 1>&6
4962 else
4963   echo "$ac_t""no" 1>&6
4964 fi
4965
4966
4967 if test -z "$ac_cv_prog_OBJDUMP"; then
4968 if test -n "$ac_tool_prefix"; then
4969   # Extract the first word of "objdump", so it can be a program name with args.
4970 set dummy objdump; ac_word=$2
4971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4972 echo "configure:4973: checking for $ac_word" >&5
4973 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4974   echo $ac_n "(cached) $ac_c" 1>&6
4975 else
4976   if test -n "$OBJDUMP"; then
4977   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4978 else
4979   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4980   ac_dummy="$PATH"
4981   for ac_dir in $ac_dummy; do
4982     test -z "$ac_dir" && ac_dir=.
4983     if test -f $ac_dir/$ac_word; then
4984       ac_cv_prog_OBJDUMP="objdump"
4985       break
4986     fi
4987   done
4988   IFS="$ac_save_ifs"
4989   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4990 fi
4991 fi
4992 OBJDUMP="$ac_cv_prog_OBJDUMP"
4993 if test -n "$OBJDUMP"; then
4994   echo "$ac_t""$OBJDUMP" 1>&6
4995 else
4996   echo "$ac_t""no" 1>&6
4997 fi
4998
4999 else
5000   OBJDUMP="false"
5001 fi
5002 fi
5003
5004
5005   # recent cygwin and mingw systems supply a stub DllMain which the user
5006   # can override, but on older systems we have to supply one
5007   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
5008 echo "configure:5009: checking if libtool should supply DllMain function" >&5
5009 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012   cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015
5016 int main() {
5017 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5018       DllMain (0, 0, 0);
5019 ; return 0; }
5020 EOF
5021 if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5022   rm -rf conftest*
5023   lt_cv_need_dllmain=no
5024 else
5025   echo "configure: failed program was:" >&5
5026   cat conftest.$ac_ext >&5
5027   rm -rf conftest*
5028   lt_cv_need_dllmain=yes
5029 fi
5030 rm -f conftest*
5031 fi
5032
5033 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
5034
5035   case $host/$CC in
5036   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5037     # old mingw systems require "-dll" to link a DLL, while more recent ones
5038     # require "-mdll"
5039     SAVE_CFLAGS="$CFLAGS"
5040     CFLAGS="$CFLAGS -mdll"
5041     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
5042 echo "configure:5043: checking how to link DLLs" >&5
5043 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
5044   echo $ac_n "(cached) $ac_c" 1>&6
5045 else
5046   cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049
5050 int main() {
5051
5052 ; return 0; }
5053 EOF
5054 if { (eval echo configure:5055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5055   rm -rf conftest*
5056   lt_cv_cc_dll_switch=-mdll
5057 else
5058   echo "configure: failed program was:" >&5
5059   cat conftest.$ac_ext >&5
5060   rm -rf conftest*
5061   lt_cv_cc_dll_switch=-dll
5062 fi
5063 rm -f conftest*
5064 fi
5065
5066 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
5067     CFLAGS="$SAVE_CFLAGS" ;;
5068   *-*-cygwin* | *-*-pw32*)
5069     # cygwin systems need to pass --dll to the linker, and not link
5070     # crt.o which will require a WinMain@16 definition.
5071     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5072   esac
5073   ;;
5074   
5075 esac
5076
5077 # Sed substitution that helps us do robust quoting.  It backslashifies
5078 # metacharacters that are still active within double-quoted strings.
5079 Xsed='sed -e s/^X//'
5080 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5081
5082 # Same as above, but do not quote variable references.
5083 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5084
5085 # Sed substitution to delay expansion of an escaped shell variable in a
5086 # double_quote_subst'ed string.
5087 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5088
5089 # Constants:
5090 rm="rm -f"
5091
5092 # Global variables:
5093 default_ofile=libtool
5094 can_build_shared=yes
5095
5096 # All known linkers require a `.a' archive for static linking (except M$VC,
5097 # which needs '.lib').
5098 libext=a
5099 ltmain="$ac_aux_dir/ltmain.sh"
5100 ofile="$default_ofile"
5101 with_gnu_ld="$lt_cv_prog_gnu_ld"
5102 need_locks="$enable_libtool_lock"
5103
5104 old_CC="$CC"
5105 old_CFLAGS="$CFLAGS"
5106
5107 # Set sane defaults for various variables
5108 test -z "$AR" && AR=ar
5109 test -z "$AR_FLAGS" && AR_FLAGS=cru
5110 test -z "$AS" && AS=as
5111 test -z "$CC" && CC=cc
5112 test -z "$DLLTOOL" && DLLTOOL=dlltool
5113 test -z "$LD" && LD=ld
5114 test -z "$LN_S" && LN_S="ln -s"
5115 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5116 test -z "$NM" && NM=nm
5117 test -z "$OBJDUMP" && OBJDUMP=objdump
5118 test -z "$RANLIB" && RANLIB=:
5119 test -z "$STRIP" && STRIP=:
5120 test -z "$ac_objext" && ac_objext=o
5121
5122 if test x"$host" != x"$build"; then
5123   ac_tool_prefix=${host_alias}-
5124 else
5125   ac_tool_prefix=
5126 fi
5127
5128 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5129 case $host_os in
5130 linux-gnu*) ;;
5131 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5132 esac
5133
5134 case $host_os in
5135 aix3*)
5136   # AIX sometimes has problems with the GCC collect2 program.  For some
5137   # reason, if we set the COLLECT_NAMES environment variable, the problems
5138   # vanish in a puff of smoke.
5139   if test "X${COLLECT_NAMES+set}" != Xset; then
5140     COLLECT_NAMES=
5141     export COLLECT_NAMES
5142   fi
5143   ;;
5144 esac
5145
5146 # Determine commands to create old-style static archives.
5147 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5148 old_postinstall_cmds='chmod 644 $oldlib'
5149 old_postuninstall_cmds=
5150
5151 if test -n "$RANLIB"; then
5152   case $host_os in
5153   openbsd*)
5154     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5155     ;;
5156   *)
5157     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5158     ;;
5159   esac
5160   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5161 fi
5162
5163 # Allow CC to be a program name with arguments.
5164 set dummy $CC
5165 compiler="$2"
5166
5167 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5168 echo "configure:5169: checking for objdir" >&5
5169 rm -f .libs 2>/dev/null
5170 mkdir .libs 2>/dev/null
5171 if test -d .libs; then
5172   objdir=.libs
5173 else
5174   # MS-DOS does not allow filenames that begin with a dot.
5175   objdir=_libs
5176 fi
5177 rmdir .libs 2>/dev/null
5178 echo "$ac_t""$objdir" 1>&6
5179
5180
5181 # Check whether --with-pic or --without-pic was given.
5182 if test "${with_pic+set}" = set; then
5183   withval="$with_pic"
5184   pic_mode="$withval"
5185 else
5186   pic_mode=default
5187 fi
5188
5189 test -z "$pic_mode" && pic_mode=default
5190
5191 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5192 # in isolation, and that seeing it set (from the cache) indicates that
5193 # the associated values are set (in the cache) correctly too.
5194 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5195 echo "configure:5196: checking for $compiler option to produce PIC" >&5
5196 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199    lt_cv_prog_cc_pic=
5200   lt_cv_prog_cc_shlib=
5201   lt_cv_prog_cc_wl=
5202   lt_cv_prog_cc_static=
5203   lt_cv_prog_cc_no_builtin=
5204   lt_cv_prog_cc_can_build_shared=$can_build_shared
5205
5206   if test "$GCC" = yes; then
5207     lt_cv_prog_cc_wl='-Wl,'
5208     lt_cv_prog_cc_static='-static'
5209
5210     case $host_os in
5211     aix*)
5212       # Below there is a dirty hack to force normal static linking with -ldl
5213       # The problem is because libdl dynamically linked with both libc and
5214       # libC (AIX C++ library), which obviously doesn't included in libraries
5215       # list by gcc. This cause undefined symbols with -static flags.
5216       # This hack allows C programs to be linked with "-static -ldl", but
5217       # not sure about C++ programs.
5218       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5219       ;;
5220     amigaos*)
5221       # FIXME: we need at least 68020 code to build shared libraries, but
5222       # adding the `-m68020' flag to GCC prevents building anything better,
5223       # like `-m68040'.
5224       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5225       ;;
5226     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5227       # PIC is the default for these OSes.
5228       ;;
5229     darwin* | rhapsody*)
5230       # PIC is the default on this platform
5231       # Common symbols not allowed in MH_DYLIB files
5232       lt_cv_prog_cc_pic='-fno-common'
5233       ;;
5234     cygwin* | mingw* | pw32* | os2*)
5235       # This hack is so that the source file can tell whether it is being
5236       # built for inclusion in a dll (and should export symbols for example).
5237       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5238       ;;
5239     sysv4*MP*)
5240       if test -d /usr/nec; then
5241          lt_cv_prog_cc_pic=-Kconform_pic
5242       fi
5243       ;;
5244     *)
5245       lt_cv_prog_cc_pic='-fPIC'
5246       ;;
5247     esac
5248   else
5249     # PORTME Check for PIC flags for the system compiler.
5250     case $host_os in
5251     aix3* | aix4* | aix5*)
5252       lt_cv_prog_cc_wl='-Wl,'
5253       # All AIX code is PIC.
5254       if test "$host_cpu" = ia64; then
5255         # AIX 5 now supports IA64 processor
5256         lt_cv_prog_cc_static='-Bstatic'
5257       else
5258         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5259       fi
5260       ;;
5261
5262     hpux9* | hpux10* | hpux11*)
5263       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5264       lt_cv_prog_cc_wl='-Wl,'
5265       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5266       lt_cv_prog_cc_pic='+Z'
5267       ;;
5268
5269     irix5* | irix6* | nonstopux*)
5270       lt_cv_prog_cc_wl='-Wl,'
5271       lt_cv_prog_cc_static='-non_shared'
5272       # PIC (with -KPIC) is the default.
5273       ;;
5274
5275     cygwin* | mingw* | pw32* | os2*)
5276       # This hack is so that the source file can tell whether it is being
5277       # built for inclusion in a dll (and should export symbols for example).
5278       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5279       ;;
5280
5281     newsos6)
5282       lt_cv_prog_cc_pic='-KPIC'
5283       lt_cv_prog_cc_static='-Bstatic'
5284       ;;
5285     
5286     openedition)
5287       # XPLINK code is PIC by default
5288       ;;
5289
5290     osf3* | osf4* | osf5*)
5291       # All OSF/1 code is PIC.
5292       lt_cv_prog_cc_wl='-Wl,'
5293       lt_cv_prog_cc_static='-non_shared'
5294       ;;
5295
5296     sco3.2v5*)
5297       lt_cv_prog_cc_pic='-Kpic'
5298       lt_cv_prog_cc_static='-dn'
5299       lt_cv_prog_cc_shlib='-belf'
5300       ;;
5301
5302     solaris*)
5303       lt_cv_prog_cc_pic='-KPIC'
5304       lt_cv_prog_cc_static='-Bstatic'
5305       lt_cv_prog_cc_wl='-Wl,'
5306       ;;
5307
5308     sunos4*)
5309       lt_cv_prog_cc_pic='-PIC'
5310       lt_cv_prog_cc_static='-Bstatic'
5311       lt_cv_prog_cc_wl='-Qoption ld '
5312       ;;
5313
5314     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5315       lt_cv_prog_cc_pic='-KPIC'
5316       lt_cv_prog_cc_static='-Bstatic'
5317       lt_cv_prog_cc_wl='-Wl,'
5318       ;;
5319
5320     uts4*)
5321       lt_cv_prog_cc_pic='-pic'
5322       lt_cv_prog_cc_static='-Bstatic'
5323       ;;
5324
5325     sysv4*MP*)
5326       if test -d /usr/nec ;then
5327         lt_cv_prog_cc_pic='-Kconform_pic'
5328         lt_cv_prog_cc_static='-Bstatic'
5329       fi
5330       ;;
5331
5332     *)
5333       lt_cv_prog_cc_can_build_shared=no
5334       ;;
5335     esac
5336   fi
5337
5338 fi
5339
5340 if test -z "$lt_cv_prog_cc_pic"; then
5341   echo "$ac_t""none" 1>&6
5342 else
5343   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5344
5345   # Check to make sure the pic_flag actually works.
5346   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5347 echo "configure:5348: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5348   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5349   echo $ac_n "(cached) $ac_c" 1>&6
5350 else
5351       save_CFLAGS="$CFLAGS"
5352     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5353     cat > conftest.$ac_ext <<EOF
5354 #line 5355 "configure"
5355 #include "confdefs.h"
5356
5357 int main() {
5358
5359 ; return 0; }
5360 EOF
5361 if { (eval echo configure:5362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5362   rm -rf conftest*
5363         case $host_os in
5364       hpux9* | hpux10* | hpux11*)
5365         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5366         # they create non-PIC objects.  So, if there were any warnings, we
5367         # assume that PIC is not supported.
5368         if test -s conftest.err; then
5369           lt_cv_prog_cc_pic_works=no
5370         else
5371           lt_cv_prog_cc_pic_works=yes
5372         fi
5373         ;;
5374       *)
5375         lt_cv_prog_cc_pic_works=yes
5376         ;;
5377       esac
5378     
5379 else
5380   echo "configure: failed program was:" >&5
5381   cat conftest.$ac_ext >&5
5382   rm -rf conftest*
5383         lt_cv_prog_cc_pic_works=no
5384     
5385 fi
5386 rm -f conftest*
5387     CFLAGS="$save_CFLAGS"
5388   
5389 fi
5390
5391
5392   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5393     lt_cv_prog_cc_pic=
5394     lt_cv_prog_cc_can_build_shared=no
5395   else
5396     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5397   fi
5398
5399   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5400 fi
5401
5402 # Check for any special shared library compilation flags.
5403 if test -n "$lt_cv_prog_cc_shlib"; then
5404   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5405   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5406   else
5407    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5408     lt_cv_prog_cc_can_build_shared=no
5409   fi
5410 fi
5411
5412 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5413 echo "configure:5414: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5414 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5415   echo $ac_n "(cached) $ac_c" 1>&6
5416 else
5417     lt_cv_prog_cc_static_works=no
5418   save_LDFLAGS="$LDFLAGS"
5419   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5420   cat > conftest.$ac_ext <<EOF
5421 #line 5422 "configure"
5422 #include "confdefs.h"
5423
5424 int main() {
5425
5426 ; return 0; }
5427 EOF
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5429   rm -rf conftest*
5430   lt_cv_prog_cc_static_works=yes
5431 else
5432   echo "configure: failed program was:" >&5
5433   cat conftest.$ac_ext >&5
5434 fi
5435 rm -f conftest*
5436   LDFLAGS="$save_LDFLAGS"
5437
5438 fi
5439
5440
5441 # Belt *and* braces to stop my trousers falling down:
5442 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5443 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5444
5445 pic_flag="$lt_cv_prog_cc_pic"
5446 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5447 wl="$lt_cv_prog_cc_wl"
5448 link_static_flag="$lt_cv_prog_cc_static"
5449 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5450 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5451
5452
5453 # Check to see if options -o and -c are simultaneously supported by compiler
5454 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5455 echo "configure:5456: checking if $compiler supports -c -o file.$ac_objext" >&5
5456 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5457   echo $ac_n "(cached) $ac_c" 1>&6
5458 else
5459   
5460 $rm -r conftest 2>/dev/null
5461 mkdir conftest
5462 cd conftest
5463 echo "int some_variable = 0;" > conftest.$ac_ext
5464 mkdir out
5465 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5466 # that will create temporary files in the current directory regardless of
5467 # the output directory.  Thus, making CWD read-only will cause this test
5468 # to fail, enabling locking or at least warning the user not to do parallel
5469 # builds.
5470 chmod -w .
5471 save_CFLAGS="$CFLAGS"
5472 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5473 compiler_c_o=no
5474 if { (eval echo configure:5475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5475   # The compiler can only warn and ignore the option if not recognized
5476   # So say no if there are warnings
5477   if test -s out/conftest.err; then
5478     lt_cv_compiler_c_o=no
5479   else
5480     lt_cv_compiler_c_o=yes
5481   fi
5482 else
5483   # Append any errors to the config.log.
5484   cat out/conftest.err 1>&5
5485   lt_cv_compiler_c_o=no
5486 fi
5487 CFLAGS="$save_CFLAGS"
5488 chmod u+w .
5489 $rm conftest* out/*
5490 rmdir out
5491 cd ..
5492 rmdir conftest
5493 $rm -r conftest 2>/dev/null
5494
5495 fi
5496
5497 compiler_c_o=$lt_cv_compiler_c_o
5498 echo "$ac_t""$compiler_c_o" 1>&6
5499
5500 if test x"$compiler_c_o" = x"yes"; then
5501   # Check to see if we can write to a .lo
5502   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5503 echo "configure:5504: checking if $compiler supports -c -o file.lo" >&5
5504   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5505   echo $ac_n "(cached) $ac_c" 1>&6
5506 else
5507   
5508   lt_cv_compiler_o_lo=no
5509   save_CFLAGS="$CFLAGS"
5510   CFLAGS="$CFLAGS -c -o conftest.lo"
5511   save_objext="$ac_objext"
5512   ac_objext=lo
5513   cat > conftest.$ac_ext <<EOF
5514 #line 5515 "configure"
5515 #include "confdefs.h"
5516
5517 int main() {
5518 int some_variable = 0;
5519 ; return 0; }
5520 EOF
5521 if { (eval echo configure:5522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5522   rm -rf conftest*
5523       # The compiler can only warn and ignore the option if not recognized
5524     # So say no if there are warnings
5525     if test -s conftest.err; then
5526       lt_cv_compiler_o_lo=no
5527     else
5528       lt_cv_compiler_o_lo=yes
5529     fi
5530   
5531 else
5532   echo "configure: failed program was:" >&5
5533   cat conftest.$ac_ext >&5
5534 fi
5535 rm -f conftest*
5536   ac_objext="$save_objext"
5537   CFLAGS="$save_CFLAGS"
5538   
5539 fi
5540
5541   compiler_o_lo=$lt_cv_compiler_o_lo
5542   echo "$ac_t""$compiler_o_lo" 1>&6
5543 else
5544   compiler_o_lo=no
5545 fi
5546
5547 # Check to see if we can do hard links to lock some files if needed
5548 hard_links="nottested"
5549 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5550   # do not overwrite the value of need_locks provided by the user
5551   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5552 echo "configure:5553: checking if we can lock with hard links" >&5
5553   hard_links=yes
5554   $rm conftest*
5555   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5556   touch conftest.a
5557   ln conftest.a conftest.b 2>&5 || hard_links=no
5558   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5559   echo "$ac_t""$hard_links" 1>&6
5560   if test "$hard_links" = no; then
5561     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5562     need_locks=warn
5563   fi
5564 else
5565   need_locks=no
5566 fi
5567
5568 if test "$GCC" = yes; then
5569   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5570   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5571 echo "configure:5572: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5572   echo "int some_variable = 0;" > conftest.$ac_ext
5573   save_CFLAGS="$CFLAGS"
5574   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5575   compiler_rtti_exceptions=no
5576   cat > conftest.$ac_ext <<EOF
5577 #line 5578 "configure"
5578 #include "confdefs.h"
5579
5580 int main() {
5581 int some_variable = 0;
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5585   rm -rf conftest*
5586       # The compiler can only warn and ignore the option if not recognized
5587     # So say no if there are warnings
5588     if test -s conftest.err; then
5589       compiler_rtti_exceptions=no
5590     else
5591       compiler_rtti_exceptions=yes
5592     fi
5593   
5594 else
5595   echo "configure: failed program was:" >&5
5596   cat conftest.$ac_ext >&5
5597 fi
5598 rm -f conftest*
5599   CFLAGS="$save_CFLAGS"
5600   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5601
5602   if test "$compiler_rtti_exceptions" = "yes"; then
5603     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5604   else
5605     no_builtin_flag=' -fno-builtin'
5606   fi
5607 fi
5608
5609 # See if the linker supports building shared libraries.
5610 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5611 echo "configure:5612: checking whether the linker ($LD) supports shared libraries" >&5
5612
5613 allow_undefined_flag=
5614 no_undefined_flag=
5615 need_lib_prefix=unknown
5616 need_version=unknown
5617 # when you set need_version to no, make sure it does not cause -set_version
5618 # flags to be left without arguments
5619 archive_cmds=
5620 archive_expsym_cmds=
5621 old_archive_from_new_cmds=
5622 old_archive_from_expsyms_cmds=
5623 export_dynamic_flag_spec=
5624 whole_archive_flag_spec=
5625 thread_safe_flag_spec=
5626 hardcode_into_libs=no
5627 hardcode_libdir_flag_spec=
5628 hardcode_libdir_separator=
5629 hardcode_direct=no
5630 hardcode_minus_L=no
5631 hardcode_shlibpath_var=unsupported
5632 runpath_var=
5633 link_all_deplibs=unknown
5634 always_export_symbols=no
5635 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5636 # include_expsyms should be a list of space-separated symbols to be *always*
5637 # included in the symbol list
5638 include_expsyms=
5639 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5640 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5641 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5642 # as well as any symbol that contains `d'.
5643 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5644 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5645 # platforms (ab)use it in PIC code, but their linkers get confused if
5646 # the symbol is explicitly referenced.  Since portable code cannot
5647 # rely on this symbol name, it's probably fine to never include it in
5648 # preloaded symbol tables.
5649 extract_expsyms_cmds=
5650
5651 case $host_os in
5652 cygwin* | mingw* | pw32*)
5653   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5654   # When not using gcc, we currently assume that we are using
5655   # Microsoft Visual C++.
5656   if test "$GCC" != yes; then
5657     with_gnu_ld=no
5658   fi
5659   ;;
5660 openbsd*)
5661   with_gnu_ld=no
5662   ;;
5663 esac
5664
5665 ld_shlibs=yes
5666 if test "$with_gnu_ld" = yes; then
5667   # If archive_cmds runs LD, not CC, wlarc should be empty
5668   wlarc='${wl}'
5669
5670   # See if GNU ld supports shared libraries.
5671   case $host_os in
5672   aix3* | aix4* | aix5*)
5673     # On AIX, the GNU linker is very broken
5674     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5675     ld_shlibs=no
5676     cat <<EOF 1>&2
5677
5678 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5679 *** to be unable to reliably create shared libraries on AIX.
5680 *** Therefore, libtool is disabling shared libraries support.  If you
5681 *** really care for shared libraries, you may want to modify your PATH
5682 *** so that a non-GNU linker is found, and then restart.
5683
5684 EOF
5685     ;;
5686
5687   amigaos*)
5688     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)'
5689     hardcode_libdir_flag_spec='-L$libdir'
5690     hardcode_minus_L=yes
5691
5692     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5693     # that the semantics of dynamic libraries on AmigaOS, at least up
5694     # to version 4, is to share data among multiple programs linked
5695     # with the same dynamic library.  Since this doesn't match the
5696     # behavior of shared libraries on other platforms, we can use
5697     # them.
5698     ld_shlibs=no
5699     ;;
5700
5701   beos*)
5702     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5703       allow_undefined_flag=unsupported
5704       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5705       # support --undefined.  This deserves some investigation.  FIXME
5706       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5707     else
5708       ld_shlibs=no
5709     fi
5710     ;;
5711
5712   cygwin* | mingw* | pw32*)
5713     # hardcode_libdir_flag_spec is actually meaningless, as there is
5714     # no search path for DLLs.
5715     hardcode_libdir_flag_spec='-L$libdir'
5716     allow_undefined_flag=unsupported
5717     always_export_symbols=yes
5718
5719     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5720       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5721       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5722       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5723       else $CC -o impgen impgen.c ; fi)~
5724       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5725
5726     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5727
5728     # cygwin and mingw dlls have different entry points and sets of symbols
5729     # to exclude.
5730     # FIXME: what about values for MSVC?
5731     dll_entry=__cygwin_dll_entry@12
5732     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5733     case $host_os in
5734     mingw*)
5735       # mingw values
5736       dll_entry=_DllMainCRTStartup@12
5737       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5738       ;;
5739     esac
5740
5741     # mingw and cygwin differ, and it's simplest to just exclude the union
5742     # of the two symbol sets.
5743     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5744
5745     # recent cygwin and mingw systems supply a stub DllMain which the user
5746     # can override, but on older systems we have to supply one (in ltdll.c)
5747     if test "x$lt_cv_need_dllmain" = "xyes"; then
5748       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5749       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~
5750         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5751     else
5752       ltdll_obj=
5753       ltdll_cmds=
5754     fi
5755
5756     # Extract the symbol export list from an `--export-all' def file,
5757     # then regenerate the def file from the symbol export list, so that
5758     # the compiled dll only exports the symbol export list.
5759     # Be careful not to strip the DATA tag left be newer dlltools.
5760     export_symbols_cmds="$ltdll_cmds"'
5761       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5762       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5763
5764     # If the export-symbols file already is a .def file (1st line
5765     # is EXPORTS), use it as is.
5766     # If DATA tags from a recent dlltool are present, honour them!
5767     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5768         cp $export_symbols $output_objdir/$soname-def;
5769       else
5770         echo EXPORTS > $output_objdir/$soname-def;
5771         _lt_hint=1;
5772         cat $export_symbols | while read symbol; do
5773          set dummy \$symbol;
5774          case \$# in
5775            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5776            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5777            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5778          esac;
5779          _lt_hint=`expr 1 + \$_lt_hint`;
5780         done;
5781       fi~
5782       '"$ltdll_cmds"'
5783       $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~
5784       $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~
5785       $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~
5786       $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~
5787       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5788     ;;
5789
5790   netbsd*)
5791     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5792       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5793       wlarc=
5794     else
5795       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5796       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5797     fi
5798     ;;
5799
5800   solaris* | sysv5*)
5801     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5802       ld_shlibs=no
5803       cat <<EOF 1>&2
5804
5805 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5806 *** create shared libraries on Solaris systems.  Therefore, libtool
5807 *** is disabling shared libraries support.  We urge you to upgrade GNU
5808 *** binutils to release 2.9.1 or newer.  Another option is to modify
5809 *** your PATH or compiler configuration so that the native linker is
5810 *** used, and then restart.
5811
5812 EOF
5813     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5814       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5815       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5816     else
5817       ld_shlibs=no
5818     fi
5819     ;;
5820
5821   sunos4*)
5822     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5823     wlarc=
5824     hardcode_direct=yes
5825     hardcode_shlibpath_var=no
5826     ;;
5827
5828   *)
5829     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5830       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5831       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5832     else
5833       ld_shlibs=no
5834     fi
5835     ;;
5836   esac
5837
5838   if test "$ld_shlibs" = yes; then
5839     runpath_var=LD_RUN_PATH
5840     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5841     export_dynamic_flag_spec='${wl}--export-dynamic'
5842     case $host_os in
5843     cygwin* | mingw* | pw32*)
5844       # dlltool doesn't understand --whole-archive et. al.
5845       whole_archive_flag_spec=
5846       ;;
5847     *)
5848       # ancient GNU ld didn't support --whole-archive et. al.
5849       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5850         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5851       else
5852         whole_archive_flag_spec=
5853       fi
5854       ;;
5855     esac
5856   fi
5857 else
5858   # PORTME fill in a description of your system's linker (not GNU ld)
5859   case $host_os in
5860   aix3*)
5861     allow_undefined_flag=unsupported
5862     always_export_symbols=yes
5863     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'
5864     # Note: this linker hardcodes the directories in LIBPATH if there
5865     # are no directories specified by -L.
5866     hardcode_minus_L=yes
5867     if test "$GCC" = yes && test -z "$link_static_flag"; then
5868       # Neither direct hardcoding nor static linking is supported with a
5869       # broken collect2.
5870       hardcode_direct=unsupported
5871     fi
5872     ;;
5873
5874   aix4* | aix5*)
5875     if test "$host_cpu" = ia64; then
5876       # On IA64, the linker does run time linking by default, so we don't
5877       # have to do anything special.
5878       aix_use_runtimelinking=no
5879       exp_sym_flag='-Bexport'
5880       no_entry_flag=""
5881     else
5882       aix_use_runtimelinking=no
5883
5884       # Test if we are trying to use run time linking or normal
5885       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5886       # need to do runtime linking.
5887       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5888         for ld_flag in $LDFLAGS; do
5889           case $ld_flag in
5890           *-brtl*)
5891             aix_use_runtimelinking=yes
5892             break
5893           ;;
5894           esac
5895         done
5896       esac
5897
5898       exp_sym_flag='-bexport'
5899       no_entry_flag='-bnoentry'
5900     fi
5901
5902     # When large executables or shared objects are built, AIX ld can
5903     # have problems creating the table of contents.  If linking a library
5904     # or program results in "error TOC overflow" add -mminimal-toc to
5905     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5906     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5907
5908     hardcode_direct=yes
5909     archive_cmds=''
5910     hardcode_libdir_separator=':'
5911     if test "$GCC" = yes; then
5912       case $host_os in aix4.[012]|aix4.[012].*)
5913         collect2name=`${CC} -print-prog-name=collect2`
5914         if test -f "$collect2name" && \
5915           strings "$collect2name" | grep resolve_lib_name >/dev/null
5916         then
5917           # We have reworked collect2
5918           hardcode_direct=yes
5919         else
5920           # We have old collect2
5921           hardcode_direct=unsupported
5922           # It fails to find uninstalled libraries when the uninstalled
5923           # path is not listed in the libpath.  Setting hardcode_minus_L
5924           # to unsupported forces relinking
5925           hardcode_minus_L=yes
5926           hardcode_libdir_flag_spec='-L$libdir'
5927           hardcode_libdir_separator=
5928         fi
5929       esac
5930
5931       shared_flag='-shared'
5932     else
5933       # not using gcc
5934       if test "$host_cpu" = ia64; then
5935         shared_flag='${wl}-G'
5936       else
5937         if test "$aix_use_runtimelinking" = yes; then
5938           shared_flag='${wl}-G'
5939         else
5940           shared_flag='${wl}-bM:SRE'
5941         fi
5942       fi
5943     fi
5944
5945     # It seems that -bexpall can do strange things, so it is better to
5946     # generate a list of symbols to export.
5947     always_export_symbols=yes
5948     if test "$aix_use_runtimelinking" = yes; then
5949       # Warning - without using the other runtime loading flags (-brtl),
5950       # -berok will link without error, but may produce a broken library.
5951       allow_undefined_flag='-berok'
5952       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5953       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"
5954     else
5955       if test "$host_cpu" = ia64; then
5956         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5957         allow_undefined_flag="-z nodefs"
5958         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"
5959       else
5960         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5961         # Warning - without using the other run time loading flags,
5962         # -berok will link without error, but may produce a broken library.
5963         allow_undefined_flag='${wl}-berok'
5964         # This is a bit strange, but is similar to how AIX traditionally builds
5965         # it's shared libraries.
5966         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'
5967       fi
5968     fi
5969     ;;
5970
5971   amigaos*)
5972     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)'
5973     hardcode_libdir_flag_spec='-L$libdir'
5974     hardcode_minus_L=yes
5975     # see comment about different semantics on the GNU ld section
5976     ld_shlibs=no
5977     ;;
5978
5979   cygwin* | mingw* | pw32*)
5980     # When not using gcc, we currently assume that we are using
5981     # Microsoft Visual C++.
5982     # hardcode_libdir_flag_spec is actually meaningless, as there is
5983     # no search path for DLLs.
5984     hardcode_libdir_flag_spec=' '
5985     allow_undefined_flag=unsupported
5986     # Tell ltmain to make .lib files, not .a files.
5987     libext=lib
5988     # FIXME: Setting linknames here is a bad hack.
5989     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5990     # The linker will automatically build a .lib file if we build a DLL.
5991     old_archive_from_new_cmds='true'
5992     # FIXME: Should let the user specify the lib program.
5993     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5994     fix_srcfile_path='`cygpath -w "$srcfile"`'
5995     ;;
5996
5997   darwin* | rhapsody*)
5998     case "$host_os" in
5999     rhapsody* | darwin1.[012])
6000       allow_undefined_flag='-undefined suppress'
6001       ;;
6002     *) # Darwin 1.3 on
6003       allow_undefined_flag='-flat_namespace -undefined suppress'
6004       ;;
6005     esac
6006     # FIXME: Relying on posixy $() will cause problems for
6007     #        cross-compilation, but unfortunately the echo tests do not
6008     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6009     #        `"' quotes if we put them in here... so don't!
6010     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)'
6011     # We need to add '_' to the symbols in $export_symbols first
6012     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6013     hardcode_direct=yes
6014     hardcode_shlibpath_var=no
6015     whole_archive_flag_spec='-all_load $convenience'
6016     ;;
6017
6018   freebsd1*)
6019     ld_shlibs=no
6020     ;;
6021
6022   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6023   # support.  Future versions do this automatically, but an explicit c++rt0.o
6024   # does not break anything, and helps significantly (at the cost of a little
6025   # extra space).
6026   freebsd2.2*)
6027     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6028     hardcode_libdir_flag_spec='-R$libdir'
6029     hardcode_direct=yes
6030     hardcode_shlibpath_var=no
6031     ;;
6032
6033   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6034   freebsd2*)
6035     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6036     hardcode_direct=yes
6037     hardcode_minus_L=yes
6038     hardcode_shlibpath_var=no
6039     ;;
6040
6041   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6042   freebsd*)
6043     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6044     hardcode_libdir_flag_spec='-R$libdir'
6045     hardcode_direct=yes
6046     hardcode_shlibpath_var=no
6047     ;;
6048
6049   hpux9* | hpux10* | hpux11*)
6050     case $host_os in
6051     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' ;;
6052     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6053     esac
6054     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6055     hardcode_libdir_separator=:
6056     hardcode_direct=yes
6057     hardcode_minus_L=yes # Not in the search PATH, but as the default
6058                          # location of the library.
6059     export_dynamic_flag_spec='${wl}-E'
6060     ;;
6061
6062   irix5* | irix6* | nonstopux*)
6063     if test "$GCC" = yes; then
6064       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'
6065       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6066     else
6067       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'
6068       hardcode_libdir_flag_spec='-rpath $libdir'
6069     fi
6070     hardcode_libdir_separator=:
6071     link_all_deplibs=yes
6072     ;;
6073
6074   netbsd*)
6075     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6076       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6077     else
6078       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6079     fi
6080     hardcode_libdir_flag_spec='-R$libdir'
6081     hardcode_direct=yes
6082     hardcode_shlibpath_var=no
6083     ;;
6084
6085   newsos6)
6086     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6087     hardcode_direct=yes
6088     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6089     hardcode_libdir_separator=:
6090     hardcode_shlibpath_var=no
6091     ;;
6092
6093   openbsd*)
6094     hardcode_direct=yes
6095     hardcode_shlibpath_var=no
6096     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6097       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6098       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6099       export_dynamic_flag_spec='${wl}-E'
6100     else
6101       case "$host_os" in
6102       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6103         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6104         hardcode_libdir_flag_spec='-R$libdir'
6105         ;;
6106       *)
6107         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6108         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6109         ;;
6110       esac
6111     fi
6112     ;;
6113
6114   openedition*)
6115     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
6116         cp \$linknames \$output_objdir && linknames=''"
6117     export_dynamic_flag_spec="-Wl,DLL"
6118     ;;
6119
6120   os2*)
6121     hardcode_libdir_flag_spec='-L$libdir'
6122     hardcode_minus_L=yes
6123     allow_undefined_flag=unsupported
6124     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'
6125     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6126     ;;
6127
6128   osf3*)
6129     if test "$GCC" = yes; then
6130       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6131       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'
6132     else
6133       allow_undefined_flag=' -expect_unresolved \*'
6134       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'
6135     fi
6136     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6137     hardcode_libdir_separator=:
6138     ;;
6139
6140   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6141     if test "$GCC" = yes; then
6142       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6143       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'
6144       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6145     else
6146       allow_undefined_flag=' -expect_unresolved \*'
6147       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'
6148       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6149       $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'
6150
6151       #Both c and cxx compiler support -rpath directly
6152       hardcode_libdir_flag_spec='-rpath $libdir'
6153     fi
6154     hardcode_libdir_separator=:
6155     ;;
6156
6157   sco3.2v5*)
6158     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6159     hardcode_shlibpath_var=no
6160     runpath_var=LD_RUN_PATH
6161     hardcode_runpath_var=yes
6162     export_dynamic_flag_spec='${wl}-Bexport'
6163     ;;
6164
6165   solaris*)
6166     # gcc --version < 3.0 without binutils cannot create self contained
6167     # shared libraries reliably, requiring libgcc.a to resolve some of
6168     # the object symbols generated in some cases.  Libraries that use
6169     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6170     # a copy of libgcc.a into every shared library to guarantee resolving
6171     # such symbols causes other problems:  According to Tim Van Holder
6172     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6173     # (to the application) exception stack for one thing.
6174     no_undefined_flag=' -z defs'
6175     if test "$GCC" = yes; then
6176       case `$CC --version 2>/dev/null` in
6177       [12].*)
6178         cat <<EOF 1>&2
6179
6180 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6181 *** create self contained shared libraries on Solaris systems, without
6182 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6183 *** -no-undefined support, which will at least allow you to build shared
6184 *** libraries.  However, you may find that when you link such libraries
6185 *** into an application without using GCC, you have to manually add
6186 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6187 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6188 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6189
6190 EOF
6191         no_undefined_flag=
6192         ;;
6193       esac
6194     fi
6195     # $CC -shared without GNU ld will not create a library from C++
6196     # object files and a static libstdc++, better avoid it by now
6197     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6198     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6199                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6200     hardcode_libdir_flag_spec='-R$libdir'
6201     hardcode_shlibpath_var=no
6202     case $host_os in
6203     solaris2.[0-5] | solaris2.[0-5].*) ;;
6204     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6205       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6206     esac
6207     link_all_deplibs=yes
6208     ;;
6209
6210   sunos4*)
6211     if test "x$host_vendor" = xsequent; then
6212       # Use $CC to link under sequent, because it throws in some extra .o
6213       # files that make .init and .fini sections work.
6214       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6215     else
6216       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6217     fi
6218     hardcode_libdir_flag_spec='-L$libdir'
6219     hardcode_direct=yes
6220     hardcode_minus_L=yes
6221     hardcode_shlibpath_var=no
6222     ;;
6223
6224   sysv4)
6225     case $host_vendor in
6226       sni)
6227         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6228         hardcode_direct=yes # is this really true???
6229         ;;
6230       siemens)
6231         ## LD is ld it makes a PLAMLIB
6232         ## CC just makes a GrossModule.
6233         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6234         reload_cmds='$CC -r -o $output$reload_objs'
6235         hardcode_direct=no
6236         ;;
6237       motorola)
6238         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6239         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6240         ;;
6241     esac
6242     runpath_var='LD_RUN_PATH'
6243     hardcode_shlibpath_var=no
6244     ;;
6245
6246   sysv4.3*)
6247     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6248     hardcode_shlibpath_var=no
6249     export_dynamic_flag_spec='-Bexport'
6250     ;;
6251
6252   sysv5*)
6253     no_undefined_flag=' -z text'
6254     # $CC -shared without GNU ld will not create a library from C++
6255     # object files and a static libstdc++, better avoid it by now
6256     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6257     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6258                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6259     hardcode_libdir_flag_spec=
6260     hardcode_shlibpath_var=no
6261     runpath_var='LD_RUN_PATH'
6262     ;;
6263
6264   uts4*)
6265     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6266     hardcode_libdir_flag_spec='-L$libdir'
6267     hardcode_shlibpath_var=no
6268     ;;
6269
6270   dgux*)
6271     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6272     hardcode_libdir_flag_spec='-L$libdir'
6273     hardcode_shlibpath_var=no
6274     ;;
6275
6276   sysv4*MP*)
6277     if test -d /usr/nec; then
6278       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6279       hardcode_shlibpath_var=no
6280       runpath_var=LD_RUN_PATH
6281       hardcode_runpath_var=yes
6282       ld_shlibs=yes
6283     fi
6284     ;;
6285
6286   sysv4.2uw2*)
6287     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6288     hardcode_direct=yes
6289     hardcode_minus_L=no
6290     hardcode_shlibpath_var=no
6291     hardcode_runpath_var=yes
6292     runpath_var=LD_RUN_PATH
6293     ;;
6294
6295   sysv5uw7* | unixware7*)
6296     no_undefined_flag='${wl}-z ${wl}text'
6297     if test "$GCC" = yes; then
6298       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6299     else
6300       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6301     fi
6302     runpath_var='LD_RUN_PATH'
6303     hardcode_shlibpath_var=no
6304     ;;
6305
6306   *)
6307     ld_shlibs=no
6308     ;;
6309   esac
6310 fi
6311 echo "$ac_t""$ld_shlibs" 1>&6
6312 test "$ld_shlibs" = no && can_build_shared=no
6313
6314 # Check hardcoding attributes.
6315 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6316 echo "configure:6317: checking how to hardcode library paths into programs" >&5
6317 hardcode_action=
6318 if test -n "$hardcode_libdir_flag_spec" || \
6319    test -n "$runpath_var"; then
6320
6321   # We can hardcode non-existant directories.
6322   if test "$hardcode_direct" != no &&
6323      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6324      # have to relink, otherwise we might link with an installed library
6325      # when we should be linking with a yet-to-be-installed one
6326      ## test "$hardcode_shlibpath_var" != no &&
6327      test "$hardcode_minus_L" != no; then
6328     # Linking always hardcodes the temporary library directory.
6329     hardcode_action=relink
6330   else
6331     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6332     hardcode_action=immediate
6333   fi
6334 else
6335   # We cannot hardcode anything, or else we can only hardcode existing
6336   # directories.
6337   hardcode_action=unsupported
6338 fi
6339 echo "$ac_t""$hardcode_action" 1>&6
6340
6341 striplib=
6342 old_striplib=
6343 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6344 echo "configure:6345: checking whether stripping libraries is possible" >&5
6345 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6346   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6347   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6348   echo "$ac_t""yes" 1>&6
6349 else
6350   echo "$ac_t""no" 1>&6
6351 fi
6352
6353 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6354 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6355
6356 # PORTME Fill in your ld.so characteristics
6357 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6358 echo "configure:6359: checking dynamic linker characteristics" >&5
6359 library_names_spec=
6360 libname_spec='lib$name'
6361 soname_spec=
6362 postinstall_cmds=
6363 postuninstall_cmds=
6364 finish_cmds=
6365 finish_eval=
6366 shlibpath_var=
6367 shlibpath_overrides_runpath=unknown
6368 version_type=none
6369 dynamic_linker="$host_os ld.so"
6370 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6371 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6372
6373 case $host_os in
6374 aix3*)
6375   version_type=linux
6376   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6377   shlibpath_var=LIBPATH
6378
6379   # AIX has no versioning support, so we append a major version to the name.
6380   soname_spec='${libname}${release}.so$major'
6381   ;;
6382
6383 aix4* | aix5*)
6384   version_type=linux
6385   need_lib_prefix=no
6386   need_version=no
6387   hardcode_into_libs=yes
6388   if test "$host_cpu" = ia64; then
6389     # AIX 5 supports IA64
6390     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6391     shlibpath_var=LD_LIBRARY_PATH
6392   else
6393     # With GCC up to 2.95.x, collect2 would create an import file
6394     # for dependence libraries.  The import file would start with
6395     # the line `#! .'.  This would cause the generated library to
6396     # depend on `.', always an invalid library.  This was fixed in
6397     # development snapshots of GCC prior to 3.0.
6398     case $host_os in
6399       aix4 | aix4.[01] | aix4.[01].*)
6400         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6401              echo ' yes '
6402              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6403           :
6404         else
6405           can_build_shared=no
6406         fi
6407         ;;
6408     esac
6409     # AIX (on Power*) has no versioning support, so currently we can
6410     # not hardcode correct soname into executable. Probably we can
6411     # add versioning support to collect2, so additional links can
6412     # be useful in future.
6413     if test "$aix_use_runtimelinking" = yes; then
6414       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6415       # instead of lib<name>.a to let people know that these are not
6416       # typical AIX shared libraries.
6417       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6418     else
6419       # We preserve .a as extension for shared libraries through AIX4.2
6420       # and later when we are not doing run time linking.
6421       library_names_spec='${libname}${release}.a $libname.a'
6422       soname_spec='${libname}${release}.so$major'
6423     fi
6424     shlibpath_var=LIBPATH
6425   fi
6426   hardcode_into_libs=yes
6427   ;;
6428
6429 amigaos*)
6430   library_names_spec='$libname.ixlibrary $libname.a'
6431   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6432   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'
6433   ;;
6434
6435 beos*)
6436   library_names_spec='${libname}.so'
6437   dynamic_linker="$host_os ld.so"
6438   shlibpath_var=LIBRARY_PATH
6439   ;;
6440
6441 bsdi4*)
6442   version_type=linux
6443   need_version=no
6444   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6445   soname_spec='${libname}${release}.so$major'
6446   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6447   shlibpath_var=LD_LIBRARY_PATH
6448   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6449   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6450   export_dynamic_flag_spec=-rdynamic
6451   # the default ld.so.conf also contains /usr/contrib/lib and
6452   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6453   # libtool to hard-code these into programs
6454   ;;
6455
6456 cygwin* | mingw* | pw32*)
6457   version_type=windows
6458   need_version=no
6459   need_lib_prefix=no
6460   case $GCC,$host_os in
6461   yes,cygwin*)
6462     library_names_spec='$libname.dll.a'
6463     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6464     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6465       dldir=$destdir/`dirname \$dlpath`~
6466       test -d \$dldir || mkdir -p \$dldir~
6467       $install_prog .libs/$dlname \$dldir/$dlname'
6468     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6469       dlpath=$dir/\$dldll~
6470        $rm \$dlpath'
6471     ;;
6472   yes,mingw*)
6473     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6474     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6475     ;;
6476   yes,pw32*)
6477     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6478     ;;
6479   *)
6480     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6481     ;;
6482   esac
6483   dynamic_linker='Win32 ld.exe'
6484   # FIXME: first we should search . and the directory the executable is in
6485   shlibpath_var=PATH
6486   ;;
6487
6488 darwin* | rhapsody*)
6489   dynamic_linker="$host_os dyld"
6490   version_type=darwin
6491   need_lib_prefix=no
6492   need_version=no
6493   # FIXME: Relying on posixy $() will cause problems for
6494   #        cross-compilation, but unfortunately the echo tests do not
6495   #        yet detect zsh echo's removal of \ escapes.
6496   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)'
6497   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6498   shlibpath_overrides_runpath=yes
6499   shlibpath_var=DYLD_LIBRARY_PATH
6500   ;;
6501
6502 freebsd1*)
6503   dynamic_linker=no
6504   ;;
6505
6506 freebsd*)
6507   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6508   version_type=freebsd-$objformat
6509   case $version_type in
6510     freebsd-elf*)
6511       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6512       need_version=no
6513       need_lib_prefix=no
6514       ;;
6515     freebsd-*)
6516       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6517       need_version=yes
6518       ;;
6519   esac
6520   shlibpath_var=LD_LIBRARY_PATH
6521   case $host_os in
6522   freebsd2*)
6523     shlibpath_overrides_runpath=yes
6524     ;;
6525   *)
6526     shlibpath_overrides_runpath=no
6527     hardcode_into_libs=yes
6528     ;;
6529   esac
6530   ;;
6531
6532 gnu*)
6533   version_type=linux
6534   need_lib_prefix=no
6535   need_version=no
6536   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6537   soname_spec='${libname}${release}.so$major'
6538   shlibpath_var=LD_LIBRARY_PATH
6539   hardcode_into_libs=yes
6540   ;;
6541
6542 hpux9* | hpux10* | hpux11*)
6543   # Give a soname corresponding to the major version so that dld.sl refuses to
6544   # link against other versions.
6545   dynamic_linker="$host_os dld.sl"
6546   version_type=sunos
6547   need_lib_prefix=no
6548   need_version=no
6549   shlibpath_var=SHLIB_PATH
6550   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6551   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6552   soname_spec='${libname}${release}.sl$major'
6553   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6554   postinstall_cmds='chmod 555 $lib'
6555   ;;
6556
6557 irix5* | irix6* | nonstopux*)
6558   case $host_os in
6559     nonstopux*) version_type=nonstopux ;;
6560     *)          version_type=irix ;;
6561   esac
6562   need_lib_prefix=no
6563   need_version=no
6564   soname_spec='${libname}${release}.so$major'
6565   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6566   case $host_os in
6567   irix5* | nonstopux*)
6568     libsuff= shlibsuff=
6569     ;;
6570   *)
6571     case $LD in # libtool.m4 will add one of these switches to LD
6572     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6573     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6574     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6575     *) libsuff= shlibsuff= libmagic=never-match;;
6576     esac
6577     ;;
6578   esac
6579   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6580   shlibpath_overrides_runpath=no
6581   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6582   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6583   ;;
6584
6585 # No shared lib support for Linux oldld, aout, or coff.
6586 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6587   dynamic_linker=no
6588   ;;
6589
6590 # This must be Linux ELF.
6591 linux-gnu*)
6592   version_type=linux
6593   need_lib_prefix=no
6594   need_version=no
6595   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6596   soname_spec='${libname}${release}.so$major'
6597   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6598   shlibpath_var=LD_LIBRARY_PATH
6599   shlibpath_overrides_runpath=no
6600   # This implies no fast_install, which is unacceptable.
6601   # Some rework will be needed to allow for fast_install
6602   # before this can be enabled.
6603   hardcode_into_libs=yes
6604
6605   # We used to test for /lib/ld.so.1 and disable shared libraries on
6606   # powerpc, because MkLinux only supported shared libraries with the
6607   # GNU dynamic linker.  Since this was broken with cross compilers,
6608   # most powerpc-linux boxes support dynamic linking these days and
6609   # people can always --disable-shared, the test was removed, and we
6610   # assume the GNU/Linux dynamic linker is in use.
6611   dynamic_linker='GNU/Linux ld.so'
6612   ;;
6613
6614 netbsd*)
6615   version_type=sunos
6616   need_lib_prefix=no
6617   need_version=no
6618   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6619     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6620     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6621     dynamic_linker='NetBSD (a.out) ld.so'
6622   else
6623     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6624     soname_spec='${libname}${release}.so$major'
6625     dynamic_linker='NetBSD ld.elf_so'
6626   fi
6627   shlibpath_var=LD_LIBRARY_PATH
6628   shlibpath_overrides_runpath=yes
6629   hardcode_into_libs=yes
6630   ;;
6631
6632 newsos6)
6633   version_type=linux
6634   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6635   shlibpath_var=LD_LIBRARY_PATH
6636   shlibpath_overrides_runpath=yes
6637   ;;
6638
6639 openbsd*)
6640   version_type=sunos
6641   need_lib_prefix=no
6642   need_version=no
6643   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6644     case "$host_os" in
6645     openbsd2.[89] | openbsd2.[89].*)
6646       shlibpath_overrides_runpath=no
6647       ;;
6648     *)
6649       shlibpath_overrides_runpath=yes
6650       ;;
6651     esac
6652   else
6653     shlibpath_overrides_runpath=yes
6654   fi
6655   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6656   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6657   shlibpath_var=LD_LIBRARY_PATH
6658   ;;
6659
6660 openedition*)
6661   need_lib_prefix=no
6662   need_version=no
6663   shlibpath_overrides_runpath=yes
6664   shlibpath_var=LIBPATH
6665   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6666   # the library's exports are in libname.x; this is the file that must
6667   # actually be linked with to use a DLL.
6668   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6669   ;;
6670
6671 os2*)
6672   libname_spec='$name'
6673   need_lib_prefix=no
6674   library_names_spec='$libname.dll $libname.a'
6675   dynamic_linker='OS/2 ld.exe'
6676   shlibpath_var=LIBPATH
6677   ;;
6678
6679 osf3* | osf4* | osf5*)
6680   version_type=osf
6681   need_version=no
6682   soname_spec='${libname}${release}.so$major'
6683   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6684   shlibpath_var=LD_LIBRARY_PATH
6685   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6686   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6687   hardcode_into_libs=yes
6688   ;;
6689
6690 sco3.2v5*)
6691   version_type=osf
6692   soname_spec='${libname}${release}.so$major'
6693   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6694   shlibpath_var=LD_LIBRARY_PATH
6695   ;;
6696
6697 solaris*)
6698   version_type=linux
6699   need_lib_prefix=no
6700   need_version=no
6701   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6702   soname_spec='${libname}${release}.so$major'
6703   shlibpath_var=LD_LIBRARY_PATH
6704   shlibpath_overrides_runpath=yes
6705   hardcode_into_libs=yes
6706   # ldd complains unless libraries are executable
6707   postinstall_cmds='chmod +x $lib'
6708   ;;
6709
6710 sunos4*)
6711   version_type=sunos
6712   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6713   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6714   shlibpath_var=LD_LIBRARY_PATH
6715   shlibpath_overrides_runpath=yes
6716   if test "$with_gnu_ld" = yes; then
6717     need_lib_prefix=no
6718   fi
6719   need_version=yes
6720   ;;
6721
6722 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6723   version_type=linux
6724   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6725   soname_spec='${libname}${release}.so$major'
6726   shlibpath_var=LD_LIBRARY_PATH
6727   case $host_vendor in
6728     sni)
6729       shlibpath_overrides_runpath=no
6730       need_lib_prefix=no
6731       export_dynamic_flag_spec='${wl}-Blargedynsym'
6732       runpath_var=LD_RUN_PATH
6733       ;;
6734     siemens)
6735       need_lib_prefix=no
6736       ;;
6737     motorola)
6738       need_lib_prefix=no
6739       need_version=no
6740       shlibpath_overrides_runpath=no
6741       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6742       ;;
6743   esac
6744   ;;
6745
6746 uts4*)
6747   version_type=linux
6748   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6749   soname_spec='${libname}${release}.so$major'
6750   shlibpath_var=LD_LIBRARY_PATH
6751   ;;
6752
6753 dgux*)
6754   version_type=linux
6755   need_lib_prefix=no
6756   need_version=no
6757   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6758   soname_spec='${libname}${release}.so$major'
6759   shlibpath_var=LD_LIBRARY_PATH
6760   ;;
6761
6762 sysv4*MP*)
6763   if test -d /usr/nec ;then
6764     version_type=linux
6765     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6766     soname_spec='$libname.so.$major'
6767     shlibpath_var=LD_LIBRARY_PATH
6768   fi
6769   ;;
6770
6771 *)
6772   dynamic_linker=no
6773   ;;
6774 esac
6775 echo "$ac_t""$dynamic_linker" 1>&6
6776 test "$dynamic_linker" = no && can_build_shared=no
6777
6778 # Report the final consequences.
6779 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6780 echo "configure:6781: checking if libtool supports shared libraries" >&5
6781 echo "$ac_t""$can_build_shared" 1>&6
6782
6783 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6784 echo "configure:6785: checking whether to build shared libraries" >&5
6785 test "$can_build_shared" = "no" && enable_shared=no
6786
6787 # On AIX, shared libraries and static libraries use the same namespace, and
6788 # are all built from PIC.
6789 case "$host_os" in
6790 aix3*)
6791   test "$enable_shared" = yes && enable_static=no
6792   if test -n "$RANLIB"; then
6793     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6794     postinstall_cmds='$RANLIB $lib'
6795   fi
6796   ;;
6797
6798 aix4*)
6799   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6800     test "$enable_shared" = yes && enable_static=no
6801   fi
6802   ;;
6803 esac
6804 echo "$ac_t""$enable_shared" 1>&6
6805
6806 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6807 echo "configure:6808: checking whether to build static libraries" >&5
6808 # Make sure either enable_shared or enable_static is yes.
6809 test "$enable_shared" = yes || enable_static=yes
6810 echo "$ac_t""$enable_static" 1>&6
6811
6812 if test "$hardcode_action" = relink; then
6813   # Fast installation is not supported
6814   enable_fast_install=no
6815 elif test "$shlibpath_overrides_runpath" = yes ||
6816      test "$enable_shared" = no; then
6817   # Fast installation is not necessary
6818   enable_fast_install=needless
6819 fi
6820
6821 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6822 if test "$GCC" = yes; then
6823   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6824 fi
6825
6826 if test "x$enable_dlopen" != xyes; then
6827   enable_dlopen=unknown
6828   enable_dlopen_self=unknown
6829   enable_dlopen_self_static=unknown
6830 else
6831   lt_cv_dlopen=no
6832   lt_cv_dlopen_libs=
6833
6834   case $host_os in
6835   beos*)
6836     lt_cv_dlopen="load_add_on"
6837     lt_cv_dlopen_libs=
6838     lt_cv_dlopen_self=yes
6839     ;;
6840
6841   cygwin* | mingw* | pw32*)
6842     lt_cv_dlopen="LoadLibrary"
6843     lt_cv_dlopen_libs=
6844    ;;
6845
6846   *)
6847     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6848 echo "configure:6849: checking for dllload" >&5
6849 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6850   echo $ac_n "(cached) $ac_c" 1>&6
6851 else
6852   cat > conftest.$ac_ext <<EOF
6853 #line 6854 "configure"
6854 #include "confdefs.h"
6855 /* System header to define __stub macros and hopefully few prototypes,
6856     which can conflict with char dllload(); below.  */
6857 #include <assert.h>
6858 /* Override any gcc2 internal prototype to avoid an error.  */
6859 /* We use char because int might match the return type of a gcc2
6860     builtin and then its argument prototype would still apply.  */
6861 char dllload();
6862 char (*f)();
6863
6864 int main() {
6865
6866 /* The GNU C library defines this for functions which it implements
6867     to always fail with ENOSYS.  Some functions are actually named
6868     something starting with __ and the normal name is an alias.  */
6869 #if defined (__stub_dllload) || defined (__stub___dllload)
6870 choke me
6871 #else
6872 f = dllload;
6873 #endif
6874
6875 ; return 0; }
6876 EOF
6877 if { (eval echo configure:6878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6878   rm -rf conftest*
6879   eval "ac_cv_func_dllload=yes"
6880 else
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_func_dllload=no"
6885 fi
6886 rm -f conftest*
6887 fi
6888
6889 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6890   echo "$ac_t""yes" 1>&6
6891   lt_cv_dlopen="dllload"
6892 else
6893   echo "$ac_t""no" 1>&6
6894 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6895 echo "configure:6896: checking for shl_load" >&5
6896 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6897   echo $ac_n "(cached) $ac_c" 1>&6
6898 else
6899   cat > conftest.$ac_ext <<EOF
6900 #line 6901 "configure"
6901 #include "confdefs.h"
6902 /* System header to define __stub macros and hopefully few prototypes,
6903     which can conflict with char shl_load(); below.  */
6904 #include <assert.h>
6905 /* Override any gcc2 internal prototype to avoid an error.  */
6906 /* We use char because int might match the return type of a gcc2
6907     builtin and then its argument prototype would still apply.  */
6908 char shl_load();
6909 char (*f)();
6910
6911 int main() {
6912
6913 /* The GNU C library defines this for functions which it implements
6914     to always fail with ENOSYS.  Some functions are actually named
6915     something starting with __ and the normal name is an alias.  */
6916 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6917 choke me
6918 #else
6919 f = shl_load;
6920 #endif
6921
6922 ; return 0; }
6923 EOF
6924 if { (eval echo configure:6925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6925   rm -rf conftest*
6926   eval "ac_cv_func_shl_load=yes"
6927 else
6928   echo "configure: failed program was:" >&5
6929   cat conftest.$ac_ext >&5
6930   rm -rf conftest*
6931   eval "ac_cv_func_shl_load=no"
6932 fi
6933 rm -f conftest*
6934 fi
6935
6936 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6937   echo "$ac_t""yes" 1>&6
6938   lt_cv_dlopen="shl_load"
6939 else
6940   echo "$ac_t""no" 1>&6
6941 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6942 echo "configure:6943: checking for shl_load in -ldld" >&5
6943 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6945   echo $ac_n "(cached) $ac_c" 1>&6
6946 else
6947   ac_save_LIBS="$LIBS"
6948 LIBS="-ldld  $LIBS"
6949 cat > conftest.$ac_ext <<EOF
6950 #line 6951 "configure"
6951 #include "confdefs.h"
6952 /* Override any gcc2 internal prototype to avoid an error.  */
6953 /* We use char because int might match the return type of a gcc2
6954     builtin and then its argument prototype would still apply.  */
6955 char shl_load();
6956
6957 int main() {
6958 shl_load()
6959 ; return 0; }
6960 EOF
6961 if { (eval echo configure:6962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6962   rm -rf conftest*
6963   eval "ac_cv_lib_$ac_lib_var=yes"
6964 else
6965   echo "configure: failed program was:" >&5
6966   cat conftest.$ac_ext >&5
6967   rm -rf conftest*
6968   eval "ac_cv_lib_$ac_lib_var=no"
6969 fi
6970 rm -f conftest*
6971 LIBS="$ac_save_LIBS"
6972
6973 fi
6974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6975   echo "$ac_t""yes" 1>&6
6976   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6977 else
6978   echo "$ac_t""no" 1>&6
6979 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6980 echo "configure:6981: checking for dlopen" >&5
6981 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6982   echo $ac_n "(cached) $ac_c" 1>&6
6983 else
6984   cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987 /* System header to define __stub macros and hopefully few prototypes,
6988     which can conflict with char dlopen(); below.  */
6989 #include <assert.h>
6990 /* Override any gcc2 internal prototype to avoid an error.  */
6991 /* We use char because int might match the return type of a gcc2
6992     builtin and then its argument prototype would still apply.  */
6993 char dlopen();
6994 char (*f)();
6995
6996 int main() {
6997
6998 /* The GNU C library defines this for functions which it implements
6999     to always fail with ENOSYS.  Some functions are actually named
7000     something starting with __ and the normal name is an alias.  */
7001 #if defined (__stub_dlopen) || defined (__stub___dlopen)
7002 choke me
7003 #else
7004 f = dlopen;
7005 #endif
7006
7007 ; return 0; }
7008 EOF
7009 if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010   rm -rf conftest*
7011   eval "ac_cv_func_dlopen=yes"
7012 else
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   eval "ac_cv_func_dlopen=no"
7017 fi
7018 rm -f conftest*
7019 fi
7020
7021 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
7022   echo "$ac_t""yes" 1>&6
7023   lt_cv_dlopen="dlopen"
7024 else
7025   echo "$ac_t""no" 1>&6
7026 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
7027 echo "configure:7028: checking for dlopen in -ldl" >&5
7028 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
7029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7030   echo $ac_n "(cached) $ac_c" 1>&6
7031 else
7032   ac_save_LIBS="$LIBS"
7033 LIBS="-ldl  $LIBS"
7034 cat > conftest.$ac_ext <<EOF
7035 #line 7036 "configure"
7036 #include "confdefs.h"
7037 /* Override any gcc2 internal prototype to avoid an error.  */
7038 /* We use char because int might match the return type of a gcc2
7039     builtin and then its argument prototype would still apply.  */
7040 char dlopen();
7041
7042 int main() {
7043 dlopen()
7044 ; return 0; }
7045 EOF
7046 if { (eval echo configure:7047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7047   rm -rf conftest*
7048   eval "ac_cv_lib_$ac_lib_var=yes"
7049 else
7050   echo "configure: failed program was:" >&5
7051   cat conftest.$ac_ext >&5
7052   rm -rf conftest*
7053   eval "ac_cv_lib_$ac_lib_var=no"
7054 fi
7055 rm -f conftest*
7056 LIBS="$ac_save_LIBS"
7057
7058 fi
7059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7060   echo "$ac_t""yes" 1>&6
7061   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7062 else
7063   echo "$ac_t""no" 1>&6
7064 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
7065 echo "configure:7066: checking for dlopen in -lsvld" >&5
7066 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
7067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7068   echo $ac_n "(cached) $ac_c" 1>&6
7069 else
7070   ac_save_LIBS="$LIBS"
7071 LIBS="-lsvld  $LIBS"
7072 cat > conftest.$ac_ext <<EOF
7073 #line 7074 "configure"
7074 #include "confdefs.h"
7075 /* Override any gcc2 internal prototype to avoid an error.  */
7076 /* We use char because int might match the return type of a gcc2
7077     builtin and then its argument prototype would still apply.  */
7078 char dlopen();
7079
7080 int main() {
7081 dlopen()
7082 ; return 0; }
7083 EOF
7084 if { (eval echo configure:7085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7085   rm -rf conftest*
7086   eval "ac_cv_lib_$ac_lib_var=yes"
7087 else
7088   echo "configure: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   rm -rf conftest*
7091   eval "ac_cv_lib_$ac_lib_var=no"
7092 fi
7093 rm -f conftest*
7094 LIBS="$ac_save_LIBS"
7095
7096 fi
7097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7098   echo "$ac_t""yes" 1>&6
7099   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7100 else
7101   echo "$ac_t""no" 1>&6
7102 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
7103 echo "configure:7104: checking for dld_link in -ldld" >&5
7104 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
7105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7106   echo $ac_n "(cached) $ac_c" 1>&6
7107 else
7108   ac_save_LIBS="$LIBS"
7109 LIBS="-ldld  $LIBS"
7110 cat > conftest.$ac_ext <<EOF
7111 #line 7112 "configure"
7112 #include "confdefs.h"
7113 /* Override any gcc2 internal prototype to avoid an error.  */
7114 /* We use char because int might match the return type of a gcc2
7115     builtin and then its argument prototype would still apply.  */
7116 char dld_link();
7117
7118 int main() {
7119 dld_link()
7120 ; return 0; }
7121 EOF
7122 if { (eval echo configure:7123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7123   rm -rf conftest*
7124   eval "ac_cv_lib_$ac_lib_var=yes"
7125 else
7126   echo "configure: failed program was:" >&5
7127   cat conftest.$ac_ext >&5
7128   rm -rf conftest*
7129   eval "ac_cv_lib_$ac_lib_var=no"
7130 fi
7131 rm -f conftest*
7132 LIBS="$ac_save_LIBS"
7133
7134 fi
7135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7136   echo "$ac_t""yes" 1>&6
7137   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7138 else
7139   echo "$ac_t""no" 1>&6
7140 fi
7141
7142               
7143 fi
7144
7145             
7146 fi
7147
7148           
7149 fi
7150
7151         
7152 fi
7153
7154       
7155 fi
7156
7157     
7158 fi
7159
7160     ;;
7161   esac
7162
7163   if test "x$lt_cv_dlopen" != xno; then
7164     enable_dlopen=yes
7165   else
7166     enable_dlopen=no
7167   fi
7168
7169   case $lt_cv_dlopen in
7170   dlopen)
7171     save_CPPFLAGS="$CPPFLAGS"
7172         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7173
7174     save_LDFLAGS="$LDFLAGS"
7175     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7176
7177     save_LIBS="$LIBS"
7178     LIBS="$lt_cv_dlopen_libs $LIBS"
7179
7180     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7181 echo "configure:7182: checking whether a program can dlopen itself" >&5
7182 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7183   echo $ac_n "(cached) $ac_c" 1>&6
7184 else
7185           if test "$cross_compiling" = yes; then :
7186   lt_cv_dlopen_self=cross
7187 else
7188     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7189   lt_status=$lt_dlunknown
7190   cat > conftest.$ac_ext <<EOF
7191 #line 7192 "configure"
7192 #include "confdefs.h"
7193
7194 #if HAVE_DLFCN_H
7195 #include <dlfcn.h>
7196 #endif
7197
7198 #include <stdio.h>
7199
7200 #ifdef RTLD_GLOBAL
7201 #  define LT_DLGLOBAL           RTLD_GLOBAL
7202 #else
7203 #  ifdef DL_GLOBAL
7204 #    define LT_DLGLOBAL         DL_GLOBAL
7205 #  else
7206 #    define LT_DLGLOBAL         0
7207 #  endif
7208 #endif
7209
7210 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7211    find out it does not work in some platform. */
7212 #ifndef LT_DLLAZY_OR_NOW
7213 #  ifdef RTLD_LAZY
7214 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7215 #  else
7216 #    ifdef DL_LAZY
7217 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7218 #    else
7219 #      ifdef RTLD_NOW
7220 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7221 #      else
7222 #        ifdef DL_NOW
7223 #          define LT_DLLAZY_OR_NOW      DL_NOW
7224 #        else
7225 #          define LT_DLLAZY_OR_NOW      0
7226 #        endif
7227 #      endif
7228 #    endif
7229 #  endif
7230 #endif
7231
7232 #ifdef __cplusplus
7233 extern "C" void exit (int);
7234 #endif
7235
7236 void fnord() { int i=42;}
7237 int main ()
7238 {
7239   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7240   int status = $lt_dlunknown;
7241
7242   if (self)
7243     {
7244       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7245       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7246       /* dlclose (self); */
7247     }
7248
7249     exit (status);
7250 }
7251 EOF
7252   if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7253     (./conftest; exit; ) 2>/dev/null
7254     lt_status=$?
7255     case x$lt_status in
7256       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7257       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7258       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7259     esac
7260   else :
7261     # compilation failed
7262     lt_cv_dlopen_self=no
7263   fi
7264 fi
7265 rm -fr conftest*
7266
7267     
7268 fi
7269
7270 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7271
7272     if test "x$lt_cv_dlopen_self" = xyes; then
7273       LDFLAGS="$LDFLAGS $link_static_flag"
7274       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7275 echo "configure:7276: checking whether a statically linked program can dlopen itself" >&5
7276 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7277   echo $ac_n "(cached) $ac_c" 1>&6
7278 else
7279           if test "$cross_compiling" = yes; then :
7280   lt_cv_dlopen_self_static=cross
7281 else
7282     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7283   lt_status=$lt_dlunknown
7284   cat > conftest.$ac_ext <<EOF
7285 #line 7286 "configure"
7286 #include "confdefs.h"
7287
7288 #if HAVE_DLFCN_H
7289 #include <dlfcn.h>
7290 #endif
7291
7292 #include <stdio.h>
7293
7294 #ifdef RTLD_GLOBAL
7295 #  define LT_DLGLOBAL           RTLD_GLOBAL
7296 #else
7297 #  ifdef DL_GLOBAL
7298 #    define LT_DLGLOBAL         DL_GLOBAL
7299 #  else
7300 #    define LT_DLGLOBAL         0
7301 #  endif
7302 #endif
7303
7304 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7305    find out it does not work in some platform. */
7306 #ifndef LT_DLLAZY_OR_NOW
7307 #  ifdef RTLD_LAZY
7308 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7309 #  else
7310 #    ifdef DL_LAZY
7311 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7312 #    else
7313 #      ifdef RTLD_NOW
7314 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7315 #      else
7316 #        ifdef DL_NOW
7317 #          define LT_DLLAZY_OR_NOW      DL_NOW
7318 #        else
7319 #          define LT_DLLAZY_OR_NOW      0
7320 #        endif
7321 #      endif
7322 #    endif
7323 #  endif
7324 #endif
7325
7326 #ifdef __cplusplus
7327 extern "C" void exit (int);
7328 #endif
7329
7330 void fnord() { int i=42;}
7331 int main ()
7332 {
7333   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7334   int status = $lt_dlunknown;
7335
7336   if (self)
7337     {
7338       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7339       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7340       /* dlclose (self); */
7341     }
7342
7343     exit (status);
7344 }
7345 EOF
7346   if { (eval echo configure:7347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7347     (./conftest; exit; ) 2>/dev/null
7348     lt_status=$?
7349     case x$lt_status in
7350       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7351       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7352       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7353     esac
7354   else :
7355     # compilation failed
7356     lt_cv_dlopen_self_static=no
7357   fi
7358 fi
7359 rm -fr conftest*
7360
7361       
7362 fi
7363
7364 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7365     fi
7366
7367     CPPFLAGS="$save_CPPFLAGS"
7368     LDFLAGS="$save_LDFLAGS"
7369     LIBS="$save_LIBS"
7370     ;;
7371   esac
7372
7373   case $lt_cv_dlopen_self in
7374   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7375   *) enable_dlopen_self=unknown ;;
7376   esac
7377
7378   case $lt_cv_dlopen_self_static in
7379   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7380   *) enable_dlopen_self_static=unknown ;;
7381   esac
7382 fi
7383
7384
7385 if test "$enable_shared" = yes && test "$GCC" = yes; then
7386   case $archive_cmds in
7387   *'~'*)
7388     # FIXME: we may have to deal with multi-command sequences.
7389     ;;
7390   '$CC '*)
7391     # Test whether the compiler implicitly links with -lc since on some
7392     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7393     # to ld, don't add -lc before -lgcc.
7394     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7395 echo "configure:7396: checking whether -lc should be explicitly linked in" >&5
7396     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7397   echo $ac_n "(cached) $ac_c" 1>&6
7398 else
7399   $rm conftest*
7400     echo 'static int dummy;' > conftest.$ac_ext
7401
7402     if { (eval echo configure:7403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7403       soname=conftest
7404       lib=conftest
7405       libobjs=conftest.$ac_objext
7406       deplibs=
7407       wl=$lt_cv_prog_cc_wl
7408       compiler_flags=-v
7409       linker_flags=-v
7410       verstring=
7411       output_objdir=.
7412       libname=conftest
7413       save_allow_undefined_flag=$allow_undefined_flag
7414       allow_undefined_flag=
7415       if { (eval echo configure:7416: \"$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; }
7416       then
7417         lt_cv_archive_cmds_need_lc=no
7418       else
7419         lt_cv_archive_cmds_need_lc=yes
7420       fi
7421       allow_undefined_flag=$save_allow_undefined_flag
7422     else
7423       cat conftest.err 1>&5
7424     fi
7425 fi
7426
7427     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7428     ;;
7429   esac
7430 fi
7431 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7432
7433 # The second clause should only fire when bootstrapping the
7434 # libtool distribution, otherwise you forgot to ship ltmain.sh
7435 # with your package, and you will get complaints that there are
7436 # no rules to generate ltmain.sh.
7437 if test -f "$ltmain"; then
7438   :
7439 else
7440   # If there is no Makefile yet, we rely on a make rule to execute
7441   # `config.status --recheck' to rerun these tests and create the
7442   # libtool script then.
7443   test -f Makefile && make "$ltmain"
7444 fi
7445
7446 if test -f "$ltmain"; then
7447   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7448   $rm -f "${ofile}T"
7449
7450   echo creating $ofile
7451
7452   # Now quote all the things that may contain metacharacters while being
7453   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7454   # variables and quote the copies for generation of the libtool script.
7455   for var in echo old_CC old_CFLAGS SED \
7456     AR AR_FLAGS CC LD LN_S NM SHELL \
7457     reload_flag reload_cmds wl \
7458     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7459     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7460     library_names_spec soname_spec \
7461     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7462     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7463     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7464     old_striplib striplib file_magic_cmd export_symbols_cmds \
7465     deplibs_check_method allow_undefined_flag no_undefined_flag \
7466     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7467     global_symbol_to_c_name_address \
7468     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7469     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7470     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7471
7472     case $var in
7473     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7474     old_postinstall_cmds | old_postuninstall_cmds | \
7475     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7476     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7477     postinstall_cmds | postuninstall_cmds | \
7478     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7479       # Double-quote double-evaled strings.
7480       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7481       ;;
7482     *)
7483       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7484       ;;
7485     esac
7486   done
7487
7488   cat <<__EOF__ > "${ofile}T"
7489 #! $SHELL
7490
7491 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7492 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7493 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7494 #
7495 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7496 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7497 #
7498 # This program is free software; you can redistribute it and/or modify
7499 # it under the terms of the GNU General Public License as published by
7500 # the Free Software Foundation; either version 2 of the License, or
7501 # (at your option) any later version.
7502 #
7503 # This program is distributed in the hope that it will be useful, but
7504 # WITHOUT ANY WARRANTY; without even the implied warranty of
7505 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7506 # General Public License for more details.
7507 #
7508 # You should have received a copy of the GNU General Public License
7509 # along with this program; if not, write to the Free Software
7510 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7511 #
7512 # As a special exception to the GNU General Public License, if you
7513 # distribute this file as part of a program that contains a
7514 # configuration script generated by Autoconf, you may include it under
7515 # the same distribution terms that you use for the rest of that program.
7516
7517 # A sed that does not truncate output.
7518 SED=$lt_SED
7519
7520 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7521 Xsed="${SED} -e s/^X//"
7522
7523 # The HP-UX ksh and POSIX shell print the target directory to stdout
7524 # if CDPATH is set.
7525 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7526
7527 # ### BEGIN LIBTOOL CONFIG
7528
7529 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7530
7531 # Shell to use when invoking shell scripts.
7532 SHELL=$lt_SHELL
7533
7534 # Whether or not to build shared libraries.
7535 build_libtool_libs=$enable_shared
7536
7537 # Whether or not to build static libraries.
7538 build_old_libs=$enable_static
7539
7540 # Whether or not to add -lc for building shared libraries.
7541 build_libtool_need_lc=$need_lc
7542
7543 # Whether or not to optimize for fast installation.
7544 fast_install=$enable_fast_install
7545
7546 # The host system.
7547 host_alias=$host_alias
7548 host=$host
7549
7550 # An echo program that does not interpret backslashes.
7551 echo=$lt_echo
7552
7553 # The archiver.
7554 AR=$lt_AR
7555 AR_FLAGS=$lt_AR_FLAGS
7556
7557 # The default C compiler.
7558 CC=$lt_CC
7559
7560 # Is the compiler the GNU C compiler?
7561 with_gcc=$GCC
7562
7563 # The linker used to build libraries.
7564 LD=$lt_LD
7565
7566 # Whether we need hard or soft links.
7567 LN_S=$lt_LN_S
7568
7569 # A BSD-compatible nm program.
7570 NM=$lt_NM
7571
7572 # A symbol stripping program
7573 STRIP=$STRIP
7574
7575 # Used to examine libraries when file_magic_cmd begins "file"
7576 MAGIC_CMD=$MAGIC_CMD
7577
7578 # Used on cygwin: DLL creation program.
7579 DLLTOOL="$DLLTOOL"
7580
7581 # Used on cygwin: object dumper.
7582 OBJDUMP="$OBJDUMP"
7583
7584 # Used on cygwin: assembler.
7585 AS="$AS"
7586
7587 # The name of the directory that contains temporary libtool files.
7588 objdir=$objdir
7589
7590 # How to create reloadable object files.
7591 reload_flag=$lt_reload_flag
7592 reload_cmds=$lt_reload_cmds
7593
7594 # How to pass a linker flag through the compiler.
7595 wl=$lt_wl
7596
7597 # Object file suffix (normally "o").
7598 objext="$ac_objext"
7599
7600 # Old archive suffix (normally "a").
7601 libext="$libext"
7602
7603 # Executable file suffix (normally "").
7604 exeext="$exeext"
7605
7606 # Additional compiler flags for building library objects.
7607 pic_flag=$lt_pic_flag
7608 pic_mode=$pic_mode
7609
7610 # Does compiler simultaneously support -c and -o options?
7611 compiler_c_o=$lt_compiler_c_o
7612
7613 # Can we write directly to a .lo ?
7614 compiler_o_lo=$lt_compiler_o_lo
7615
7616 # Must we lock files when doing compilation ?
7617 need_locks=$lt_need_locks
7618
7619 # Do we need the lib prefix for modules?
7620 need_lib_prefix=$need_lib_prefix
7621
7622 # Do we need a version for libraries?
7623 need_version=$need_version
7624
7625 # Whether dlopen is supported.
7626 dlopen_support=$enable_dlopen
7627
7628 # Whether dlopen of programs is supported.
7629 dlopen_self=$enable_dlopen_self
7630
7631 # Whether dlopen of statically linked programs is supported.
7632 dlopen_self_static=$enable_dlopen_self_static
7633
7634 # Compiler flag to prevent dynamic linking.
7635 link_static_flag=$lt_link_static_flag
7636
7637 # Compiler flag to turn off builtin functions.
7638 no_builtin_flag=$lt_no_builtin_flag
7639
7640 # Compiler flag to allow reflexive dlopens.
7641 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7642
7643 # Compiler flag to generate shared objects directly from archives.
7644 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7645
7646 # Compiler flag to generate thread-safe objects.
7647 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7648
7649 # Library versioning type.
7650 version_type=$version_type
7651
7652 # Format of library name prefix.
7653 libname_spec=$lt_libname_spec
7654
7655 # List of archive names.  First name is the real one, the rest are links.
7656 # The last name is the one that the linker finds with -lNAME.
7657 library_names_spec=$lt_library_names_spec
7658
7659 # The coded name of the library, if different from the real name.
7660 soname_spec=$lt_soname_spec
7661
7662 # Commands used to build and install an old-style archive.
7663 RANLIB=$lt_RANLIB
7664 old_archive_cmds=$lt_old_archive_cmds
7665 old_postinstall_cmds=$lt_old_postinstall_cmds
7666 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7667
7668 # Create an old-style archive from a shared archive.
7669 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7670
7671 # Create a temporary old-style archive to link instead of a shared archive.
7672 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7673
7674 # Commands used to build and install a shared archive.
7675 archive_cmds=$lt_archive_cmds
7676 archive_expsym_cmds=$lt_archive_expsym_cmds
7677 postinstall_cmds=$lt_postinstall_cmds
7678 postuninstall_cmds=$lt_postuninstall_cmds
7679
7680 # Commands to strip libraries.
7681 old_striplib=$lt_old_striplib
7682 striplib=$lt_striplib
7683
7684 # Method to check whether dependent libraries are shared objects.
7685 deplibs_check_method=$lt_deplibs_check_method
7686
7687 # Command to use when deplibs_check_method == file_magic.
7688 file_magic_cmd=$lt_file_magic_cmd
7689
7690 # Flag that allows shared libraries with undefined symbols to be built.
7691 allow_undefined_flag=$lt_allow_undefined_flag
7692
7693 # Flag that forces no undefined symbols.
7694 no_undefined_flag=$lt_no_undefined_flag
7695
7696 # Commands used to finish a libtool library installation in a directory.
7697 finish_cmds=$lt_finish_cmds
7698
7699 # Same as above, but a single script fragment to be evaled but not shown.
7700 finish_eval=$lt_finish_eval
7701
7702 # Take the output of nm and produce a listing of raw symbols and C names.
7703 global_symbol_pipe=$lt_global_symbol_pipe
7704
7705 # Transform the output of nm in a proper C declaration
7706 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7707
7708 # Transform the output of nm in a C name address pair
7709 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7710
7711 # This is the shared library runtime path variable.
7712 runpath_var=$runpath_var
7713
7714 # This is the shared library path variable.
7715 shlibpath_var=$shlibpath_var
7716
7717 # Is shlibpath searched before the hard-coded library search path?
7718 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7719
7720 # How to hardcode a shared library path into an executable.
7721 hardcode_action=$hardcode_action
7722
7723 # Whether we should hardcode library paths into libraries.
7724 hardcode_into_libs=$hardcode_into_libs
7725
7726 # Flag to hardcode \$libdir into a binary during linking.
7727 # This must work even if \$libdir does not exist.
7728 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7729
7730 # Whether we need a single -rpath flag with a separated argument.
7731 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7732
7733 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7734 # resulting binary.
7735 hardcode_direct=$hardcode_direct
7736
7737 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7738 # resulting binary.
7739 hardcode_minus_L=$hardcode_minus_L
7740
7741 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7742 # the resulting binary.
7743 hardcode_shlibpath_var=$hardcode_shlibpath_var
7744
7745 # Variables whose values should be saved in libtool wrapper scripts and
7746 # restored at relink time.
7747 variables_saved_for_relink="$variables_saved_for_relink"
7748
7749 # Whether libtool must link a program against all its dependency libraries.
7750 link_all_deplibs=$link_all_deplibs
7751
7752 # Compile-time system search path for libraries
7753 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7754
7755 # Run-time system search path for libraries
7756 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7757
7758 # Fix the shell variable \$srcfile for the compiler.
7759 fix_srcfile_path="$fix_srcfile_path"
7760
7761 # Set to yes if exported symbols are required.
7762 always_export_symbols=$always_export_symbols
7763
7764 # The commands to list exported symbols.
7765 export_symbols_cmds=$lt_export_symbols_cmds
7766
7767 # The commands to extract the exported symbol list from a shared archive.
7768 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7769
7770 # Symbols that should not be listed in the preloaded symbols.
7771 exclude_expsyms=$lt_exclude_expsyms
7772
7773 # Symbols that must always be exported.
7774 include_expsyms=$lt_include_expsyms
7775
7776 # ### END LIBTOOL CONFIG
7777
7778 __EOF__
7779
7780   case $host_os in
7781   aix3*)
7782     cat <<\EOF >> "${ofile}T"
7783
7784 # AIX sometimes has problems with the GCC collect2 program.  For some
7785 # reason, if we set the COLLECT_NAMES environment variable, the problems
7786 # vanish in a puff of smoke.
7787 if test "X${COLLECT_NAMES+set}" != Xset; then
7788   COLLECT_NAMES=
7789   export COLLECT_NAMES
7790 fi
7791 EOF
7792     ;;
7793   esac
7794
7795   case $host_os in
7796   cygwin* | mingw* | pw32* | os2*)
7797     cat <<'EOF' >> "${ofile}T"
7798       # This is a source program that is used to create dlls on Windows
7799       # Don't remove nor modify the starting and closing comments
7800 # /* ltdll.c starts here */
7801 # #define WIN32_LEAN_AND_MEAN
7802 # #include <windows.h>
7803 # #undef WIN32_LEAN_AND_MEAN
7804 # #include <stdio.h>
7805 #
7806 # #ifndef __CYGWIN__
7807 # #  ifdef __CYGWIN32__
7808 # #    define __CYGWIN__ __CYGWIN32__
7809 # #  endif
7810 # #endif
7811 #
7812 # #ifdef __cplusplus
7813 # extern "C" {
7814 # #endif
7815 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7816 # #ifdef __cplusplus
7817 # }
7818 # #endif
7819 #
7820 # #ifdef __CYGWIN__
7821 # #include <cygwin/cygwin_dll.h>
7822 # DECLARE_CYGWIN_DLL( DllMain );
7823 # #endif
7824 # HINSTANCE __hDllInstance_base;
7825 #
7826 # BOOL APIENTRY
7827 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7828 # {
7829 #   __hDllInstance_base = hInst;
7830 #   return TRUE;
7831 # }
7832 # /* ltdll.c ends here */
7833         # This is a source program that is used to create import libraries
7834         # on Windows for dlls which lack them. Don't remove nor modify the
7835         # starting and closing comments
7836 # /* impgen.c starts here */
7837 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7838 #
7839 #  This file is part of GNU libtool.
7840 #
7841 #  This program is free software; you can redistribute it and/or modify
7842 #  it under the terms of the GNU General Public License as published by
7843 #  the Free Software Foundation; either version 2 of the License, or
7844 #  (at your option) any later version.
7845 #
7846 #  This program is distributed in the hope that it will be useful,
7847 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7848 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7849 #  GNU General Public License for more details.
7850 #
7851 #  You should have received a copy of the GNU General Public License
7852 #  along with this program; if not, write to the Free Software
7853 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7854 #  */
7855 #
7856 # #include <stdio.h>            /* for printf() */
7857 # #include <unistd.h>           /* for open(), lseek(), read() */
7858 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7859 # #include <string.h>           /* for strdup() */
7860 #
7861 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7862 # #ifndef O_BINARY
7863 # #define O_BINARY 0
7864 # #endif
7865 #
7866 # static unsigned int
7867 # pe_get16 (fd, offset)
7868 #      int fd;
7869 #      int offset;
7870 # {
7871 #   unsigned char b[2];
7872 #   lseek (fd, offset, SEEK_SET);
7873 #   read (fd, b, 2);
7874 #   return b[0] + (b[1]<<8);
7875 # }
7876 #
7877 # static unsigned int
7878 # pe_get32 (fd, offset)
7879 #     int fd;
7880 #     int offset;
7881 # {
7882 #   unsigned char b[4];
7883 #   lseek (fd, offset, SEEK_SET);
7884 #   read (fd, b, 4);
7885 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7886 # }
7887 #
7888 # static unsigned int
7889 # pe_as32 (ptr)
7890 #      void *ptr;
7891 # {
7892 #   unsigned char *b = ptr;
7893 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7894 # }
7895 #
7896 # int
7897 # main (argc, argv)
7898 #     int argc;
7899 #     char *argv[];
7900 # {
7901 #     int dll;
7902 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7903 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7904 #     unsigned long name_rvas, nexp;
7905 #     unsigned char *expdata, *erva;
7906 #     char *filename, *dll_name;
7907 #
7908 #     filename = argv[1];
7909 #
7910 #     dll = open(filename, O_RDONLY|O_BINARY);
7911 #     if (dll < 1)
7912 #       return 1;
7913 #
7914 #     dll_name = filename;
7915 #
7916 #     for (i=0; filename[i]; i++)
7917 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7918 #           dll_name = filename + i +1;
7919 #
7920 #     pe_header_offset = pe_get32 (dll, 0x3c);
7921 #     opthdr_ofs = pe_header_offset + 4 + 20;
7922 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7923 #
7924 #     if (num_entries < 1) /* no exports */
7925 #       return 1;
7926 #
7927 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7928 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7929 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7930 #     secptr = (pe_header_offset + 4 + 20 +
7931 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7932 #
7933 #     expptr = 0;
7934 #     for (i = 0; i < nsections; i++)
7935 #     {
7936 #       char sname[8];
7937 #       unsigned long secptr1 = secptr + 40 * i;
7938 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7939 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7940 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7941 #       lseek(dll, secptr1, SEEK_SET);
7942 #       read(dll, sname, 8);
7943 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7944 #       {
7945 #           expptr = fptr + (export_rva - vaddr);
7946 #           if (export_rva + export_size > vaddr + vsize)
7947 #               export_size = vsize - (export_rva - vaddr);
7948 #           break;
7949 #       }
7950 #     }
7951 #
7952 #     expdata = (unsigned char*)malloc(export_size);
7953 #     lseek (dll, expptr, SEEK_SET);
7954 #     read (dll, expdata, export_size);
7955 #     erva = expdata - export_rva;
7956 #
7957 #     nexp = pe_as32 (expdata+24);
7958 #     name_rvas = pe_as32 (expdata+32);
7959 #
7960 #     printf ("EXPORTS\n");
7961 #     for (i = 0; i<nexp; i++)
7962 #     {
7963 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7964 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7965 #     }
7966 #
7967 #     return 0;
7968 # }
7969 # /* impgen.c ends here */
7970
7971 EOF
7972     ;;
7973   esac
7974
7975   # We use sed instead of cat because bash on DJGPP gets confused if
7976   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7977   # text mode, it properly converts lines to CR/LF.  This bash problem
7978   # is reportedly fixed, but why not run on old versions too?
7979   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7980
7981   mv -f "${ofile}T" "$ofile" || \
7982     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7983   chmod +x "$ofile"
7984 fi
7985
7986
7987
7988
7989
7990 # This can be used to rebuild libtool when needed
7991 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7992
7993 # Always use our own libtool.
7994 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7995
7996 # Prevent multiple expansion
7997
7998
7999
8000 # test for ln hardlink support
8001 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
8002 echo "configure:8003: checking whether ln works" >&5
8003 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
8004   echo $ac_n "(cached) $ac_c" 1>&6
8005 else
8006   rm -f conftest.src conftest.dst
8007 echo "conftest" > conftest.src
8008 if ln conftest.src conftest.dst 2>/dev/null
8009 then
8010   ol_cv_prog_LN_H="ln"
8011 else
8012   ol_cv_prog_LN_H="cp"
8013 fi
8014 rm -f conftest.src conftest.dst
8015
8016 fi
8017 LN_H="$ol_cv_prog_LN_H"
8018 if test "$ol_cv_prog_LN_H" = "ln"; then
8019         echo "$ac_t""yes" 1>&6
8020 else
8021         echo "$ac_t""no" 1>&6
8022 fi
8023
8024 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
8025 echo "configure:8026: checking whether ln -s works" >&5
8026 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
8027   echo $ac_n "(cached) $ac_c" 1>&6
8028 else
8029   rm -f conftestdata
8030 if ln -s X conftestdata 2>/dev/null
8031 then
8032   rm -f conftestdata
8033   ac_cv_prog_LN_S="ln -s"
8034 else
8035   ac_cv_prog_LN_S=ln
8036 fi
8037 fi
8038 LN_S="$ac_cv_prog_LN_S"
8039 if test "$ac_cv_prog_LN_S" = "ln -s"; then
8040   echo "$ac_t""yes" 1>&6
8041 else
8042   echo "$ac_t""no" 1>&6
8043 fi
8044
8045
8046 ol_link_perl=no
8047 if test $ol_enable_perl != no ; then
8048         # Extract the first word of "perl", so it can be a program name with args.
8049 set dummy perl; ac_word=$2
8050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8051 echo "configure:8052: checking for $ac_word" >&5
8052 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
8053   echo $ac_n "(cached) $ac_c" 1>&6
8054 else
8055   case "$PERLBIN" in
8056   /*)
8057   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
8058   ;;
8059   ?:/*)
8060   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
8061   ;;
8062   *)
8063   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8064   ac_dummy="$PATH"
8065   for ac_dir in $ac_dummy; do 
8066     test -z "$ac_dir" && ac_dir=.
8067     if test -f $ac_dir/$ac_word; then
8068       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
8069       break
8070     fi
8071   done
8072   IFS="$ac_save_ifs"
8073   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
8074   ;;
8075 esac
8076 fi
8077 PERLBIN="$ac_cv_path_PERLBIN"
8078 if test -n "$PERLBIN"; then
8079   echo "$ac_t""$PERLBIN" 1>&6
8080 else
8081   echo "$ac_t""no" 1>&6
8082 fi
8083
8084
8085         if test "no$PERLBIN" = "no" ; then
8086                 if test $ol_enable_perl = yes ; then
8087                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
8088                 fi
8089
8090         else
8091                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
8092                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
8093
8094                 if test x"$ol_with_perl_module" = "xstatic" ; then
8095                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
8096                 else
8097                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
8098                 fi
8099                                 ol_link_perl=yes
8100         fi
8101 fi
8102
8103 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8104 echo "configure:8105: checking how to run the C preprocessor" >&5
8105 # On Suns, sometimes $CPP names a directory.
8106 if test -n "$CPP" && test -d "$CPP"; then
8107   CPP=
8108 fi
8109 if test -z "$CPP"; then
8110 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
8111   echo $ac_n "(cached) $ac_c" 1>&6
8112 else
8113     # This must be in double quotes, not single quotes, because CPP may get
8114   # substituted into the Makefile and "${CC-cc}" will confuse make.
8115   CPP="${CC-cc} -E"
8116   # On the NeXT, cc -E runs the code through the compiler's parser,
8117   # not just through cpp.
8118   cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 #include <assert.h>
8122 Syntax Error
8123 EOF
8124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8125 { (eval echo configure:8126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8127 if test -z "$ac_err"; then
8128   :
8129 else
8130   echo "$ac_err" >&5
8131   echo "configure: failed program was:" >&5
8132   cat conftest.$ac_ext >&5
8133   rm -rf conftest*
8134   CPP="${CC-cc} -E -traditional-cpp"
8135   cat > conftest.$ac_ext <<EOF
8136 #line 8137 "configure"
8137 #include "confdefs.h"
8138 #include <assert.h>
8139 Syntax Error
8140 EOF
8141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8142 { (eval echo configure:8143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8144 if test -z "$ac_err"; then
8145   :
8146 else
8147   echo "$ac_err" >&5
8148   echo "configure: failed program was:" >&5
8149   cat conftest.$ac_ext >&5
8150   rm -rf conftest*
8151   CPP="${CC-cc} -nologo -E"
8152   cat > conftest.$ac_ext <<EOF
8153 #line 8154 "configure"
8154 #include "confdefs.h"
8155 #include <assert.h>
8156 Syntax Error
8157 EOF
8158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8159 { (eval echo configure:8160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8161 if test -z "$ac_err"; then
8162   :
8163 else
8164   echo "$ac_err" >&5
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   CPP=/lib/cpp
8169 fi
8170 rm -f conftest*
8171 fi
8172 rm -f conftest*
8173 fi
8174 rm -f conftest*
8175   ac_cv_prog_CPP="$CPP"
8176 fi
8177   CPP="$ac_cv_prog_CPP"
8178 else
8179   ac_cv_prog_CPP="$CPP"
8180 fi
8181 echo "$ac_t""$CPP" 1>&6
8182
8183
8184
8185 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8186 echo "configure:8187: checking for Cygwin environment" >&5
8187 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8188   echo $ac_n "(cached) $ac_c" 1>&6
8189 else
8190   cat > conftest.$ac_ext <<EOF
8191 #line 8192 "configure"
8192 #include "confdefs.h"
8193
8194 int main() {
8195
8196 #ifndef __CYGWIN__
8197 #define __CYGWIN__ __CYGWIN32__
8198 #endif
8199 return __CYGWIN__;
8200 ; return 0; }
8201 EOF
8202 if { (eval echo configure:8203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8203   rm -rf conftest*
8204   ac_cv_cygwin=yes
8205 else
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   ac_cv_cygwin=no
8210 fi
8211 rm -f conftest*
8212 fi
8213
8214 echo "$ac_t""$ac_cv_cygwin" 1>&6
8215 CYGWIN=
8216 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8217 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8218 echo "configure:8219: checking for mingw32 environment" >&5
8219 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8220   echo $ac_n "(cached) $ac_c" 1>&6
8221 else
8222   cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8225
8226 int main() {
8227 return __MINGW32__;
8228 ; return 0; }
8229 EOF
8230 if { (eval echo configure:8231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8231   rm -rf conftest*
8232   ac_cv_mingw32=yes
8233 else
8234   echo "configure: failed program was:" >&5
8235   cat conftest.$ac_ext >&5
8236   rm -rf conftest*
8237   ac_cv_mingw32=no
8238 fi
8239 rm -f conftest*
8240 fi
8241
8242 echo "$ac_t""$ac_cv_mingw32" 1>&6
8243 MINGW32=
8244 test "$ac_cv_mingw32" = yes && MINGW32=yes
8245
8246
8247
8248 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8249 echo "configure:8250: checking for executable suffix" >&5
8250 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8254   ac_cv_exeext=.exe
8255 else
8256   rm -f conftest*
8257   echo 'int main () { return 0; }' > conftest.$ac_ext
8258   ac_cv_exeext=
8259   if { (eval echo configure:8260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8260     for file in conftest.*; do
8261       case $file in
8262       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8263       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8264       esac
8265     done
8266   else
8267     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8268   fi
8269   rm -f conftest*
8270   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8271 fi
8272 fi
8273
8274 EXEEXT=""
8275 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8276 echo "$ac_t""${ac_cv_exeext}" 1>&6
8277 ac_exeext=$EXEEXT
8278
8279 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8280 echo "configure:8281: checking for object suffix" >&5
8281 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   rm -f conftest*
8285 echo 'int i = 1;' > conftest.$ac_ext
8286 if { (eval echo configure:8287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8287   for ac_file in conftest.*; do
8288     case $ac_file in
8289     *.c) ;;
8290     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8291     esac
8292   done
8293 else
8294   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8295 fi
8296 rm -f conftest*
8297 fi
8298
8299 echo "$ac_t""$ac_cv_objext" 1>&6
8300 OBJEXT=$ac_cv_objext
8301 ac_objext=$ac_cv_objext
8302
8303
8304 cat >> confdefs.h <<EOF
8305 #define EXEEXT "${EXEEXT}"
8306 EOF
8307
8308
8309 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8310 echo "configure:8311: checking for be_app in -lbe" >&5
8311 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   ac_save_LIBS="$LIBS"
8316 LIBS="-lbe -lroot -lnet $LIBS"
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char be_app();
8324
8325 int main() {
8326 be_app()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   eval "ac_cv_lib_$ac_lib_var=yes"
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=no"
8337 fi
8338 rm -f conftest*
8339 LIBS="$ac_save_LIBS"
8340
8341 fi
8342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344   LIBS="$LIBS -lbe -lroot -lnet"
8345 else
8346   echo "$ac_t""no" 1>&6
8347 :
8348 fi
8349
8350
8351
8352
8353
8354 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8355 echo "configure:8356: checking for ${CC-cc} option to accept ANSI C" >&5
8356 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   am_cv_prog_cc_stdc=no
8360 ac_save_CC="$CC"
8361 # Don't try gcc -ansi; that turns off useful extensions and
8362 # breaks some systems' header files.
8363 # AIX                   -qlanglvl=ansi
8364 # Ultrix and OSF/1      -std1
8365 # HP-UX 10.20 and later -Ae
8366 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8367 # SVR4                  -Xc -D__EXTENSIONS__
8368 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8369 do
8370   CC="$ac_save_CC $ac_arg"
8371   cat > conftest.$ac_ext <<EOF
8372 #line 8373 "configure"
8373 #include "confdefs.h"
8374 #include <stdarg.h>
8375 #include <stdio.h>
8376 #include <sys/types.h>
8377 #include <sys/stat.h>
8378 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8379 struct buf { int x; };
8380 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8381 static char *e (p, i)
8382      char **p;
8383      int i;
8384 {
8385   return p[i];
8386 }
8387 static char *f (char * (*g) (char **, int), char **p, ...)
8388 {
8389   char *s;
8390   va_list v;
8391   va_start (v,p);
8392   s = g (p, va_arg (v,int));
8393   va_end (v);
8394   return s;
8395 }
8396 int test (int i, double x);
8397 struct s1 {int (*f) (int a);};
8398 struct s2 {int (*f) (double a);};
8399 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8400 int argc;
8401 char **argv;
8402
8403 int main() {
8404
8405 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8406
8407 ; return 0; }
8408 EOF
8409 if { (eval echo configure:8410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8410   rm -rf conftest*
8411   am_cv_prog_cc_stdc="$ac_arg"; break
8412 else
8413   echo "configure: failed program was:" >&5
8414   cat conftest.$ac_ext >&5
8415 fi
8416 rm -f conftest*
8417 done
8418 CC="$ac_save_CC"
8419
8420 fi
8421
8422 if test -z "$am_cv_prog_cc_stdc"; then
8423   echo "$ac_t""none needed" 1>&6
8424 else
8425   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8426 fi
8427 case "x$am_cv_prog_cc_stdc" in
8428   x|xno) ;;
8429   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8430 esac
8431
8432 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8433         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8434 fi
8435
8436 # test for make depend flag
8437 OL_MKDEP=
8438 OL_MKDEP_FLAGS=
8439 if test -z "${MKDEP}"; then
8440         OL_MKDEP="${CC-cc}"
8441         if test -z "${MKDEP_FLAGS}"; then
8442                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8443 echo "configure:8444: checking for ${OL_MKDEP} depend flag" >&5
8444 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8445   echo $ac_n "(cached) $ac_c" 1>&6
8446 else
8447   
8448                         ol_cv_mkdep=no
8449                         for flag in "-M" "-xM"; do
8450                                 cat > conftest.c <<EOF
8451  noCode;
8452 EOF
8453                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8454                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8455                                 then
8456                                         if test ! -f conftest."${ac_object}" ; then
8457                                                 ol_cv_mkdep=$flag
8458                                                 OL_MKDEP_FLAGS="$flag"
8459                                                 break
8460                                         fi
8461                                 fi
8462                         done
8463                         rm -f conftest*
8464                 
8465 fi
8466
8467 echo "$ac_t""$ol_cv_mkdep" 1>&6
8468         else
8469                 cc_cv_mkdep=yes
8470                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8471         fi
8472 else
8473         cc_cv_mkdep=yes
8474         OL_MKDEP="${MKDEP}"
8475         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8476 fi
8477
8478
8479
8480 if test "${ol_cv_mkdep}" = no ; then
8481         # this will soon become an error
8482         echo "configure: warning: do not know how to generate dependencies" 1>&2
8483 fi
8484
8485 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8486 echo "configure:8487: checking for afopen in -ls" >&5
8487 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8489   echo $ac_n "(cached) $ac_c" 1>&6
8490 else
8491   ac_save_LIBS="$LIBS"
8492 LIBS="-ls  $LIBS"
8493 cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* Override any gcc2 internal prototype to avoid an error.  */
8497 /* We use char because int might match the return type of a gcc2
8498     builtin and then its argument prototype would still apply.  */
8499 char afopen();
8500
8501 int main() {
8502 afopen()
8503 ; return 0; }
8504 EOF
8505 if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8506   rm -rf conftest*
8507   eval "ac_cv_lib_$ac_lib_var=yes"
8508 else
8509   echo "configure: failed program was:" >&5
8510   cat conftest.$ac_ext >&5
8511   rm -rf conftest*
8512   eval "ac_cv_lib_$ac_lib_var=no"
8513 fi
8514 rm -f conftest*
8515 LIBS="$ac_save_LIBS"
8516
8517 fi
8518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8519   echo "$ac_t""yes" 1>&6
8520   
8521         AUTH_LIBS=-ls
8522         cat >> confdefs.h <<\EOF
8523 #define HAVE_AIX_SECURITY 1
8524 EOF
8525
8526
8527 else
8528   echo "$ac_t""no" 1>&6
8529 fi
8530
8531
8532 case "$target" in
8533 *-ibm-openedition)
8534         ac_cv_func_getopt=no
8535         cat >> confdefs.h <<\EOF
8536 #define BOTH_STRINGS_H 1
8537 EOF
8538
8539         ;;
8540 esac
8541
8542 ol_link_modules=no
8543 if test $ol_enable_modules != no ; then
8544         for ac_hdr in ltdl.h
8545 do
8546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8548 echo "configure:8549: checking for $ac_hdr" >&5
8549 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8550   echo $ac_n "(cached) $ac_c" 1>&6
8551 else
8552   cat > conftest.$ac_ext <<EOF
8553 #line 8554 "configure"
8554 #include "confdefs.h"
8555 #include <$ac_hdr>
8556 EOF
8557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8558 { (eval echo configure:8559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8560 if test -z "$ac_err"; then
8561   rm -rf conftest*
8562   eval "ac_cv_header_$ac_safe=yes"
8563 else
8564   echo "$ac_err" >&5
8565   echo "configure: failed program was:" >&5
8566   cat conftest.$ac_ext >&5
8567   rm -rf conftest*
8568   eval "ac_cv_header_$ac_safe=no"
8569 fi
8570 rm -f conftest*
8571 fi
8572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8573   echo "$ac_t""yes" 1>&6
8574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8575   cat >> confdefs.h <<EOF
8576 #define $ac_tr_hdr 1
8577 EOF
8578  
8579 else
8580   echo "$ac_t""no" 1>&6
8581 fi
8582 done
8583
8584
8585         if test $ac_cv_header_ltdl_h = no ; then
8586                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8587         fi
8588
8589         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8590 echo "configure:8591: checking for lt_dlinit in -lltdl" >&5
8591 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8592 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8593   echo $ac_n "(cached) $ac_c" 1>&6
8594 else
8595   ac_save_LIBS="$LIBS"
8596 LIBS="-lltdl  $LIBS"
8597 cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8600 /* Override any gcc2 internal prototype to avoid an error.  */
8601 /* We use char because int might match the return type of a gcc2
8602     builtin and then its argument prototype would still apply.  */
8603 char lt_dlinit();
8604
8605 int main() {
8606 lt_dlinit()
8607 ; return 0; }
8608 EOF
8609 if { (eval echo configure:8610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8610   rm -rf conftest*
8611   eval "ac_cv_lib_$ac_lib_var=yes"
8612 else
8613   echo "configure: failed program was:" >&5
8614   cat conftest.$ac_ext >&5
8615   rm -rf conftest*
8616   eval "ac_cv_lib_$ac_lib_var=no"
8617 fi
8618 rm -f conftest*
8619 LIBS="$ac_save_LIBS"
8620
8621 fi
8622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8623   echo "$ac_t""yes" 1>&6
8624   
8625                 MODULES_LIBS=-lltdl
8626                 cat >> confdefs.h <<\EOF
8627 #define HAVE_LIBLTDL 1
8628 EOF
8629
8630         
8631 else
8632   echo "$ac_t""no" 1>&6
8633 fi
8634
8635
8636         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8637                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8638         fi
8639         ol_link_modules=yes
8640
8641 else
8642         ol_with_bdb_module=static
8643         ol_with_dnssrv_module=static
8644         ol_with_hdb_module=static
8645         ol_with_ldap_module=static
8646         ol_with_ldbm_module=static
8647         ol_with_meta_module=static
8648         ol_with_monitor_module=static
8649         ol_with_null_module=static
8650         ol_with_passwd_module=static
8651         ol_with_perl_module=static
8652         ol_with_relay_module=static
8653         ol_with_shell_module=static
8654         ol_with_sql_module=static
8655         if test $ol_enable_chain = mod ; then
8656                 echo "configure: warning: building static chain overlay" 1>&2
8657                 ol_enable_chain=yes
8658         fi
8659         if test $ol_enable_denyop = mod ; then
8660                 echo "configure: warning: building static denyop overlay" 1>&2
8661                 ol_enable_denyop=yes
8662         fi
8663         if test $ol_enable_dyngroup = mod ; then
8664                 echo "configure: warning: building static dyngroup overlay" 1>&2
8665                 ol_enable_dyngroup=yes
8666         fi
8667         if test $ol_enable_ppolicy = mod ; then
8668                 echo "configure: warning: building static ppolicy overlay" 1>&2
8669                 ol_enable_ppolicy=yes
8670         fi
8671         if test $ol_enable_proxycache = mod ; then
8672                 echo "configure: warning: building static proxycache overlay" 1>&2
8673                 ol_enable_proxycache=yes
8674         fi
8675         if test $ol_enable_rwm = mod ; then
8676                 echo "configure: warning: building static rwm overlay" 1>&2
8677                 ol_enable_rwm=yes
8678         fi
8679 fi
8680
8681 # test for EBCDIC
8682 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8683 echo "configure:8684: checking for EBCDIC" >&5
8684 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8685   echo $ac_n "(cached) $ac_c" 1>&6
8686 else
8687   
8688         cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691
8692 #if !('M' == 0xd4)
8693 #include <__ASCII__/generate_error.h>
8694 #endif
8695
8696 EOF
8697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8698 { (eval echo configure:8699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8700 if test -z "$ac_err"; then
8701   rm -rf conftest*
8702   ol_cv_cpp_ebcdic=yes
8703 else
8704   echo "$ac_err" >&5
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   ol_cv_cpp_ebcdic=no
8709 fi
8710 rm -f conftest*
8711 fi
8712
8713 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8714 if test $ol_cv_cpp_ebcdic = yes ; then
8715         cat >> confdefs.h <<\EOF
8716 #define HAVE_EBCDIC 1
8717 EOF
8718
8719 fi
8720
8721 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8722 echo "configure:8723: checking for ANSI C header files" >&5
8723 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8724   echo $ac_n "(cached) $ac_c" 1>&6
8725 else
8726   cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 #include <stdlib.h>
8730 #include <stdarg.h>
8731 #include <string.h>
8732 #include <float.h>
8733 EOF
8734 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8735 { (eval echo configure:8736: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8736 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8737 if test -z "$ac_err"; then
8738   rm -rf conftest*
8739   ol_cv_header_stdc=yes
8740 else
8741   echo "$ac_err" >&5
8742   echo "configure: failed program was:" >&5
8743   cat conftest.$ac_ext >&5
8744   rm -rf conftest*
8745   ol_cv_header_stdc=no
8746 fi
8747 rm -f conftest*
8748
8749 if test $ol_cv_header_stdc = yes; then
8750   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8751 cat > conftest.$ac_ext <<EOF
8752 #line 8753 "configure"
8753 #include "confdefs.h"
8754 #include <string.h>
8755 EOF
8756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8757   egrep "memchr" >/dev/null 2>&1; then
8758   :
8759 else
8760   rm -rf conftest*
8761   ol_cv_header_stdc=no
8762 fi
8763 rm -f conftest*
8764
8765 fi
8766
8767 if test $ol_cv_header_stdc = yes; then
8768   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8769 cat > conftest.$ac_ext <<EOF
8770 #line 8771 "configure"
8771 #include "confdefs.h"
8772 #include <stdlib.h>
8773 EOF
8774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8775   egrep "free" >/dev/null 2>&1; then
8776   :
8777 else
8778   rm -rf conftest*
8779   ol_cv_header_stdc=no
8780 fi
8781 rm -f conftest*
8782
8783 fi
8784
8785 if test $ol_cv_header_stdc = yes; then
8786   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8787 if test "$cross_compiling" = yes; then
8788   :
8789 else
8790   cat > conftest.$ac_ext <<EOF
8791 #line 8792 "configure"
8792 #include "confdefs.h"
8793 #include <ctype.h>
8794 #ifndef HAVE_EBCDIC
8795 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8796 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8797 #else
8798 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8799                 || ('j' <= (c) && (c) <= 'r') \
8800                 || ('s' <= (c) && (c) <= 'z'))
8801 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8802 #endif
8803 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8804 int main () { int i; for (i = 0; i < 256; i++)
8805 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8806 exit (0); }
8807
8808 EOF
8809 if { (eval echo configure:8810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8810 then
8811   :
8812 else
8813   echo "configure: failed program was:" >&5
8814   cat conftest.$ac_ext >&5
8815   rm -fr conftest*
8816   ol_cv_header_stdc=no
8817 fi
8818 rm -fr conftest*
8819 fi
8820
8821 fi
8822 fi
8823
8824 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8825 if test $ol_cv_header_stdc = yes; then
8826   cat >> confdefs.h <<\EOF
8827 #define STDC_HEADERS 1
8828 EOF
8829
8830 fi
8831 ac_cv_header_stdc=disable
8832
8833
8834 if test $ol_cv_header_stdc != yes; then
8835         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8836 fi
8837
8838 ac_header_dirent=no
8839 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8840 do
8841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8842 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8843 echo "configure:8844: checking for $ac_hdr that defines DIR" >&5
8844 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8845   echo $ac_n "(cached) $ac_c" 1>&6
8846 else
8847   cat > conftest.$ac_ext <<EOF
8848 #line 8849 "configure"
8849 #include "confdefs.h"
8850 #include <sys/types.h>
8851 #include <$ac_hdr>
8852 int main() {
8853 DIR *dirp = 0;
8854 ; return 0; }
8855 EOF
8856 if { (eval echo configure:8857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8857   rm -rf conftest*
8858   eval "ac_cv_header_dirent_$ac_safe=yes"
8859 else
8860   echo "configure: failed program was:" >&5
8861   cat conftest.$ac_ext >&5
8862   rm -rf conftest*
8863   eval "ac_cv_header_dirent_$ac_safe=no"
8864 fi
8865 rm -f conftest*
8866 fi
8867 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8868   echo "$ac_t""yes" 1>&6
8869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8870   cat >> confdefs.h <<EOF
8871 #define $ac_tr_hdr 1
8872 EOF
8873  ac_header_dirent=$ac_hdr; break
8874 else
8875   echo "$ac_t""no" 1>&6
8876 fi
8877 done
8878 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8879 if test $ac_header_dirent = dirent.h; then
8880 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8881 echo "configure:8882: checking for opendir in -ldir" >&5
8882 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8884   echo $ac_n "(cached) $ac_c" 1>&6
8885 else
8886   ac_save_LIBS="$LIBS"
8887 LIBS="-ldir  $LIBS"
8888 cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 /* Override any gcc2 internal prototype to avoid an error.  */
8892 /* We use char because int might match the return type of a gcc2
8893     builtin and then its argument prototype would still apply.  */
8894 char opendir();
8895
8896 int main() {
8897 opendir()
8898 ; return 0; }
8899 EOF
8900 if { (eval echo configure:8901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8901   rm -rf conftest*
8902   eval "ac_cv_lib_$ac_lib_var=yes"
8903 else
8904   echo "configure: failed program was:" >&5
8905   cat conftest.$ac_ext >&5
8906   rm -rf conftest*
8907   eval "ac_cv_lib_$ac_lib_var=no"
8908 fi
8909 rm -f conftest*
8910 LIBS="$ac_save_LIBS"
8911
8912 fi
8913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8914   echo "$ac_t""yes" 1>&6
8915   LIBS="$LIBS -ldir"
8916 else
8917   echo "$ac_t""no" 1>&6
8918 fi
8919
8920 else
8921 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8922 echo "configure:8923: checking for opendir in -lx" >&5
8923 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8924 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8925   echo $ac_n "(cached) $ac_c" 1>&6
8926 else
8927   ac_save_LIBS="$LIBS"
8928 LIBS="-lx  $LIBS"
8929 cat > conftest.$ac_ext <<EOF
8930 #line 8931 "configure"
8931 #include "confdefs.h"
8932 /* Override any gcc2 internal prototype to avoid an error.  */
8933 /* We use char because int might match the return type of a gcc2
8934     builtin and then its argument prototype would still apply.  */
8935 char opendir();
8936
8937 int main() {
8938 opendir()
8939 ; return 0; }
8940 EOF
8941 if { (eval echo configure:8942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8942   rm -rf conftest*
8943   eval "ac_cv_lib_$ac_lib_var=yes"
8944 else
8945   echo "configure: failed program was:" >&5
8946   cat conftest.$ac_ext >&5
8947   rm -rf conftest*
8948   eval "ac_cv_lib_$ac_lib_var=no"
8949 fi
8950 rm -f conftest*
8951 LIBS="$ac_save_LIBS"
8952
8953 fi
8954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8955   echo "$ac_t""yes" 1>&6
8956   LIBS="$LIBS -lx"
8957 else
8958   echo "$ac_t""no" 1>&6
8959 fi
8960
8961 fi
8962
8963 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8964 echo "configure:8965: checking for sys/wait.h that is POSIX.1 compatible" >&5
8965 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8966   echo $ac_n "(cached) $ac_c" 1>&6
8967 else
8968   cat > conftest.$ac_ext <<EOF
8969 #line 8970 "configure"
8970 #include "confdefs.h"
8971 #include <sys/types.h>
8972 #include <sys/wait.h>
8973 #ifndef WEXITSTATUS
8974 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8975 #endif
8976 #ifndef WIFEXITED
8977 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8978 #endif
8979 int main() {
8980 int s;
8981 wait (&s);
8982 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8986   rm -rf conftest*
8987   ac_cv_header_sys_wait_h=yes
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   ac_cv_header_sys_wait_h=no
8993 fi
8994 rm -f conftest*
8995 fi
8996
8997 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8998 if test $ac_cv_header_sys_wait_h = yes; then
8999   cat >> confdefs.h <<\EOF
9000 #define HAVE_SYS_WAIT_H 1
9001 EOF
9002
9003 fi
9004
9005 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
9006 echo "configure:9007: checking POSIX termios" >&5
9007 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
9008   echo $ac_n "(cached) $ac_c" 1>&6
9009 else
9010   cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013 #include <sys/types.h>
9014 #include <unistd.h>
9015 #include <termios.h>
9016 int main() {
9017 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9018    tcgetattr(0, 0);
9019 ; return 0; }
9020 EOF
9021 if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9022   rm -rf conftest*
9023   am_cv_sys_posix_termios=yes
9024 else
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -rf conftest*
9028   am_cv_sys_posix_termios=no
9029 fi
9030 rm -f conftest*
9031 fi
9032
9033 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9034
9035
9036  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9037 echo "configure:9038: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9038 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
9039   echo $ac_n "(cached) $ac_c" 1>&6
9040 else
9041   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9042
9043   gwinsz_in_termios_h=no
9044   if test $am_cv_sys_posix_termios = yes; then
9045     cat > conftest.$ac_ext <<EOF
9046 #line 9047 "configure"
9047 #include "confdefs.h"
9048 #include <sys/types.h>
9049 #     include <termios.h>
9050 #     ifdef TIOCGWINSZ
9051         yes
9052 #     endif
9053     
9054 EOF
9055 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9056   egrep "yes" >/dev/null 2>&1; then
9057   rm -rf conftest*
9058   gwinsz_in_termios_h=yes
9059 fi
9060 rm -f conftest*
9061
9062   fi
9063
9064   if test $gwinsz_in_termios_h = no; then
9065     cat > conftest.$ac_ext <<EOF
9066 #line 9067 "configure"
9067 #include "confdefs.h"
9068 #include <sys/types.h>
9069 #     include <sys/ioctl.h>
9070 #     ifdef TIOCGWINSZ
9071         yes
9072 #     endif
9073     
9074 EOF
9075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9076   egrep "yes" >/dev/null 2>&1; then
9077   rm -rf conftest*
9078   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9079 fi
9080 rm -f conftest*
9081
9082   fi
9083   
9084 fi
9085
9086 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9087   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9088     cat >> confdefs.h <<\EOF
9089 #define GWINSZ_IN_SYS_IOCTL 1
9090 EOF
9091
9092   fi
9093
9094 if test $am_cv_sys_posix_termios = yes ; then
9095         cat >> confdefs.h <<\EOF
9096 #define HAVE_POSIX_TERMIOS 1
9097 EOF
9098
9099 fi
9100
9101 for ac_hdr in \
9102         arpa/inet.h             \
9103         arpa/nameser.h  \
9104         assert.h                \
9105         bits/types.h    \
9106         conio.h                 \
9107         crypt.h                 \
9108         direct.h                \
9109         errno.h                 \
9110         fcntl.h                 \
9111         filio.h                 \
9112         getopt.h                \
9113         grp.h                   \
9114         io.h                    \
9115         libutil.h               \
9116         limits.h                \
9117         locale.h                \
9118         netinet/tcp.h   \
9119         malloc.h                \
9120         memory.h                \
9121         psap.h                  \
9122         pwd.h                   \
9123         process.h               \
9124         resolv.h                \
9125         sgtty.h                 \
9126         shadow.h                \
9127         stddef.h                \
9128         string.h                \
9129         strings.h               \
9130         sysexits.h              \
9131         sys/file.h              \
9132         sys/filio.h             \
9133         sys/errno.h             \
9134         sys/ioctl.h             \
9135         sys/param.h             \
9136         sys/resource.h  \
9137         sys/select.h    \
9138         sys/socket.h    \
9139         sys/stat.h              \
9140         sys/syslog.h    \
9141         sys/time.h              \
9142         sys/types.h             \
9143         sys/ucred.h             \
9144         sys/uio.h               \
9145         syslog.h                \
9146         termios.h               \
9147         unistd.h                \
9148         winsock.h               \
9149         winsock2.h              \
9150
9151 do
9152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9154 echo "configure:9155: checking for $ac_hdr" >&5
9155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9156   echo $ac_n "(cached) $ac_c" 1>&6
9157 else
9158   cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161 #include <$ac_hdr>
9162 EOF
9163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9164 { (eval echo configure:9165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9166 if test -z "$ac_err"; then
9167   rm -rf conftest*
9168   eval "ac_cv_header_$ac_safe=yes"
9169 else
9170   echo "$ac_err" >&5
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_header_$ac_safe=no"
9175 fi
9176 rm -f conftest*
9177 fi
9178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9179   echo "$ac_t""yes" 1>&6
9180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9181   cat >> confdefs.h <<EOF
9182 #define $ac_tr_hdr 1
9183 EOF
9184  
9185 else
9186   echo "$ac_t""no" 1>&6
9187 fi
9188 done
9189
9190
9191
9192
9193 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9194 echo "configure:9195: checking for sigset in -lV3" >&5
9195 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9197   echo $ac_n "(cached) $ac_c" 1>&6
9198 else
9199   ac_save_LIBS="$LIBS"
9200 LIBS="-lV3  $LIBS"
9201 cat > conftest.$ac_ext <<EOF
9202 #line 9203 "configure"
9203 #include "confdefs.h"
9204 /* Override any gcc2 internal prototype to avoid an error.  */
9205 /* We use char because int might match the return type of a gcc2
9206     builtin and then its argument prototype would still apply.  */
9207 char sigset();
9208
9209 int main() {
9210 sigset()
9211 ; return 0; }
9212 EOF
9213 if { (eval echo configure:9214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9214   rm -rf conftest*
9215   eval "ac_cv_lib_$ac_lib_var=yes"
9216 else
9217   echo "configure: failed program was:" >&5
9218   cat conftest.$ac_ext >&5
9219   rm -rf conftest*
9220   eval "ac_cv_lib_$ac_lib_var=no"
9221 fi
9222 rm -f conftest*
9223 LIBS="$ac_save_LIBS"
9224
9225 fi
9226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9227   echo "$ac_t""yes" 1>&6
9228     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9229     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9230   cat >> confdefs.h <<EOF
9231 #define $ac_tr_lib 1
9232 EOF
9233
9234   LIBS="-lV3 $LIBS"
9235
9236 else
9237   echo "$ac_t""no" 1>&6
9238 fi
9239
9240
9241 if test "$ac_cv_header_winsock_h" = yes; then
9242 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9243 echo "configure:9244: checking for winsock" >&5
9244 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9245   echo $ac_n "(cached) $ac_c" 1>&6
9246 else
9247   save_LIBS="$LIBS"
9248 for curlib in ws2_32 wsock32; do
9249         LIBS="$LIBS -l$curlib"
9250         cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253 #include <winsock.h>
9254                         
9255 int main() {
9256
9257                         socket(0,0,0);
9258                         select(0,NULL,NULL,NULL,NULL);
9259                         closesocket(0);
9260                         gethostname(NULL,0);
9261                         
9262 ; return 0; }
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9265   rm -rf conftest*
9266   ol_cv_winsock=yes
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -rf conftest*
9271   ol_cv_winsock=no
9272 fi
9273 rm -f conftest*
9274
9275         if test $ol_cv_winsock = yes; then
9276                 cat >> confdefs.h <<\EOF
9277 #define HAVE_WINSOCK 1
9278 EOF
9279
9280                 ac_cv_func_socket=yes
9281                 ac_cv_func_select=yes
9282                 ac_cv_func_closesocket=yes
9283                 ac_cv_func_gethostname=yes
9284                 if test $curlib = ws2_32; then
9285                         ol_cv_winsock=winsock2
9286                         cat >> confdefs.h <<\EOF
9287 #define HAVE_WINSOCK2 1
9288 EOF
9289
9290                 fi
9291                 break
9292         fi
9293         LIBS="$save_LIBS"
9294 done
9295 fi
9296
9297 echo "$ac_t""$ol_cv_winsock" 1>&6
9298 fi
9299
9300
9301 echo $ac_n "checking for socket""... $ac_c" 1>&6
9302 echo "configure:9303: checking for socket" >&5
9303 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9304   echo $ac_n "(cached) $ac_c" 1>&6
9305 else
9306   cat > conftest.$ac_ext <<EOF
9307 #line 9308 "configure"
9308 #include "confdefs.h"
9309 /* System header to define __stub macros and hopefully few prototypes,
9310     which can conflict with char socket(); below.  */
9311 #include <assert.h>
9312 /* Override any gcc2 internal prototype to avoid an error.  */
9313 /* We use char because int might match the return type of a gcc2
9314     builtin and then its argument prototype would still apply.  */
9315 char socket();
9316 char (*f)();
9317
9318 int main() {
9319
9320 /* The GNU C library defines this for functions which it implements
9321     to always fail with ENOSYS.  Some functions are actually named
9322     something starting with __ and the normal name is an alias.  */
9323 #if defined (__stub_socket) || defined (__stub___socket)
9324 choke me
9325 #else
9326 f = socket;
9327 #endif
9328
9329 ; return 0; }
9330 EOF
9331 if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9332   rm -rf conftest*
9333   eval "ac_cv_func_socket=yes"
9334 else
9335   echo "configure: failed program was:" >&5
9336   cat conftest.$ac_ext >&5
9337   rm -rf conftest*
9338   eval "ac_cv_func_socket=no"
9339 fi
9340 rm -f conftest*
9341 fi
9342
9343 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9344   echo "$ac_t""yes" 1>&6
9345   :
9346 else
9347   echo "$ac_t""no" 1>&6
9348         
9349         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9350 echo "configure:9351: checking for main in -lsocket" >&5
9351 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9352 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9353   echo $ac_n "(cached) $ac_c" 1>&6
9354 else
9355   ac_save_LIBS="$LIBS"
9356 LIBS="-lsocket  $LIBS"
9357 cat > conftest.$ac_ext <<EOF
9358 #line 9359 "configure"
9359 #include "confdefs.h"
9360
9361 int main() {
9362 main()
9363 ; return 0; }
9364 EOF
9365 if { (eval echo configure:9366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9366   rm -rf conftest*
9367   eval "ac_cv_lib_$ac_lib_var=yes"
9368 else
9369   echo "configure: failed program was:" >&5
9370   cat conftest.$ac_ext >&5
9371   rm -rf conftest*
9372   eval "ac_cv_lib_$ac_lib_var=no"
9373 fi
9374 rm -f conftest*
9375 LIBS="$ac_save_LIBS"
9376
9377 fi
9378 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9379   echo "$ac_t""yes" 1>&6
9380     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9381     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9382   cat >> confdefs.h <<EOF
9383 #define $ac_tr_lib 1
9384 EOF
9385
9386   LIBS="-lsocket $LIBS"
9387
9388 else
9389   echo "$ac_t""no" 1>&6
9390 fi
9391
9392         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9393 echo "configure:9394: checking for main in -lnet" >&5
9394 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9395 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9396   echo $ac_n "(cached) $ac_c" 1>&6
9397 else
9398   ac_save_LIBS="$LIBS"
9399 LIBS="-lnet  $LIBS"
9400 cat > conftest.$ac_ext <<EOF
9401 #line 9402 "configure"
9402 #include "confdefs.h"
9403
9404 int main() {
9405 main()
9406 ; return 0; }
9407 EOF
9408 if { (eval echo configure:9409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9409   rm -rf conftest*
9410   eval "ac_cv_lib_$ac_lib_var=yes"
9411 else
9412   echo "configure: failed program was:" >&5
9413   cat conftest.$ac_ext >&5
9414   rm -rf conftest*
9415   eval "ac_cv_lib_$ac_lib_var=no"
9416 fi
9417 rm -f conftest*
9418 LIBS="$ac_save_LIBS"
9419
9420 fi
9421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9422   echo "$ac_t""yes" 1>&6
9423     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9424     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9425   cat >> confdefs.h <<EOF
9426 #define $ac_tr_lib 1
9427 EOF
9428
9429   LIBS="-lnet $LIBS"
9430
9431 else
9432   echo "$ac_t""no" 1>&6
9433 fi
9434
9435         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9436 echo "configure:9437: checking for main in -lnsl_s" >&5
9437 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9438 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9439   echo $ac_n "(cached) $ac_c" 1>&6
9440 else
9441   ac_save_LIBS="$LIBS"
9442 LIBS="-lnsl_s  $LIBS"
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446
9447 int main() {
9448 main()
9449 ; return 0; }
9450 EOF
9451 if { (eval echo configure:9452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9452   rm -rf conftest*
9453   eval "ac_cv_lib_$ac_lib_var=yes"
9454 else
9455   echo "configure: failed program was:" >&5
9456   cat conftest.$ac_ext >&5
9457   rm -rf conftest*
9458   eval "ac_cv_lib_$ac_lib_var=no"
9459 fi
9460 rm -f conftest*
9461 LIBS="$ac_save_LIBS"
9462
9463 fi
9464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9465   echo "$ac_t""yes" 1>&6
9466     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9467     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9468   cat >> confdefs.h <<EOF
9469 #define $ac_tr_lib 1
9470 EOF
9471
9472   LIBS="-lnsl_s $LIBS"
9473
9474 else
9475   echo "$ac_t""no" 1>&6
9476 fi
9477
9478         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9479 echo "configure:9480: checking for main in -lnsl" >&5
9480 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9481 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9482   echo $ac_n "(cached) $ac_c" 1>&6
9483 else
9484   ac_save_LIBS="$LIBS"
9485 LIBS="-lnsl  $LIBS"
9486 cat > conftest.$ac_ext <<EOF
9487 #line 9488 "configure"
9488 #include "confdefs.h"
9489
9490 int main() {
9491 main()
9492 ; return 0; }
9493 EOF
9494 if { (eval echo configure:9495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9495   rm -rf conftest*
9496   eval "ac_cv_lib_$ac_lib_var=yes"
9497 else
9498   echo "configure: failed program was:" >&5
9499   cat conftest.$ac_ext >&5
9500   rm -rf conftest*
9501   eval "ac_cv_lib_$ac_lib_var=no"
9502 fi
9503 rm -f conftest*
9504 LIBS="$ac_save_LIBS"
9505
9506 fi
9507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9508   echo "$ac_t""yes" 1>&6
9509     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9510     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9511   cat >> confdefs.h <<EOF
9512 #define $ac_tr_lib 1
9513 EOF
9514
9515   LIBS="-lnsl $LIBS"
9516
9517 else
9518   echo "$ac_t""no" 1>&6
9519 fi
9520
9521         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9522 echo "configure:9523: checking for socket in -linet" >&5
9523 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9524 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9525   echo $ac_n "(cached) $ac_c" 1>&6
9526 else
9527   ac_save_LIBS="$LIBS"
9528 LIBS="-linet  $LIBS"
9529 cat > conftest.$ac_ext <<EOF
9530 #line 9531 "configure"
9531 #include "confdefs.h"
9532 /* Override any gcc2 internal prototype to avoid an error.  */
9533 /* We use char because int might match the return type of a gcc2
9534     builtin and then its argument prototype would still apply.  */
9535 char socket();
9536
9537 int main() {
9538 socket()
9539 ; return 0; }
9540 EOF
9541 if { (eval echo configure:9542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9542   rm -rf conftest*
9543   eval "ac_cv_lib_$ac_lib_var=yes"
9544 else
9545   echo "configure: failed program was:" >&5
9546   cat conftest.$ac_ext >&5
9547   rm -rf conftest*
9548   eval "ac_cv_lib_$ac_lib_var=no"
9549 fi
9550 rm -f conftest*
9551 LIBS="$ac_save_LIBS"
9552
9553 fi
9554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9555   echo "$ac_t""yes" 1>&6
9556     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9557     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9558   cat >> confdefs.h <<EOF
9559 #define $ac_tr_lib 1
9560 EOF
9561
9562   LIBS="-linet $LIBS"
9563
9564 else
9565   echo "$ac_t""no" 1>&6
9566 fi
9567
9568         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9569 echo "configure:9570: checking for main in -lgen" >&5
9570 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9572   echo $ac_n "(cached) $ac_c" 1>&6
9573 else
9574   ac_save_LIBS="$LIBS"
9575 LIBS="-lgen  $LIBS"
9576 cat > conftest.$ac_ext <<EOF
9577 #line 9578 "configure"
9578 #include "confdefs.h"
9579
9580 int main() {
9581 main()
9582 ; return 0; }
9583 EOF
9584 if { (eval echo configure:9585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9585   rm -rf conftest*
9586   eval "ac_cv_lib_$ac_lib_var=yes"
9587 else
9588   echo "configure: failed program was:" >&5
9589   cat conftest.$ac_ext >&5
9590   rm -rf conftest*
9591   eval "ac_cv_lib_$ac_lib_var=no"
9592 fi
9593 rm -f conftest*
9594 LIBS="$ac_save_LIBS"
9595
9596 fi
9597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9598   echo "$ac_t""yes" 1>&6
9599     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9600     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9601   cat >> confdefs.h <<EOF
9602 #define $ac_tr_lib 1
9603 EOF
9604
9605   LIBS="-lgen $LIBS"
9606
9607 else
9608   echo "$ac_t""no" 1>&6
9609 fi
9610
9611
9612 fi
9613
9614
9615 echo $ac_n "checking for select""... $ac_c" 1>&6
9616 echo "configure:9617: checking for select" >&5
9617 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9618   echo $ac_n "(cached) $ac_c" 1>&6
9619 else
9620   cat > conftest.$ac_ext <<EOF
9621 #line 9622 "configure"
9622 #include "confdefs.h"
9623 /* System header to define __stub macros and hopefully few prototypes,
9624     which can conflict with char select(); below.  */
9625 #include <assert.h>
9626 /* Override any gcc2 internal prototype to avoid an error.  */
9627 /* We use char because int might match the return type of a gcc2
9628     builtin and then its argument prototype would still apply.  */
9629 char select();
9630 char (*f)();
9631
9632 int main() {
9633
9634 /* The GNU C library defines this for functions which it implements
9635     to always fail with ENOSYS.  Some functions are actually named
9636     something starting with __ and the normal name is an alias.  */
9637 #if defined (__stub_select) || defined (__stub___select)
9638 choke me
9639 #else
9640 f = select;
9641 #endif
9642
9643 ; return 0; }
9644 EOF
9645 if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9646   rm -rf conftest*
9647   eval "ac_cv_func_select=yes"
9648 else
9649   echo "configure: failed program was:" >&5
9650   cat conftest.$ac_ext >&5
9651   rm -rf conftest*
9652   eval "ac_cv_func_select=no"
9653 fi
9654 rm -f conftest*
9655 fi
9656
9657 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9658   echo "$ac_t""yes" 1>&6
9659   :
9660 else
9661   echo "$ac_t""no" 1>&6
9662 { echo "configure: error: select() required." 1>&2; exit 1; }
9663 fi
9664
9665
9666 if test "${ac_cv_header_winsock_h}" != yes; then
9667                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9668 echo "configure:9669: checking types of arguments for select()" >&5
9669  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9670   echo $ac_n "(cached) $ac_c" 1>&6
9671 else
9672    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9673   echo $ac_n "(cached) $ac_c" 1>&6
9674 else
9675     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9676   echo $ac_n "(cached) $ac_c" 1>&6
9677 else
9678      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9679      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9680       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9681        cat > conftest.$ac_ext <<EOF
9682 #line 9683 "configure"
9683 #include "confdefs.h"
9684 #ifdef HAVE_SYS_TYPES_H
9685 #include <sys/types.h>
9686 #endif
9687 #ifdef HAVE_SYS_TIME_H
9688 #include <sys/time.h>
9689 #endif
9690 #ifdef HAVE_SYS_SELECT_H
9691 #include <sys/select.h>
9692 #endif
9693 #ifdef HAVE_SYS_SOCKET_H
9694 #include <sys/socket.h>
9695 #endif
9696 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);
9697 int main() {
9698
9699 ; return 0; }
9700 EOF
9701 if { (eval echo configure:9702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9702   rm -rf conftest*
9703           ac_not_found=no ; break 3
9704 else
9705   echo "configure: failed program was:" >&5
9706   cat conftest.$ac_ext >&5
9707   rm -rf conftest*
9708   ac_not_found=yes
9709 fi
9710 rm -f conftest*
9711       done
9712      done
9713     done
9714    
9715 fi
9716   
9717 fi
9718  
9719 fi
9720  if test "$ac_not_found" = yes; then
9721   ac_cv_func_select_arg1=int 
9722   ac_cv_func_select_arg234='int *' 
9723   ac_cv_func_select_arg5='struct timeval *'
9724  fi
9725  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9726  cat >> confdefs.h <<EOF
9727 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9728 EOF
9729
9730  cat >> confdefs.h <<EOF
9731 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9732 EOF
9733
9734  cat >> confdefs.h <<EOF
9735 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9736 EOF
9737
9738
9739 fi
9740
9741
9742 for ac_hdr in regex.h 
9743 do
9744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9746 echo "configure:9747: checking for $ac_hdr" >&5
9747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9748   echo $ac_n "(cached) $ac_c" 1>&6
9749 else
9750   cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753 #include <$ac_hdr>
9754 EOF
9755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9756 { (eval echo configure:9757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9758 if test -z "$ac_err"; then
9759   rm -rf conftest*
9760   eval "ac_cv_header_$ac_safe=yes"
9761 else
9762   echo "$ac_err" >&5
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -rf conftest*
9766   eval "ac_cv_header_$ac_safe=no"
9767 fi
9768 rm -f conftest*
9769 fi
9770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9771   echo "$ac_t""yes" 1>&6
9772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9773   cat >> confdefs.h <<EOF
9774 #define $ac_tr_hdr 1
9775 EOF
9776  
9777 else
9778   echo "$ac_t""no" 1>&6
9779 fi
9780 done
9781
9782 if test "$ac_cv_header_regex_h" != yes ; then
9783         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9784 fi
9785
9786 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9787 echo "configure:9788: checking for library containing regfree" >&5
9788 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9789   echo $ac_n "(cached) $ac_c" 1>&6
9790 else
9791   ac_func_search_save_LIBS="$LIBS"
9792 ac_cv_search_regfree="no"
9793 cat > conftest.$ac_ext <<EOF
9794 #line 9795 "configure"
9795 #include "confdefs.h"
9796 /* Override any gcc2 internal prototype to avoid an error.  */
9797 /* We use char because int might match the return type of a gcc2
9798     builtin and then its argument prototype would still apply.  */
9799 char regfree();
9800
9801 int main() {
9802 regfree()
9803 ; return 0; }
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806   rm -rf conftest*
9807   ac_cv_search_regfree="none required"
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811 fi
9812 rm -f conftest*
9813 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9814 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9815 cat > conftest.$ac_ext <<EOF
9816 #line 9817 "configure"
9817 #include "confdefs.h"
9818 /* Override any gcc2 internal prototype to avoid an error.  */
9819 /* We use char because int might match the return type of a gcc2
9820     builtin and then its argument prototype would still apply.  */
9821 char regfree();
9822
9823 int main() {
9824 regfree()
9825 ; return 0; }
9826 EOF
9827 if { (eval echo configure:9828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9828   rm -rf conftest*
9829   ac_cv_search_regfree="-l$ac_lib"
9830 break
9831 else
9832   echo "configure: failed program was:" >&5
9833   cat conftest.$ac_ext >&5
9834 fi
9835 rm -f conftest*
9836 done
9837 LIBS="$ac_func_search_save_LIBS"
9838 fi
9839
9840 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9841 if test "$ac_cv_search_regfree" != "no"; then
9842   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9843   :
9844 else :
9845   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9846 fi
9847
9848
9849 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9850 echo "configure:9851: checking for compatible POSIX regex" >&5
9851 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9852   echo $ac_n "(cached) $ac_c" 1>&6
9853 else
9854   
9855         if test "$cross_compiling" = yes; then
9856   ol_cv_c_posix_regex=cross
9857 else
9858   cat > conftest.$ac_ext <<EOF
9859 #line 9860 "configure"
9860 #include "confdefs.h"
9861
9862 #include <sys/types.h>
9863 #include <regex.h>
9864 static char *pattern, *string;
9865 main()
9866 {
9867         int rc;
9868         regex_t re;
9869
9870         pattern = "^A";
9871
9872         if(regcomp(&re, pattern, 0)) {
9873                 return -1;
9874         }
9875         
9876         string = "ALL MATCH";
9877         
9878         rc = regexec(&re, string, 0, (void*)0, 0);
9879
9880         regfree(&re);
9881
9882         return rc;
9883 }
9884 EOF
9885 if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9886 then
9887   ol_cv_c_posix_regex=yes
9888 else
9889   echo "configure: failed program was:" >&5
9890   cat conftest.$ac_ext >&5
9891   rm -fr conftest*
9892   ol_cv_c_posix_regex=no
9893 fi
9894 rm -fr conftest*
9895 fi
9896
9897 fi
9898
9899 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9900
9901 if test "$ol_cv_c_posix_regex" = no ; then
9902         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9903 fi
9904
9905
9906 have_uuid=no
9907 for ac_hdr in sys/uuid.h
9908 do
9909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9911 echo "configure:9912: checking for $ac_hdr" >&5
9912 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9913   echo $ac_n "(cached) $ac_c" 1>&6
9914 else
9915   cat > conftest.$ac_ext <<EOF
9916 #line 9917 "configure"
9917 #include "confdefs.h"
9918 #include <$ac_hdr>
9919 EOF
9920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9921 { (eval echo configure:9922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9923 if test -z "$ac_err"; then
9924   rm -rf conftest*
9925   eval "ac_cv_header_$ac_safe=yes"
9926 else
9927   echo "$ac_err" >&5
9928   echo "configure: failed program was:" >&5
9929   cat conftest.$ac_ext >&5
9930   rm -rf conftest*
9931   eval "ac_cv_header_$ac_safe=no"
9932 fi
9933 rm -f conftest*
9934 fi
9935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9936   echo "$ac_t""yes" 1>&6
9937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9938   cat >> confdefs.h <<EOF
9939 #define $ac_tr_hdr 1
9940 EOF
9941  
9942 else
9943   echo "$ac_t""no" 1>&6
9944 fi
9945 done
9946
9947 if test $ac_cv_header_sys_uuid_h = yes ; then
9948         save_LIBS="$LIBS"
9949         
9950 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9951 echo "configure:9952: checking for library containing uuid_to_str" >&5
9952 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9953   echo $ac_n "(cached) $ac_c" 1>&6
9954 else
9955   ac_func_search_save_LIBS="$LIBS"
9956 ac_cv_search_uuid_to_str="no"
9957 cat > conftest.$ac_ext <<EOF
9958 #line 9959 "configure"
9959 #include "confdefs.h"
9960 /* Override any gcc2 internal prototype to avoid an error.  */
9961 /* We use char because int might match the return type of a gcc2
9962     builtin and then its argument prototype would still apply.  */
9963 char uuid_to_str();
9964
9965 int main() {
9966 uuid_to_str()
9967 ; return 0; }
9968 EOF
9969 if { (eval echo configure:9970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9970   rm -rf conftest*
9971   ac_cv_search_uuid_to_str="none required"
9972 else
9973   echo "configure: failed program was:" >&5
9974   cat conftest.$ac_ext >&5
9975 fi
9976 rm -f conftest*
9977 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9978 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9979 cat > conftest.$ac_ext <<EOF
9980 #line 9981 "configure"
9981 #include "confdefs.h"
9982 /* Override any gcc2 internal prototype to avoid an error.  */
9983 /* We use char because int might match the return type of a gcc2
9984     builtin and then its argument prototype would still apply.  */
9985 char uuid_to_str();
9986
9987 int main() {
9988 uuid_to_str()
9989 ; return 0; }
9990 EOF
9991 if { (eval echo configure:9992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9992   rm -rf conftest*
9993   ac_cv_search_uuid_to_str="-l$ac_lib"
9994 break
9995 else
9996   echo "configure: failed program was:" >&5
9997   cat conftest.$ac_ext >&5
9998 fi
9999 rm -f conftest*
10000 done
10001 LIBS="$ac_func_search_save_LIBS"
10002 fi
10003
10004 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10005 if test "$ac_cv_search_uuid_to_str" != "no"; then
10006   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10007   have_uuid=yes
10008 else :
10009   :
10010 fi
10011         LIBS="$save_LIBS"
10012
10013         if test have_uuid = yes ; then
10014                 cat >> confdefs.h <<\EOF
10015 #define HAVE_UUID_TO_STR 1
10016 EOF
10017
10018
10019                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10020                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10021         fi
10022 fi
10023
10024 if test $have_uuid = no ; then
10025         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10026 echo "configure:10027: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10027         save_LIBS="$LIBS"
10028         LIBS="$LIBS -lrpcrt4"
10029         cat > conftest.$ac_ext <<EOF
10030 #line 10031 "configure"
10031 #include "confdefs.h"
10032
10033                 int __stdcall UuidCreate(void *);
10034                 int __stdcall UuidToStringA(void *,void **);
10035                 
10036 int main() {
10037
10038                 UuidCreate(0);
10039                 UuidToStringA(0,0);
10040                 
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10044   rm -rf conftest*
10045   need_rpcrt=yes
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   need_rpcrt=no
10051 fi
10052 rm -f conftest*
10053         if test $need_rpcrt = yes; then
10054                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10055         fi
10056         LIBS="$save_LIBS"
10057         echo "$ac_t""$need_rpcrt" 1>&6
10058 fi
10059
10060 ol_link_dnssrv=no
10061 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10062 echo "configure:10063: checking for res_query" >&5
10063 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10064   echo $ac_n "(cached) $ac_c" 1>&6
10065 else
10066   cat > conftest.$ac_ext <<EOF
10067 #line 10068 "configure"
10068 #include "confdefs.h"
10069 /* System header to define __stub macros and hopefully few prototypes,
10070     which can conflict with char res_query(); below.  */
10071 #include <assert.h>
10072 /* Override any gcc2 internal prototype to avoid an error.  */
10073 /* We use char because int might match the return type of a gcc2
10074     builtin and then its argument prototype would still apply.  */
10075 char res_query();
10076 char (*f)();
10077
10078 int main() {
10079
10080 /* The GNU C library defines this for functions which it implements
10081     to always fail with ENOSYS.  Some functions are actually named
10082     something starting with __ and the normal name is an alias.  */
10083 #if defined (__stub_res_query) || defined (__stub___res_query)
10084 choke me
10085 #else
10086 f = res_query;
10087 #endif
10088
10089 ; return 0; }
10090 EOF
10091 if { (eval echo configure:10092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10092   rm -rf conftest*
10093   eval "ac_cv_func_res_query=yes"
10094 else
10095   echo "configure: failed program was:" >&5
10096   cat conftest.$ac_ext >&5
10097   rm -rf conftest*
10098   eval "ac_cv_func_res_query=no"
10099 fi
10100 rm -f conftest*
10101 fi
10102
10103 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10104   echo "$ac_t""yes" 1>&6
10105   :
10106 else
10107   echo "$ac_t""no" 1>&6
10108 fi
10109
10110 if test $ac_cv_func_res_query = no ; then 
10111         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10112 echo "configure:10113: checking for __res_query" >&5
10113 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10114   echo $ac_n "(cached) $ac_c" 1>&6
10115 else
10116   cat > conftest.$ac_ext <<EOF
10117 #line 10118 "configure"
10118 #include "confdefs.h"
10119 /* System header to define __stub macros and hopefully few prototypes,
10120     which can conflict with char __res_query(); below.  */
10121 #include <assert.h>
10122 /* Override any gcc2 internal prototype to avoid an error.  */
10123 /* We use char because int might match the return type of a gcc2
10124     builtin and then its argument prototype would still apply.  */
10125 char __res_query();
10126 char (*f)();
10127
10128 int main() {
10129
10130 /* The GNU C library defines this for functions which it implements
10131     to always fail with ENOSYS.  Some functions are actually named
10132     something starting with __ and the normal name is an alias.  */
10133 #if defined (__stub___res_query) || defined (__stub_____res_query)
10134 choke me
10135 #else
10136 f = __res_query;
10137 #endif
10138
10139 ; return 0; }
10140 EOF
10141 if { (eval echo configure:10142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10142   rm -rf conftest*
10143   eval "ac_cv_func___res_query=yes"
10144 else
10145   echo "configure: failed program was:" >&5
10146   cat conftest.$ac_ext >&5
10147   rm -rf conftest*
10148   eval "ac_cv_func___res_query=no"
10149 fi
10150 rm -f conftest*
10151 fi
10152
10153 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10154   echo "$ac_t""yes" 1>&6
10155   :
10156 else
10157   echo "$ac_t""no" 1>&6
10158 fi
10159
10160         ac_cv_func_res_query=$ac_cv_func___res_query
10161 fi
10162
10163 if test $ac_cv_func_res_query = no ; then 
10164         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10165 echo "configure:10166: checking for res_query in -lbind" >&5
10166 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10168   echo $ac_n "(cached) $ac_c" 1>&6
10169 else
10170   ac_save_LIBS="$LIBS"
10171 LIBS="-lbind  $LIBS"
10172 cat > conftest.$ac_ext <<EOF
10173 #line 10174 "configure"
10174 #include "confdefs.h"
10175 /* Override any gcc2 internal prototype to avoid an error.  */
10176 /* We use char because int might match the return type of a gcc2
10177     builtin and then its argument prototype would still apply.  */
10178 char res_query();
10179
10180 int main() {
10181 res_query()
10182 ; return 0; }
10183 EOF
10184 if { (eval echo configure:10185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10185   rm -rf conftest*
10186   eval "ac_cv_lib_$ac_lib_var=yes"
10187 else
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -rf conftest*
10191   eval "ac_cv_lib_$ac_lib_var=no"
10192 fi
10193 rm -f conftest*
10194 LIBS="$ac_save_LIBS"
10195
10196 fi
10197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10198   echo "$ac_t""yes" 1>&6
10199     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10200     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10201   cat >> confdefs.h <<EOF
10202 #define $ac_tr_lib 1
10203 EOF
10204
10205   LIBS="-lbind $LIBS"
10206
10207 else
10208   echo "$ac_t""no" 1>&6
10209 fi
10210
10211         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10212 fi
10213
10214 if test $ac_cv_func_res_query = no ; then 
10215         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10216 echo "configure:10217: checking for __res_query in -lbind" >&5
10217 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10219   echo $ac_n "(cached) $ac_c" 1>&6
10220 else
10221   ac_save_LIBS="$LIBS"
10222 LIBS="-lbind  $LIBS"
10223 cat > conftest.$ac_ext <<EOF
10224 #line 10225 "configure"
10225 #include "confdefs.h"
10226 /* Override any gcc2 internal prototype to avoid an error.  */
10227 /* We use char because int might match the return type of a gcc2
10228     builtin and then its argument prototype would still apply.  */
10229 char __res_query();
10230
10231 int main() {
10232 __res_query()
10233 ; return 0; }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10236   rm -rf conftest*
10237   eval "ac_cv_lib_$ac_lib_var=yes"
10238 else
10239   echo "configure: failed program was:" >&5
10240   cat conftest.$ac_ext >&5
10241   rm -rf conftest*
10242   eval "ac_cv_lib_$ac_lib_var=no"
10243 fi
10244 rm -f conftest*
10245 LIBS="$ac_save_LIBS"
10246
10247 fi
10248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10249   echo "$ac_t""yes" 1>&6
10250     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10251     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10252   cat >> confdefs.h <<EOF
10253 #define $ac_tr_lib 1
10254 EOF
10255
10256   LIBS="-lbind $LIBS"
10257
10258 else
10259   echo "$ac_t""no" 1>&6
10260 fi
10261
10262         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10263 fi
10264
10265 if test $ac_cv_func_res_query = no ; then 
10266         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10267 echo "configure:10268: checking for res_query in -lresolv" >&5
10268 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10269 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10270   echo $ac_n "(cached) $ac_c" 1>&6
10271 else
10272   ac_save_LIBS="$LIBS"
10273 LIBS="-lresolv  $LIBS"
10274 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277 /* Override any gcc2 internal prototype to avoid an error.  */
10278 /* We use char because int might match the return type of a gcc2
10279     builtin and then its argument prototype would still apply.  */
10280 char res_query();
10281
10282 int main() {
10283 res_query()
10284 ; return 0; }
10285 EOF
10286 if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10287   rm -rf conftest*
10288   eval "ac_cv_lib_$ac_lib_var=yes"
10289 else
10290   echo "configure: failed program was:" >&5
10291   cat conftest.$ac_ext >&5
10292   rm -rf conftest*
10293   eval "ac_cv_lib_$ac_lib_var=no"
10294 fi
10295 rm -f conftest*
10296 LIBS="$ac_save_LIBS"
10297
10298 fi
10299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10300   echo "$ac_t""yes" 1>&6
10301     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10302     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10303   cat >> confdefs.h <<EOF
10304 #define $ac_tr_lib 1
10305 EOF
10306
10307   LIBS="-lresolv $LIBS"
10308
10309 else
10310   echo "$ac_t""no" 1>&6
10311 fi
10312
10313         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10314 fi
10315
10316 if test $ac_cv_func_res_query = no ; then 
10317         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10318 echo "configure:10319: checking for __res_query in -lresolv" >&5
10319 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10321   echo $ac_n "(cached) $ac_c" 1>&6
10322 else
10323   ac_save_LIBS="$LIBS"
10324 LIBS="-lresolv  $LIBS"
10325 cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 /* Override any gcc2 internal prototype to avoid an error.  */
10329 /* We use char because int might match the return type of a gcc2
10330     builtin and then its argument prototype would still apply.  */
10331 char __res_query();
10332
10333 int main() {
10334 __res_query()
10335 ; return 0; }
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10338   rm -rf conftest*
10339   eval "ac_cv_lib_$ac_lib_var=yes"
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -rf conftest*
10344   eval "ac_cv_lib_$ac_lib_var=no"
10345 fi
10346 rm -f conftest*
10347 LIBS="$ac_save_LIBS"
10348
10349 fi
10350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10351   echo "$ac_t""yes" 1>&6
10352     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10353     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10354   cat >> confdefs.h <<EOF
10355 #define $ac_tr_lib 1
10356 EOF
10357
10358   LIBS="-lresolv $LIBS"
10359
10360 else
10361   echo "$ac_t""no" 1>&6
10362 fi
10363
10364         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10365 fi
10366
10367 if test "$ac_cv_func_res_query" = yes ; then
10368         cat >> confdefs.h <<\EOF
10369 #define HAVE_RES_QUERY 1
10370 EOF
10371
10372
10373         if test $ol_enable_dnssrv != no ; then
10374                 ol_link_dnssrv=yes
10375         fi
10376 fi
10377
10378 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10379         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10380 fi
10381
10382 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10383 do
10384 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10385 echo "configure:10386: checking for $ac_func" >&5
10386 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10387   echo $ac_n "(cached) $ac_c" 1>&6
10388 else
10389   cat > conftest.$ac_ext <<EOF
10390 #line 10391 "configure"
10391 #include "confdefs.h"
10392 /* System header to define __stub macros and hopefully few prototypes,
10393     which can conflict with char $ac_func(); below.  */
10394 #include <assert.h>
10395 /* Override any gcc2 internal prototype to avoid an error.  */
10396 /* We use char because int might match the return type of a gcc2
10397     builtin and then its argument prototype would still apply.  */
10398 char $ac_func();
10399 char (*f)();
10400
10401 int main() {
10402
10403 /* The GNU C library defines this for functions which it implements
10404     to always fail with ENOSYS.  Some functions are actually named
10405     something starting with __ and the normal name is an alias.  */
10406 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10407 choke me
10408 #else
10409 f = $ac_func;
10410 #endif
10411
10412 ; return 0; }
10413 EOF
10414 if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10415   rm -rf conftest*
10416   eval "ac_cv_func_$ac_func=yes"
10417 else
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -rf conftest*
10421   eval "ac_cv_func_$ac_func=no"
10422 fi
10423 rm -f conftest*
10424 fi
10425
10426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10427   echo "$ac_t""yes" 1>&6
10428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10429   cat >> confdefs.h <<EOF
10430 #define $ac_tr_func 1
10431 EOF
10432  
10433 else
10434   echo "$ac_t""no" 1>&6
10435 fi
10436 done
10437
10438
10439 ol_link_ipv6=no
10440 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10441         if test $ol_enable_ipv6 = yes ; then
10442                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10443         fi
10444 elif test $ol_enable_ipv6 != no ; then
10445         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10446 echo "configure:10447: checking INET6_ADDRSTRLEN" >&5
10447 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10448   echo $ac_n "(cached) $ac_c" 1>&6
10449 else
10450   
10451                 cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454
10455 #                       include <netinet/in.h>
10456 #                       ifdef INET6_ADDRSTRLEN
10457                                 __has_inet6_addrstrlen__;
10458 #                       endif
10459                 
10460 EOF
10461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10462   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10463   rm -rf conftest*
10464   ol_cv_inet6_addrstrlen=yes
10465 else
10466   rm -rf conftest*
10467   ol_cv_inet6_addrstrlen=no
10468 fi
10469 rm -f conftest*
10470
10471 fi
10472
10473 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10474
10475
10476         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10477 echo "configure:10478: checking struct sockaddr_storage" >&5
10478 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10479   echo $ac_n "(cached) $ac_c" 1>&6
10480 else
10481   
10482                 cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485
10486 #include <sys/types.h>
10487 #include <sys/socket.h>
10488
10489 int main() {
10490
10491                         struct sockaddr_storage ss;
10492
10493 ; return 0; }
10494 EOF
10495 if { (eval echo configure:10496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10496   rm -rf conftest*
10497   ol_cv_struct_sockaddr_storage=yes
10498 else
10499   echo "configure: failed program was:" >&5
10500   cat conftest.$ac_ext >&5
10501   rm -rf conftest*
10502   ol_cv_struct_sockaddr_storage=no
10503 fi
10504 rm -f conftest*
10505 fi
10506
10507 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10508
10509         if test $ol_cv_inet6_addrstrlen = yes \
10510                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10511                 ol_link_ipv6=yes
10512         elif test $ol_enable_ipv6 = yes \
10513                         -a $ol_cv_inet6_addrstrlen = no ; then
10514                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10515         elif test $ol_enable_ipv6 = yes \
10516                         -a $ol_cv_struct_sockaddr_storage = no ; then
10517                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10518         fi
10519 fi
10520
10521 if test $ol_enable_local != no ; then
10522         for ac_hdr in sys/un.h 
10523 do
10524 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10525 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10526 echo "configure:10527: checking for $ac_hdr" >&5
10527 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10528   echo $ac_n "(cached) $ac_c" 1>&6
10529 else
10530   cat > conftest.$ac_ext <<EOF
10531 #line 10532 "configure"
10532 #include "confdefs.h"
10533 #include <$ac_hdr>
10534 EOF
10535 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10536 { (eval echo configure:10537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10537 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10538 if test -z "$ac_err"; then
10539   rm -rf conftest*
10540   eval "ac_cv_header_$ac_safe=yes"
10541 else
10542   echo "$ac_err" >&5
10543   echo "configure: failed program was:" >&5
10544   cat conftest.$ac_ext >&5
10545   rm -rf conftest*
10546   eval "ac_cv_header_$ac_safe=no"
10547 fi
10548 rm -f conftest*
10549 fi
10550 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10551   echo "$ac_t""yes" 1>&6
10552     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10553   cat >> confdefs.h <<EOF
10554 #define $ac_tr_hdr 1
10555 EOF
10556  
10557 else
10558   echo "$ac_t""no" 1>&6
10559 fi
10560 done
10561
10562
10563         if test $ol_enable_local = auto ; then
10564                 ol_enable_local=$ac_cv_header_sys_un_h
10565         elif test $ac_cv_header_sys_un_h = no ; then
10566                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10567         fi
10568 fi
10569
10570 ol_link_kbind=no
10571 ol_link_krb5=no
10572 ol_link_krb4=no
10573
10574 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10575         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10576         -o $ol_with_kerberos = k425 ; then
10577
10578         for ac_hdr in krb5.h
10579 do
10580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10582 echo "configure:10583: checking for $ac_hdr" >&5
10583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10584   echo $ac_n "(cached) $ac_c" 1>&6
10585 else
10586   cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589 #include <$ac_hdr>
10590 EOF
10591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10592 { (eval echo configure:10593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10594 if test -z "$ac_err"; then
10595   rm -rf conftest*
10596   eval "ac_cv_header_$ac_safe=yes"
10597 else
10598   echo "$ac_err" >&5
10599   echo "configure: failed program was:" >&5
10600   cat conftest.$ac_ext >&5
10601   rm -rf conftest*
10602   eval "ac_cv_header_$ac_safe=no"
10603 fi
10604 rm -f conftest*
10605 fi
10606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10607   echo "$ac_t""yes" 1>&6
10608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10609   cat >> confdefs.h <<EOF
10610 #define $ac_tr_hdr 1
10611 EOF
10612  
10613 else
10614   echo "$ac_t""no" 1>&6
10615 fi
10616 done
10617
10618
10619         if test $ac_cv_header_krb5_h = yes ; then
10620                                 for ac_hdr in heim_err.h
10621 do
10622 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10623 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10624 echo "configure:10625: checking for $ac_hdr" >&5
10625 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 #include <$ac_hdr>
10632 EOF
10633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10634 { (eval echo configure:10635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10636 if test -z "$ac_err"; then
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=yes"
10639 else
10640   echo "$ac_err" >&5
10641   echo "configure: failed program was:" >&5
10642   cat conftest.$ac_ext >&5
10643   rm -rf conftest*
10644   eval "ac_cv_header_$ac_safe=no"
10645 fi
10646 rm -f conftest*
10647 fi
10648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10649   echo "$ac_t""yes" 1>&6
10650     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10651   cat >> confdefs.h <<EOF
10652 #define $ac_tr_hdr 1
10653 EOF
10654  
10655 else
10656   echo "$ac_t""no" 1>&6
10657 fi
10658 done
10659
10660                 if test $ac_cv_header_heim_err_h = yes ; then
10661                         krb5_impl=heimdal
10662                 else
10663                         krb5_impl=mit
10664                 fi
10665
10666                 if test $krb5_impl = mit; then
10667                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10668 echo "configure:10669: checking for main in -lk5crypto" >&5
10669 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10670 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10671   echo $ac_n "(cached) $ac_c" 1>&6
10672 else
10673   ac_save_LIBS="$LIBS"
10674 LIBS="-lk5crypto  $LIBS"
10675 cat > conftest.$ac_ext <<EOF
10676 #line 10677 "configure"
10677 #include "confdefs.h"
10678
10679 int main() {
10680 main()
10681 ; return 0; }
10682 EOF
10683 if { (eval echo configure:10684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10684   rm -rf conftest*
10685   eval "ac_cv_lib_$ac_lib_var=yes"
10686 else
10687   echo "configure: failed program was:" >&5
10688   cat conftest.$ac_ext >&5
10689   rm -rf conftest*
10690   eval "ac_cv_lib_$ac_lib_var=no"
10691 fi
10692 rm -f conftest*
10693 LIBS="$ac_save_LIBS"
10694
10695 fi
10696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10697   echo "$ac_t""yes" 1>&6
10698   krb5crypto=k5crypto
10699 else
10700   echo "$ac_t""no" 1>&6
10701 krb5crypto=crypto
10702 fi
10703
10704
10705                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10706 echo "configure:10707: checking for main in -lkrb5" >&5
10707 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10708 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10709   echo $ac_n "(cached) $ac_c" 1>&6
10710 else
10711   ac_save_LIBS="$LIBS"
10712 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10713 cat > conftest.$ac_ext <<EOF
10714 #line 10715 "configure"
10715 #include "confdefs.h"
10716
10717 int main() {
10718 main()
10719 ; return 0; }
10720 EOF
10721 if { (eval echo configure:10722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10722   rm -rf conftest*
10723   eval "ac_cv_lib_$ac_lib_var=yes"
10724 else
10725   echo "configure: failed program was:" >&5
10726   cat conftest.$ac_ext >&5
10727   rm -rf conftest*
10728   eval "ac_cv_lib_$ac_lib_var=no"
10729 fi
10730 rm -f conftest*
10731 LIBS="$ac_save_LIBS"
10732
10733 fi
10734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10735   echo "$ac_t""yes" 1>&6
10736   have_krb5=yes
10737                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10738 else
10739   echo "$ac_t""no" 1>&6
10740 have_krb5=no
10741 fi
10742
10743
10744                 elif test $krb5_impl = heimdal; then
10745                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10746 echo "configure:10747: checking for main in -ldes" >&5
10747 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10748 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10749   echo $ac_n "(cached) $ac_c" 1>&6
10750 else
10751   ac_save_LIBS="$LIBS"
10752 LIBS="-ldes  $LIBS"
10753 cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756
10757 int main() {
10758 main()
10759 ; return 0; }
10760 EOF
10761 if { (eval echo configure:10762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10762   rm -rf conftest*
10763   eval "ac_cv_lib_$ac_lib_var=yes"
10764 else
10765   echo "configure: failed program was:" >&5
10766   cat conftest.$ac_ext >&5
10767   rm -rf conftest*
10768   eval "ac_cv_lib_$ac_lib_var=no"
10769 fi
10770 rm -f conftest*
10771 LIBS="$ac_save_LIBS"
10772
10773 fi
10774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10775   echo "$ac_t""yes" 1>&6
10776   krb5crypto=des
10777 else
10778   echo "$ac_t""no" 1>&6
10779 krb5crypto=crypto
10780 fi
10781
10782
10783                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10784 echo "configure:10785: checking for main in -lkrb5" >&5
10785 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10787   echo $ac_n "(cached) $ac_c" 1>&6
10788 else
10789   ac_save_LIBS="$LIBS"
10790 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10791 cat > conftest.$ac_ext <<EOF
10792 #line 10793 "configure"
10793 #include "confdefs.h"
10794
10795 int main() {
10796 main()
10797 ; return 0; }
10798 EOF
10799 if { (eval echo configure:10800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10800   rm -rf conftest*
10801   eval "ac_cv_lib_$ac_lib_var=yes"
10802 else
10803   echo "configure: failed program was:" >&5
10804   cat conftest.$ac_ext >&5
10805   rm -rf conftest*
10806   eval "ac_cv_lib_$ac_lib_var=no"
10807 fi
10808 rm -f conftest*
10809 LIBS="$ac_save_LIBS"
10810
10811 fi
10812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10813   echo "$ac_t""yes" 1>&6
10814   have_krb5=yes
10815                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10816 else
10817   echo "$ac_t""no" 1>&6
10818 have_krb5=no
10819 fi
10820
10821
10822                         cat >> confdefs.h <<\EOF
10823 #define HAVE_HEIMDAL_KERBEROS 1
10824 EOF
10825
10826
10827                 else
10828                         have_krb5=no
10829                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10830                 fi
10831
10832                 if test $have_krb5 = yes ; then
10833                         ol_link_krb5=yes
10834
10835                         cat >> confdefs.h <<\EOF
10836 #define HAVE_KRB5 1
10837 EOF
10838
10839
10840                         if test $ol_with_kerberos = k5only ; then
10841                                 ol_with_kerberos=found
10842                         fi
10843
10844                 elif test $ol_with_kerberos != auto ; then
10845                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10846                 fi
10847
10848         fi
10849 fi
10850
10851 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10852         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10853
10854         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10855 do
10856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10858 echo "configure:10859: checking for $ac_hdr" >&5
10859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10860   echo $ac_n "(cached) $ac_c" 1>&6
10861 else
10862   cat > conftest.$ac_ext <<EOF
10863 #line 10864 "configure"
10864 #include "confdefs.h"
10865 #include <$ac_hdr>
10866 EOF
10867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10868 { (eval echo configure:10869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10870 if test -z "$ac_err"; then
10871   rm -rf conftest*
10872   eval "ac_cv_header_$ac_safe=yes"
10873 else
10874   echo "$ac_err" >&5
10875   echo "configure: failed program was:" >&5
10876   cat conftest.$ac_ext >&5
10877   rm -rf conftest*
10878   eval "ac_cv_header_$ac_safe=no"
10879 fi
10880 rm -f conftest*
10881 fi
10882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10883   echo "$ac_t""yes" 1>&6
10884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10885   cat >> confdefs.h <<EOF
10886 #define $ac_tr_hdr 1
10887 EOF
10888  
10889 else
10890   echo "$ac_t""no" 1>&6
10891 fi
10892 done
10893
10894
10895         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10896                 if test $krb5_impl = mit; then
10897                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10898 echo "configure:10899: checking for main in -lkrb4" >&5
10899 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10900 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10901   echo $ac_n "(cached) $ac_c" 1>&6
10902 else
10903   ac_save_LIBS="$LIBS"
10904 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10905 cat > conftest.$ac_ext <<EOF
10906 #line 10907 "configure"
10907 #include "confdefs.h"
10908
10909 int main() {
10910 main()
10911 ; return 0; }
10912 EOF
10913 if { (eval echo configure:10914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10914   rm -rf conftest*
10915   eval "ac_cv_lib_$ac_lib_var=yes"
10916 else
10917   echo "configure: failed program was:" >&5
10918   cat conftest.$ac_ext >&5
10919   rm -rf conftest*
10920   eval "ac_cv_lib_$ac_lib_var=no"
10921 fi
10922 rm -f conftest*
10923 LIBS="$ac_save_LIBS"
10924
10925 fi
10926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10927   echo "$ac_t""yes" 1>&6
10928   have_k425=yes
10929                                 KRB4_LIBS="-lkrb4 -ldes425"
10930 else
10931   echo "$ac_t""no" 1>&6
10932 have_k425=no
10933 fi
10934
10935
10936                 elif test $krb5_impl = heimdal; then
10937                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10938 echo "configure:10939: checking for main in -lkrb4" >&5
10939 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10941   echo $ac_n "(cached) $ac_c" 1>&6
10942 else
10943   ac_save_LIBS="$LIBS"
10944 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10945 cat > conftest.$ac_ext <<EOF
10946 #line 10947 "configure"
10947 #include "confdefs.h"
10948
10949 int main() {
10950 main()
10951 ; return 0; }
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10954   rm -rf conftest*
10955   eval "ac_cv_lib_$ac_lib_var=yes"
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -rf conftest*
10960   eval "ac_cv_lib_$ac_lib_var=no"
10961 fi
10962 rm -f conftest*
10963 LIBS="$ac_save_LIBS"
10964
10965 fi
10966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968   have_k425=yes
10969                                 KRB4_LIBS="-lkrb4"
10970 else
10971   echo "$ac_t""no" 1>&6
10972 have_k425=no
10973 fi
10974
10975
10976                 else
10977                         have_425=no
10978                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10979                 fi
10980
10981                 if test $have_k425 = yes ; then
10982                         ol_with_kerberos=found
10983                         ol_link_krb4=yes
10984
10985                         cat >> confdefs.h <<\EOF
10986 #define HAVE_KRB425 1
10987 EOF
10988
10989                         cat >> confdefs.h <<\EOF
10990 #define HAVE_KRB4 1
10991 EOF
10992
10993
10994                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10995 echo "configure:10996: checking for des_debug in Kerberos libraries" >&5
10996 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10997   echo $ac_n "(cached) $ac_c" 1>&6
10998 else
10999   
11000                                                                 save_LIBS="$LIBS"
11001                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11002                                 cat > conftest.$ac_ext <<EOF
11003 #line 11004 "configure"
11004 #include "confdefs.h"
11005
11006 #include <kerberosIV/krb.h>
11007 #include <kerberosIV/des.h>
11008 extern int des_debug;
11009
11010 int main() {
11011
11012 des_debug = 1;
11013
11014 ; return 0; }
11015 EOF
11016 if { (eval echo configure:11017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11017   rm -rf conftest*
11018   ol_cv_var_des_debug=yes
11019 else
11020   echo "configure: failed program was:" >&5
11021   cat conftest.$ac_ext >&5
11022   rm -rf conftest*
11023   ol_cv_var_des_debug=no
11024 fi
11025 rm -f conftest*
11026                                                                 LIBS="$save_LIBS"
11027                         
11028 fi
11029
11030 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11031
11032                         if test $ol_cv_var_des_debug = yes ; then
11033                                 cat >> confdefs.h <<\EOF
11034 #define HAVE_DES_DEBUG 1
11035 EOF
11036
11037                         fi
11038
11039                         LIBS="$save_LIBS"
11040                 fi
11041         fi
11042 fi
11043
11044 if test $ol_link_krb5 = yes ; then
11045         ol_with_kerberos=found
11046 fi
11047
11048 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11049         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11050
11051         for ac_hdr in krb.h des.h krb-archaeology.h 
11052 do
11053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11055 echo "configure:11056: checking for $ac_hdr" >&5
11056 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11057   echo $ac_n "(cached) $ac_c" 1>&6
11058 else
11059   cat > conftest.$ac_ext <<EOF
11060 #line 11061 "configure"
11061 #include "confdefs.h"
11062 #include <$ac_hdr>
11063 EOF
11064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11065 { (eval echo configure:11066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11066 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11067 if test -z "$ac_err"; then
11068   rm -rf conftest*
11069   eval "ac_cv_header_$ac_safe=yes"
11070 else
11071   echo "$ac_err" >&5
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   eval "ac_cv_header_$ac_safe=no"
11076 fi
11077 rm -f conftest*
11078 fi
11079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11080   echo "$ac_t""yes" 1>&6
11081     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11082   cat >> confdefs.h <<EOF
11083 #define $ac_tr_hdr 1
11084 EOF
11085  
11086 else
11087   echo "$ac_t""no" 1>&6
11088 fi
11089 done
11090
11091
11092         if test $ac_cv_header_krb_h = yes ; then
11093                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11094 echo "configure:11095: checking for main in -lkrb" >&5
11095 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11096 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11097   echo $ac_n "(cached) $ac_c" 1>&6
11098 else
11099   ac_save_LIBS="$LIBS"
11100 LIBS="-lkrb -ldes $LIBS"
11101 cat > conftest.$ac_ext <<EOF
11102 #line 11103 "configure"
11103 #include "confdefs.h"
11104
11105 int main() {
11106 main()
11107 ; return 0; }
11108 EOF
11109 if { (eval echo configure:11110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11110   rm -rf conftest*
11111   eval "ac_cv_lib_$ac_lib_var=yes"
11112 else
11113   echo "configure: failed program was:" >&5
11114   cat conftest.$ac_ext >&5
11115   rm -rf conftest*
11116   eval "ac_cv_lib_$ac_lib_var=no"
11117 fi
11118 rm -f conftest*
11119 LIBS="$ac_save_LIBS"
11120
11121 fi
11122 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11123   echo "$ac_t""yes" 1>&6
11124   have_k4=yes
11125 else
11126   echo "$ac_t""no" 1>&6
11127 have_k4=no
11128 fi
11129
11130
11131                 if test $have_k4 = yes ; then
11132                         ol_with_kerberos=found
11133                         ol_link_krb4=yes
11134
11135                         cat >> confdefs.h <<\EOF
11136 #define HAVE_KRB4 1
11137 EOF
11138
11139
11140                         KRB4_LIBS="-lkrb -ldes"
11141
11142                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11143                                 cat >> confdefs.h <<\EOF
11144 #define HAVE_KTH_KERBEROS 1
11145 EOF
11146
11147                         fi
11148                 fi
11149         fi
11150 fi
11151
11152 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11153         ol_link_kbind=yes
11154
11155 elif test $ol_enable_kbind = yes ; then
11156         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11157 fi
11158
11159 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11160         cat >> confdefs.h <<\EOF
11161 #define HAVE_KERBEROS 1
11162 EOF
11163
11164
11165 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11166         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11167 fi
11168
11169 ol_link_tls=no
11170 if test $ol_with_tls != no ; then
11171         for ac_hdr in openssl/ssl.h ssl.h
11172 do
11173 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11174 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11175 echo "configure:11176: checking for $ac_hdr" >&5
11176 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11177   echo $ac_n "(cached) $ac_c" 1>&6
11178 else
11179   cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182 #include <$ac_hdr>
11183 EOF
11184 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11185 { (eval echo configure:11186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11186 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11187 if test -z "$ac_err"; then
11188   rm -rf conftest*
11189   eval "ac_cv_header_$ac_safe=yes"
11190 else
11191   echo "$ac_err" >&5
11192   echo "configure: failed program was:" >&5
11193   cat conftest.$ac_ext >&5
11194   rm -rf conftest*
11195   eval "ac_cv_header_$ac_safe=no"
11196 fi
11197 rm -f conftest*
11198 fi
11199 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11200   echo "$ac_t""yes" 1>&6
11201     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11202   cat >> confdefs.h <<EOF
11203 #define $ac_tr_hdr 1
11204 EOF
11205  
11206 else
11207   echo "$ac_t""no" 1>&6
11208 fi
11209 done
11210
11211         
11212         if test $ac_cv_header_openssl_ssl_h = yes \
11213                 -o $ac_cv_header_ssl_h = yes ; then
11214                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11215 echo "configure:11216: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11216 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11218   echo $ac_n "(cached) $ac_c" 1>&6
11219 else
11220   ac_save_LIBS="$LIBS"
11221 LIBS="-lssl -lcrypto $LIBS"
11222 cat > conftest.$ac_ext <<EOF
11223 #line 11224 "configure"
11224 #include "confdefs.h"
11225 /* Override any gcc2 internal prototype to avoid an error.  */
11226 /* We use char because int might match the return type of a gcc2
11227     builtin and then its argument prototype would still apply.  */
11228 char SSLeay_add_ssl_algorithms();
11229
11230 int main() {
11231 SSLeay_add_ssl_algorithms()
11232 ; return 0; }
11233 EOF
11234 if { (eval echo configure:11235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11235   rm -rf conftest*
11236   eval "ac_cv_lib_$ac_lib_var=yes"
11237 else
11238   echo "configure: failed program was:" >&5
11239   cat conftest.$ac_ext >&5
11240   rm -rf conftest*
11241   eval "ac_cv_lib_$ac_lib_var=no"
11242 fi
11243 rm -f conftest*
11244 LIBS="$ac_save_LIBS"
11245
11246 fi
11247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249   have_ssleay=yes
11250                         need_rsaref=no
11251 else
11252   echo "$ac_t""no" 1>&6
11253 have_ssleay=no
11254 fi
11255
11256                         
11257                 if test $have_ssleay = no ; then
11258                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11259 echo "configure:11260: checking for SSL_library_init in -lssl" >&5
11260 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11261 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11262   echo $ac_n "(cached) $ac_c" 1>&6
11263 else
11264   ac_save_LIBS="$LIBS"
11265 LIBS="-lssl -lcrypto $LIBS"
11266 cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 /* Override any gcc2 internal prototype to avoid an error.  */
11270 /* We use char because int might match the return type of a gcc2
11271     builtin and then its argument prototype would still apply.  */
11272 char SSL_library_init();
11273
11274 int main() {
11275 SSL_library_init()
11276 ; return 0; }
11277 EOF
11278 if { (eval echo configure:11279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11279   rm -rf conftest*
11280   eval "ac_cv_lib_$ac_lib_var=yes"
11281 else
11282   echo "configure: failed program was:" >&5
11283   cat conftest.$ac_ext >&5
11284   rm -rf conftest*
11285   eval "ac_cv_lib_$ac_lib_var=no"
11286 fi
11287 rm -f conftest*
11288 LIBS="$ac_save_LIBS"
11289
11290 fi
11291 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11292   echo "$ac_t""yes" 1>&6
11293   have_ssleay=yes
11294                                 need_rsaref=no
11295 else
11296   echo "$ac_t""no" 1>&6
11297 have_ssleay=no
11298 fi
11299
11300                 fi
11301
11302                 if test $have_ssleay = no ; then
11303                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11304 echo "configure:11305: checking for ssl3_accept in -lssl" >&5
11305 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11306 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11307   echo $ac_n "(cached) $ac_c" 1>&6
11308 else
11309   ac_save_LIBS="$LIBS"
11310 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11311 cat > conftest.$ac_ext <<EOF
11312 #line 11313 "configure"
11313 #include "confdefs.h"
11314 /* Override any gcc2 internal prototype to avoid an error.  */
11315 /* We use char because int might match the return type of a gcc2
11316     builtin and then its argument prototype would still apply.  */
11317 char ssl3_accept();
11318
11319 int main() {
11320 ssl3_accept()
11321 ; return 0; }
11322 EOF
11323 if { (eval echo configure:11324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11324   rm -rf conftest*
11325   eval "ac_cv_lib_$ac_lib_var=yes"
11326 else
11327   echo "configure: failed program was:" >&5
11328   cat conftest.$ac_ext >&5
11329   rm -rf conftest*
11330   eval "ac_cv_lib_$ac_lib_var=no"
11331 fi
11332 rm -f conftest*
11333 LIBS="$ac_save_LIBS"
11334
11335 fi
11336 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11337   echo "$ac_t""yes" 1>&6
11338   have_ssleay=yes
11339                                 need_rsaref=yes
11340 else
11341   echo "$ac_t""no" 1>&6
11342 have_ssleay=no
11343 fi
11344
11345                 fi
11346
11347                 if test $have_ssleay = yes ; then
11348                         ol_with_tls=found
11349                         ol_link_tls=yes
11350
11351                         cat >> confdefs.h <<\EOF
11352 #define HAVE_SSLEAY 1
11353 EOF
11354
11355
11356                         if test $need_rsaref = yes; then
11357                                 cat >> confdefs.h <<\EOF
11358 #define HAVE_RSAREF 1
11359 EOF
11360
11361
11362                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11363                         else
11364                                 TLS_LIBS="-lssl -lcrypto"
11365                         fi
11366                 fi
11367         fi
11368
11369 else
11370         echo "configure: warning: TLS data protection not supported!" 1>&2
11371 fi
11372
11373 WITH_TLS=no
11374 if test $ol_link_tls = yes ; then
11375         cat >> confdefs.h <<\EOF
11376 #define HAVE_TLS 1
11377 EOF
11378
11379         WITH_TLS=yes
11380
11381 elif test $ol_with_tls = auto ; then
11382         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11383         echo "configure: warning: TLS data protection not supported!" 1>&2
11384
11385 elif test $ol_with_tls != no ; then
11386         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11387 fi
11388
11389 if test $ol_enable_lmpasswd != no; then
11390         if test $ol_link_tls != yes ; then
11391                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11392         fi
11393
11394         cat >> confdefs.h <<\EOF
11395 #define SLAPD_LMHASH 1
11396 EOF
11397
11398 fi
11399
11400 ol_link_threads=no
11401
11402 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11403         -o $ol_with_threads = nt ; then
11404
11405         
11406         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11407 echo "configure:11408: checking for _beginthread" >&5
11408 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11409   echo $ac_n "(cached) $ac_c" 1>&6
11410 else
11411   cat > conftest.$ac_ext <<EOF
11412 #line 11413 "configure"
11413 #include "confdefs.h"
11414 /* System header to define __stub macros and hopefully few prototypes,
11415     which can conflict with char _beginthread(); below.  */
11416 #include <assert.h>
11417 /* Override any gcc2 internal prototype to avoid an error.  */
11418 /* We use char because int might match the return type of a gcc2
11419     builtin and then its argument prototype would still apply.  */
11420 char _beginthread();
11421 char (*f)();
11422
11423 int main() {
11424
11425 /* The GNU C library defines this for functions which it implements
11426     to always fail with ENOSYS.  Some functions are actually named
11427     something starting with __ and the normal name is an alias.  */
11428 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11429 choke me
11430 #else
11431 f = _beginthread;
11432 #endif
11433
11434 ; return 0; }
11435 EOF
11436 if { (eval echo configure:11437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11437   rm -rf conftest*
11438   eval "ac_cv_func__beginthread=yes"
11439 else
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   eval "ac_cv_func__beginthread=no"
11444 fi
11445 rm -f conftest*
11446 fi
11447
11448 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11449   echo "$ac_t""yes" 1>&6
11450   :
11451 else
11452   echo "$ac_t""no" 1>&6
11453 fi
11454
11455
11456         if test $ac_cv_func__beginthread = yes ; then
11457                 cat >> confdefs.h <<\EOF
11458 #define HAVE_NT_THREADS 1
11459 EOF
11460
11461                 ol_cv_nt_threads=yes
11462         fi
11463
11464
11465         if test "$ol_cv_nt_threads" = yes ; then
11466                 ol_link_threads=nt
11467                 ol_with_threads=found
11468                 ol_with_yielding_select=yes
11469
11470                 cat >> confdefs.h <<\EOF
11471 #define HAVE_NT_SERVICE_MANAGER 1
11472 EOF
11473
11474                 cat >> confdefs.h <<\EOF
11475 #define HAVE_NT_EVENT_LOG 1
11476 EOF
11477
11478         fi
11479
11480         if test $ol_with_threads = nt ; then
11481                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11482         fi
11483 fi
11484
11485 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11486         -o $ol_with_threads = posix ; then
11487
11488         for ac_hdr in pthread.h
11489 do
11490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11492 echo "configure:11493: checking for $ac_hdr" >&5
11493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11494   echo $ac_n "(cached) $ac_c" 1>&6
11495 else
11496   cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499 #include <$ac_hdr>
11500 EOF
11501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11502 { (eval echo configure:11503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11504 if test -z "$ac_err"; then
11505   rm -rf conftest*
11506   eval "ac_cv_header_$ac_safe=yes"
11507 else
11508   echo "$ac_err" >&5
11509   echo "configure: failed program was:" >&5
11510   cat conftest.$ac_ext >&5
11511   rm -rf conftest*
11512   eval "ac_cv_header_$ac_safe=no"
11513 fi
11514 rm -f conftest*
11515 fi
11516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11517   echo "$ac_t""yes" 1>&6
11518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11519   cat >> confdefs.h <<EOF
11520 #define $ac_tr_hdr 1
11521 EOF
11522  
11523 else
11524   echo "$ac_t""no" 1>&6
11525 fi
11526 done
11527
11528
11529         if test $ac_cv_header_pthread_h = yes ; then
11530                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11531 echo "configure:11532: checking POSIX thread version" >&5
11532 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11533   echo $ac_n "(cached) $ac_c" 1>&6
11534 else
11535   
11536         cat > conftest.$ac_ext <<EOF
11537 #line 11538 "configure"
11538 #include "confdefs.h"
11539
11540 #               include <pthread.h>
11541         
11542 int main() {
11543
11544                 int i = PTHREAD_CREATE_JOINABLE;
11545         
11546 ; return 0; }
11547 EOF
11548 if { (eval echo configure:11549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11549   rm -rf conftest*
11550   
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_detach" >/dev/null 2>&1; then
11558   rm -rf conftest*
11559   ol_cv_pthread_version=10
11560 else
11561   rm -rf conftest*
11562   ol_cv_pthread_version=8
11563 fi
11564 rm -f conftest*
11565
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   
11571         cat > conftest.$ac_ext <<EOF
11572 #line 11573 "configure"
11573 #include "confdefs.h"
11574
11575 #               include <pthread.h>
11576 #               ifdef PTHREAD_CREATE_UNDETACHED
11577                 draft7
11578 #               endif
11579         
11580 EOF
11581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11582   egrep "draft7" >/dev/null 2>&1; then
11583   rm -rf conftest*
11584   ol_cv_pthread_version=7
11585 else
11586   rm -rf conftest*
11587   
11588         cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591 #include <pthread.h>
11592 EOF
11593 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11594   egrep "pthread_attr_init" >/dev/null 2>&1; then
11595   rm -rf conftest*
11596   ol_cv_pthread_version=6
11597 else
11598   rm -rf conftest*
11599   
11600         cat > conftest.$ac_ext <<EOF
11601 #line 11602 "configure"
11602 #include "confdefs.h"
11603
11604 #               include <pthread.h>
11605 #ifdef          PTHREAD_MUTEX_INITIALIZER
11606                 draft5
11607 #endif
11608         
11609 EOF
11610 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11611   egrep "draft5" >/dev/null 2>&1; then
11612   rm -rf conftest*
11613   ol_cv_pthread_version=5
11614 else
11615   rm -rf conftest*
11616   ol_cv_pthread_version=4
11617 fi
11618 rm -f conftest*
11619  
11620 fi
11621 rm -f conftest*
11622  
11623 fi
11624 rm -f conftest*
11625  
11626 fi
11627 rm -f conftest*
11628
11629 fi
11630
11631 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11632
11633
11634                 if test $ol_cv_pthread_version != 0 ; then
11635                         cat >> confdefs.h <<EOF
11636 #define HAVE_PTHREADS $ol_cv_pthread_version
11637 EOF
11638
11639                 else
11640                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11641                 fi
11642
11643                 # consider threads found
11644                 ol_with_threads=found
11645
11646                 
11647         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11648 echo "configure:11649: checking for LinuxThreads pthread.h" >&5
11649 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11650   echo $ac_n "(cached) $ac_c" 1>&6
11651 else
11652   cat > conftest.$ac_ext <<EOF
11653 #line 11654 "configure"
11654 #include "confdefs.h"
11655 #include <pthread.h>
11656 EOF
11657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11658   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11659   rm -rf conftest*
11660   ol_cv_header_linux_threads=yes
11661 else
11662   rm -rf conftest*
11663   ol_cv_header_linux_threads=no
11664 fi
11665 rm -f conftest*
11666
11667                 
11668 fi
11669
11670 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11671         if test $ol_cv_header_linux_threads = yes; then
11672                 cat >> confdefs.h <<\EOF
11673 #define HAVE_LINUX_THREADS 1
11674 EOF
11675
11676         fi
11677
11678                 
11679         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11680 echo "configure:11681: checking for GNU Pth pthread.h" >&5
11681 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11682   echo $ac_n "(cached) $ac_c" 1>&6
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687 #include <pthread.h>
11688 #ifdef _POSIX_THREAD_IS_GNU_PTH
11689         __gnu_pth__;
11690 #endif
11691
11692 EOF
11693 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11694   egrep "__gnu_pth__" >/dev/null 2>&1; then
11695   rm -rf conftest*
11696   ol_cv_header_gnu_pth_pthread_h=yes
11697 else
11698   rm -rf conftest*
11699   ol_cv_header_gnu_pth_pthread_h=no
11700 fi
11701 rm -f conftest*
11702
11703                 
11704 fi
11705
11706 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11707
11708
11709                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11710                         for ac_hdr in sched.h
11711 do
11712 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11713 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11714 echo "configure:11715: checking for $ac_hdr" >&5
11715 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11716   echo $ac_n "(cached) $ac_c" 1>&6
11717 else
11718   cat > conftest.$ac_ext <<EOF
11719 #line 11720 "configure"
11720 #include "confdefs.h"
11721 #include <$ac_hdr>
11722 EOF
11723 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11724 { (eval echo configure:11725: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11725 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11726 if test -z "$ac_err"; then
11727   rm -rf conftest*
11728   eval "ac_cv_header_$ac_safe=yes"
11729 else
11730   echo "$ac_err" >&5
11731   echo "configure: failed program was:" >&5
11732   cat conftest.$ac_ext >&5
11733   rm -rf conftest*
11734   eval "ac_cv_header_$ac_safe=no"
11735 fi
11736 rm -f conftest*
11737 fi
11738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11739   echo "$ac_t""yes" 1>&6
11740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11741   cat >> confdefs.h <<EOF
11742 #define $ac_tr_hdr 1
11743 EOF
11744  
11745 else
11746   echo "$ac_t""no" 1>&6
11747 fi
11748 done
11749
11750                 fi
11751
11752                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11753                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11754 echo "configure:11755: checking for pthread_create in default libraries" >&5
11755 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11756   echo $ac_n "(cached) $ac_c" 1>&6
11757 else
11758   
11759                 if test "$cross_compiling" = yes; then
11760   cat > conftest.$ac_ext <<EOF
11761 #line 11762 "configure"
11762 #include "confdefs.h"
11763 /* pthread test headers */
11764 #include <pthread.h>
11765 #if HAVE_PTHREADS < 7
11766 #include <errno.h>
11767 #endif
11768 #ifndef NULL
11769 #define NULL (void*)0
11770 #endif
11771
11772 static void *task(p)
11773         void *p;
11774 {
11775         return (void *) (p == NULL);
11776 }
11777
11778 int main() {
11779
11780         /* pthread test function */
11781 #ifndef PTHREAD_CREATE_DETACHED
11782 #define PTHREAD_CREATE_DETACHED 1
11783 #endif
11784         pthread_t t;
11785         int status;
11786         int detach = PTHREAD_CREATE_DETACHED;
11787
11788 #if HAVE_PTHREADS > 4
11789         /* Final pthreads */
11790         pthread_attr_t attr;
11791
11792         status = pthread_attr_init(&attr);
11793         if( status ) return status;
11794
11795 #if HAVE_PTHREADS < 7
11796         status = pthread_attr_setdetachstate(&attr, &detach);
11797         if( status < 0 ) status = errno;
11798 #else
11799         status = pthread_attr_setdetachstate(&attr, detach);
11800 #endif
11801         if( status ) return status;
11802         status = pthread_create( &t, &attr, task, NULL );
11803 #if HAVE_PTHREADS < 7
11804         if( status < 0 ) status = errno;
11805 #endif
11806         if( status ) return status;
11807 #else
11808         /* Draft 4 pthreads */
11809         status = pthread_create( &t, pthread_attr_default, task, NULL );
11810         if( status ) return errno;
11811
11812         /* give thread a chance to complete */
11813         /* it should remain joinable and hence detachable */
11814         sleep( 1 );
11815
11816         status = pthread_detach( &t );
11817         if( status ) return errno;
11818 #endif
11819
11820 #ifdef HAVE_LINUX_THREADS
11821         pthread_kill_other_threads_np();
11822 #endif
11823
11824         return 0;
11825
11826 ; return 0; }
11827 EOF
11828 if { (eval echo configure:11829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11829   rm -rf conftest*
11830   ol_cv_pthread_create=yes
11831 else
11832   echo "configure: failed program was:" >&5
11833   cat conftest.$ac_ext >&5
11834   rm -rf conftest*
11835   ol_cv_pthread_create=no
11836 fi
11837 rm -f conftest*
11838 else
11839   cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842 /* pthread test headers */
11843 #include <pthread.h>
11844 #if HAVE_PTHREADS < 7
11845 #include <errno.h>
11846 #endif
11847 #ifndef NULL
11848 #define NULL (void*)0
11849 #endif
11850
11851 static void *task(p)
11852         void *p;
11853 {
11854         return (void *) (p == NULL);
11855 }
11856
11857
11858 int main(argc, argv)
11859         int argc;
11860         char **argv;
11861 {
11862
11863         /* pthread test function */
11864 #ifndef PTHREAD_CREATE_DETACHED
11865 #define PTHREAD_CREATE_DETACHED 1
11866 #endif
11867         pthread_t t;
11868         int status;
11869         int detach = PTHREAD_CREATE_DETACHED;
11870
11871 #if HAVE_PTHREADS > 4
11872         /* Final pthreads */
11873         pthread_attr_t attr;
11874
11875         status = pthread_attr_init(&attr);
11876         if( status ) return status;
11877
11878 #if HAVE_PTHREADS < 7
11879         status = pthread_attr_setdetachstate(&attr, &detach);
11880         if( status < 0 ) status = errno;
11881 #else
11882         status = pthread_attr_setdetachstate(&attr, detach);
11883 #endif
11884         if( status ) return status;
11885         status = pthread_create( &t, &attr, task, NULL );
11886 #if HAVE_PTHREADS < 7
11887         if( status < 0 ) status = errno;
11888 #endif
11889         if( status ) return status;
11890 #else
11891         /* Draft 4 pthreads */
11892         status = pthread_create( &t, pthread_attr_default, task, NULL );
11893         if( status ) return errno;
11894
11895         /* give thread a chance to complete */
11896         /* it should remain joinable and hence detachable */
11897         sleep( 1 );
11898
11899         status = pthread_detach( &t );
11900         if( status ) return errno;
11901 #endif
11902
11903 #ifdef HAVE_LINUX_THREADS
11904         pthread_kill_other_threads_np();
11905 #endif
11906
11907         return 0;
11908
11909 }
11910
11911 EOF
11912 if { (eval echo configure:11913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11913 then
11914   ol_cv_pthread_create=yes
11915 else
11916   echo "configure: failed program was:" >&5
11917   cat conftest.$ac_ext >&5
11918   rm -fr conftest*
11919   ol_cv_pthread_create=no
11920 fi
11921 rm -fr conftest*
11922 fi
11923
11924 fi
11925
11926 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11927
11928                 if test $ol_cv_pthread_create != no ; then
11929                         ol_link_threads=posix
11930                         ol_link_pthreads=""
11931                 fi
11932                 
11933                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11934 if test "$ol_link_threads" = no ; then
11935         # try -kthread
11936         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11937 echo "configure:11938: checking for pthread link with -kthread" >&5
11938 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11939   echo $ac_n "(cached) $ac_c" 1>&6
11940 else
11941   
11942                 # save the flags
11943                 ol_LIBS="$LIBS"
11944                 LIBS="-kthread $LIBS"
11945
11946                 if test "$cross_compiling" = yes; then
11947   cat > conftest.$ac_ext <<EOF
11948 #line 11949 "configure"
11949 #include "confdefs.h"
11950 /* pthread test headers */
11951 #include <pthread.h>
11952 #if HAVE_PTHREADS < 7
11953 #include <errno.h>
11954 #endif
11955 #ifndef NULL
11956 #define NULL (void*)0
11957 #endif
11958
11959 static void *task(p)
11960         void *p;
11961 {
11962         return (void *) (p == NULL);
11963 }
11964
11965 int main() {
11966
11967         /* pthread test function */
11968 #ifndef PTHREAD_CREATE_DETACHED
11969 #define PTHREAD_CREATE_DETACHED 1
11970 #endif
11971         pthread_t t;
11972         int status;
11973         int detach = PTHREAD_CREATE_DETACHED;
11974
11975 #if HAVE_PTHREADS > 4
11976         /* Final pthreads */
11977         pthread_attr_t attr;
11978
11979         status = pthread_attr_init(&attr);
11980         if( status ) return status;
11981
11982 #if HAVE_PTHREADS < 7
11983         status = pthread_attr_setdetachstate(&attr, &detach);
11984         if( status < 0 ) status = errno;
11985 #else
11986         status = pthread_attr_setdetachstate(&attr, detach);
11987 #endif
11988         if( status ) return status;
11989         status = pthread_create( &t, &attr, task, NULL );
11990 #if HAVE_PTHREADS < 7
11991         if( status < 0 ) status = errno;
11992 #endif
11993         if( status ) return status;
11994 #else
11995         /* Draft 4 pthreads */
11996         status = pthread_create( &t, pthread_attr_default, task, NULL );
11997         if( status ) return errno;
11998
11999         /* give thread a chance to complete */
12000         /* it should remain joinable and hence detachable */
12001         sleep( 1 );
12002
12003         status = pthread_detach( &t );
12004         if( status ) return errno;
12005 #endif
12006
12007 #ifdef HAVE_LINUX_THREADS
12008         pthread_kill_other_threads_np();
12009 #endif
12010
12011         return 0;
12012
12013 ; return 0; }
12014 EOF
12015 if { (eval echo configure:12016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12016   rm -rf conftest*
12017   ol_cv_pthread_kthread=yes
12018 else
12019   echo "configure: failed program was:" >&5
12020   cat conftest.$ac_ext >&5
12021   rm -rf conftest*
12022   ol_cv_pthread_kthread=no
12023 fi
12024 rm -f conftest*
12025 else
12026   cat > conftest.$ac_ext <<EOF
12027 #line 12028 "configure"
12028 #include "confdefs.h"
12029 /* pthread test headers */
12030 #include <pthread.h>
12031 #if HAVE_PTHREADS < 7
12032 #include <errno.h>
12033 #endif
12034 #ifndef NULL
12035 #define NULL (void*)0
12036 #endif
12037
12038 static void *task(p)
12039         void *p;
12040 {
12041         return (void *) (p == NULL);
12042 }
12043
12044
12045 int main(argc, argv)
12046         int argc;
12047         char **argv;
12048 {
12049
12050         /* pthread test function */
12051 #ifndef PTHREAD_CREATE_DETACHED
12052 #define PTHREAD_CREATE_DETACHED 1
12053 #endif
12054         pthread_t t;
12055         int status;
12056         int detach = PTHREAD_CREATE_DETACHED;
12057
12058 #if HAVE_PTHREADS > 4
12059         /* Final pthreads */
12060         pthread_attr_t attr;
12061
12062         status = pthread_attr_init(&attr);
12063         if( status ) return status;
12064
12065 #if HAVE_PTHREADS < 7
12066         status = pthread_attr_setdetachstate(&attr, &detach);
12067         if( status < 0 ) status = errno;
12068 #else
12069         status = pthread_attr_setdetachstate(&attr, detach);
12070 #endif
12071         if( status ) return status;
12072         status = pthread_create( &t, &attr, task, NULL );
12073 #if HAVE_PTHREADS < 7
12074         if( status < 0 ) status = errno;
12075 #endif
12076         if( status ) return status;
12077 #else
12078         /* Draft 4 pthreads */
12079         status = pthread_create( &t, pthread_attr_default, task, NULL );
12080         if( status ) return errno;
12081
12082         /* give thread a chance to complete */
12083         /* it should remain joinable and hence detachable */
12084         sleep( 1 );
12085
12086         status = pthread_detach( &t );
12087         if( status ) return errno;
12088 #endif
12089
12090 #ifdef HAVE_LINUX_THREADS
12091         pthread_kill_other_threads_np();
12092 #endif
12093
12094         return 0;
12095
12096 }
12097
12098 EOF
12099 if { (eval echo configure:12100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12100 then
12101   ol_cv_pthread_kthread=yes
12102 else
12103   echo "configure: failed program was:" >&5
12104   cat conftest.$ac_ext >&5
12105   rm -fr conftest*
12106   ol_cv_pthread_kthread=no
12107 fi
12108 rm -fr conftest*
12109 fi
12110
12111
12112                 # restore the LIBS
12113                 LIBS="$ol_LIBS"
12114         
12115 fi
12116
12117 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12118
12119         if test $ol_cv_pthread_kthread = yes ; then
12120                 ol_link_pthreads="-kthread"
12121                 ol_link_threads=posix
12122         fi
12123 fi
12124
12125                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12126 if test "$ol_link_threads" = no ; then
12127         # try -pthread
12128         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12129 echo "configure:12130: checking for pthread link with -pthread" >&5
12130 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12131   echo $ac_n "(cached) $ac_c" 1>&6
12132 else
12133   
12134                 # save the flags
12135                 ol_LIBS="$LIBS"
12136                 LIBS="-pthread $LIBS"
12137
12138                 if test "$cross_compiling" = yes; then
12139   cat > conftest.$ac_ext <<EOF
12140 #line 12141 "configure"
12141 #include "confdefs.h"
12142 /* pthread test headers */
12143 #include <pthread.h>
12144 #if HAVE_PTHREADS < 7
12145 #include <errno.h>
12146 #endif
12147 #ifndef NULL
12148 #define NULL (void*)0
12149 #endif
12150
12151 static void *task(p)
12152         void *p;
12153 {
12154         return (void *) (p == NULL);
12155 }
12156
12157 int main() {
12158
12159         /* pthread test function */
12160 #ifndef PTHREAD_CREATE_DETACHED
12161 #define PTHREAD_CREATE_DETACHED 1
12162 #endif
12163         pthread_t t;
12164         int status;
12165         int detach = PTHREAD_CREATE_DETACHED;
12166
12167 #if HAVE_PTHREADS > 4
12168         /* Final pthreads */
12169         pthread_attr_t attr;
12170
12171         status = pthread_attr_init(&attr);
12172         if( status ) return status;
12173
12174 #if HAVE_PTHREADS < 7
12175         status = pthread_attr_setdetachstate(&attr, &detach);
12176         if( status < 0 ) status = errno;
12177 #else
12178         status = pthread_attr_setdetachstate(&attr, detach);
12179 #endif
12180         if( status ) return status;
12181         status = pthread_create( &t, &attr, task, NULL );
12182 #if HAVE_PTHREADS < 7
12183         if( status < 0 ) status = errno;
12184 #endif
12185         if( status ) return status;
12186 #else
12187         /* Draft 4 pthreads */
12188         status = pthread_create( &t, pthread_attr_default, task, NULL );
12189         if( status ) return errno;
12190
12191         /* give thread a chance to complete */
12192         /* it should remain joinable and hence detachable */
12193         sleep( 1 );
12194
12195         status = pthread_detach( &t );
12196         if( status ) return errno;
12197 #endif
12198
12199 #ifdef HAVE_LINUX_THREADS
12200         pthread_kill_other_threads_np();
12201 #endif
12202
12203         return 0;
12204
12205 ; return 0; }
12206 EOF
12207 if { (eval echo configure:12208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12208   rm -rf conftest*
12209   ol_cv_pthread_pthread=yes
12210 else
12211   echo "configure: failed program was:" >&5
12212   cat conftest.$ac_ext >&5
12213   rm -rf conftest*
12214   ol_cv_pthread_pthread=no
12215 fi
12216 rm -f conftest*
12217 else
12218   cat > conftest.$ac_ext <<EOF
12219 #line 12220 "configure"
12220 #include "confdefs.h"
12221 /* pthread test headers */
12222 #include <pthread.h>
12223 #if HAVE_PTHREADS < 7
12224 #include <errno.h>
12225 #endif
12226 #ifndef NULL
12227 #define NULL (void*)0
12228 #endif
12229
12230 static void *task(p)
12231         void *p;
12232 {
12233         return (void *) (p == NULL);
12234 }
12235
12236
12237 int main(argc, argv)
12238         int argc;
12239         char **argv;
12240 {
12241
12242         /* pthread test function */
12243 #ifndef PTHREAD_CREATE_DETACHED
12244 #define PTHREAD_CREATE_DETACHED 1
12245 #endif
12246         pthread_t t;
12247         int status;
12248         int detach = PTHREAD_CREATE_DETACHED;
12249
12250 #if HAVE_PTHREADS > 4
12251         /* Final pthreads */
12252         pthread_attr_t attr;
12253
12254         status = pthread_attr_init(&attr);
12255         if( status ) return status;
12256
12257 #if HAVE_PTHREADS < 7
12258         status = pthread_attr_setdetachstate(&attr, &detach);
12259         if( status < 0 ) status = errno;
12260 #else
12261         status = pthread_attr_setdetachstate(&attr, detach);
12262 #endif
12263         if( status ) return status;
12264         status = pthread_create( &t, &attr, task, NULL );
12265 #if HAVE_PTHREADS < 7
12266         if( status < 0 ) status = errno;
12267 #endif
12268         if( status ) return status;
12269 #else
12270         /* Draft 4 pthreads */
12271         status = pthread_create( &t, pthread_attr_default, task, NULL );
12272         if( status ) return errno;
12273
12274         /* give thread a chance to complete */
12275         /* it should remain joinable and hence detachable */
12276         sleep( 1 );
12277
12278         status = pthread_detach( &t );
12279         if( status ) return errno;
12280 #endif
12281
12282 #ifdef HAVE_LINUX_THREADS
12283         pthread_kill_other_threads_np();
12284 #endif
12285
12286         return 0;
12287
12288 }
12289
12290 EOF
12291 if { (eval echo configure:12292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12292 then
12293   ol_cv_pthread_pthread=yes
12294 else
12295   echo "configure: failed program was:" >&5
12296   cat conftest.$ac_ext >&5
12297   rm -fr conftest*
12298   ol_cv_pthread_pthread=no
12299 fi
12300 rm -fr conftest*
12301 fi
12302
12303
12304                 # restore the LIBS
12305                 LIBS="$ol_LIBS"
12306         
12307 fi
12308
12309 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12310
12311         if test $ol_cv_pthread_pthread = yes ; then
12312                 ol_link_pthreads="-pthread"
12313                 ol_link_threads=posix
12314         fi
12315 fi
12316
12317                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12318 if test "$ol_link_threads" = no ; then
12319         # try -pthreads
12320         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12321 echo "configure:12322: checking for pthread link with -pthreads" >&5
12322 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12323   echo $ac_n "(cached) $ac_c" 1>&6
12324 else
12325   
12326                 # save the flags
12327                 ol_LIBS="$LIBS"
12328                 LIBS="-pthreads $LIBS"
12329
12330                 if test "$cross_compiling" = yes; then
12331   cat > conftest.$ac_ext <<EOF
12332 #line 12333 "configure"
12333 #include "confdefs.h"
12334 /* pthread test headers */
12335 #include <pthread.h>
12336 #if HAVE_PTHREADS < 7
12337 #include <errno.h>
12338 #endif
12339 #ifndef NULL
12340 #define NULL (void*)0
12341 #endif
12342
12343 static void *task(p)
12344         void *p;
12345 {
12346         return (void *) (p == NULL);
12347 }
12348
12349 int main() {
12350
12351         /* pthread test function */
12352 #ifndef PTHREAD_CREATE_DETACHED
12353 #define PTHREAD_CREATE_DETACHED 1
12354 #endif
12355         pthread_t t;
12356         int status;
12357         int detach = PTHREAD_CREATE_DETACHED;
12358
12359 #if HAVE_PTHREADS > 4
12360         /* Final pthreads */
12361         pthread_attr_t attr;
12362
12363         status = pthread_attr_init(&attr);
12364         if( status ) return status;
12365
12366 #if HAVE_PTHREADS < 7
12367         status = pthread_attr_setdetachstate(&attr, &detach);
12368         if( status < 0 ) status = errno;
12369 #else
12370         status = pthread_attr_setdetachstate(&attr, detach);
12371 #endif
12372         if( status ) return status;
12373         status = pthread_create( &t, &attr, task, NULL );
12374 #if HAVE_PTHREADS < 7
12375         if( status < 0 ) status = errno;
12376 #endif
12377         if( status ) return status;
12378 #else
12379         /* Draft 4 pthreads */
12380         status = pthread_create( &t, pthread_attr_default, task, NULL );
12381         if( status ) return errno;
12382
12383         /* give thread a chance to complete */
12384         /* it should remain joinable and hence detachable */
12385         sleep( 1 );
12386
12387         status = pthread_detach( &t );
12388         if( status ) return errno;
12389 #endif
12390
12391 #ifdef HAVE_LINUX_THREADS
12392         pthread_kill_other_threads_np();
12393 #endif
12394
12395         return 0;
12396
12397 ; return 0; }
12398 EOF
12399 if { (eval echo configure:12400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12400   rm -rf conftest*
12401   ol_cv_pthread_pthreads=yes
12402 else
12403   echo "configure: failed program was:" >&5
12404   cat conftest.$ac_ext >&5
12405   rm -rf conftest*
12406   ol_cv_pthread_pthreads=no
12407 fi
12408 rm -f conftest*
12409 else
12410   cat > conftest.$ac_ext <<EOF
12411 #line 12412 "configure"
12412 #include "confdefs.h"
12413 /* pthread test headers */
12414 #include <pthread.h>
12415 #if HAVE_PTHREADS < 7
12416 #include <errno.h>
12417 #endif
12418 #ifndef NULL
12419 #define NULL (void*)0
12420 #endif
12421
12422 static void *task(p)
12423         void *p;
12424 {
12425         return (void *) (p == NULL);
12426 }
12427
12428
12429 int main(argc, argv)
12430         int argc;
12431         char **argv;
12432 {
12433
12434         /* pthread test function */
12435 #ifndef PTHREAD_CREATE_DETACHED
12436 #define PTHREAD_CREATE_DETACHED 1
12437 #endif
12438         pthread_t t;
12439         int status;
12440         int detach = PTHREAD_CREATE_DETACHED;
12441
12442 #if HAVE_PTHREADS > 4
12443         /* Final pthreads */
12444         pthread_attr_t attr;
12445
12446         status = pthread_attr_init(&attr);
12447         if( status ) return status;
12448
12449 #if HAVE_PTHREADS < 7
12450         status = pthread_attr_setdetachstate(&attr, &detach);
12451         if( status < 0 ) status = errno;
12452 #else
12453         status = pthread_attr_setdetachstate(&attr, detach);
12454 #endif
12455         if( status ) return status;
12456         status = pthread_create( &t, &attr, task, NULL );
12457 #if HAVE_PTHREADS < 7
12458         if( status < 0 ) status = errno;
12459 #endif
12460         if( status ) return status;
12461 #else
12462         /* Draft 4 pthreads */
12463         status = pthread_create( &t, pthread_attr_default, task, NULL );
12464         if( status ) return errno;
12465
12466         /* give thread a chance to complete */
12467         /* it should remain joinable and hence detachable */
12468         sleep( 1 );
12469
12470         status = pthread_detach( &t );
12471         if( status ) return errno;
12472 #endif
12473
12474 #ifdef HAVE_LINUX_THREADS
12475         pthread_kill_other_threads_np();
12476 #endif
12477
12478         return 0;
12479
12480 }
12481
12482 EOF
12483 if { (eval echo configure:12484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12484 then
12485   ol_cv_pthread_pthreads=yes
12486 else
12487   echo "configure: failed program was:" >&5
12488   cat conftest.$ac_ext >&5
12489   rm -fr conftest*
12490   ol_cv_pthread_pthreads=no
12491 fi
12492 rm -fr conftest*
12493 fi
12494
12495
12496                 # restore the LIBS
12497                 LIBS="$ol_LIBS"
12498         
12499 fi
12500
12501 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12502
12503         if test $ol_cv_pthread_pthreads = yes ; then
12504                 ol_link_pthreads="-pthreads"
12505                 ol_link_threads=posix
12506         fi
12507 fi
12508
12509                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12510 if test "$ol_link_threads" = no ; then
12511         # try -mthreads
12512         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12513 echo "configure:12514: checking for pthread link with -mthreads" >&5
12514 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12515   echo $ac_n "(cached) $ac_c" 1>&6
12516 else
12517   
12518                 # save the flags
12519                 ol_LIBS="$LIBS"
12520                 LIBS="-mthreads $LIBS"
12521
12522                 if test "$cross_compiling" = yes; then
12523   cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 /* pthread test headers */
12527 #include <pthread.h>
12528 #if HAVE_PTHREADS < 7
12529 #include <errno.h>
12530 #endif
12531 #ifndef NULL
12532 #define NULL (void*)0
12533 #endif
12534
12535 static void *task(p)
12536         void *p;
12537 {
12538         return (void *) (p == NULL);
12539 }
12540
12541 int main() {
12542
12543         /* pthread test function */
12544 #ifndef PTHREAD_CREATE_DETACHED
12545 #define PTHREAD_CREATE_DETACHED 1
12546 #endif
12547         pthread_t t;
12548         int status;
12549         int detach = PTHREAD_CREATE_DETACHED;
12550
12551 #if HAVE_PTHREADS > 4
12552         /* Final pthreads */
12553         pthread_attr_t attr;
12554
12555         status = pthread_attr_init(&attr);
12556         if( status ) return status;
12557
12558 #if HAVE_PTHREADS < 7
12559         status = pthread_attr_setdetachstate(&attr, &detach);
12560         if( status < 0 ) status = errno;
12561 #else
12562         status = pthread_attr_setdetachstate(&attr, detach);
12563 #endif
12564         if( status ) return status;
12565         status = pthread_create( &t, &attr, task, NULL );
12566 #if HAVE_PTHREADS < 7
12567         if( status < 0 ) status = errno;
12568 #endif
12569         if( status ) return status;
12570 #else
12571         /* Draft 4 pthreads */
12572         status = pthread_create( &t, pthread_attr_default, task, NULL );
12573         if( status ) return errno;
12574
12575         /* give thread a chance to complete */
12576         /* it should remain joinable and hence detachable */
12577         sleep( 1 );
12578
12579         status = pthread_detach( &t );
12580         if( status ) return errno;
12581 #endif
12582
12583 #ifdef HAVE_LINUX_THREADS
12584         pthread_kill_other_threads_np();
12585 #endif
12586
12587         return 0;
12588
12589 ; return 0; }
12590 EOF
12591 if { (eval echo configure:12592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12592   rm -rf conftest*
12593   ol_cv_pthread_mthreads=yes
12594 else
12595   echo "configure: failed program was:" >&5
12596   cat conftest.$ac_ext >&5
12597   rm -rf conftest*
12598   ol_cv_pthread_mthreads=no
12599 fi
12600 rm -f conftest*
12601 else
12602   cat > conftest.$ac_ext <<EOF
12603 #line 12604 "configure"
12604 #include "confdefs.h"
12605 /* pthread test headers */
12606 #include <pthread.h>
12607 #if HAVE_PTHREADS < 7
12608 #include <errno.h>
12609 #endif
12610 #ifndef NULL
12611 #define NULL (void*)0
12612 #endif
12613
12614 static void *task(p)
12615         void *p;
12616 {
12617         return (void *) (p == NULL);
12618 }
12619
12620
12621 int main(argc, argv)
12622         int argc;
12623         char **argv;
12624 {
12625
12626         /* pthread test function */
12627 #ifndef PTHREAD_CREATE_DETACHED
12628 #define PTHREAD_CREATE_DETACHED 1
12629 #endif
12630         pthread_t t;
12631         int status;
12632         int detach = PTHREAD_CREATE_DETACHED;
12633
12634 #if HAVE_PTHREADS > 4
12635         /* Final pthreads */
12636         pthread_attr_t attr;
12637
12638         status = pthread_attr_init(&attr);
12639         if( status ) return status;
12640
12641 #if HAVE_PTHREADS < 7
12642         status = pthread_attr_setdetachstate(&attr, &detach);
12643         if( status < 0 ) status = errno;
12644 #else
12645         status = pthread_attr_setdetachstate(&attr, detach);
12646 #endif
12647         if( status ) return status;
12648         status = pthread_create( &t, &attr, task, NULL );
12649 #if HAVE_PTHREADS < 7
12650         if( status < 0 ) status = errno;
12651 #endif
12652         if( status ) return status;
12653 #else
12654         /* Draft 4 pthreads */
12655         status = pthread_create( &t, pthread_attr_default, task, NULL );
12656         if( status ) return errno;
12657
12658         /* give thread a chance to complete */
12659         /* it should remain joinable and hence detachable */
12660         sleep( 1 );
12661
12662         status = pthread_detach( &t );
12663         if( status ) return errno;
12664 #endif
12665
12666 #ifdef HAVE_LINUX_THREADS
12667         pthread_kill_other_threads_np();
12668 #endif
12669
12670         return 0;
12671
12672 }
12673
12674 EOF
12675 if { (eval echo configure:12676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12676 then
12677   ol_cv_pthread_mthreads=yes
12678 else
12679   echo "configure: failed program was:" >&5
12680   cat conftest.$ac_ext >&5
12681   rm -fr conftest*
12682   ol_cv_pthread_mthreads=no
12683 fi
12684 rm -fr conftest*
12685 fi
12686
12687
12688                 # restore the LIBS
12689                 LIBS="$ol_LIBS"
12690         
12691 fi
12692
12693 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12694
12695         if test $ol_cv_pthread_mthreads = yes ; then
12696                 ol_link_pthreads="-mthreads"
12697                 ol_link_threads=posix
12698         fi
12699 fi
12700
12701                 # Pthread try link: -thread (ol_cv_pthread_thread)
12702 if test "$ol_link_threads" = no ; then
12703         # try -thread
12704         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12705 echo "configure:12706: checking for pthread link with -thread" >&5
12706 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12707   echo $ac_n "(cached) $ac_c" 1>&6
12708 else
12709   
12710                 # save the flags
12711                 ol_LIBS="$LIBS"
12712                 LIBS="-thread $LIBS"
12713
12714                 if test "$cross_compiling" = yes; then
12715   cat > conftest.$ac_ext <<EOF
12716 #line 12717 "configure"
12717 #include "confdefs.h"
12718 /* pthread test headers */
12719 #include <pthread.h>
12720 #if HAVE_PTHREADS < 7
12721 #include <errno.h>
12722 #endif
12723 #ifndef NULL
12724 #define NULL (void*)0
12725 #endif
12726
12727 static void *task(p)
12728         void *p;
12729 {
12730         return (void *) (p == NULL);
12731 }
12732
12733 int main() {
12734
12735         /* pthread test function */
12736 #ifndef PTHREAD_CREATE_DETACHED
12737 #define PTHREAD_CREATE_DETACHED 1
12738 #endif
12739         pthread_t t;
12740         int status;
12741         int detach = PTHREAD_CREATE_DETACHED;
12742
12743 #if HAVE_PTHREADS > 4
12744         /* Final pthreads */
12745         pthread_attr_t attr;
12746
12747         status = pthread_attr_init(&attr);
12748         if( status ) return status;
12749
12750 #if HAVE_PTHREADS < 7
12751         status = pthread_attr_setdetachstate(&attr, &detach);
12752         if( status < 0 ) status = errno;
12753 #else
12754         status = pthread_attr_setdetachstate(&attr, detach);
12755 #endif
12756         if( status ) return status;
12757         status = pthread_create( &t, &attr, task, NULL );
12758 #if HAVE_PTHREADS < 7
12759         if( status < 0 ) status = errno;
12760 #endif
12761         if( status ) return status;
12762 #else
12763         /* Draft 4 pthreads */
12764         status = pthread_create( &t, pthread_attr_default, task, NULL );
12765         if( status ) return errno;
12766
12767         /* give thread a chance to complete */
12768         /* it should remain joinable and hence detachable */
12769         sleep( 1 );
12770
12771         status = pthread_detach( &t );
12772         if( status ) return errno;
12773 #endif
12774
12775 #ifdef HAVE_LINUX_THREADS
12776         pthread_kill_other_threads_np();
12777 #endif
12778
12779         return 0;
12780
12781 ; return 0; }
12782 EOF
12783 if { (eval echo configure:12784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12784   rm -rf conftest*
12785   ol_cv_pthread_thread=yes
12786 else
12787   echo "configure: failed program was:" >&5
12788   cat conftest.$ac_ext >&5
12789   rm -rf conftest*
12790   ol_cv_pthread_thread=no
12791 fi
12792 rm -f conftest*
12793 else
12794   cat > conftest.$ac_ext <<EOF
12795 #line 12796 "configure"
12796 #include "confdefs.h"
12797 /* pthread test headers */
12798 #include <pthread.h>
12799 #if HAVE_PTHREADS < 7
12800 #include <errno.h>
12801 #endif
12802 #ifndef NULL
12803 #define NULL (void*)0
12804 #endif
12805
12806 static void *task(p)
12807         void *p;
12808 {
12809         return (void *) (p == NULL);
12810 }
12811
12812
12813 int main(argc, argv)
12814         int argc;
12815         char **argv;
12816 {
12817
12818         /* pthread test function */
12819 #ifndef PTHREAD_CREATE_DETACHED
12820 #define PTHREAD_CREATE_DETACHED 1
12821 #endif
12822         pthread_t t;
12823         int status;
12824         int detach = PTHREAD_CREATE_DETACHED;
12825
12826 #if HAVE_PTHREADS > 4
12827         /* Final pthreads */
12828         pthread_attr_t attr;
12829
12830         status = pthread_attr_init(&attr);
12831         if( status ) return status;
12832
12833 #if HAVE_PTHREADS < 7
12834         status = pthread_attr_setdetachstate(&attr, &detach);
12835         if( status < 0 ) status = errno;
12836 #else
12837         status = pthread_attr_setdetachstate(&attr, detach);
12838 #endif
12839         if( status ) return status;
12840         status = pthread_create( &t, &attr, task, NULL );
12841 #if HAVE_PTHREADS < 7
12842         if( status < 0 ) status = errno;
12843 #endif
12844         if( status ) return status;
12845 #else
12846         /* Draft 4 pthreads */
12847         status = pthread_create( &t, pthread_attr_default, task, NULL );
12848         if( status ) return errno;
12849
12850         /* give thread a chance to complete */
12851         /* it should remain joinable and hence detachable */
12852         sleep( 1 );
12853
12854         status = pthread_detach( &t );
12855         if( status ) return errno;
12856 #endif
12857
12858 #ifdef HAVE_LINUX_THREADS
12859         pthread_kill_other_threads_np();
12860 #endif
12861
12862         return 0;
12863
12864 }
12865
12866 EOF
12867 if { (eval echo configure:12868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12868 then
12869   ol_cv_pthread_thread=yes
12870 else
12871   echo "configure: failed program was:" >&5
12872   cat conftest.$ac_ext >&5
12873   rm -fr conftest*
12874   ol_cv_pthread_thread=no
12875 fi
12876 rm -fr conftest*
12877 fi
12878
12879
12880                 # restore the LIBS
12881                 LIBS="$ol_LIBS"
12882         
12883 fi
12884
12885 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12886
12887         if test $ol_cv_pthread_thread = yes ; then
12888                 ol_link_pthreads="-thread"
12889                 ol_link_threads=posix
12890         fi
12891 fi
12892
12893
12894                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12895 if test "$ol_link_threads" = no ; then
12896         # try -lpthread -lmach -lexc -lc_r
12897         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12898 echo "configure:12899: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12899 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12900   echo $ac_n "(cached) $ac_c" 1>&6
12901 else
12902   
12903                 # save the flags
12904                 ol_LIBS="$LIBS"
12905                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12906
12907                 if test "$cross_compiling" = yes; then
12908   cat > conftest.$ac_ext <<EOF
12909 #line 12910 "configure"
12910 #include "confdefs.h"
12911 /* pthread test headers */
12912 #include <pthread.h>
12913 #if HAVE_PTHREADS < 7
12914 #include <errno.h>
12915 #endif
12916 #ifndef NULL
12917 #define NULL (void*)0
12918 #endif
12919
12920 static void *task(p)
12921         void *p;
12922 {
12923         return (void *) (p == NULL);
12924 }
12925
12926 int main() {
12927
12928         /* pthread test function */
12929 #ifndef PTHREAD_CREATE_DETACHED
12930 #define PTHREAD_CREATE_DETACHED 1
12931 #endif
12932         pthread_t t;
12933         int status;
12934         int detach = PTHREAD_CREATE_DETACHED;
12935
12936 #if HAVE_PTHREADS > 4
12937         /* Final pthreads */
12938         pthread_attr_t attr;
12939
12940         status = pthread_attr_init(&attr);
12941         if( status ) return status;
12942
12943 #if HAVE_PTHREADS < 7
12944         status = pthread_attr_setdetachstate(&attr, &detach);
12945         if( status < 0 ) status = errno;
12946 #else
12947         status = pthread_attr_setdetachstate(&attr, detach);
12948 #endif
12949         if( status ) return status;
12950         status = pthread_create( &t, &attr, task, NULL );
12951 #if HAVE_PTHREADS < 7
12952         if( status < 0 ) status = errno;
12953 #endif
12954         if( status ) return status;
12955 #else
12956         /* Draft 4 pthreads */
12957         status = pthread_create( &t, pthread_attr_default, task, NULL );
12958         if( status ) return errno;
12959
12960         /* give thread a chance to complete */
12961         /* it should remain joinable and hence detachable */
12962         sleep( 1 );
12963
12964         status = pthread_detach( &t );
12965         if( status ) return errno;
12966 #endif
12967
12968 #ifdef HAVE_LINUX_THREADS
12969         pthread_kill_other_threads_np();
12970 #endif
12971
12972         return 0;
12973
12974 ; return 0; }
12975 EOF
12976 if { (eval echo configure:12977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12977   rm -rf conftest*
12978   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12979 else
12980   echo "configure: failed program was:" >&5
12981   cat conftest.$ac_ext >&5
12982   rm -rf conftest*
12983   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12984 fi
12985 rm -f conftest*
12986 else
12987   cat > conftest.$ac_ext <<EOF
12988 #line 12989 "configure"
12989 #include "confdefs.h"
12990 /* pthread test headers */
12991 #include <pthread.h>
12992 #if HAVE_PTHREADS < 7
12993 #include <errno.h>
12994 #endif
12995 #ifndef NULL
12996 #define NULL (void*)0
12997 #endif
12998
12999 static void *task(p)
13000         void *p;
13001 {
13002         return (void *) (p == NULL);
13003 }
13004
13005
13006 int main(argc, argv)
13007         int argc;
13008         char **argv;
13009 {
13010
13011         /* pthread test function */
13012 #ifndef PTHREAD_CREATE_DETACHED
13013 #define PTHREAD_CREATE_DETACHED 1
13014 #endif
13015         pthread_t t;
13016         int status;
13017         int detach = PTHREAD_CREATE_DETACHED;
13018
13019 #if HAVE_PTHREADS > 4
13020         /* Final pthreads */
13021         pthread_attr_t attr;
13022
13023         status = pthread_attr_init(&attr);
13024         if( status ) return status;
13025
13026 #if HAVE_PTHREADS < 7
13027         status = pthread_attr_setdetachstate(&attr, &detach);
13028         if( status < 0 ) status = errno;
13029 #else
13030         status = pthread_attr_setdetachstate(&attr, detach);
13031 #endif
13032         if( status ) return status;
13033         status = pthread_create( &t, &attr, task, NULL );
13034 #if HAVE_PTHREADS < 7
13035         if( status < 0 ) status = errno;
13036 #endif
13037         if( status ) return status;
13038 #else
13039         /* Draft 4 pthreads */
13040         status = pthread_create( &t, pthread_attr_default, task, NULL );
13041         if( status ) return errno;
13042
13043         /* give thread a chance to complete */
13044         /* it should remain joinable and hence detachable */
13045         sleep( 1 );
13046
13047         status = pthread_detach( &t );
13048         if( status ) return errno;
13049 #endif
13050
13051 #ifdef HAVE_LINUX_THREADS
13052         pthread_kill_other_threads_np();
13053 #endif
13054
13055         return 0;
13056
13057 }
13058
13059 EOF
13060 if { (eval echo configure:13061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13061 then
13062   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13063 else
13064   echo "configure: failed program was:" >&5
13065   cat conftest.$ac_ext >&5
13066   rm -fr conftest*
13067   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13068 fi
13069 rm -fr conftest*
13070 fi
13071
13072
13073                 # restore the LIBS
13074                 LIBS="$ol_LIBS"
13075         
13076 fi
13077
13078 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13079
13080         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13081                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13082                 ol_link_threads=posix
13083         fi
13084 fi
13085
13086                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13087 if test "$ol_link_threads" = no ; then
13088         # try -lpthread -lmach -lexc
13089         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13090 echo "configure:13091: checking for pthread link with -lpthread -lmach -lexc" >&5
13091 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13092   echo $ac_n "(cached) $ac_c" 1>&6
13093 else
13094   
13095                 # save the flags
13096                 ol_LIBS="$LIBS"
13097                 LIBS="-lpthread -lmach -lexc $LIBS"
13098
13099                 if test "$cross_compiling" = yes; then
13100   cat > conftest.$ac_ext <<EOF
13101 #line 13102 "configure"
13102 #include "confdefs.h"
13103 /* pthread test headers */
13104 #include <pthread.h>
13105 #if HAVE_PTHREADS < 7
13106 #include <errno.h>
13107 #endif
13108 #ifndef NULL
13109 #define NULL (void*)0
13110 #endif
13111
13112 static void *task(p)
13113         void *p;
13114 {
13115         return (void *) (p == NULL);
13116 }
13117
13118 int main() {
13119
13120         /* pthread test function */
13121 #ifndef PTHREAD_CREATE_DETACHED
13122 #define PTHREAD_CREATE_DETACHED 1
13123 #endif
13124         pthread_t t;
13125         int status;
13126         int detach = PTHREAD_CREATE_DETACHED;
13127
13128 #if HAVE_PTHREADS > 4
13129         /* Final pthreads */
13130         pthread_attr_t attr;
13131
13132         status = pthread_attr_init(&attr);
13133         if( status ) return status;
13134
13135 #if HAVE_PTHREADS < 7
13136         status = pthread_attr_setdetachstate(&attr, &detach);
13137         if( status < 0 ) status = errno;
13138 #else
13139         status = pthread_attr_setdetachstate(&attr, detach);
13140 #endif
13141         if( status ) return status;
13142         status = pthread_create( &t, &attr, task, NULL );
13143 #if HAVE_PTHREADS < 7
13144         if( status < 0 ) status = errno;
13145 #endif
13146         if( status ) return status;
13147 #else
13148         /* Draft 4 pthreads */
13149         status = pthread_create( &t, pthread_attr_default, task, NULL );
13150         if( status ) return errno;
13151
13152         /* give thread a chance to complete */
13153         /* it should remain joinable and hence detachable */
13154         sleep( 1 );
13155
13156         status = pthread_detach( &t );
13157         if( status ) return errno;
13158 #endif
13159
13160 #ifdef HAVE_LINUX_THREADS
13161         pthread_kill_other_threads_np();
13162 #endif
13163
13164         return 0;
13165
13166 ; return 0; }
13167 EOF
13168 if { (eval echo configure:13169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13169   rm -rf conftest*
13170   ol_cv_pthread_lpthread_lmach_lexc=yes
13171 else
13172   echo "configure: failed program was:" >&5
13173   cat conftest.$ac_ext >&5
13174   rm -rf conftest*
13175   ol_cv_pthread_lpthread_lmach_lexc=no
13176 fi
13177 rm -f conftest*
13178 else
13179   cat > conftest.$ac_ext <<EOF
13180 #line 13181 "configure"
13181 #include "confdefs.h"
13182 /* pthread test headers */
13183 #include <pthread.h>
13184 #if HAVE_PTHREADS < 7
13185 #include <errno.h>
13186 #endif
13187 #ifndef NULL
13188 #define NULL (void*)0
13189 #endif
13190
13191 static void *task(p)
13192         void *p;
13193 {
13194         return (void *) (p == NULL);
13195 }
13196
13197
13198 int main(argc, argv)
13199         int argc;
13200         char **argv;
13201 {
13202
13203         /* pthread test function */
13204 #ifndef PTHREAD_CREATE_DETACHED
13205 #define PTHREAD_CREATE_DETACHED 1
13206 #endif
13207         pthread_t t;
13208         int status;
13209         int detach = PTHREAD_CREATE_DETACHED;
13210
13211 #if HAVE_PTHREADS > 4
13212         /* Final pthreads */
13213         pthread_attr_t attr;
13214
13215         status = pthread_attr_init(&attr);
13216         if( status ) return status;
13217
13218 #if HAVE_PTHREADS < 7
13219         status = pthread_attr_setdetachstate(&attr, &detach);
13220         if( status < 0 ) status = errno;
13221 #else
13222         status = pthread_attr_setdetachstate(&attr, detach);
13223 #endif
13224         if( status ) return status;
13225         status = pthread_create( &t, &attr, task, NULL );
13226 #if HAVE_PTHREADS < 7
13227         if( status < 0 ) status = errno;
13228 #endif
13229         if( status ) return status;
13230 #else
13231         /* Draft 4 pthreads */
13232         status = pthread_create( &t, pthread_attr_default, task, NULL );
13233         if( status ) return errno;
13234
13235         /* give thread a chance to complete */
13236         /* it should remain joinable and hence detachable */
13237         sleep( 1 );
13238
13239         status = pthread_detach( &t );
13240         if( status ) return errno;
13241 #endif
13242
13243 #ifdef HAVE_LINUX_THREADS
13244         pthread_kill_other_threads_np();
13245 #endif
13246
13247         return 0;
13248
13249 }
13250
13251 EOF
13252 if { (eval echo configure:13253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13253 then
13254   ol_cv_pthread_lpthread_lmach_lexc=yes
13255 else
13256   echo "configure: failed program was:" >&5
13257   cat conftest.$ac_ext >&5
13258   rm -fr conftest*
13259   ol_cv_pthread_lpthread_lmach_lexc=no
13260 fi
13261 rm -fr conftest*
13262 fi
13263
13264
13265                 # restore the LIBS
13266                 LIBS="$ol_LIBS"
13267         
13268 fi
13269
13270 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13271
13272         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13273                 ol_link_pthreads="-lpthread -lmach -lexc"
13274                 ol_link_threads=posix
13275         fi
13276 fi
13277
13278
13279                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13280 if test "$ol_link_threads" = no ; then
13281         # try -lpthread -Wl,-woff,85
13282         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13283 echo "configure:13284: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13284 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13285   echo $ac_n "(cached) $ac_c" 1>&6
13286 else
13287   
13288                 # save the flags
13289                 ol_LIBS="$LIBS"
13290                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13291
13292                 if test "$cross_compiling" = yes; then
13293   cat > conftest.$ac_ext <<EOF
13294 #line 13295 "configure"
13295 #include "confdefs.h"
13296 /* pthread test headers */
13297 #include <pthread.h>
13298 #if HAVE_PTHREADS < 7
13299 #include <errno.h>
13300 #endif
13301 #ifndef NULL
13302 #define NULL (void*)0
13303 #endif
13304
13305 static void *task(p)
13306         void *p;
13307 {
13308         return (void *) (p == NULL);
13309 }
13310
13311 int main() {
13312
13313         /* pthread test function */
13314 #ifndef PTHREAD_CREATE_DETACHED
13315 #define PTHREAD_CREATE_DETACHED 1
13316 #endif
13317         pthread_t t;
13318         int status;
13319         int detach = PTHREAD_CREATE_DETACHED;
13320
13321 #if HAVE_PTHREADS > 4
13322         /* Final pthreads */
13323         pthread_attr_t attr;
13324
13325         status = pthread_attr_init(&attr);
13326         if( status ) return status;
13327
13328 #if HAVE_PTHREADS < 7
13329         status = pthread_attr_setdetachstate(&attr, &detach);
13330         if( status < 0 ) status = errno;
13331 #else
13332         status = pthread_attr_setdetachstate(&attr, detach);
13333 #endif
13334         if( status ) return status;
13335         status = pthread_create( &t, &attr, task, NULL );
13336 #if HAVE_PTHREADS < 7
13337         if( status < 0 ) status = errno;
13338 #endif
13339         if( status ) return status;
13340 #else
13341         /* Draft 4 pthreads */
13342         status = pthread_create( &t, pthread_attr_default, task, NULL );
13343         if( status ) return errno;
13344
13345         /* give thread a chance to complete */
13346         /* it should remain joinable and hence detachable */
13347         sleep( 1 );
13348
13349         status = pthread_detach( &t );
13350         if( status ) return errno;
13351 #endif
13352
13353 #ifdef HAVE_LINUX_THREADS
13354         pthread_kill_other_threads_np();
13355 #endif
13356
13357         return 0;
13358
13359 ; return 0; }
13360 EOF
13361 if { (eval echo configure:13362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13362   rm -rf conftest*
13363   ol_cv_pthread_lib_lpthread_woff=yes
13364 else
13365   echo "configure: failed program was:" >&5
13366   cat conftest.$ac_ext >&5
13367   rm -rf conftest*
13368   ol_cv_pthread_lib_lpthread_woff=no
13369 fi
13370 rm -f conftest*
13371 else
13372   cat > conftest.$ac_ext <<EOF
13373 #line 13374 "configure"
13374 #include "confdefs.h"
13375 /* pthread test headers */
13376 #include <pthread.h>
13377 #if HAVE_PTHREADS < 7
13378 #include <errno.h>
13379 #endif
13380 #ifndef NULL
13381 #define NULL (void*)0
13382 #endif
13383
13384 static void *task(p)
13385         void *p;
13386 {
13387         return (void *) (p == NULL);
13388 }
13389
13390
13391 int main(argc, argv)
13392         int argc;
13393         char **argv;
13394 {
13395
13396         /* pthread test function */
13397 #ifndef PTHREAD_CREATE_DETACHED
13398 #define PTHREAD_CREATE_DETACHED 1
13399 #endif
13400         pthread_t t;
13401         int status;
13402         int detach = PTHREAD_CREATE_DETACHED;
13403
13404 #if HAVE_PTHREADS > 4
13405         /* Final pthreads */
13406         pthread_attr_t attr;
13407
13408         status = pthread_attr_init(&attr);
13409         if( status ) return status;
13410
13411 #if HAVE_PTHREADS < 7
13412         status = pthread_attr_setdetachstate(&attr, &detach);
13413         if( status < 0 ) status = errno;
13414 #else
13415         status = pthread_attr_setdetachstate(&attr, detach);
13416 #endif
13417         if( status ) return status;
13418         status = pthread_create( &t, &attr, task, NULL );
13419 #if HAVE_PTHREADS < 7
13420         if( status < 0 ) status = errno;
13421 #endif
13422         if( status ) return status;
13423 #else
13424         /* Draft 4 pthreads */
13425         status = pthread_create( &t, pthread_attr_default, task, NULL );
13426         if( status ) return errno;
13427
13428         /* give thread a chance to complete */
13429         /* it should remain joinable and hence detachable */
13430         sleep( 1 );
13431
13432         status = pthread_detach( &t );
13433         if( status ) return errno;
13434 #endif
13435
13436 #ifdef HAVE_LINUX_THREADS
13437         pthread_kill_other_threads_np();
13438 #endif
13439
13440         return 0;
13441
13442 }
13443
13444 EOF
13445 if { (eval echo configure:13446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13446 then
13447   ol_cv_pthread_lib_lpthread_woff=yes
13448 else
13449   echo "configure: failed program was:" >&5
13450   cat conftest.$ac_ext >&5
13451   rm -fr conftest*
13452   ol_cv_pthread_lib_lpthread_woff=no
13453 fi
13454 rm -fr conftest*
13455 fi
13456
13457
13458                 # restore the LIBS
13459                 LIBS="$ol_LIBS"
13460         
13461 fi
13462
13463 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13464
13465         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13466                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13467                 ol_link_threads=posix
13468         fi
13469 fi
13470
13471
13472                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13473 if test "$ol_link_threads" = no ; then
13474         # try -lpthread
13475         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13476 echo "configure:13477: checking for pthread link with -lpthread" >&5
13477 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13478   echo $ac_n "(cached) $ac_c" 1>&6
13479 else
13480   
13481                 # save the flags
13482                 ol_LIBS="$LIBS"
13483                 LIBS="-lpthread $LIBS"
13484
13485                 if test "$cross_compiling" = yes; then
13486   cat > conftest.$ac_ext <<EOF
13487 #line 13488 "configure"
13488 #include "confdefs.h"
13489 /* pthread test headers */
13490 #include <pthread.h>
13491 #if HAVE_PTHREADS < 7
13492 #include <errno.h>
13493 #endif
13494 #ifndef NULL
13495 #define NULL (void*)0
13496 #endif
13497
13498 static void *task(p)
13499         void *p;
13500 {
13501         return (void *) (p == NULL);
13502 }
13503
13504 int main() {
13505
13506         /* pthread test function */
13507 #ifndef PTHREAD_CREATE_DETACHED
13508 #define PTHREAD_CREATE_DETACHED 1
13509 #endif
13510         pthread_t t;
13511         int status;
13512         int detach = PTHREAD_CREATE_DETACHED;
13513
13514 #if HAVE_PTHREADS > 4
13515         /* Final pthreads */
13516         pthread_attr_t attr;
13517
13518         status = pthread_attr_init(&attr);
13519         if( status ) return status;
13520
13521 #if HAVE_PTHREADS < 7
13522         status = pthread_attr_setdetachstate(&attr, &detach);
13523         if( status < 0 ) status = errno;
13524 #else
13525         status = pthread_attr_setdetachstate(&attr, detach);
13526 #endif
13527         if( status ) return status;
13528         status = pthread_create( &t, &attr, task, NULL );
13529 #if HAVE_PTHREADS < 7
13530         if( status < 0 ) status = errno;
13531 #endif
13532         if( status ) return status;
13533 #else
13534         /* Draft 4 pthreads */
13535         status = pthread_create( &t, pthread_attr_default, task, NULL );
13536         if( status ) return errno;
13537
13538         /* give thread a chance to complete */
13539         /* it should remain joinable and hence detachable */
13540         sleep( 1 );
13541
13542         status = pthread_detach( &t );
13543         if( status ) return errno;
13544 #endif
13545
13546 #ifdef HAVE_LINUX_THREADS
13547         pthread_kill_other_threads_np();
13548 #endif
13549
13550         return 0;
13551
13552 ; return 0; }
13553 EOF
13554 if { (eval echo configure:13555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13555   rm -rf conftest*
13556   ol_cv_pthread_lpthread=yes
13557 else
13558   echo "configure: failed program was:" >&5
13559   cat conftest.$ac_ext >&5
13560   rm -rf conftest*
13561   ol_cv_pthread_lpthread=no
13562 fi
13563 rm -f conftest*
13564 else
13565   cat > conftest.$ac_ext <<EOF
13566 #line 13567 "configure"
13567 #include "confdefs.h"
13568 /* pthread test headers */
13569 #include <pthread.h>
13570 #if HAVE_PTHREADS < 7
13571 #include <errno.h>
13572 #endif
13573 #ifndef NULL
13574 #define NULL (void*)0
13575 #endif
13576
13577 static void *task(p)
13578         void *p;
13579 {
13580         return (void *) (p == NULL);
13581 }
13582
13583
13584 int main(argc, argv)
13585         int argc;
13586         char **argv;
13587 {
13588
13589         /* pthread test function */
13590 #ifndef PTHREAD_CREATE_DETACHED
13591 #define PTHREAD_CREATE_DETACHED 1
13592 #endif
13593         pthread_t t;
13594         int status;
13595         int detach = PTHREAD_CREATE_DETACHED;
13596
13597 #if HAVE_PTHREADS > 4
13598         /* Final pthreads */
13599         pthread_attr_t attr;
13600
13601         status = pthread_attr_init(&attr);
13602         if( status ) return status;
13603
13604 #if HAVE_PTHREADS < 7
13605         status = pthread_attr_setdetachstate(&attr, &detach);
13606         if( status < 0 ) status = errno;
13607 #else
13608         status = pthread_attr_setdetachstate(&attr, detach);
13609 #endif
13610         if( status ) return status;
13611         status = pthread_create( &t, &attr, task, NULL );
13612 #if HAVE_PTHREADS < 7
13613         if( status < 0 ) status = errno;
13614 #endif
13615         if( status ) return status;
13616 #else
13617         /* Draft 4 pthreads */
13618         status = pthread_create( &t, pthread_attr_default, task, NULL );
13619         if( status ) return errno;
13620
13621         /* give thread a chance to complete */
13622         /* it should remain joinable and hence detachable */
13623         sleep( 1 );
13624
13625         status = pthread_detach( &t );
13626         if( status ) return errno;
13627 #endif
13628
13629 #ifdef HAVE_LINUX_THREADS
13630         pthread_kill_other_threads_np();
13631 #endif
13632
13633         return 0;
13634
13635 }
13636
13637 EOF
13638 if { (eval echo configure:13639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13639 then
13640   ol_cv_pthread_lpthread=yes
13641 else
13642   echo "configure: failed program was:" >&5
13643   cat conftest.$ac_ext >&5
13644   rm -fr conftest*
13645   ol_cv_pthread_lpthread=no
13646 fi
13647 rm -fr conftest*
13648 fi
13649
13650
13651                 # restore the LIBS
13652                 LIBS="$ol_LIBS"
13653         
13654 fi
13655
13656 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13657
13658         if test $ol_cv_pthread_lpthread = yes ; then
13659                 ol_link_pthreads="-lpthread"
13660                 ol_link_threads=posix
13661         fi
13662 fi
13663
13664                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13665 if test "$ol_link_threads" = no ; then
13666         # try -lc_r
13667         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13668 echo "configure:13669: checking for pthread link with -lc_r" >&5
13669 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13670   echo $ac_n "(cached) $ac_c" 1>&6
13671 else
13672   
13673                 # save the flags
13674                 ol_LIBS="$LIBS"
13675                 LIBS="-lc_r $LIBS"
13676
13677                 if test "$cross_compiling" = yes; then
13678   cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 /* pthread test headers */
13682 #include <pthread.h>
13683 #if HAVE_PTHREADS < 7
13684 #include <errno.h>
13685 #endif
13686 #ifndef NULL
13687 #define NULL (void*)0
13688 #endif
13689
13690 static void *task(p)
13691         void *p;
13692 {
13693         return (void *) (p == NULL);
13694 }
13695
13696 int main() {
13697
13698         /* pthread test function */
13699 #ifndef PTHREAD_CREATE_DETACHED
13700 #define PTHREAD_CREATE_DETACHED 1
13701 #endif
13702         pthread_t t;
13703         int status;
13704         int detach = PTHREAD_CREATE_DETACHED;
13705
13706 #if HAVE_PTHREADS > 4
13707         /* Final pthreads */
13708         pthread_attr_t attr;
13709
13710         status = pthread_attr_init(&attr);
13711         if( status ) return status;
13712
13713 #if HAVE_PTHREADS < 7
13714         status = pthread_attr_setdetachstate(&attr, &detach);
13715         if( status < 0 ) status = errno;
13716 #else
13717         status = pthread_attr_setdetachstate(&attr, detach);
13718 #endif
13719         if( status ) return status;
13720         status = pthread_create( &t, &attr, task, NULL );
13721 #if HAVE_PTHREADS < 7
13722         if( status < 0 ) status = errno;
13723 #endif
13724         if( status ) return status;
13725 #else
13726         /* Draft 4 pthreads */
13727         status = pthread_create( &t, pthread_attr_default, task, NULL );
13728         if( status ) return errno;
13729
13730         /* give thread a chance to complete */
13731         /* it should remain joinable and hence detachable */
13732         sleep( 1 );
13733
13734         status = pthread_detach( &t );
13735         if( status ) return errno;
13736 #endif
13737
13738 #ifdef HAVE_LINUX_THREADS
13739         pthread_kill_other_threads_np();
13740 #endif
13741
13742         return 0;
13743
13744 ; return 0; }
13745 EOF
13746 if { (eval echo configure:13747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13747   rm -rf conftest*
13748   ol_cv_pthread_lc_r=yes
13749 else
13750   echo "configure: failed program was:" >&5
13751   cat conftest.$ac_ext >&5
13752   rm -rf conftest*
13753   ol_cv_pthread_lc_r=no
13754 fi
13755 rm -f conftest*
13756 else
13757   cat > conftest.$ac_ext <<EOF
13758 #line 13759 "configure"
13759 #include "confdefs.h"
13760 /* pthread test headers */
13761 #include <pthread.h>
13762 #if HAVE_PTHREADS < 7
13763 #include <errno.h>
13764 #endif
13765 #ifndef NULL
13766 #define NULL (void*)0
13767 #endif
13768
13769 static void *task(p)
13770         void *p;
13771 {
13772         return (void *) (p == NULL);
13773 }
13774
13775
13776 int main(argc, argv)
13777         int argc;
13778         char **argv;
13779 {
13780
13781         /* pthread test function */
13782 #ifndef PTHREAD_CREATE_DETACHED
13783 #define PTHREAD_CREATE_DETACHED 1
13784 #endif
13785         pthread_t t;
13786         int status;
13787         int detach = PTHREAD_CREATE_DETACHED;
13788
13789 #if HAVE_PTHREADS > 4
13790         /* Final pthreads */
13791         pthread_attr_t attr;
13792
13793         status = pthread_attr_init(&attr);
13794         if( status ) return status;
13795
13796 #if HAVE_PTHREADS < 7
13797         status = pthread_attr_setdetachstate(&attr, &detach);
13798         if( status < 0 ) status = errno;
13799 #else
13800         status = pthread_attr_setdetachstate(&attr, detach);
13801 #endif
13802         if( status ) return status;
13803         status = pthread_create( &t, &attr, task, NULL );
13804 #if HAVE_PTHREADS < 7
13805         if( status < 0 ) status = errno;
13806 #endif
13807         if( status ) return status;
13808 #else
13809         /* Draft 4 pthreads */
13810         status = pthread_create( &t, pthread_attr_default, task, NULL );
13811         if( status ) return errno;
13812
13813         /* give thread a chance to complete */
13814         /* it should remain joinable and hence detachable */
13815         sleep( 1 );
13816
13817         status = pthread_detach( &t );
13818         if( status ) return errno;
13819 #endif
13820
13821 #ifdef HAVE_LINUX_THREADS
13822         pthread_kill_other_threads_np();
13823 #endif
13824
13825         return 0;
13826
13827 }
13828
13829 EOF
13830 if { (eval echo configure:13831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13831 then
13832   ol_cv_pthread_lc_r=yes
13833 else
13834   echo "configure: failed program was:" >&5
13835   cat conftest.$ac_ext >&5
13836   rm -fr conftest*
13837   ol_cv_pthread_lc_r=no
13838 fi
13839 rm -fr conftest*
13840 fi
13841
13842
13843                 # restore the LIBS
13844                 LIBS="$ol_LIBS"
13845         
13846 fi
13847
13848 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13849
13850         if test $ol_cv_pthread_lc_r = yes ; then
13851                 ol_link_pthreads="-lc_r"
13852                 ol_link_threads=posix
13853         fi
13854 fi
13855
13856
13857                 # Pthread try link: -threads (ol_cv_pthread_threads)
13858 if test "$ol_link_threads" = no ; then
13859         # try -threads
13860         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13861 echo "configure:13862: checking for pthread link with -threads" >&5
13862 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13863   echo $ac_n "(cached) $ac_c" 1>&6
13864 else
13865   
13866                 # save the flags
13867                 ol_LIBS="$LIBS"
13868                 LIBS="-threads $LIBS"
13869
13870                 if test "$cross_compiling" = yes; then
13871   cat > conftest.$ac_ext <<EOF
13872 #line 13873 "configure"
13873 #include "confdefs.h"
13874 /* pthread test headers */
13875 #include <pthread.h>
13876 #if HAVE_PTHREADS < 7
13877 #include <errno.h>
13878 #endif
13879 #ifndef NULL
13880 #define NULL (void*)0
13881 #endif
13882
13883 static void *task(p)
13884         void *p;
13885 {
13886         return (void *) (p == NULL);
13887 }
13888
13889 int main() {
13890
13891         /* pthread test function */
13892 #ifndef PTHREAD_CREATE_DETACHED
13893 #define PTHREAD_CREATE_DETACHED 1
13894 #endif
13895         pthread_t t;
13896         int status;
13897         int detach = PTHREAD_CREATE_DETACHED;
13898
13899 #if HAVE_PTHREADS > 4
13900         /* Final pthreads */
13901         pthread_attr_t attr;
13902
13903         status = pthread_attr_init(&attr);
13904         if( status ) return status;
13905
13906 #if HAVE_PTHREADS < 7
13907         status = pthread_attr_setdetachstate(&attr, &detach);
13908         if( status < 0 ) status = errno;
13909 #else
13910         status = pthread_attr_setdetachstate(&attr, detach);
13911 #endif
13912         if( status ) return status;
13913         status = pthread_create( &t, &attr, task, NULL );
13914 #if HAVE_PTHREADS < 7
13915         if( status < 0 ) status = errno;
13916 #endif
13917         if( status ) return status;
13918 #else
13919         /* Draft 4 pthreads */
13920         status = pthread_create( &t, pthread_attr_default, task, NULL );
13921         if( status ) return errno;
13922
13923         /* give thread a chance to complete */
13924         /* it should remain joinable and hence detachable */
13925         sleep( 1 );
13926
13927         status = pthread_detach( &t );
13928         if( status ) return errno;
13929 #endif
13930
13931 #ifdef HAVE_LINUX_THREADS
13932         pthread_kill_other_threads_np();
13933 #endif
13934
13935         return 0;
13936
13937 ; return 0; }
13938 EOF
13939 if { (eval echo configure:13940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13940   rm -rf conftest*
13941   ol_cv_pthread_threads=yes
13942 else
13943   echo "configure: failed program was:" >&5
13944   cat conftest.$ac_ext >&5
13945   rm -rf conftest*
13946   ol_cv_pthread_threads=no
13947 fi
13948 rm -f conftest*
13949 else
13950   cat > conftest.$ac_ext <<EOF
13951 #line 13952 "configure"
13952 #include "confdefs.h"
13953 /* pthread test headers */
13954 #include <pthread.h>
13955 #if HAVE_PTHREADS < 7
13956 #include <errno.h>
13957 #endif
13958 #ifndef NULL
13959 #define NULL (void*)0
13960 #endif
13961
13962 static void *task(p)
13963         void *p;
13964 {
13965         return (void *) (p == NULL);
13966 }
13967
13968
13969 int main(argc, argv)
13970         int argc;
13971         char **argv;
13972 {
13973
13974         /* pthread test function */
13975 #ifndef PTHREAD_CREATE_DETACHED
13976 #define PTHREAD_CREATE_DETACHED 1
13977 #endif
13978         pthread_t t;
13979         int status;
13980         int detach = PTHREAD_CREATE_DETACHED;
13981
13982 #if HAVE_PTHREADS > 4
13983         /* Final pthreads */
13984         pthread_attr_t attr;
13985
13986         status = pthread_attr_init(&attr);
13987         if( status ) return status;
13988
13989 #if HAVE_PTHREADS < 7
13990         status = pthread_attr_setdetachstate(&attr, &detach);
13991         if( status < 0 ) status = errno;
13992 #else
13993         status = pthread_attr_setdetachstate(&attr, detach);
13994 #endif
13995         if( status ) return status;
13996         status = pthread_create( &t, &attr, task, NULL );
13997 #if HAVE_PTHREADS < 7
13998         if( status < 0 ) status = errno;
13999 #endif
14000         if( status ) return status;
14001 #else
14002         /* Draft 4 pthreads */
14003         status = pthread_create( &t, pthread_attr_default, task, NULL );
14004         if( status ) return errno;
14005
14006         /* give thread a chance to complete */
14007         /* it should remain joinable and hence detachable */
14008         sleep( 1 );
14009
14010         status = pthread_detach( &t );
14011         if( status ) return errno;
14012 #endif
14013
14014 #ifdef HAVE_LINUX_THREADS
14015         pthread_kill_other_threads_np();
14016 #endif
14017
14018         return 0;
14019
14020 }
14021
14022 EOF
14023 if { (eval echo configure:14024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14024 then
14025   ol_cv_pthread_threads=yes
14026 else
14027   echo "configure: failed program was:" >&5
14028   cat conftest.$ac_ext >&5
14029   rm -fr conftest*
14030   ol_cv_pthread_threads=no
14031 fi
14032 rm -fr conftest*
14033 fi
14034
14035
14036                 # restore the LIBS
14037                 LIBS="$ol_LIBS"
14038         
14039 fi
14040
14041 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14042
14043         if test $ol_cv_pthread_threads = yes ; then
14044                 ol_link_pthreads="-threads"
14045                 ol_link_threads=posix
14046         fi
14047 fi
14048
14049
14050                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14051 if test "$ol_link_threads" = no ; then
14052         # try -lpthreads -lmach -lexc -lc_r
14053         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14054 echo "configure:14055: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14055 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14056   echo $ac_n "(cached) $ac_c" 1>&6
14057 else
14058   
14059                 # save the flags
14060                 ol_LIBS="$LIBS"
14061                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14062
14063                 if test "$cross_compiling" = yes; then
14064   cat > conftest.$ac_ext <<EOF
14065 #line 14066 "configure"
14066 #include "confdefs.h"
14067 /* pthread test headers */
14068 #include <pthread.h>
14069 #if HAVE_PTHREADS < 7
14070 #include <errno.h>
14071 #endif
14072 #ifndef NULL
14073 #define NULL (void*)0
14074 #endif
14075
14076 static void *task(p)
14077         void *p;
14078 {
14079         return (void *) (p == NULL);
14080 }
14081
14082 int main() {
14083
14084         /* pthread test function */
14085 #ifndef PTHREAD_CREATE_DETACHED
14086 #define PTHREAD_CREATE_DETACHED 1
14087 #endif
14088         pthread_t t;
14089         int status;
14090         int detach = PTHREAD_CREATE_DETACHED;
14091
14092 #if HAVE_PTHREADS > 4
14093         /* Final pthreads */
14094         pthread_attr_t attr;
14095
14096         status = pthread_attr_init(&attr);
14097         if( status ) return status;
14098
14099 #if HAVE_PTHREADS < 7
14100         status = pthread_attr_setdetachstate(&attr, &detach);
14101         if( status < 0 ) status = errno;
14102 #else
14103         status = pthread_attr_setdetachstate(&attr, detach);
14104 #endif
14105         if( status ) return status;
14106         status = pthread_create( &t, &attr, task, NULL );
14107 #if HAVE_PTHREADS < 7
14108         if( status < 0 ) status = errno;
14109 #endif
14110         if( status ) return status;
14111 #else
14112         /* Draft 4 pthreads */
14113         status = pthread_create( &t, pthread_attr_default, task, NULL );
14114         if( status ) return errno;
14115
14116         /* give thread a chance to complete */
14117         /* it should remain joinable and hence detachable */
14118         sleep( 1 );
14119
14120         status = pthread_detach( &t );
14121         if( status ) return errno;
14122 #endif
14123
14124 #ifdef HAVE_LINUX_THREADS
14125         pthread_kill_other_threads_np();
14126 #endif
14127
14128         return 0;
14129
14130 ; return 0; }
14131 EOF
14132 if { (eval echo configure:14133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14133   rm -rf conftest*
14134   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14135 else
14136   echo "configure: failed program was:" >&5
14137   cat conftest.$ac_ext >&5
14138   rm -rf conftest*
14139   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14140 fi
14141 rm -f conftest*
14142 else
14143   cat > conftest.$ac_ext <<EOF
14144 #line 14145 "configure"
14145 #include "confdefs.h"
14146 /* pthread test headers */
14147 #include <pthread.h>
14148 #if HAVE_PTHREADS < 7
14149 #include <errno.h>
14150 #endif
14151 #ifndef NULL
14152 #define NULL (void*)0
14153 #endif
14154
14155 static void *task(p)
14156         void *p;
14157 {
14158         return (void *) (p == NULL);
14159 }
14160
14161
14162 int main(argc, argv)
14163         int argc;
14164         char **argv;
14165 {
14166
14167         /* pthread test function */
14168 #ifndef PTHREAD_CREATE_DETACHED
14169 #define PTHREAD_CREATE_DETACHED 1
14170 #endif
14171         pthread_t t;
14172         int status;
14173         int detach = PTHREAD_CREATE_DETACHED;
14174
14175 #if HAVE_PTHREADS > 4
14176         /* Final pthreads */
14177         pthread_attr_t attr;
14178
14179         status = pthread_attr_init(&attr);
14180         if( status ) return status;
14181
14182 #if HAVE_PTHREADS < 7
14183         status = pthread_attr_setdetachstate(&attr, &detach);
14184         if( status < 0 ) status = errno;
14185 #else
14186         status = pthread_attr_setdetachstate(&attr, detach);
14187 #endif
14188         if( status ) return status;
14189         status = pthread_create( &t, &attr, task, NULL );
14190 #if HAVE_PTHREADS < 7
14191         if( status < 0 ) status = errno;
14192 #endif
14193         if( status ) return status;
14194 #else
14195         /* Draft 4 pthreads */
14196         status = pthread_create( &t, pthread_attr_default, task, NULL );
14197         if( status ) return errno;
14198
14199         /* give thread a chance to complete */
14200         /* it should remain joinable and hence detachable */
14201         sleep( 1 );
14202
14203         status = pthread_detach( &t );
14204         if( status ) return errno;
14205 #endif
14206
14207 #ifdef HAVE_LINUX_THREADS
14208         pthread_kill_other_threads_np();
14209 #endif
14210
14211         return 0;
14212
14213 }
14214
14215 EOF
14216 if { (eval echo configure:14217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14217 then
14218   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14219 else
14220   echo "configure: failed program was:" >&5
14221   cat conftest.$ac_ext >&5
14222   rm -fr conftest*
14223   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14224 fi
14225 rm -fr conftest*
14226 fi
14227
14228
14229                 # restore the LIBS
14230                 LIBS="$ol_LIBS"
14231         
14232 fi
14233
14234 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14235
14236         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14237                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14238                 ol_link_threads=posix
14239         fi
14240 fi
14241
14242                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14243 if test "$ol_link_threads" = no ; then
14244         # try -lpthreads -lmach -lexc
14245         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14246 echo "configure:14247: checking for pthread link with -lpthreads -lmach -lexc" >&5
14247 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14248   echo $ac_n "(cached) $ac_c" 1>&6
14249 else
14250   
14251                 # save the flags
14252                 ol_LIBS="$LIBS"
14253                 LIBS="-lpthreads -lmach -lexc $LIBS"
14254
14255                 if test "$cross_compiling" = yes; then
14256   cat > conftest.$ac_ext <<EOF
14257 #line 14258 "configure"
14258 #include "confdefs.h"
14259 /* pthread test headers */
14260 #include <pthread.h>
14261 #if HAVE_PTHREADS < 7
14262 #include <errno.h>
14263 #endif
14264 #ifndef NULL
14265 #define NULL (void*)0
14266 #endif
14267
14268 static void *task(p)
14269         void *p;
14270 {
14271         return (void *) (p == NULL);
14272 }
14273
14274 int main() {
14275
14276         /* pthread test function */
14277 #ifndef PTHREAD_CREATE_DETACHED
14278 #define PTHREAD_CREATE_DETACHED 1
14279 #endif
14280         pthread_t t;
14281         int status;
14282         int detach = PTHREAD_CREATE_DETACHED;
14283
14284 #if HAVE_PTHREADS > 4
14285         /* Final pthreads */
14286         pthread_attr_t attr;
14287
14288         status = pthread_attr_init(&attr);
14289         if( status ) return status;
14290
14291 #if HAVE_PTHREADS < 7
14292         status = pthread_attr_setdetachstate(&attr, &detach);
14293         if( status < 0 ) status = errno;
14294 #else
14295         status = pthread_attr_setdetachstate(&attr, detach);
14296 #endif
14297         if( status ) return status;
14298         status = pthread_create( &t, &attr, task, NULL );
14299 #if HAVE_PTHREADS < 7
14300         if( status < 0 ) status = errno;
14301 #endif
14302         if( status ) return status;
14303 #else
14304         /* Draft 4 pthreads */
14305         status = pthread_create( &t, pthread_attr_default, task, NULL );
14306         if( status ) return errno;
14307
14308         /* give thread a chance to complete */
14309         /* it should remain joinable and hence detachable */
14310         sleep( 1 );
14311
14312         status = pthread_detach( &t );
14313         if( status ) return errno;
14314 #endif
14315
14316 #ifdef HAVE_LINUX_THREADS
14317         pthread_kill_other_threads_np();
14318 #endif
14319
14320         return 0;
14321
14322 ; return 0; }
14323 EOF
14324 if { (eval echo configure:14325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14325   rm -rf conftest*
14326   ol_cv_pthread_lpthreads_lmach_lexc=yes
14327 else
14328   echo "configure: failed program was:" >&5
14329   cat conftest.$ac_ext >&5
14330   rm -rf conftest*
14331   ol_cv_pthread_lpthreads_lmach_lexc=no
14332 fi
14333 rm -f conftest*
14334 else
14335   cat > conftest.$ac_ext <<EOF
14336 #line 14337 "configure"
14337 #include "confdefs.h"
14338 /* pthread test headers */
14339 #include <pthread.h>
14340 #if HAVE_PTHREADS < 7
14341 #include <errno.h>
14342 #endif
14343 #ifndef NULL
14344 #define NULL (void*)0
14345 #endif
14346
14347 static void *task(p)
14348         void *p;
14349 {
14350         return (void *) (p == NULL);
14351 }
14352
14353
14354 int main(argc, argv)
14355         int argc;
14356         char **argv;
14357 {
14358
14359         /* pthread test function */
14360 #ifndef PTHREAD_CREATE_DETACHED
14361 #define PTHREAD_CREATE_DETACHED 1
14362 #endif
14363         pthread_t t;
14364         int status;
14365         int detach = PTHREAD_CREATE_DETACHED;
14366
14367 #if HAVE_PTHREADS > 4
14368         /* Final pthreads */
14369         pthread_attr_t attr;
14370
14371         status = pthread_attr_init(&attr);
14372         if( status ) return status;
14373
14374 #if HAVE_PTHREADS < 7
14375         status = pthread_attr_setdetachstate(&attr, &detach);
14376         if( status < 0 ) status = errno;
14377 #else
14378         status = pthread_attr_setdetachstate(&attr, detach);
14379 #endif
14380         if( status ) return status;
14381         status = pthread_create( &t, &attr, task, NULL );
14382 #if HAVE_PTHREADS < 7
14383         if( status < 0 ) status = errno;
14384 #endif
14385         if( status ) return status;
14386 #else
14387         /* Draft 4 pthreads */
14388         status = pthread_create( &t, pthread_attr_default, task, NULL );
14389         if( status ) return errno;
14390
14391         /* give thread a chance to complete */
14392         /* it should remain joinable and hence detachable */
14393         sleep( 1 );
14394
14395         status = pthread_detach( &t );
14396         if( status ) return errno;
14397 #endif
14398
14399 #ifdef HAVE_LINUX_THREADS
14400         pthread_kill_other_threads_np();
14401 #endif
14402
14403         return 0;
14404
14405 }
14406
14407 EOF
14408 if { (eval echo configure:14409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14409 then
14410   ol_cv_pthread_lpthreads_lmach_lexc=yes
14411 else
14412   echo "configure: failed program was:" >&5
14413   cat conftest.$ac_ext >&5
14414   rm -fr conftest*
14415   ol_cv_pthread_lpthreads_lmach_lexc=no
14416 fi
14417 rm -fr conftest*
14418 fi
14419
14420
14421                 # restore the LIBS
14422                 LIBS="$ol_LIBS"
14423         
14424 fi
14425
14426 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14427
14428         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14429                 ol_link_pthreads="-lpthreads -lmach -lexc"
14430                 ol_link_threads=posix
14431         fi
14432 fi
14433
14434                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14435 if test "$ol_link_threads" = no ; then
14436         # try -lpthreads -lexc
14437         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14438 echo "configure:14439: checking for pthread link with -lpthreads -lexc" >&5
14439 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14440   echo $ac_n "(cached) $ac_c" 1>&6
14441 else
14442   
14443                 # save the flags
14444                 ol_LIBS="$LIBS"
14445                 LIBS="-lpthreads -lexc $LIBS"
14446
14447                 if test "$cross_compiling" = yes; then
14448   cat > conftest.$ac_ext <<EOF
14449 #line 14450 "configure"
14450 #include "confdefs.h"
14451 /* pthread test headers */
14452 #include <pthread.h>
14453 #if HAVE_PTHREADS < 7
14454 #include <errno.h>
14455 #endif
14456 #ifndef NULL
14457 #define NULL (void*)0
14458 #endif
14459
14460 static void *task(p)
14461         void *p;
14462 {
14463         return (void *) (p == NULL);
14464 }
14465
14466 int main() {
14467
14468         /* pthread test function */
14469 #ifndef PTHREAD_CREATE_DETACHED
14470 #define PTHREAD_CREATE_DETACHED 1
14471 #endif
14472         pthread_t t;
14473         int status;
14474         int detach = PTHREAD_CREATE_DETACHED;
14475
14476 #if HAVE_PTHREADS > 4
14477         /* Final pthreads */
14478         pthread_attr_t attr;
14479
14480         status = pthread_attr_init(&attr);
14481         if( status ) return status;
14482
14483 #if HAVE_PTHREADS < 7
14484         status = pthread_attr_setdetachstate(&attr, &detach);
14485         if( status < 0 ) status = errno;
14486 #else
14487         status = pthread_attr_setdetachstate(&attr, detach);
14488 #endif
14489         if( status ) return status;
14490         status = pthread_create( &t, &attr, task, NULL );
14491 #if HAVE_PTHREADS < 7
14492         if( status < 0 ) status = errno;
14493 #endif
14494         if( status ) return status;
14495 #else
14496         /* Draft 4 pthreads */
14497         status = pthread_create( &t, pthread_attr_default, task, NULL );
14498         if( status ) return errno;
14499
14500         /* give thread a chance to complete */
14501         /* it should remain joinable and hence detachable */
14502         sleep( 1 );
14503
14504         status = pthread_detach( &t );
14505         if( status ) return errno;
14506 #endif
14507
14508 #ifdef HAVE_LINUX_THREADS
14509         pthread_kill_other_threads_np();
14510 #endif
14511
14512         return 0;
14513
14514 ; return 0; }
14515 EOF
14516 if { (eval echo configure:14517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14517   rm -rf conftest*
14518   ol_cv_pthread_lpthreads_lexc=yes
14519 else
14520   echo "configure: failed program was:" >&5
14521   cat conftest.$ac_ext >&5
14522   rm -rf conftest*
14523   ol_cv_pthread_lpthreads_lexc=no
14524 fi
14525 rm -f conftest*
14526 else
14527   cat > conftest.$ac_ext <<EOF
14528 #line 14529 "configure"
14529 #include "confdefs.h"
14530 /* pthread test headers */
14531 #include <pthread.h>
14532 #if HAVE_PTHREADS < 7
14533 #include <errno.h>
14534 #endif
14535 #ifndef NULL
14536 #define NULL (void*)0
14537 #endif
14538
14539 static void *task(p)
14540         void *p;
14541 {
14542         return (void *) (p == NULL);
14543 }
14544
14545
14546 int main(argc, argv)
14547         int argc;
14548         char **argv;
14549 {
14550
14551         /* pthread test function */
14552 #ifndef PTHREAD_CREATE_DETACHED
14553 #define PTHREAD_CREATE_DETACHED 1
14554 #endif
14555         pthread_t t;
14556         int status;
14557         int detach = PTHREAD_CREATE_DETACHED;
14558
14559 #if HAVE_PTHREADS > 4
14560         /* Final pthreads */
14561         pthread_attr_t attr;
14562
14563         status = pthread_attr_init(&attr);
14564         if( status ) return status;
14565
14566 #if HAVE_PTHREADS < 7
14567         status = pthread_attr_setdetachstate(&attr, &detach);
14568         if( status < 0 ) status = errno;
14569 #else
14570         status = pthread_attr_setdetachstate(&attr, detach);
14571 #endif
14572         if( status ) return status;
14573         status = pthread_create( &t, &attr, task, NULL );
14574 #if HAVE_PTHREADS < 7
14575         if( status < 0 ) status = errno;
14576 #endif
14577         if( status ) return status;
14578 #else
14579         /* Draft 4 pthreads */
14580         status = pthread_create( &t, pthread_attr_default, task, NULL );
14581         if( status ) return errno;
14582
14583         /* give thread a chance to complete */
14584         /* it should remain joinable and hence detachable */
14585         sleep( 1 );
14586
14587         status = pthread_detach( &t );
14588         if( status ) return errno;
14589 #endif
14590
14591 #ifdef HAVE_LINUX_THREADS
14592         pthread_kill_other_threads_np();
14593 #endif
14594
14595         return 0;
14596
14597 }
14598
14599 EOF
14600 if { (eval echo configure:14601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14601 then
14602   ol_cv_pthread_lpthreads_lexc=yes
14603 else
14604   echo "configure: failed program was:" >&5
14605   cat conftest.$ac_ext >&5
14606   rm -fr conftest*
14607   ol_cv_pthread_lpthreads_lexc=no
14608 fi
14609 rm -fr conftest*
14610 fi
14611
14612
14613                 # restore the LIBS
14614                 LIBS="$ol_LIBS"
14615         
14616 fi
14617
14618 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14619
14620         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14621                 ol_link_pthreads="-lpthreads -lexc"
14622                 ol_link_threads=posix
14623         fi
14624 fi
14625
14626
14627                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14628 if test "$ol_link_threads" = no ; then
14629         # try -lpthreads
14630         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14631 echo "configure:14632: checking for pthread link with -lpthreads" >&5
14632 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14633   echo $ac_n "(cached) $ac_c" 1>&6
14634 else
14635   
14636                 # save the flags
14637                 ol_LIBS="$LIBS"
14638                 LIBS="-lpthreads $LIBS"
14639
14640                 if test "$cross_compiling" = yes; then
14641   cat > conftest.$ac_ext <<EOF
14642 #line 14643 "configure"
14643 #include "confdefs.h"
14644 /* pthread test headers */
14645 #include <pthread.h>
14646 #if HAVE_PTHREADS < 7
14647 #include <errno.h>
14648 #endif
14649 #ifndef NULL
14650 #define NULL (void*)0
14651 #endif
14652
14653 static void *task(p)
14654         void *p;
14655 {
14656         return (void *) (p == NULL);
14657 }
14658
14659 int main() {
14660
14661         /* pthread test function */
14662 #ifndef PTHREAD_CREATE_DETACHED
14663 #define PTHREAD_CREATE_DETACHED 1
14664 #endif
14665         pthread_t t;
14666         int status;
14667         int detach = PTHREAD_CREATE_DETACHED;
14668
14669 #if HAVE_PTHREADS > 4
14670         /* Final pthreads */
14671         pthread_attr_t attr;
14672
14673         status = pthread_attr_init(&attr);
14674         if( status ) return status;
14675
14676 #if HAVE_PTHREADS < 7
14677         status = pthread_attr_setdetachstate(&attr, &detach);
14678         if( status < 0 ) status = errno;
14679 #else
14680         status = pthread_attr_setdetachstate(&attr, detach);
14681 #endif
14682         if( status ) return status;
14683         status = pthread_create( &t, &attr, task, NULL );
14684 #if HAVE_PTHREADS < 7
14685         if( status < 0 ) status = errno;
14686 #endif
14687         if( status ) return status;
14688 #else
14689         /* Draft 4 pthreads */
14690         status = pthread_create( &t, pthread_attr_default, task, NULL );
14691         if( status ) return errno;
14692
14693         /* give thread a chance to complete */
14694         /* it should remain joinable and hence detachable */
14695         sleep( 1 );
14696
14697         status = pthread_detach( &t );
14698         if( status ) return errno;
14699 #endif
14700
14701 #ifdef HAVE_LINUX_THREADS
14702         pthread_kill_other_threads_np();
14703 #endif
14704
14705         return 0;
14706
14707 ; return 0; }
14708 EOF
14709 if { (eval echo configure:14710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14710   rm -rf conftest*
14711   ol_cv_pthread_lib_lpthreads=yes
14712 else
14713   echo "configure: failed program was:" >&5
14714   cat conftest.$ac_ext >&5
14715   rm -rf conftest*
14716   ol_cv_pthread_lib_lpthreads=no
14717 fi
14718 rm -f conftest*
14719 else
14720   cat > conftest.$ac_ext <<EOF
14721 #line 14722 "configure"
14722 #include "confdefs.h"
14723 /* pthread test headers */
14724 #include <pthread.h>
14725 #if HAVE_PTHREADS < 7
14726 #include <errno.h>
14727 #endif
14728 #ifndef NULL
14729 #define NULL (void*)0
14730 #endif
14731
14732 static void *task(p)
14733         void *p;
14734 {
14735         return (void *) (p == NULL);
14736 }
14737
14738
14739 int main(argc, argv)
14740         int argc;
14741         char **argv;
14742 {
14743
14744         /* pthread test function */
14745 #ifndef PTHREAD_CREATE_DETACHED
14746 #define PTHREAD_CREATE_DETACHED 1
14747 #endif
14748         pthread_t t;
14749         int status;
14750         int detach = PTHREAD_CREATE_DETACHED;
14751
14752 #if HAVE_PTHREADS > 4
14753         /* Final pthreads */
14754         pthread_attr_t attr;
14755
14756         status = pthread_attr_init(&attr);
14757         if( status ) return status;
14758
14759 #if HAVE_PTHREADS < 7
14760         status = pthread_attr_setdetachstate(&attr, &detach);
14761         if( status < 0 ) status = errno;
14762 #else
14763         status = pthread_attr_setdetachstate(&attr, detach);
14764 #endif
14765         if( status ) return status;
14766         status = pthread_create( &t, &attr, task, NULL );
14767 #if HAVE_PTHREADS < 7
14768         if( status < 0 ) status = errno;
14769 #endif
14770         if( status ) return status;
14771 #else
14772         /* Draft 4 pthreads */
14773         status = pthread_create( &t, pthread_attr_default, task, NULL );
14774         if( status ) return errno;
14775
14776         /* give thread a chance to complete */
14777         /* it should remain joinable and hence detachable */
14778         sleep( 1 );
14779
14780         status = pthread_detach( &t );
14781         if( status ) return errno;
14782 #endif
14783
14784 #ifdef HAVE_LINUX_THREADS
14785         pthread_kill_other_threads_np();
14786 #endif
14787
14788         return 0;
14789
14790 }
14791
14792 EOF
14793 if { (eval echo configure:14794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14794 then
14795   ol_cv_pthread_lib_lpthreads=yes
14796 else
14797   echo "configure: failed program was:" >&5
14798   cat conftest.$ac_ext >&5
14799   rm -fr conftest*
14800   ol_cv_pthread_lib_lpthreads=no
14801 fi
14802 rm -fr conftest*
14803 fi
14804
14805
14806                 # restore the LIBS
14807                 LIBS="$ol_LIBS"
14808         
14809 fi
14810
14811 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14812
14813         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14814                 ol_link_pthreads="-lpthreads"
14815                 ol_link_threads=posix
14816         fi
14817 fi
14818
14819
14820                 if test $ol_link_threads != no ; then
14821                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14822
14823                                                 save_CPPFLAGS="$CPPFLAGS"
14824                         save_LIBS="$LIBS"
14825                         LIBS="$LTHREAD_LIBS $LIBS"
14826
14827                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14828 do
14829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14830 echo "configure:14831: checking for $ac_func" >&5
14831 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14832   echo $ac_n "(cached) $ac_c" 1>&6
14833 else
14834   cat > conftest.$ac_ext <<EOF
14835 #line 14836 "configure"
14836 #include "confdefs.h"
14837 /* System header to define __stub macros and hopefully few prototypes,
14838     which can conflict with char $ac_func(); below.  */
14839 #include <assert.h>
14840 /* Override any gcc2 internal prototype to avoid an error.  */
14841 /* We use char because int might match the return type of a gcc2
14842     builtin and then its argument prototype would still apply.  */
14843 char $ac_func();
14844 char (*f)();
14845
14846 int main() {
14847
14848 /* The GNU C library defines this for functions which it implements
14849     to always fail with ENOSYS.  Some functions are actually named
14850     something starting with __ and the normal name is an alias.  */
14851 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14852 choke me
14853 #else
14854 f = $ac_func;
14855 #endif
14856
14857 ; return 0; }
14858 EOF
14859 if { (eval echo configure:14860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14860   rm -rf conftest*
14861   eval "ac_cv_func_$ac_func=yes"
14862 else
14863   echo "configure: failed program was:" >&5
14864   cat conftest.$ac_ext >&5
14865   rm -rf conftest*
14866   eval "ac_cv_func_$ac_func=no"
14867 fi
14868 rm -f conftest*
14869 fi
14870
14871 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14872   echo "$ac_t""yes" 1>&6
14873     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14874   cat >> confdefs.h <<EOF
14875 #define $ac_tr_func 1
14876 EOF
14877  
14878 else
14879   echo "$ac_t""no" 1>&6
14880 fi
14881 done
14882
14883
14884                         if test $ac_cv_func_sched_yield = no -a \
14885                                 $ac_cv_func_pthread_yield = no -a \
14886                                 $ac_cv_func_thr_yield = no ; then
14887                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14888 echo "configure:14889: checking for sched_yield in -lrt" >&5
14889 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14891   echo $ac_n "(cached) $ac_c" 1>&6
14892 else
14893   ac_save_LIBS="$LIBS"
14894 LIBS="-lrt  $LIBS"
14895 cat > conftest.$ac_ext <<EOF
14896 #line 14897 "configure"
14897 #include "confdefs.h"
14898 /* Override any gcc2 internal prototype to avoid an error.  */
14899 /* We use char because int might match the return type of a gcc2
14900     builtin and then its argument prototype would still apply.  */
14901 char sched_yield();
14902
14903 int main() {
14904 sched_yield()
14905 ; return 0; }
14906 EOF
14907 if { (eval echo configure:14908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14908   rm -rf conftest*
14909   eval "ac_cv_lib_$ac_lib_var=yes"
14910 else
14911   echo "configure: failed program was:" >&5
14912   cat conftest.$ac_ext >&5
14913   rm -rf conftest*
14914   eval "ac_cv_lib_$ac_lib_var=no"
14915 fi
14916 rm -f conftest*
14917 LIBS="$ac_save_LIBS"
14918
14919 fi
14920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14921   echo "$ac_t""yes" 1>&6
14922   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14923                                         cat >> confdefs.h <<\EOF
14924 #define HAVE_SCHED_YIELD 1
14925 EOF
14926
14927                                         ac_cv_func_sched_yield=yes
14928 else
14929   echo "$ac_t""no" 1>&6
14930 ac_cv_func_sched_yield=no
14931 fi
14932
14933                         fi
14934                         if test $ac_cv_func_sched_yield = no -a \
14935                                 $ac_cv_func_pthread_yield = no -a \
14936                                 "$ac_cv_func_thr_yield" = no ; then
14937                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14938                         fi
14939
14940                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14941 do
14942 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14943 echo "configure:14944: checking for $ac_func" >&5
14944 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14945   echo $ac_n "(cached) $ac_c" 1>&6
14946 else
14947   cat > conftest.$ac_ext <<EOF
14948 #line 14949 "configure"
14949 #include "confdefs.h"
14950 /* System header to define __stub macros and hopefully few prototypes,
14951     which can conflict with char $ac_func(); below.  */
14952 #include <assert.h>
14953 /* Override any gcc2 internal prototype to avoid an error.  */
14954 /* We use char because int might match the return type of a gcc2
14955     builtin and then its argument prototype would still apply.  */
14956 char $ac_func();
14957 char (*f)();
14958
14959 int main() {
14960
14961 /* The GNU C library defines this for functions which it implements
14962     to always fail with ENOSYS.  Some functions are actually named
14963     something starting with __ and the normal name is an alias.  */
14964 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14965 choke me
14966 #else
14967 f = $ac_func;
14968 #endif
14969
14970 ; return 0; }
14971 EOF
14972 if { (eval echo configure:14973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14973   rm -rf conftest*
14974   eval "ac_cv_func_$ac_func=yes"
14975 else
14976   echo "configure: failed program was:" >&5
14977   cat conftest.$ac_ext >&5
14978   rm -rf conftest*
14979   eval "ac_cv_func_$ac_func=no"
14980 fi
14981 rm -f conftest*
14982 fi
14983
14984 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14985   echo "$ac_t""yes" 1>&6
14986     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14987   cat >> confdefs.h <<EOF
14988 #define $ac_tr_func 1
14989 EOF
14990  
14991 else
14992   echo "$ac_t""no" 1>&6
14993 fi
14994 done
14995
14996
14997                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14998 echo "configure:14999: checking for pthread_detach with <pthread.h>" >&5
14999 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15000   echo $ac_n "(cached) $ac_c" 1>&6
15001 else
15002   
15003                                                                 cat > conftest.$ac_ext <<EOF
15004 #line 15005 "configure"
15005 #include "confdefs.h"
15006
15007 #include <pthread.h>
15008 #ifndef NULL
15009 #define NULL (void*)0
15010 #endif
15011
15012 int main() {
15013 pthread_detach(NULL);
15014 ; return 0; }
15015 EOF
15016 if { (eval echo configure:15017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15017   rm -rf conftest*
15018   ol_cv_func_pthread_detach=yes
15019 else
15020   echo "configure: failed program was:" >&5
15021   cat conftest.$ac_ext >&5
15022   rm -rf conftest*
15023   ol_cv_func_pthread_detach=no
15024 fi
15025 rm -f conftest*
15026                         
15027 fi
15028
15029 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15030
15031                         if test $ol_cv_func_pthread_detach = no ; then
15032                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15033                         fi
15034
15035                         cat >> confdefs.h <<\EOF
15036 #define HAVE_PTHREAD_DETACH 1
15037 EOF
15038
15039
15040                                                 for ac_func in \
15041                                 pthread_setconcurrency \
15042                                 pthread_getconcurrency \
15043                                 thr_setconcurrency \
15044                                 thr_getconcurrency \
15045                         
15046 do
15047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15048 echo "configure:15049: checking for $ac_func" >&5
15049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15050   echo $ac_n "(cached) $ac_c" 1>&6
15051 else
15052   cat > conftest.$ac_ext <<EOF
15053 #line 15054 "configure"
15054 #include "confdefs.h"
15055 /* System header to define __stub macros and hopefully few prototypes,
15056     which can conflict with char $ac_func(); below.  */
15057 #include <assert.h>
15058 /* Override any gcc2 internal prototype to avoid an error.  */
15059 /* We use char because int might match the return type of a gcc2
15060     builtin and then its argument prototype would still apply.  */
15061 char $ac_func();
15062 char (*f)();
15063
15064 int main() {
15065
15066 /* The GNU C library defines this for functions which it implements
15067     to always fail with ENOSYS.  Some functions are actually named
15068     something starting with __ and the normal name is an alias.  */
15069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15070 choke me
15071 #else
15072 f = $ac_func;
15073 #endif
15074
15075 ; return 0; }
15076 EOF
15077 if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15078   rm -rf conftest*
15079   eval "ac_cv_func_$ac_func=yes"
15080 else
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -rf conftest*
15084   eval "ac_cv_func_$ac_func=no"
15085 fi
15086 rm -f conftest*
15087 fi
15088
15089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15090   echo "$ac_t""yes" 1>&6
15091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15092   cat >> confdefs.h <<EOF
15093 #define $ac_tr_func 1
15094 EOF
15095  
15096 else
15097   echo "$ac_t""no" 1>&6
15098 fi
15099 done
15100
15101
15102                         
15103         for ac_func in pthread_kill_other_threads_np
15104 do
15105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15106 echo "configure:15107: checking for $ac_func" >&5
15107 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15108   echo $ac_n "(cached) $ac_c" 1>&6
15109 else
15110   cat > conftest.$ac_ext <<EOF
15111 #line 15112 "configure"
15112 #include "confdefs.h"
15113 /* System header to define __stub macros and hopefully few prototypes,
15114     which can conflict with char $ac_func(); below.  */
15115 #include <assert.h>
15116 /* Override any gcc2 internal prototype to avoid an error.  */
15117 /* We use char because int might match the return type of a gcc2
15118     builtin and then its argument prototype would still apply.  */
15119 char $ac_func();
15120 char (*f)();
15121
15122 int main() {
15123
15124 /* The GNU C library defines this for functions which it implements
15125     to always fail with ENOSYS.  Some functions are actually named
15126     something starting with __ and the normal name is an alias.  */
15127 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15128 choke me
15129 #else
15130 f = $ac_func;
15131 #endif
15132
15133 ; return 0; }
15134 EOF
15135 if { (eval echo configure:15136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15136   rm -rf conftest*
15137   eval "ac_cv_func_$ac_func=yes"
15138 else
15139   echo "configure: failed program was:" >&5
15140   cat conftest.$ac_ext >&5
15141   rm -rf conftest*
15142   eval "ac_cv_func_$ac_func=no"
15143 fi
15144 rm -f conftest*
15145 fi
15146
15147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15148   echo "$ac_t""yes" 1>&6
15149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15150   cat >> confdefs.h <<EOF
15151 #define $ac_tr_func 1
15152 EOF
15153  
15154 else
15155   echo "$ac_t""no" 1>&6
15156 fi
15157 done
15158
15159         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15160 echo "configure:15161: checking for LinuxThreads implementation" >&5
15161 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15162   echo $ac_n "(cached) $ac_c" 1>&6
15163 else
15164   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15165 fi
15166
15167 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15168
15169                         
15170         
15171         
15172         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15173 echo "configure:15174: checking for LinuxThreads consistency" >&5
15174 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15175   echo $ac_n "(cached) $ac_c" 1>&6
15176 else
15177   
15178                 if test $ol_cv_header_linux_threads = yes -a \
15179                         $ol_cv_sys_linux_threads = yes; then
15180                         ol_cv_linux_threads=yes
15181                 elif test $ol_cv_header_linux_threads = no -a \
15182                         $ol_cv_sys_linux_threads = no; then
15183                         ol_cv_linux_threads=no
15184                 else
15185                         ol_cv_linux_threads=error
15186                 fi
15187         
15188 fi
15189
15190 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15191
15192
15193                         if test $ol_cv_linux_threads = error; then
15194                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15195                         fi
15196
15197                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15198 echo "configure:15199: checking if pthread_create() works" >&5
15199 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15200   echo $ac_n "(cached) $ac_c" 1>&6
15201 else
15202   
15203                         if test "$cross_compiling" = yes; then
15204                                 ol_cv_pthread_create_works=yes
15205 else
15206   cat > conftest.$ac_ext <<EOF
15207 #line 15208 "configure"
15208 #include "confdefs.h"
15209 /* pthread test headers */
15210 #include <pthread.h>
15211 #if HAVE_PTHREADS < 7
15212 #include <errno.h>
15213 #endif
15214 #ifndef NULL
15215 #define NULL (void*)0
15216 #endif
15217
15218 static void *task(p)
15219         void *p;
15220 {
15221         return (void *) (p == NULL);
15222 }
15223
15224
15225 int main(argc, argv)
15226         int argc;
15227         char **argv;
15228 {
15229
15230         /* pthread test function */
15231 #ifndef PTHREAD_CREATE_DETACHED
15232 #define PTHREAD_CREATE_DETACHED 1
15233 #endif
15234         pthread_t t;
15235         int status;
15236         int detach = PTHREAD_CREATE_DETACHED;
15237
15238 #if HAVE_PTHREADS > 4
15239         /* Final pthreads */
15240         pthread_attr_t attr;
15241
15242         status = pthread_attr_init(&attr);
15243         if( status ) return status;
15244
15245 #if HAVE_PTHREADS < 7
15246         status = pthread_attr_setdetachstate(&attr, &detach);
15247         if( status < 0 ) status = errno;
15248 #else
15249         status = pthread_attr_setdetachstate(&attr, detach);
15250 #endif
15251         if( status ) return status;
15252         status = pthread_create( &t, &attr, task, NULL );
15253 #if HAVE_PTHREADS < 7
15254         if( status < 0 ) status = errno;
15255 #endif
15256         if( status ) return status;
15257 #else
15258         /* Draft 4 pthreads */
15259         status = pthread_create( &t, pthread_attr_default, task, NULL );
15260         if( status ) return errno;
15261
15262         /* give thread a chance to complete */
15263         /* it should remain joinable and hence detachable */
15264         sleep( 1 );
15265
15266         status = pthread_detach( &t );
15267         if( status ) return errno;
15268 #endif
15269
15270 #ifdef HAVE_LINUX_THREADS
15271         pthread_kill_other_threads_np();
15272 #endif
15273
15274         return 0;
15275
15276 }
15277
15278 EOF
15279 if { (eval echo configure:15280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15280 then
15281   ol_cv_pthread_create_works=yes
15282 else
15283   echo "configure: failed program was:" >&5
15284   cat conftest.$ac_ext >&5
15285   rm -fr conftest*
15286   ol_cv_pthread_create_works=no
15287 fi
15288 rm -fr conftest*
15289 fi
15290
15291 fi
15292
15293 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15294
15295                         if test $ol_cv_pthread_create_works = no ; then
15296                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15297                         fi
15298
15299                                                 if test $ol_with_yielding_select = auto ; then
15300                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15301 echo "configure:15302: checking if select yields when using pthreads" >&5
15302 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15303   echo $ac_n "(cached) $ac_c" 1>&6
15304 else
15305   
15306                                 if test "$cross_compiling" = yes; then
15307   ol_cv_pthread_select_yields=cross
15308 else
15309   cat > conftest.$ac_ext <<EOF
15310 #line 15311 "configure"
15311 #include "confdefs.h"
15312
15313 #include <sys/types.h>
15314 #include <sys/time.h>
15315 #include <unistd.h>
15316 #include <pthread.h>
15317 #ifndef NULL
15318 #define NULL (void*) 0
15319 #endif
15320
15321 static int fildes[2];
15322
15323 static void *task(p)
15324         void *p;
15325 {
15326         int i;
15327         struct timeval tv;
15328
15329         fd_set rfds;
15330
15331         tv.tv_sec=10;
15332         tv.tv_usec=0;
15333
15334         FD_ZERO(&rfds);
15335         FD_SET(fildes[0], &rfds);
15336
15337         /* we're not interested in any fds */
15338         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15339
15340         if(i < 0) {
15341                 perror("select");
15342                 exit(10);
15343         }
15344
15345         exit(0); /* if we exit here, the select blocked the whole process */
15346 }
15347
15348 int main(argc, argv)
15349         int argc;
15350         char **argv;
15351 {
15352         pthread_t t;
15353
15354         /* create a pipe to select */
15355         if(pipe(&fildes[0])) {
15356                 perror("select");
15357                 exit(1);
15358         }
15359
15360 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15361         (void) pthread_setconcurrency(2);
15362 #else
15363 #ifdef HAVE_THR_SETCONCURRENCY
15364         /* Set Solaris LWP concurrency to 2 */
15365         thr_setconcurrency(2);
15366 #endif
15367 #endif
15368
15369 #if HAVE_PTHREADS < 6
15370         pthread_create(&t, pthread_attr_default, task, NULL);
15371 #else
15372         pthread_create(&t, NULL, task, NULL);
15373 #endif
15374
15375         /* make sure task runs first */
15376 #if HAVE_THR_YIELD
15377         thr_yield();
15378 #elif defined( HAVE_SCHED_YIELD )
15379         sched_yield();
15380 #elif defined( HAVE_PTHREAD_YIELD )
15381         pthread_yield();
15382 #endif
15383
15384         exit(2);
15385 }
15386 EOF
15387 if { (eval echo configure:15388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15388 then
15389   ol_cv_pthread_select_yields=no
15390 else
15391   echo "configure: failed program was:" >&5
15392   cat conftest.$ac_ext >&5
15393   rm -fr conftest*
15394   ol_cv_pthread_select_yields=yes
15395 fi
15396 rm -fr conftest*
15397 fi
15398
15399 fi
15400
15401 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15402
15403                                 if test $ol_cv_pthread_select_yields = cross ; then
15404                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15405                                 fi
15406
15407                                 if test $ol_cv_pthread_select_yields = yes ; then
15408                                         ol_with_yielding_select=yes
15409                                 fi
15410                         fi
15411
15412                                                 CPPFLAGS="$save_CPPFLAGS"
15413                         LIBS="$save_LIBS"
15414                 else
15415                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15416                 fi
15417         fi
15418
15419         if test $ol_with_threads = posix ; then
15420                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15421         fi
15422 fi
15423
15424 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15425         -o $ol_with_threads = mach ; then
15426
15427                 for ac_hdr in mach/cthreads.h cthreads.h
15428 do
15429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15431 echo "configure:15432: checking for $ac_hdr" >&5
15432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15433   echo $ac_n "(cached) $ac_c" 1>&6
15434 else
15435   cat > conftest.$ac_ext <<EOF
15436 #line 15437 "configure"
15437 #include "confdefs.h"
15438 #include <$ac_hdr>
15439 EOF
15440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15441 { (eval echo configure:15442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15443 if test -z "$ac_err"; then
15444   rm -rf conftest*
15445   eval "ac_cv_header_$ac_safe=yes"
15446 else
15447   echo "$ac_err" >&5
15448   echo "configure: failed program was:" >&5
15449   cat conftest.$ac_ext >&5
15450   rm -rf conftest*
15451   eval "ac_cv_header_$ac_safe=no"
15452 fi
15453 rm -f conftest*
15454 fi
15455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15456   echo "$ac_t""yes" 1>&6
15457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15458   cat >> confdefs.h <<EOF
15459 #define $ac_tr_hdr 1
15460 EOF
15461  
15462 else
15463   echo "$ac_t""no" 1>&6
15464 fi
15465 done
15466
15467         if test $ac_cv_header_mach_cthreads_h = yes ; then
15468                 ol_with_threads=found
15469
15470                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15471 echo "configure:15472: checking for cthread_fork" >&5
15472 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15473   echo $ac_n "(cached) $ac_c" 1>&6
15474 else
15475   cat > conftest.$ac_ext <<EOF
15476 #line 15477 "configure"
15477 #include "confdefs.h"
15478 /* System header to define __stub macros and hopefully few prototypes,
15479     which can conflict with char cthread_fork(); below.  */
15480 #include <assert.h>
15481 /* Override any gcc2 internal prototype to avoid an error.  */
15482 /* We use char because int might match the return type of a gcc2
15483     builtin and then its argument prototype would still apply.  */
15484 char cthread_fork();
15485 char (*f)();
15486
15487 int main() {
15488
15489 /* The GNU C library defines this for functions which it implements
15490     to always fail with ENOSYS.  Some functions are actually named
15491     something starting with __ and the normal name is an alias.  */
15492 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15493 choke me
15494 #else
15495 f = cthread_fork;
15496 #endif
15497
15498 ; return 0; }
15499 EOF
15500 if { (eval echo configure:15501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15501   rm -rf conftest*
15502   eval "ac_cv_func_cthread_fork=yes"
15503 else
15504   echo "configure: failed program was:" >&5
15505   cat conftest.$ac_ext >&5
15506   rm -rf conftest*
15507   eval "ac_cv_func_cthread_fork=no"
15508 fi
15509 rm -f conftest*
15510 fi
15511
15512 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15513   echo "$ac_t""yes" 1>&6
15514   ol_link_threads=yes
15515 else
15516   echo "$ac_t""no" 1>&6
15517 fi
15518
15519
15520                 if test $ol_link_threads = no ; then
15521                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15522 echo "configure:15523: checking for cthread_fork with -all_load" >&5
15523 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15524   echo $ac_n "(cached) $ac_c" 1>&6
15525 else
15526   
15527                                                                 save_LIBS="$LIBS"
15528                                 LIBS="-all_load $LIBS"
15529                                 cat > conftest.$ac_ext <<EOF
15530 #line 15531 "configure"
15531 #include "confdefs.h"
15532 #include <mach/cthreads.h>
15533 int main() {
15534
15535                                         cthread_fork((void *)0, (void *)0);
15536                                         
15537 ; return 0; }
15538 EOF
15539 if { (eval echo configure:15540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15540   rm -rf conftest*
15541   ol_cv_cthread_all_load=yes
15542 else
15543   echo "configure: failed program was:" >&5
15544   cat conftest.$ac_ext >&5
15545   rm -rf conftest*
15546   ol_cv_cthread_all_load=no
15547 fi
15548 rm -f conftest*
15549                                                                 LIBS="$save_LIBS"
15550                         
15551 fi
15552
15553 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15554
15555                         if test $ol_cv_cthread_all_load = yes ; then
15556                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15557                                 ol_link_threads=mach
15558                                 ol_with_threads=found
15559                         fi
15560                 fi
15561
15562         elif test $ac_cv_header_cthreads_h = yes ; then
15563                                 
15564                 ol_with_threads=found
15565  
15566                                 save_LIBS="$LIBS"
15567                 LIBS="$LIBS -lthreads"
15568                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15569 echo "configure:15570: checking for cthread_fork" >&5
15570 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15571   echo $ac_n "(cached) $ac_c" 1>&6
15572 else
15573   cat > conftest.$ac_ext <<EOF
15574 #line 15575 "configure"
15575 #include "confdefs.h"
15576 /* System header to define __stub macros and hopefully few prototypes,
15577     which can conflict with char cthread_fork(); below.  */
15578 #include <assert.h>
15579 /* Override any gcc2 internal prototype to avoid an error.  */
15580 /* We use char because int might match the return type of a gcc2
15581     builtin and then its argument prototype would still apply.  */
15582 char cthread_fork();
15583 char (*f)();
15584
15585 int main() {
15586
15587 /* The GNU C library defines this for functions which it implements
15588     to always fail with ENOSYS.  Some functions are actually named
15589     something starting with __ and the normal name is an alias.  */
15590 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15591 choke me
15592 #else
15593 f = cthread_fork;
15594 #endif
15595
15596 ; return 0; }
15597 EOF
15598 if { (eval echo configure:15599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15599   rm -rf conftest*
15600   eval "ac_cv_func_cthread_fork=yes"
15601 else
15602   echo "configure: failed program was:" >&5
15603   cat conftest.$ac_ext >&5
15604   rm -rf conftest*
15605   eval "ac_cv_func_cthread_fork=no"
15606 fi
15607 rm -f conftest*
15608 fi
15609
15610 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15611   echo "$ac_t""yes" 1>&6
15612   ol_link_threads=yes
15613 else
15614   echo "$ac_t""no" 1>&6
15615 fi
15616
15617                 LIBS="$save_LIBS"
15618
15619                 if test $ol_link_threads = yes ; then
15620                         LTHREAD_LIBS="-lthreads"
15621                         ol_link_threads=mach
15622                         ol_with_threads=found
15623                 else
15624                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15625                 fi
15626
15627         elif test $ol_with_threads = mach ; then
15628                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15629         fi
15630
15631         if test $ol_link_threads = mach ; then
15632                 cat >> confdefs.h <<\EOF
15633 #define HAVE_MACH_CTHREADS 1
15634 EOF
15635
15636         elif test $ol_with_threads = found ; then
15637                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15638         fi
15639 fi
15640
15641 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15642         -o $ol_with_threads = pth ; then
15643
15644         for ac_hdr in pth.h
15645 do
15646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15648 echo "configure:15649: checking for $ac_hdr" >&5
15649 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15650   echo $ac_n "(cached) $ac_c" 1>&6
15651 else
15652   cat > conftest.$ac_ext <<EOF
15653 #line 15654 "configure"
15654 #include "confdefs.h"
15655 #include <$ac_hdr>
15656 EOF
15657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15658 { (eval echo configure:15659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15660 if test -z "$ac_err"; then
15661   rm -rf conftest*
15662   eval "ac_cv_header_$ac_safe=yes"
15663 else
15664   echo "$ac_err" >&5
15665   echo "configure: failed program was:" >&5
15666   cat conftest.$ac_ext >&5
15667   rm -rf conftest*
15668   eval "ac_cv_header_$ac_safe=no"
15669 fi
15670 rm -f conftest*
15671 fi
15672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15673   echo "$ac_t""yes" 1>&6
15674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15675   cat >> confdefs.h <<EOF
15676 #define $ac_tr_hdr 1
15677 EOF
15678  
15679 else
15680   echo "$ac_t""no" 1>&6
15681 fi
15682 done
15683
15684
15685         if test $ac_cv_header_pth_h = yes ; then
15686                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15687 echo "configure:15688: checking for pth_version in -lpth" >&5
15688 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15689 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15690   echo $ac_n "(cached) $ac_c" 1>&6
15691 else
15692   ac_save_LIBS="$LIBS"
15693 LIBS="-lpth  $LIBS"
15694 cat > conftest.$ac_ext <<EOF
15695 #line 15696 "configure"
15696 #include "confdefs.h"
15697 /* Override any gcc2 internal prototype to avoid an error.  */
15698 /* We use char because int might match the return type of a gcc2
15699     builtin and then its argument prototype would still apply.  */
15700 char pth_version();
15701
15702 int main() {
15703 pth_version()
15704 ; return 0; }
15705 EOF
15706 if { (eval echo configure:15707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15707   rm -rf conftest*
15708   eval "ac_cv_lib_$ac_lib_var=yes"
15709 else
15710   echo "configure: failed program was:" >&5
15711   cat conftest.$ac_ext >&5
15712   rm -rf conftest*
15713   eval "ac_cv_lib_$ac_lib_var=no"
15714 fi
15715 rm -f conftest*
15716 LIBS="$ac_save_LIBS"
15717
15718 fi
15719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15720   echo "$ac_t""yes" 1>&6
15721   have_pth=yes
15722 else
15723   echo "$ac_t""no" 1>&6
15724 have_pth=no
15725 fi
15726
15727
15728                 if test $have_pth = yes ; then
15729                         cat >> confdefs.h <<\EOF
15730 #define HAVE_GNU_PTH 1
15731 EOF
15732
15733                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15734                         ol_link_threads=pth
15735                         ol_with_threads=found
15736
15737                         if test $ol_with_yielding_select = auto ; then
15738                                 ol_with_yielding_select=yes
15739                         fi
15740                 fi
15741         fi
15742 fi
15743
15744 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15745         -o $ol_with_threads = lwp ; then
15746
15747                 for ac_hdr in thread.h synch.h
15748 do
15749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15751 echo "configure:15752: checking for $ac_hdr" >&5
15752 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15753   echo $ac_n "(cached) $ac_c" 1>&6
15754 else
15755   cat > conftest.$ac_ext <<EOF
15756 #line 15757 "configure"
15757 #include "confdefs.h"
15758 #include <$ac_hdr>
15759 EOF
15760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15761 { (eval echo configure:15762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15763 if test -z "$ac_err"; then
15764   rm -rf conftest*
15765   eval "ac_cv_header_$ac_safe=yes"
15766 else
15767   echo "$ac_err" >&5
15768   echo "configure: failed program was:" >&5
15769   cat conftest.$ac_ext >&5
15770   rm -rf conftest*
15771   eval "ac_cv_header_$ac_safe=no"
15772 fi
15773 rm -f conftest*
15774 fi
15775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15776   echo "$ac_t""yes" 1>&6
15777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15778   cat >> confdefs.h <<EOF
15779 #define $ac_tr_hdr 1
15780 EOF
15781  
15782 else
15783   echo "$ac_t""no" 1>&6
15784 fi
15785 done
15786
15787         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15788                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15789 echo "configure:15790: checking for thr_create in -lthread" >&5
15790 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15792   echo $ac_n "(cached) $ac_c" 1>&6
15793 else
15794   ac_save_LIBS="$LIBS"
15795 LIBS="-lthread  $LIBS"
15796 cat > conftest.$ac_ext <<EOF
15797 #line 15798 "configure"
15798 #include "confdefs.h"
15799 /* Override any gcc2 internal prototype to avoid an error.  */
15800 /* We use char because int might match the return type of a gcc2
15801     builtin and then its argument prototype would still apply.  */
15802 char thr_create();
15803
15804 int main() {
15805 thr_create()
15806 ; return 0; }
15807 EOF
15808 if { (eval echo configure:15809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15809   rm -rf conftest*
15810   eval "ac_cv_lib_$ac_lib_var=yes"
15811 else
15812   echo "configure: failed program was:" >&5
15813   cat conftest.$ac_ext >&5
15814   rm -rf conftest*
15815   eval "ac_cv_lib_$ac_lib_var=no"
15816 fi
15817 rm -f conftest*
15818 LIBS="$ac_save_LIBS"
15819
15820 fi
15821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15822   echo "$ac_t""yes" 1>&6
15823   have_thr=yes
15824 else
15825   echo "$ac_t""no" 1>&6
15826 have_thr=no
15827 fi
15828
15829
15830                 if test $have_thr = yes ; then
15831                         cat >> confdefs.h <<\EOF
15832 #define HAVE_THR 1
15833 EOF
15834
15835                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15836                         ol_link_threads=thr
15837
15838                         if test $ol_with_yielding_select = auto ; then
15839                                 ol_with_yielding_select=yes
15840                         fi
15841
15842                                                 for ac_func in \
15843                                 thr_setconcurrency \
15844                                 thr_getconcurrency \
15845                         
15846 do
15847 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15848 echo "configure:15849: checking for $ac_func" >&5
15849 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15850   echo $ac_n "(cached) $ac_c" 1>&6
15851 else
15852   cat > conftest.$ac_ext <<EOF
15853 #line 15854 "configure"
15854 #include "confdefs.h"
15855 /* System header to define __stub macros and hopefully few prototypes,
15856     which can conflict with char $ac_func(); below.  */
15857 #include <assert.h>
15858 /* Override any gcc2 internal prototype to avoid an error.  */
15859 /* We use char because int might match the return type of a gcc2
15860     builtin and then its argument prototype would still apply.  */
15861 char $ac_func();
15862 char (*f)();
15863
15864 int main() {
15865
15866 /* The GNU C library defines this for functions which it implements
15867     to always fail with ENOSYS.  Some functions are actually named
15868     something starting with __ and the normal name is an alias.  */
15869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15870 choke me
15871 #else
15872 f = $ac_func;
15873 #endif
15874
15875 ; return 0; }
15876 EOF
15877 if { (eval echo configure:15878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15878   rm -rf conftest*
15879   eval "ac_cv_func_$ac_func=yes"
15880 else
15881   echo "configure: failed program was:" >&5
15882   cat conftest.$ac_ext >&5
15883   rm -rf conftest*
15884   eval "ac_cv_func_$ac_func=no"
15885 fi
15886 rm -f conftest*
15887 fi
15888
15889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15890   echo "$ac_t""yes" 1>&6
15891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15892   cat >> confdefs.h <<EOF
15893 #define $ac_tr_func 1
15894 EOF
15895  
15896 else
15897   echo "$ac_t""no" 1>&6
15898 fi
15899 done
15900
15901                 fi
15902         fi
15903
15904                 for ac_hdr in lwp/lwp.h
15905 do
15906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15908 echo "configure:15909: checking for $ac_hdr" >&5
15909 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15910   echo $ac_n "(cached) $ac_c" 1>&6
15911 else
15912   cat > conftest.$ac_ext <<EOF
15913 #line 15914 "configure"
15914 #include "confdefs.h"
15915 #include <$ac_hdr>
15916 EOF
15917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15918 { (eval echo configure:15919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15920 if test -z "$ac_err"; then
15921   rm -rf conftest*
15922   eval "ac_cv_header_$ac_safe=yes"
15923 else
15924   echo "$ac_err" >&5
15925   echo "configure: failed program was:" >&5
15926   cat conftest.$ac_ext >&5
15927   rm -rf conftest*
15928   eval "ac_cv_header_$ac_safe=no"
15929 fi
15930 rm -f conftest*
15931 fi
15932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15933   echo "$ac_t""yes" 1>&6
15934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15935   cat >> confdefs.h <<EOF
15936 #define $ac_tr_hdr 1
15937 EOF
15938  
15939 else
15940   echo "$ac_t""no" 1>&6
15941 fi
15942 done
15943
15944         if test $ac_cv_header_lwp_lwp_h = yes ; then
15945                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15946 echo "configure:15947: checking for lwp_create in -llwp" >&5
15947 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15948 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15949   echo $ac_n "(cached) $ac_c" 1>&6
15950 else
15951   ac_save_LIBS="$LIBS"
15952 LIBS="-llwp  $LIBS"
15953 cat > conftest.$ac_ext <<EOF
15954 #line 15955 "configure"
15955 #include "confdefs.h"
15956 /* Override any gcc2 internal prototype to avoid an error.  */
15957 /* We use char because int might match the return type of a gcc2
15958     builtin and then its argument prototype would still apply.  */
15959 char lwp_create();
15960
15961 int main() {
15962 lwp_create()
15963 ; return 0; }
15964 EOF
15965 if { (eval echo configure:15966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15966   rm -rf conftest*
15967   eval "ac_cv_lib_$ac_lib_var=yes"
15968 else
15969   echo "configure: failed program was:" >&5
15970   cat conftest.$ac_ext >&5
15971   rm -rf conftest*
15972   eval "ac_cv_lib_$ac_lib_var=no"
15973 fi
15974 rm -f conftest*
15975 LIBS="$ac_save_LIBS"
15976
15977 fi
15978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15979   echo "$ac_t""yes" 1>&6
15980   have_lwp=yes
15981 else
15982   echo "$ac_t""no" 1>&6
15983 have_lwp=no
15984 fi
15985
15986
15987                 if test $have_lwp = yes ; then
15988                         cat >> confdefs.h <<\EOF
15989 #define HAVE_LWP 1
15990 EOF
15991
15992                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15993                         ol_link_threads=lwp
15994
15995                         if test $ol_with_yielding_select = auto ; then
15996                                 ol_with_yielding_select=no
15997                         fi
15998                 fi
15999         fi
16000 fi
16001
16002 if test $ol_with_yielding_select = yes ; then
16003         cat >> confdefs.h <<\EOF
16004 #define HAVE_YIELDING_SELECT 1
16005 EOF
16006
16007 fi
16008
16009 if test $ol_with_threads = manual ; then
16010                 ol_link_threads=yes
16011
16012         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16013
16014         for ac_hdr in pthread.h sched.h
16015 do
16016 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16017 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16018 echo "configure:16019: checking for $ac_hdr" >&5
16019 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16020   echo $ac_n "(cached) $ac_c" 1>&6
16021 else
16022   cat > conftest.$ac_ext <<EOF
16023 #line 16024 "configure"
16024 #include "confdefs.h"
16025 #include <$ac_hdr>
16026 EOF
16027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16028 { (eval echo configure:16029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16030 if test -z "$ac_err"; then
16031   rm -rf conftest*
16032   eval "ac_cv_header_$ac_safe=yes"
16033 else
16034   echo "$ac_err" >&5
16035   echo "configure: failed program was:" >&5
16036   cat conftest.$ac_ext >&5
16037   rm -rf conftest*
16038   eval "ac_cv_header_$ac_safe=no"
16039 fi
16040 rm -f conftest*
16041 fi
16042 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16043   echo "$ac_t""yes" 1>&6
16044     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16045   cat >> confdefs.h <<EOF
16046 #define $ac_tr_hdr 1
16047 EOF
16048  
16049 else
16050   echo "$ac_t""no" 1>&6
16051 fi
16052 done
16053
16054         for ac_func in sched_yield pthread_yield
16055 do
16056 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16057 echo "configure:16058: checking for $ac_func" >&5
16058 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16059   echo $ac_n "(cached) $ac_c" 1>&6
16060 else
16061   cat > conftest.$ac_ext <<EOF
16062 #line 16063 "configure"
16063 #include "confdefs.h"
16064 /* System header to define __stub macros and hopefully few prototypes,
16065     which can conflict with char $ac_func(); below.  */
16066 #include <assert.h>
16067 /* Override any gcc2 internal prototype to avoid an error.  */
16068 /* We use char because int might match the return type of a gcc2
16069     builtin and then its argument prototype would still apply.  */
16070 char $ac_func();
16071 char (*f)();
16072
16073 int main() {
16074
16075 /* The GNU C library defines this for functions which it implements
16076     to always fail with ENOSYS.  Some functions are actually named
16077     something starting with __ and the normal name is an alias.  */
16078 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16079 choke me
16080 #else
16081 f = $ac_func;
16082 #endif
16083
16084 ; return 0; }
16085 EOF
16086 if { (eval echo configure:16087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16087   rm -rf conftest*
16088   eval "ac_cv_func_$ac_func=yes"
16089 else
16090   echo "configure: failed program was:" >&5
16091   cat conftest.$ac_ext >&5
16092   rm -rf conftest*
16093   eval "ac_cv_func_$ac_func=no"
16094 fi
16095 rm -f conftest*
16096 fi
16097
16098 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16099   echo "$ac_t""yes" 1>&6
16100     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16101   cat >> confdefs.h <<EOF
16102 #define $ac_tr_func 1
16103 EOF
16104  
16105 else
16106   echo "$ac_t""no" 1>&6
16107 fi
16108 done
16109
16110         
16111         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16112 echo "configure:16113: checking for LinuxThreads pthread.h" >&5
16113 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16114   echo $ac_n "(cached) $ac_c" 1>&6
16115 else
16116   cat > conftest.$ac_ext <<EOF
16117 #line 16118 "configure"
16118 #include "confdefs.h"
16119 #include <pthread.h>
16120 EOF
16121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16122   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16123   rm -rf conftest*
16124   ol_cv_header_linux_threads=yes
16125 else
16126   rm -rf conftest*
16127   ol_cv_header_linux_threads=no
16128 fi
16129 rm -f conftest*
16130
16131                 
16132 fi
16133
16134 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16135         if test $ol_cv_header_linux_threads = yes; then
16136                 cat >> confdefs.h <<\EOF
16137 #define HAVE_LINUX_THREADS 1
16138 EOF
16139
16140         fi
16141
16142
16143         for ac_hdr in mach/cthreads.h
16144 do
16145 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16146 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16147 echo "configure:16148: checking for $ac_hdr" >&5
16148 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16149   echo $ac_n "(cached) $ac_c" 1>&6
16150 else
16151   cat > conftest.$ac_ext <<EOF
16152 #line 16153 "configure"
16153 #include "confdefs.h"
16154 #include <$ac_hdr>
16155 EOF
16156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16157 { (eval echo configure:16158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16159 if test -z "$ac_err"; then
16160   rm -rf conftest*
16161   eval "ac_cv_header_$ac_safe=yes"
16162 else
16163   echo "$ac_err" >&5
16164   echo "configure: failed program was:" >&5
16165   cat conftest.$ac_ext >&5
16166   rm -rf conftest*
16167   eval "ac_cv_header_$ac_safe=no"
16168 fi
16169 rm -f conftest*
16170 fi
16171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16172   echo "$ac_t""yes" 1>&6
16173     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16174   cat >> confdefs.h <<EOF
16175 #define $ac_tr_hdr 1
16176 EOF
16177  
16178 else
16179   echo "$ac_t""no" 1>&6
16180 fi
16181 done
16182
16183         for ac_hdr in lwp/lwp.h
16184 do
16185 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16186 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16187 echo "configure:16188: checking for $ac_hdr" >&5
16188 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16189   echo $ac_n "(cached) $ac_c" 1>&6
16190 else
16191   cat > conftest.$ac_ext <<EOF
16192 #line 16193 "configure"
16193 #include "confdefs.h"
16194 #include <$ac_hdr>
16195 EOF
16196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16197 { (eval echo configure:16198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16199 if test -z "$ac_err"; then
16200   rm -rf conftest*
16201   eval "ac_cv_header_$ac_safe=yes"
16202 else
16203   echo "$ac_err" >&5
16204   echo "configure: failed program was:" >&5
16205   cat conftest.$ac_ext >&5
16206   rm -rf conftest*
16207   eval "ac_cv_header_$ac_safe=no"
16208 fi
16209 rm -f conftest*
16210 fi
16211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16212   echo "$ac_t""yes" 1>&6
16213     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16214   cat >> confdefs.h <<EOF
16215 #define $ac_tr_hdr 1
16216 EOF
16217  
16218 else
16219   echo "$ac_t""no" 1>&6
16220 fi
16221 done
16222
16223         for ac_hdr in thread.h synch.h
16224 do
16225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16227 echo "configure:16228: checking for $ac_hdr" >&5
16228 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16229   echo $ac_n "(cached) $ac_c" 1>&6
16230 else
16231   cat > conftest.$ac_ext <<EOF
16232 #line 16233 "configure"
16233 #include "confdefs.h"
16234 #include <$ac_hdr>
16235 EOF
16236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16237 { (eval echo configure:16238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16239 if test -z "$ac_err"; then
16240   rm -rf conftest*
16241   eval "ac_cv_header_$ac_safe=yes"
16242 else
16243   echo "$ac_err" >&5
16244   echo "configure: failed program was:" >&5
16245   cat conftest.$ac_ext >&5
16246   rm -rf conftest*
16247   eval "ac_cv_header_$ac_safe=no"
16248 fi
16249 rm -f conftest*
16250 fi
16251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16252   echo "$ac_t""yes" 1>&6
16253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16254   cat >> confdefs.h <<EOF
16255 #define $ac_tr_hdr 1
16256 EOF
16257  
16258 else
16259   echo "$ac_t""no" 1>&6
16260 fi
16261 done
16262
16263 fi
16264
16265 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16266                         cat >> confdefs.h <<\EOF
16267 #define REENTRANT 1
16268 EOF
16269
16270         cat >> confdefs.h <<\EOF
16271 #define _REENTRANT 1
16272 EOF
16273
16274         cat >> confdefs.h <<\EOF
16275 #define THREAD_SAFE 1
16276 EOF
16277
16278         cat >> confdefs.h <<\EOF
16279 #define _THREAD_SAFE 1
16280 EOF
16281
16282         cat >> confdefs.h <<\EOF
16283 #define THREADSAFE 1
16284 EOF
16285
16286         cat >> confdefs.h <<\EOF
16287 #define _THREADSAFE 1
16288 EOF
16289
16290         cat >> confdefs.h <<\EOF
16291 #define _SGI_MP_SOURCE 1
16292 EOF
16293
16294
16295                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16296 echo "configure:16297: checking for thread specific errno" >&5
16297 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16298   echo $ac_n "(cached) $ac_c" 1>&6
16299 else
16300   
16301                 cat > conftest.$ac_ext <<EOF
16302 #line 16303 "configure"
16303 #include "confdefs.h"
16304 #include <errno.h>
16305 int main() {
16306 errno = 0;
16307 ; return 0; }
16308 EOF
16309 if { (eval echo configure:16310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16310   rm -rf conftest*
16311   ol_cv_errno_thread_specific=yes
16312 else
16313   echo "configure: failed program was:" >&5
16314   cat conftest.$ac_ext >&5
16315   rm -rf conftest*
16316   ol_cv_errno_thread_specific=no
16317 fi
16318 rm -f conftest*
16319         
16320 fi
16321
16322 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16323
16324                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16325 echo "configure:16326: checking for thread specific h_errno" >&5
16326 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16327   echo $ac_n "(cached) $ac_c" 1>&6
16328 else
16329   
16330                 cat > conftest.$ac_ext <<EOF
16331 #line 16332 "configure"
16332 #include "confdefs.h"
16333 #include <netdb.h>
16334 int main() {
16335 h_errno = 0;
16336 ; return 0; }
16337 EOF
16338 if { (eval echo configure:16339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16339   rm -rf conftest*
16340   ol_cv_h_errno_thread_specific=yes
16341 else
16342   echo "configure: failed program was:" >&5
16343   cat conftest.$ac_ext >&5
16344   rm -rf conftest*
16345   ol_cv_h_errno_thread_specific=no
16346 fi
16347 rm -f conftest*
16348         
16349 fi
16350
16351 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16352
16353         if test $ol_cv_errno_thread_specific != yes \
16354                 -o $ol_cv_h_errno_thread_specific != yes ; then
16355                 LIBS="$LTHREAD_LIBS $LIBS"
16356                 LTHREAD_LIBS=""
16357         fi
16358
16359 fi  
16360
16361 if test $ol_link_threads = no ; then
16362         if test $ol_with_threads = yes ; then
16363                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16364         fi
16365
16366         if test $ol_with_threads = auto ; then
16367                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16368                 ol_with_threads=no
16369         fi
16370
16371         cat >> confdefs.h <<\EOF
16372 #define NO_THREADS 1
16373 EOF
16374
16375         LTHREAD_LIBS=""
16376 fi
16377
16378 if test $ol_link_threads != no ; then
16379         cat >> confdefs.h <<\EOF
16380 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16381 EOF
16382
16383 fi
16384
16385 for ac_func in \
16386         ctime_r                 \
16387         gethostbyname_r gethostbyaddr_r \
16388
16389 do
16390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16391 echo "configure:16392: checking for $ac_func" >&5
16392 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16393   echo $ac_n "(cached) $ac_c" 1>&6
16394 else
16395   cat > conftest.$ac_ext <<EOF
16396 #line 16397 "configure"
16397 #include "confdefs.h"
16398 /* System header to define __stub macros and hopefully few prototypes,
16399     which can conflict with char $ac_func(); below.  */
16400 #include <assert.h>
16401 /* Override any gcc2 internal prototype to avoid an error.  */
16402 /* We use char because int might match the return type of a gcc2
16403     builtin and then its argument prototype would still apply.  */
16404 char $ac_func();
16405 char (*f)();
16406
16407 int main() {
16408
16409 /* The GNU C library defines this for functions which it implements
16410     to always fail with ENOSYS.  Some functions are actually named
16411     something starting with __ and the normal name is an alias.  */
16412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16413 choke me
16414 #else
16415 f = $ac_func;
16416 #endif
16417
16418 ; return 0; }
16419 EOF
16420 if { (eval echo configure:16421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16421   rm -rf conftest*
16422   eval "ac_cv_func_$ac_func=yes"
16423 else
16424   echo "configure: failed program was:" >&5
16425   cat conftest.$ac_ext >&5
16426   rm -rf conftest*
16427   eval "ac_cv_func_$ac_func=no"
16428 fi
16429 rm -f conftest*
16430 fi
16431
16432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16433   echo "$ac_t""yes" 1>&6
16434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16435   cat >> confdefs.h <<EOF
16436 #define $ac_tr_func 1
16437 EOF
16438  
16439 else
16440   echo "$ac_t""no" 1>&6
16441 fi
16442 done
16443
16444
16445 if test "$ac_cv_func_ctime_r" = no ; then
16446         ol_cv_func_ctime_r_nargs=0
16447 else
16448         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16449 echo "configure:16450: checking number of arguments of ctime_r" >&5
16450 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16451   echo $ac_n "(cached) $ac_c" 1>&6
16452 else
16453   cat > conftest.$ac_ext <<EOF
16454 #line 16455 "configure"
16455 #include "confdefs.h"
16456 #include <time.h>
16457 int main() {
16458 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16459 ; return 0; }
16460 EOF
16461 if { (eval echo configure:16462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16462   rm -rf conftest*
16463   ol_cv_func_ctime_r_nargs3=yes
16464 else
16465   echo "configure: failed program was:" >&5
16466   cat conftest.$ac_ext >&5
16467   rm -rf conftest*
16468   ol_cv_func_ctime_r_nargs3=no
16469 fi
16470 rm -f conftest*
16471
16472         cat > conftest.$ac_ext <<EOF
16473 #line 16474 "configure"
16474 #include "confdefs.h"
16475 #include <time.h>
16476 int main() {
16477 time_t ti; char *buffer; ctime_r(&ti,buffer);
16478 ; return 0; }
16479 EOF
16480 if { (eval echo configure:16481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16481   rm -rf conftest*
16482   ol_cv_func_ctime_r_nargs2=yes
16483 else
16484   echo "configure: failed program was:" >&5
16485   cat conftest.$ac_ext >&5
16486   rm -rf conftest*
16487   ol_cv_func_ctime_r_nargs2=no
16488 fi
16489 rm -f conftest*
16490
16491         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16492                 $ol_cv_func_ctime_r_nargs2 = no ; then
16493
16494                 ol_cv_func_ctime_r_nargs=3
16495
16496         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16497                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16498
16499                 ol_cv_func_ctime_r_nargs=2
16500
16501         else
16502                 ol_cv_func_ctime_r_nargs=0
16503         fi
16504   
16505 fi
16506
16507 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16508
16509   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16510         cat >> confdefs.h <<EOF
16511 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16512 EOF
16513
16514   fi
16515
16516 fi
16517
16518 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16519         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16520 echo "configure:16521: checking number of arguments of gethostbyname_r" >&5
16521 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16522   echo $ac_n "(cached) $ac_c" 1>&6
16523 else
16524   cat > conftest.$ac_ext <<EOF
16525 #line 16526 "configure"
16526 #include "confdefs.h"
16527 #include <sys/types.h>
16528 #include <sys/socket.h>
16529 #include <netinet/in.h>
16530 #include <netdb.h>
16531 #define BUFSIZE (sizeof(struct hostent)+10)
16532 int main() {
16533 struct hostent hent; char buffer[BUFSIZE];
16534                 int bufsize=BUFSIZE;int h_errno;
16535                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16536                         buffer, bufsize, &h_errno);
16537 ; return 0; }
16538 EOF
16539 if { (eval echo configure:16540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16540   rm -rf conftest*
16541   ol_cv_func_gethostbyname_r_nargs5=yes
16542 else
16543   echo "configure: failed program was:" >&5
16544   cat conftest.$ac_ext >&5
16545   rm -rf conftest*
16546   ol_cv_func_gethostbyname_r_nargs5=no
16547 fi
16548 rm -f conftest*
16549
16550         cat > conftest.$ac_ext <<EOF
16551 #line 16552 "configure"
16552 #include "confdefs.h"
16553 #include <sys/types.h>
16554 #include <sys/socket.h>
16555 #include <netinet/in.h>
16556 #include <netdb.h>
16557 #define BUFSIZE (sizeof(struct hostent)+10)
16558 int main() {
16559 struct hostent hent;struct hostent *rhent;
16560                 char buffer[BUFSIZE];
16561                 int bufsize=BUFSIZE;int h_errno;
16562                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16563                         &rhent, &h_errno);
16564 ; return 0; }
16565 EOF
16566 if { (eval echo configure:16567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16567   rm -rf conftest*
16568   ol_cv_func_gethostbyname_r_nargs6=yes
16569 else
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   ol_cv_func_gethostbyname_r_nargs6=no
16574 fi
16575 rm -f conftest*
16576
16577         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16578                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16579
16580                 ol_cv_func_gethostbyname_r_nargs=5
16581
16582         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16583                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16584
16585                 ol_cv_func_gethostbyname_r_nargs=6
16586
16587         else
16588                 ol_cv_func_gethostbyname_r_nargs=0
16589         fi
16590   
16591 fi
16592
16593 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16594   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16595         cat >> confdefs.h <<EOF
16596 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16597 EOF
16598
16599   fi
16600
16601 else
16602         ol_cv_func_gethostbyname_r_nargs=0
16603 fi
16604  
16605 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16606         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16607 echo "configure:16608: checking number of arguments of gethostbyaddr_r" >&5
16608 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+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 <sys/types.h>
16615 #include <sys/socket.h>
16616 #include <netinet/in.h>
16617 #include <netdb.h>
16618 #define BUFSIZE (sizeof(struct hostent)+10)
16619 int main() {
16620 struct hostent hent; char buffer[BUFSIZE]; 
16621             struct in_addr add;
16622             size_t alen=sizeof(struct in_addr);
16623             int bufsize=BUFSIZE;int h_errno;
16624                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16625                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16626 ; return 0; }
16627 EOF
16628 if { (eval echo configure:16629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16629   rm -rf conftest*
16630   ol_cv_func_gethostbyaddr_r_nargs7=yes
16631 else
16632   echo "configure: failed program was:" >&5
16633   cat conftest.$ac_ext >&5
16634   rm -rf conftest*
16635   ol_cv_func_gethostbyaddr_r_nargs7=no
16636 fi
16637 rm -f conftest*
16638
16639         cat > conftest.$ac_ext <<EOF
16640 #line 16641 "configure"
16641 #include "confdefs.h"
16642 #include <sys/types.h>
16643 #include <sys/socket.h>
16644 #include <netinet/in.h>
16645 #include <netdb.h>
16646 #define BUFSIZE (sizeof(struct hostent)+10)
16647 int main() {
16648 struct hostent hent;
16649                 struct hostent *rhent; char buffer[BUFSIZE]; 
16650                 struct in_addr add;
16651                 size_t alen=sizeof(struct in_addr);
16652                 int bufsize=BUFSIZE;int h_errno;
16653                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16654                         alen, AF_INET, &hent, buffer, bufsize, 
16655                         &rhent, &h_errno);
16656 ; return 0; }
16657 EOF
16658 if { (eval echo configure:16659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16659   rm -rf conftest*
16660   ol_cv_func_gethostbyaddr_r_nargs8=yes
16661 else
16662   echo "configure: failed program was:" >&5
16663   cat conftest.$ac_ext >&5
16664   rm -rf conftest*
16665   ol_cv_func_gethostbyaddr_r_nargs8=no
16666 fi
16667 rm -f conftest*
16668
16669         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16670                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16671
16672                 ol_cv_func_gethostbyaddr_r_nargs=7
16673
16674         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16675                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16676
16677                 ol_cv_func_gethostbyaddr_r_nargs=8
16678
16679         else
16680                 ol_cv_func_gethostbyaddr_r_nargs=0
16681         fi
16682   
16683 fi
16684
16685 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16686   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16687     cat >> confdefs.h <<EOF
16688 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16689 EOF
16690
16691   fi
16692
16693 else
16694         ol_cv_func_gethostbyaddr_r_nargs=0
16695 fi
16696
16697 ol_link_ldbm=no 
16698
16699 if test $ol_with_ldbm_api = auto \
16700         -o $ol_with_ldbm_api = berkeley \
16701         -o $ol_with_ldbm_api = bcompat ; then
16702
16703         if test $ol_with_ldbm_api = bcompat; then \
16704                 for ac_hdr in db_185.h db.h
16705 do
16706 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16707 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16708 echo "configure:16709: checking for $ac_hdr" >&5
16709 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16710   echo $ac_n "(cached) $ac_c" 1>&6
16711 else
16712   cat > conftest.$ac_ext <<EOF
16713 #line 16714 "configure"
16714 #include "confdefs.h"
16715 #include <$ac_hdr>
16716 EOF
16717 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16718 { (eval echo configure:16719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16719 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16720 if test -z "$ac_err"; then
16721   rm -rf conftest*
16722   eval "ac_cv_header_$ac_safe=yes"
16723 else
16724   echo "$ac_err" >&5
16725   echo "configure: failed program was:" >&5
16726   cat conftest.$ac_ext >&5
16727   rm -rf conftest*
16728   eval "ac_cv_header_$ac_safe=no"
16729 fi
16730 rm -f conftest*
16731 fi
16732 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16733   echo "$ac_t""yes" 1>&6
16734     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16735   cat >> confdefs.h <<EOF
16736 #define $ac_tr_hdr 1
16737 EOF
16738  
16739 else
16740   echo "$ac_t""no" 1>&6
16741 fi
16742 done
16743
16744 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16745         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16746 echo "configure:16747: checking if Berkeley DB header compatibility" >&5
16747 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16748   echo $ac_n "(cached) $ac_c" 1>&6
16749 else
16750   
16751                 cat > conftest.$ac_ext <<EOF
16752 #line 16753 "configure"
16753 #include "confdefs.h"
16754
16755 #if HAVE_DB_185_H
16756 #       include <db_185.h>
16757 #else
16758 #       include <db.h>
16759 #endif
16760
16761  /* this check could be improved */
16762 #ifndef DB_VERSION_MAJOR
16763 #       define DB_VERSION_MAJOR 1
16764 #endif
16765
16766 #if DB_VERSION_MAJOR == 1 
16767         __db_version_1
16768 #endif
16769
16770 EOF
16771 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16772   egrep "__db_version_1" >/dev/null 2>&1; then
16773   rm -rf conftest*
16774   ol_cv_header_db1=yes
16775 else
16776   rm -rf conftest*
16777   ol_cv_header_db1=no
16778 fi
16779 rm -f conftest*
16780
16781 fi
16782
16783 echo "$ac_t""$ol_cv_header_db1" 1>&6
16784
16785         if test $ol_cv_header_db1 = yes ; then
16786                 ol_cv_lib_db=no
16787 if test $ol_cv_lib_db = no ; then
16788         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16789 echo "configure:16790: checking for Berkeley DB link (default)" >&5
16790 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16791   echo $ac_n "(cached) $ac_c" 1>&6
16792 else
16793   
16794         ol_DB_LIB=
16795         ol_LIBS=$LIBS
16796         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16797
16798         cat > conftest.$ac_ext <<EOF
16799 #line 16800 "configure"
16800 #include "confdefs.h"
16801
16802 #ifdef HAVE_DB_185_H
16803 # include <db_185.h>
16804 #else
16805 # include <db.h>
16806 #endif
16807
16808 #ifndef DB_VERSION_MAJOR
16809 # define DB_VERSION_MAJOR 1
16810 #endif
16811
16812 #ifndef NULL
16813 #define NULL ((void*)0)
16814 #endif
16815
16816 int main() {
16817
16818 #if DB_VERSION_MAJOR > 1
16819         {
16820                 char *version;
16821                 int major, minor, patch;
16822
16823                 version = db_version( &major, &minor, &patch );
16824
16825                 if( major != DB_VERSION_MAJOR ||
16826                         minor < DB_VERSION_MINOR )
16827                 {
16828                         printf("Berkeley DB version mismatch\n"
16829                                 "\texpected: %s\n\tgot: %s\n",
16830                                 DB_VERSION_STRING, version);
16831                         return 1;
16832                 }
16833         }
16834 #endif
16835
16836 #if DB_VERSION_MAJOR > 2
16837         db_env_create( NULL, 0 );
16838 #elif DB_VERSION_MAJOR > 1
16839         db_appexit( NULL );
16840 #else
16841         (void) dbopen( NULL, 0, 0, 0, NULL);
16842 #endif
16843
16844 ; return 0; }
16845 EOF
16846 if { (eval echo configure:16847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16847   rm -rf conftest*
16848   ol_cv_db_none=yes
16849 else
16850   echo "configure: failed program was:" >&5
16851   cat conftest.$ac_ext >&5
16852   rm -rf conftest*
16853   ol_cv_db_none=no
16854 fi
16855 rm -f conftest*
16856
16857         LIBS="$ol_LIBS"
16858
16859 fi
16860
16861 echo "$ac_t""$ol_cv_db_none" 1>&6
16862
16863         if test $ol_cv_db_none = yes ; then
16864                 ol_cv_lib_db=yes
16865         fi
16866 fi
16867
16868 if test $ol_cv_lib_db = no ; then
16869         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16870 echo "configure:16871: checking for Berkeley DB link (-ldb42)" >&5
16871 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16872   echo $ac_n "(cached) $ac_c" 1>&6
16873 else
16874   
16875         ol_DB_LIB=-ldb42
16876         ol_LIBS=$LIBS
16877         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16878
16879         cat > conftest.$ac_ext <<EOF
16880 #line 16881 "configure"
16881 #include "confdefs.h"
16882
16883 #ifdef HAVE_DB_185_H
16884 # include <db_185.h>
16885 #else
16886 # include <db.h>
16887 #endif
16888
16889 #ifndef DB_VERSION_MAJOR
16890 # define DB_VERSION_MAJOR 1
16891 #endif
16892
16893 #ifndef NULL
16894 #define NULL ((void*)0)
16895 #endif
16896
16897 int main() {
16898
16899 #if DB_VERSION_MAJOR > 1
16900         {
16901                 char *version;
16902                 int major, minor, patch;
16903
16904                 version = db_version( &major, &minor, &patch );
16905
16906                 if( major != DB_VERSION_MAJOR ||
16907                         minor < DB_VERSION_MINOR )
16908                 {
16909                         printf("Berkeley DB version mismatch\n"
16910                                 "\texpected: %s\n\tgot: %s\n",
16911                                 DB_VERSION_STRING, version);
16912                         return 1;
16913                 }
16914         }
16915 #endif
16916
16917 #if DB_VERSION_MAJOR > 2
16918         db_env_create( NULL, 0 );
16919 #elif DB_VERSION_MAJOR > 1
16920         db_appexit( NULL );
16921 #else
16922         (void) dbopen( NULL, 0, 0, 0, NULL);
16923 #endif
16924
16925 ; return 0; }
16926 EOF
16927 if { (eval echo configure:16928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16928   rm -rf conftest*
16929   ol_cv_db_db42=yes
16930 else
16931   echo "configure: failed program was:" >&5
16932   cat conftest.$ac_ext >&5
16933   rm -rf conftest*
16934   ol_cv_db_db42=no
16935 fi
16936 rm -f conftest*
16937
16938         LIBS="$ol_LIBS"
16939
16940 fi
16941
16942 echo "$ac_t""$ol_cv_db_db42" 1>&6
16943
16944         if test $ol_cv_db_db42 = yes ; then
16945                 ol_cv_lib_db=-ldb42
16946         fi
16947 fi
16948
16949 if test $ol_cv_lib_db = no ; then
16950         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16951 echo "configure:16952: checking for Berkeley DB link (-ldb-42)" >&5
16952 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16953   echo $ac_n "(cached) $ac_c" 1>&6
16954 else
16955   
16956         ol_DB_LIB=-ldb-42
16957         ol_LIBS=$LIBS
16958         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16959
16960         cat > conftest.$ac_ext <<EOF
16961 #line 16962 "configure"
16962 #include "confdefs.h"
16963
16964 #ifdef HAVE_DB_185_H
16965 # include <db_185.h>
16966 #else
16967 # include <db.h>
16968 #endif
16969
16970 #ifndef DB_VERSION_MAJOR
16971 # define DB_VERSION_MAJOR 1
16972 #endif
16973
16974 #ifndef NULL
16975 #define NULL ((void*)0)
16976 #endif
16977
16978 int main() {
16979
16980 #if DB_VERSION_MAJOR > 1
16981         {
16982                 char *version;
16983                 int major, minor, patch;
16984
16985                 version = db_version( &major, &minor, &patch );
16986
16987                 if( major != DB_VERSION_MAJOR ||
16988                         minor < DB_VERSION_MINOR )
16989                 {
16990                         printf("Berkeley DB version mismatch\n"
16991                                 "\texpected: %s\n\tgot: %s\n",
16992                                 DB_VERSION_STRING, version);
16993                         return 1;
16994                 }
16995         }
16996 #endif
16997
16998 #if DB_VERSION_MAJOR > 2
16999         db_env_create( NULL, 0 );
17000 #elif DB_VERSION_MAJOR > 1
17001         db_appexit( NULL );
17002 #else
17003         (void) dbopen( NULL, 0, 0, 0, NULL);
17004 #endif
17005
17006 ; return 0; }
17007 EOF
17008 if { (eval echo configure:17009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17009   rm -rf conftest*
17010   ol_cv_db_db_42=yes
17011 else
17012   echo "configure: failed program was:" >&5
17013   cat conftest.$ac_ext >&5
17014   rm -rf conftest*
17015   ol_cv_db_db_42=no
17016 fi
17017 rm -f conftest*
17018
17019         LIBS="$ol_LIBS"
17020
17021 fi
17022
17023 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17024
17025         if test $ol_cv_db_db_42 = yes ; then
17026                 ol_cv_lib_db=-ldb-42
17027         fi
17028 fi
17029
17030 if test $ol_cv_lib_db = no ; then
17031         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17032 echo "configure:17033: checking for Berkeley DB link (-ldb-4.2)" >&5
17033 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17034   echo $ac_n "(cached) $ac_c" 1>&6
17035 else
17036   
17037         ol_DB_LIB=-ldb-4.2
17038         ol_LIBS=$LIBS
17039         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17040
17041         cat > conftest.$ac_ext <<EOF
17042 #line 17043 "configure"
17043 #include "confdefs.h"
17044
17045 #ifdef HAVE_DB_185_H
17046 # include <db_185.h>
17047 #else
17048 # include <db.h>
17049 #endif
17050
17051 #ifndef DB_VERSION_MAJOR
17052 # define DB_VERSION_MAJOR 1
17053 #endif
17054
17055 #ifndef NULL
17056 #define NULL ((void*)0)
17057 #endif
17058
17059 int main() {
17060
17061 #if DB_VERSION_MAJOR > 1
17062         {
17063                 char *version;
17064                 int major, minor, patch;
17065
17066                 version = db_version( &major, &minor, &patch );
17067
17068                 if( major != DB_VERSION_MAJOR ||
17069                         minor < DB_VERSION_MINOR )
17070                 {
17071                         printf("Berkeley DB version mismatch\n"
17072                                 "\texpected: %s\n\tgot: %s\n",
17073                                 DB_VERSION_STRING, version);
17074                         return 1;
17075                 }
17076         }
17077 #endif
17078
17079 #if DB_VERSION_MAJOR > 2
17080         db_env_create( NULL, 0 );
17081 #elif DB_VERSION_MAJOR > 1
17082         db_appexit( NULL );
17083 #else
17084         (void) dbopen( NULL, 0, 0, 0, NULL);
17085 #endif
17086
17087 ; return 0; }
17088 EOF
17089 if { (eval echo configure:17090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17090   rm -rf conftest*
17091   ol_cv_db_db_4_dot_2=yes
17092 else
17093   echo "configure: failed program was:" >&5
17094   cat conftest.$ac_ext >&5
17095   rm -rf conftest*
17096   ol_cv_db_db_4_dot_2=no
17097 fi
17098 rm -f conftest*
17099
17100         LIBS="$ol_LIBS"
17101
17102 fi
17103
17104 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17105
17106         if test $ol_cv_db_db_4_dot_2 = yes ; then
17107                 ol_cv_lib_db=-ldb-4.2
17108         fi
17109 fi
17110
17111 if test $ol_cv_lib_db = no ; then
17112         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17113 echo "configure:17114: checking for Berkeley DB link (-ldb-4-2)" >&5
17114 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17115   echo $ac_n "(cached) $ac_c" 1>&6
17116 else
17117   
17118         ol_DB_LIB=-ldb-4-2
17119         ol_LIBS=$LIBS
17120         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17121
17122         cat > conftest.$ac_ext <<EOF
17123 #line 17124 "configure"
17124 #include "confdefs.h"
17125
17126 #ifdef HAVE_DB_185_H
17127 # include <db_185.h>
17128 #else
17129 # include <db.h>
17130 #endif
17131
17132 #ifndef DB_VERSION_MAJOR
17133 # define DB_VERSION_MAJOR 1
17134 #endif
17135
17136 #ifndef NULL
17137 #define NULL ((void*)0)
17138 #endif
17139
17140 int main() {
17141
17142 #if DB_VERSION_MAJOR > 1
17143         {
17144                 char *version;
17145                 int major, minor, patch;
17146
17147                 version = db_version( &major, &minor, &patch );
17148
17149                 if( major != DB_VERSION_MAJOR ||
17150                         minor < DB_VERSION_MINOR )
17151                 {
17152                         printf("Berkeley DB version mismatch\n"
17153                                 "\texpected: %s\n\tgot: %s\n",
17154                                 DB_VERSION_STRING, version);
17155                         return 1;
17156                 }
17157         }
17158 #endif
17159
17160 #if DB_VERSION_MAJOR > 2
17161         db_env_create( NULL, 0 );
17162 #elif DB_VERSION_MAJOR > 1
17163         db_appexit( NULL );
17164 #else
17165         (void) dbopen( NULL, 0, 0, 0, NULL);
17166 #endif
17167
17168 ; return 0; }
17169 EOF
17170 if { (eval echo configure:17171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17171   rm -rf conftest*
17172   ol_cv_db_db_4_2=yes
17173 else
17174   echo "configure: failed program was:" >&5
17175   cat conftest.$ac_ext >&5
17176   rm -rf conftest*
17177   ol_cv_db_db_4_2=no
17178 fi
17179 rm -f conftest*
17180
17181         LIBS="$ol_LIBS"
17182
17183 fi
17184
17185 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17186
17187         if test $ol_cv_db_db_4_2 = yes ; then
17188                 ol_cv_lib_db=-ldb-4-2
17189         fi
17190 fi
17191
17192 if test $ol_cv_lib_db = no ; then
17193         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17194 echo "configure:17195: checking for Berkeley DB link (-ldb-4)" >&5
17195 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17196   echo $ac_n "(cached) $ac_c" 1>&6
17197 else
17198   
17199         ol_DB_LIB=-ldb-4
17200         ol_LIBS=$LIBS
17201         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17202
17203         cat > conftest.$ac_ext <<EOF
17204 #line 17205 "configure"
17205 #include "confdefs.h"
17206
17207 #ifdef HAVE_DB_185_H
17208 # include <db_185.h>
17209 #else
17210 # include <db.h>
17211 #endif
17212
17213 #ifndef DB_VERSION_MAJOR
17214 # define DB_VERSION_MAJOR 1
17215 #endif
17216
17217 #ifndef NULL
17218 #define NULL ((void*)0)
17219 #endif
17220
17221 int main() {
17222
17223 #if DB_VERSION_MAJOR > 1
17224         {
17225                 char *version;
17226                 int major, minor, patch;
17227
17228                 version = db_version( &major, &minor, &patch );
17229
17230                 if( major != DB_VERSION_MAJOR ||
17231                         minor < DB_VERSION_MINOR )
17232                 {
17233                         printf("Berkeley DB version mismatch\n"
17234                                 "\texpected: %s\n\tgot: %s\n",
17235                                 DB_VERSION_STRING, version);
17236                         return 1;
17237                 }
17238         }
17239 #endif
17240
17241 #if DB_VERSION_MAJOR > 2
17242         db_env_create( NULL, 0 );
17243 #elif DB_VERSION_MAJOR > 1
17244         db_appexit( NULL );
17245 #else
17246         (void) dbopen( NULL, 0, 0, 0, NULL);
17247 #endif
17248
17249 ; return 0; }
17250 EOF
17251 if { (eval echo configure:17252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17252   rm -rf conftest*
17253   ol_cv_db_db_4=yes
17254 else
17255   echo "configure: failed program was:" >&5
17256   cat conftest.$ac_ext >&5
17257   rm -rf conftest*
17258   ol_cv_db_db_4=no
17259 fi
17260 rm -f conftest*
17261
17262         LIBS="$ol_LIBS"
17263
17264 fi
17265
17266 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17267
17268         if test $ol_cv_db_db_4 = yes ; then
17269                 ol_cv_lib_db=-ldb-4
17270         fi
17271 fi
17272
17273 if test $ol_cv_lib_db = no ; then
17274         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17275 echo "configure:17276: checking for Berkeley DB link (-ldb4)" >&5
17276 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17277   echo $ac_n "(cached) $ac_c" 1>&6
17278 else
17279   
17280         ol_DB_LIB=-ldb4
17281         ol_LIBS=$LIBS
17282         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17283
17284         cat > conftest.$ac_ext <<EOF
17285 #line 17286 "configure"
17286 #include "confdefs.h"
17287
17288 #ifdef HAVE_DB_185_H
17289 # include <db_185.h>
17290 #else
17291 # include <db.h>
17292 #endif
17293
17294 #ifndef DB_VERSION_MAJOR
17295 # define DB_VERSION_MAJOR 1
17296 #endif
17297
17298 #ifndef NULL
17299 #define NULL ((void*)0)
17300 #endif
17301
17302 int main() {
17303
17304 #if DB_VERSION_MAJOR > 1
17305         {
17306                 char *version;
17307                 int major, minor, patch;
17308
17309                 version = db_version( &major, &minor, &patch );
17310
17311                 if( major != DB_VERSION_MAJOR ||
17312                         minor < DB_VERSION_MINOR )
17313                 {
17314                         printf("Berkeley DB version mismatch\n"
17315                                 "\texpected: %s\n\tgot: %s\n",
17316                                 DB_VERSION_STRING, version);
17317                         return 1;
17318                 }
17319         }
17320 #endif
17321
17322 #if DB_VERSION_MAJOR > 2
17323         db_env_create( NULL, 0 );
17324 #elif DB_VERSION_MAJOR > 1
17325         db_appexit( NULL );
17326 #else
17327         (void) dbopen( NULL, 0, 0, 0, NULL);
17328 #endif
17329
17330 ; return 0; }
17331 EOF
17332 if { (eval echo configure:17333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17333   rm -rf conftest*
17334   ol_cv_db_db4=yes
17335 else
17336   echo "configure: failed program was:" >&5
17337   cat conftest.$ac_ext >&5
17338   rm -rf conftest*
17339   ol_cv_db_db4=no
17340 fi
17341 rm -f conftest*
17342
17343         LIBS="$ol_LIBS"
17344
17345 fi
17346
17347 echo "$ac_t""$ol_cv_db_db4" 1>&6
17348
17349         if test $ol_cv_db_db4 = yes ; then
17350                 ol_cv_lib_db=-ldb4
17351         fi
17352 fi
17353
17354 if test $ol_cv_lib_db = no ; then
17355         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17356 echo "configure:17357: checking for Berkeley DB link (-ldb)" >&5
17357 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17358   echo $ac_n "(cached) $ac_c" 1>&6
17359 else
17360   
17361         ol_DB_LIB=-ldb
17362         ol_LIBS=$LIBS
17363         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17364
17365         cat > conftest.$ac_ext <<EOF
17366 #line 17367 "configure"
17367 #include "confdefs.h"
17368
17369 #ifdef HAVE_DB_185_H
17370 # include <db_185.h>
17371 #else
17372 # include <db.h>
17373 #endif
17374
17375 #ifndef DB_VERSION_MAJOR
17376 # define DB_VERSION_MAJOR 1
17377 #endif
17378
17379 #ifndef NULL
17380 #define NULL ((void*)0)
17381 #endif
17382
17383 int main() {
17384
17385 #if DB_VERSION_MAJOR > 1
17386         {
17387                 char *version;
17388                 int major, minor, patch;
17389
17390                 version = db_version( &major, &minor, &patch );
17391
17392                 if( major != DB_VERSION_MAJOR ||
17393                         minor < DB_VERSION_MINOR )
17394                 {
17395                         printf("Berkeley DB version mismatch\n"
17396                                 "\texpected: %s\n\tgot: %s\n",
17397                                 DB_VERSION_STRING, version);
17398                         return 1;
17399                 }
17400         }
17401 #endif
17402
17403 #if DB_VERSION_MAJOR > 2
17404         db_env_create( NULL, 0 );
17405 #elif DB_VERSION_MAJOR > 1
17406         db_appexit( NULL );
17407 #else
17408         (void) dbopen( NULL, 0, 0, 0, NULL);
17409 #endif
17410
17411 ; return 0; }
17412 EOF
17413 if { (eval echo configure:17414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17414   rm -rf conftest*
17415   ol_cv_db_db=yes
17416 else
17417   echo "configure: failed program was:" >&5
17418   cat conftest.$ac_ext >&5
17419   rm -rf conftest*
17420   ol_cv_db_db=no
17421 fi
17422 rm -f conftest*
17423
17424         LIBS="$ol_LIBS"
17425
17426 fi
17427
17428 echo "$ac_t""$ol_cv_db_db" 1>&6
17429
17430         if test $ol_cv_db_db = yes ; then
17431                 ol_cv_lib_db=-ldb
17432         fi
17433 fi
17434
17435 if test $ol_cv_lib_db = no ; then
17436         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17437 echo "configure:17438: checking for Berkeley DB link (-ldb41)" >&5
17438 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17439   echo $ac_n "(cached) $ac_c" 1>&6
17440 else
17441   
17442         ol_DB_LIB=-ldb41
17443         ol_LIBS=$LIBS
17444         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17445
17446         cat > conftest.$ac_ext <<EOF
17447 #line 17448 "configure"
17448 #include "confdefs.h"
17449
17450 #ifdef HAVE_DB_185_H
17451 # include <db_185.h>
17452 #else
17453 # include <db.h>
17454 #endif
17455
17456 #ifndef DB_VERSION_MAJOR
17457 # define DB_VERSION_MAJOR 1
17458 #endif
17459
17460 #ifndef NULL
17461 #define NULL ((void*)0)
17462 #endif
17463
17464 int main() {
17465
17466 #if DB_VERSION_MAJOR > 1
17467         {
17468                 char *version;
17469                 int major, minor, patch;
17470
17471                 version = db_version( &major, &minor, &patch );
17472
17473                 if( major != DB_VERSION_MAJOR ||
17474                         minor < DB_VERSION_MINOR )
17475                 {
17476                         printf("Berkeley DB version mismatch\n"
17477                                 "\texpected: %s\n\tgot: %s\n",
17478                                 DB_VERSION_STRING, version);
17479                         return 1;
17480                 }
17481         }
17482 #endif
17483
17484 #if DB_VERSION_MAJOR > 2
17485         db_env_create( NULL, 0 );
17486 #elif DB_VERSION_MAJOR > 1
17487         db_appexit( NULL );
17488 #else
17489         (void) dbopen( NULL, 0, 0, 0, NULL);
17490 #endif
17491
17492 ; return 0; }
17493 EOF
17494 if { (eval echo configure:17495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17495   rm -rf conftest*
17496   ol_cv_db_db41=yes
17497 else
17498   echo "configure: failed program was:" >&5
17499   cat conftest.$ac_ext >&5
17500   rm -rf conftest*
17501   ol_cv_db_db41=no
17502 fi
17503 rm -f conftest*
17504
17505         LIBS="$ol_LIBS"
17506
17507 fi
17508
17509 echo "$ac_t""$ol_cv_db_db41" 1>&6
17510
17511         if test $ol_cv_db_db41 = yes ; then
17512                 ol_cv_lib_db=-ldb41
17513         fi
17514 fi
17515
17516 if test $ol_cv_lib_db = no ; then
17517         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17518 echo "configure:17519: checking for Berkeley DB link (-ldb-41)" >&5
17519 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17520   echo $ac_n "(cached) $ac_c" 1>&6
17521 else
17522   
17523         ol_DB_LIB=-ldb-41
17524         ol_LIBS=$LIBS
17525         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17526
17527         cat > conftest.$ac_ext <<EOF
17528 #line 17529 "configure"
17529 #include "confdefs.h"
17530
17531 #ifdef HAVE_DB_185_H
17532 # include <db_185.h>
17533 #else
17534 # include <db.h>
17535 #endif
17536
17537 #ifndef DB_VERSION_MAJOR
17538 # define DB_VERSION_MAJOR 1
17539 #endif
17540
17541 #ifndef NULL
17542 #define NULL ((void*)0)
17543 #endif
17544
17545 int main() {
17546
17547 #if DB_VERSION_MAJOR > 1
17548         {
17549                 char *version;
17550                 int major, minor, patch;
17551
17552                 version = db_version( &major, &minor, &patch );
17553
17554                 if( major != DB_VERSION_MAJOR ||
17555                         minor < DB_VERSION_MINOR )
17556                 {
17557                         printf("Berkeley DB version mismatch\n"
17558                                 "\texpected: %s\n\tgot: %s\n",
17559                                 DB_VERSION_STRING, version);
17560                         return 1;
17561                 }
17562         }
17563 #endif
17564
17565 #if DB_VERSION_MAJOR > 2
17566         db_env_create( NULL, 0 );
17567 #elif DB_VERSION_MAJOR > 1
17568         db_appexit( NULL );
17569 #else
17570         (void) dbopen( NULL, 0, 0, 0, NULL);
17571 #endif
17572
17573 ; return 0; }
17574 EOF
17575 if { (eval echo configure:17576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17576   rm -rf conftest*
17577   ol_cv_db_db_41=yes
17578 else
17579   echo "configure: failed program was:" >&5
17580   cat conftest.$ac_ext >&5
17581   rm -rf conftest*
17582   ol_cv_db_db_41=no
17583 fi
17584 rm -f conftest*
17585
17586         LIBS="$ol_LIBS"
17587
17588 fi
17589
17590 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17591
17592         if test $ol_cv_db_db_41 = yes ; then
17593                 ol_cv_lib_db=-ldb-41
17594         fi
17595 fi
17596
17597 if test $ol_cv_lib_db = no ; then
17598         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17599 echo "configure:17600: checking for Berkeley DB link (-ldb-4.1)" >&5
17600 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17601   echo $ac_n "(cached) $ac_c" 1>&6
17602 else
17603   
17604         ol_DB_LIB=-ldb-4.1
17605         ol_LIBS=$LIBS
17606         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17607
17608         cat > conftest.$ac_ext <<EOF
17609 #line 17610 "configure"
17610 #include "confdefs.h"
17611
17612 #ifdef HAVE_DB_185_H
17613 # include <db_185.h>
17614 #else
17615 # include <db.h>
17616 #endif
17617
17618 #ifndef DB_VERSION_MAJOR
17619 # define DB_VERSION_MAJOR 1
17620 #endif
17621
17622 #ifndef NULL
17623 #define NULL ((void*)0)
17624 #endif
17625
17626 int main() {
17627
17628 #if DB_VERSION_MAJOR > 1
17629         {
17630                 char *version;
17631                 int major, minor, patch;
17632
17633                 version = db_version( &major, &minor, &patch );
17634
17635                 if( major != DB_VERSION_MAJOR ||
17636                         minor < DB_VERSION_MINOR )
17637                 {
17638                         printf("Berkeley DB version mismatch\n"
17639                                 "\texpected: %s\n\tgot: %s\n",
17640                                 DB_VERSION_STRING, version);
17641                         return 1;
17642                 }
17643         }
17644 #endif
17645
17646 #if DB_VERSION_MAJOR > 2
17647         db_env_create( NULL, 0 );
17648 #elif DB_VERSION_MAJOR > 1
17649         db_appexit( NULL );
17650 #else
17651         (void) dbopen( NULL, 0, 0, 0, NULL);
17652 #endif
17653
17654 ; return 0; }
17655 EOF
17656 if { (eval echo configure:17657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17657   rm -rf conftest*
17658   ol_cv_db_db_4_dot_1=yes
17659 else
17660   echo "configure: failed program was:" >&5
17661   cat conftest.$ac_ext >&5
17662   rm -rf conftest*
17663   ol_cv_db_db_4_dot_1=no
17664 fi
17665 rm -f conftest*
17666
17667         LIBS="$ol_LIBS"
17668
17669 fi
17670
17671 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17672
17673         if test $ol_cv_db_db_4_dot_1 = yes ; then
17674                 ol_cv_lib_db=-ldb-4.1
17675         fi
17676 fi
17677
17678 if test $ol_cv_lib_db = no ; then
17679         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17680 echo "configure:17681: checking for Berkeley DB link (-ldb-4-1)" >&5
17681 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17682   echo $ac_n "(cached) $ac_c" 1>&6
17683 else
17684   
17685         ol_DB_LIB=-ldb-4-1
17686         ol_LIBS=$LIBS
17687         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17688
17689         cat > conftest.$ac_ext <<EOF
17690 #line 17691 "configure"
17691 #include "confdefs.h"
17692
17693 #ifdef HAVE_DB_185_H
17694 # include <db_185.h>
17695 #else
17696 # include <db.h>
17697 #endif
17698
17699 #ifndef DB_VERSION_MAJOR
17700 # define DB_VERSION_MAJOR 1
17701 #endif
17702
17703 #ifndef NULL
17704 #define NULL ((void*)0)
17705 #endif
17706
17707 int main() {
17708
17709 #if DB_VERSION_MAJOR > 1
17710         {
17711                 char *version;
17712                 int major, minor, patch;
17713
17714                 version = db_version( &major, &minor, &patch );
17715
17716                 if( major != DB_VERSION_MAJOR ||
17717                         minor < DB_VERSION_MINOR )
17718                 {
17719                         printf("Berkeley DB version mismatch\n"
17720                                 "\texpected: %s\n\tgot: %s\n",
17721                                 DB_VERSION_STRING, version);
17722                         return 1;
17723                 }
17724         }
17725 #endif
17726
17727 #if DB_VERSION_MAJOR > 2
17728         db_env_create( NULL, 0 );
17729 #elif DB_VERSION_MAJOR > 1
17730         db_appexit( NULL );
17731 #else
17732         (void) dbopen( NULL, 0, 0, 0, NULL);
17733 #endif
17734
17735 ; return 0; }
17736 EOF
17737 if { (eval echo configure:17738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17738   rm -rf conftest*
17739   ol_cv_db_db_4_1=yes
17740 else
17741   echo "configure: failed program was:" >&5
17742   cat conftest.$ac_ext >&5
17743   rm -rf conftest*
17744   ol_cv_db_db_4_1=no
17745 fi
17746 rm -f conftest*
17747
17748         LIBS="$ol_LIBS"
17749
17750 fi
17751
17752 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17753
17754         if test $ol_cv_db_db_4_1 = yes ; then
17755                 ol_cv_lib_db=-ldb-4-1
17756         fi
17757 fi
17758
17759 if test $ol_cv_lib_db = no ; then
17760         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17761 echo "configure:17762: checking for Berkeley DB link (-ldb3)" >&5
17762 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17763   echo $ac_n "(cached) $ac_c" 1>&6
17764 else
17765   
17766         ol_DB_LIB=-ldb3
17767         ol_LIBS=$LIBS
17768         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17769
17770         cat > conftest.$ac_ext <<EOF
17771 #line 17772 "configure"
17772 #include "confdefs.h"
17773
17774 #ifdef HAVE_DB_185_H
17775 # include <db_185.h>
17776 #else
17777 # include <db.h>
17778 #endif
17779
17780 #ifndef DB_VERSION_MAJOR
17781 # define DB_VERSION_MAJOR 1
17782 #endif
17783
17784 #ifndef NULL
17785 #define NULL ((void*)0)
17786 #endif
17787
17788 int main() {
17789
17790 #if DB_VERSION_MAJOR > 1
17791         {
17792                 char *version;
17793                 int major, minor, patch;
17794
17795                 version = db_version( &major, &minor, &patch );
17796
17797                 if( major != DB_VERSION_MAJOR ||
17798                         minor < DB_VERSION_MINOR )
17799                 {
17800                         printf("Berkeley DB version mismatch\n"
17801                                 "\texpected: %s\n\tgot: %s\n",
17802                                 DB_VERSION_STRING, version);
17803                         return 1;
17804                 }
17805         }
17806 #endif
17807
17808 #if DB_VERSION_MAJOR > 2
17809         db_env_create( NULL, 0 );
17810 #elif DB_VERSION_MAJOR > 1
17811         db_appexit( NULL );
17812 #else
17813         (void) dbopen( NULL, 0, 0, 0, NULL);
17814 #endif
17815
17816 ; return 0; }
17817 EOF
17818 if { (eval echo configure:17819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17819   rm -rf conftest*
17820   ol_cv_db_db3=yes
17821 else
17822   echo "configure: failed program was:" >&5
17823   cat conftest.$ac_ext >&5
17824   rm -rf conftest*
17825   ol_cv_db_db3=no
17826 fi
17827 rm -f conftest*
17828
17829         LIBS="$ol_LIBS"
17830
17831 fi
17832
17833 echo "$ac_t""$ol_cv_db_db3" 1>&6
17834
17835         if test $ol_cv_db_db3 = yes ; then
17836                 ol_cv_lib_db=-ldb3
17837         fi
17838 fi
17839
17840 if test $ol_cv_lib_db = no ; then
17841         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17842 echo "configure:17843: checking for Berkeley DB link (-ldb-3)" >&5
17843 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17844   echo $ac_n "(cached) $ac_c" 1>&6
17845 else
17846   
17847         ol_DB_LIB=-ldb-3
17848         ol_LIBS=$LIBS
17849         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17850
17851         cat > conftest.$ac_ext <<EOF
17852 #line 17853 "configure"
17853 #include "confdefs.h"
17854
17855 #ifdef HAVE_DB_185_H
17856 # include <db_185.h>
17857 #else
17858 # include <db.h>
17859 #endif
17860
17861 #ifndef DB_VERSION_MAJOR
17862 # define DB_VERSION_MAJOR 1
17863 #endif
17864
17865 #ifndef NULL
17866 #define NULL ((void*)0)
17867 #endif
17868
17869 int main() {
17870
17871 #if DB_VERSION_MAJOR > 1
17872         {
17873                 char *version;
17874                 int major, minor, patch;
17875
17876                 version = db_version( &major, &minor, &patch );
17877
17878                 if( major != DB_VERSION_MAJOR ||
17879                         minor < DB_VERSION_MINOR )
17880                 {
17881                         printf("Berkeley DB version mismatch\n"
17882                                 "\texpected: %s\n\tgot: %s\n",
17883                                 DB_VERSION_STRING, version);
17884                         return 1;
17885                 }
17886         }
17887 #endif
17888
17889 #if DB_VERSION_MAJOR > 2
17890         db_env_create( NULL, 0 );
17891 #elif DB_VERSION_MAJOR > 1
17892         db_appexit( NULL );
17893 #else
17894         (void) dbopen( NULL, 0, 0, 0, NULL);
17895 #endif
17896
17897 ; return 0; }
17898 EOF
17899 if { (eval echo configure:17900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17900   rm -rf conftest*
17901   ol_cv_db_db_3=yes
17902 else
17903   echo "configure: failed program was:" >&5
17904   cat conftest.$ac_ext >&5
17905   rm -rf conftest*
17906   ol_cv_db_db_3=no
17907 fi
17908 rm -f conftest*
17909
17910         LIBS="$ol_LIBS"
17911
17912 fi
17913
17914 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17915
17916         if test $ol_cv_db_db_3 = yes ; then
17917                 ol_cv_lib_db=-ldb-3
17918         fi
17919 fi
17920
17921 if test $ol_cv_lib_db = no ; then
17922         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17923 echo "configure:17924: checking for Berkeley DB link (-ldb2)" >&5
17924 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17925   echo $ac_n "(cached) $ac_c" 1>&6
17926 else
17927   
17928         ol_DB_LIB=-ldb2
17929         ol_LIBS=$LIBS
17930         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17931
17932         cat > conftest.$ac_ext <<EOF
17933 #line 17934 "configure"
17934 #include "confdefs.h"
17935
17936 #ifdef HAVE_DB_185_H
17937 # include <db_185.h>
17938 #else
17939 # include <db.h>
17940 #endif
17941
17942 #ifndef DB_VERSION_MAJOR
17943 # define DB_VERSION_MAJOR 1
17944 #endif
17945
17946 #ifndef NULL
17947 #define NULL ((void*)0)
17948 #endif
17949
17950 int main() {
17951
17952 #if DB_VERSION_MAJOR > 1
17953         {
17954                 char *version;
17955                 int major, minor, patch;
17956
17957                 version = db_version( &major, &minor, &patch );
17958
17959                 if( major != DB_VERSION_MAJOR ||
17960                         minor < DB_VERSION_MINOR )
17961                 {
17962                         printf("Berkeley DB version mismatch\n"
17963                                 "\texpected: %s\n\tgot: %s\n",
17964                                 DB_VERSION_STRING, version);
17965                         return 1;
17966                 }
17967         }
17968 #endif
17969
17970 #if DB_VERSION_MAJOR > 2
17971         db_env_create( NULL, 0 );
17972 #elif DB_VERSION_MAJOR > 1
17973         db_appexit( NULL );
17974 #else
17975         (void) dbopen( NULL, 0, 0, 0, NULL);
17976 #endif
17977
17978 ; return 0; }
17979 EOF
17980 if { (eval echo configure:17981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17981   rm -rf conftest*
17982   ol_cv_db_db2=yes
17983 else
17984   echo "configure: failed program was:" >&5
17985   cat conftest.$ac_ext >&5
17986   rm -rf conftest*
17987   ol_cv_db_db2=no
17988 fi
17989 rm -f conftest*
17990
17991         LIBS="$ol_LIBS"
17992
17993 fi
17994
17995 echo "$ac_t""$ol_cv_db_db2" 1>&6
17996
17997         if test $ol_cv_db_db2 = yes ; then
17998                 ol_cv_lib_db=-ldb2
17999         fi
18000 fi
18001
18002 if test $ol_cv_lib_db = no ; then
18003         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18004 echo "configure:18005: checking for Berkeley DB link (-ldb-2)" >&5
18005 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18006   echo $ac_n "(cached) $ac_c" 1>&6
18007 else
18008   
18009         ol_DB_LIB=-ldb-2
18010         ol_LIBS=$LIBS
18011         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18012
18013         cat > conftest.$ac_ext <<EOF
18014 #line 18015 "configure"
18015 #include "confdefs.h"
18016
18017 #ifdef HAVE_DB_185_H
18018 # include <db_185.h>
18019 #else
18020 # include <db.h>
18021 #endif
18022
18023 #ifndef DB_VERSION_MAJOR
18024 # define DB_VERSION_MAJOR 1
18025 #endif
18026
18027 #ifndef NULL
18028 #define NULL ((void*)0)
18029 #endif
18030
18031 int main() {
18032
18033 #if DB_VERSION_MAJOR > 1
18034         {
18035                 char *version;
18036                 int major, minor, patch;
18037
18038                 version = db_version( &major, &minor, &patch );
18039
18040                 if( major != DB_VERSION_MAJOR ||
18041                         minor < DB_VERSION_MINOR )
18042                 {
18043                         printf("Berkeley DB version mismatch\n"
18044                                 "\texpected: %s\n\tgot: %s\n",
18045                                 DB_VERSION_STRING, version);
18046                         return 1;
18047                 }
18048         }
18049 #endif
18050
18051 #if DB_VERSION_MAJOR > 2
18052         db_env_create( NULL, 0 );
18053 #elif DB_VERSION_MAJOR > 1
18054         db_appexit( NULL );
18055 #else
18056         (void) dbopen( NULL, 0, 0, 0, NULL);
18057 #endif
18058
18059 ; return 0; }
18060 EOF
18061 if { (eval echo configure:18062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18062   rm -rf conftest*
18063   ol_cv_db_db_2=yes
18064 else
18065   echo "configure: failed program was:" >&5
18066   cat conftest.$ac_ext >&5
18067   rm -rf conftest*
18068   ol_cv_db_db_2=no
18069 fi
18070 rm -f conftest*
18071
18072         LIBS="$ol_LIBS"
18073
18074 fi
18075
18076 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18077
18078         if test $ol_cv_db_db_2 = yes ; then
18079                 ol_cv_lib_db=-ldb-2
18080         fi
18081 fi
18082
18083 if test $ol_cv_lib_db = no ; then
18084         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18085 echo "configure:18086: checking for Berkeley DB link (-ldb1)" >&5
18086 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18087   echo $ac_n "(cached) $ac_c" 1>&6
18088 else
18089   
18090         ol_DB_LIB=-ldb1
18091         ol_LIBS=$LIBS
18092         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18093
18094         cat > conftest.$ac_ext <<EOF
18095 #line 18096 "configure"
18096 #include "confdefs.h"
18097
18098 #ifdef HAVE_DB_185_H
18099 # include <db_185.h>
18100 #else
18101 # include <db.h>
18102 #endif
18103
18104 #ifndef DB_VERSION_MAJOR
18105 # define DB_VERSION_MAJOR 1
18106 #endif
18107
18108 #ifndef NULL
18109 #define NULL ((void*)0)
18110 #endif
18111
18112 int main() {
18113
18114 #if DB_VERSION_MAJOR > 1
18115         {
18116                 char *version;
18117                 int major, minor, patch;
18118
18119                 version = db_version( &major, &minor, &patch );
18120
18121                 if( major != DB_VERSION_MAJOR ||
18122                         minor < DB_VERSION_MINOR )
18123                 {
18124                         printf("Berkeley DB version mismatch\n"
18125                                 "\texpected: %s\n\tgot: %s\n",
18126                                 DB_VERSION_STRING, version);
18127                         return 1;
18128                 }
18129         }
18130 #endif
18131
18132 #if DB_VERSION_MAJOR > 2
18133         db_env_create( NULL, 0 );
18134 #elif DB_VERSION_MAJOR > 1
18135         db_appexit( NULL );
18136 #else
18137         (void) dbopen( NULL, 0, 0, 0, NULL);
18138 #endif
18139
18140 ; return 0; }
18141 EOF
18142 if { (eval echo configure:18143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18143   rm -rf conftest*
18144   ol_cv_db_db1=yes
18145 else
18146   echo "configure: failed program was:" >&5
18147   cat conftest.$ac_ext >&5
18148   rm -rf conftest*
18149   ol_cv_db_db1=no
18150 fi
18151 rm -f conftest*
18152
18153         LIBS="$ol_LIBS"
18154
18155 fi
18156
18157 echo "$ac_t""$ol_cv_db_db1" 1>&6
18158
18159         if test $ol_cv_db_db1 = yes ; then
18160                 ol_cv_lib_db=-ldb1
18161         fi
18162 fi
18163
18164 if test $ol_cv_lib_db = no ; then
18165         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18166 echo "configure:18167: checking for Berkeley DB link (-ldb-1)" >&5
18167 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18168   echo $ac_n "(cached) $ac_c" 1>&6
18169 else
18170   
18171         ol_DB_LIB=-ldb-1
18172         ol_LIBS=$LIBS
18173         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18174
18175         cat > conftest.$ac_ext <<EOF
18176 #line 18177 "configure"
18177 #include "confdefs.h"
18178
18179 #ifdef HAVE_DB_185_H
18180 # include <db_185.h>
18181 #else
18182 # include <db.h>
18183 #endif
18184
18185 #ifndef DB_VERSION_MAJOR
18186 # define DB_VERSION_MAJOR 1
18187 #endif
18188
18189 #ifndef NULL
18190 #define NULL ((void*)0)
18191 #endif
18192
18193 int main() {
18194
18195 #if DB_VERSION_MAJOR > 1
18196         {
18197                 char *version;
18198                 int major, minor, patch;
18199
18200                 version = db_version( &major, &minor, &patch );
18201
18202                 if( major != DB_VERSION_MAJOR ||
18203                         minor < DB_VERSION_MINOR )
18204                 {
18205                         printf("Berkeley DB version mismatch\n"
18206                                 "\texpected: %s\n\tgot: %s\n",
18207                                 DB_VERSION_STRING, version);
18208                         return 1;
18209                 }
18210         }
18211 #endif
18212
18213 #if DB_VERSION_MAJOR > 2
18214         db_env_create( NULL, 0 );
18215 #elif DB_VERSION_MAJOR > 1
18216         db_appexit( NULL );
18217 #else
18218         (void) dbopen( NULL, 0, 0, 0, NULL);
18219 #endif
18220
18221 ; return 0; }
18222 EOF
18223 if { (eval echo configure:18224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18224   rm -rf conftest*
18225   ol_cv_db_db_1=yes
18226 else
18227   echo "configure: failed program was:" >&5
18228   cat conftest.$ac_ext >&5
18229   rm -rf conftest*
18230   ol_cv_db_db_1=no
18231 fi
18232 rm -f conftest*
18233
18234         LIBS="$ol_LIBS"
18235
18236 fi
18237
18238 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18239
18240         if test $ol_cv_db_db_1 = yes ; then
18241                 ol_cv_lib_db=-ldb-1
18242         fi
18243 fi
18244
18245
18246                 if test "$ol_cv_lib_db" != no ; then
18247                         ol_cv_berkeley_db=yes
18248                 fi
18249         fi
18250 fi
18251
18252         else
18253                 ol_cv_berkeley_db=no
18254 for ac_hdr in db.h
18255 do
18256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18258 echo "configure:18259: checking for $ac_hdr" >&5
18259 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18260   echo $ac_n "(cached) $ac_c" 1>&6
18261 else
18262   cat > conftest.$ac_ext <<EOF
18263 #line 18264 "configure"
18264 #include "confdefs.h"
18265 #include <$ac_hdr>
18266 EOF
18267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18268 { (eval echo configure:18269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18270 if test -z "$ac_err"; then
18271   rm -rf conftest*
18272   eval "ac_cv_header_$ac_safe=yes"
18273 else
18274   echo "$ac_err" >&5
18275   echo "configure: failed program was:" >&5
18276   cat conftest.$ac_ext >&5
18277   rm -rf conftest*
18278   eval "ac_cv_header_$ac_safe=no"
18279 fi
18280 rm -f conftest*
18281 fi
18282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18283   echo "$ac_t""yes" 1>&6
18284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18285   cat >> confdefs.h <<EOF
18286 #define $ac_tr_hdr 1
18287 EOF
18288  
18289 else
18290   echo "$ac_t""no" 1>&6
18291 fi
18292 done
18293
18294 if test $ac_cv_header_db_h = yes; then
18295         ol_cv_lib_db=no
18296 if test $ol_cv_lib_db = no ; then
18297         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18298 echo "configure:18299: checking for Berkeley DB link (default)" >&5
18299 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18300   echo $ac_n "(cached) $ac_c" 1>&6
18301 else
18302   
18303         ol_DB_LIB=
18304         ol_LIBS=$LIBS
18305         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18306
18307         cat > conftest.$ac_ext <<EOF
18308 #line 18309 "configure"
18309 #include "confdefs.h"
18310
18311 #ifdef HAVE_DB_185_H
18312 # include <db_185.h>
18313 #else
18314 # include <db.h>
18315 #endif
18316
18317 #ifndef DB_VERSION_MAJOR
18318 # define DB_VERSION_MAJOR 1
18319 #endif
18320
18321 #ifndef NULL
18322 #define NULL ((void*)0)
18323 #endif
18324
18325 int main() {
18326
18327 #if DB_VERSION_MAJOR > 1
18328         {
18329                 char *version;
18330                 int major, minor, patch;
18331
18332                 version = db_version( &major, &minor, &patch );
18333
18334                 if( major != DB_VERSION_MAJOR ||
18335                         minor < DB_VERSION_MINOR )
18336                 {
18337                         printf("Berkeley DB version mismatch\n"
18338                                 "\texpected: %s\n\tgot: %s\n",
18339                                 DB_VERSION_STRING, version);
18340                         return 1;
18341                 }
18342         }
18343 #endif
18344
18345 #if DB_VERSION_MAJOR > 2
18346         db_env_create( NULL, 0 );
18347 #elif DB_VERSION_MAJOR > 1
18348         db_appexit( NULL );
18349 #else
18350         (void) dbopen( NULL, 0, 0, 0, NULL);
18351 #endif
18352
18353 ; return 0; }
18354 EOF
18355 if { (eval echo configure:18356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18356   rm -rf conftest*
18357   ol_cv_db_none=yes
18358 else
18359   echo "configure: failed program was:" >&5
18360   cat conftest.$ac_ext >&5
18361   rm -rf conftest*
18362   ol_cv_db_none=no
18363 fi
18364 rm -f conftest*
18365
18366         LIBS="$ol_LIBS"
18367
18368 fi
18369
18370 echo "$ac_t""$ol_cv_db_none" 1>&6
18371
18372         if test $ol_cv_db_none = yes ; then
18373                 ol_cv_lib_db=yes
18374         fi
18375 fi
18376
18377 if test $ol_cv_lib_db = no ; then
18378         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18379 echo "configure:18380: checking for Berkeley DB link (-ldb42)" >&5
18380 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18381   echo $ac_n "(cached) $ac_c" 1>&6
18382 else
18383   
18384         ol_DB_LIB=-ldb42
18385         ol_LIBS=$LIBS
18386         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18387
18388         cat > conftest.$ac_ext <<EOF
18389 #line 18390 "configure"
18390 #include "confdefs.h"
18391
18392 #ifdef HAVE_DB_185_H
18393 # include <db_185.h>
18394 #else
18395 # include <db.h>
18396 #endif
18397
18398 #ifndef DB_VERSION_MAJOR
18399 # define DB_VERSION_MAJOR 1
18400 #endif
18401
18402 #ifndef NULL
18403 #define NULL ((void*)0)
18404 #endif
18405
18406 int main() {
18407
18408 #if DB_VERSION_MAJOR > 1
18409         {
18410                 char *version;
18411                 int major, minor, patch;
18412
18413                 version = db_version( &major, &minor, &patch );
18414
18415                 if( major != DB_VERSION_MAJOR ||
18416                         minor < DB_VERSION_MINOR )
18417                 {
18418                         printf("Berkeley DB version mismatch\n"
18419                                 "\texpected: %s\n\tgot: %s\n",
18420                                 DB_VERSION_STRING, version);
18421                         return 1;
18422                 }
18423         }
18424 #endif
18425
18426 #if DB_VERSION_MAJOR > 2
18427         db_env_create( NULL, 0 );
18428 #elif DB_VERSION_MAJOR > 1
18429         db_appexit( NULL );
18430 #else
18431         (void) dbopen( NULL, 0, 0, 0, NULL);
18432 #endif
18433
18434 ; return 0; }
18435 EOF
18436 if { (eval echo configure:18437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18437   rm -rf conftest*
18438   ol_cv_db_db42=yes
18439 else
18440   echo "configure: failed program was:" >&5
18441   cat conftest.$ac_ext >&5
18442   rm -rf conftest*
18443   ol_cv_db_db42=no
18444 fi
18445 rm -f conftest*
18446
18447         LIBS="$ol_LIBS"
18448
18449 fi
18450
18451 echo "$ac_t""$ol_cv_db_db42" 1>&6
18452
18453         if test $ol_cv_db_db42 = yes ; then
18454                 ol_cv_lib_db=-ldb42
18455         fi
18456 fi
18457
18458 if test $ol_cv_lib_db = no ; then
18459         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18460 echo "configure:18461: checking for Berkeley DB link (-ldb-42)" >&5
18461 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18462   echo $ac_n "(cached) $ac_c" 1>&6
18463 else
18464   
18465         ol_DB_LIB=-ldb-42
18466         ol_LIBS=$LIBS
18467         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18468
18469         cat > conftest.$ac_ext <<EOF
18470 #line 18471 "configure"
18471 #include "confdefs.h"
18472
18473 #ifdef HAVE_DB_185_H
18474 # include <db_185.h>
18475 #else
18476 # include <db.h>
18477 #endif
18478
18479 #ifndef DB_VERSION_MAJOR
18480 # define DB_VERSION_MAJOR 1
18481 #endif
18482
18483 #ifndef NULL
18484 #define NULL ((void*)0)
18485 #endif
18486
18487 int main() {
18488
18489 #if DB_VERSION_MAJOR > 1
18490         {
18491                 char *version;
18492                 int major, minor, patch;
18493
18494                 version = db_version( &major, &minor, &patch );
18495
18496                 if( major != DB_VERSION_MAJOR ||
18497                         minor < DB_VERSION_MINOR )
18498                 {
18499                         printf("Berkeley DB version mismatch\n"
18500                                 "\texpected: %s\n\tgot: %s\n",
18501                                 DB_VERSION_STRING, version);
18502                         return 1;
18503                 }
18504         }
18505 #endif
18506
18507 #if DB_VERSION_MAJOR > 2
18508         db_env_create( NULL, 0 );
18509 #elif DB_VERSION_MAJOR > 1
18510         db_appexit( NULL );
18511 #else
18512         (void) dbopen( NULL, 0, 0, 0, NULL);
18513 #endif
18514
18515 ; return 0; }
18516 EOF
18517 if { (eval echo configure:18518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18518   rm -rf conftest*
18519   ol_cv_db_db_42=yes
18520 else
18521   echo "configure: failed program was:" >&5
18522   cat conftest.$ac_ext >&5
18523   rm -rf conftest*
18524   ol_cv_db_db_42=no
18525 fi
18526 rm -f conftest*
18527
18528         LIBS="$ol_LIBS"
18529
18530 fi
18531
18532 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18533
18534         if test $ol_cv_db_db_42 = yes ; then
18535                 ol_cv_lib_db=-ldb-42
18536         fi
18537 fi
18538
18539 if test $ol_cv_lib_db = no ; then
18540         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18541 echo "configure:18542: checking for Berkeley DB link (-ldb-4.2)" >&5
18542 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18543   echo $ac_n "(cached) $ac_c" 1>&6
18544 else
18545   
18546         ol_DB_LIB=-ldb-4.2
18547         ol_LIBS=$LIBS
18548         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18549
18550         cat > conftest.$ac_ext <<EOF
18551 #line 18552 "configure"
18552 #include "confdefs.h"
18553
18554 #ifdef HAVE_DB_185_H
18555 # include <db_185.h>
18556 #else
18557 # include <db.h>
18558 #endif
18559
18560 #ifndef DB_VERSION_MAJOR
18561 # define DB_VERSION_MAJOR 1
18562 #endif
18563
18564 #ifndef NULL
18565 #define NULL ((void*)0)
18566 #endif
18567
18568 int main() {
18569
18570 #if DB_VERSION_MAJOR > 1
18571         {
18572                 char *version;
18573                 int major, minor, patch;
18574
18575                 version = db_version( &major, &minor, &patch );
18576
18577                 if( major != DB_VERSION_MAJOR ||
18578                         minor < DB_VERSION_MINOR )
18579                 {
18580                         printf("Berkeley DB version mismatch\n"
18581                                 "\texpected: %s\n\tgot: %s\n",
18582                                 DB_VERSION_STRING, version);
18583                         return 1;
18584                 }
18585         }
18586 #endif
18587
18588 #if DB_VERSION_MAJOR > 2
18589         db_env_create( NULL, 0 );
18590 #elif DB_VERSION_MAJOR > 1
18591         db_appexit( NULL );
18592 #else
18593         (void) dbopen( NULL, 0, 0, 0, NULL);
18594 #endif
18595
18596 ; return 0; }
18597 EOF
18598 if { (eval echo configure:18599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18599   rm -rf conftest*
18600   ol_cv_db_db_4_dot_2=yes
18601 else
18602   echo "configure: failed program was:" >&5
18603   cat conftest.$ac_ext >&5
18604   rm -rf conftest*
18605   ol_cv_db_db_4_dot_2=no
18606 fi
18607 rm -f conftest*
18608
18609         LIBS="$ol_LIBS"
18610
18611 fi
18612
18613 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18614
18615         if test $ol_cv_db_db_4_dot_2 = yes ; then
18616                 ol_cv_lib_db=-ldb-4.2
18617         fi
18618 fi
18619
18620 if test $ol_cv_lib_db = no ; then
18621         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18622 echo "configure:18623: checking for Berkeley DB link (-ldb-4-2)" >&5
18623 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18624   echo $ac_n "(cached) $ac_c" 1>&6
18625 else
18626   
18627         ol_DB_LIB=-ldb-4-2
18628         ol_LIBS=$LIBS
18629         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18630
18631         cat > conftest.$ac_ext <<EOF
18632 #line 18633 "configure"
18633 #include "confdefs.h"
18634
18635 #ifdef HAVE_DB_185_H
18636 # include <db_185.h>
18637 #else
18638 # include <db.h>
18639 #endif
18640
18641 #ifndef DB_VERSION_MAJOR
18642 # define DB_VERSION_MAJOR 1
18643 #endif
18644
18645 #ifndef NULL
18646 #define NULL ((void*)0)
18647 #endif
18648
18649 int main() {
18650
18651 #if DB_VERSION_MAJOR > 1
18652         {
18653                 char *version;
18654                 int major, minor, patch;
18655
18656                 version = db_version( &major, &minor, &patch );
18657
18658                 if( major != DB_VERSION_MAJOR ||
18659                         minor < DB_VERSION_MINOR )
18660                 {
18661                         printf("Berkeley DB version mismatch\n"
18662                                 "\texpected: %s\n\tgot: %s\n",
18663                                 DB_VERSION_STRING, version);
18664                         return 1;
18665                 }
18666         }
18667 #endif
18668
18669 #if DB_VERSION_MAJOR > 2
18670         db_env_create( NULL, 0 );
18671 #elif DB_VERSION_MAJOR > 1
18672         db_appexit( NULL );
18673 #else
18674         (void) dbopen( NULL, 0, 0, 0, NULL);
18675 #endif
18676
18677 ; return 0; }
18678 EOF
18679 if { (eval echo configure:18680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18680   rm -rf conftest*
18681   ol_cv_db_db_4_2=yes
18682 else
18683   echo "configure: failed program was:" >&5
18684   cat conftest.$ac_ext >&5
18685   rm -rf conftest*
18686   ol_cv_db_db_4_2=no
18687 fi
18688 rm -f conftest*
18689
18690         LIBS="$ol_LIBS"
18691
18692 fi
18693
18694 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18695
18696         if test $ol_cv_db_db_4_2 = yes ; then
18697                 ol_cv_lib_db=-ldb-4-2
18698         fi
18699 fi
18700
18701 if test $ol_cv_lib_db = no ; then
18702         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18703 echo "configure:18704: checking for Berkeley DB link (-ldb-4)" >&5
18704 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18705   echo $ac_n "(cached) $ac_c" 1>&6
18706 else
18707   
18708         ol_DB_LIB=-ldb-4
18709         ol_LIBS=$LIBS
18710         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18711
18712         cat > conftest.$ac_ext <<EOF
18713 #line 18714 "configure"
18714 #include "confdefs.h"
18715
18716 #ifdef HAVE_DB_185_H
18717 # include <db_185.h>
18718 #else
18719 # include <db.h>
18720 #endif
18721
18722 #ifndef DB_VERSION_MAJOR
18723 # define DB_VERSION_MAJOR 1
18724 #endif
18725
18726 #ifndef NULL
18727 #define NULL ((void*)0)
18728 #endif
18729
18730 int main() {
18731
18732 #if DB_VERSION_MAJOR > 1
18733         {
18734                 char *version;
18735                 int major, minor, patch;
18736
18737                 version = db_version( &major, &minor, &patch );
18738
18739                 if( major != DB_VERSION_MAJOR ||
18740                         minor < DB_VERSION_MINOR )
18741                 {
18742                         printf("Berkeley DB version mismatch\n"
18743                                 "\texpected: %s\n\tgot: %s\n",
18744                                 DB_VERSION_STRING, version);
18745                         return 1;
18746                 }
18747         }
18748 #endif
18749
18750 #if DB_VERSION_MAJOR > 2
18751         db_env_create( NULL, 0 );
18752 #elif DB_VERSION_MAJOR > 1
18753         db_appexit( NULL );
18754 #else
18755         (void) dbopen( NULL, 0, 0, 0, NULL);
18756 #endif
18757
18758 ; return 0; }
18759 EOF
18760 if { (eval echo configure:18761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18761   rm -rf conftest*
18762   ol_cv_db_db_4=yes
18763 else
18764   echo "configure: failed program was:" >&5
18765   cat conftest.$ac_ext >&5
18766   rm -rf conftest*
18767   ol_cv_db_db_4=no
18768 fi
18769 rm -f conftest*
18770
18771         LIBS="$ol_LIBS"
18772
18773 fi
18774
18775 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18776
18777         if test $ol_cv_db_db_4 = yes ; then
18778                 ol_cv_lib_db=-ldb-4
18779         fi
18780 fi
18781
18782 if test $ol_cv_lib_db = no ; then
18783         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18784 echo "configure:18785: checking for Berkeley DB link (-ldb4)" >&5
18785 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18786   echo $ac_n "(cached) $ac_c" 1>&6
18787 else
18788   
18789         ol_DB_LIB=-ldb4
18790         ol_LIBS=$LIBS
18791         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18792
18793         cat > conftest.$ac_ext <<EOF
18794 #line 18795 "configure"
18795 #include "confdefs.h"
18796
18797 #ifdef HAVE_DB_185_H
18798 # include <db_185.h>
18799 #else
18800 # include <db.h>
18801 #endif
18802
18803 #ifndef DB_VERSION_MAJOR
18804 # define DB_VERSION_MAJOR 1
18805 #endif
18806
18807 #ifndef NULL
18808 #define NULL ((void*)0)
18809 #endif
18810
18811 int main() {
18812
18813 #if DB_VERSION_MAJOR > 1
18814         {
18815                 char *version;
18816                 int major, minor, patch;
18817
18818                 version = db_version( &major, &minor, &patch );
18819
18820                 if( major != DB_VERSION_MAJOR ||
18821                         minor < DB_VERSION_MINOR )
18822                 {
18823                         printf("Berkeley DB version mismatch\n"
18824                                 "\texpected: %s\n\tgot: %s\n",
18825                                 DB_VERSION_STRING, version);
18826                         return 1;
18827                 }
18828         }
18829 #endif
18830
18831 #if DB_VERSION_MAJOR > 2
18832         db_env_create( NULL, 0 );
18833 #elif DB_VERSION_MAJOR > 1
18834         db_appexit( NULL );
18835 #else
18836         (void) dbopen( NULL, 0, 0, 0, NULL);
18837 #endif
18838
18839 ; return 0; }
18840 EOF
18841 if { (eval echo configure:18842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18842   rm -rf conftest*
18843   ol_cv_db_db4=yes
18844 else
18845   echo "configure: failed program was:" >&5
18846   cat conftest.$ac_ext >&5
18847   rm -rf conftest*
18848   ol_cv_db_db4=no
18849 fi
18850 rm -f conftest*
18851
18852         LIBS="$ol_LIBS"
18853
18854 fi
18855
18856 echo "$ac_t""$ol_cv_db_db4" 1>&6
18857
18858         if test $ol_cv_db_db4 = yes ; then
18859                 ol_cv_lib_db=-ldb4
18860         fi
18861 fi
18862
18863 if test $ol_cv_lib_db = no ; then
18864         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18865 echo "configure:18866: checking for Berkeley DB link (-ldb)" >&5
18866 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18867   echo $ac_n "(cached) $ac_c" 1>&6
18868 else
18869   
18870         ol_DB_LIB=-ldb
18871         ol_LIBS=$LIBS
18872         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18873
18874         cat > conftest.$ac_ext <<EOF
18875 #line 18876 "configure"
18876 #include "confdefs.h"
18877
18878 #ifdef HAVE_DB_185_H
18879 # include <db_185.h>
18880 #else
18881 # include <db.h>
18882 #endif
18883
18884 #ifndef DB_VERSION_MAJOR
18885 # define DB_VERSION_MAJOR 1
18886 #endif
18887
18888 #ifndef NULL
18889 #define NULL ((void*)0)
18890 #endif
18891
18892 int main() {
18893
18894 #if DB_VERSION_MAJOR > 1
18895         {
18896                 char *version;
18897                 int major, minor, patch;
18898
18899                 version = db_version( &major, &minor, &patch );
18900
18901                 if( major != DB_VERSION_MAJOR ||
18902                         minor < DB_VERSION_MINOR )
18903                 {
18904                         printf("Berkeley DB version mismatch\n"
18905                                 "\texpected: %s\n\tgot: %s\n",
18906                                 DB_VERSION_STRING, version);
18907                         return 1;
18908                 }
18909         }
18910 #endif
18911
18912 #if DB_VERSION_MAJOR > 2
18913         db_env_create( NULL, 0 );
18914 #elif DB_VERSION_MAJOR > 1
18915         db_appexit( NULL );
18916 #else
18917         (void) dbopen( NULL, 0, 0, 0, NULL);
18918 #endif
18919
18920 ; return 0; }
18921 EOF
18922 if { (eval echo configure:18923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18923   rm -rf conftest*
18924   ol_cv_db_db=yes
18925 else
18926   echo "configure: failed program was:" >&5
18927   cat conftest.$ac_ext >&5
18928   rm -rf conftest*
18929   ol_cv_db_db=no
18930 fi
18931 rm -f conftest*
18932
18933         LIBS="$ol_LIBS"
18934
18935 fi
18936
18937 echo "$ac_t""$ol_cv_db_db" 1>&6
18938
18939         if test $ol_cv_db_db = yes ; then
18940                 ol_cv_lib_db=-ldb
18941         fi
18942 fi
18943
18944 if test $ol_cv_lib_db = no ; then
18945         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18946 echo "configure:18947: checking for Berkeley DB link (-ldb41)" >&5
18947 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18948   echo $ac_n "(cached) $ac_c" 1>&6
18949 else
18950   
18951         ol_DB_LIB=-ldb41
18952         ol_LIBS=$LIBS
18953         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18954
18955         cat > conftest.$ac_ext <<EOF
18956 #line 18957 "configure"
18957 #include "confdefs.h"
18958
18959 #ifdef HAVE_DB_185_H
18960 # include <db_185.h>
18961 #else
18962 # include <db.h>
18963 #endif
18964
18965 #ifndef DB_VERSION_MAJOR
18966 # define DB_VERSION_MAJOR 1
18967 #endif
18968
18969 #ifndef NULL
18970 #define NULL ((void*)0)
18971 #endif
18972
18973 int main() {
18974
18975 #if DB_VERSION_MAJOR > 1
18976         {
18977                 char *version;
18978                 int major, minor, patch;
18979
18980                 version = db_version( &major, &minor, &patch );
18981
18982                 if( major != DB_VERSION_MAJOR ||
18983                         minor < DB_VERSION_MINOR )
18984                 {
18985                         printf("Berkeley DB version mismatch\n"
18986                                 "\texpected: %s\n\tgot: %s\n",
18987                                 DB_VERSION_STRING, version);
18988                         return 1;
18989                 }
18990         }
18991 #endif
18992
18993 #if DB_VERSION_MAJOR > 2
18994         db_env_create( NULL, 0 );
18995 #elif DB_VERSION_MAJOR > 1
18996         db_appexit( NULL );
18997 #else
18998         (void) dbopen( NULL, 0, 0, 0, NULL);
18999 #endif
19000
19001 ; return 0; }
19002 EOF
19003 if { (eval echo configure:19004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19004   rm -rf conftest*
19005   ol_cv_db_db41=yes
19006 else
19007   echo "configure: failed program was:" >&5
19008   cat conftest.$ac_ext >&5
19009   rm -rf conftest*
19010   ol_cv_db_db41=no
19011 fi
19012 rm -f conftest*
19013
19014         LIBS="$ol_LIBS"
19015
19016 fi
19017
19018 echo "$ac_t""$ol_cv_db_db41" 1>&6
19019
19020         if test $ol_cv_db_db41 = yes ; then
19021                 ol_cv_lib_db=-ldb41
19022         fi
19023 fi
19024
19025 if test $ol_cv_lib_db = no ; then
19026         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19027 echo "configure:19028: checking for Berkeley DB link (-ldb-41)" >&5
19028 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19029   echo $ac_n "(cached) $ac_c" 1>&6
19030 else
19031   
19032         ol_DB_LIB=-ldb-41
19033         ol_LIBS=$LIBS
19034         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19035
19036         cat > conftest.$ac_ext <<EOF
19037 #line 19038 "configure"
19038 #include "confdefs.h"
19039
19040 #ifdef HAVE_DB_185_H
19041 # include <db_185.h>
19042 #else
19043 # include <db.h>
19044 #endif
19045
19046 #ifndef DB_VERSION_MAJOR
19047 # define DB_VERSION_MAJOR 1
19048 #endif
19049
19050 #ifndef NULL
19051 #define NULL ((void*)0)
19052 #endif
19053
19054 int main() {
19055
19056 #if DB_VERSION_MAJOR > 1
19057         {
19058                 char *version;
19059                 int major, minor, patch;
19060
19061                 version = db_version( &major, &minor, &patch );
19062
19063                 if( major != DB_VERSION_MAJOR ||
19064                         minor < DB_VERSION_MINOR )
19065                 {
19066                         printf("Berkeley DB version mismatch\n"
19067                                 "\texpected: %s\n\tgot: %s\n",
19068                                 DB_VERSION_STRING, version);
19069                         return 1;
19070                 }
19071         }
19072 #endif
19073
19074 #if DB_VERSION_MAJOR > 2
19075         db_env_create( NULL, 0 );
19076 #elif DB_VERSION_MAJOR > 1
19077         db_appexit( NULL );
19078 #else
19079         (void) dbopen( NULL, 0, 0, 0, NULL);
19080 #endif
19081
19082 ; return 0; }
19083 EOF
19084 if { (eval echo configure:19085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19085   rm -rf conftest*
19086   ol_cv_db_db_41=yes
19087 else
19088   echo "configure: failed program was:" >&5
19089   cat conftest.$ac_ext >&5
19090   rm -rf conftest*
19091   ol_cv_db_db_41=no
19092 fi
19093 rm -f conftest*
19094
19095         LIBS="$ol_LIBS"
19096
19097 fi
19098
19099 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19100
19101         if test $ol_cv_db_db_41 = yes ; then
19102                 ol_cv_lib_db=-ldb-41
19103         fi
19104 fi
19105
19106 if test $ol_cv_lib_db = no ; then
19107         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19108 echo "configure:19109: checking for Berkeley DB link (-ldb-4.1)" >&5
19109 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19110   echo $ac_n "(cached) $ac_c" 1>&6
19111 else
19112   
19113         ol_DB_LIB=-ldb-4.1
19114         ol_LIBS=$LIBS
19115         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19116
19117         cat > conftest.$ac_ext <<EOF
19118 #line 19119 "configure"
19119 #include "confdefs.h"
19120
19121 #ifdef HAVE_DB_185_H
19122 # include <db_185.h>
19123 #else
19124 # include <db.h>
19125 #endif
19126
19127 #ifndef DB_VERSION_MAJOR
19128 # define DB_VERSION_MAJOR 1
19129 #endif
19130
19131 #ifndef NULL
19132 #define NULL ((void*)0)
19133 #endif
19134
19135 int main() {
19136
19137 #if DB_VERSION_MAJOR > 1
19138         {
19139                 char *version;
19140                 int major, minor, patch;
19141
19142                 version = db_version( &major, &minor, &patch );
19143
19144                 if( major != DB_VERSION_MAJOR ||
19145                         minor < DB_VERSION_MINOR )
19146                 {
19147                         printf("Berkeley DB version mismatch\n"
19148                                 "\texpected: %s\n\tgot: %s\n",
19149                                 DB_VERSION_STRING, version);
19150                         return 1;
19151                 }
19152         }
19153 #endif
19154
19155 #if DB_VERSION_MAJOR > 2
19156         db_env_create( NULL, 0 );
19157 #elif DB_VERSION_MAJOR > 1
19158         db_appexit( NULL );
19159 #else
19160         (void) dbopen( NULL, 0, 0, 0, NULL);
19161 #endif
19162
19163 ; return 0; }
19164 EOF
19165 if { (eval echo configure:19166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19166   rm -rf conftest*
19167   ol_cv_db_db_4_dot_1=yes
19168 else
19169   echo "configure: failed program was:" >&5
19170   cat conftest.$ac_ext >&5
19171   rm -rf conftest*
19172   ol_cv_db_db_4_dot_1=no
19173 fi
19174 rm -f conftest*
19175
19176         LIBS="$ol_LIBS"
19177
19178 fi
19179
19180 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19181
19182         if test $ol_cv_db_db_4_dot_1 = yes ; then
19183                 ol_cv_lib_db=-ldb-4.1
19184         fi
19185 fi
19186
19187 if test $ol_cv_lib_db = no ; then
19188         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19189 echo "configure:19190: checking for Berkeley DB link (-ldb-4-1)" >&5
19190 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19191   echo $ac_n "(cached) $ac_c" 1>&6
19192 else
19193   
19194         ol_DB_LIB=-ldb-4-1
19195         ol_LIBS=$LIBS
19196         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19197
19198         cat > conftest.$ac_ext <<EOF
19199 #line 19200 "configure"
19200 #include "confdefs.h"
19201
19202 #ifdef HAVE_DB_185_H
19203 # include <db_185.h>
19204 #else
19205 # include <db.h>
19206 #endif
19207
19208 #ifndef DB_VERSION_MAJOR
19209 # define DB_VERSION_MAJOR 1
19210 #endif
19211
19212 #ifndef NULL
19213 #define NULL ((void*)0)
19214 #endif
19215
19216 int main() {
19217
19218 #if DB_VERSION_MAJOR > 1
19219         {
19220                 char *version;
19221                 int major, minor, patch;
19222
19223                 version = db_version( &major, &minor, &patch );
19224
19225                 if( major != DB_VERSION_MAJOR ||
19226                         minor < DB_VERSION_MINOR )
19227                 {
19228                         printf("Berkeley DB version mismatch\n"
19229                                 "\texpected: %s\n\tgot: %s\n",
19230                                 DB_VERSION_STRING, version);
19231                         return 1;
19232                 }
19233         }
19234 #endif
19235
19236 #if DB_VERSION_MAJOR > 2
19237         db_env_create( NULL, 0 );
19238 #elif DB_VERSION_MAJOR > 1
19239         db_appexit( NULL );
19240 #else
19241         (void) dbopen( NULL, 0, 0, 0, NULL);
19242 #endif
19243
19244 ; return 0; }
19245 EOF
19246 if { (eval echo configure:19247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19247   rm -rf conftest*
19248   ol_cv_db_db_4_1=yes
19249 else
19250   echo "configure: failed program was:" >&5
19251   cat conftest.$ac_ext >&5
19252   rm -rf conftest*
19253   ol_cv_db_db_4_1=no
19254 fi
19255 rm -f conftest*
19256
19257         LIBS="$ol_LIBS"
19258
19259 fi
19260
19261 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19262
19263         if test $ol_cv_db_db_4_1 = yes ; then
19264                 ol_cv_lib_db=-ldb-4-1
19265         fi
19266 fi
19267
19268 if test $ol_cv_lib_db = no ; then
19269         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19270 echo "configure:19271: checking for Berkeley DB link (-ldb3)" >&5
19271 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19272   echo $ac_n "(cached) $ac_c" 1>&6
19273 else
19274   
19275         ol_DB_LIB=-ldb3
19276         ol_LIBS=$LIBS
19277         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19278
19279         cat > conftest.$ac_ext <<EOF
19280 #line 19281 "configure"
19281 #include "confdefs.h"
19282
19283 #ifdef HAVE_DB_185_H
19284 # include <db_185.h>
19285 #else
19286 # include <db.h>
19287 #endif
19288
19289 #ifndef DB_VERSION_MAJOR
19290 # define DB_VERSION_MAJOR 1
19291 #endif
19292
19293 #ifndef NULL
19294 #define NULL ((void*)0)
19295 #endif
19296
19297 int main() {
19298
19299 #if DB_VERSION_MAJOR > 1
19300         {
19301                 char *version;
19302                 int major, minor, patch;
19303
19304                 version = db_version( &major, &minor, &patch );
19305
19306                 if( major != DB_VERSION_MAJOR ||
19307                         minor < DB_VERSION_MINOR )
19308                 {
19309                         printf("Berkeley DB version mismatch\n"
19310                                 "\texpected: %s\n\tgot: %s\n",
19311                                 DB_VERSION_STRING, version);
19312                         return 1;
19313                 }
19314         }
19315 #endif
19316
19317 #if DB_VERSION_MAJOR > 2
19318         db_env_create( NULL, 0 );
19319 #elif DB_VERSION_MAJOR > 1
19320         db_appexit( NULL );
19321 #else
19322         (void) dbopen( NULL, 0, 0, 0, NULL);
19323 #endif
19324
19325 ; return 0; }
19326 EOF
19327 if { (eval echo configure:19328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19328   rm -rf conftest*
19329   ol_cv_db_db3=yes
19330 else
19331   echo "configure: failed program was:" >&5
19332   cat conftest.$ac_ext >&5
19333   rm -rf conftest*
19334   ol_cv_db_db3=no
19335 fi
19336 rm -f conftest*
19337
19338         LIBS="$ol_LIBS"
19339
19340 fi
19341
19342 echo "$ac_t""$ol_cv_db_db3" 1>&6
19343
19344         if test $ol_cv_db_db3 = yes ; then
19345                 ol_cv_lib_db=-ldb3
19346         fi
19347 fi
19348
19349 if test $ol_cv_lib_db = no ; then
19350         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19351 echo "configure:19352: checking for Berkeley DB link (-ldb-3)" >&5
19352 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19353   echo $ac_n "(cached) $ac_c" 1>&6
19354 else
19355   
19356         ol_DB_LIB=-ldb-3
19357         ol_LIBS=$LIBS
19358         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19359
19360         cat > conftest.$ac_ext <<EOF
19361 #line 19362 "configure"
19362 #include "confdefs.h"
19363
19364 #ifdef HAVE_DB_185_H
19365 # include <db_185.h>
19366 #else
19367 # include <db.h>
19368 #endif
19369
19370 #ifndef DB_VERSION_MAJOR
19371 # define DB_VERSION_MAJOR 1
19372 #endif
19373
19374 #ifndef NULL
19375 #define NULL ((void*)0)
19376 #endif
19377
19378 int main() {
19379
19380 #if DB_VERSION_MAJOR > 1
19381         {
19382                 char *version;
19383                 int major, minor, patch;
19384
19385                 version = db_version( &major, &minor, &patch );
19386
19387                 if( major != DB_VERSION_MAJOR ||
19388                         minor < DB_VERSION_MINOR )
19389                 {
19390                         printf("Berkeley DB version mismatch\n"
19391                                 "\texpected: %s\n\tgot: %s\n",
19392                                 DB_VERSION_STRING, version);
19393                         return 1;
19394                 }
19395         }
19396 #endif
19397
19398 #if DB_VERSION_MAJOR > 2
19399         db_env_create( NULL, 0 );
19400 #elif DB_VERSION_MAJOR > 1
19401         db_appexit( NULL );
19402 #else
19403         (void) dbopen( NULL, 0, 0, 0, NULL);
19404 #endif
19405
19406 ; return 0; }
19407 EOF
19408 if { (eval echo configure:19409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19409   rm -rf conftest*
19410   ol_cv_db_db_3=yes
19411 else
19412   echo "configure: failed program was:" >&5
19413   cat conftest.$ac_ext >&5
19414   rm -rf conftest*
19415   ol_cv_db_db_3=no
19416 fi
19417 rm -f conftest*
19418
19419         LIBS="$ol_LIBS"
19420
19421 fi
19422
19423 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19424
19425         if test $ol_cv_db_db_3 = yes ; then
19426                 ol_cv_lib_db=-ldb-3
19427         fi
19428 fi
19429
19430 if test $ol_cv_lib_db = no ; then
19431         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19432 echo "configure:19433: checking for Berkeley DB link (-ldb2)" >&5
19433 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19434   echo $ac_n "(cached) $ac_c" 1>&6
19435 else
19436   
19437         ol_DB_LIB=-ldb2
19438         ol_LIBS=$LIBS
19439         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19440
19441         cat > conftest.$ac_ext <<EOF
19442 #line 19443 "configure"
19443 #include "confdefs.h"
19444
19445 #ifdef HAVE_DB_185_H
19446 # include <db_185.h>
19447 #else
19448 # include <db.h>
19449 #endif
19450
19451 #ifndef DB_VERSION_MAJOR
19452 # define DB_VERSION_MAJOR 1
19453 #endif
19454
19455 #ifndef NULL
19456 #define NULL ((void*)0)
19457 #endif
19458
19459 int main() {
19460
19461 #if DB_VERSION_MAJOR > 1
19462         {
19463                 char *version;
19464                 int major, minor, patch;
19465
19466                 version = db_version( &major, &minor, &patch );
19467
19468                 if( major != DB_VERSION_MAJOR ||
19469                         minor < DB_VERSION_MINOR )
19470                 {
19471                         printf("Berkeley DB version mismatch\n"
19472                                 "\texpected: %s\n\tgot: %s\n",
19473                                 DB_VERSION_STRING, version);
19474                         return 1;
19475                 }
19476         }
19477 #endif
19478
19479 #if DB_VERSION_MAJOR > 2
19480         db_env_create( NULL, 0 );
19481 #elif DB_VERSION_MAJOR > 1
19482         db_appexit( NULL );
19483 #else
19484         (void) dbopen( NULL, 0, 0, 0, NULL);
19485 #endif
19486
19487 ; return 0; }
19488 EOF
19489 if { (eval echo configure:19490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19490   rm -rf conftest*
19491   ol_cv_db_db2=yes
19492 else
19493   echo "configure: failed program was:" >&5
19494   cat conftest.$ac_ext >&5
19495   rm -rf conftest*
19496   ol_cv_db_db2=no
19497 fi
19498 rm -f conftest*
19499
19500         LIBS="$ol_LIBS"
19501
19502 fi
19503
19504 echo "$ac_t""$ol_cv_db_db2" 1>&6
19505
19506         if test $ol_cv_db_db2 = yes ; then
19507                 ol_cv_lib_db=-ldb2
19508         fi
19509 fi
19510
19511 if test $ol_cv_lib_db = no ; then
19512         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19513 echo "configure:19514: checking for Berkeley DB link (-ldb-2)" >&5
19514 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19515   echo $ac_n "(cached) $ac_c" 1>&6
19516 else
19517   
19518         ol_DB_LIB=-ldb-2
19519         ol_LIBS=$LIBS
19520         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19521
19522         cat > conftest.$ac_ext <<EOF
19523 #line 19524 "configure"
19524 #include "confdefs.h"
19525
19526 #ifdef HAVE_DB_185_H
19527 # include <db_185.h>
19528 #else
19529 # include <db.h>
19530 #endif
19531
19532 #ifndef DB_VERSION_MAJOR
19533 # define DB_VERSION_MAJOR 1
19534 #endif
19535
19536 #ifndef NULL
19537 #define NULL ((void*)0)
19538 #endif
19539
19540 int main() {
19541
19542 #if DB_VERSION_MAJOR > 1
19543         {
19544                 char *version;
19545                 int major, minor, patch;
19546
19547                 version = db_version( &major, &minor, &patch );
19548
19549                 if( major != DB_VERSION_MAJOR ||
19550                         minor < DB_VERSION_MINOR )
19551                 {
19552                         printf("Berkeley DB version mismatch\n"
19553                                 "\texpected: %s\n\tgot: %s\n",
19554                                 DB_VERSION_STRING, version);
19555                         return 1;
19556                 }
19557         }
19558 #endif
19559
19560 #if DB_VERSION_MAJOR > 2
19561         db_env_create( NULL, 0 );
19562 #elif DB_VERSION_MAJOR > 1
19563         db_appexit( NULL );
19564 #else
19565         (void) dbopen( NULL, 0, 0, 0, NULL);
19566 #endif
19567
19568 ; return 0; }
19569 EOF
19570 if { (eval echo configure:19571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19571   rm -rf conftest*
19572   ol_cv_db_db_2=yes
19573 else
19574   echo "configure: failed program was:" >&5
19575   cat conftest.$ac_ext >&5
19576   rm -rf conftest*
19577   ol_cv_db_db_2=no
19578 fi
19579 rm -f conftest*
19580
19581         LIBS="$ol_LIBS"
19582
19583 fi
19584
19585 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19586
19587         if test $ol_cv_db_db_2 = yes ; then
19588                 ol_cv_lib_db=-ldb-2
19589         fi
19590 fi
19591
19592 if test $ol_cv_lib_db = no ; then
19593         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19594 echo "configure:19595: checking for Berkeley DB link (-ldb1)" >&5
19595 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19596   echo $ac_n "(cached) $ac_c" 1>&6
19597 else
19598   
19599         ol_DB_LIB=-ldb1
19600         ol_LIBS=$LIBS
19601         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19602
19603         cat > conftest.$ac_ext <<EOF
19604 #line 19605 "configure"
19605 #include "confdefs.h"
19606
19607 #ifdef HAVE_DB_185_H
19608 # include <db_185.h>
19609 #else
19610 # include <db.h>
19611 #endif
19612
19613 #ifndef DB_VERSION_MAJOR
19614 # define DB_VERSION_MAJOR 1
19615 #endif
19616
19617 #ifndef NULL
19618 #define NULL ((void*)0)
19619 #endif
19620
19621 int main() {
19622
19623 #if DB_VERSION_MAJOR > 1
19624         {
19625                 char *version;
19626                 int major, minor, patch;
19627
19628                 version = db_version( &major, &minor, &patch );
19629
19630                 if( major != DB_VERSION_MAJOR ||
19631                         minor < DB_VERSION_MINOR )
19632                 {
19633                         printf("Berkeley DB version mismatch\n"
19634                                 "\texpected: %s\n\tgot: %s\n",
19635                                 DB_VERSION_STRING, version);
19636                         return 1;
19637                 }
19638         }
19639 #endif
19640
19641 #if DB_VERSION_MAJOR > 2
19642         db_env_create( NULL, 0 );
19643 #elif DB_VERSION_MAJOR > 1
19644         db_appexit( NULL );
19645 #else
19646         (void) dbopen( NULL, 0, 0, 0, NULL);
19647 #endif
19648
19649 ; return 0; }
19650 EOF
19651 if { (eval echo configure:19652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19652   rm -rf conftest*
19653   ol_cv_db_db1=yes
19654 else
19655   echo "configure: failed program was:" >&5
19656   cat conftest.$ac_ext >&5
19657   rm -rf conftest*
19658   ol_cv_db_db1=no
19659 fi
19660 rm -f conftest*
19661
19662         LIBS="$ol_LIBS"
19663
19664 fi
19665
19666 echo "$ac_t""$ol_cv_db_db1" 1>&6
19667
19668         if test $ol_cv_db_db1 = yes ; then
19669                 ol_cv_lib_db=-ldb1
19670         fi
19671 fi
19672
19673 if test $ol_cv_lib_db = no ; then
19674         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19675 echo "configure:19676: checking for Berkeley DB link (-ldb-1)" >&5
19676 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19677   echo $ac_n "(cached) $ac_c" 1>&6
19678 else
19679   
19680         ol_DB_LIB=-ldb-1
19681         ol_LIBS=$LIBS
19682         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19683
19684         cat > conftest.$ac_ext <<EOF
19685 #line 19686 "configure"
19686 #include "confdefs.h"
19687
19688 #ifdef HAVE_DB_185_H
19689 # include <db_185.h>
19690 #else
19691 # include <db.h>
19692 #endif
19693
19694 #ifndef DB_VERSION_MAJOR
19695 # define DB_VERSION_MAJOR 1
19696 #endif
19697
19698 #ifndef NULL
19699 #define NULL ((void*)0)
19700 #endif
19701
19702 int main() {
19703
19704 #if DB_VERSION_MAJOR > 1
19705         {
19706                 char *version;
19707                 int major, minor, patch;
19708
19709                 version = db_version( &major, &minor, &patch );
19710
19711                 if( major != DB_VERSION_MAJOR ||
19712                         minor < DB_VERSION_MINOR )
19713                 {
19714                         printf("Berkeley DB version mismatch\n"
19715                                 "\texpected: %s\n\tgot: %s\n",
19716                                 DB_VERSION_STRING, version);
19717                         return 1;
19718                 }
19719         }
19720 #endif
19721
19722 #if DB_VERSION_MAJOR > 2
19723         db_env_create( NULL, 0 );
19724 #elif DB_VERSION_MAJOR > 1
19725         db_appexit( NULL );
19726 #else
19727         (void) dbopen( NULL, 0, 0, 0, NULL);
19728 #endif
19729
19730 ; return 0; }
19731 EOF
19732 if { (eval echo configure:19733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19733   rm -rf conftest*
19734   ol_cv_db_db_1=yes
19735 else
19736   echo "configure: failed program was:" >&5
19737   cat conftest.$ac_ext >&5
19738   rm -rf conftest*
19739   ol_cv_db_db_1=no
19740 fi
19741 rm -f conftest*
19742
19743         LIBS="$ol_LIBS"
19744
19745 fi
19746
19747 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19748
19749         if test $ol_cv_db_db_1 = yes ; then
19750                 ol_cv_lib_db=-ldb-1
19751         fi
19752 fi
19753
19754
19755         if test "$ol_cv_lib_db" != no ; then
19756                 ol_cv_berkeley_db=yes
19757                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19758 echo "configure:19759: checking for Berkeley DB thread support" >&5
19759 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19760   echo $ac_n "(cached) $ac_c" 1>&6
19761 else
19762   
19763         ol_LIBS="$LIBS"
19764         LIBS="$LTHREAD_LIBS $LIBS"
19765         if test $ol_cv_lib_db != yes ; then
19766                 LIBS="$ol_cv_lib_db $LIBS"
19767         fi
19768
19769         if test "$cross_compiling" = yes; then
19770   ol_cv_berkeley_db_thread=cross
19771 else
19772   cat > conftest.$ac_ext <<EOF
19773 #line 19774 "configure"
19774 #include "confdefs.h"
19775
19776 #ifdef HAVE_DB_185_H
19777         choke me;
19778 #else
19779 #include <db.h>
19780 #endif
19781 #ifndef NULL
19782 #define NULL ((void *)0)
19783 #endif
19784 main()
19785 {
19786         int rc;
19787         u_int32_t flags = DB_CREATE |
19788 #ifdef DB_PRIVATE
19789                 DB_PRIVATE |
19790 #endif
19791                 DB_THREAD;
19792
19793 #if DB_VERSION_MAJOR > 2
19794         DB_ENV *env = NULL;
19795
19796         rc = db_env_create( &env, 0 );
19797
19798         flags |= DB_INIT_MPOOL;
19799 #ifdef DB_MPOOL_PRIVATE
19800         flags |= DB_MPOOL_PRIVATE;
19801 #endif
19802
19803         if( rc ) {
19804                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19805                 return rc;
19806         }
19807
19808 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19809         rc = env->open( env, NULL, flags, 0 );
19810 #else
19811         rc = env->open( env, NULL, NULL, flags, 0 );
19812 #endif
19813
19814         if ( rc == 0 ) {
19815                 rc = env->close( env, 0 );
19816         }
19817
19818         if( rc ) {
19819                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19820                 return rc;
19821         }
19822
19823 #else
19824         DB_ENV env;
19825         memset( &env, '\0', sizeof(env) );
19826
19827         rc = db_appinit( NULL, NULL, &env, flags );
19828
19829         if( rc == 0 ) {
19830                 db_appexit( &env );
19831         }
19832
19833         unlink("__db_mpool.share");
19834         unlink("__db_lock.share");
19835 #endif
19836
19837         return rc;
19838 }
19839 EOF
19840 if { (eval echo configure:19841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19841 then
19842   ol_cv_berkeley_db_thread=yes
19843 else
19844   echo "configure: failed program was:" >&5
19845   cat conftest.$ac_ext >&5
19846   rm -fr conftest*
19847   ol_cv_berkeley_db_thread=no
19848 fi
19849 rm -fr conftest*
19850 fi
19851
19852
19853         LIBS="$ol_LIBS"
19854
19855 fi
19856
19857 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19858
19859         if test $ol_cv_berkeley_db_thread != no ; then
19860                 cat >> confdefs.h <<\EOF
19861 #define HAVE_BERKELEY_DB_THREAD 1
19862 EOF
19863
19864         fi
19865
19866         fi
19867 fi
19868
19869         fi
19870
19871         if test $ol_cv_berkeley_db != no ; then
19872                 cat >> confdefs.h <<\EOF
19873 #define HAVE_BERKELEY_DB 1
19874 EOF
19875
19876
19877                 ol_link_ldbm=berkeley
19878                 ol_with_ldbm_api=berkeley
19879
19880                 if test $ol_with_ldbm_type = hash ; then
19881                         cat >> confdefs.h <<\EOF
19882 #define LDBM_USE_DBHASH 1
19883 EOF
19884
19885                 else
19886                         cat >> confdefs.h <<\EOF
19887 #define LDBM_USE_DBBTREE 1
19888 EOF
19889
19890                 fi
19891
19892                                                 if test $ol_cv_lib_db != yes ; then
19893                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19894                 fi
19895         fi
19896 fi
19897
19898 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19899         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19900 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19901         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19902 echo "configure:19903: checking Berkeley DB version for BDB backend" >&5
19903 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19904   echo $ac_n "(cached) $ac_c" 1>&6
19905 else
19906   
19907         cat > conftest.$ac_ext <<EOF
19908 #line 19909 "configure"
19909 #include "confdefs.h"
19910
19911 #include <db.h>
19912
19913  /* this check could be improved */
19914 #ifndef DB_VERSION_MAJOR
19915 #       define DB_VERSION_MAJOR 1
19916 #endif
19917 #ifndef DB_VERSION_MINOR
19918 #       define DB_VERSION_MINOR 0
19919 #endif
19920
19921 /* require 4.2 or later */
19922 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19923         __db_version_compat
19924 #endif
19925         
19926 EOF
19927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19928   egrep "__db_version_compat" >/dev/null 2>&1; then
19929   rm -rf conftest*
19930   ol_cv_bdb_compat=yes
19931 else
19932   rm -rf conftest*
19933   ol_cv_bdb_compat=no
19934 fi
19935 rm -f conftest*
19936
19937 fi
19938
19939 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19940
19941
19942         if test $ol_cv_bdb_compat = yes ; then
19943                 ol_enable_bdb=yes
19944         elif test $ol_enable_bdb = yes ; then
19945                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19946         else
19947                 ol_enable_bdb=no
19948         fi
19949 fi
19950 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19951         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19952 fi
19953
19954 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19955         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19956         ol_with_ldbm_api=none
19957 fi
19958
19959 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19960         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19961 echo "configure:19962: checking for MDBM library" >&5
19962 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19963   echo $ac_n "(cached) $ac_c" 1>&6
19964 else
19965         ol_LIBS="$LIBS"
19966         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19967 echo "configure:19968: checking for mdbm_set_chain" >&5
19968 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19969   echo $ac_n "(cached) $ac_c" 1>&6
19970 else
19971   cat > conftest.$ac_ext <<EOF
19972 #line 19973 "configure"
19973 #include "confdefs.h"
19974 /* System header to define __stub macros and hopefully few prototypes,
19975     which can conflict with char mdbm_set_chain(); below.  */
19976 #include <assert.h>
19977 /* Override any gcc2 internal prototype to avoid an error.  */
19978 /* We use char because int might match the return type of a gcc2
19979     builtin and then its argument prototype would still apply.  */
19980 char mdbm_set_chain();
19981 char (*f)();
19982
19983 int main() {
19984
19985 /* The GNU C library defines this for functions which it implements
19986     to always fail with ENOSYS.  Some functions are actually named
19987     something starting with __ and the normal name is an alias.  */
19988 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19989 choke me
19990 #else
19991 f = mdbm_set_chain;
19992 #endif
19993
19994 ; return 0; }
19995 EOF
19996 if { (eval echo configure:19997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19997   rm -rf conftest*
19998   eval "ac_cv_func_mdbm_set_chain=yes"
19999 else
20000   echo "configure: failed program was:" >&5
20001   cat conftest.$ac_ext >&5
20002   rm -rf conftest*
20003   eval "ac_cv_func_mdbm_set_chain=no"
20004 fi
20005 rm -f conftest*
20006 fi
20007
20008 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20009   echo "$ac_t""yes" 1>&6
20010   ol_cv_lib_mdbm=yes
20011 else
20012   echo "$ac_t""no" 1>&6
20013
20014                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20015 echo "configure:20016: checking for mdbm_set_chain in -lmdbm" >&5
20016 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20017 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20018   echo $ac_n "(cached) $ac_c" 1>&6
20019 else
20020   ac_save_LIBS="$LIBS"
20021 LIBS="-lmdbm  $LIBS"
20022 cat > conftest.$ac_ext <<EOF
20023 #line 20024 "configure"
20024 #include "confdefs.h"
20025 /* Override any gcc2 internal prototype to avoid an error.  */
20026 /* We use char because int might match the return type of a gcc2
20027     builtin and then its argument prototype would still apply.  */
20028 char mdbm_set_chain();
20029
20030 int main() {
20031 mdbm_set_chain()
20032 ; return 0; }
20033 EOF
20034 if { (eval echo configure:20035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20035   rm -rf conftest*
20036   eval "ac_cv_lib_$ac_lib_var=yes"
20037 else
20038   echo "configure: failed program was:" >&5
20039   cat conftest.$ac_ext >&5
20040   rm -rf conftest*
20041   eval "ac_cv_lib_$ac_lib_var=no"
20042 fi
20043 rm -f conftest*
20044 LIBS="$ac_save_LIBS"
20045
20046 fi
20047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20048   echo "$ac_t""yes" 1>&6
20049   ol_cv_lib_mdbm=-lmdbm
20050 else
20051   echo "$ac_t""no" 1>&6
20052 ol_cv_lib_mdbm=no
20053 fi
20054
20055         
20056 fi
20057
20058         LIBS="$ol_LIBS"
20059
20060 fi
20061
20062 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20063
20064
20065  for ac_hdr in mdbm.h
20066 do
20067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20068 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20069 echo "configure:20070: checking for $ac_hdr" >&5
20070 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20071   echo $ac_n "(cached) $ac_c" 1>&6
20072 else
20073   cat > conftest.$ac_ext <<EOF
20074 #line 20075 "configure"
20075 #include "confdefs.h"
20076 #include <$ac_hdr>
20077 EOF
20078 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20079 { (eval echo configure:20080: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20080 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20081 if test -z "$ac_err"; then
20082   rm -rf conftest*
20083   eval "ac_cv_header_$ac_safe=yes"
20084 else
20085   echo "$ac_err" >&5
20086   echo "configure: failed program was:" >&5
20087   cat conftest.$ac_ext >&5
20088   rm -rf conftest*
20089   eval "ac_cv_header_$ac_safe=no"
20090 fi
20091 rm -f conftest*
20092 fi
20093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20094   echo "$ac_t""yes" 1>&6
20095     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20096   cat >> confdefs.h <<EOF
20097 #define $ac_tr_hdr 1
20098 EOF
20099  
20100 else
20101   echo "$ac_t""no" 1>&6
20102 fi
20103 done
20104
20105  echo $ac_n "checking for db""... $ac_c" 1>&6
20106 echo "configure:20107: checking for db" >&5
20107 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20108   echo $ac_n "(cached) $ac_c" 1>&6
20109 else
20110   
20111         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20112                 ol_cv_mdbm=no
20113         else
20114                 ol_cv_mdbm=yes
20115         fi
20116
20117 fi
20118
20119 echo "$ac_t""$ol_cv_mdbm" 1>&6
20120  if test $ol_cv_mdbm = yes ; then
20121         cat >> confdefs.h <<\EOF
20122 #define HAVE_MDBM 1
20123 EOF
20124
20125  fi
20126
20127
20128         if test $ol_cv_mdbm = yes ; then
20129                 ol_link_ldbm=mdbm
20130                 ol_with_ldbm_api=mdbm
20131                 if test $ol_cv_lib_mdbm != yes ; then
20132                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20133                 fi
20134         fi
20135 fi
20136
20137 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20138         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20139 echo "configure:20140: checking for GDBM library" >&5
20140 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20141   echo $ac_n "(cached) $ac_c" 1>&6
20142 else
20143         ol_LIBS="$LIBS"
20144         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20145 echo "configure:20146: checking for gdbm_open" >&5
20146 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20147   echo $ac_n "(cached) $ac_c" 1>&6
20148 else
20149   cat > conftest.$ac_ext <<EOF
20150 #line 20151 "configure"
20151 #include "confdefs.h"
20152 /* System header to define __stub macros and hopefully few prototypes,
20153     which can conflict with char gdbm_open(); below.  */
20154 #include <assert.h>
20155 /* Override any gcc2 internal prototype to avoid an error.  */
20156 /* We use char because int might match the return type of a gcc2
20157     builtin and then its argument prototype would still apply.  */
20158 char gdbm_open();
20159 char (*f)();
20160
20161 int main() {
20162
20163 /* The GNU C library defines this for functions which it implements
20164     to always fail with ENOSYS.  Some functions are actually named
20165     something starting with __ and the normal name is an alias.  */
20166 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20167 choke me
20168 #else
20169 f = gdbm_open;
20170 #endif
20171
20172 ; return 0; }
20173 EOF
20174 if { (eval echo configure:20175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20175   rm -rf conftest*
20176   eval "ac_cv_func_gdbm_open=yes"
20177 else
20178   echo "configure: failed program was:" >&5
20179   cat conftest.$ac_ext >&5
20180   rm -rf conftest*
20181   eval "ac_cv_func_gdbm_open=no"
20182 fi
20183 rm -f conftest*
20184 fi
20185
20186 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20187   echo "$ac_t""yes" 1>&6
20188   ol_cv_lib_gdbm=yes
20189 else
20190   echo "$ac_t""no" 1>&6
20191
20192                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20193 echo "configure:20194: checking for gdbm_open in -lgdbm" >&5
20194 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20196   echo $ac_n "(cached) $ac_c" 1>&6
20197 else
20198   ac_save_LIBS="$LIBS"
20199 LIBS="-lgdbm  $LIBS"
20200 cat > conftest.$ac_ext <<EOF
20201 #line 20202 "configure"
20202 #include "confdefs.h"
20203 /* Override any gcc2 internal prototype to avoid an error.  */
20204 /* We use char because int might match the return type of a gcc2
20205     builtin and then its argument prototype would still apply.  */
20206 char gdbm_open();
20207
20208 int main() {
20209 gdbm_open()
20210 ; return 0; }
20211 EOF
20212 if { (eval echo configure:20213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20213   rm -rf conftest*
20214   eval "ac_cv_lib_$ac_lib_var=yes"
20215 else
20216   echo "configure: failed program was:" >&5
20217   cat conftest.$ac_ext >&5
20218   rm -rf conftest*
20219   eval "ac_cv_lib_$ac_lib_var=no"
20220 fi
20221 rm -f conftest*
20222 LIBS="$ac_save_LIBS"
20223
20224 fi
20225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20226   echo "$ac_t""yes" 1>&6
20227   ol_cv_lib_gdbm=-lgdbm
20228 else
20229   echo "$ac_t""no" 1>&6
20230 ol_cv_lib_gdbm=no
20231 fi
20232
20233         
20234 fi
20235
20236         LIBS="$ol_LIBS"
20237
20238 fi
20239
20240 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20241
20242
20243  for ac_hdr in gdbm.h
20244 do
20245 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20246 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20247 echo "configure:20248: checking for $ac_hdr" >&5
20248 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20249   echo $ac_n "(cached) $ac_c" 1>&6
20250 else
20251   cat > conftest.$ac_ext <<EOF
20252 #line 20253 "configure"
20253 #include "confdefs.h"
20254 #include <$ac_hdr>
20255 EOF
20256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20257 { (eval echo configure:20258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20259 if test -z "$ac_err"; then
20260   rm -rf conftest*
20261   eval "ac_cv_header_$ac_safe=yes"
20262 else
20263   echo "$ac_err" >&5
20264   echo "configure: failed program was:" >&5
20265   cat conftest.$ac_ext >&5
20266   rm -rf conftest*
20267   eval "ac_cv_header_$ac_safe=no"
20268 fi
20269 rm -f conftest*
20270 fi
20271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20272   echo "$ac_t""yes" 1>&6
20273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20274   cat >> confdefs.h <<EOF
20275 #define $ac_tr_hdr 1
20276 EOF
20277  
20278 else
20279   echo "$ac_t""no" 1>&6
20280 fi
20281 done
20282
20283  echo $ac_n "checking for db""... $ac_c" 1>&6
20284 echo "configure:20285: checking for db" >&5
20285 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20286   echo $ac_n "(cached) $ac_c" 1>&6
20287 else
20288   
20289         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20290                 ol_cv_gdbm=no
20291         else
20292                 ol_cv_gdbm=yes
20293         fi
20294
20295 fi
20296
20297 echo "$ac_t""$ol_cv_gdbm" 1>&6
20298  if test $ol_cv_gdbm = yes ; then
20299         cat >> confdefs.h <<\EOF
20300 #define HAVE_GDBM 1
20301 EOF
20302
20303  fi
20304
20305
20306         if test $ol_cv_gdbm = yes ; then
20307                 ol_link_ldbm=gdbm
20308                 ol_with_ldbm_api=gdbm
20309
20310                 if test $ol_cv_lib_gdbm != yes ; then
20311                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20312                 fi
20313         fi
20314 fi
20315
20316 if test $ol_with_ldbm_api = ndbm ; then
20317         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20318 echo "configure:20319: checking for NDBM library" >&5
20319 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20320   echo $ac_n "(cached) $ac_c" 1>&6
20321 else
20322         ol_LIBS="$LIBS"
20323         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20324 echo "configure:20325: checking for dbm_open" >&5
20325 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20326   echo $ac_n "(cached) $ac_c" 1>&6
20327 else
20328   cat > conftest.$ac_ext <<EOF
20329 #line 20330 "configure"
20330 #include "confdefs.h"
20331 /* System header to define __stub macros and hopefully few prototypes,
20332     which can conflict with char dbm_open(); below.  */
20333 #include <assert.h>
20334 /* Override any gcc2 internal prototype to avoid an error.  */
20335 /* We use char because int might match the return type of a gcc2
20336     builtin and then its argument prototype would still apply.  */
20337 char dbm_open();
20338 char (*f)();
20339
20340 int main() {
20341
20342 /* The GNU C library defines this for functions which it implements
20343     to always fail with ENOSYS.  Some functions are actually named
20344     something starting with __ and the normal name is an alias.  */
20345 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20346 choke me
20347 #else
20348 f = dbm_open;
20349 #endif
20350
20351 ; return 0; }
20352 EOF
20353 if { (eval echo configure:20354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20354   rm -rf conftest*
20355   eval "ac_cv_func_dbm_open=yes"
20356 else
20357   echo "configure: failed program was:" >&5
20358   cat conftest.$ac_ext >&5
20359   rm -rf conftest*
20360   eval "ac_cv_func_dbm_open=no"
20361 fi
20362 rm -f conftest*
20363 fi
20364
20365 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20366   echo "$ac_t""yes" 1>&6
20367   ol_cv_lib_ndbm=yes
20368 else
20369   echo "$ac_t""no" 1>&6
20370
20371                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20372 echo "configure:20373: checking for dbm_open in -lndbm" >&5
20373 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20375   echo $ac_n "(cached) $ac_c" 1>&6
20376 else
20377   ac_save_LIBS="$LIBS"
20378 LIBS="-lndbm  $LIBS"
20379 cat > conftest.$ac_ext <<EOF
20380 #line 20381 "configure"
20381 #include "confdefs.h"
20382 /* Override any gcc2 internal prototype to avoid an error.  */
20383 /* We use char because int might match the return type of a gcc2
20384     builtin and then its argument prototype would still apply.  */
20385 char dbm_open();
20386
20387 int main() {
20388 dbm_open()
20389 ; return 0; }
20390 EOF
20391 if { (eval echo configure:20392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20392   rm -rf conftest*
20393   eval "ac_cv_lib_$ac_lib_var=yes"
20394 else
20395   echo "configure: failed program was:" >&5
20396   cat conftest.$ac_ext >&5
20397   rm -rf conftest*
20398   eval "ac_cv_lib_$ac_lib_var=no"
20399 fi
20400 rm -f conftest*
20401 LIBS="$ac_save_LIBS"
20402
20403 fi
20404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20405   echo "$ac_t""yes" 1>&6
20406   ol_cv_lib_ndbm=-lndbm
20407 else
20408   echo "$ac_t""no" 1>&6
20409
20410                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20411 echo "configure:20412: checking for dbm_open in -ldbm" >&5
20412 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20413 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20414   echo $ac_n "(cached) $ac_c" 1>&6
20415 else
20416   ac_save_LIBS="$LIBS"
20417 LIBS="-ldbm  $LIBS"
20418 cat > conftest.$ac_ext <<EOF
20419 #line 20420 "configure"
20420 #include "confdefs.h"
20421 /* Override any gcc2 internal prototype to avoid an error.  */
20422 /* We use char because int might match the return type of a gcc2
20423     builtin and then its argument prototype would still apply.  */
20424 char dbm_open();
20425
20426 int main() {
20427 dbm_open()
20428 ; return 0; }
20429 EOF
20430 if { (eval echo configure:20431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20431   rm -rf conftest*
20432   eval "ac_cv_lib_$ac_lib_var=yes"
20433 else
20434   echo "configure: failed program was:" >&5
20435   cat conftest.$ac_ext >&5
20436   rm -rf conftest*
20437   eval "ac_cv_lib_$ac_lib_var=no"
20438 fi
20439 rm -f conftest*
20440 LIBS="$ac_save_LIBS"
20441
20442 fi
20443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20444   echo "$ac_t""yes" 1>&6
20445   ol_cv_lib_ndbm=-ldbm
20446 else
20447   echo "$ac_t""no" 1>&6
20448 ol_cv_lib_ndbm=no
20449 fi
20450                 
20451 fi
20452
20453         
20454 fi
20455
20456         LIBS="$ol_LIBS"
20457
20458 fi
20459
20460 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20461
20462
20463  for ac_hdr in ndbm.h
20464 do
20465 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20466 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20467 echo "configure:20468: checking for $ac_hdr" >&5
20468 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20469   echo $ac_n "(cached) $ac_c" 1>&6
20470 else
20471   cat > conftest.$ac_ext <<EOF
20472 #line 20473 "configure"
20473 #include "confdefs.h"
20474 #include <$ac_hdr>
20475 EOF
20476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20477 { (eval echo configure:20478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20479 if test -z "$ac_err"; then
20480   rm -rf conftest*
20481   eval "ac_cv_header_$ac_safe=yes"
20482 else
20483   echo "$ac_err" >&5
20484   echo "configure: failed program was:" >&5
20485   cat conftest.$ac_ext >&5
20486   rm -rf conftest*
20487   eval "ac_cv_header_$ac_safe=no"
20488 fi
20489 rm -f conftest*
20490 fi
20491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20492   echo "$ac_t""yes" 1>&6
20493     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20494   cat >> confdefs.h <<EOF
20495 #define $ac_tr_hdr 1
20496 EOF
20497  
20498 else
20499   echo "$ac_t""no" 1>&6
20500 fi
20501 done
20502
20503  echo $ac_n "checking for db""... $ac_c" 1>&6
20504 echo "configure:20505: checking for db" >&5
20505 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20506   echo $ac_n "(cached) $ac_c" 1>&6
20507 else
20508   
20509         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20510                 ol_cv_ndbm=no
20511         else
20512                 ol_cv_ndbm=yes
20513         fi
20514
20515 fi
20516
20517 echo "$ac_t""$ol_cv_ndbm" 1>&6
20518  if test $ol_cv_ndbm = yes ; then
20519         cat >> confdefs.h <<\EOF
20520 #define HAVE_NDBM 1
20521 EOF
20522
20523  fi
20524
20525
20526         if test $ol_cv_ndbm = yes ; then
20527                 ol_link_ldbm=ndbm
20528                 ol_with_ldbm_api=ndbm
20529
20530                 if test $ol_cv_lib_ndbm != yes ; then
20531                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20532                 fi
20533         fi
20534 fi
20535
20536 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20537         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20538         if test $ol_enable_ldbm = yes ; then
20539                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20540         fi
20541
20542         echo "configure: warning: disabling LDBM" 1>&2
20543         ol_enable_ldbm=no
20544 fi
20545
20546
20547 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20548         BUILD_LIBS_DYNAMIC=shared
20549         cat >> confdefs.h <<\EOF
20550 #define LDAP_LIBS_DYNAMIC 1
20551 EOF
20552
20553         LTSTATIC=""
20554 else
20555         BUILD_LIBS_DYNAMIC=static
20556         LTSTATIC="-static"
20557 fi
20558
20559 if test $ol_enable_wrappers != no ; then
20560         for ac_hdr in tcpd.h
20561 do
20562 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20563 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20564 echo "configure:20565: checking for $ac_hdr" >&5
20565 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20566   echo $ac_n "(cached) $ac_c" 1>&6
20567 else
20568   cat > conftest.$ac_ext <<EOF
20569 #line 20570 "configure"
20570 #include "confdefs.h"
20571 #include <$ac_hdr>
20572 EOF
20573 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20574 { (eval echo configure:20575: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20575 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20576 if test -z "$ac_err"; then
20577   rm -rf conftest*
20578   eval "ac_cv_header_$ac_safe=yes"
20579 else
20580   echo "$ac_err" >&5
20581   echo "configure: failed program was:" >&5
20582   cat conftest.$ac_ext >&5
20583   rm -rf conftest*
20584   eval "ac_cv_header_$ac_safe=no"
20585 fi
20586 rm -f conftest*
20587 fi
20588 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20589   echo "$ac_t""yes" 1>&6
20590     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20591   cat >> confdefs.h <<EOF
20592 #define $ac_tr_hdr 1
20593 EOF
20594  
20595                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20596 echo "configure:20597: checking for TCP wrappers library" >&5
20597                 save_LIBS="$LIBS"
20598                 LIBS="$LIBS -lwrap"
20599                 cat > conftest.$ac_ext <<EOF
20600 #line 20601 "configure"
20601 #include "confdefs.h"
20602
20603 #include <tcpd.h>
20604 int allow_severity = 0;
20605 int deny_severity  = 0;
20606
20607 struct request_info *req;
20608                 
20609 int main() {
20610
20611 hosts_access(req)
20612                 
20613 ; return 0; }
20614 EOF
20615 if { (eval echo configure:20616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20616   rm -rf conftest*
20617   echo "$ac_t""-lwrap" 1>&6
20618                 have_wrappers=yes
20619                 LIBS="$save_LIBS"
20620 else
20621   echo "configure: failed program was:" >&5
20622   cat conftest.$ac_ext >&5
20623   rm -rf conftest*
20624   
20625                                 LIBS="$LIBS -lnsl"
20626                 cat > conftest.$ac_ext <<EOF
20627 #line 20628 "configure"
20628 #include "confdefs.h"
20629
20630 #include <tcpd.h>
20631 int allow_severity = 0;
20632 int deny_severity  = 0;
20633
20634 struct request_info *req;
20635                 
20636 int main() {
20637
20638 hosts_access(req)
20639                 
20640 ; return 0; }
20641 EOF
20642 if { (eval echo configure:20643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20643   rm -rf conftest*
20644   echo "$ac_t""-lwrap -lnsl" 1>&6
20645                 have_wrappers=yes
20646                 LIBS="$save_LIBS -lnsl"
20647 else
20648   echo "configure: failed program was:" >&5
20649   cat conftest.$ac_ext >&5
20650   rm -rf conftest*
20651   
20652                 echo "$ac_t""no" 1>&6
20653                 have_wrappers=no
20654                 LIBS=$save_LIBS
20655 fi
20656 rm -f conftest*
20657 fi
20658 rm -f conftest*
20659 else
20660   echo "$ac_t""no" 1>&6
20661 have_wrappers=no
20662 fi
20663 done
20664
20665
20666         if test $have_wrappers = yes ; then
20667                 cat >> confdefs.h <<\EOF
20668 #define HAVE_TCPD 1
20669 EOF
20670
20671                 WRAP_LIBS="-lwrap"
20672         elif test $ol_enable_wrappers = yes ; then
20673                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20674         else
20675                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20676                 WRAP_LIBS=""
20677         fi
20678 fi
20679
20680 if test $ol_enable_syslog != no ; then
20681         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20682 echo "configure:20683: checking for openlog" >&5
20683 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20684   echo $ac_n "(cached) $ac_c" 1>&6
20685 else
20686   cat > conftest.$ac_ext <<EOF
20687 #line 20688 "configure"
20688 #include "confdefs.h"
20689 /* System header to define __stub macros and hopefully few prototypes,
20690     which can conflict with char openlog(); below.  */
20691 #include <assert.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 openlog();
20696 char (*f)();
20697
20698 int main() {
20699
20700 /* The GNU C library defines this for functions which it implements
20701     to always fail with ENOSYS.  Some functions are actually named
20702     something starting with __ and the normal name is an alias.  */
20703 #if defined (__stub_openlog) || defined (__stub___openlog)
20704 choke me
20705 #else
20706 f = openlog;
20707 #endif
20708
20709 ; return 0; }
20710 EOF
20711 if { (eval echo configure:20712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20712   rm -rf conftest*
20713   eval "ac_cv_func_openlog=yes"
20714 else
20715   echo "configure: failed program was:" >&5
20716   cat conftest.$ac_ext >&5
20717   rm -rf conftest*
20718   eval "ac_cv_func_openlog=no"
20719 fi
20720 rm -f conftest*
20721 fi
20722
20723 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20724   echo "$ac_t""yes" 1>&6
20725   :
20726 else
20727   echo "$ac_t""no" 1>&6
20728 fi
20729
20730         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20731                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20732         fi
20733         ol_enable_syslog=$ac_cv_func_openlog
20734 fi
20735
20736
20737 ol_link_sql=no
20738 if test $ol_enable_sql != no ; then
20739         for ac_hdr in sql.h sqlext.h
20740 do
20741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20743 echo "configure:20744: checking for $ac_hdr" >&5
20744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20745   echo $ac_n "(cached) $ac_c" 1>&6
20746 else
20747   cat > conftest.$ac_ext <<EOF
20748 #line 20749 "configure"
20749 #include "confdefs.h"
20750 #include <$ac_hdr>
20751 EOF
20752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20753 { (eval echo configure:20754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20755 if test -z "$ac_err"; then
20756   rm -rf conftest*
20757   eval "ac_cv_header_$ac_safe=yes"
20758 else
20759   echo "$ac_err" >&5
20760   echo "configure: failed program was:" >&5
20761   cat conftest.$ac_ext >&5
20762   rm -rf conftest*
20763   eval "ac_cv_header_$ac_safe=no"
20764 fi
20765 rm -f conftest*
20766 fi
20767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20768   echo "$ac_t""yes" 1>&6
20769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20770   cat >> confdefs.h <<EOF
20771 #define $ac_tr_hdr 1
20772 EOF
20773  
20774 else
20775   echo "$ac_t""no" 1>&6
20776 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20777         
20778 fi
20779 done
20780
20781
20782         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20783 echo "configure:20784: checking for SQLDriverConnect in -liodbc" >&5
20784 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20785 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20786   echo $ac_n "(cached) $ac_c" 1>&6
20787 else
20788   ac_save_LIBS="$LIBS"
20789 LIBS="-liodbc  $LIBS"
20790 cat > conftest.$ac_ext <<EOF
20791 #line 20792 "configure"
20792 #include "confdefs.h"
20793 /* Override any gcc2 internal prototype to avoid an error.  */
20794 /* We use char because int might match the return type of a gcc2
20795     builtin and then its argument prototype would still apply.  */
20796 char SQLDriverConnect();
20797
20798 int main() {
20799 SQLDriverConnect()
20800 ; return 0; }
20801 EOF
20802 if { (eval echo configure:20803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20803   rm -rf conftest*
20804   eval "ac_cv_lib_$ac_lib_var=yes"
20805 else
20806   echo "configure: failed program was:" >&5
20807   cat conftest.$ac_ext >&5
20808   rm -rf conftest*
20809   eval "ac_cv_lib_$ac_lib_var=no"
20810 fi
20811 rm -f conftest*
20812 LIBS="$ac_save_LIBS"
20813
20814 fi
20815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20816   echo "$ac_t""yes" 1>&6
20817   have_iodbc=yes
20818 else
20819   echo "$ac_t""no" 1>&6
20820 have_iodbc=no
20821 fi
20822
20823         if test $have_iodbc = yes ; then
20824                 ol_link_sql="-liodbc"
20825         else
20826                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20827 echo "configure:20828: checking for SQLDriverConnect in -lodbc" >&5
20828 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20830   echo $ac_n "(cached) $ac_c" 1>&6
20831 else
20832   ac_save_LIBS="$LIBS"
20833 LIBS="-lodbc  $LIBS"
20834 cat > conftest.$ac_ext <<EOF
20835 #line 20836 "configure"
20836 #include "confdefs.h"
20837 /* Override any gcc2 internal prototype to avoid an error.  */
20838 /* We use char because int might match the return type of a gcc2
20839     builtin and then its argument prototype would still apply.  */
20840 char SQLDriverConnect();
20841
20842 int main() {
20843 SQLDriverConnect()
20844 ; return 0; }
20845 EOF
20846 if { (eval echo configure:20847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20847   rm -rf conftest*
20848   eval "ac_cv_lib_$ac_lib_var=yes"
20849 else
20850   echo "configure: failed program was:" >&5
20851   cat conftest.$ac_ext >&5
20852   rm -rf conftest*
20853   eval "ac_cv_lib_$ac_lib_var=no"
20854 fi
20855 rm -f conftest*
20856 LIBS="$ac_save_LIBS"
20857
20858 fi
20859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20860   echo "$ac_t""yes" 1>&6
20861   have_odbc=yes
20862 else
20863   echo "$ac_t""no" 1>&6
20864 have_odbc=no
20865 fi
20866
20867                 if test $have_odbc = yes ; then
20868                         ol_link_sql="-lodbc"
20869                 fi
20870         fi
20871
20872         if test $ol_link_sql != no ; then
20873                 SLAPD_SQL_LIBS="$ol_link_sql"
20874
20875         elif test $ol_enable_sql != auto ; then
20876                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20877         fi
20878 fi
20879
20880 ol_link_sasl=no
20881 ol_link_spasswd=no
20882 if test $ol_with_cyrus_sasl != no ; then
20883         for ac_hdr in sasl/sasl.h sasl.h
20884 do
20885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20887 echo "configure:20888: checking for $ac_hdr" >&5
20888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20889   echo $ac_n "(cached) $ac_c" 1>&6
20890 else
20891   cat > conftest.$ac_ext <<EOF
20892 #line 20893 "configure"
20893 #include "confdefs.h"
20894 #include <$ac_hdr>
20895 EOF
20896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20897 { (eval echo configure:20898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20899 if test -z "$ac_err"; then
20900   rm -rf conftest*
20901   eval "ac_cv_header_$ac_safe=yes"
20902 else
20903   echo "$ac_err" >&5
20904   echo "configure: failed program was:" >&5
20905   cat conftest.$ac_ext >&5
20906   rm -rf conftest*
20907   eval "ac_cv_header_$ac_safe=no"
20908 fi
20909 rm -f conftest*
20910 fi
20911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20912   echo "$ac_t""yes" 1>&6
20913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20914   cat >> confdefs.h <<EOF
20915 #define $ac_tr_hdr 1
20916 EOF
20917  
20918 else
20919   echo "$ac_t""no" 1>&6
20920 fi
20921 done
20922
20923
20924         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20925                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20926 echo "configure:20927: checking for sasl_client_init in -lsasl2" >&5
20927 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20928 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20929   echo $ac_n "(cached) $ac_c" 1>&6
20930 else
20931   ac_save_LIBS="$LIBS"
20932 LIBS="-lsasl2  $LIBS"
20933 cat > conftest.$ac_ext <<EOF
20934 #line 20935 "configure"
20935 #include "confdefs.h"
20936 /* Override any gcc2 internal prototype to avoid an error.  */
20937 /* We use char because int might match the return type of a gcc2
20938     builtin and then its argument prototype would still apply.  */
20939 char sasl_client_init();
20940
20941 int main() {
20942 sasl_client_init()
20943 ; return 0; }
20944 EOF
20945 if { (eval echo configure:20946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20946   rm -rf conftest*
20947   eval "ac_cv_lib_$ac_lib_var=yes"
20948 else
20949   echo "configure: failed program was:" >&5
20950   cat conftest.$ac_ext >&5
20951   rm -rf conftest*
20952   eval "ac_cv_lib_$ac_lib_var=no"
20953 fi
20954 rm -f conftest*
20955 LIBS="$ac_save_LIBS"
20956
20957 fi
20958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20959   echo "$ac_t""yes" 1>&6
20960   ol_link_sasl="-lsasl2"
20961 else
20962   echo "$ac_t""no" 1>&6
20963 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20964 echo "configure:20965: checking for sasl_client_init in -lsasl" >&5
20965 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20966 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20967   echo $ac_n "(cached) $ac_c" 1>&6
20968 else
20969   ac_save_LIBS="$LIBS"
20970 LIBS="-lsasl  $LIBS"
20971 cat > conftest.$ac_ext <<EOF
20972 #line 20973 "configure"
20973 #include "confdefs.h"
20974 /* Override any gcc2 internal prototype to avoid an error.  */
20975 /* We use char because int might match the return type of a gcc2
20976     builtin and then its argument prototype would still apply.  */
20977 char sasl_client_init();
20978
20979 int main() {
20980 sasl_client_init()
20981 ; return 0; }
20982 EOF
20983 if { (eval echo configure:20984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20984   rm -rf conftest*
20985   eval "ac_cv_lib_$ac_lib_var=yes"
20986 else
20987   echo "configure: failed program was:" >&5
20988   cat conftest.$ac_ext >&5
20989   rm -rf conftest*
20990   eval "ac_cv_lib_$ac_lib_var=no"
20991 fi
20992 rm -f conftest*
20993 LIBS="$ac_save_LIBS"
20994
20995 fi
20996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20997   echo "$ac_t""yes" 1>&6
20998   ol_link_sasl="-lsasl"
20999 else
21000   echo "$ac_t""no" 1>&6
21001 fi
21002
21003 fi
21004
21005         fi
21006
21007         if test $ol_link_sasl = no ; then
21008                 if test $ol_with_cyrus_sasl != auto ; then
21009                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21010                 else
21011                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21012                         echo "configure: warning: SASL authentication not supported!" 1>&2
21013                         if test $ol_link_tls = no ; then
21014                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21015                         fi
21016                 fi
21017         else
21018                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21019 echo "configure:21020: checking Cyrus SASL library version" >&5
21020 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21021   echo $ac_n "(cached) $ac_c" 1>&6
21022 else
21023   
21024         cat > conftest.$ac_ext <<EOF
21025 #line 21026 "configure"
21026 #include "confdefs.h"
21027
21028 #ifdef HAVE_SASL_SASL_H
21029 #include <sasl/sasl.h>
21030 #else
21031 #include <sasl.h>
21032 #endif
21033
21034 /* Require 2.1.15+ */
21035 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21036         char *__sasl_compat = "2.2+ or better okay (we guess)";
21037 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21038         && SASL_VERSION_STEP >=15
21039         char *__sasl_compat = "2.1.15+ or better okay";
21040 #endif
21041         
21042 EOF
21043 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21044   egrep "__sasl_compat" >/dev/null 2>&1; then
21045   rm -rf conftest*
21046   ol_cv_sasl_compat=yes
21047 else
21048   rm -rf conftest*
21049   ol_cv_sasl_compat=no
21050 fi
21051 rm -f conftest*
21052
21053 fi
21054
21055 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21056
21057                 if test $ol_cv_sasl_compat = no ; then
21058                         ol_link_sasl=no
21059                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21060                 fi
21061
21062                 cat >> confdefs.h <<\EOF
21063 #define HAVE_CYRUS_SASL 1
21064 EOF
21065
21066                 SASL_LIBS="$ol_link_sasl"
21067                 if test $ol_enable_spasswd != no ; then
21068                         ol_link_spasswd=yes
21069                 fi
21070
21071                 ac_save_LIBS="$LIBS"
21072                 LIBS="$LIBS $ol_link_sasl"
21073                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21074 echo "configure:21075: checking for sasl_version" >&5
21075 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21076   echo $ac_n "(cached) $ac_c" 1>&6
21077 else
21078   cat > conftest.$ac_ext <<EOF
21079 #line 21080 "configure"
21080 #include "confdefs.h"
21081 /* System header to define __stub macros and hopefully few prototypes,
21082     which can conflict with char sasl_version(); below.  */
21083 #include <assert.h>
21084 /* Override any gcc2 internal prototype to avoid an error.  */
21085 /* We use char because int might match the return type of a gcc2
21086     builtin and then its argument prototype would still apply.  */
21087 char sasl_version();
21088 char (*f)();
21089
21090 int main() {
21091
21092 /* The GNU C library defines this for functions which it implements
21093     to always fail with ENOSYS.  Some functions are actually named
21094     something starting with __ and the normal name is an alias.  */
21095 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21096 choke me
21097 #else
21098 f = sasl_version;
21099 #endif
21100
21101 ; return 0; }
21102 EOF
21103 if { (eval echo configure:21104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21104   rm -rf conftest*
21105   eval "ac_cv_func_sasl_version=yes"
21106 else
21107   echo "configure: failed program was:" >&5
21108   cat conftest.$ac_ext >&5
21109   rm -rf conftest*
21110   eval "ac_cv_func_sasl_version=no"
21111 fi
21112 rm -f conftest*
21113 fi
21114
21115 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21116   echo "$ac_t""yes" 1>&6
21117   cat >> confdefs.h <<\EOF
21118 #define HAVE_SASL_VERSION 1
21119 EOF
21120
21121 else
21122   echo "$ac_t""no" 1>&6
21123 fi
21124
21125                 LIBS="$ac_save_LIBS"
21126         fi
21127
21128 else
21129         echo "configure: warning: SASL authentication not supported!" 1>&2
21130         if test $ol_link_tls = no ; then
21131                 echo "configure: warning: Strong authentication not supported!" 1>&2
21132         fi
21133 fi
21134
21135 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21136         dev=no
21137         if test -r /dev/urandom ; then
21138                 dev="/dev/urandom";
21139         elif test -r /idev/urandom ; then
21140                 dev="/idev/urandom";
21141         elif test -r /dev/srandom ; then
21142                 dev="/dev/srandom";
21143         elif test -r /dev/random ; then
21144                 dev="/dev/random";
21145         elif test -r /idev/random ; then
21146                 dev="/idev/random";
21147         fi
21148
21149         if test $dev != no ; then
21150                 cat >> confdefs.h <<EOF
21151 #define URANDOM_DEVICE "$dev"
21152 EOF
21153
21154         fi
21155 fi
21156
21157 ol_link_fetch=no
21158 if test $ol_with_fetch != no ; then
21159         ol_LIBS=$LIBS
21160 LIBS="-lfetch -lcom_err $LIBS"
21161 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21162 echo "configure:21163: checking fetch(3) library" >&5
21163 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21164   echo $ac_n "(cached) $ac_c" 1>&6
21165 else
21166   
21167         cat > conftest.$ac_ext <<EOF
21168 #line 21169 "configure"
21169 #include "confdefs.h"
21170
21171 #include <sys/param.h>
21172 #include <stdio.h>
21173 #include <fetch.h>
21174 int main() {
21175 struct url *u = fetchParseURL("file:///"); 
21176 ; return 0; }
21177 EOF
21178 if { (eval echo configure:21179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21179   rm -rf conftest*
21180   ol_cv_lib_fetch=yes
21181 else
21182   echo "configure: failed program was:" >&5
21183   cat conftest.$ac_ext >&5
21184   rm -rf conftest*
21185   ol_cv_lib_fetch=no
21186 fi
21187 rm -f conftest*
21188 fi
21189
21190 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21191 LIBS=$ol_LIBS
21192 if test $ol_cv_lib_fetch != no ; then
21193         ol_link_fetch="-lfetch -lcom_err"
21194         cat >> confdefs.h <<\EOF
21195 #define HAVE_FETCH 1
21196 EOF
21197
21198 fi
21199
21200
21201         if test $ol_cv_lib_fetch != no ; then
21202                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21203                 ol_link_fetch=freebsd
21204
21205         elif test $ol_with_fetch != auto ; then
21206                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21207         fi 
21208 fi
21209
21210 if test $ol_enable_crypt != no ; then
21211         save_LIBS="$LIBS"
21212         LIBS="$TLS_LIBS $LIBS"
21213
21214         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21215 echo "configure:21216: checking for crypt" >&5
21216 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21217   echo $ac_n "(cached) $ac_c" 1>&6
21218 else
21219   cat > conftest.$ac_ext <<EOF
21220 #line 21221 "configure"
21221 #include "confdefs.h"
21222 /* System header to define __stub macros and hopefully few prototypes,
21223     which can conflict with char crypt(); below.  */
21224 #include <assert.h>
21225 /* Override any gcc2 internal prototype to avoid an error.  */
21226 /* We use char because int might match the return type of a gcc2
21227     builtin and then its argument prototype would still apply.  */
21228 char crypt();
21229 char (*f)();
21230
21231 int main() {
21232
21233 /* The GNU C library defines this for functions which it implements
21234     to always fail with ENOSYS.  Some functions are actually named
21235     something starting with __ and the normal name is an alias.  */
21236 #if defined (__stub_crypt) || defined (__stub___crypt)
21237 choke me
21238 #else
21239 f = crypt;
21240 #endif
21241
21242 ; return 0; }
21243 EOF
21244 if { (eval echo configure:21245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21245   rm -rf conftest*
21246   eval "ac_cv_func_crypt=yes"
21247 else
21248   echo "configure: failed program was:" >&5
21249   cat conftest.$ac_ext >&5
21250   rm -rf conftest*
21251   eval "ac_cv_func_crypt=no"
21252 fi
21253 rm -f conftest*
21254 fi
21255
21256 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21257   echo "$ac_t""yes" 1>&6
21258   have_crypt=yes
21259 else
21260   echo "$ac_t""no" 1>&6
21261
21262                 LIBS="$save_LIBS"
21263                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21264 echo "configure:21265: checking for crypt in -lcrypt" >&5
21265 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21267   echo $ac_n "(cached) $ac_c" 1>&6
21268 else
21269   ac_save_LIBS="$LIBS"
21270 LIBS="-lcrypt  $LIBS"
21271 cat > conftest.$ac_ext <<EOF
21272 #line 21273 "configure"
21273 #include "confdefs.h"
21274 /* Override any gcc2 internal prototype to avoid an error.  */
21275 /* We use char because int might match the return type of a gcc2
21276     builtin and then its argument prototype would still apply.  */
21277 char crypt();
21278
21279 int main() {
21280 crypt()
21281 ; return 0; }
21282 EOF
21283 if { (eval echo configure:21284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21284   rm -rf conftest*
21285   eval "ac_cv_lib_$ac_lib_var=yes"
21286 else
21287   echo "configure: failed program was:" >&5
21288   cat conftest.$ac_ext >&5
21289   rm -rf conftest*
21290   eval "ac_cv_lib_$ac_lib_var=no"
21291 fi
21292 rm -f conftest*
21293 LIBS="$ac_save_LIBS"
21294
21295 fi
21296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21297   echo "$ac_t""yes" 1>&6
21298   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21299                         have_crypt=yes
21300 else
21301   echo "$ac_t""no" 1>&6
21302 have_crypt=no
21303 fi
21304
21305 fi
21306
21307
21308         LIBS="$save_LIBS"
21309
21310         if test $have_crypt = yes ; then
21311                 cat >> confdefs.h <<\EOF
21312 #define HAVE_CRYPT 1
21313 EOF
21314
21315         else
21316                 echo "configure: warning: could not find crypt" 1>&2
21317                 if test $ol_enable_crypt = yes ; then
21318                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21319                 fi
21320
21321                 echo "configure: warning: disabling crypt support" 1>&2
21322                 ol_enable_crypt=no
21323         fi
21324 fi
21325
21326 if test $ol_enable_proctitle != no ; then
21327         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21328 echo "configure:21329: checking for setproctitle" >&5
21329 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21330   echo $ac_n "(cached) $ac_c" 1>&6
21331 else
21332   cat > conftest.$ac_ext <<EOF
21333 #line 21334 "configure"
21334 #include "confdefs.h"
21335 /* System header to define __stub macros and hopefully few prototypes,
21336     which can conflict with char setproctitle(); below.  */
21337 #include <assert.h>
21338 /* Override any gcc2 internal prototype to avoid an error.  */
21339 /* We use char because int might match the return type of a gcc2
21340     builtin and then its argument prototype would still apply.  */
21341 char setproctitle();
21342 char (*f)();
21343
21344 int main() {
21345
21346 /* The GNU C library defines this for functions which it implements
21347     to always fail with ENOSYS.  Some functions are actually named
21348     something starting with __ and the normal name is an alias.  */
21349 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21350 choke me
21351 #else
21352 f = setproctitle;
21353 #endif
21354
21355 ; return 0; }
21356 EOF
21357 if { (eval echo configure:21358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21358   rm -rf conftest*
21359   eval "ac_cv_func_setproctitle=yes"
21360 else
21361   echo "configure: failed program was:" >&5
21362   cat conftest.$ac_ext >&5
21363   rm -rf conftest*
21364   eval "ac_cv_func_setproctitle=no"
21365 fi
21366 rm -f conftest*
21367 fi
21368
21369 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21370   echo "$ac_t""yes" 1>&6
21371   have_setproctitle=yes
21372 else
21373   echo "$ac_t""no" 1>&6
21374
21375                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21376 echo "configure:21377: checking for setproctitle in -lutil" >&5
21377 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21378 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21379   echo $ac_n "(cached) $ac_c" 1>&6
21380 else
21381   ac_save_LIBS="$LIBS"
21382 LIBS="-lutil  $LIBS"
21383 cat > conftest.$ac_ext <<EOF
21384 #line 21385 "configure"
21385 #include "confdefs.h"
21386 /* Override any gcc2 internal prototype to avoid an error.  */
21387 /* We use char because int might match the return type of a gcc2
21388     builtin and then its argument prototype would still apply.  */
21389 char setproctitle();
21390
21391 int main() {
21392 setproctitle()
21393 ; return 0; }
21394 EOF
21395 if { (eval echo configure:21396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21396   rm -rf conftest*
21397   eval "ac_cv_lib_$ac_lib_var=yes"
21398 else
21399   echo "configure: failed program was:" >&5
21400   cat conftest.$ac_ext >&5
21401   rm -rf conftest*
21402   eval "ac_cv_lib_$ac_lib_var=no"
21403 fi
21404 rm -f conftest*
21405 LIBS="$ac_save_LIBS"
21406
21407 fi
21408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21409   echo "$ac_t""yes" 1>&6
21410   have_setproctitle=yes
21411                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21412 else
21413   echo "$ac_t""no" 1>&6
21414 have_setproctitle=no
21415                         LIBOBJS="$LIBOBJS setproctitle.o"
21416                         LIBSRCS="$LIBSRCS setproctitle.c"
21417 fi
21418
21419 fi
21420
21421
21422         if test $have_setproctitle = yes ; then
21423                 cat >> confdefs.h <<\EOF
21424 #define HAVE_SETPROCTITLE 1
21425 EOF
21426
21427         fi
21428 fi
21429
21430 if test $ol_enable_slp != no ; then
21431         for ac_hdr in slp.h 
21432 do
21433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21435 echo "configure:21436: checking for $ac_hdr" >&5
21436 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21437   echo $ac_n "(cached) $ac_c" 1>&6
21438 else
21439   cat > conftest.$ac_ext <<EOF
21440 #line 21441 "configure"
21441 #include "confdefs.h"
21442 #include <$ac_hdr>
21443 EOF
21444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21445 { (eval echo configure:21446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21447 if test -z "$ac_err"; then
21448   rm -rf conftest*
21449   eval "ac_cv_header_$ac_safe=yes"
21450 else
21451   echo "$ac_err" >&5
21452   echo "configure: failed program was:" >&5
21453   cat conftest.$ac_ext >&5
21454   rm -rf conftest*
21455   eval "ac_cv_header_$ac_safe=no"
21456 fi
21457 rm -f conftest*
21458 fi
21459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21460   echo "$ac_t""yes" 1>&6
21461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21462   cat >> confdefs.h <<EOF
21463 #define $ac_tr_hdr 1
21464 EOF
21465  
21466 else
21467   echo "$ac_t""no" 1>&6
21468 fi
21469 done
21470
21471
21472         if test $ac_cv_header_slp_h = yes ; then
21473                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21474 echo "configure:21475: checking for SLPOpen in -lslp" >&5
21475 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21477   echo $ac_n "(cached) $ac_c" 1>&6
21478 else
21479   ac_save_LIBS="$LIBS"
21480 LIBS="-lslp  $LIBS"
21481 cat > conftest.$ac_ext <<EOF
21482 #line 21483 "configure"
21483 #include "confdefs.h"
21484 /* Override any gcc2 internal prototype to avoid an error.  */
21485 /* We use char because int might match the return type of a gcc2
21486     builtin and then its argument prototype would still apply.  */
21487 char SLPOpen();
21488
21489 int main() {
21490 SLPOpen()
21491 ; return 0; }
21492 EOF
21493 if { (eval echo configure:21494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21494   rm -rf conftest*
21495   eval "ac_cv_lib_$ac_lib_var=yes"
21496 else
21497   echo "configure: failed program was:" >&5
21498   cat conftest.$ac_ext >&5
21499   rm -rf conftest*
21500   eval "ac_cv_lib_$ac_lib_var=no"
21501 fi
21502 rm -f conftest*
21503 LIBS="$ac_save_LIBS"
21504
21505 fi
21506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21507   echo "$ac_t""yes" 1>&6
21508   have_slp=yes
21509 else
21510   echo "$ac_t""no" 1>&6
21511 have_slp=no
21512 fi
21513
21514                 if test $have_slp = yes ; then
21515                         cat >> confdefs.h <<\EOF
21516 #define HAVE_SLP 1
21517 EOF
21518
21519                         SLAPD_SLP_LIBS=-lslp
21520                 fi
21521
21522         elif test $ol_enable_slp = yes ; then
21523                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21524         fi
21525 fi
21526
21527
21528 echo $ac_n "checking long long""... $ac_c" 1>&6
21529 echo "configure:21530: checking long long" >&5
21530 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21531   echo $ac_n "(cached) $ac_c" 1>&6
21532 else
21533   
21534         cat > conftest.$ac_ext <<EOF
21535 #line 21536 "configure"
21536 #include "confdefs.h"
21537
21538 int main() {
21539 long long x;
21540 ; return 0; }
21541 EOF
21542 if { (eval echo configure:21543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21543   rm -rf conftest*
21544   ol_cv_type_long_long=yes
21545 else
21546   echo "configure: failed program was:" >&5
21547   cat conftest.$ac_ext >&5
21548   rm -rf conftest*
21549   ol_cv_type_long_long=no
21550 fi
21551 rm -f conftest*
21552 fi
21553
21554 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21555 if test $ol_cv_type_long_long = yes; then
21556         cat >> confdefs.h <<\EOF
21557 #define HAVE_LONG_LONG 1
21558 EOF
21559
21560 fi
21561
21562 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21563 echo "configure:21564: checking for ANSI C header files" >&5
21564 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21565   echo $ac_n "(cached) $ac_c" 1>&6
21566 else
21567   cat > conftest.$ac_ext <<EOF
21568 #line 21569 "configure"
21569 #include "confdefs.h"
21570 #include <stdlib.h>
21571 #include <stdarg.h>
21572 #include <string.h>
21573 #include <float.h>
21574 EOF
21575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21576 { (eval echo configure:21577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21578 if test -z "$ac_err"; then
21579   rm -rf conftest*
21580   ac_cv_header_stdc=yes
21581 else
21582   echo "$ac_err" >&5
21583   echo "configure: failed program was:" >&5
21584   cat conftest.$ac_ext >&5
21585   rm -rf conftest*
21586   ac_cv_header_stdc=no
21587 fi
21588 rm -f conftest*
21589
21590 if test $ac_cv_header_stdc = yes; then
21591   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21592 cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 #include <string.h>
21596 EOF
21597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21598   egrep "memchr" >/dev/null 2>&1; then
21599   :
21600 else
21601   rm -rf conftest*
21602   ac_cv_header_stdc=no
21603 fi
21604 rm -f conftest*
21605
21606 fi
21607
21608 if test $ac_cv_header_stdc = yes; then
21609   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21610 cat > conftest.$ac_ext <<EOF
21611 #line 21612 "configure"
21612 #include "confdefs.h"
21613 #include <stdlib.h>
21614 EOF
21615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21616   egrep "free" >/dev/null 2>&1; then
21617   :
21618 else
21619   rm -rf conftest*
21620   ac_cv_header_stdc=no
21621 fi
21622 rm -f conftest*
21623
21624 fi
21625
21626 if test $ac_cv_header_stdc = yes; then
21627   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21628 if test "$cross_compiling" = yes; then
21629   :
21630 else
21631   cat > conftest.$ac_ext <<EOF
21632 #line 21633 "configure"
21633 #include "confdefs.h"
21634 #include <ctype.h>
21635 #if ((' ' & 0x0FF) == 0x020)
21636 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21637 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21638 #else
21639 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21640  || ('j' <= (c) && (c) <= 'r') \
21641  || ('s' <= (c) && (c) <= 'z'))
21642 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21643 #endif
21644 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21645 int main () { int i; for (i = 0; i < 256; i++)
21646 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21647 exit (0); }
21648
21649 EOF
21650 if { (eval echo configure:21651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21651 then
21652   :
21653 else
21654   echo "configure: failed program was:" >&5
21655   cat conftest.$ac_ext >&5
21656   rm -fr conftest*
21657   ac_cv_header_stdc=no
21658 fi
21659 rm -fr conftest*
21660 fi
21661
21662 fi
21663 fi
21664
21665 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21666 if test $ac_cv_header_stdc = yes; then
21667   cat >> confdefs.h <<\EOF
21668 #define STDC_HEADERS 1
21669 EOF
21670
21671 fi
21672
21673 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21674 echo "configure:21675: checking for mode_t" >&5
21675 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21676   echo $ac_n "(cached) $ac_c" 1>&6
21677 else
21678   cat > conftest.$ac_ext <<EOF
21679 #line 21680 "configure"
21680 #include "confdefs.h"
21681 #include <sys/types.h>
21682 #if STDC_HEADERS
21683 #include <stdlib.h>
21684 #include <stddef.h>
21685 #endif
21686
21687 EOF
21688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21689   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21690   rm -rf conftest*
21691   eval "ac_cv_type_mode_t=yes"
21692 else
21693   rm -rf conftest*
21694   eval "ac_cv_type_mode_t=no"
21695 fi
21696 rm -f conftest*
21697
21698 fi
21699 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21700   echo "$ac_t""yes" 1>&6
21701 else
21702   echo "$ac_t""no" 1>&6
21703   cat >> confdefs.h <<EOF
21704 #define mode_t int
21705 EOF
21706
21707 fi
21708
21709 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21710 echo "configure:21711: checking for off_t" >&5
21711 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21712   echo $ac_n "(cached) $ac_c" 1>&6
21713 else
21714   cat > conftest.$ac_ext <<EOF
21715 #line 21716 "configure"
21716 #include "confdefs.h"
21717 #include <sys/types.h>
21718 #if STDC_HEADERS
21719 #include <stdlib.h>
21720 #include <stddef.h>
21721 #endif
21722
21723 EOF
21724 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21725   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21726   rm -rf conftest*
21727   eval "ac_cv_type_off_t=yes"
21728 else
21729   rm -rf conftest*
21730   eval "ac_cv_type_off_t=no"
21731 fi
21732 rm -f conftest*
21733
21734 fi
21735 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21736   echo "$ac_t""yes" 1>&6
21737 else
21738   echo "$ac_t""no" 1>&6
21739   cat >> confdefs.h <<EOF
21740 #define off_t long
21741 EOF
21742
21743 fi
21744
21745 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21746 echo "configure:21747: checking for pid_t" >&5
21747 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21748   echo $ac_n "(cached) $ac_c" 1>&6
21749 else
21750   cat > conftest.$ac_ext <<EOF
21751 #line 21752 "configure"
21752 #include "confdefs.h"
21753 #include <sys/types.h>
21754 #if STDC_HEADERS
21755 #include <stdlib.h>
21756 #include <stddef.h>
21757 #endif
21758
21759 EOF
21760 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21761   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21762   rm -rf conftest*
21763   eval "ac_cv_type_pid_t=yes"
21764 else
21765   rm -rf conftest*
21766   eval "ac_cv_type_pid_t=no"
21767 fi
21768 rm -f conftest*
21769
21770 fi
21771 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21772   echo "$ac_t""yes" 1>&6
21773 else
21774   echo "$ac_t""no" 1>&6
21775   cat >> confdefs.h <<EOF
21776 #define pid_t int
21777 EOF
21778
21779 fi
21780
21781 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21782 echo "configure:21783: checking for ptrdiff_t" >&5
21783 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21784   echo $ac_n "(cached) $ac_c" 1>&6
21785 else
21786   cat > conftest.$ac_ext <<EOF
21787 #line 21788 "configure"
21788 #include "confdefs.h"
21789 #include <stddef.h>
21790 int main() {
21791 ptrdiff_t p
21792 ; return 0; }
21793 EOF
21794 if { (eval echo configure:21795: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21795   rm -rf conftest*
21796   am_cv_type_ptrdiff_t=yes
21797 else
21798   echo "configure: failed program was:" >&5
21799   cat conftest.$ac_ext >&5
21800   rm -rf conftest*
21801   am_cv_type_ptrdiff_t=no
21802 fi
21803 rm -f conftest*
21804 fi
21805
21806 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21807    if test $am_cv_type_ptrdiff_t = yes; then
21808      cat >> confdefs.h <<\EOF
21809 #define HAVE_PTRDIFF_T 1
21810 EOF
21811
21812    fi
21813
21814 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21815 echo "configure:21816: checking return type of signal handlers" >&5
21816 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21817   echo $ac_n "(cached) $ac_c" 1>&6
21818 else
21819   cat > conftest.$ac_ext <<EOF
21820 #line 21821 "configure"
21821 #include "confdefs.h"
21822 #include <sys/types.h>
21823 #include <signal.h>
21824 #ifdef signal
21825 #undef signal
21826 #endif
21827 #ifdef __cplusplus
21828 extern "C" void (*signal (int, void (*)(int)))(int);
21829 #else
21830 void (*signal ()) ();
21831 #endif
21832
21833 int main() {
21834 int i;
21835 ; return 0; }
21836 EOF
21837 if { (eval echo configure:21838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21838   rm -rf conftest*
21839   ac_cv_type_signal=void
21840 else
21841   echo "configure: failed program was:" >&5
21842   cat conftest.$ac_ext >&5
21843   rm -rf conftest*
21844   ac_cv_type_signal=int
21845 fi
21846 rm -f conftest*
21847 fi
21848
21849 echo "$ac_t""$ac_cv_type_signal" 1>&6
21850 cat >> confdefs.h <<EOF
21851 #define RETSIGTYPE $ac_cv_type_signal
21852 EOF
21853
21854
21855 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21856 echo "configure:21857: checking for size_t" >&5
21857 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21858   echo $ac_n "(cached) $ac_c" 1>&6
21859 else
21860   cat > conftest.$ac_ext <<EOF
21861 #line 21862 "configure"
21862 #include "confdefs.h"
21863 #include <sys/types.h>
21864 #if STDC_HEADERS
21865 #include <stdlib.h>
21866 #include <stddef.h>
21867 #endif
21868
21869 EOF
21870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21871   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21872   rm -rf conftest*
21873   eval "ac_cv_type_size_t=yes"
21874 else
21875   rm -rf conftest*
21876   eval "ac_cv_type_size_t=no"
21877 fi
21878 rm -f conftest*
21879
21880 fi
21881 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21882   echo "$ac_t""yes" 1>&6
21883 else
21884   echo "$ac_t""no" 1>&6
21885   cat >> confdefs.h <<EOF
21886 #define size_t unsigned
21887 EOF
21888
21889 fi
21890
21891
21892 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21893 echo "configure:21894: checking for ssize_t" >&5
21894 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21895   echo $ac_n "(cached) $ac_c" 1>&6
21896 else
21897   cat > conftest.$ac_ext <<EOF
21898 #line 21899 "configure"
21899 #include "confdefs.h"
21900 #include <sys/types.h>
21901 #if STDC_HEADERS
21902 #include <stdlib.h>
21903 #include <stddef.h>
21904 #endif
21905
21906 EOF
21907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21908   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21909   rm -rf conftest*
21910   eval "ac_cv_type_ssize_t=yes"
21911 else
21912   rm -rf conftest*
21913   eval "ac_cv_type_ssize_t=no"
21914 fi
21915 rm -f conftest*
21916
21917 fi
21918 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21919   echo "$ac_t""yes" 1>&6
21920 else
21921   echo "$ac_t""no" 1>&6
21922   cat >> confdefs.h <<EOF
21923 #define ssize_t signed int
21924 EOF
21925
21926 fi
21927
21928 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21929 echo "configure:21930: checking for caddr_t" >&5
21930 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21931   echo $ac_n "(cached) $ac_c" 1>&6
21932 else
21933   cat > conftest.$ac_ext <<EOF
21934 #line 21935 "configure"
21935 #include "confdefs.h"
21936 #include <sys/types.h>
21937 #if STDC_HEADERS
21938 #include <stdlib.h>
21939 #include <stddef.h>
21940 #endif
21941
21942 EOF
21943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21944   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21945   rm -rf conftest*
21946   eval "ac_cv_type_caddr_t=yes"
21947 else
21948   rm -rf conftest*
21949   eval "ac_cv_type_caddr_t=no"
21950 fi
21951 rm -f conftest*
21952
21953 fi
21954 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21955   echo "$ac_t""yes" 1>&6
21956 else
21957   echo "$ac_t""no" 1>&6
21958   cat >> confdefs.h <<EOF
21959 #define caddr_t char *
21960 EOF
21961
21962 fi
21963
21964
21965 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21966 echo "configure:21967: checking for socklen_t" >&5
21967 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21968   echo $ac_n "(cached) $ac_c" 1>&6
21969 else
21970   cat > conftest.$ac_ext <<EOF
21971 #line 21972 "configure"
21972 #include "confdefs.h"
21973
21974 #ifdef HAVE_SYS_TYPES_H
21975 #include <sys/types.h>
21976 #endif
21977 #ifdef HAVE_SYS_SOCKET_H
21978 #include <sys/socket.h>
21979 #endif
21980
21981 int main() {
21982 socklen_t len;
21983 ; return 0; }
21984 EOF
21985 if { (eval echo configure:21986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21986   rm -rf conftest*
21987   ol_cv_type_socklen_t=yes
21988 else
21989   echo "configure: failed program was:" >&5
21990   cat conftest.$ac_ext >&5
21991   rm -rf conftest*
21992   ol_cv_type_socklen_t=no
21993 fi
21994 rm -f conftest*
21995 fi
21996
21997 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21998   if test $ol_cv_type_socklen_t = no; then
21999     cat >> confdefs.h <<\EOF
22000 #define socklen_t int
22001 EOF
22002
22003   fi
22004  
22005 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22006 echo "configure:22007: checking for member st_blksize in aggregate type struct stat" >&5
22007 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22008   echo $ac_n "(cached) $ac_c" 1>&6
22009 else
22010   cat > conftest.$ac_ext <<EOF
22011 #line 22012 "configure"
22012 #include "confdefs.h"
22013 #include <sys/types.h>
22014 #include <sys/stat.h>
22015 int main() {
22016 struct stat foo; foo.st_blksize;
22017 ; return 0; }
22018 EOF
22019 if { (eval echo configure:22020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22020   rm -rf conftest*
22021   ac_cv_c_struct_member_st_blksize=yes
22022 else
22023   echo "configure: failed program was:" >&5
22024   cat conftest.$ac_ext >&5
22025   rm -rf conftest*
22026   ac_cv_c_struct_member_st_blksize=no
22027 fi
22028 rm -f conftest*
22029 fi
22030
22031 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22032 st_blksize="$ac_cv_c_struct_member_st_blksize"
22033 if test $ac_cv_c_struct_member_st_blksize = yes; then
22034   cat >> confdefs.h <<\EOF
22035 #define HAVE_ST_BLKSIZE 1
22036 EOF
22037
22038 fi
22039
22040 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22041 echo "configure:22042: checking whether time.h and sys/time.h may both be included" >&5
22042 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22043   echo $ac_n "(cached) $ac_c" 1>&6
22044 else
22045   cat > conftest.$ac_ext <<EOF
22046 #line 22047 "configure"
22047 #include "confdefs.h"
22048 #include <sys/types.h>
22049 #include <sys/time.h>
22050 #include <time.h>
22051 int main() {
22052 struct tm *tp;
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   ac_cv_header_time=yes
22058 else
22059   echo "configure: failed program was:" >&5
22060   cat conftest.$ac_ext >&5
22061   rm -rf conftest*
22062   ac_cv_header_time=no
22063 fi
22064 rm -f conftest*
22065 fi
22066
22067 echo "$ac_t""$ac_cv_header_time" 1>&6
22068 if test $ac_cv_header_time = yes; then
22069   cat >> confdefs.h <<\EOF
22070 #define TIME_WITH_SYS_TIME 1
22071 EOF
22072
22073 fi
22074
22075 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22076 echo "configure:22077: checking whether struct tm is in sys/time.h or time.h" >&5
22077 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22078   echo $ac_n "(cached) $ac_c" 1>&6
22079 else
22080   cat > conftest.$ac_ext <<EOF
22081 #line 22082 "configure"
22082 #include "confdefs.h"
22083 #include <sys/types.h>
22084 #include <time.h>
22085 int main() {
22086 struct tm *tp; tp->tm_sec;
22087 ; return 0; }
22088 EOF
22089 if { (eval echo configure:22090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22090   rm -rf conftest*
22091   ac_cv_struct_tm=time.h
22092 else
22093   echo "configure: failed program was:" >&5
22094   cat conftest.$ac_ext >&5
22095   rm -rf conftest*
22096   ac_cv_struct_tm=sys/time.h
22097 fi
22098 rm -f conftest*
22099 fi
22100
22101 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22102 if test $ac_cv_struct_tm = sys/time.h; then
22103   cat >> confdefs.h <<\EOF
22104 #define TM_IN_SYS_TIME 1
22105 EOF
22106
22107 fi
22108
22109 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22110 echo "configure:22111: checking for uid_t in sys/types.h" >&5
22111 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22112   echo $ac_n "(cached) $ac_c" 1>&6
22113 else
22114   cat > conftest.$ac_ext <<EOF
22115 #line 22116 "configure"
22116 #include "confdefs.h"
22117 #include <sys/types.h>
22118 EOF
22119 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22120   egrep "uid_t" >/dev/null 2>&1; then
22121   rm -rf conftest*
22122   ac_cv_type_uid_t=yes
22123 else
22124   rm -rf conftest*
22125   ac_cv_type_uid_t=no
22126 fi
22127 rm -f conftest*
22128
22129 fi
22130
22131 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22132 if test $ac_cv_type_uid_t = no; then
22133   cat >> confdefs.h <<\EOF
22134 #define uid_t int
22135 EOF
22136
22137   cat >> confdefs.h <<\EOF
22138 #define gid_t int
22139 EOF
22140
22141 fi
22142
22143 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22144 echo "configure:22145: checking for sig_atomic_t" >&5
22145 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22146   echo $ac_n "(cached) $ac_c" 1>&6
22147 else
22148   cat > conftest.$ac_ext <<EOF
22149 #line 22150 "configure"
22150 #include "confdefs.h"
22151 #include <signal.h>
22152 int main() {
22153 sig_atomic_t atomic;
22154 ; return 0; }
22155 EOF
22156 if { (eval echo configure:22157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22157   rm -rf conftest*
22158   ol_cv_type_sig_atomic_t=yes
22159 else
22160   echo "configure: failed program was:" >&5
22161   cat conftest.$ac_ext >&5
22162   rm -rf conftest*
22163   ol_cv_type_sig_atomic_t=no
22164 fi
22165 rm -f conftest*
22166 fi
22167
22168 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22169   if test $ol_cv_type_sig_atomic_t = no; then
22170     cat >> confdefs.h <<\EOF
22171 #define sig_atomic_t int
22172 EOF
22173
22174   fi
22175  
22176
22177
22178 # test for pw_gecos in struct passwd
22179 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22180 echo "configure:22181: checking struct passwd for pw_gecos" >&5
22181 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22182   echo $ac_n "(cached) $ac_c" 1>&6
22183 else
22184   
22185         cat > conftest.$ac_ext <<EOF
22186 #line 22187 "configure"
22187 #include "confdefs.h"
22188 #include <pwd.h>
22189 int main() {
22190
22191         struct passwd pwd;
22192         pwd.pw_gecos = pwd.pw_name;
22193
22194 ; return 0; }
22195 EOF
22196 if { (eval echo configure:22197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22197   rm -rf conftest*
22198   ol_cv_struct_passwd_pw_gecos=yes
22199 else
22200   echo "configure: failed program was:" >&5
22201   cat conftest.$ac_ext >&5
22202   rm -rf conftest*
22203   ol_cv_struct_passwd_pw_gecos=no
22204 fi
22205 rm -f conftest*
22206 fi
22207
22208 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22209 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22210         cat >> confdefs.h <<\EOF
22211 #define HAVE_PW_GECOS 1
22212 EOF
22213
22214 fi
22215
22216 # test for pw_passwd in struct passwd
22217 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22218 echo "configure:22219: checking struct passwd for pw_passwd" >&5
22219 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22220   echo $ac_n "(cached) $ac_c" 1>&6
22221 else
22222   
22223         cat > conftest.$ac_ext <<EOF
22224 #line 22225 "configure"
22225 #include "confdefs.h"
22226 #include <pwd.h>
22227 int main() {
22228
22229         struct passwd pwd;
22230         pwd.pw_passwd = pwd.pw_name;
22231
22232 ; return 0; }
22233 EOF
22234 if { (eval echo configure:22235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22235   rm -rf conftest*
22236   ol_cv_struct_passwd_pw_passwd=yes
22237 else
22238   echo "configure: failed program was:" >&5
22239   cat conftest.$ac_ext >&5
22240   rm -rf conftest*
22241   ol_cv_struct_passwd_pw_passwd=no
22242 fi
22243 rm -f conftest*
22244 fi
22245
22246 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22247 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22248         cat >> confdefs.h <<\EOF
22249 #define HAVE_PW_PASSWD 1
22250 EOF
22251
22252 fi
22253
22254
22255 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22256 echo "configure:22257: checking if toupper() requires islower()" >&5
22257 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22258   echo $ac_n "(cached) $ac_c" 1>&6
22259 else
22260   
22261         if test "$cross_compiling" = yes; then
22262   ol_cv_c_upper_lower=safe
22263 else
22264   cat > conftest.$ac_ext <<EOF
22265 #line 22266 "configure"
22266 #include "confdefs.h"
22267
22268 #include <ctype.h>
22269 main()
22270 {
22271         if ('C' == toupper('C'))
22272                 exit(0);
22273         else
22274                 exit(1);
22275 }
22276 EOF
22277 if { (eval echo configure:22278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22278 then
22279   ol_cv_c_upper_lower=no
22280 else
22281   echo "configure: failed program was:" >&5
22282   cat conftest.$ac_ext >&5
22283   rm -fr conftest*
22284   ol_cv_c_upper_lower=yes
22285 fi
22286 rm -fr conftest*
22287 fi
22288
22289 fi
22290
22291 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22292 if test $ol_cv_c_upper_lower != no ; then
22293         cat >> confdefs.h <<\EOF
22294 #define C_UPPER_LOWER 1
22295 EOF
22296
22297 fi
22298
22299 echo $ac_n "checking for working const""... $ac_c" 1>&6
22300 echo "configure:22301: checking for working const" >&5
22301 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22302   echo $ac_n "(cached) $ac_c" 1>&6
22303 else
22304   cat > conftest.$ac_ext <<EOF
22305 #line 22306 "configure"
22306 #include "confdefs.h"
22307
22308 int main() {
22309
22310 /* Ultrix mips cc rejects this.  */
22311 typedef int charset[2]; const charset x;
22312 /* SunOS 4.1.1 cc rejects this.  */
22313 char const *const *ccp;
22314 char **p;
22315 /* NEC SVR4.0.2 mips cc rejects this.  */
22316 struct point {int x, y;};
22317 static struct point const zero = {0,0};
22318 /* AIX XL C 1.02.0.0 rejects this.
22319    It does not let you subtract one const X* pointer from another in an arm
22320    of an if-expression whose if-part is not a constant expression */
22321 const char *g = "string";
22322 ccp = &g + (g ? g-g : 0);
22323 /* HPUX 7.0 cc rejects these. */
22324 ++ccp;
22325 p = (char**) ccp;
22326 ccp = (char const *const *) p;
22327 { /* SCO 3.2v4 cc rejects this.  */
22328   char *t;
22329   char const *s = 0 ? (char *) 0 : (char const *) 0;
22330
22331   *t++ = 0;
22332 }
22333 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22334   int x[] = {25, 17};
22335   const int *foo = &x[0];
22336   ++foo;
22337 }
22338 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22339   typedef const int *iptr;
22340   iptr p = 0;
22341   ++p;
22342 }
22343 { /* AIX XL C 1.02.0.0 rejects this saying
22344      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22345   struct s { int j; const int *ap[3]; };
22346   struct s *b; b->j = 5;
22347 }
22348 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22349   const int foo = 10;
22350 }
22351
22352 ; return 0; }
22353 EOF
22354 if { (eval echo configure:22355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22355   rm -rf conftest*
22356   ac_cv_c_const=yes
22357 else
22358   echo "configure: failed program was:" >&5
22359   cat conftest.$ac_ext >&5
22360   rm -rf conftest*
22361   ac_cv_c_const=no
22362 fi
22363 rm -f conftest*
22364 fi
22365
22366 echo "$ac_t""$ac_cv_c_const" 1>&6
22367 if test $ac_cv_c_const = no; then
22368   cat >> confdefs.h <<\EOF
22369 #define const 
22370 EOF
22371
22372 fi
22373
22374 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22375 echo "configure:22376: checking if compiler understands volatile" >&5
22376 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22377   echo $ac_n "(cached) $ac_c" 1>&6
22378 else
22379   cat > conftest.$ac_ext <<EOF
22380 #line 22381 "configure"
22381 #include "confdefs.h"
22382 int x, y, z;
22383 int main() {
22384 volatile int a; int * volatile b = x ? &y : &z;
22385       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22386       *b = 0;
22387 ; return 0; }
22388 EOF
22389 if { (eval echo configure:22390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22390   rm -rf conftest*
22391   ol_cv_c_volatile=yes
22392 else
22393   echo "configure: failed program was:" >&5
22394   cat conftest.$ac_ext >&5
22395   rm -rf conftest*
22396   ol_cv_c_volatile=no
22397 fi
22398 rm -f conftest*
22399 fi
22400
22401 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22402   if test $ol_cv_c_volatile = yes; then
22403     : 
22404   else
22405     cat >> confdefs.h <<\EOF
22406 #define volatile 
22407 EOF
22408
22409   fi
22410  
22411
22412 if test $cross_compiling = yes ; then
22413         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22414         cat >> confdefs.h <<\EOF
22415 #define CROSS_COMPILING 1
22416 EOF
22417
22418 else
22419         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22420 echo "configure:22421: checking whether byte ordering is bigendian" >&5
22421 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22422   echo $ac_n "(cached) $ac_c" 1>&6
22423 else
22424   ac_cv_c_bigendian=unknown
22425 # See if sys/param.h defines the BYTE_ORDER macro.
22426 cat > conftest.$ac_ext <<EOF
22427 #line 22428 "configure"
22428 #include "confdefs.h"
22429 #include <sys/types.h>
22430 #include <sys/param.h>
22431 int main() {
22432
22433 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22434  bogus endian macros
22435 #endif
22436 ; return 0; }
22437 EOF
22438 if { (eval echo configure:22439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22439   rm -rf conftest*
22440   # It does; now see whether it defined to BIG_ENDIAN or not.
22441 cat > conftest.$ac_ext <<EOF
22442 #line 22443 "configure"
22443 #include "confdefs.h"
22444 #include <sys/types.h>
22445 #include <sys/param.h>
22446 int main() {
22447
22448 #if BYTE_ORDER != BIG_ENDIAN
22449  not big endian
22450 #endif
22451 ; return 0; }
22452 EOF
22453 if { (eval echo configure:22454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22454   rm -rf conftest*
22455   ac_cv_c_bigendian=yes
22456 else
22457   echo "configure: failed program was:" >&5
22458   cat conftest.$ac_ext >&5
22459   rm -rf conftest*
22460   ac_cv_c_bigendian=no
22461 fi
22462 rm -f conftest*
22463 else
22464   echo "configure: failed program was:" >&5
22465   cat conftest.$ac_ext >&5
22466 fi
22467 rm -f conftest*
22468 if test $ac_cv_c_bigendian = unknown; then
22469 if test "$cross_compiling" = yes; then
22470     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22471 else
22472   cat > conftest.$ac_ext <<EOF
22473 #line 22474 "configure"
22474 #include "confdefs.h"
22475 main () {
22476   /* Are we little or big endian?  From Harbison&Steele.  */
22477   union
22478   {
22479     long l;
22480     char c[sizeof (long)];
22481   } u;
22482   u.l = 1;
22483   exit (u.c[sizeof (long) - 1] == 1);
22484 }
22485 EOF
22486 if { (eval echo configure:22487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22487 then
22488   ac_cv_c_bigendian=no
22489 else
22490   echo "configure: failed program was:" >&5
22491   cat conftest.$ac_ext >&5
22492   rm -fr conftest*
22493   ac_cv_c_bigendian=yes
22494 fi
22495 rm -fr conftest*
22496 fi
22497
22498 fi
22499 fi
22500
22501 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22502 if test $ac_cv_c_bigendian = yes; then
22503   cat >> confdefs.h <<\EOF
22504 #define WORDS_BIGENDIAN 1
22505 EOF
22506
22507 fi
22508
22509 fi
22510
22511 echo $ac_n "checking size of short""... $ac_c" 1>&6
22512 echo "configure:22513: checking size of short" >&5 
22513 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22514   echo $ac_n "(cached) $ac_c" 1>&6
22515 else
22516   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22517   cat > conftest.$ac_ext <<EOF
22518 #line 22519 "configure"
22519 #include "confdefs.h"
22520 #include "confdefs.h" 
22521 #include <sys/types.h> 
22522  
22523
22524 int main() {
22525 switch (0) case 0: case (sizeof (short) == $ac_size):;
22526 ; return 0; }
22527 EOF
22528 if { (eval echo configure:22529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22529   rm -rf conftest*
22530   ac_cv_sizeof_short=$ac_size
22531 else
22532   echo "configure: failed program was:" >&5
22533   cat conftest.$ac_ext >&5
22534 fi
22535 rm -f conftest* 
22536   if test x$ac_cv_sizeof_short != x ; then break; fi 
22537 done 
22538
22539 fi
22540  
22541 if test x$ac_cv_sizeof_short = x ; then 
22542   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22543 fi 
22544 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22545 cat >> confdefs.h <<EOF
22546 #define SIZEOF_SHORT $ac_cv_sizeof_short
22547 EOF
22548  
22549  
22550 echo $ac_n "checking size of int""... $ac_c" 1>&6
22551 echo "configure:22552: checking size of int" >&5 
22552 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22553   echo $ac_n "(cached) $ac_c" 1>&6
22554 else
22555   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22556   cat > conftest.$ac_ext <<EOF
22557 #line 22558 "configure"
22558 #include "confdefs.h"
22559 #include "confdefs.h" 
22560 #include <sys/types.h> 
22561  
22562
22563 int main() {
22564 switch (0) case 0: case (sizeof (int) == $ac_size):;
22565 ; return 0; }
22566 EOF
22567 if { (eval echo configure:22568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22568   rm -rf conftest*
22569   ac_cv_sizeof_int=$ac_size
22570 else
22571   echo "configure: failed program was:" >&5
22572   cat conftest.$ac_ext >&5
22573 fi
22574 rm -f conftest* 
22575   if test x$ac_cv_sizeof_int != x ; then break; fi 
22576 done 
22577
22578 fi
22579  
22580 if test x$ac_cv_sizeof_int = x ; then 
22581   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22582 fi 
22583 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22584 cat >> confdefs.h <<EOF
22585 #define SIZEOF_INT $ac_cv_sizeof_int
22586 EOF
22587  
22588  
22589 echo $ac_n "checking size of long""... $ac_c" 1>&6
22590 echo "configure:22591: checking size of long" >&5 
22591 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22592   echo $ac_n "(cached) $ac_c" 1>&6
22593 else
22594   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22595   cat > conftest.$ac_ext <<EOF
22596 #line 22597 "configure"
22597 #include "confdefs.h"
22598 #include "confdefs.h" 
22599 #include <sys/types.h> 
22600  
22601
22602 int main() {
22603 switch (0) case 0: case (sizeof (long) == $ac_size):;
22604 ; return 0; }
22605 EOF
22606 if { (eval echo configure:22607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22607   rm -rf conftest*
22608   ac_cv_sizeof_long=$ac_size
22609 else
22610   echo "configure: failed program was:" >&5
22611   cat conftest.$ac_ext >&5
22612 fi
22613 rm -f conftest* 
22614   if test x$ac_cv_sizeof_long != x ; then break; fi 
22615 done 
22616
22617 fi
22618  
22619 if test x$ac_cv_sizeof_long = x ; then 
22620   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22621 fi 
22622 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22623 cat >> confdefs.h <<EOF
22624 #define SIZEOF_LONG $ac_cv_sizeof_long
22625 EOF
22626  
22627
22628
22629 if test "$ac_cv_sizeof_int" -lt 4 ; then
22630         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22631
22632         cat >> confdefs.h <<\EOF
22633 #define LBER_INT_T long
22634 EOF
22635
22636 else
22637         cat >> confdefs.h <<\EOF
22638 #define LBER_INT_T int
22639 EOF
22640
22641 fi
22642
22643 cat >> confdefs.h <<\EOF
22644 #define LBER_LEN_T long
22645 EOF
22646
22647 cat >> confdefs.h <<\EOF
22648 #define LBER_SOCKET_T int
22649 EOF
22650
22651 cat >> confdefs.h <<\EOF
22652 #define LBER_TAG_T long
22653 EOF
22654
22655
22656 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22657 echo "configure:22658: checking for 8-bit clean memcmp" >&5
22658 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22659   echo $ac_n "(cached) $ac_c" 1>&6
22660 else
22661   if test "$cross_compiling" = yes; then
22662   ac_cv_func_memcmp_clean=no
22663 else
22664   cat > conftest.$ac_ext <<EOF
22665 #line 22666 "configure"
22666 #include "confdefs.h"
22667
22668 main()
22669 {
22670   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22671   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22672 }
22673
22674 EOF
22675 if { (eval echo configure:22676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22676 then
22677   ac_cv_func_memcmp_clean=yes
22678 else
22679   echo "configure: failed program was:" >&5
22680   cat conftest.$ac_ext >&5
22681   rm -fr conftest*
22682   ac_cv_func_memcmp_clean=no
22683 fi
22684 rm -fr conftest*
22685 fi
22686
22687 fi
22688
22689 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22690 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22691
22692 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22693 echo "configure:22694: checking for strftime" >&5
22694 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22695   echo $ac_n "(cached) $ac_c" 1>&6
22696 else
22697   cat > conftest.$ac_ext <<EOF
22698 #line 22699 "configure"
22699 #include "confdefs.h"
22700 /* System header to define __stub macros and hopefully few prototypes,
22701     which can conflict with char strftime(); below.  */
22702 #include <assert.h>
22703 /* Override any gcc2 internal prototype to avoid an error.  */
22704 /* We use char because int might match the return type of a gcc2
22705     builtin and then its argument prototype would still apply.  */
22706 char strftime();
22707 char (*f)();
22708
22709 int main() {
22710
22711 /* The GNU C library defines this for functions which it implements
22712     to always fail with ENOSYS.  Some functions are actually named
22713     something starting with __ and the normal name is an alias.  */
22714 #if defined (__stub_strftime) || defined (__stub___strftime)
22715 choke me
22716 #else
22717 f = strftime;
22718 #endif
22719
22720 ; return 0; }
22721 EOF
22722 if { (eval echo configure:22723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22723   rm -rf conftest*
22724   eval "ac_cv_func_strftime=yes"
22725 else
22726   echo "configure: failed program was:" >&5
22727   cat conftest.$ac_ext >&5
22728   rm -rf conftest*
22729   eval "ac_cv_func_strftime=no"
22730 fi
22731 rm -f conftest*
22732 fi
22733
22734 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22735   echo "$ac_t""yes" 1>&6
22736   cat >> confdefs.h <<\EOF
22737 #define HAVE_STRFTIME 1
22738 EOF
22739
22740 else
22741   echo "$ac_t""no" 1>&6
22742 # strftime is in -lintl on SCO UNIX.
22743 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22744 echo "configure:22745: checking for strftime in -lintl" >&5
22745 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22747   echo $ac_n "(cached) $ac_c" 1>&6
22748 else
22749   ac_save_LIBS="$LIBS"
22750 LIBS="-lintl  $LIBS"
22751 cat > conftest.$ac_ext <<EOF
22752 #line 22753 "configure"
22753 #include "confdefs.h"
22754 /* Override any gcc2 internal prototype to avoid an error.  */
22755 /* We use char because int might match the return type of a gcc2
22756     builtin and then its argument prototype would still apply.  */
22757 char strftime();
22758
22759 int main() {
22760 strftime()
22761 ; return 0; }
22762 EOF
22763 if { (eval echo configure:22764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22764   rm -rf conftest*
22765   eval "ac_cv_lib_$ac_lib_var=yes"
22766 else
22767   echo "configure: failed program was:" >&5
22768   cat conftest.$ac_ext >&5
22769   rm -rf conftest*
22770   eval "ac_cv_lib_$ac_lib_var=no"
22771 fi
22772 rm -f conftest*
22773 LIBS="$ac_save_LIBS"
22774
22775 fi
22776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22777   echo "$ac_t""yes" 1>&6
22778   cat >> confdefs.h <<\EOF
22779 #define HAVE_STRFTIME 1
22780 EOF
22781
22782 LIBS="-lintl $LIBS"
22783 else
22784   echo "$ac_t""no" 1>&6
22785 fi
22786
22787 fi
22788
22789
22790 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22791 echo "configure:22792: checking for inet_aton()" >&5
22792 if eval "test \"\${ol_cv_func_inet_aton+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
22799 #ifdef HAVE_SYS_TYPES_H
22800 #       include <sys/types.h>
22801 #endif
22802 #ifdef HAVE_SYS_SOCKET_H
22803 #       include <sys/socket.h>
22804 #       ifdef HAVE_SYS_SELECT_H
22805 #               include <sys/select.h>
22806 #       endif
22807 #       include <netinet/in.h>
22808 #       ifdef HAVE_ARPA_INET_H
22809 #               include <arpa/inet.h>
22810 #       endif
22811 #endif
22812
22813 int main() {
22814 struct in_addr in;
22815 int rc = inet_aton( "255.255.255.255", &in );
22816 ; return 0; }
22817 EOF
22818 if { (eval echo configure:22819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22819   rm -rf conftest*
22820   ol_cv_func_inet_aton=yes
22821 else
22822   echo "configure: failed program was:" >&5
22823   cat conftest.$ac_ext >&5
22824   rm -rf conftest*
22825   ol_cv_func_inet_aton=no
22826 fi
22827 rm -f conftest*
22828 fi
22829
22830 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22831   if test $ol_cv_func_inet_aton != no; then
22832     cat >> confdefs.h <<\EOF
22833 #define HAVE_INET_ATON 1
22834 EOF
22835
22836   fi
22837  
22838
22839 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22840 echo "configure:22841: checking for _spawnlp" >&5
22841 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22842   echo $ac_n "(cached) $ac_c" 1>&6
22843 else
22844   cat > conftest.$ac_ext <<EOF
22845 #line 22846 "configure"
22846 #include "confdefs.h"
22847 /* System header to define __stub macros and hopefully few prototypes,
22848     which can conflict with char _spawnlp(); below.  */
22849 #include <assert.h>
22850 /* Override any gcc2 internal prototype to avoid an error.  */
22851 /* We use char because int might match the return type of a gcc2
22852     builtin and then its argument prototype would still apply.  */
22853 char _spawnlp();
22854 char (*f)();
22855
22856 int main() {
22857
22858 /* The GNU C library defines this for functions which it implements
22859     to always fail with ENOSYS.  Some functions are actually named
22860     something starting with __ and the normal name is an alias.  */
22861 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22862 choke me
22863 #else
22864 f = _spawnlp;
22865 #endif
22866
22867 ; return 0; }
22868 EOF
22869 if { (eval echo configure:22870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22870   rm -rf conftest*
22871   eval "ac_cv_func__spawnlp=yes"
22872 else
22873   echo "configure: failed program was:" >&5
22874   cat conftest.$ac_ext >&5
22875   rm -rf conftest*
22876   eval "ac_cv_func__spawnlp=no"
22877 fi
22878 rm -f conftest*
22879 fi
22880
22881 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22882   echo "$ac_t""yes" 1>&6
22883   cat >> confdefs.h <<\EOF
22884 #define HAVE_SPAWNLP 1
22885 EOF
22886
22887 else
22888   echo "$ac_t""no" 1>&6
22889 fi
22890
22891
22892 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22893 echo "configure:22894: checking for _snprintf" >&5
22894 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22895   echo $ac_n "(cached) $ac_c" 1>&6
22896 else
22897   cat > conftest.$ac_ext <<EOF
22898 #line 22899 "configure"
22899 #include "confdefs.h"
22900 /* System header to define __stub macros and hopefully few prototypes,
22901     which can conflict with char _snprintf(); below.  */
22902 #include <assert.h>
22903 /* Override any gcc2 internal prototype to avoid an error.  */
22904 /* We use char because int might match the return type of a gcc2
22905     builtin and then its argument prototype would still apply.  */
22906 char _snprintf();
22907 char (*f)();
22908
22909 int main() {
22910
22911 /* The GNU C library defines this for functions which it implements
22912     to always fail with ENOSYS.  Some functions are actually named
22913     something starting with __ and the normal name is an alias.  */
22914 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22915 choke me
22916 #else
22917 f = _snprintf;
22918 #endif
22919
22920 ; return 0; }
22921 EOF
22922 if { (eval echo configure:22923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22923   rm -rf conftest*
22924   eval "ac_cv_func__snprintf=yes"
22925 else
22926   echo "configure: failed program was:" >&5
22927   cat conftest.$ac_ext >&5
22928   rm -rf conftest*
22929   eval "ac_cv_func__snprintf=no"
22930 fi
22931 rm -f conftest*
22932 fi
22933
22934 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22935   echo "$ac_t""yes" 1>&6
22936   ac_cv_func_snprintf=yes
22937         cat >> confdefs.h <<\EOF
22938 #define snprintf _snprintf
22939 EOF
22940
22941
22942 else
22943   echo "$ac_t""no" 1>&6
22944 fi
22945
22946
22947 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22948 echo "configure:22949: checking for _vsnprintf" >&5
22949 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22950   echo $ac_n "(cached) $ac_c" 1>&6
22951 else
22952   cat > conftest.$ac_ext <<EOF
22953 #line 22954 "configure"
22954 #include "confdefs.h"
22955 /* System header to define __stub macros and hopefully few prototypes,
22956     which can conflict with char _vsnprintf(); below.  */
22957 #include <assert.h>
22958 /* Override any gcc2 internal prototype to avoid an error.  */
22959 /* We use char because int might match the return type of a gcc2
22960     builtin and then its argument prototype would still apply.  */
22961 char _vsnprintf();
22962 char (*f)();
22963
22964 int main() {
22965
22966 /* The GNU C library defines this for functions which it implements
22967     to always fail with ENOSYS.  Some functions are actually named
22968     something starting with __ and the normal name is an alias.  */
22969 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22970 choke me
22971 #else
22972 f = _vsnprintf;
22973 #endif
22974
22975 ; return 0; }
22976 EOF
22977 if { (eval echo configure:22978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22978   rm -rf conftest*
22979   eval "ac_cv_func__vsnprintf=yes"
22980 else
22981   echo "configure: failed program was:" >&5
22982   cat conftest.$ac_ext >&5
22983   rm -rf conftest*
22984   eval "ac_cv_func__vsnprintf=no"
22985 fi
22986 rm -f conftest*
22987 fi
22988
22989 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22990   echo "$ac_t""yes" 1>&6
22991   ac_cv_func_vsnprintf=yes
22992         cat >> confdefs.h <<\EOF
22993 #define vsnprintf _vsnprintf
22994 EOF
22995
22996
22997 else
22998   echo "$ac_t""no" 1>&6
22999 fi
23000
23001
23002 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23003 echo "configure:23004: checking for vprintf" >&5
23004 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23005   echo $ac_n "(cached) $ac_c" 1>&6
23006 else
23007   cat > conftest.$ac_ext <<EOF
23008 #line 23009 "configure"
23009 #include "confdefs.h"
23010 /* System header to define __stub macros and hopefully few prototypes,
23011     which can conflict with char vprintf(); below.  */
23012 #include <assert.h>
23013 /* Override any gcc2 internal prototype to avoid an error.  */
23014 /* We use char because int might match the return type of a gcc2
23015     builtin and then its argument prototype would still apply.  */
23016 char vprintf();
23017 char (*f)();
23018
23019 int main() {
23020
23021 /* The GNU C library defines this for functions which it implements
23022     to always fail with ENOSYS.  Some functions are actually named
23023     something starting with __ and the normal name is an alias.  */
23024 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23025 choke me
23026 #else
23027 f = vprintf;
23028 #endif
23029
23030 ; return 0; }
23031 EOF
23032 if { (eval echo configure:23033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23033   rm -rf conftest*
23034   eval "ac_cv_func_vprintf=yes"
23035 else
23036   echo "configure: failed program was:" >&5
23037   cat conftest.$ac_ext >&5
23038   rm -rf conftest*
23039   eval "ac_cv_func_vprintf=no"
23040 fi
23041 rm -f conftest*
23042 fi
23043
23044 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23045   echo "$ac_t""yes" 1>&6
23046   cat >> confdefs.h <<\EOF
23047 #define HAVE_VPRINTF 1
23048 EOF
23049
23050 else
23051   echo "$ac_t""no" 1>&6
23052 fi
23053
23054 if test "$ac_cv_func_vprintf" != yes; then
23055 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23056 echo "configure:23057: checking for _doprnt" >&5
23057 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23058   echo $ac_n "(cached) $ac_c" 1>&6
23059 else
23060   cat > conftest.$ac_ext <<EOF
23061 #line 23062 "configure"
23062 #include "confdefs.h"
23063 /* System header to define __stub macros and hopefully few prototypes,
23064     which can conflict with char _doprnt(); below.  */
23065 #include <assert.h>
23066 /* Override any gcc2 internal prototype to avoid an error.  */
23067 /* We use char because int might match the return type of a gcc2
23068     builtin and then its argument prototype would still apply.  */
23069 char _doprnt();
23070 char (*f)();
23071
23072 int main() {
23073
23074 /* The GNU C library defines this for functions which it implements
23075     to always fail with ENOSYS.  Some functions are actually named
23076     something starting with __ and the normal name is an alias.  */
23077 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23078 choke me
23079 #else
23080 f = _doprnt;
23081 #endif
23082
23083 ; return 0; }
23084 EOF
23085 if { (eval echo configure:23086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23086   rm -rf conftest*
23087   eval "ac_cv_func__doprnt=yes"
23088 else
23089   echo "configure: failed program was:" >&5
23090   cat conftest.$ac_ext >&5
23091   rm -rf conftest*
23092   eval "ac_cv_func__doprnt=no"
23093 fi
23094 rm -f conftest*
23095 fi
23096
23097 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23098   echo "$ac_t""yes" 1>&6
23099   cat >> confdefs.h <<\EOF
23100 #define HAVE_DOPRNT 1
23101 EOF
23102
23103 else
23104   echo "$ac_t""no" 1>&6
23105 fi
23106
23107 fi
23108
23109
23110 if test $ac_cv_func_vprintf = yes ; then
23111                 for ac_func in snprintf vsnprintf
23112 do
23113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23114 echo "configure:23115: checking for $ac_func" >&5
23115 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23116   echo $ac_n "(cached) $ac_c" 1>&6
23117 else
23118   cat > conftest.$ac_ext <<EOF
23119 #line 23120 "configure"
23120 #include "confdefs.h"
23121 /* System header to define __stub macros and hopefully few prototypes,
23122     which can conflict with char $ac_func(); below.  */
23123 #include <assert.h>
23124 /* Override any gcc2 internal prototype to avoid an error.  */
23125 /* We use char because int might match the return type of a gcc2
23126     builtin and then its argument prototype would still apply.  */
23127 char $ac_func();
23128 char (*f)();
23129
23130 int main() {
23131
23132 /* The GNU C library defines this for functions which it implements
23133     to always fail with ENOSYS.  Some functions are actually named
23134     something starting with __ and the normal name is an alias.  */
23135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23136 choke me
23137 #else
23138 f = $ac_func;
23139 #endif
23140
23141 ; return 0; }
23142 EOF
23143 if { (eval echo configure:23144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23144   rm -rf conftest*
23145   eval "ac_cv_func_$ac_func=yes"
23146 else
23147   echo "configure: failed program was:" >&5
23148   cat conftest.$ac_ext >&5
23149   rm -rf conftest*
23150   eval "ac_cv_func_$ac_func=no"
23151 fi
23152 rm -f conftest*
23153 fi
23154
23155 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23156   echo "$ac_t""yes" 1>&6
23157     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23158   cat >> confdefs.h <<EOF
23159 #define $ac_tr_func 1
23160 EOF
23161  
23162 else
23163   echo "$ac_t""no" 1>&6
23164 fi
23165 done
23166
23167 fi
23168
23169 for ac_func in \
23170         bcopy                   \
23171         closesocket             \
23172         chroot                  \
23173         endgrent                \
23174         endpwent                \
23175         fcntl                   \
23176         flock                   \
23177         fstat                   \
23178         getdtablesize   \
23179         getgrgid                \
23180         gethostname             \
23181         getpass                 \
23182         getpassphrase   \
23183         getpwuid                \
23184         getpwnam                \
23185         getspnam                \
23186         gettimeofday    \
23187         initgroups              \
23188         lockf                   \
23189         memcpy                  \
23190         memmove                 \
23191         mkstemp                 \
23192         mktemp                  \
23193         pipe                    \
23194         read                    \
23195         recv                    \
23196         recvfrom                \
23197         setpwfile               \
23198         setgid                  \
23199         setegid                 \
23200         setsid                  \
23201         setuid                  \
23202         seteuid                 \
23203         sigaction               \
23204         signal                  \
23205         sigset                  \
23206         strdup                  \
23207         strerror                \
23208         strpbrk                 \
23209         strrchr                 \
23210         strsep                  \
23211         strstr                  \
23212         strtol                  \
23213         strtoul                 \
23214         strtoq                  \
23215         strtouq                 \
23216         strtoll                 \
23217         strspn                  \
23218         sysconf                 \
23219         usleep                  \
23220         waitpid                 \
23221         wait4                   \
23222         write                   \
23223         send                    \
23224         sendmsg                 \
23225         sendto                  \
23226
23227 do
23228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23229 echo "configure:23230: checking for $ac_func" >&5
23230 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23231   echo $ac_n "(cached) $ac_c" 1>&6
23232 else
23233   cat > conftest.$ac_ext <<EOF
23234 #line 23235 "configure"
23235 #include "confdefs.h"
23236 /* System header to define __stub macros and hopefully few prototypes,
23237     which can conflict with char $ac_func(); below.  */
23238 #include <assert.h>
23239 /* Override any gcc2 internal prototype to avoid an error.  */
23240 /* We use char because int might match the return type of a gcc2
23241     builtin and then its argument prototype would still apply.  */
23242 char $ac_func();
23243 char (*f)();
23244
23245 int main() {
23246
23247 /* The GNU C library defines this for functions which it implements
23248     to always fail with ENOSYS.  Some functions are actually named
23249     something starting with __ and the normal name is an alias.  */
23250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23251 choke me
23252 #else
23253 f = $ac_func;
23254 #endif
23255
23256 ; return 0; }
23257 EOF
23258 if { (eval echo configure:23259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23259   rm -rf conftest*
23260   eval "ac_cv_func_$ac_func=yes"
23261 else
23262   echo "configure: failed program was:" >&5
23263   cat conftest.$ac_ext >&5
23264   rm -rf conftest*
23265   eval "ac_cv_func_$ac_func=no"
23266 fi
23267 rm -f conftest*
23268 fi
23269
23270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23271   echo "$ac_t""yes" 1>&6
23272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23273   cat >> confdefs.h <<EOF
23274 #define $ac_tr_func 1
23275 EOF
23276  
23277 else
23278   echo "$ac_t""no" 1>&6
23279 fi
23280 done
23281
23282
23283 for ac_func in getopt getpeereid
23284 do
23285 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23286 echo "configure:23287: checking for $ac_func" >&5
23287 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23288   echo $ac_n "(cached) $ac_c" 1>&6
23289 else
23290   cat > conftest.$ac_ext <<EOF
23291 #line 23292 "configure"
23292 #include "confdefs.h"
23293 /* System header to define __stub macros and hopefully few prototypes,
23294     which can conflict with char $ac_func(); below.  */
23295 #include <assert.h>
23296 /* Override any gcc2 internal prototype to avoid an error.  */
23297 /* We use char because int might match the return type of a gcc2
23298     builtin and then its argument prototype would still apply.  */
23299 char $ac_func();
23300 char (*f)();
23301
23302 int main() {
23303
23304 /* The GNU C library defines this for functions which it implements
23305     to always fail with ENOSYS.  Some functions are actually named
23306     something starting with __ and the normal name is an alias.  */
23307 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23308 choke me
23309 #else
23310 f = $ac_func;
23311 #endif
23312
23313 ; return 0; }
23314 EOF
23315 if { (eval echo configure:23316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23316   rm -rf conftest*
23317   eval "ac_cv_func_$ac_func=yes"
23318 else
23319   echo "configure: failed program was:" >&5
23320   cat conftest.$ac_ext >&5
23321   rm -rf conftest*
23322   eval "ac_cv_func_$ac_func=no"
23323 fi
23324 rm -f conftest*
23325 fi
23326
23327 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23328   echo "$ac_t""yes" 1>&6
23329     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23330   cat >> confdefs.h <<EOF
23331 #define $ac_tr_func 1
23332 EOF
23333  
23334 else
23335   echo "$ac_t""no" 1>&6
23336 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23337 fi
23338 done
23339
23340
23341
23342 if test "$ac_cv_func_getopt" != yes; then
23343         LIBSRCS="$LIBSRCS getopt.c"
23344 fi
23345 if test "$ac_cv_func_getpeereid" != yes; then
23346         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23347 echo "configure:23348: checking for msg_accrights in msghdr" >&5
23348 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23349   echo $ac_n "(cached) $ac_c" 1>&6
23350 else
23351   cat > conftest.$ac_ext <<EOF
23352 #line 23353 "configure"
23353 #include "confdefs.h"
23354 #include <sys/socket.h>
23355 int main() {
23356 struct msghdr m; m.msg_accrightslen=0
23357 ; return 0; }
23358 EOF
23359 if { (eval echo configure:23360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23360   rm -rf conftest*
23361   ol_cv_msghdr_msg_accrights=yes
23362 else
23363   echo "configure: failed program was:" >&5
23364   cat conftest.$ac_ext >&5
23365   rm -rf conftest*
23366   ol_cv_msghdr_msg_accrights=no
23367 fi
23368 rm -f conftest*
23369         
23370 fi
23371
23372 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23373   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23374         cat >> confdefs.h <<\EOF
23375 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23376 EOF
23377
23378   fi
23379
23380         LIBSRCS="$LIBSRCS getpeereid.c"
23381 fi
23382 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23383         if test "$ac_cv_func_snprintf" != yes; then
23384                 cat >> confdefs.h <<\EOF
23385 #define snprintf ber_pvt_snprintf
23386 EOF
23387
23388         fi
23389         if test "$ac_cv_func_vsnprintf" != yes; then
23390                 cat >> confdefs.h <<\EOF
23391 #define vsnprintf ber_pvt_vsnprintf
23392 EOF
23393
23394         fi
23395 fi
23396
23397 # Check Configuration
23398 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23399 echo "configure:23400: checking declaration of sys_errlist" >&5
23400 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23401   echo $ac_n "(cached) $ac_c" 1>&6
23402 else
23403   
23404         cat > conftest.$ac_ext <<EOF
23405 #line 23406 "configure"
23406 #include "confdefs.h"
23407
23408 #include <stdio.h>
23409 #include <sys/types.h>
23410 #include <errno.h>
23411 #ifdef WINNT
23412 #include <stdlib.h>
23413 #endif 
23414 int main() {
23415 char *c = (char *) *sys_errlist
23416 ; return 0; }
23417 EOF
23418 if { (eval echo configure:23419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23419   rm -rf conftest*
23420   ol_cv_dcl_sys_errlist=yes
23421         ol_cv_have_sys_errlist=yes
23422 else
23423   echo "configure: failed program was:" >&5
23424   cat conftest.$ac_ext >&5
23425   rm -rf conftest*
23426   ol_cv_dcl_sys_errlist=no
23427 fi
23428 rm -f conftest*
23429 fi
23430
23431 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23432 #
23433 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23434 if test $ol_cv_dcl_sys_errlist = no ; then
23435         cat >> confdefs.h <<\EOF
23436 #define DECL_SYS_ERRLIST 1
23437 EOF
23438
23439
23440         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23441 echo "configure:23442: checking existence of sys_errlist" >&5
23442 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23443   echo $ac_n "(cached) $ac_c" 1>&6
23444 else
23445   
23446                 cat > conftest.$ac_ext <<EOF
23447 #line 23448 "configure"
23448 #include "confdefs.h"
23449 #include <errno.h>
23450 int main() {
23451 char *c = (char *) *sys_errlist
23452 ; return 0; }
23453 EOF
23454 if { (eval echo configure:23455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23455   rm -rf conftest*
23456   ol_cv_have_sys_errlist=yes
23457 else
23458   echo "configure: failed program was:" >&5
23459   cat conftest.$ac_ext >&5
23460   rm -rf conftest*
23461   ol_cv_have_sys_errlist=no
23462 fi
23463 rm -f conftest*
23464 fi
23465
23466 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23467 fi
23468 if test $ol_cv_have_sys_errlist = yes ; then
23469         cat >> confdefs.h <<\EOF
23470 #define HAVE_SYS_ERRLIST 1
23471 EOF
23472
23473 fi
23474
23475
23476
23477 if test "$ol_enable_slapi" != no ; then
23478                         for ac_hdr in ltdl.h
23479 do
23480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23482 echo "configure:23483: checking for $ac_hdr" >&5
23483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23484   echo $ac_n "(cached) $ac_c" 1>&6
23485 else
23486   cat > conftest.$ac_ext <<EOF
23487 #line 23488 "configure"
23488 #include "confdefs.h"
23489 #include <$ac_hdr>
23490 EOF
23491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23492 { (eval echo configure:23493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23494 if test -z "$ac_err"; then
23495   rm -rf conftest*
23496   eval "ac_cv_header_$ac_safe=yes"
23497 else
23498   echo "$ac_err" >&5
23499   echo "configure: failed program was:" >&5
23500   cat conftest.$ac_ext >&5
23501   rm -rf conftest*
23502   eval "ac_cv_header_$ac_safe=no"
23503 fi
23504 rm -f conftest*
23505 fi
23506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23507   echo "$ac_t""yes" 1>&6
23508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23509   cat >> confdefs.h <<EOF
23510 #define $ac_tr_hdr 1
23511 EOF
23512  
23513 else
23514   echo "$ac_t""no" 1>&6
23515 fi
23516 done
23517
23518
23519         if test $ac_cv_header_ltdl_h != yes ; then
23520                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23521         fi
23522         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23523 echo "configure:23524: checking for lt_dlinit in -lltdl" >&5
23524 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23525 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23526   echo $ac_n "(cached) $ac_c" 1>&6
23527 else
23528   ac_save_LIBS="$LIBS"
23529 LIBS="-lltdl  $LIBS"
23530 cat > conftest.$ac_ext <<EOF
23531 #line 23532 "configure"
23532 #include "confdefs.h"
23533 /* Override any gcc2 internal prototype to avoid an error.  */
23534 /* We use char because int might match the return type of a gcc2
23535     builtin and then its argument prototype would still apply.  */
23536 char lt_dlinit();
23537
23538 int main() {
23539 lt_dlinit()
23540 ; return 0; }
23541 EOF
23542 if { (eval echo configure:23543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23543   rm -rf conftest*
23544   eval "ac_cv_lib_$ac_lib_var=yes"
23545 else
23546   echo "configure: failed program was:" >&5
23547   cat conftest.$ac_ext >&5
23548   rm -rf conftest*
23549   eval "ac_cv_lib_$ac_lib_var=no"
23550 fi
23551 rm -f conftest*
23552 LIBS="$ac_save_LIBS"
23553
23554 fi
23555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23556   echo "$ac_t""yes" 1>&6
23557   
23558                 SLAPI_LIBS=-lltdl
23559                 LIBSLAPI=libslapi.a
23560                 LIBSLAPITOOLS=../libslapi.a
23561                 cat >> confdefs.h <<\EOF
23562 #define HAVE_LIBLTDL 1
23563 EOF
23564
23565         
23566 else
23567   echo "$ac_t""no" 1>&6
23568 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23569 fi
23570
23571
23572         cat >> confdefs.h <<\EOF
23573 #define LDAP_SLAPI 1
23574 EOF
23575
23576 fi
23577
23578 if test "$ol_enable_debug" != no ; then
23579         cat >> confdefs.h <<\EOF
23580 #define LDAP_DEBUG 1
23581 EOF
23582
23583 fi
23584 if test "$ol_enable_syslog" = yes ; then
23585         cat >> confdefs.h <<\EOF
23586 #define LDAP_SYSLOG 1
23587 EOF
23588
23589 fi
23590 if test "$ol_link_kbind" != no ; then
23591         cat >> confdefs.h <<\EOF
23592 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23593 EOF
23594
23595 fi
23596 if test "$ol_enable_proctitle" != no ; then
23597         cat >> confdefs.h <<\EOF
23598 #define LDAP_PROCTITLE 1
23599 EOF
23600
23601 fi
23602 if test "$ol_enable_referrals" != no ; then
23603         cat >> confdefs.h <<\EOF
23604 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23605 EOF
23606
23607 fi
23608 if test "$ol_enable_local" != no; then
23609         cat >> confdefs.h <<\EOF
23610 #define LDAP_PF_LOCAL 1
23611 EOF
23612
23613 fi
23614 if test "$ol_link_ipv6" != no; then
23615         cat >> confdefs.h <<\EOF
23616 #define LDAP_PF_INET6 1
23617 EOF
23618
23619 fi
23620 if test "$ol_enable_cleartext" != no ; then
23621         cat >> confdefs.h <<\EOF
23622 #define SLAPD_CLEARTEXT 1
23623 EOF
23624
23625 fi
23626 if test "$ol_enable_crypt" != no ; then
23627         cat >> confdefs.h <<\EOF
23628 #define SLAPD_CRYPT 1
23629 EOF
23630
23631 fi
23632 if test "$ol_link_spasswd" != no ; then
23633         cat >> confdefs.h <<\EOF
23634 #define SLAPD_SPASSWD 1
23635 EOF
23636
23637 fi
23638 if test "$ol_enable_multimaster" != no ; then
23639         cat >> confdefs.h <<\EOF
23640 #define SLAPD_MULTIMASTER 1
23641 EOF
23642
23643 fi
23644 if test "$ol_enable_rlookups" != no ; then
23645         cat >> confdefs.h <<\EOF
23646 #define SLAPD_RLOOKUPS 1
23647 EOF
23648
23649 fi
23650 if test "$ol_enable_aci" != no ; then
23651         cat >> confdefs.h <<\EOF
23652 #define SLAPD_ACI_ENABLED 1
23653 EOF
23654
23655 fi
23656
23657 if test "$ol_link_modules" != no ; then
23658         cat >> confdefs.h <<\EOF
23659 #define SLAPD_MODULES 1
23660 EOF
23661
23662         BUILD_SLAPD=yes
23663         SLAPD_MODULES_LDFLAGS="-dlopen self"
23664 fi
23665
23666 cat >> confdefs.h <<\EOF
23667 #define SLAPD_MOD_STATIC 1
23668 EOF
23669
23670 cat >> confdefs.h <<\EOF
23671 #define SLAPD_MOD_DYNAMIC 2
23672 EOF
23673
23674
23675 if test "$ol_enable_bdb" != no ; then
23676         cat >> confdefs.h <<\EOF
23677 #define SLAPD_BDB 1
23678 EOF
23679
23680         BUILD_SLAPD=yes
23681         BUILD_BDB=yes
23682         if test "$ol_with_bdb_module" != static ; then
23683                 cat >> confdefs.h <<\EOF
23684 #define SLAPD_BDB_DYNAMIC 1
23685 EOF
23686
23687                 BUILD_BDB=mod
23688                 BUILD_BDB_DYNAMIC=shared
23689                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23690         else
23691                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23692         fi
23693 fi
23694
23695 if test "$ol_link_dnssrv" != no ; then
23696         cat >> confdefs.h <<\EOF
23697 #define SLAPD_DNSSRV 1
23698 EOF
23699
23700         BUILD_SLAPD=yes
23701         BUILD_DNSSRV=yes
23702         if test "$ol_with_dnssrv_module" != static ; then
23703                 cat >> confdefs.h <<\EOF
23704 #define SLAPD_DNSSRV_DYNAMIC 1
23705 EOF
23706
23707                 BUILD_DNSSRV=mod
23708                 BUILD_DNSSRV_DYNAMIC=shared
23709                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23710         else
23711                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23712         fi
23713 fi
23714
23715 if test "$ol_enable_hdb" != no ; then
23716         cat >> confdefs.h <<\EOF
23717 #define SLAPD_HDB 1
23718 EOF
23719
23720         BUILD_SLAPD=yes
23721         BUILD_HDB=yes
23722         if test "$ol_with_hdb_module" != static ; then
23723                 cat >> confdefs.h <<\EOF
23724 #define SLAPD_HDB_DYNAMIC 1
23725 EOF
23726
23727                 BUILD_HDB=mod
23728                 BUILD_HDB_DYNAMIC=shared
23729                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23730         else
23731                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23732         fi
23733 fi
23734
23735 if test "$ol_enable_ldap" != no ; then
23736         cat >> confdefs.h <<\EOF
23737 #define SLAPD_LDAP 1
23738 EOF
23739
23740         BUILD_SLAPD=yes
23741         BUILD_LDAP=yes
23742         if test "$ol_with_ldap_module" != static ; then
23743                 cat >> confdefs.h <<\EOF
23744 #define SLAPD_LDAP_DYNAMIC 1
23745 EOF
23746
23747                 BUILD_LDAP=mod
23748                 BUILD_LDAP_DYNAMIC=shared
23749                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23750         else
23751                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23752         fi
23753 fi
23754
23755 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23756         cat >> confdefs.h <<\EOF
23757 #define SLAPD_LDBM 1
23758 EOF
23759
23760         BUILD_SLAPD=yes
23761         BUILD_LDBM=yes
23762         if test "$ol_with_ldbm_module" != static ; then
23763                 cat >> confdefs.h <<\EOF
23764 #define SLAPD_LDBM_DYNAMIC 1
23765 EOF
23766
23767                 BUILD_LDBM=mod
23768                 BUILD_LDBM_DYNAMIC=shared
23769                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23770         else
23771                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23772         fi
23773 fi
23774
23775 if test "$ol_enable_meta" != no ; then
23776         cat >> confdefs.h <<\EOF
23777 #define SLAPD_META 1
23778 EOF
23779
23780         BUILD_SLAPD=yes
23781         BUILD_META=yes
23782         BUILD_REWRITE=yes
23783         if test "$ol_with_meta_module" != static ; then
23784                 cat >> confdefs.h <<\EOF
23785 #define SLAPD_META_DYNAMIC 1
23786 EOF
23787
23788                 BUILD_META=mod
23789                 BUILD_META_DYNAMIC=shared
23790                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23791         else
23792                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23793         fi
23794 fi
23795
23796 if test "$ol_enable_monitor" != no ; then
23797         cat >> confdefs.h <<\EOF
23798 #define SLAPD_MONITOR 1
23799 EOF
23800
23801         BUILD_SLAPD=yes
23802         BUILD_MONITOR=yes
23803         if test "$ol_with_monitor_module" != static ; then
23804                 cat >> confdefs.h <<\EOF
23805 #define SLAPD_MONITOR_DYNAMIC 1
23806 EOF
23807
23808                 BUILD_MONITOR=mod
23809                 BUILD_MONITOR_DYNAMIC=shared
23810                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23811         else
23812                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23813         fi
23814 fi
23815
23816 if test "$ol_enable_null" != no ; then
23817         cat >> confdefs.h <<\EOF
23818 #define SLAPD_NULL 1
23819 EOF
23820
23821         BUILD_SLAPD=yes
23822         BUILD_NULL=yes
23823         if test "$ol_with_null_module" != static ; then
23824                 cat >> confdefs.h <<\EOF
23825 #define SLAPD_NULL_DYNAMIC 1
23826 EOF
23827
23828                 BUILD_NULL=mod
23829                 BUILD_NULL_DYNAMIC=shared
23830                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23831         else
23832                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23833         fi
23834 fi
23835
23836 if test "$ol_enable_passwd" != no ; then
23837         cat >> confdefs.h <<\EOF
23838 #define SLAPD_PASSWD 1
23839 EOF
23840
23841         BUILD_SLAPD=yes
23842         BUILD_PASSWD=yes
23843         if test "$ol_with_passwd_module" != static ; then
23844                 cat >> confdefs.h <<\EOF
23845 #define SLAPD_PASSWD_DYNAMIC 1
23846 EOF
23847
23848                 BUILD_PASSWD=mod
23849                 BUILD_PASSWD_DYNAMIC=shared
23850                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23851         else
23852                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23853         fi
23854 fi
23855
23856 if test "$ol_link_perl" != no ; then
23857         cat >> confdefs.h <<\EOF
23858 #define SLAPD_PERL 1
23859 EOF
23860
23861         BUILD_SLAPD=yes
23862         BUILD_PERL=yes
23863         if test "$ol_with_perl_module" != static ; then
23864                 cat >> confdefs.h <<\EOF
23865 #define SLAPD_PERL_DYNAMIC 1
23866 EOF
23867
23868                 BUILD_PERL=mod
23869                 BUILD_PERL_DYNAMIC=shared
23870                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23871         else
23872                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23873         fi
23874 fi
23875
23876 if test "$ol_enable_relay" != no ; then
23877         cat >> confdefs.h <<\EOF
23878 #define SLAPD_RELAY 1
23879 EOF
23880
23881         BUILD_SLAPD=yes
23882         BUILD_RELAY=yes
23883         if test "$ol_with_relay_module" != static ; then
23884                 cat >> confdefs.h <<\EOF
23885 #define SLAPD_RELAY_DYNAMIC 1
23886 EOF
23887
23888                 BUILD_RELAY=mod
23889                 BUILD_RELAY_DYNAMIC=shared
23890                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23891         else
23892                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23893         fi
23894 fi
23895
23896 if test "$ol_enable_shell" != no ; then
23897         if test "$ol_link_thread" != no ; then
23898                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23899         fi
23900         cat >> confdefs.h <<\EOF
23901 #define SLAPD_SHELL 1
23902 EOF
23903
23904         BUILD_SLAPD=yes
23905         BUILD_SHELL=yes
23906         if test "$ol_with_shell_module" != static ; then
23907                 cat >> confdefs.h <<\EOF
23908 #define SLAPD_SHELL_DYNAMIC 1
23909 EOF
23910
23911                 BUILD_SHELL=mod
23912                 BUILD_SHELL_DYNAMIC=shared
23913                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23914         else
23915                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23916         fi
23917 fi
23918
23919 if test "$ol_link_sql" != no ; then
23920         cat >> confdefs.h <<\EOF
23921 #define SLAPD_SQL 1
23922 EOF
23923
23924         BUILD_SLAPD=yes
23925         BUILD_SQL=yes
23926         if test "$ol_with_sql_module" != static; then
23927                 cat >> confdefs.h <<\EOF
23928 #define SLAPD_SQL_DYNAMIC 1
23929 EOF
23930
23931                 BUILD_SQL=mod
23932                 BUILD_SQL_DYNAMIC=shared
23933                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23934         else
23935                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23936         fi
23937 fi
23938
23939 if test "$ol_enable_chain" != no ; then
23940         BUILD_CHAIN=$ol_enable_chain
23941         if test "$ol_enable_chain" = mod ; then
23942                 MFLAG=SLAPD_MOD_DYNAMIC
23943                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23944         else
23945                 MFLAG=SLAPD_MOD_STATIC
23946         fi
23947         cat >> confdefs.h <<EOF
23948 #define SLAPD_OVER_CHAIN $MFLAG
23949 EOF
23950
23951 fi
23952
23953 if test "$ol_enable_denyop" != no ; then
23954         BUILD_DENYOP=$ol_enable_denyop
23955         if test "$ol_enable_denyop" = mod ; then
23956                 MFLAG=SLAPD_MOD_DYNAMIC
23957                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23958         else
23959                 MFLAG=SLAPD_MOD_STATIC
23960         fi
23961         cat >> confdefs.h <<EOF
23962 #define SLAPD_OVER_DENYOP $MFLAG
23963 EOF
23964
23965 fi
23966
23967 if test "$ol_enable_dyngroup" != no ; then
23968         BUILD_DYNGROUP=$ol_enable_dyngroup
23969         if test "$ol_enable_dyngroup" = mod ; then
23970                 MFLAG=SLAPD_MOD_DYNAMIC
23971                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23972         else
23973                 MFLAG=SLAPD_MOD_STATIC
23974         fi
23975         cat >> confdefs.h <<EOF
23976 #define SLAPD_OVER_DYNGROUP $MFLAG
23977 EOF
23978
23979 fi
23980
23981 if test "$ol_enable_ppolicy" != no ; then
23982         BUILD_PPOLICY=$ol_enable_ppolicy
23983         if test "$ol_enable_ppolicy" = mod ; then
23984                 MFLAG=SLAPD_MOD_DYNAMIC
23985                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23986         else
23987                 MFLAG=SLAPD_MOD_STATIC
23988         fi
23989         cat >> confdefs.h <<EOF
23990 #define SLAPD_OVER_PPOLICY $MFLAG
23991 EOF
23992
23993 fi
23994
23995 if test "$ol_enable_proxycache" != no ; then
23996         BUILD_PROXYCACHE=$ol_enable_proxycache
23997         if test "$ol_enable_proxycache" = mod ; then
23998                 MFLAG=SLAPD_MOD_DYNAMIC
23999                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24000         else
24001                 MFLAG=SLAPD_MOD_STATIC
24002         fi
24003         cat >> confdefs.h <<EOF
24004 #define SLAPD_OVER_PROXYCACHE $MFLAG
24005 EOF
24006
24007 fi
24008
24009 if test "$ol_enable_rwm " != no ; then
24010         BUILD_REWRITE=yes
24011         BUILD_RWM=$ol_enable_rwm
24012         if test "$ol_enable_rwm" = mod ; then
24013                 MFLAG=SLAPD_MOD_DYNAMIC
24014                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24015         else
24016                 MFLAG=SLAPD_MOD_STATIC
24017         fi
24018         cat >> confdefs.h <<EOF
24019 #define SLAPD_OVER_RWM $MFLAG
24020 EOF
24021
24022 fi
24023
24024 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24025         $BUILD_SLAPD = yes ; then
24026         BUILD_SLURPD=yes
24027 fi
24028
24029 if test "$ol_enable_rewrite" != no ; then
24030         cat >> confdefs.h <<\EOF
24031 #define ENABLE_REWRITE 1
24032 EOF
24033
24034         BUILD_REWRITE=yes
24035 fi
24036
24037 if test "$ol_enable_slapi" != no ; then
24038         cat >> confdefs.h <<\EOF
24039 #define ENABLE_SLAPI 1
24040 EOF
24041
24042         BUILD_SLAPI=yes
24043         SLAPD_SLAPI_DEPEND=libslapi.a
24044 fi
24045
24046
24047
24048 if test "$ac_cv_mingw32" = yes ; then
24049         PLAT=NT
24050         SLAPD_MODULES_LDFLAGS=
24051 else
24052         PLAT=UNIX
24053 fi
24054
24055 if test -z "$SLAPD_STATIC_BACKENDS"; then
24056         SLAPD_NO_STATIC='#'
24057 else
24058         SLAPD_NO_STATIC=
24059 fi
24060
24061
24062
24063
24064
24065
24066
24067   
24068   
24069   
24070   
24071   
24072   
24073   
24074   
24075   
24076   
24077   
24078   
24079   
24080   
24081   
24082   
24083   
24084   
24085   
24086   
24087   
24088   
24089   
24090   
24091   
24092   
24093   
24094   
24095   
24096   
24097   
24098   
24099   
24100   
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139 # Check whether --with-xxinstall or --without-xxinstall was given.
24140 if test "${with_xxinstall+set}" = set; then
24141   withval="$with_xxinstall"
24142   :
24143 fi
24144
24145
24146
24147 trap '' 1 2 15
24148
24149 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24150
24151 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24152 # Let make expand exec_prefix.
24153 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24154
24155 # Any assignment to VPATH causes Sun make to only execute
24156 # the first set of double-colon rules, so remove it if not needed.
24157 # If there is a colon in the path, we need to keep it.
24158 if test "x$srcdir" = x.; then
24159   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24160 fi
24161
24162 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24163
24164 DEFS=-DHAVE_CONFIG_H
24165
24166 # Without the "./", some shells look in PATH for config.status.
24167 : ${CONFIG_STATUS=./config.status}
24168
24169 echo creating $CONFIG_STATUS
24170 rm -f $CONFIG_STATUS
24171 cat > $CONFIG_STATUS <<EOF
24172 #! /bin/sh
24173 # Generated automatically by configure.
24174 # Run this file to recreate the current configuration.
24175 # This directory was configured as follows,
24176 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24177 #
24178 # $0 $ac_configure_args
24179 #
24180 # Compiler output produced by configure, useful for debugging
24181 # configure, is in ./config.log if it exists.
24182
24183 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24184 for ac_option
24185 do
24186   case "\$ac_option" in
24187   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24188     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24189     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24190   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24191     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24192     exit 0 ;;
24193   -help | --help | --hel | --he | --h)
24194     echo "\$ac_cs_usage"; exit 0 ;;
24195   *) echo "\$ac_cs_usage"; exit 1 ;;
24196   esac
24197 done
24198
24199 ac_given_srcdir=$srcdir
24200 ac_given_INSTALL="$INSTALL"
24201
24202 trap 'rm -fr `echo "\
24203 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24204 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24205 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24206 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24207 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24208 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24209 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24210 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24211 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24212 include/Makefile:build/top.mk:include/Makefile.in \
24213 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24214 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24215 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24216 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24217 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24218 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24219 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24220 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24221 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24222 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24223 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24224 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24225 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24226 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24227 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24228 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24229 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24230 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24231 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24232 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24233 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24234 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24235 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24236 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24237 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24238 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24239 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24240 tests/run \
24241 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24242  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24243 EOF
24244 cat >> $CONFIG_STATUS <<EOF
24245
24246 # Protect against being on the right side of a sed subst in config.status.
24247 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24248  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24249 $ac_vpsub
24250 $extrasub
24251 s%@SHELL@%$SHELL%g
24252 s%@CFLAGS@%$CFLAGS%g
24253 s%@CPPFLAGS@%$CPPFLAGS%g
24254 s%@CXXFLAGS@%$CXXFLAGS%g
24255 s%@FFLAGS@%$FFLAGS%g
24256 s%@DEFS@%$DEFS%g
24257 s%@LDFLAGS@%$LDFLAGS%g
24258 s%@LIBS@%$LIBS%g
24259 s%@exec_prefix@%$exec_prefix%g
24260 s%@prefix@%$prefix%g
24261 s%@program_transform_name@%$program_transform_name%g
24262 s%@bindir@%$bindir%g
24263 s%@sbindir@%$sbindir%g
24264 s%@libexecdir@%$libexecdir%g
24265 s%@datadir@%$datadir%g
24266 s%@sysconfdir@%$sysconfdir%g
24267 s%@sharedstatedir@%$sharedstatedir%g
24268 s%@localstatedir@%$localstatedir%g
24269 s%@libdir@%$libdir%g
24270 s%@includedir@%$includedir%g
24271 s%@oldincludedir@%$oldincludedir%g
24272 s%@infodir@%$infodir%g
24273 s%@mandir@%$mandir%g
24274 s%@host@%$host%g
24275 s%@host_alias@%$host_alias%g
24276 s%@host_cpu@%$host_cpu%g
24277 s%@host_vendor@%$host_vendor%g
24278 s%@host_os@%$host_os%g
24279 s%@target@%$target%g
24280 s%@target_alias@%$target_alias%g
24281 s%@target_cpu@%$target_cpu%g
24282 s%@target_vendor@%$target_vendor%g
24283 s%@target_os@%$target_os%g
24284 s%@build@%$build%g
24285 s%@build_alias@%$build_alias%g
24286 s%@build_cpu@%$build_cpu%g
24287 s%@build_vendor@%$build_vendor%g
24288 s%@build_os@%$build_os%g
24289 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24290 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24291 s%@INSTALL_DATA@%$INSTALL_DATA%g
24292 s%@PACKAGE@%$PACKAGE%g
24293 s%@VERSION@%$VERSION%g
24294 s%@ACLOCAL@%$ACLOCAL%g
24295 s%@AUTOCONF@%$AUTOCONF%g
24296 s%@AUTOMAKE@%$AUTOMAKE%g
24297 s%@AUTOHEADER@%$AUTOHEADER%g
24298 s%@MAKEINFO@%$MAKEINFO%g
24299 s%@install_sh@%$install_sh%g
24300 s%@AMTAR@%$AMTAR%g
24301 s%@AWK@%$AWK%g
24302 s%@AMTARFLAGS@%$AMTARFLAGS%g
24303 s%@SET_MAKE@%$SET_MAKE%g
24304 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24305 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24306 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24307 s%@top_builddir@%$top_builddir%g
24308 s%@ldap_subdir@%$ldap_subdir%g
24309 s%@CC@%$CC%g
24310 s%@AR@%$AR%g
24311 s%@LN_S@%$LN_S%g
24312 s%@OBJEXT@%$OBJEXT%g
24313 s%@EXEEXT@%$EXEEXT%g
24314 s%@ECHO@%$ECHO%g
24315 s%@RANLIB@%$RANLIB%g
24316 s%@STRIP@%$STRIP%g
24317 s%@DLLTOOL@%$DLLTOOL%g
24318 s%@AS@%$AS%g
24319 s%@OBJDUMP@%$OBJDUMP%g
24320 s%@CPP@%$CPP%g
24321 s%@LIBTOOL@%$LIBTOOL%g
24322 s%@LN_H@%$LN_H%g
24323 s%@PERLBIN@%$PERLBIN%g
24324 s%@OL_MKDEP@%$OL_MKDEP%g
24325 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24326 s%@LTSTATIC@%$LTSTATIC%g
24327 s%@LIBOBJS@%$LIBOBJS%g
24328 s%@LIBSRCS@%$LIBSRCS%g
24329 s%@PLAT@%$PLAT%g
24330 s%@WITH_TLS@%$WITH_TLS%g
24331 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24332 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24333 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24334 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24335 s%@BUILD_BDB@%$BUILD_BDB%g
24336 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24337 s%@BUILD_HDB@%$BUILD_HDB%g
24338 s%@BUILD_LDAP@%$BUILD_LDAP%g
24339 s%@BUILD_LDBM@%$BUILD_LDBM%g
24340 s%@BUILD_META@%$BUILD_META%g
24341 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24342 s%@BUILD_NULL@%$BUILD_NULL%g
24343 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24344 s%@BUILD_RELAY@%$BUILD_RELAY%g
24345 s%@BUILD_PERL@%$BUILD_PERL%g
24346 s%@BUILD_SHELL@%$BUILD_SHELL%g
24347 s%@BUILD_SQL@%$BUILD_SQL%g
24348 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24349 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24350 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24351 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24352 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24353 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24354 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24355 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24356 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24357 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24358 s%@BUILD_RELAY_DYNAMIC@%$BUILD_RELAY_DYNAMIC%g
24359 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24360 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24361 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24362 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24363 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24364 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24365 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24366 s%@BUILD_RWM@%$BUILD_RWM%g
24367 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24368 s%@LDAP_LIBS@%$LDAP_LIBS%g
24369 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24370 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24371 s%@LDBM_LIBS@%$LDBM_LIBS%g
24372 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24373 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24374 s%@WRAP_LIBS@%$WRAP_LIBS%g
24375 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24376 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24377 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24378 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24379 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24380 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24381 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24382 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24383 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24384 s%@KRB4_LIBS@%$KRB4_LIBS%g
24385 s%@KRB5_LIBS@%$KRB5_LIBS%g
24386 s%@SASL_LIBS@%$SASL_LIBS%g
24387 s%@TLS_LIBS@%$TLS_LIBS%g
24388 s%@MODULES_LIBS@%$MODULES_LIBS%g
24389 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24390 s%@LIBSLAPI@%$LIBSLAPI%g
24391 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24392 s%@AUTH_LIBS@%$AUTH_LIBS%g
24393 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24394 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24395 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24396 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24397
24398 CEOF
24399 EOF
24400
24401 cat >> $CONFIG_STATUS <<\EOF
24402
24403 # Split the substitutions into bite-sized pieces for seds with
24404 # small command number limits, like on Digital OSF/1 and HP-UX.
24405 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24406 ac_file=1 # Number of current file.
24407 ac_beg=1 # First line for current file.
24408 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24409 ac_more_lines=:
24410 ac_sed_cmds=""
24411 while $ac_more_lines; do
24412   if test $ac_beg -gt 1; then
24413     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24414   else
24415     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24416   fi
24417   if test ! -s conftest.s$ac_file; then
24418     ac_more_lines=false
24419     rm -f conftest.s$ac_file
24420   else
24421     if test -z "$ac_sed_cmds"; then
24422       ac_sed_cmds="sed -f conftest.s$ac_file"
24423     else
24424       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24425     fi
24426     ac_file=`expr $ac_file + 1`
24427     ac_beg=$ac_end
24428     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24429   fi
24430 done
24431 if test -z "$ac_sed_cmds"; then
24432   ac_sed_cmds=cat
24433 fi
24434 EOF
24435
24436 cat >> $CONFIG_STATUS <<EOF
24437
24438 CONFIG_FILES=\${CONFIG_FILES-"\
24439 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24440 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24441 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24442 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24443 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24444 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24445 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24446 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24447 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24448 include/Makefile:build/top.mk:include/Makefile.in \
24449 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24450 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24451 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24452 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24453 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24454 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24455 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24456 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24457 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24458 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24459 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24460 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24461 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24462 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24463 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24464 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24465 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24466 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24467 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24468 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24469 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24470 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24471 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24472 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24473 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24474 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24475 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24476 tests/run \
24477 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24478 "}
24479 EOF
24480 cat >> $CONFIG_STATUS <<\EOF
24481 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24482   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24483   case "$ac_file" in
24484   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24485        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24486   *) ac_file_in="${ac_file}.in" ;;
24487   esac
24488
24489   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24490
24491   # Remove last slash and all that follows it.  Not all systems have dirname.
24492   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24493   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24494     # The file is in a subdirectory.
24495     test ! -d "$ac_dir" && mkdir "$ac_dir"
24496     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24497     # A "../" for each directory in $ac_dir_suffix.
24498     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24499   else
24500     ac_dir_suffix= ac_dots=
24501   fi
24502
24503   case "$ac_given_srcdir" in
24504   .)  srcdir=.
24505       if test -z "$ac_dots"; then top_srcdir=.
24506       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24507   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24508   *) # Relative path.
24509     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24510     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24511   esac
24512
24513   case "$ac_given_INSTALL" in
24514   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24515   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24516   esac
24517
24518   echo creating "$ac_file"
24519   rm -f "$ac_file"
24520   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24521   case "$ac_file" in
24522   *[Mm]akefile*) ac_comsub="1i\\
24523 # $configure_input" ;;
24524   *) ac_comsub= ;;
24525   esac
24526
24527   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24528   sed -e "$ac_comsub
24529 s%@configure_input@%$configure_input%g
24530 s%@srcdir@%$srcdir%g
24531 s%@top_srcdir@%$top_srcdir%g
24532 s%@INSTALL@%$INSTALL%g
24533 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24534 fi; done
24535 rm -f conftest.s*
24536
24537 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24538 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24539 #
24540 # ac_d sets the value in "#define NAME VALUE" lines.
24541 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24542 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24543 ac_dC='\3'
24544 ac_dD='%g'
24545 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24546 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24547 ac_uB='\([      ]\)%\1#\2define\3'
24548 ac_uC=' '
24549 ac_uD='\4%g'
24550 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24551 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24552 ac_eB='$%\1#\2define\3'
24553 ac_eC=' '
24554 ac_eD='%g'
24555
24556 if test "${CONFIG_HEADERS+set}" != set; then
24557 EOF
24558 cat >> $CONFIG_STATUS <<EOF
24559   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24560 EOF
24561 cat >> $CONFIG_STATUS <<\EOF
24562 fi
24563 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24564   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24565   case "$ac_file" in
24566   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24567        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24568   *) ac_file_in="${ac_file}.in" ;;
24569   esac
24570
24571   echo creating $ac_file
24572
24573   rm -f conftest.frag conftest.in conftest.out
24574   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24575   cat $ac_file_inputs > conftest.in
24576
24577 EOF
24578
24579 # Transform confdefs.h into a sed script conftest.vals that substitutes
24580 # the proper values into config.h.in to produce config.h.  And first:
24581 # Protect against being on the right side of a sed subst in config.status.
24582 # Protect against being in an unquoted here document in config.status.
24583 rm -f conftest.vals
24584 cat > conftest.hdr <<\EOF
24585 s/[\\&%]/\\&/g
24586 s%[\\$`]%\\&%g
24587 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24588 s%ac_d%ac_u%gp
24589 s%ac_u%ac_e%gp
24590 EOF
24591 sed -n -f conftest.hdr confdefs.h > conftest.vals
24592 rm -f conftest.hdr
24593
24594 # This sed command replaces #undef with comments.  This is necessary, for
24595 # example, in the case of _POSIX_SOURCE, which is predefined and required
24596 # on some systems where configure will not decide to define it.
24597 cat >> conftest.vals <<\EOF
24598 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24599 EOF
24600
24601 # Break up conftest.vals because some shells have a limit on
24602 # the size of here documents, and old seds have small limits too.
24603
24604 rm -f conftest.tail
24605 while :
24606 do
24607   ac_lines=`grep -c . conftest.vals`
24608   # grep -c gives empty output for an empty file on some AIX systems.
24609   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24610   # Write a limited-size here document to conftest.frag.
24611   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24612   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24613   echo 'CEOF
24614   sed -f conftest.frag conftest.in > conftest.out
24615   rm -f conftest.in
24616   mv conftest.out conftest.in
24617 ' >> $CONFIG_STATUS
24618   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24619   rm -f conftest.vals
24620   mv conftest.tail conftest.vals
24621 done
24622 rm -f conftest.vals
24623
24624 cat >> $CONFIG_STATUS <<\EOF
24625   rm -f conftest.frag conftest.h
24626   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24627   cat conftest.in >> conftest.h
24628   rm -f conftest.in
24629   if cmp -s $ac_file conftest.h 2>/dev/null; then
24630     echo "$ac_file is unchanged"
24631     rm -f conftest.h
24632   else
24633     # Remove last slash and all that follows it.  Not all systems have dirname.
24634       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24635       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24636       # The file is in a subdirectory.
24637       test ! -d "$ac_dir" && mkdir "$ac_dir"
24638     fi
24639     rm -f $ac_file
24640     mv conftest.h $ac_file
24641   fi
24642 fi; done
24643
24644 EOF
24645 cat >> $CONFIG_STATUS <<EOF
24646
24647 EOF
24648 cat >> $CONFIG_STATUS <<\EOF
24649
24650 chmod +x tests/run
24651 date > stamp-h
24652 echo Please run \"make depend\" to build dependencies
24653
24654 exit 0
24655 EOF
24656 chmod +x $CONFIG_STATUS
24657 rm -fr confdefs* $ac_clean_files
24658 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24659