]> git.sur5r.net Git - openldap/blob - configure
c5d3557b86a827baa0a03ee4b93b2d44aaea16d8
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.519 2004/03/24 21:42:21 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-bdb          enable Berkeley DB backend [yes]"
86 ac_help="$ac_help
87     --with-bdb-module     module type static|dynamic [static]"
88 ac_help="$ac_help
89     --enable-dnssrv       enable dnssrv backend [no]"
90 ac_help="$ac_help
91     --with-dnssrv-module  module type static|dynamic [static]"
92 ac_help="$ac_help
93     --enable-hdb          enable Hierarchical DB backend [no]"
94 ac_help="$ac_help
95     --with-hdb-module     module type static|dynamic [static]"
96 ac_help="$ac_help
97     --enable-ldap         enable ldap backend [no]"
98 ac_help="$ac_help
99     --with-ldap-module    module type static|dynamic [static]"
100 ac_help="$ac_help
101     --enable-ldbm         enable ldbm backend [no]"
102 ac_help="$ac_help
103     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
104 ac_help="$ac_help
105     --with-ldbm-module    module type static|dynamic [static]"
106 ac_help="$ac_help
107     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
108 ac_help="$ac_help
109     --enable-meta         enable metadirectory backend [no]"
110 ac_help="$ac_help
111     --with-meta-module    module type static|dynamic [static]"
112 ac_help="$ac_help
113     --enable-monitor      enable monitor backend [yes]"
114 ac_help="$ac_help
115     --with-monitor-module module type static|dynamic [static]"
116 ac_help="$ac_help
117     --enable-null         enable null backend [no]"
118 ac_help="$ac_help
119     --with-null-module    module type static|dynamic [static]"
120 ac_help="$ac_help
121     --enable-passwd       enable passwd backend [no]"
122 ac_help="$ac_help
123     --with-passwd-module  module type static|dynamic [static]"
124 ac_help="$ac_help
125     --enable-perl         enable perl backend [no]"
126 ac_help="$ac_help
127     --with-perl-module    module type static|dynamic [static]"
128 ac_help="$ac_help
129     --enable-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     --with-chain          LDAP Chain Response no|yes|mod [no]"
145 ac_help="$ac_help
146     --with-denyop         Deny Operation overlay no|yes|mod [no]"
147 ac_help="$ac_help
148     --with-dyngroup       Dynamic Group overlay no|yes|mod [no]"
149 ac_help="$ac_help
150     --with-ppolicy        Password Policy overlay no|yes|mod [no]"
151 ac_help="$ac_help
152     --with-proxycache     Proxy Cache overlay no|yes|mod [no]"
153 ac_help="$ac_help
154     --with-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="no"
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 --with-chain
2477         # Check whether --with-chain or --without-chain was given.
2478 if test "${with_chain+set}" = set; then
2479   withval="$with_chain"
2480   
2481         ol_arg=invalid
2482         for ol_val in no yes mod ; do
2483                 if test "$withval" = "$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 $withval for --with-chain" 1>&2; exit 1; }
2489         fi
2490         ol_with_chain="$ol_arg"
2491
2492 else
2493         ol_with_chain="no"
2494 fi
2495 # end --with-chain
2496
2497 # OpenLDAP --with-denyop
2498         # Check whether --with-denyop or --without-denyop was given.
2499 if test "${with_denyop+set}" = set; then
2500   withval="$with_denyop"
2501   
2502         ol_arg=invalid
2503         for ol_val in no yes mod ; do
2504                 if test "$withval" = "$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 $withval for --with-denyop" 1>&2; exit 1; }
2510         fi
2511         ol_with_denyop="$ol_arg"
2512
2513 else
2514         ol_with_denyop="no"
2515 fi
2516 # end --with-denyop
2517
2518 # OpenLDAP --with-dyngroup
2519         # Check whether --with-dyngroup or --without-dyngroup was given.
2520 if test "${with_dyngroup+set}" = set; then
2521   withval="$with_dyngroup"
2522   
2523         ol_arg=invalid
2524         for ol_val in no yes mod ; do
2525                 if test "$withval" = "$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 $withval for --with-dyngroup" 1>&2; exit 1; }
2531         fi
2532         ol_with_dyngroup="$ol_arg"
2533
2534 else
2535         ol_with_dyngroup="no"
2536 fi
2537 # end --with-dyngroup
2538
2539 # OpenLDAP --with-ppolicy
2540         # Check whether --with-ppolicy or --without-ppolicy was given.
2541 if test "${with_ppolicy+set}" = set; then
2542   withval="$with_ppolicy"
2543   
2544         ol_arg=invalid
2545         for ol_val in no yes mod ; do
2546                 if test "$withval" = "$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 $withval for --with-ppolicy" 1>&2; exit 1; }
2552         fi
2553         ol_with_ppolicy="$ol_arg"
2554
2555 else
2556         ol_with_ppolicy="no"
2557 fi
2558 # end --with-ppolicy
2559
2560 # OpenLDAP --with-proxycache
2561         # Check whether --with-proxycache or --without-proxycache was given.
2562 if test "${with_proxycache+set}" = set; then
2563   withval="$with_proxycache"
2564   
2565         ol_arg=invalid
2566         for ol_val in no yes mod ; do
2567                 if test "$withval" = "$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 $withval for --with-proxycache" 1>&2; exit 1; }
2573         fi
2574         ol_with_proxycache="$ol_arg"
2575
2576 else
2577         ol_with_proxycache="no"
2578 fi
2579 # end --with-proxycache
2580
2581 # OpenLDAP --with-rwm
2582         # Check whether --with-rwm or --without-rwm was given.
2583 if test "${with_rwm+set}" = set; then
2584   withval="$with_rwm"
2585   
2586         ol_arg=invalid
2587         for ol_val in no yes mod ; do
2588                 if test "$withval" = "$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 $withval for --with-rwm" 1>&2; exit 1; }
2594         fi
2595         ol_with_rwm="$ol_arg"
2596
2597 else
2598         ol_with_rwm="no"
2599 fi
2600 # end --with-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_with_chain=no
2857         ol_with_denyop=no
2858         ol_with_dyngroup=no
2859         ol_with_ppolicy=no
2860         ol_with_proxycache=no
2861         ol_with_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_slurpd = yes ; then
2938                 if test $ol_with_threads = no ; then
2939                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2940         fi
2941 fi
2942
2943 if test $ol_enable_lmpasswd = yes ; then
2944         if test $ol_with_tls = no ; then
2945                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2946         fi
2947 fi
2948
2949 if test $ol_enable_kbind = yes ; then
2950         if test $ol_with_kerberos = no ; then
2951                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2952         elif test $ol_with_kerberos = auto ; then
2953                 ol_with_kerberos=yes
2954         fi
2955
2956 elif test $ol_enable_kbind = no ; then
2957         if test $ol_with_kerberos = auto ; then
2958                 ol_with_kerberos=no
2959         elif test $ol_with_kerberos != no ; then
2960                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2961                 ol_with_kerberos=no
2962         fi
2963 fi
2964
2965 if test $ol_enable_spasswd = yes ; then
2966         if test $ol_with_cyrus_sasl = no ; then
2967                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2968         fi
2969         ol_with_cyrus_sasl=yes
2970 fi
2971
2972 echo "$ac_t""done" 1>&6
2973
2974 LDAP_LIBS=
2975 LDBM_LIBS=
2976 LTHREAD_LIBS=
2977 LUTIL_LIBS=
2978
2979 SLAPD_LIBS=
2980 SLURPD_LIBS=
2981
2982 BUILD_SLAPD=no
2983 BUILD_SLURPD=no
2984
2985 BUILD_THREAD=no
2986
2987 BUILD_SLAPI=no
2988 SLAPD_SLAPI_DEPEND=
2989
2990 BUILD_BDB=no
2991 BUILD_DNSSRV=no
2992 BUILD_HDB=no
2993 BUILD_LDAP=no
2994 BUILD_LDBM=no
2995 BUILD_META=no
2996 BUILD_MONITOR=no
2997 BUILD_NULL=no
2998 BUILD_PASSWD=no
2999 BUILD_PERL=no
3000 BUILD_RELAY=no
3001 BUILD_SHELL=no
3002 BUILD_SQL=no
3003
3004 BUILD_BDB_DYNAMIC=static
3005 BUILD_DNSSRV_DYNAMIC=static
3006 BUILD_HDB_DYNAMIC=static
3007 BUILD_LDAP_DYNAMIC=static
3008 BUILD_LDBM_DYNAMIC=static
3009 BUILD_META_DYNAMIC=static
3010 BUILD_MONITOR_DYNAMIC=static
3011 BUILD_NULL_DYNAMIC=static
3012 BUILD_PASSWD_DYNAMIC=static
3013 BUILD_PERL_DYNAMIC=static
3014 BUILD_RELAY_DYNAMIC=static
3015 BUILD_SHELL_DYNAMIC=static
3016 BUILD_SQL_DYNAMIC=static
3017
3018 BUILD_CHAIN=no
3019 BUILD_DENYOP=no
3020 BUILD_DYNGROUP=no
3021 BUILD_PPOLICY=no
3022 BUILD_PROXYCACHE=no
3023 BUILD_RWM=no
3024
3025 SLAPD_DYNAMIC_OVERLAYS=
3026
3027 SLAPD_MODULES_LDFLAGS=
3028 SLAPD_MODULES_CPPFLAGS=
3029
3030 SLAPD_STATIC_BACKENDS=
3031 SLAPD_DYNAMIC_BACKENDS=
3032
3033 SLAPD_PERL_LDFLAGS=
3034 MOD_PERL_LDFLAGS=
3035 PERL_CPPFLAGS=
3036
3037 SLAPD_SQL_LDFLAGS=
3038 SLAPD_SQL_LIBS=
3039 SLAPD_SQL_INCLUDES=
3040
3041 KRB4_LIBS=
3042 KRB5_LIBS=
3043 SASL_LIBS=
3044 TLS_LIBS=
3045 MODULES_LIBS=
3046 SLAPI_LIBS=
3047 LIBSLAPI=
3048 LIBSLAPITOOLS=
3049 AUTH_LIBS=
3050
3051 SLAPD_SLP_LIBS=
3052
3053
3054 # Find a good install program.  We prefer a C program (faster),
3055 # so one script is as good as another.  But avoid the broken or
3056 # incompatible versions:
3057 # SysV /etc/install, /usr/sbin/install
3058 # SunOS /usr/etc/install
3059 # IRIX /sbin/install
3060 # AIX /bin/install
3061 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3062 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3063 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3064 # ./install, which can be erroneously created by make from ./install.sh.
3065 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3066 echo "configure:3067: checking for a BSD compatible install" >&5
3067 if test -z "$INSTALL"; then
3068 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
3069   echo $ac_n "(cached) $ac_c" 1>&6
3070 else
3071     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3072   for ac_dir in $PATH; do
3073     # Account for people who put trailing slashes in PATH elements.
3074     case "$ac_dir/" in
3075     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3076     *)
3077       # OSF1 and SCO ODT 3.0 have their own names for install.
3078       # Don't use installbsd from OSF since it installs stuff as root
3079       # by default.
3080       for ac_prog in ginstall scoinst install; do
3081         if test -f $ac_dir/$ac_prog; then
3082           if test $ac_prog = install &&
3083             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3084             # AIX install.  It has an incompatible calling convention.
3085             :
3086           elif test $ac_prog = install &&
3087             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3088             # program-specific install script used by HP pwplus--don't use.
3089             :
3090           else
3091             ac_cv_path_install="$ac_dir/$ac_prog -c"
3092             break 2
3093           fi
3094         fi
3095       done
3096       ;;
3097     esac
3098   done
3099   IFS="$ac_save_IFS"
3100
3101 fi
3102   if test "${ac_cv_path_install+set}" = set; then
3103     INSTALL="$ac_cv_path_install"
3104   else
3105     # As a last resort, use the slow shell script.  We don't cache a
3106     # path for INSTALL within a source directory, because that will
3107     # break other packages using the cache if that directory is
3108     # removed, or if the path is relative.
3109     INSTALL="$ac_install_sh"
3110   fi
3111 fi
3112 echo "$ac_t""$INSTALL" 1>&6
3113
3114 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3115 # It thinks the first close brace ends the variable substitution.
3116 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3117
3118 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3119
3120 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3121
3122
3123 cat >> confdefs.h <<\EOF
3124 #define HAVE_MKVERSION 1
3125 EOF
3126
3127
3128
3129
3130 ol_aix_threads=no
3131 case "$target" in
3132 *-*-aix*)       if test -z "$CC" ; then
3133                 case "$ol_with_threads" in
3134                 auto | yes |  posix) ol_aix_threads=yes ;;
3135                 esac
3136         fi
3137 ;;
3138 esac
3139
3140 if test $ol_aix_threads = yes ; then
3141         if test -z "${CC}" ; then
3142                 for ac_prog in cc_r xlc_r cc
3143 do
3144 # Extract the first word of "$ac_prog", so it can be a program name with args.
3145 set dummy $ac_prog; ac_word=$2
3146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3147 echo "configure:3148: checking for $ac_word" >&5
3148 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3149   echo $ac_n "(cached) $ac_c" 1>&6
3150 else
3151   if test -n "$CC"; then
3152   ac_cv_prog_CC="$CC" # Let the user override the test.
3153 else
3154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3155   ac_dummy="$PATH"
3156   for ac_dir in $ac_dummy; do
3157     test -z "$ac_dir" && ac_dir=.
3158     if test -f $ac_dir/$ac_word; then
3159       ac_cv_prog_CC="$ac_prog"
3160       break
3161     fi
3162   done
3163   IFS="$ac_save_ifs"
3164 fi
3165 fi
3166 CC="$ac_cv_prog_CC"
3167 if test -n "$CC"; then
3168   echo "$ac_t""$CC" 1>&6
3169 else
3170   echo "$ac_t""no" 1>&6
3171 fi
3172
3173 test -n "$CC" && break
3174 done
3175
3176
3177                 if test "$CC" = cc ; then
3178                                                 if test $ol_with_threads != auto ; then
3179                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3180                         else
3181                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3182                         fi
3183                         ol_with_threads=no
3184                 fi
3185         fi
3186
3187         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3188                 ol_with_threads=posix
3189                 ol_cv_pthread_create=yes
3190         fi
3191 fi
3192
3193 if test -z "${CC}"; then
3194         for ac_prog in cc gcc
3195 do
3196 # Extract the first word of "$ac_prog", so it can be a program name with args.
3197 set dummy $ac_prog; ac_word=$2
3198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3199 echo "configure:3200: checking for $ac_word" >&5
3200 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3201   echo $ac_n "(cached) $ac_c" 1>&6
3202 else
3203   if test -n "$CC"; then
3204   ac_cv_prog_CC="$CC" # Let the user override the test.
3205 else
3206   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3207   ac_dummy="$PATH"
3208   for ac_dir in $ac_dummy; do
3209     test -z "$ac_dir" && ac_dir=.
3210     if test -f $ac_dir/$ac_word; then
3211       ac_cv_prog_CC="$ac_prog"
3212       break
3213     fi
3214   done
3215   IFS="$ac_save_ifs"
3216 fi
3217 fi
3218 CC="$ac_cv_prog_CC"
3219 if test -n "$CC"; then
3220   echo "$ac_t""$CC" 1>&6
3221 else
3222   echo "$ac_t""no" 1>&6
3223 fi
3224
3225 test -n "$CC" && break
3226 done
3227 test -n "$CC" || CC="missing"
3228
3229
3230         if test "${CC}" = "missing" ; then
3231                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3232         fi
3233 fi
3234
3235 if test -z "${AR}"; then
3236         for ac_prog in ar gar
3237 do
3238 # Extract the first word of "$ac_prog", so it can be a program name with args.
3239 set dummy $ac_prog; ac_word=$2
3240 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3241 echo "configure:3242: checking for $ac_word" >&5
3242 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3243   echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245   if test -n "$AR"; then
3246   ac_cv_prog_AR="$AR" # Let the user override the test.
3247 else
3248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3249   ac_dummy="$PATH"
3250   for ac_dir in $ac_dummy; do
3251     test -z "$ac_dir" && ac_dir=.
3252     if test -f $ac_dir/$ac_word; then
3253       ac_cv_prog_AR="$ac_prog"
3254       break
3255     fi
3256   done
3257   IFS="$ac_save_ifs"
3258 fi
3259 fi
3260 AR="$ac_cv_prog_AR"
3261 if test -n "$AR"; then
3262   echo "$ac_t""$AR" 1>&6
3263 else
3264   echo "$ac_t""no" 1>&6
3265 fi
3266
3267 test -n "$AR" && break
3268 done
3269 test -n "$AR" || AR="missing"
3270
3271
3272         if test "${AR}" = "missing" ; then
3273                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3274         fi
3275 fi
3276
3277
3278
3279 # Find the correct PATH separator.  Usually this is `:', but
3280 # DJGPP uses `;' like DOS.
3281 if test "X${PATH_SEPARATOR+set}" != Xset; then
3282   UNAME=${UNAME-`uname 2>/dev/null`}
3283   case X$UNAME in
3284     *-DOS) lt_cv_sys_path_separator=';' ;;
3285     *)     lt_cv_sys_path_separator=':' ;;
3286   esac
3287   PATH_SEPARATOR=$lt_cv_sys_path_separator
3288 fi
3289
3290 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3291 echo "configure:3292: checking for Cygwin environment" >&5
3292 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3293   echo $ac_n "(cached) $ac_c" 1>&6
3294 else
3295   cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298
3299 int main() {
3300
3301 #ifndef __CYGWIN__
3302 #define __CYGWIN__ __CYGWIN32__
3303 #endif
3304 return __CYGWIN__;
3305 ; return 0; }
3306 EOF
3307 if { (eval echo configure:3308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3308   rm -rf conftest*
3309   ac_cv_cygwin=yes
3310 else
3311   echo "configure: failed program was:" >&5
3312   cat conftest.$ac_ext >&5
3313   rm -rf conftest*
3314   ac_cv_cygwin=no
3315 fi
3316 rm -f conftest*
3317 fi
3318
3319 echo "$ac_t""$ac_cv_cygwin" 1>&6
3320 CYGWIN=
3321 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3322 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3323 echo "configure:3324: checking for mingw32 environment" >&5
3324 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330
3331 int main() {
3332 return __MINGW32__;
3333 ; return 0; }
3334 EOF
3335 if { (eval echo configure:3336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3336   rm -rf conftest*
3337   ac_cv_mingw32=yes
3338 else
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   ac_cv_mingw32=no
3343 fi
3344 rm -f conftest*
3345 fi
3346
3347 echo "$ac_t""$ac_cv_mingw32" 1>&6
3348 MINGW32=
3349 test "$ac_cv_mingw32" = yes && MINGW32=yes
3350 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3351 echo "configure:3352: checking for EMX OS/2 environment" >&5
3352 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3353   echo $ac_n "(cached) $ac_c" 1>&6
3354 else
3355   cat > conftest.$ac_ext <<EOF
3356 #line 3357 "configure"
3357 #include "confdefs.h"
3358
3359 int main() {
3360 return __EMX__;
3361 ; return 0; }
3362 EOF
3363 if { (eval echo configure:3364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3364   rm -rf conftest*
3365   ac_cv_emxos2=yes
3366 else
3367   echo "configure: failed program was:" >&5
3368   cat conftest.$ac_ext >&5
3369   rm -rf conftest*
3370   ac_cv_emxos2=no
3371 fi
3372 rm -f conftest*
3373 fi
3374
3375 echo "$ac_t""$ac_cv_emxos2" 1>&6
3376 EMXOS2=
3377 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3378 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3379 echo "configure:3380: checking how to run the C preprocessor" >&5
3380 # On Suns, sometimes $CPP names a directory.
3381 if test -n "$CPP" && test -d "$CPP"; then
3382   CPP=
3383 fi
3384 if test -z "$CPP"; then
3385 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3386   echo $ac_n "(cached) $ac_c" 1>&6
3387 else
3388     # This must be in double quotes, not single quotes, because CPP may get
3389   # substituted into the Makefile and "${CC-cc}" will confuse make.
3390   CPP="${CC-cc} -E"
3391   # On the NeXT, cc -E runs the code through the compiler's parser,
3392   # not just through cpp.
3393   cat > conftest.$ac_ext <<EOF
3394 #line 3395 "configure"
3395 #include "confdefs.h"
3396 #include <assert.h>
3397 Syntax Error
3398 EOF
3399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3400 { (eval echo configure:3401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3402 if test -z "$ac_err"; then
3403   :
3404 else
3405   echo "$ac_err" >&5
3406   echo "configure: failed program was:" >&5
3407   cat conftest.$ac_ext >&5
3408   rm -rf conftest*
3409   CPP="${CC-cc} -E -traditional-cpp"
3410   cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <assert.h>
3414 Syntax Error
3415 EOF
3416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3417 { (eval echo configure:3418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3419 if test -z "$ac_err"; then
3420   :
3421 else
3422   echo "$ac_err" >&5
3423   echo "configure: failed program was:" >&5
3424   cat conftest.$ac_ext >&5
3425   rm -rf conftest*
3426   CPP="${CC-cc} -nologo -E"
3427   cat > conftest.$ac_ext <<EOF
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430 #include <assert.h>
3431 Syntax Error
3432 EOF
3433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3434 { (eval echo configure:3435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3436 if test -z "$ac_err"; then
3437   :
3438 else
3439   echo "$ac_err" >&5
3440   echo "configure: failed program was:" >&5
3441   cat conftest.$ac_ext >&5
3442   rm -rf conftest*
3443   CPP=/lib/cpp
3444 fi
3445 rm -f conftest*
3446 fi
3447 rm -f conftest*
3448 fi
3449 rm -f conftest*
3450   ac_cv_prog_CPP="$CPP"
3451 fi
3452   CPP="$ac_cv_prog_CPP"
3453 else
3454   ac_cv_prog_CPP="$CPP"
3455 fi
3456 echo "$ac_t""$CPP" 1>&6
3457
3458 # Check whether --enable-fast-install or --disable-fast-install was given.
3459 if test "${enable_fast_install+set}" = set; then
3460   enableval="$enable_fast_install"
3461   p=${PACKAGE-default}
3462 case $enableval in
3463 yes) enable_fast_install=yes ;;
3464 no) enable_fast_install=no ;;
3465 *)
3466   enable_fast_install=no
3467   # Look at the argument we got.  We use all the common list separators.
3468   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3469   for pkg in $enableval; do
3470     if test "X$pkg" = "X$p"; then
3471       enable_fast_install=yes
3472     fi
3473   done
3474   IFS="$ac_save_ifs"
3475   ;;
3476 esac
3477 else
3478   enable_fast_install=yes
3479 fi
3480
3481 # Extract the first word of "gcc", so it can be a program name with args.
3482 set dummy gcc; ac_word=$2
3483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3484 echo "configure:3485: checking for $ac_word" >&5
3485 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3486   echo $ac_n "(cached) $ac_c" 1>&6
3487 else
3488   if test -n "$CC"; then
3489   ac_cv_prog_CC="$CC" # Let the user override the test.
3490 else
3491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3492   ac_dummy="$PATH"
3493   for ac_dir in $ac_dummy; do
3494     test -z "$ac_dir" && ac_dir=.
3495     if test -f $ac_dir/$ac_word; then
3496       ac_cv_prog_CC="gcc"
3497       break
3498     fi
3499   done
3500   IFS="$ac_save_ifs"
3501 fi
3502 fi
3503 CC="$ac_cv_prog_CC"
3504 if test -n "$CC"; then
3505   echo "$ac_t""$CC" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509
3510 if test -z "$CC"; then
3511   # Extract the first word of "cc", so it can be a program name with args.
3512 set dummy cc; ac_word=$2
3513 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3514 echo "configure:3515: checking for $ac_word" >&5
3515 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3516   echo $ac_n "(cached) $ac_c" 1>&6
3517 else
3518   if test -n "$CC"; then
3519   ac_cv_prog_CC="$CC" # Let the user override the test.
3520 else
3521   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3522   ac_prog_rejected=no
3523   ac_dummy="$PATH"
3524   for ac_dir in $ac_dummy; do
3525     test -z "$ac_dir" && ac_dir=.
3526     if test -f $ac_dir/$ac_word; then
3527       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3528         ac_prog_rejected=yes
3529         continue
3530       fi
3531       ac_cv_prog_CC="cc"
3532       break
3533     fi
3534   done
3535   IFS="$ac_save_ifs"
3536 if test $ac_prog_rejected = yes; then
3537   # We found a bogon in the path, so make sure we never use it.
3538   set dummy $ac_cv_prog_CC
3539   shift
3540   if test $# -gt 0; then
3541     # We chose a different compiler from the bogus one.
3542     # However, it has the same basename, so the bogon will be chosen
3543     # first if we set CC to just the basename; use the full file name.
3544     shift
3545     set dummy "$ac_dir/$ac_word" "$@"
3546     shift
3547     ac_cv_prog_CC="$@"
3548   fi
3549 fi
3550 fi
3551 fi
3552 CC="$ac_cv_prog_CC"
3553 if test -n "$CC"; then
3554   echo "$ac_t""$CC" 1>&6
3555 else
3556   echo "$ac_t""no" 1>&6
3557 fi
3558
3559   if test -z "$CC"; then
3560     case "`uname -s`" in
3561     *win32* | *WIN32* | *CYGWIN*)
3562       # Extract the first word of "cl", so it can be a program name with args.
3563 set dummy cl; ac_word=$2
3564 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3565 echo "configure:3566: checking for $ac_word" >&5
3566 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3567   echo $ac_n "(cached) $ac_c" 1>&6
3568 else
3569   if test -n "$CC"; then
3570   ac_cv_prog_CC="$CC" # Let the user override the test.
3571 else
3572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3573   ac_dummy="$PATH"
3574   for ac_dir in $ac_dummy; do
3575     test -z "$ac_dir" && ac_dir=.
3576     if test -f $ac_dir/$ac_word; then
3577       ac_cv_prog_CC="cl"
3578       break
3579     fi
3580   done
3581   IFS="$ac_save_ifs"
3582 fi
3583 fi
3584 CC="$ac_cv_prog_CC"
3585 if test -n "$CC"; then
3586   echo "$ac_t""$CC" 1>&6
3587 else
3588   echo "$ac_t""no" 1>&6
3589 fi
3590  ;;
3591     esac
3592   fi
3593   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3594 fi
3595
3596 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3597 echo "configure:3598: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3598
3599 ac_ext=c
3600 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3601 ac_cpp='$CPP $CPPFLAGS'
3602 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3603 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3604 cross_compiling=$ac_cv_prog_cc_cross
3605
3606 cat > conftest.$ac_ext << EOF
3607
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610
3611 main(){return(0);}
3612 EOF
3613 if { (eval echo configure:3614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3614   ac_cv_prog_cc_works=yes
3615   # If we can't run a trivial program, we are probably using a cross compiler.
3616   if (./conftest; exit) 2>/dev/null; then
3617     ac_cv_prog_cc_cross=no
3618   else
3619     ac_cv_prog_cc_cross=yes
3620   fi
3621 else
3622   echo "configure: failed program was:" >&5
3623   cat conftest.$ac_ext >&5
3624   ac_cv_prog_cc_works=no
3625 fi
3626 rm -fr conftest*
3627 ac_ext=c
3628 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3629 ac_cpp='$CPP $CPPFLAGS'
3630 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3631 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3632 cross_compiling=$ac_cv_prog_cc_cross
3633
3634 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3635 if test $ac_cv_prog_cc_works = no; then
3636   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3637 fi
3638 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3639 echo "configure:3640: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3640 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3641 cross_compiling=$ac_cv_prog_cc_cross
3642
3643 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3644 echo "configure:3645: checking whether we are using GNU C" >&5
3645 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3646   echo $ac_n "(cached) $ac_c" 1>&6
3647 else
3648   cat > conftest.c <<EOF
3649 #ifdef __GNUC__
3650   yes;
3651 #endif
3652 EOF
3653 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3654   ac_cv_prog_gcc=yes
3655 else
3656   ac_cv_prog_gcc=no
3657 fi
3658 fi
3659
3660 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3661
3662 if test $ac_cv_prog_gcc = yes; then
3663   GCC=yes
3664 else
3665   GCC=
3666 fi
3667
3668 ac_test_CFLAGS="${CFLAGS+set}"
3669 ac_save_CFLAGS="$CFLAGS"
3670 CFLAGS=
3671 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3672 echo "configure:3673: checking whether ${CC-cc} accepts -g" >&5
3673 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3674   echo $ac_n "(cached) $ac_c" 1>&6
3675 else
3676   echo 'void f(){}' > conftest.c
3677 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3678   ac_cv_prog_cc_g=yes
3679 else
3680   ac_cv_prog_cc_g=no
3681 fi
3682 rm -f conftest*
3683
3684 fi
3685
3686 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3687 if test "$ac_test_CFLAGS" = set; then
3688   CFLAGS="$ac_save_CFLAGS"
3689 elif test $ac_cv_prog_cc_g = yes; then
3690   if test "$GCC" = yes; then
3691     CFLAGS="-g -O2"
3692   else
3693     CFLAGS="-g"
3694   fi
3695 else
3696   if test "$GCC" = yes; then
3697     CFLAGS="-O2"
3698   else
3699     CFLAGS=
3700   fi
3701 fi
3702
3703 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3704 if test "${with_gnu_ld+set}" = set; then
3705   withval="$with_gnu_ld"
3706   test "$withval" = no || with_gnu_ld=yes
3707 else
3708   with_gnu_ld=no
3709 fi
3710
3711 ac_prog=ld
3712 if test "$GCC" = yes; then
3713   # Check if gcc -print-prog-name=ld gives a path.
3714   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3715 echo "configure:3716: checking for ld used by GCC" >&5
3716   case $host in
3717   *-*-mingw*)
3718     # gcc leaves a trailing carriage return which upsets mingw
3719     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3720   *)
3721     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3722   esac
3723   case $ac_prog in
3724     # Accept absolute paths.
3725     [\\/]* | [A-Za-z]:[\\/]*)
3726       re_direlt='/[^/][^/]*/\.\./'
3727       # Canonicalize the path of ld
3728       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3729       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3730         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3731       done
3732       test -z "$LD" && LD="$ac_prog"
3733       ;;
3734   "")
3735     # If it fails, then pretend we aren't using GCC.
3736     ac_prog=ld
3737     ;;
3738   *)
3739     # If it is relative, then search for the first ld in PATH.
3740     with_gnu_ld=unknown
3741     ;;
3742   esac
3743 elif test "$with_gnu_ld" = yes; then
3744   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3745 echo "configure:3746: checking for GNU ld" >&5
3746 else
3747   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3748 echo "configure:3749: checking for non-GNU ld" >&5
3749 fi
3750 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3751   echo $ac_n "(cached) $ac_c" 1>&6
3752 else
3753   if test -z "$LD"; then
3754   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3755   for ac_dir in $PATH; do
3756     test -z "$ac_dir" && ac_dir=.
3757     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3758       lt_cv_path_LD="$ac_dir/$ac_prog"
3759       # Check to see if the program is GNU ld.  I'd rather use --version,
3760       # but apparently some GNU ld's only accept -v.
3761       # Break only if it was the GNU/non-GNU ld that we prefer.
3762       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3763         test "$with_gnu_ld" != no && break
3764       else
3765         test "$with_gnu_ld" != yes && break
3766       fi
3767     fi
3768   done
3769   IFS="$ac_save_ifs"
3770 else
3771   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3772 fi
3773 fi
3774
3775 LD="$lt_cv_path_LD"
3776 if test -n "$LD"; then
3777   echo "$ac_t""$LD" 1>&6
3778 else
3779   echo "$ac_t""no" 1>&6
3780 fi
3781 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3782 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3783 echo "configure:3784: checking if the linker ($LD) is GNU ld" >&5
3784 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3785   echo $ac_n "(cached) $ac_c" 1>&6
3786 else
3787   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3788 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3789   lt_cv_prog_gnu_ld=yes
3790 else
3791   lt_cv_prog_gnu_ld=no
3792 fi
3793 fi
3794
3795 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3796 with_gnu_ld=$lt_cv_prog_gnu_ld
3797
3798
3799 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3800 echo "configure:3801: checking for $LD option to reload object files" >&5
3801 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3802   echo $ac_n "(cached) $ac_c" 1>&6
3803 else
3804   lt_cv_ld_reload_flag='-r'
3805 fi
3806
3807 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3808 reload_flag=$lt_cv_ld_reload_flag
3809 test -n "$reload_flag" && reload_flag=" $reload_flag"
3810
3811 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3812 echo "configure:3813: checking for BSD-compatible nm" >&5
3813 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3814   echo $ac_n "(cached) $ac_c" 1>&6
3815 else
3816   if test -n "$NM"; then
3817   # Let the user override the test.
3818   lt_cv_path_NM="$NM"
3819 else
3820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3821   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3822     test -z "$ac_dir" && ac_dir=.
3823     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3824     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3825       # Check to see if the nm accepts a BSD-compat flag.
3826       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3827       #   nm: unknown option "B" ignored
3828       # Tru64's nm complains that /dev/null is an invalid object file
3829       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3830         lt_cv_path_NM="$tmp_nm -B"
3831         break
3832       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3833         lt_cv_path_NM="$tmp_nm -p"
3834         break
3835       else
3836         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3837         continue # so that we can try to find one that supports BSD flags
3838       fi
3839     fi
3840   done
3841   IFS="$ac_save_ifs"
3842   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3843 fi
3844 fi
3845
3846 NM="$lt_cv_path_NM"
3847 echo "$ac_t""$NM" 1>&6
3848
3849 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3850 echo "configure:3851: checking for a sed that does not truncate output" >&5
3851 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3852   echo $ac_n "(cached) $ac_c" 1>&6
3853 else
3854   # Loop through the user's path and test for sed and gsed.
3855 # Then use that list of sed's as ones to test for truncation.
3856 as_executable_p="test -f"
3857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3858 for as_dir in $PATH
3859 do
3860   IFS=$as_save_IFS
3861   test -z "$as_dir" && as_dir=.
3862   for ac_prog in sed gsed; do
3863     for ac_exec_ext in '' $ac_executable_extensions; do
3864       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3865         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3866       fi
3867     done
3868   done
3869 done
3870
3871   # Create a temporary directory, and hook for its removal unless debugging.
3872 $debug ||
3873 {
3874   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3875   trap '{ (exit 1); exit 1; }' 1 2 13 15
3876 }
3877
3878 # Create a (secure) tmp directory for tmp files.
3879 : ${TMPDIR=/tmp}
3880 {
3881   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3882   test -n "$tmp" && test -d "$tmp"
3883 }  ||
3884 {
3885   tmp=$TMPDIR/sed$$-$RANDOM
3886   (umask 077 && mkdir $tmp)
3887 } ||
3888 {
3889    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3890    { (exit 1); exit 1; }
3891 }
3892   _max=0
3893   _count=0
3894   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3895   # along with /bin/sed that truncates output.
3896   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3897     test ! -f ${_sed} && break
3898     cat /dev/null > "$tmp/sed.in"
3899     _count=0
3900     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3901     # Check for GNU sed and select it if it is found.
3902     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3903       lt_cv_path_SED=${_sed}
3904       break
3905     fi
3906     while true; do
3907       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3908       mv "$tmp/sed.tmp" "$tmp/sed.in"
3909       cp "$tmp/sed.in" "$tmp/sed.nl"
3910       echo >>"$tmp/sed.nl"
3911       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3912       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3913       # 40000 chars as input seems more than enough
3914       test $_count -gt 10 && break
3915       _count=`expr $_count + 1`
3916       if test $_count -gt $_max; then
3917         _max=$_count
3918         lt_cv_path_SED=$_sed
3919       fi
3920     done
3921   done
3922   rm -rf "$tmp"
3923
3924 fi
3925
3926 if test "X$SED" != "X"; then
3927   lt_cv_path_SED=$SED
3928 else
3929   SED=$lt_cv_path_SED
3930 fi
3931 echo "$ac_t""$SED" 1>&6
3932
3933 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3934 echo "configure:3935: checking whether ln -s works" >&5
3935 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3936   echo $ac_n "(cached) $ac_c" 1>&6
3937 else
3938   rm -f conftestdata
3939 if ln -s X conftestdata 2>/dev/null
3940 then
3941   rm -f conftestdata
3942   ac_cv_prog_LN_S="ln -s"
3943 else
3944   ac_cv_prog_LN_S=ln
3945 fi
3946 fi
3947 LN_S="$ac_cv_prog_LN_S"
3948 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3949   echo "$ac_t""yes" 1>&6
3950 else
3951   echo "$ac_t""no" 1>&6
3952 fi
3953
3954 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3955 echo "configure:3956: checking how to recognise dependent libraries" >&5
3956 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3957   echo $ac_n "(cached) $ac_c" 1>&6
3958 else
3959   lt_cv_file_magic_cmd='$MAGIC_CMD'
3960 lt_cv_file_magic_test_file=
3961 lt_cv_deplibs_check_method='unknown'
3962 # Need to set the preceding variable on all platforms that support
3963 # interlibrary dependencies.
3964 # 'none' -- dependencies not supported.
3965 # `unknown' -- same as none, but documents that we really don't know.
3966 # 'pass_all' -- all dependencies passed with no checks.
3967 # 'test_compile' -- check by making test program.
3968 # 'file_magic [[regex]]' -- check by looking for files in library path
3969 # which responds to the $file_magic_cmd with a given egrep regex.
3970 # If you have `file' or equivalent on your system and you're not sure
3971 # whether `pass_all' will *always* work, you probably want this one.
3972
3973 case $host_os in
3974 aix4* | aix5*)
3975   lt_cv_deplibs_check_method=pass_all
3976   ;;
3977
3978 beos*)
3979   lt_cv_deplibs_check_method=pass_all
3980   ;;
3981
3982 bsdi4*)
3983   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3984   lt_cv_file_magic_cmd='/usr/bin/file -L'
3985   lt_cv_file_magic_test_file=/shlib/libc.so
3986   ;;
3987
3988 cygwin* | mingw* | pw32*)
3989   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3990   lt_cv_file_magic_cmd='$OBJDUMP -f'
3991   ;;
3992
3993 darwin* | rhapsody*)
3994   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3995   lt_cv_file_magic_cmd='/usr/bin/file -L'
3996   case "$host_os" in
3997   rhapsody* | darwin1.[012])
3998     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3999     ;;
4000   *) # Darwin 1.3 on
4001     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4002     ;;
4003   esac
4004   ;;
4005
4006 freebsd*)
4007   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4008     case $host_cpu in
4009     i*86 )
4010       # Not sure whether the presence of OpenBSD here was a mistake.
4011       # Let's accept both of them until this is cleared up.
4012       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
4013       lt_cv_file_magic_cmd=/usr/bin/file
4014       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4015       ;;
4016     esac
4017   else
4018     lt_cv_deplibs_check_method=pass_all
4019   fi
4020   ;;
4021
4022 gnu*)
4023   lt_cv_deplibs_check_method=pass_all
4024   ;;
4025
4026 hpux10.20*|hpux11*)
4027   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
4028   lt_cv_file_magic_cmd=/usr/bin/file
4029   lt_cv_file_magic_test_file=/usr/lib/libc.sl
4030   ;;
4031
4032 irix5* | irix6* | nonstopux*)
4033   case $host_os in
4034   irix5* | nonstopux*)
4035     # this will be overridden with pass_all, but let us keep it just in case
4036     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4037     ;;
4038   *)
4039     case $LD in
4040     *-32|*"-32 ") libmagic=32-bit;;
4041     *-n32|*"-n32 ") libmagic=N32;;
4042     *-64|*"-64 ") libmagic=64-bit;;
4043     *) libmagic=never-match;;
4044     esac
4045     # this will be overridden with pass_all, but let us keep it just in case
4046     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
4047     ;;
4048   esac
4049   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4050   lt_cv_deplibs_check_method=pass_all
4051   ;;
4052
4053 # This must be Linux ELF.
4054 linux-gnu*)
4055   case $host_cpu in
4056   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
4057     lt_cv_deplibs_check_method=pass_all ;;
4058   *)
4059     # glibc up to 2.1.1 does not perform some relocations on ARM
4060     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
4061   esac
4062   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4063   ;;
4064
4065 netbsd*)
4066   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4067     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
4068   else
4069     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
4070   fi
4071   ;;
4072
4073 newos6*)
4074   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
4075   lt_cv_file_magic_cmd=/usr/bin/file
4076   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4077   ;;
4078
4079 openbsd*)
4080   lt_cv_file_magic_cmd=/usr/bin/file
4081   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4082   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4083     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
4084   else
4085     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4086   fi
4087   ;;
4088
4089 openedition*)
4090   lt_cv_deplibs_check_method=pass_all
4091   ;;
4092
4093 osf3* | osf4* | osf5*)
4094   # this will be overridden with pass_all, but let us keep it just in case
4095   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4096   lt_cv_file_magic_test_file=/shlib/libc.so
4097   lt_cv_deplibs_check_method=pass_all
4098   ;;
4099
4100 sco3.2v5*)
4101   lt_cv_deplibs_check_method=pass_all
4102   ;;
4103
4104 solaris*)
4105   lt_cv_deplibs_check_method=pass_all
4106   lt_cv_file_magic_test_file=/lib/libc.so
4107   ;;
4108
4109 sysv5uw[78]* | sysv4*uw2*)
4110   lt_cv_deplibs_check_method=pass_all
4111   ;;
4112
4113 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4114   case $host_vendor in
4115   motorola)
4116     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]'
4117     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4118     ;;
4119   ncr)
4120     lt_cv_deplibs_check_method=pass_all
4121     ;;
4122   sequent)
4123     lt_cv_file_magic_cmd='/bin/file'
4124     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
4125     ;;
4126   sni)
4127     lt_cv_file_magic_cmd='/bin/file'
4128     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4129     lt_cv_file_magic_test_file=/lib/libc.so
4130     ;;
4131   siemens)
4132     lt_cv_deplibs_check_method=pass_all
4133     ;;
4134   esac
4135   ;;
4136 esac
4137
4138 fi
4139
4140 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4141 file_magic_cmd=$lt_cv_file_magic_cmd
4142 deplibs_check_method=$lt_cv_deplibs_check_method
4143
4144 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4145 echo "configure:4146: checking for object suffix" >&5
4146 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4147   echo $ac_n "(cached) $ac_c" 1>&6
4148 else
4149   rm -f conftest*
4150 echo 'int i = 1;' > conftest.$ac_ext
4151 if { (eval echo configure:4152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4152   for ac_file in conftest.*; do
4153     case $ac_file in
4154     *.c) ;;
4155     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4156     esac
4157   done
4158 else
4159   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4160 fi
4161 rm -f conftest*
4162 fi
4163
4164 echo "$ac_t""$ac_cv_objext" 1>&6
4165 OBJEXT=$ac_cv_objext
4166 ac_objext=$ac_cv_objext
4167
4168
4169
4170
4171 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4172 echo "configure:4173: checking for executable suffix" >&5
4173 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4174   echo $ac_n "(cached) $ac_c" 1>&6
4175 else
4176   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4177   ac_cv_exeext=.exe
4178 else
4179   rm -f conftest*
4180   echo 'int main () { return 0; }' > conftest.$ac_ext
4181   ac_cv_exeext=
4182   if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4183     for file in conftest.*; do
4184       case $file in
4185       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4186       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4187       esac
4188     done
4189   else
4190     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4191   fi
4192   rm -f conftest*
4193   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4194 fi
4195 fi
4196
4197 EXEEXT=""
4198 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4199 echo "$ac_t""${ac_cv_exeext}" 1>&6
4200 ac_exeext=$EXEEXT
4201
4202 if test $host != $build; then
4203   ac_tool_prefix=${host_alias}-
4204 else
4205   ac_tool_prefix=
4206 fi
4207
4208
4209
4210
4211 # Check for command to grab the raw symbol name followed by C symbol from nm.
4212 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4213 echo "configure:4214: checking command to parse $NM output" >&5
4214 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   
4218 # These are sane defaults that work on at least a few old systems.
4219 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4220
4221 # Character class describing NM global symbol codes.
4222 symcode='[BCDEGRST]'
4223
4224 # Regexp to match symbols that can be accessed directly from C.
4225 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4226
4227 # Transform the above into a raw symbol and a C symbol.
4228 symxfrm='\1 \2\3 \3'
4229
4230 # Transform an extracted symbol line into a proper C declaration
4231 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4232
4233 # Transform an extracted symbol line into symbol name and symbol address
4234 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'"
4235
4236 # Define system-specific variables.
4237 case $host_os in
4238 aix*)
4239   symcode='[BCDT]'
4240   ;;
4241 cygwin* | mingw* | pw32*)
4242   symcode='[ABCDGISTW]'
4243   ;;
4244 hpux*) # Its linker distinguishes data from code symbols
4245   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4246   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'"
4247   ;;
4248 irix* | nonstopux*)
4249   symcode='[BCDEGRST]'
4250   ;;
4251 osf*)
4252   symcode='[BCDEGQRST]'
4253   ;;
4254 solaris* | sysv5*)
4255   symcode='[BDT]'
4256   ;;
4257 sysv4)
4258   symcode='[DFNSTU]'
4259   ;;
4260 esac
4261
4262 # Handle CRLF in mingw tool chain
4263 opt_cr=
4264 case $host_os in
4265 mingw*)
4266   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4267   ;;
4268 esac
4269
4270 # If we're using GNU nm, then use its standard symbol codes.
4271 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4272   symcode='[ABCDGISTW]'
4273 fi
4274
4275 # Try without a prefix undercore, then with it.
4276 for ac_symprfx in "" "_"; do
4277
4278   # Write the raw and C identifiers.
4279 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4280
4281   # Check to see that the pipe works correctly.
4282   pipe_works=no
4283   rm -f conftest*
4284   cat > conftest.$ac_ext <<EOF
4285 #ifdef __cplusplus
4286 extern "C" {
4287 #endif
4288 char nm_test_var;
4289 void nm_test_func(){}
4290 #ifdef __cplusplus
4291 }
4292 #endif
4293 int main(){nm_test_var='a';nm_test_func();return(0);}
4294 EOF
4295
4296   if { (eval echo configure:4297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4297     # Now try to grab the symbols.
4298     nlist=conftest.nm
4299     if { (eval echo configure:4300: \"$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
4300       # Try sorting and uniquifying the output.
4301       if sort "$nlist" | uniq > "$nlist"T; then
4302         mv -f "$nlist"T "$nlist"
4303       else
4304         rm -f "$nlist"T
4305       fi
4306
4307       # Make sure that we snagged all the symbols we need.
4308       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4309         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4310           cat <<EOF > conftest.$ac_ext
4311 #ifdef __cplusplus
4312 extern "C" {
4313 #endif
4314
4315 EOF
4316           # Now generate the symbol file.
4317           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4318
4319           cat <<EOF >> conftest.$ac_ext
4320 #if defined (__STDC__) && __STDC__
4321 # define lt_ptr void *
4322 #else
4323 # define lt_ptr char *
4324 # define const
4325 #endif
4326
4327 /* The mapping between symbol names and symbols. */
4328 const struct {
4329   const char *name;
4330   lt_ptr address;
4331 }
4332 lt_preloaded_symbols[] =
4333 {
4334 EOF
4335           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4336           cat <<\EOF >> conftest.$ac_ext
4337   {0, (lt_ptr) 0}
4338 };
4339
4340 #ifdef __cplusplus
4341 }
4342 #endif
4343 EOF
4344           # Now try linking the two files.
4345           mv conftest.$ac_objext conftstm.$ac_objext
4346           save_LIBS="$LIBS"
4347           save_CFLAGS="$CFLAGS"
4348           LIBS="conftstm.$ac_objext"
4349           CFLAGS="$CFLAGS$no_builtin_flag"
4350           if { (eval echo configure:4351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4351             pipe_works=yes
4352           fi
4353           LIBS="$save_LIBS"
4354           CFLAGS="$save_CFLAGS"
4355         else
4356           echo "cannot find nm_test_func in $nlist" >&5
4357         fi
4358       else
4359         echo "cannot find nm_test_var in $nlist" >&5
4360       fi
4361     else
4362       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4363     fi
4364   else
4365     echo "$progname: failed program was:" >&5
4366     cat conftest.$ac_ext >&5
4367   fi
4368   rm -f conftest* conftst*
4369
4370   # Do not use the global_symbol_pipe unless it works.
4371   if test "$pipe_works" = yes; then
4372     break
4373   else
4374     lt_cv_sys_global_symbol_pipe=
4375   fi
4376 done
4377
4378 fi
4379
4380 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4381 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4382   global_symbol_to_cdecl=
4383   global_symbol_to_c_name_address=
4384 else
4385   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4386   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4387 fi
4388 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4389 then
4390   echo "$ac_t""failed" 1>&6
4391 else
4392   echo "$ac_t""ok" 1>&6
4393 fi
4394
4395 for ac_hdr in dlfcn.h
4396 do
4397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4399 echo "configure:4400: checking for $ac_hdr" >&5
4400 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4406 #include <$ac_hdr>
4407 EOF
4408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4409 { (eval echo configure:4410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4411 if test -z "$ac_err"; then
4412   rm -rf conftest*
4413   eval "ac_cv_header_$ac_safe=yes"
4414 else
4415   echo "$ac_err" >&5
4416   echo "configure: failed program was:" >&5
4417   cat conftest.$ac_ext >&5
4418   rm -rf conftest*
4419   eval "ac_cv_header_$ac_safe=no"
4420 fi
4421 rm -f conftest*
4422 fi
4423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4424   echo "$ac_t""yes" 1>&6
4425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4426   cat >> confdefs.h <<EOF
4427 #define $ac_tr_hdr 1
4428 EOF
4429  
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433 done
4434
4435
4436
4437
4438
4439
4440 # Only perform the check for file, if the check method requires it
4441 case $deplibs_check_method in
4442 file_magic*)
4443   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4444     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4445 echo "configure:4446: checking for ${ac_tool_prefix}file" >&5
4446 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   case $MAGIC_CMD in
4450   /*)
4451   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4452   ;;
4453   ?:/*)
4454   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4455   ;;
4456   *)
4457   ac_save_MAGIC_CMD="$MAGIC_CMD"
4458   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4459   ac_dummy="/usr/bin:$PATH"
4460   for ac_dir in $ac_dummy; do
4461     test -z "$ac_dir" && ac_dir=.
4462     if test -f $ac_dir/${ac_tool_prefix}file; then
4463       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4464       if test -n "$file_magic_test_file"; then
4465         case $deplibs_check_method in
4466         "file_magic "*)
4467           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4468           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4469           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4470             egrep "$file_magic_regex" > /dev/null; then
4471             :
4472           else
4473             cat <<EOF 1>&2
4474
4475 *** Warning: the command libtool uses to detect shared libraries,
4476 *** $file_magic_cmd, produces output that libtool cannot recognize.
4477 *** The result is that libtool may fail to recognize shared libraries
4478 *** as such.  This will affect the creation of libtool libraries that
4479 *** depend on shared libraries, but programs linked with such libtool
4480 *** libraries will work regardless of this problem.  Nevertheless, you
4481 *** may want to report the problem to your system manager and/or to
4482 *** bug-libtool@gnu.org
4483
4484 EOF
4485           fi ;;
4486         esac
4487       fi
4488       break
4489     fi
4490   done
4491   IFS="$ac_save_ifs"
4492   MAGIC_CMD="$ac_save_MAGIC_CMD"
4493   ;;
4494 esac
4495 fi
4496
4497 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4498 if test -n "$MAGIC_CMD"; then
4499   echo "$ac_t""$MAGIC_CMD" 1>&6
4500 else
4501   echo "$ac_t""no" 1>&6
4502 fi
4503
4504 if test -z "$lt_cv_path_MAGIC_CMD"; then
4505   if test -n "$ac_tool_prefix"; then
4506     echo $ac_n "checking for file""... $ac_c" 1>&6
4507 echo "configure:4508: checking for file" >&5
4508 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4509   echo $ac_n "(cached) $ac_c" 1>&6
4510 else
4511   case $MAGIC_CMD in
4512   /*)
4513   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4514   ;;
4515   ?:/*)
4516   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4517   ;;
4518   *)
4519   ac_save_MAGIC_CMD="$MAGIC_CMD"
4520   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4521   ac_dummy="/usr/bin:$PATH"
4522   for ac_dir in $ac_dummy; do
4523     test -z "$ac_dir" && ac_dir=.
4524     if test -f $ac_dir/file; then
4525       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4526       if test -n "$file_magic_test_file"; then
4527         case $deplibs_check_method in
4528         "file_magic "*)
4529           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4530           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4531           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4532             egrep "$file_magic_regex" > /dev/null; then
4533             :
4534           else
4535             cat <<EOF 1>&2
4536
4537 *** Warning: the command libtool uses to detect shared libraries,
4538 *** $file_magic_cmd, produces output that libtool cannot recognize.
4539 *** The result is that libtool may fail to recognize shared libraries
4540 *** as such.  This will affect the creation of libtool libraries that
4541 *** depend on shared libraries, but programs linked with such libtool
4542 *** libraries will work regardless of this problem.  Nevertheless, you
4543 *** may want to report the problem to your system manager and/or to
4544 *** bug-libtool@gnu.org
4545
4546 EOF
4547           fi ;;
4548         esac
4549       fi
4550       break
4551     fi
4552   done
4553   IFS="$ac_save_ifs"
4554   MAGIC_CMD="$ac_save_MAGIC_CMD"
4555   ;;
4556 esac
4557 fi
4558
4559 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4560 if test -n "$MAGIC_CMD"; then
4561   echo "$ac_t""$MAGIC_CMD" 1>&6
4562 else
4563   echo "$ac_t""no" 1>&6
4564 fi
4565
4566   else
4567     MAGIC_CMD=:
4568   fi
4569 fi
4570
4571   fi
4572   ;;
4573 esac
4574
4575 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4576 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4578 echo "configure:4579: checking for $ac_word" >&5
4579 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4580   echo $ac_n "(cached) $ac_c" 1>&6
4581 else
4582   if test -n "$RANLIB"; then
4583   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4584 else
4585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4586   ac_dummy="$PATH"
4587   for ac_dir in $ac_dummy; do
4588     test -z "$ac_dir" && ac_dir=.
4589     if test -f $ac_dir/$ac_word; then
4590       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4591       break
4592     fi
4593   done
4594   IFS="$ac_save_ifs"
4595 fi
4596 fi
4597 RANLIB="$ac_cv_prog_RANLIB"
4598 if test -n "$RANLIB"; then
4599   echo "$ac_t""$RANLIB" 1>&6
4600 else
4601   echo "$ac_t""no" 1>&6
4602 fi
4603
4604
4605 if test -z "$ac_cv_prog_RANLIB"; then
4606 if test -n "$ac_tool_prefix"; then
4607   # Extract the first word of "ranlib", so it can be a program name with args.
4608 set dummy ranlib; ac_word=$2
4609 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4610 echo "configure:4611: checking for $ac_word" >&5
4611 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4612   echo $ac_n "(cached) $ac_c" 1>&6
4613 else
4614   if test -n "$RANLIB"; then
4615   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4616 else
4617   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4618   ac_dummy="$PATH"
4619   for ac_dir in $ac_dummy; do
4620     test -z "$ac_dir" && ac_dir=.
4621     if test -f $ac_dir/$ac_word; then
4622       ac_cv_prog_RANLIB="ranlib"
4623       break
4624     fi
4625   done
4626   IFS="$ac_save_ifs"
4627   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4628 fi
4629 fi
4630 RANLIB="$ac_cv_prog_RANLIB"
4631 if test -n "$RANLIB"; then
4632   echo "$ac_t""$RANLIB" 1>&6
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637 else
4638   RANLIB=":"
4639 fi
4640 fi
4641
4642 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4643 set dummy ${ac_tool_prefix}strip; ac_word=$2
4644 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4645 echo "configure:4646: checking for $ac_word" >&5
4646 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4647   echo $ac_n "(cached) $ac_c" 1>&6
4648 else
4649   if test -n "$STRIP"; then
4650   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4651 else
4652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4653   ac_dummy="$PATH"
4654   for ac_dir in $ac_dummy; do
4655     test -z "$ac_dir" && ac_dir=.
4656     if test -f $ac_dir/$ac_word; then
4657       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4658       break
4659     fi
4660   done
4661   IFS="$ac_save_ifs"
4662 fi
4663 fi
4664 STRIP="$ac_cv_prog_STRIP"
4665 if test -n "$STRIP"; then
4666   echo "$ac_t""$STRIP" 1>&6
4667 else
4668   echo "$ac_t""no" 1>&6
4669 fi
4670
4671
4672 if test -z "$ac_cv_prog_STRIP"; then
4673 if test -n "$ac_tool_prefix"; then
4674   # Extract the first word of "strip", so it can be a program name with args.
4675 set dummy strip; ac_word=$2
4676 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4677 echo "configure:4678: checking for $ac_word" >&5
4678 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4679   echo $ac_n "(cached) $ac_c" 1>&6
4680 else
4681   if test -n "$STRIP"; then
4682   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4683 else
4684   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4685   ac_dummy="$PATH"
4686   for ac_dir in $ac_dummy; do
4687     test -z "$ac_dir" && ac_dir=.
4688     if test -f $ac_dir/$ac_word; then
4689       ac_cv_prog_STRIP="strip"
4690       break
4691     fi
4692   done
4693   IFS="$ac_save_ifs"
4694   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4695 fi
4696 fi
4697 STRIP="$ac_cv_prog_STRIP"
4698 if test -n "$STRIP"; then
4699   echo "$ac_t""$STRIP" 1>&6
4700 else
4701   echo "$ac_t""no" 1>&6
4702 fi
4703
4704 else
4705   STRIP=":"
4706 fi
4707 fi
4708
4709
4710 enable_dlopen=yes
4711 enable_win32_dll=yes
4712
4713 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4714 if test "${enable_libtool_lock+set}" = set; then
4715   enableval="$enable_libtool_lock"
4716   :
4717 fi
4718
4719 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4720
4721 # Some flags need to be propagated to the compiler or linker for good
4722 # libtool support.
4723 case $host in
4724 *-*-irix6*)
4725   # Find out which ABI we are using.
4726   echo '#line 4727 "configure"' > conftest.$ac_ext
4727   if { (eval echo configure:4728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4728     case `/usr/bin/file conftest.$ac_objext` in
4729     *32-bit*)
4730       LD="${LD-ld} -32"
4731       ;;
4732     *N32*)
4733       LD="${LD-ld} -n32"
4734       ;;
4735     *64-bit*)
4736       LD="${LD-ld} -64"
4737       ;;
4738     esac
4739   fi
4740   rm -rf conftest*
4741   ;;
4742
4743 *-*-sco3.2v5*)
4744   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4745   SAVE_CFLAGS="$CFLAGS"
4746   CFLAGS="$CFLAGS -belf"
4747   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4748 echo "configure:4749: checking whether the C compiler needs -belf" >&5
4749 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4750   echo $ac_n "(cached) $ac_c" 1>&6
4751 else
4752   
4753      ac_ext=c
4754 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4755 ac_cpp='$CPP $CPPFLAGS'
4756 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4757 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4758 cross_compiling=$ac_cv_prog_cc_cross
4759
4760      cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4763
4764 int main() {
4765
4766 ; return 0; }
4767 EOF
4768 if { (eval echo configure:4769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4769   rm -rf conftest*
4770   lt_cv_cc_needs_belf=yes
4771 else
4772   echo "configure: failed program was:" >&5
4773   cat conftest.$ac_ext >&5
4774   rm -rf conftest*
4775   lt_cv_cc_needs_belf=no
4776 fi
4777 rm -f conftest*
4778      ac_ext=c
4779 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4780 ac_cpp='$CPP $CPPFLAGS'
4781 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4782 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4783 cross_compiling=$ac_cv_prog_cc_cross
4784
4785 fi
4786
4787 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4788   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4789     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4790     CFLAGS="$SAVE_CFLAGS"
4791   fi
4792   ;;
4793
4794 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4795   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4796 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4797 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4798 echo "configure:4799: checking for $ac_word" >&5
4799 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4800   echo $ac_n "(cached) $ac_c" 1>&6
4801 else
4802   if test -n "$DLLTOOL"; then
4803   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4804 else
4805   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4806   ac_dummy="$PATH"
4807   for ac_dir in $ac_dummy; do
4808     test -z "$ac_dir" && ac_dir=.
4809     if test -f $ac_dir/$ac_word; then
4810       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4811       break
4812     fi
4813   done
4814   IFS="$ac_save_ifs"
4815 fi
4816 fi
4817 DLLTOOL="$ac_cv_prog_DLLTOOL"
4818 if test -n "$DLLTOOL"; then
4819   echo "$ac_t""$DLLTOOL" 1>&6
4820 else
4821   echo "$ac_t""no" 1>&6
4822 fi
4823
4824
4825 if test -z "$ac_cv_prog_DLLTOOL"; then
4826 if test -n "$ac_tool_prefix"; then
4827   # Extract the first word of "dlltool", so it can be a program name with args.
4828 set dummy dlltool; ac_word=$2
4829 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4830 echo "configure:4831: checking for $ac_word" >&5
4831 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4832   echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4834   if test -n "$DLLTOOL"; then
4835   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4836 else
4837   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4838   ac_dummy="$PATH"
4839   for ac_dir in $ac_dummy; do
4840     test -z "$ac_dir" && ac_dir=.
4841     if test -f $ac_dir/$ac_word; then
4842       ac_cv_prog_DLLTOOL="dlltool"
4843       break
4844     fi
4845   done
4846   IFS="$ac_save_ifs"
4847   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4848 fi
4849 fi
4850 DLLTOOL="$ac_cv_prog_DLLTOOL"
4851 if test -n "$DLLTOOL"; then
4852   echo "$ac_t""$DLLTOOL" 1>&6
4853 else
4854   echo "$ac_t""no" 1>&6
4855 fi
4856
4857 else
4858   DLLTOOL="false"
4859 fi
4860 fi
4861
4862   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4863 set dummy ${ac_tool_prefix}as; ac_word=$2
4864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4865 echo "configure:4866: checking for $ac_word" >&5
4866 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4867   echo $ac_n "(cached) $ac_c" 1>&6
4868 else
4869   if test -n "$AS"; then
4870   ac_cv_prog_AS="$AS" # Let the user override the test.
4871 else
4872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4873   ac_dummy="$PATH"
4874   for ac_dir in $ac_dummy; do
4875     test -z "$ac_dir" && ac_dir=.
4876     if test -f $ac_dir/$ac_word; then
4877       ac_cv_prog_AS="${ac_tool_prefix}as"
4878       break
4879     fi
4880   done
4881   IFS="$ac_save_ifs"
4882 fi
4883 fi
4884 AS="$ac_cv_prog_AS"
4885 if test -n "$AS"; then
4886   echo "$ac_t""$AS" 1>&6
4887 else
4888   echo "$ac_t""no" 1>&6
4889 fi
4890
4891
4892 if test -z "$ac_cv_prog_AS"; then
4893 if test -n "$ac_tool_prefix"; then
4894   # Extract the first word of "as", so it can be a program name with args.
4895 set dummy as; ac_word=$2
4896 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4897 echo "configure:4898: checking for $ac_word" >&5
4898 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4899   echo $ac_n "(cached) $ac_c" 1>&6
4900 else
4901   if test -n "$AS"; then
4902   ac_cv_prog_AS="$AS" # Let the user override the test.
4903 else
4904   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4905   ac_dummy="$PATH"
4906   for ac_dir in $ac_dummy; do
4907     test -z "$ac_dir" && ac_dir=.
4908     if test -f $ac_dir/$ac_word; then
4909       ac_cv_prog_AS="as"
4910       break
4911     fi
4912   done
4913   IFS="$ac_save_ifs"
4914   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4915 fi
4916 fi
4917 AS="$ac_cv_prog_AS"
4918 if test -n "$AS"; then
4919   echo "$ac_t""$AS" 1>&6
4920 else
4921   echo "$ac_t""no" 1>&6
4922 fi
4923
4924 else
4925   AS="false"
4926 fi
4927 fi
4928
4929   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4930 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4932 echo "configure:4933: checking for $ac_word" >&5
4933 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4934   echo $ac_n "(cached) $ac_c" 1>&6
4935 else
4936   if test -n "$OBJDUMP"; then
4937   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4938 else
4939   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4940   ac_dummy="$PATH"
4941   for ac_dir in $ac_dummy; do
4942     test -z "$ac_dir" && ac_dir=.
4943     if test -f $ac_dir/$ac_word; then
4944       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4945       break
4946     fi
4947   done
4948   IFS="$ac_save_ifs"
4949 fi
4950 fi
4951 OBJDUMP="$ac_cv_prog_OBJDUMP"
4952 if test -n "$OBJDUMP"; then
4953   echo "$ac_t""$OBJDUMP" 1>&6
4954 else
4955   echo "$ac_t""no" 1>&6
4956 fi
4957
4958
4959 if test -z "$ac_cv_prog_OBJDUMP"; then
4960 if test -n "$ac_tool_prefix"; then
4961   # Extract the first word of "objdump", so it can be a program name with args.
4962 set dummy objdump; ac_word=$2
4963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4964 echo "configure:4965: checking for $ac_word" >&5
4965 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4966   echo $ac_n "(cached) $ac_c" 1>&6
4967 else
4968   if test -n "$OBJDUMP"; then
4969   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4970 else
4971   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4972   ac_dummy="$PATH"
4973   for ac_dir in $ac_dummy; do
4974     test -z "$ac_dir" && ac_dir=.
4975     if test -f $ac_dir/$ac_word; then
4976       ac_cv_prog_OBJDUMP="objdump"
4977       break
4978     fi
4979   done
4980   IFS="$ac_save_ifs"
4981   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4982 fi
4983 fi
4984 OBJDUMP="$ac_cv_prog_OBJDUMP"
4985 if test -n "$OBJDUMP"; then
4986   echo "$ac_t""$OBJDUMP" 1>&6
4987 else
4988   echo "$ac_t""no" 1>&6
4989 fi
4990
4991 else
4992   OBJDUMP="false"
4993 fi
4994 fi
4995
4996
4997   # recent cygwin and mingw systems supply a stub DllMain which the user
4998   # can override, but on older systems we have to supply one
4999   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
5000 echo "configure:5001: checking if libtool should supply DllMain function" >&5
5001 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
5002   echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004   cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007
5008 int main() {
5009 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
5010       DllMain (0, 0, 0);
5011 ; return 0; }
5012 EOF
5013 if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5014   rm -rf conftest*
5015   lt_cv_need_dllmain=no
5016 else
5017   echo "configure: failed program was:" >&5
5018   cat conftest.$ac_ext >&5
5019   rm -rf conftest*
5020   lt_cv_need_dllmain=yes
5021 fi
5022 rm -f conftest*
5023 fi
5024
5025 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
5026
5027   case $host/$CC in
5028   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
5029     # old mingw systems require "-dll" to link a DLL, while more recent ones
5030     # require "-mdll"
5031     SAVE_CFLAGS="$CFLAGS"
5032     CFLAGS="$CFLAGS -mdll"
5033     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
5034 echo "configure:5035: checking how to link DLLs" >&5
5035 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
5036   echo $ac_n "(cached) $ac_c" 1>&6
5037 else
5038   cat > conftest.$ac_ext <<EOF
5039 #line 5040 "configure"
5040 #include "confdefs.h"
5041
5042 int main() {
5043
5044 ; return 0; }
5045 EOF
5046 if { (eval echo configure:5047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5047   rm -rf conftest*
5048   lt_cv_cc_dll_switch=-mdll
5049 else
5050   echo "configure: failed program was:" >&5
5051   cat conftest.$ac_ext >&5
5052   rm -rf conftest*
5053   lt_cv_cc_dll_switch=-dll
5054 fi
5055 rm -f conftest*
5056 fi
5057
5058 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
5059     CFLAGS="$SAVE_CFLAGS" ;;
5060   *-*-cygwin* | *-*-pw32*)
5061     # cygwin systems need to pass --dll to the linker, and not link
5062     # crt.o which will require a WinMain@16 definition.
5063     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
5064   esac
5065   ;;
5066   
5067 esac
5068
5069 # Sed substitution that helps us do robust quoting.  It backslashifies
5070 # metacharacters that are still active within double-quoted strings.
5071 Xsed='sed -e s/^X//'
5072 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
5073
5074 # Same as above, but do not quote variable references.
5075 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
5076
5077 # Sed substitution to delay expansion of an escaped shell variable in a
5078 # double_quote_subst'ed string.
5079 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
5080
5081 # Constants:
5082 rm="rm -f"
5083
5084 # Global variables:
5085 default_ofile=libtool
5086 can_build_shared=yes
5087
5088 # All known linkers require a `.a' archive for static linking (except M$VC,
5089 # which needs '.lib').
5090 libext=a
5091 ltmain="$ac_aux_dir/ltmain.sh"
5092 ofile="$default_ofile"
5093 with_gnu_ld="$lt_cv_prog_gnu_ld"
5094 need_locks="$enable_libtool_lock"
5095
5096 old_CC="$CC"
5097 old_CFLAGS="$CFLAGS"
5098
5099 # Set sane defaults for various variables
5100 test -z "$AR" && AR=ar
5101 test -z "$AR_FLAGS" && AR_FLAGS=cru
5102 test -z "$AS" && AS=as
5103 test -z "$CC" && CC=cc
5104 test -z "$DLLTOOL" && DLLTOOL=dlltool
5105 test -z "$LD" && LD=ld
5106 test -z "$LN_S" && LN_S="ln -s"
5107 test -z "$MAGIC_CMD" && MAGIC_CMD=file
5108 test -z "$NM" && NM=nm
5109 test -z "$OBJDUMP" && OBJDUMP=objdump
5110 test -z "$RANLIB" && RANLIB=:
5111 test -z "$STRIP" && STRIP=:
5112 test -z "$ac_objext" && ac_objext=o
5113
5114 if test x"$host" != x"$build"; then
5115   ac_tool_prefix=${host_alias}-
5116 else
5117   ac_tool_prefix=
5118 fi
5119
5120 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
5121 case $host_os in
5122 linux-gnu*) ;;
5123 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
5124 esac
5125
5126 case $host_os in
5127 aix3*)
5128   # AIX sometimes has problems with the GCC collect2 program.  For some
5129   # reason, if we set the COLLECT_NAMES environment variable, the problems
5130   # vanish in a puff of smoke.
5131   if test "X${COLLECT_NAMES+set}" != Xset; then
5132     COLLECT_NAMES=
5133     export COLLECT_NAMES
5134   fi
5135   ;;
5136 esac
5137
5138 # Determine commands to create old-style static archives.
5139 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5140 old_postinstall_cmds='chmod 644 $oldlib'
5141 old_postuninstall_cmds=
5142
5143 if test -n "$RANLIB"; then
5144   case $host_os in
5145   openbsd*)
5146     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5147     ;;
5148   *)
5149     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5150     ;;
5151   esac
5152   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5153 fi
5154
5155 # Allow CC to be a program name with arguments.
5156 set dummy $CC
5157 compiler="$2"
5158
5159 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5160 echo "configure:5161: checking for objdir" >&5
5161 rm -f .libs 2>/dev/null
5162 mkdir .libs 2>/dev/null
5163 if test -d .libs; then
5164   objdir=.libs
5165 else
5166   # MS-DOS does not allow filenames that begin with a dot.
5167   objdir=_libs
5168 fi
5169 rmdir .libs 2>/dev/null
5170 echo "$ac_t""$objdir" 1>&6
5171
5172
5173 # Check whether --with-pic or --without-pic was given.
5174 if test "${with_pic+set}" = set; then
5175   withval="$with_pic"
5176   pic_mode="$withval"
5177 else
5178   pic_mode=default
5179 fi
5180
5181 test -z "$pic_mode" && pic_mode=default
5182
5183 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5184 # in isolation, and that seeing it set (from the cache) indicates that
5185 # the associated values are set (in the cache) correctly too.
5186 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5187 echo "configure:5188: checking for $compiler option to produce PIC" >&5
5188 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5189   echo $ac_n "(cached) $ac_c" 1>&6
5190 else
5191    lt_cv_prog_cc_pic=
5192   lt_cv_prog_cc_shlib=
5193   lt_cv_prog_cc_wl=
5194   lt_cv_prog_cc_static=
5195   lt_cv_prog_cc_no_builtin=
5196   lt_cv_prog_cc_can_build_shared=$can_build_shared
5197
5198   if test "$GCC" = yes; then
5199     lt_cv_prog_cc_wl='-Wl,'
5200     lt_cv_prog_cc_static='-static'
5201
5202     case $host_os in
5203     aix*)
5204       # Below there is a dirty hack to force normal static linking with -ldl
5205       # The problem is because libdl dynamically linked with both libc and
5206       # libC (AIX C++ library), which obviously doesn't included in libraries
5207       # list by gcc. This cause undefined symbols with -static flags.
5208       # This hack allows C programs to be linked with "-static -ldl", but
5209       # not sure about C++ programs.
5210       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5211       ;;
5212     amigaos*)
5213       # FIXME: we need at least 68020 code to build shared libraries, but
5214       # adding the `-m68020' flag to GCC prevents building anything better,
5215       # like `-m68040'.
5216       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5217       ;;
5218     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5219       # PIC is the default for these OSes.
5220       ;;
5221     darwin* | rhapsody*)
5222       # PIC is the default on this platform
5223       # Common symbols not allowed in MH_DYLIB files
5224       lt_cv_prog_cc_pic='-fno-common'
5225       ;;
5226     cygwin* | mingw* | pw32* | os2*)
5227       # This hack is so that the source file can tell whether it is being
5228       # built for inclusion in a dll (and should export symbols for example).
5229       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5230       ;;
5231     sysv4*MP*)
5232       if test -d /usr/nec; then
5233          lt_cv_prog_cc_pic=-Kconform_pic
5234       fi
5235       ;;
5236     *)
5237       lt_cv_prog_cc_pic='-fPIC'
5238       ;;
5239     esac
5240   else
5241     # PORTME Check for PIC flags for the system compiler.
5242     case $host_os in
5243     aix3* | aix4* | aix5*)
5244       lt_cv_prog_cc_wl='-Wl,'
5245       # All AIX code is PIC.
5246       if test "$host_cpu" = ia64; then
5247         # AIX 5 now supports IA64 processor
5248         lt_cv_prog_cc_static='-Bstatic'
5249       else
5250         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5251       fi
5252       ;;
5253
5254     hpux9* | hpux10* | hpux11*)
5255       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5256       lt_cv_prog_cc_wl='-Wl,'
5257       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5258       lt_cv_prog_cc_pic='+Z'
5259       ;;
5260
5261     irix5* | irix6* | nonstopux*)
5262       lt_cv_prog_cc_wl='-Wl,'
5263       lt_cv_prog_cc_static='-non_shared'
5264       # PIC (with -KPIC) is the default.
5265       ;;
5266
5267     cygwin* | mingw* | pw32* | os2*)
5268       # This hack is so that the source file can tell whether it is being
5269       # built for inclusion in a dll (and should export symbols for example).
5270       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5271       ;;
5272
5273     newsos6)
5274       lt_cv_prog_cc_pic='-KPIC'
5275       lt_cv_prog_cc_static='-Bstatic'
5276       ;;
5277     
5278     openedition)
5279       # XPLINK code is PIC by default
5280       ;;
5281
5282     osf3* | osf4* | osf5*)
5283       # All OSF/1 code is PIC.
5284       lt_cv_prog_cc_wl='-Wl,'
5285       lt_cv_prog_cc_static='-non_shared'
5286       ;;
5287
5288     sco3.2v5*)
5289       lt_cv_prog_cc_pic='-Kpic'
5290       lt_cv_prog_cc_static='-dn'
5291       lt_cv_prog_cc_shlib='-belf'
5292       ;;
5293
5294     solaris*)
5295       lt_cv_prog_cc_pic='-KPIC'
5296       lt_cv_prog_cc_static='-Bstatic'
5297       lt_cv_prog_cc_wl='-Wl,'
5298       ;;
5299
5300     sunos4*)
5301       lt_cv_prog_cc_pic='-PIC'
5302       lt_cv_prog_cc_static='-Bstatic'
5303       lt_cv_prog_cc_wl='-Qoption ld '
5304       ;;
5305
5306     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5307       lt_cv_prog_cc_pic='-KPIC'
5308       lt_cv_prog_cc_static='-Bstatic'
5309       lt_cv_prog_cc_wl='-Wl,'
5310       ;;
5311
5312     uts4*)
5313       lt_cv_prog_cc_pic='-pic'
5314       lt_cv_prog_cc_static='-Bstatic'
5315       ;;
5316
5317     sysv4*MP*)
5318       if test -d /usr/nec ;then
5319         lt_cv_prog_cc_pic='-Kconform_pic'
5320         lt_cv_prog_cc_static='-Bstatic'
5321       fi
5322       ;;
5323
5324     *)
5325       lt_cv_prog_cc_can_build_shared=no
5326       ;;
5327     esac
5328   fi
5329
5330 fi
5331
5332 if test -z "$lt_cv_prog_cc_pic"; then
5333   echo "$ac_t""none" 1>&6
5334 else
5335   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5336
5337   # Check to make sure the pic_flag actually works.
5338   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5339 echo "configure:5340: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5340   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5341   echo $ac_n "(cached) $ac_c" 1>&6
5342 else
5343       save_CFLAGS="$CFLAGS"
5344     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5345     cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348
5349 int main() {
5350
5351 ; return 0; }
5352 EOF
5353 if { (eval echo configure:5354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5354   rm -rf conftest*
5355         case $host_os in
5356       hpux9* | hpux10* | hpux11*)
5357         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5358         # they create non-PIC objects.  So, if there were any warnings, we
5359         # assume that PIC is not supported.
5360         if test -s conftest.err; then
5361           lt_cv_prog_cc_pic_works=no
5362         else
5363           lt_cv_prog_cc_pic_works=yes
5364         fi
5365         ;;
5366       *)
5367         lt_cv_prog_cc_pic_works=yes
5368         ;;
5369       esac
5370     
5371 else
5372   echo "configure: failed program was:" >&5
5373   cat conftest.$ac_ext >&5
5374   rm -rf conftest*
5375         lt_cv_prog_cc_pic_works=no
5376     
5377 fi
5378 rm -f conftest*
5379     CFLAGS="$save_CFLAGS"
5380   
5381 fi
5382
5383
5384   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5385     lt_cv_prog_cc_pic=
5386     lt_cv_prog_cc_can_build_shared=no
5387   else
5388     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5389   fi
5390
5391   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5392 fi
5393
5394 # Check for any special shared library compilation flags.
5395 if test -n "$lt_cv_prog_cc_shlib"; then
5396   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5397   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5398   else
5399    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5400     lt_cv_prog_cc_can_build_shared=no
5401   fi
5402 fi
5403
5404 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5405 echo "configure:5406: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5406 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5407   echo $ac_n "(cached) $ac_c" 1>&6
5408 else
5409     lt_cv_prog_cc_static_works=no
5410   save_LDFLAGS="$LDFLAGS"
5411   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5412   cat > conftest.$ac_ext <<EOF
5413 #line 5414 "configure"
5414 #include "confdefs.h"
5415
5416 int main() {
5417
5418 ; return 0; }
5419 EOF
5420 if { (eval echo configure:5421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5421   rm -rf conftest*
5422   lt_cv_prog_cc_static_works=yes
5423 else
5424   echo "configure: failed program was:" >&5
5425   cat conftest.$ac_ext >&5
5426 fi
5427 rm -f conftest*
5428   LDFLAGS="$save_LDFLAGS"
5429
5430 fi
5431
5432
5433 # Belt *and* braces to stop my trousers falling down:
5434 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5435 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5436
5437 pic_flag="$lt_cv_prog_cc_pic"
5438 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5439 wl="$lt_cv_prog_cc_wl"
5440 link_static_flag="$lt_cv_prog_cc_static"
5441 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5442 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5443
5444
5445 # Check to see if options -o and -c are simultaneously supported by compiler
5446 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5447 echo "configure:5448: checking if $compiler supports -c -o file.$ac_objext" >&5
5448 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5449   echo $ac_n "(cached) $ac_c" 1>&6
5450 else
5451   
5452 $rm -r conftest 2>/dev/null
5453 mkdir conftest
5454 cd conftest
5455 echo "int some_variable = 0;" > conftest.$ac_ext
5456 mkdir out
5457 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5458 # that will create temporary files in the current directory regardless of
5459 # the output directory.  Thus, making CWD read-only will cause this test
5460 # to fail, enabling locking or at least warning the user not to do parallel
5461 # builds.
5462 chmod -w .
5463 save_CFLAGS="$CFLAGS"
5464 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5465 compiler_c_o=no
5466 if { (eval echo configure:5467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5467   # The compiler can only warn and ignore the option if not recognized
5468   # So say no if there are warnings
5469   if test -s out/conftest.err; then
5470     lt_cv_compiler_c_o=no
5471   else
5472     lt_cv_compiler_c_o=yes
5473   fi
5474 else
5475   # Append any errors to the config.log.
5476   cat out/conftest.err 1>&5
5477   lt_cv_compiler_c_o=no
5478 fi
5479 CFLAGS="$save_CFLAGS"
5480 chmod u+w .
5481 $rm conftest* out/*
5482 rmdir out
5483 cd ..
5484 rmdir conftest
5485 $rm -r conftest 2>/dev/null
5486
5487 fi
5488
5489 compiler_c_o=$lt_cv_compiler_c_o
5490 echo "$ac_t""$compiler_c_o" 1>&6
5491
5492 if test x"$compiler_c_o" = x"yes"; then
5493   # Check to see if we can write to a .lo
5494   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5495 echo "configure:5496: checking if $compiler supports -c -o file.lo" >&5
5496   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5497   echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499   
5500   lt_cv_compiler_o_lo=no
5501   save_CFLAGS="$CFLAGS"
5502   CFLAGS="$CFLAGS -c -o conftest.lo"
5503   save_objext="$ac_objext"
5504   ac_objext=lo
5505   cat > conftest.$ac_ext <<EOF
5506 #line 5507 "configure"
5507 #include "confdefs.h"
5508
5509 int main() {
5510 int some_variable = 0;
5511 ; return 0; }
5512 EOF
5513 if { (eval echo configure:5514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5514   rm -rf conftest*
5515       # The compiler can only warn and ignore the option if not recognized
5516     # So say no if there are warnings
5517     if test -s conftest.err; then
5518       lt_cv_compiler_o_lo=no
5519     else
5520       lt_cv_compiler_o_lo=yes
5521     fi
5522   
5523 else
5524   echo "configure: failed program was:" >&5
5525   cat conftest.$ac_ext >&5
5526 fi
5527 rm -f conftest*
5528   ac_objext="$save_objext"
5529   CFLAGS="$save_CFLAGS"
5530   
5531 fi
5532
5533   compiler_o_lo=$lt_cv_compiler_o_lo
5534   echo "$ac_t""$compiler_o_lo" 1>&6
5535 else
5536   compiler_o_lo=no
5537 fi
5538
5539 # Check to see if we can do hard links to lock some files if needed
5540 hard_links="nottested"
5541 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5542   # do not overwrite the value of need_locks provided by the user
5543   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5544 echo "configure:5545: checking if we can lock with hard links" >&5
5545   hard_links=yes
5546   $rm conftest*
5547   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5548   touch conftest.a
5549   ln conftest.a conftest.b 2>&5 || hard_links=no
5550   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5551   echo "$ac_t""$hard_links" 1>&6
5552   if test "$hard_links" = no; then
5553     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5554     need_locks=warn
5555   fi
5556 else
5557   need_locks=no
5558 fi
5559
5560 if test "$GCC" = yes; then
5561   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5562   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5563 echo "configure:5564: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5564   echo "int some_variable = 0;" > conftest.$ac_ext
5565   save_CFLAGS="$CFLAGS"
5566   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5567   compiler_rtti_exceptions=no
5568   cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571
5572 int main() {
5573 int some_variable = 0;
5574 ; return 0; }
5575 EOF
5576 if { (eval echo configure:5577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5577   rm -rf conftest*
5578       # The compiler can only warn and ignore the option if not recognized
5579     # So say no if there are warnings
5580     if test -s conftest.err; then
5581       compiler_rtti_exceptions=no
5582     else
5583       compiler_rtti_exceptions=yes
5584     fi
5585   
5586 else
5587   echo "configure: failed program was:" >&5
5588   cat conftest.$ac_ext >&5
5589 fi
5590 rm -f conftest*
5591   CFLAGS="$save_CFLAGS"
5592   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5593
5594   if test "$compiler_rtti_exceptions" = "yes"; then
5595     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5596   else
5597     no_builtin_flag=' -fno-builtin'
5598   fi
5599 fi
5600
5601 # See if the linker supports building shared libraries.
5602 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5603 echo "configure:5604: checking whether the linker ($LD) supports shared libraries" >&5
5604
5605 allow_undefined_flag=
5606 no_undefined_flag=
5607 need_lib_prefix=unknown
5608 need_version=unknown
5609 # when you set need_version to no, make sure it does not cause -set_version
5610 # flags to be left without arguments
5611 archive_cmds=
5612 archive_expsym_cmds=
5613 old_archive_from_new_cmds=
5614 old_archive_from_expsyms_cmds=
5615 export_dynamic_flag_spec=
5616 whole_archive_flag_spec=
5617 thread_safe_flag_spec=
5618 hardcode_into_libs=no
5619 hardcode_libdir_flag_spec=
5620 hardcode_libdir_separator=
5621 hardcode_direct=no
5622 hardcode_minus_L=no
5623 hardcode_shlibpath_var=unsupported
5624 runpath_var=
5625 link_all_deplibs=unknown
5626 always_export_symbols=no
5627 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5628 # include_expsyms should be a list of space-separated symbols to be *always*
5629 # included in the symbol list
5630 include_expsyms=
5631 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5632 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5633 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5634 # as well as any symbol that contains `d'.
5635 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5636 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5637 # platforms (ab)use it in PIC code, but their linkers get confused if
5638 # the symbol is explicitly referenced.  Since portable code cannot
5639 # rely on this symbol name, it's probably fine to never include it in
5640 # preloaded symbol tables.
5641 extract_expsyms_cmds=
5642
5643 case $host_os in
5644 cygwin* | mingw* | pw32*)
5645   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5646   # When not using gcc, we currently assume that we are using
5647   # Microsoft Visual C++.
5648   if test "$GCC" != yes; then
5649     with_gnu_ld=no
5650   fi
5651   ;;
5652 openbsd*)
5653   with_gnu_ld=no
5654   ;;
5655 esac
5656
5657 ld_shlibs=yes
5658 if test "$with_gnu_ld" = yes; then
5659   # If archive_cmds runs LD, not CC, wlarc should be empty
5660   wlarc='${wl}'
5661
5662   # See if GNU ld supports shared libraries.
5663   case $host_os in
5664   aix3* | aix4* | aix5*)
5665     # On AIX, the GNU linker is very broken
5666     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5667     ld_shlibs=no
5668     cat <<EOF 1>&2
5669
5670 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5671 *** to be unable to reliably create shared libraries on AIX.
5672 *** Therefore, libtool is disabling shared libraries support.  If you
5673 *** really care for shared libraries, you may want to modify your PATH
5674 *** so that a non-GNU linker is found, and then restart.
5675
5676 EOF
5677     ;;
5678
5679   amigaos*)
5680     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)'
5681     hardcode_libdir_flag_spec='-L$libdir'
5682     hardcode_minus_L=yes
5683
5684     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5685     # that the semantics of dynamic libraries on AmigaOS, at least up
5686     # to version 4, is to share data among multiple programs linked
5687     # with the same dynamic library.  Since this doesn't match the
5688     # behavior of shared libraries on other platforms, we can use
5689     # them.
5690     ld_shlibs=no
5691     ;;
5692
5693   beos*)
5694     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5695       allow_undefined_flag=unsupported
5696       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5697       # support --undefined.  This deserves some investigation.  FIXME
5698       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5699     else
5700       ld_shlibs=no
5701     fi
5702     ;;
5703
5704   cygwin* | mingw* | pw32*)
5705     # hardcode_libdir_flag_spec is actually meaningless, as there is
5706     # no search path for DLLs.
5707     hardcode_libdir_flag_spec='-L$libdir'
5708     allow_undefined_flag=unsupported
5709     always_export_symbols=yes
5710
5711     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5712       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5713       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5714       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5715       else $CC -o impgen impgen.c ; fi)~
5716       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5717
5718     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5719
5720     # cygwin and mingw dlls have different entry points and sets of symbols
5721     # to exclude.
5722     # FIXME: what about values for MSVC?
5723     dll_entry=__cygwin_dll_entry@12
5724     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5725     case $host_os in
5726     mingw*)
5727       # mingw values
5728       dll_entry=_DllMainCRTStartup@12
5729       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5730       ;;
5731     esac
5732
5733     # mingw and cygwin differ, and it's simplest to just exclude the union
5734     # of the two symbol sets.
5735     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5736
5737     # recent cygwin and mingw systems supply a stub DllMain which the user
5738     # can override, but on older systems we have to supply one (in ltdll.c)
5739     if test "x$lt_cv_need_dllmain" = "xyes"; then
5740       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5741       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~
5742         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5743     else
5744       ltdll_obj=
5745       ltdll_cmds=
5746     fi
5747
5748     # Extract the symbol export list from an `--export-all' def file,
5749     # then regenerate the def file from the symbol export list, so that
5750     # the compiled dll only exports the symbol export list.
5751     # Be careful not to strip the DATA tag left be newer dlltools.
5752     export_symbols_cmds="$ltdll_cmds"'
5753       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5754       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5755
5756     # If the export-symbols file already is a .def file (1st line
5757     # is EXPORTS), use it as is.
5758     # If DATA tags from a recent dlltool are present, honour them!
5759     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5760         cp $export_symbols $output_objdir/$soname-def;
5761       else
5762         echo EXPORTS > $output_objdir/$soname-def;
5763         _lt_hint=1;
5764         cat $export_symbols | while read symbol; do
5765          set dummy \$symbol;
5766          case \$# in
5767            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5768            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5769            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5770          esac;
5771          _lt_hint=`expr 1 + \$_lt_hint`;
5772         done;
5773       fi~
5774       '"$ltdll_cmds"'
5775       $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~
5776       $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~
5777       $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~
5778       $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~
5779       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5780     ;;
5781
5782   netbsd*)
5783     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5784       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5785       wlarc=
5786     else
5787       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5788       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5789     fi
5790     ;;
5791
5792   solaris* | sysv5*)
5793     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5794       ld_shlibs=no
5795       cat <<EOF 1>&2
5796
5797 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5798 *** create shared libraries on Solaris systems.  Therefore, libtool
5799 *** is disabling shared libraries support.  We urge you to upgrade GNU
5800 *** binutils to release 2.9.1 or newer.  Another option is to modify
5801 *** your PATH or compiler configuration so that the native linker is
5802 *** used, and then restart.
5803
5804 EOF
5805     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5806       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5807       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5808     else
5809       ld_shlibs=no
5810     fi
5811     ;;
5812
5813   sunos4*)
5814     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5815     wlarc=
5816     hardcode_direct=yes
5817     hardcode_shlibpath_var=no
5818     ;;
5819
5820   *)
5821     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5822       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5823       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5824     else
5825       ld_shlibs=no
5826     fi
5827     ;;
5828   esac
5829
5830   if test "$ld_shlibs" = yes; then
5831     runpath_var=LD_RUN_PATH
5832     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5833     export_dynamic_flag_spec='${wl}--export-dynamic'
5834     case $host_os in
5835     cygwin* | mingw* | pw32*)
5836       # dlltool doesn't understand --whole-archive et. al.
5837       whole_archive_flag_spec=
5838       ;;
5839     *)
5840       # ancient GNU ld didn't support --whole-archive et. al.
5841       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5842         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5843       else
5844         whole_archive_flag_spec=
5845       fi
5846       ;;
5847     esac
5848   fi
5849 else
5850   # PORTME fill in a description of your system's linker (not GNU ld)
5851   case $host_os in
5852   aix3*)
5853     allow_undefined_flag=unsupported
5854     always_export_symbols=yes
5855     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'
5856     # Note: this linker hardcodes the directories in LIBPATH if there
5857     # are no directories specified by -L.
5858     hardcode_minus_L=yes
5859     if test "$GCC" = yes && test -z "$link_static_flag"; then
5860       # Neither direct hardcoding nor static linking is supported with a
5861       # broken collect2.
5862       hardcode_direct=unsupported
5863     fi
5864     ;;
5865
5866   aix4* | aix5*)
5867     if test "$host_cpu" = ia64; then
5868       # On IA64, the linker does run time linking by default, so we don't
5869       # have to do anything special.
5870       aix_use_runtimelinking=no
5871       exp_sym_flag='-Bexport'
5872       no_entry_flag=""
5873     else
5874       aix_use_runtimelinking=no
5875
5876       # Test if we are trying to use run time linking or normal
5877       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5878       # need to do runtime linking.
5879       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5880         for ld_flag in $LDFLAGS; do
5881           case $ld_flag in
5882           *-brtl*)
5883             aix_use_runtimelinking=yes
5884             break
5885           ;;
5886           esac
5887         done
5888       esac
5889
5890       exp_sym_flag='-bexport'
5891       no_entry_flag='-bnoentry'
5892     fi
5893
5894     # When large executables or shared objects are built, AIX ld can
5895     # have problems creating the table of contents.  If linking a library
5896     # or program results in "error TOC overflow" add -mminimal-toc to
5897     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5898     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5899
5900     hardcode_direct=yes
5901     archive_cmds=''
5902     hardcode_libdir_separator=':'
5903     if test "$GCC" = yes; then
5904       case $host_os in aix4.[012]|aix4.[012].*)
5905         collect2name=`${CC} -print-prog-name=collect2`
5906         if test -f "$collect2name" && \
5907           strings "$collect2name" | grep resolve_lib_name >/dev/null
5908         then
5909           # We have reworked collect2
5910           hardcode_direct=yes
5911         else
5912           # We have old collect2
5913           hardcode_direct=unsupported
5914           # It fails to find uninstalled libraries when the uninstalled
5915           # path is not listed in the libpath.  Setting hardcode_minus_L
5916           # to unsupported forces relinking
5917           hardcode_minus_L=yes
5918           hardcode_libdir_flag_spec='-L$libdir'
5919           hardcode_libdir_separator=
5920         fi
5921       esac
5922
5923       shared_flag='-shared'
5924     else
5925       # not using gcc
5926       if test "$host_cpu" = ia64; then
5927         shared_flag='${wl}-G'
5928       else
5929         if test "$aix_use_runtimelinking" = yes; then
5930           shared_flag='${wl}-G'
5931         else
5932           shared_flag='${wl}-bM:SRE'
5933         fi
5934       fi
5935     fi
5936
5937     # It seems that -bexpall can do strange things, so it is better to
5938     # generate a list of symbols to export.
5939     always_export_symbols=yes
5940     if test "$aix_use_runtimelinking" = yes; then
5941       # Warning - without using the other runtime loading flags (-brtl),
5942       # -berok will link without error, but may produce a broken library.
5943       allow_undefined_flag='-berok'
5944       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5945       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"
5946     else
5947       if test "$host_cpu" = ia64; then
5948         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5949         allow_undefined_flag="-z nodefs"
5950         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"
5951       else
5952         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5953         # Warning - without using the other run time loading flags,
5954         # -berok will link without error, but may produce a broken library.
5955         allow_undefined_flag='${wl}-berok'
5956         # This is a bit strange, but is similar to how AIX traditionally builds
5957         # it's shared libraries.
5958         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'
5959       fi
5960     fi
5961     ;;
5962
5963   amigaos*)
5964     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)'
5965     hardcode_libdir_flag_spec='-L$libdir'
5966     hardcode_minus_L=yes
5967     # see comment about different semantics on the GNU ld section
5968     ld_shlibs=no
5969     ;;
5970
5971   cygwin* | mingw* | pw32*)
5972     # When not using gcc, we currently assume that we are using
5973     # Microsoft Visual C++.
5974     # hardcode_libdir_flag_spec is actually meaningless, as there is
5975     # no search path for DLLs.
5976     hardcode_libdir_flag_spec=' '
5977     allow_undefined_flag=unsupported
5978     # Tell ltmain to make .lib files, not .a files.
5979     libext=lib
5980     # FIXME: Setting linknames here is a bad hack.
5981     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5982     # The linker will automatically build a .lib file if we build a DLL.
5983     old_archive_from_new_cmds='true'
5984     # FIXME: Should let the user specify the lib program.
5985     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5986     fix_srcfile_path='`cygpath -w "$srcfile"`'
5987     ;;
5988
5989   darwin* | rhapsody*)
5990     case "$host_os" in
5991     rhapsody* | darwin1.[012])
5992       allow_undefined_flag='-undefined suppress'
5993       ;;
5994     *) # Darwin 1.3 on
5995       allow_undefined_flag='-flat_namespace -undefined suppress'
5996       ;;
5997     esac
5998     # FIXME: Relying on posixy $() will cause problems for
5999     #        cross-compilation, but unfortunately the echo tests do not
6000     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6001     #        `"' quotes if we put them in here... so don't!
6002     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)'
6003     # We need to add '_' to the symbols in $export_symbols first
6004     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
6005     hardcode_direct=yes
6006     hardcode_shlibpath_var=no
6007     whole_archive_flag_spec='-all_load $convenience'
6008     ;;
6009
6010   freebsd1*)
6011     ld_shlibs=no
6012     ;;
6013
6014   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6015   # support.  Future versions do this automatically, but an explicit c++rt0.o
6016   # does not break anything, and helps significantly (at the cost of a little
6017   # extra space).
6018   freebsd2.2*)
6019     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6020     hardcode_libdir_flag_spec='-R$libdir'
6021     hardcode_direct=yes
6022     hardcode_shlibpath_var=no
6023     ;;
6024
6025   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6026   freebsd2*)
6027     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6028     hardcode_direct=yes
6029     hardcode_minus_L=yes
6030     hardcode_shlibpath_var=no
6031     ;;
6032
6033   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6034   freebsd*)
6035     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6036     hardcode_libdir_flag_spec='-R$libdir'
6037     hardcode_direct=yes
6038     hardcode_shlibpath_var=no
6039     ;;
6040
6041   hpux9* | hpux10* | hpux11*)
6042     case $host_os in
6043     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' ;;
6044     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
6045     esac
6046     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
6047     hardcode_libdir_separator=:
6048     hardcode_direct=yes
6049     hardcode_minus_L=yes # Not in the search PATH, but as the default
6050                          # location of the library.
6051     export_dynamic_flag_spec='${wl}-E'
6052     ;;
6053
6054   irix5* | irix6* | nonstopux*)
6055     if test "$GCC" = yes; then
6056       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'
6057       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6058     else
6059       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'
6060       hardcode_libdir_flag_spec='-rpath $libdir'
6061     fi
6062     hardcode_libdir_separator=:
6063     link_all_deplibs=yes
6064     ;;
6065
6066   netbsd*)
6067     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6068       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6069     else
6070       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6071     fi
6072     hardcode_libdir_flag_spec='-R$libdir'
6073     hardcode_direct=yes
6074     hardcode_shlibpath_var=no
6075     ;;
6076
6077   newsos6)
6078     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6079     hardcode_direct=yes
6080     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6081     hardcode_libdir_separator=:
6082     hardcode_shlibpath_var=no
6083     ;;
6084
6085   openbsd*)
6086     hardcode_direct=yes
6087     hardcode_shlibpath_var=no
6088     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6089       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6090       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6091       export_dynamic_flag_spec='${wl}-E'
6092     else
6093       case "$host_os" in
6094       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
6095         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6096         hardcode_libdir_flag_spec='-R$libdir'
6097         ;;
6098       *)
6099         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6100         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
6101         ;;
6102       esac
6103     fi
6104     ;;
6105
6106   openedition*)
6107     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
6108         cp \$linknames \$output_objdir && linknames=''"
6109     export_dynamic_flag_spec="-Wl,DLL"
6110     ;;
6111
6112   os2*)
6113     hardcode_libdir_flag_spec='-L$libdir'
6114     hardcode_minus_L=yes
6115     allow_undefined_flag=unsupported
6116     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'
6117     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6118     ;;
6119
6120   osf3*)
6121     if test "$GCC" = yes; then
6122       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6123       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'
6124     else
6125       allow_undefined_flag=' -expect_unresolved \*'
6126       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'
6127     fi
6128     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6129     hardcode_libdir_separator=:
6130     ;;
6131
6132   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6133     if test "$GCC" = yes; then
6134       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6135       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'
6136       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6137     else
6138       allow_undefined_flag=' -expect_unresolved \*'
6139       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'
6140       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6141       $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'
6142
6143       #Both c and cxx compiler support -rpath directly
6144       hardcode_libdir_flag_spec='-rpath $libdir'
6145     fi
6146     hardcode_libdir_separator=:
6147     ;;
6148
6149   sco3.2v5*)
6150     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6151     hardcode_shlibpath_var=no
6152     runpath_var=LD_RUN_PATH
6153     hardcode_runpath_var=yes
6154     export_dynamic_flag_spec='${wl}-Bexport'
6155     ;;
6156
6157   solaris*)
6158     # gcc --version < 3.0 without binutils cannot create self contained
6159     # shared libraries reliably, requiring libgcc.a to resolve some of
6160     # the object symbols generated in some cases.  Libraries that use
6161     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6162     # a copy of libgcc.a into every shared library to guarantee resolving
6163     # such symbols causes other problems:  According to Tim Van Holder
6164     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6165     # (to the application) exception stack for one thing.
6166     no_undefined_flag=' -z defs'
6167     if test "$GCC" = yes; then
6168       case `$CC --version 2>/dev/null` in
6169       [12].*)
6170         cat <<EOF 1>&2
6171
6172 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6173 *** create self contained shared libraries on Solaris systems, without
6174 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6175 *** -no-undefined support, which will at least allow you to build shared
6176 *** libraries.  However, you may find that when you link such libraries
6177 *** into an application without using GCC, you have to manually add
6178 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6179 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6180 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6181
6182 EOF
6183         no_undefined_flag=
6184         ;;
6185       esac
6186     fi
6187     # $CC -shared without GNU ld will not create a library from C++
6188     # object files and a static libstdc++, better avoid it by now
6189     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6190     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6191                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6192     hardcode_libdir_flag_spec='-R$libdir'
6193     hardcode_shlibpath_var=no
6194     case $host_os in
6195     solaris2.[0-5] | solaris2.[0-5].*) ;;
6196     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6197       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6198     esac
6199     link_all_deplibs=yes
6200     ;;
6201
6202   sunos4*)
6203     if test "x$host_vendor" = xsequent; then
6204       # Use $CC to link under sequent, because it throws in some extra .o
6205       # files that make .init and .fini sections work.
6206       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6207     else
6208       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6209     fi
6210     hardcode_libdir_flag_spec='-L$libdir'
6211     hardcode_direct=yes
6212     hardcode_minus_L=yes
6213     hardcode_shlibpath_var=no
6214     ;;
6215
6216   sysv4)
6217     case $host_vendor in
6218       sni)
6219         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6220         hardcode_direct=yes # is this really true???
6221         ;;
6222       siemens)
6223         ## LD is ld it makes a PLAMLIB
6224         ## CC just makes a GrossModule.
6225         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6226         reload_cmds='$CC -r -o $output$reload_objs'
6227         hardcode_direct=no
6228         ;;
6229       motorola)
6230         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6231         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6232         ;;
6233     esac
6234     runpath_var='LD_RUN_PATH'
6235     hardcode_shlibpath_var=no
6236     ;;
6237
6238   sysv4.3*)
6239     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6240     hardcode_shlibpath_var=no
6241     export_dynamic_flag_spec='-Bexport'
6242     ;;
6243
6244   sysv5*)
6245     no_undefined_flag=' -z text'
6246     # $CC -shared without GNU ld will not create a library from C++
6247     # object files and a static libstdc++, better avoid it by now
6248     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6249     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6250                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6251     hardcode_libdir_flag_spec=
6252     hardcode_shlibpath_var=no
6253     runpath_var='LD_RUN_PATH'
6254     ;;
6255
6256   uts4*)
6257     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6258     hardcode_libdir_flag_spec='-L$libdir'
6259     hardcode_shlibpath_var=no
6260     ;;
6261
6262   dgux*)
6263     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6264     hardcode_libdir_flag_spec='-L$libdir'
6265     hardcode_shlibpath_var=no
6266     ;;
6267
6268   sysv4*MP*)
6269     if test -d /usr/nec; then
6270       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6271       hardcode_shlibpath_var=no
6272       runpath_var=LD_RUN_PATH
6273       hardcode_runpath_var=yes
6274       ld_shlibs=yes
6275     fi
6276     ;;
6277
6278   sysv4.2uw2*)
6279     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6280     hardcode_direct=yes
6281     hardcode_minus_L=no
6282     hardcode_shlibpath_var=no
6283     hardcode_runpath_var=yes
6284     runpath_var=LD_RUN_PATH
6285     ;;
6286
6287   sysv5uw7* | unixware7*)
6288     no_undefined_flag='${wl}-z ${wl}text'
6289     if test "$GCC" = yes; then
6290       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6291     else
6292       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6293     fi
6294     runpath_var='LD_RUN_PATH'
6295     hardcode_shlibpath_var=no
6296     ;;
6297
6298   *)
6299     ld_shlibs=no
6300     ;;
6301   esac
6302 fi
6303 echo "$ac_t""$ld_shlibs" 1>&6
6304 test "$ld_shlibs" = no && can_build_shared=no
6305
6306 # Check hardcoding attributes.
6307 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6308 echo "configure:6309: checking how to hardcode library paths into programs" >&5
6309 hardcode_action=
6310 if test -n "$hardcode_libdir_flag_spec" || \
6311    test -n "$runpath_var"; then
6312
6313   # We can hardcode non-existant directories.
6314   if test "$hardcode_direct" != no &&
6315      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6316      # have to relink, otherwise we might link with an installed library
6317      # when we should be linking with a yet-to-be-installed one
6318      ## test "$hardcode_shlibpath_var" != no &&
6319      test "$hardcode_minus_L" != no; then
6320     # Linking always hardcodes the temporary library directory.
6321     hardcode_action=relink
6322   else
6323     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6324     hardcode_action=immediate
6325   fi
6326 else
6327   # We cannot hardcode anything, or else we can only hardcode existing
6328   # directories.
6329   hardcode_action=unsupported
6330 fi
6331 echo "$ac_t""$hardcode_action" 1>&6
6332
6333 striplib=
6334 old_striplib=
6335 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6336 echo "configure:6337: checking whether stripping libraries is possible" >&5
6337 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6338   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6339   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6340   echo "$ac_t""yes" 1>&6
6341 else
6342   echo "$ac_t""no" 1>&6
6343 fi
6344
6345 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6346 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6347
6348 # PORTME Fill in your ld.so characteristics
6349 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6350 echo "configure:6351: checking dynamic linker characteristics" >&5
6351 library_names_spec=
6352 libname_spec='lib$name'
6353 soname_spec=
6354 postinstall_cmds=
6355 postuninstall_cmds=
6356 finish_cmds=
6357 finish_eval=
6358 shlibpath_var=
6359 shlibpath_overrides_runpath=unknown
6360 version_type=none
6361 dynamic_linker="$host_os ld.so"
6362 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6363 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6364
6365 case $host_os in
6366 aix3*)
6367   version_type=linux
6368   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6369   shlibpath_var=LIBPATH
6370
6371   # AIX has no versioning support, so we append a major version to the name.
6372   soname_spec='${libname}${release}.so$major'
6373   ;;
6374
6375 aix4* | aix5*)
6376   version_type=linux
6377   need_lib_prefix=no
6378   need_version=no
6379   hardcode_into_libs=yes
6380   if test "$host_cpu" = ia64; then
6381     # AIX 5 supports IA64
6382     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6383     shlibpath_var=LD_LIBRARY_PATH
6384   else
6385     # With GCC up to 2.95.x, collect2 would create an import file
6386     # for dependence libraries.  The import file would start with
6387     # the line `#! .'.  This would cause the generated library to
6388     # depend on `.', always an invalid library.  This was fixed in
6389     # development snapshots of GCC prior to 3.0.
6390     case $host_os in
6391       aix4 | aix4.[01] | aix4.[01].*)
6392         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6393              echo ' yes '
6394              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6395           :
6396         else
6397           can_build_shared=no
6398         fi
6399         ;;
6400     esac
6401     # AIX (on Power*) has no versioning support, so currently we can
6402     # not hardcode correct soname into executable. Probably we can
6403     # add versioning support to collect2, so additional links can
6404     # be useful in future.
6405     if test "$aix_use_runtimelinking" = yes; then
6406       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6407       # instead of lib<name>.a to let people know that these are not
6408       # typical AIX shared libraries.
6409       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6410     else
6411       # We preserve .a as extension for shared libraries through AIX4.2
6412       # and later when we are not doing run time linking.
6413       library_names_spec='${libname}${release}.a $libname.a'
6414       soname_spec='${libname}${release}.so$major'
6415     fi
6416     shlibpath_var=LIBPATH
6417   fi
6418   hardcode_into_libs=yes
6419   ;;
6420
6421 amigaos*)
6422   library_names_spec='$libname.ixlibrary $libname.a'
6423   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6424   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'
6425   ;;
6426
6427 beos*)
6428   library_names_spec='${libname}.so'
6429   dynamic_linker="$host_os ld.so"
6430   shlibpath_var=LIBRARY_PATH
6431   ;;
6432
6433 bsdi4*)
6434   version_type=linux
6435   need_version=no
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6437   soname_spec='${libname}${release}.so$major'
6438   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6439   shlibpath_var=LD_LIBRARY_PATH
6440   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6441   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6442   export_dynamic_flag_spec=-rdynamic
6443   # the default ld.so.conf also contains /usr/contrib/lib and
6444   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6445   # libtool to hard-code these into programs
6446   ;;
6447
6448 cygwin* | mingw* | pw32*)
6449   version_type=windows
6450   need_version=no
6451   need_lib_prefix=no
6452   case $GCC,$host_os in
6453   yes,cygwin*)
6454     library_names_spec='$libname.dll.a'
6455     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6456     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6457       dldir=$destdir/`dirname \$dlpath`~
6458       test -d \$dldir || mkdir -p \$dldir~
6459       $install_prog .libs/$dlname \$dldir/$dlname'
6460     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6461       dlpath=$dir/\$dldll~
6462        $rm \$dlpath'
6463     ;;
6464   yes,mingw*)
6465     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6466     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6467     ;;
6468   yes,pw32*)
6469     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6470     ;;
6471   *)
6472     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6473     ;;
6474   esac
6475   dynamic_linker='Win32 ld.exe'
6476   # FIXME: first we should search . and the directory the executable is in
6477   shlibpath_var=PATH
6478   ;;
6479
6480 darwin* | rhapsody*)
6481   dynamic_linker="$host_os dyld"
6482   version_type=darwin
6483   need_lib_prefix=no
6484   need_version=no
6485   # FIXME: Relying on posixy $() will cause problems for
6486   #        cross-compilation, but unfortunately the echo tests do not
6487   #        yet detect zsh echo's removal of \ escapes.
6488   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)'
6489   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6490   shlibpath_overrides_runpath=yes
6491   shlibpath_var=DYLD_LIBRARY_PATH
6492   ;;
6493
6494 freebsd1*)
6495   dynamic_linker=no
6496   ;;
6497
6498 freebsd*)
6499   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6500   version_type=freebsd-$objformat
6501   case $version_type in
6502     freebsd-elf*)
6503       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6504       need_version=no
6505       need_lib_prefix=no
6506       ;;
6507     freebsd-*)
6508       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6509       need_version=yes
6510       ;;
6511   esac
6512   shlibpath_var=LD_LIBRARY_PATH
6513   case $host_os in
6514   freebsd2*)
6515     shlibpath_overrides_runpath=yes
6516     ;;
6517   *)
6518     shlibpath_overrides_runpath=no
6519     hardcode_into_libs=yes
6520     ;;
6521   esac
6522   ;;
6523
6524 gnu*)
6525   version_type=linux
6526   need_lib_prefix=no
6527   need_version=no
6528   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6529   soname_spec='${libname}${release}.so$major'
6530   shlibpath_var=LD_LIBRARY_PATH
6531   hardcode_into_libs=yes
6532   ;;
6533
6534 hpux9* | hpux10* | hpux11*)
6535   # Give a soname corresponding to the major version so that dld.sl refuses to
6536   # link against other versions.
6537   dynamic_linker="$host_os dld.sl"
6538   version_type=sunos
6539   need_lib_prefix=no
6540   need_version=no
6541   shlibpath_var=SHLIB_PATH
6542   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6543   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6544   soname_spec='${libname}${release}.sl$major'
6545   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6546   postinstall_cmds='chmod 555 $lib'
6547   ;;
6548
6549 irix5* | irix6* | nonstopux*)
6550   case $host_os in
6551     nonstopux*) version_type=nonstopux ;;
6552     *)          version_type=irix ;;
6553   esac
6554   need_lib_prefix=no
6555   need_version=no
6556   soname_spec='${libname}${release}.so$major'
6557   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6558   case $host_os in
6559   irix5* | nonstopux*)
6560     libsuff= shlibsuff=
6561     ;;
6562   *)
6563     case $LD in # libtool.m4 will add one of these switches to LD
6564     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6565     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6566     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6567     *) libsuff= shlibsuff= libmagic=never-match;;
6568     esac
6569     ;;
6570   esac
6571   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6572   shlibpath_overrides_runpath=no
6573   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6574   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6575   ;;
6576
6577 # No shared lib support for Linux oldld, aout, or coff.
6578 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6579   dynamic_linker=no
6580   ;;
6581
6582 # This must be Linux ELF.
6583 linux-gnu*)
6584   version_type=linux
6585   need_lib_prefix=no
6586   need_version=no
6587   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6588   soname_spec='${libname}${release}.so$major'
6589   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6590   shlibpath_var=LD_LIBRARY_PATH
6591   shlibpath_overrides_runpath=no
6592   # This implies no fast_install, which is unacceptable.
6593   # Some rework will be needed to allow for fast_install
6594   # before this can be enabled.
6595   hardcode_into_libs=yes
6596
6597   # We used to test for /lib/ld.so.1 and disable shared libraries on
6598   # powerpc, because MkLinux only supported shared libraries with the
6599   # GNU dynamic linker.  Since this was broken with cross compilers,
6600   # most powerpc-linux boxes support dynamic linking these days and
6601   # people can always --disable-shared, the test was removed, and we
6602   # assume the GNU/Linux dynamic linker is in use.
6603   dynamic_linker='GNU/Linux ld.so'
6604   ;;
6605
6606 netbsd*)
6607   version_type=sunos
6608   need_lib_prefix=no
6609   need_version=no
6610   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6611     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6612     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6613     dynamic_linker='NetBSD (a.out) ld.so'
6614   else
6615     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6616     soname_spec='${libname}${release}.so$major'
6617     dynamic_linker='NetBSD ld.elf_so'
6618   fi
6619   shlibpath_var=LD_LIBRARY_PATH
6620   shlibpath_overrides_runpath=yes
6621   hardcode_into_libs=yes
6622   ;;
6623
6624 newsos6)
6625   version_type=linux
6626   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6627   shlibpath_var=LD_LIBRARY_PATH
6628   shlibpath_overrides_runpath=yes
6629   ;;
6630
6631 openbsd*)
6632   version_type=sunos
6633   need_lib_prefix=no
6634   need_version=no
6635   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6636     case "$host_os" in
6637     openbsd2.[89] | openbsd2.[89].*)
6638       shlibpath_overrides_runpath=no
6639       ;;
6640     *)
6641       shlibpath_overrides_runpath=yes
6642       ;;
6643     esac
6644   else
6645     shlibpath_overrides_runpath=yes
6646   fi
6647   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6648   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6649   shlibpath_var=LD_LIBRARY_PATH
6650   ;;
6651
6652 openedition*)
6653   need_lib_prefix=no
6654   need_version=no
6655   shlibpath_overrides_runpath=yes
6656   shlibpath_var=LIBPATH
6657   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6658   # the library's exports are in libname.x; this is the file that must
6659   # actually be linked with to use a DLL.
6660   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6661   ;;
6662
6663 os2*)
6664   libname_spec='$name'
6665   need_lib_prefix=no
6666   library_names_spec='$libname.dll $libname.a'
6667   dynamic_linker='OS/2 ld.exe'
6668   shlibpath_var=LIBPATH
6669   ;;
6670
6671 osf3* | osf4* | osf5*)
6672   version_type=osf
6673   need_version=no
6674   soname_spec='${libname}${release}.so$major'
6675   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6676   shlibpath_var=LD_LIBRARY_PATH
6677   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6678   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6679   hardcode_into_libs=yes
6680   ;;
6681
6682 sco3.2v5*)
6683   version_type=osf
6684   soname_spec='${libname}${release}.so$major'
6685   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6686   shlibpath_var=LD_LIBRARY_PATH
6687   ;;
6688
6689 solaris*)
6690   version_type=linux
6691   need_lib_prefix=no
6692   need_version=no
6693   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6694   soname_spec='${libname}${release}.so$major'
6695   shlibpath_var=LD_LIBRARY_PATH
6696   shlibpath_overrides_runpath=yes
6697   hardcode_into_libs=yes
6698   # ldd complains unless libraries are executable
6699   postinstall_cmds='chmod +x $lib'
6700   ;;
6701
6702 sunos4*)
6703   version_type=sunos
6704   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6705   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6706   shlibpath_var=LD_LIBRARY_PATH
6707   shlibpath_overrides_runpath=yes
6708   if test "$with_gnu_ld" = yes; then
6709     need_lib_prefix=no
6710   fi
6711   need_version=yes
6712   ;;
6713
6714 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6715   version_type=linux
6716   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6717   soname_spec='${libname}${release}.so$major'
6718   shlibpath_var=LD_LIBRARY_PATH
6719   case $host_vendor in
6720     sni)
6721       shlibpath_overrides_runpath=no
6722       need_lib_prefix=no
6723       export_dynamic_flag_spec='${wl}-Blargedynsym'
6724       runpath_var=LD_RUN_PATH
6725       ;;
6726     siemens)
6727       need_lib_prefix=no
6728       ;;
6729     motorola)
6730       need_lib_prefix=no
6731       need_version=no
6732       shlibpath_overrides_runpath=no
6733       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6734       ;;
6735   esac
6736   ;;
6737
6738 uts4*)
6739   version_type=linux
6740   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6741   soname_spec='${libname}${release}.so$major'
6742   shlibpath_var=LD_LIBRARY_PATH
6743   ;;
6744
6745 dgux*)
6746   version_type=linux
6747   need_lib_prefix=no
6748   need_version=no
6749   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6750   soname_spec='${libname}${release}.so$major'
6751   shlibpath_var=LD_LIBRARY_PATH
6752   ;;
6753
6754 sysv4*MP*)
6755   if test -d /usr/nec ;then
6756     version_type=linux
6757     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6758     soname_spec='$libname.so.$major'
6759     shlibpath_var=LD_LIBRARY_PATH
6760   fi
6761   ;;
6762
6763 *)
6764   dynamic_linker=no
6765   ;;
6766 esac
6767 echo "$ac_t""$dynamic_linker" 1>&6
6768 test "$dynamic_linker" = no && can_build_shared=no
6769
6770 # Report the final consequences.
6771 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6772 echo "configure:6773: checking if libtool supports shared libraries" >&5
6773 echo "$ac_t""$can_build_shared" 1>&6
6774
6775 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6776 echo "configure:6777: checking whether to build shared libraries" >&5
6777 test "$can_build_shared" = "no" && enable_shared=no
6778
6779 # On AIX, shared libraries and static libraries use the same namespace, and
6780 # are all built from PIC.
6781 case "$host_os" in
6782 aix3*)
6783   test "$enable_shared" = yes && enable_static=no
6784   if test -n "$RANLIB"; then
6785     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6786     postinstall_cmds='$RANLIB $lib'
6787   fi
6788   ;;
6789
6790 aix4*)
6791   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6792     test "$enable_shared" = yes && enable_static=no
6793   fi
6794   ;;
6795 esac
6796 echo "$ac_t""$enable_shared" 1>&6
6797
6798 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6799 echo "configure:6800: checking whether to build static libraries" >&5
6800 # Make sure either enable_shared or enable_static is yes.
6801 test "$enable_shared" = yes || enable_static=yes
6802 echo "$ac_t""$enable_static" 1>&6
6803
6804 if test "$hardcode_action" = relink; then
6805   # Fast installation is not supported
6806   enable_fast_install=no
6807 elif test "$shlibpath_overrides_runpath" = yes ||
6808      test "$enable_shared" = no; then
6809   # Fast installation is not necessary
6810   enable_fast_install=needless
6811 fi
6812
6813 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6814 if test "$GCC" = yes; then
6815   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6816 fi
6817
6818 if test "x$enable_dlopen" != xyes; then
6819   enable_dlopen=unknown
6820   enable_dlopen_self=unknown
6821   enable_dlopen_self_static=unknown
6822 else
6823   lt_cv_dlopen=no
6824   lt_cv_dlopen_libs=
6825
6826   case $host_os in
6827   beos*)
6828     lt_cv_dlopen="load_add_on"
6829     lt_cv_dlopen_libs=
6830     lt_cv_dlopen_self=yes
6831     ;;
6832
6833   cygwin* | mingw* | pw32*)
6834     lt_cv_dlopen="LoadLibrary"
6835     lt_cv_dlopen_libs=
6836    ;;
6837
6838   *)
6839     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6840 echo "configure:6841: checking for dllload" >&5
6841 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6842   echo $ac_n "(cached) $ac_c" 1>&6
6843 else
6844   cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6847 /* System header to define __stub macros and hopefully few prototypes,
6848     which can conflict with char dllload(); below.  */
6849 #include <assert.h>
6850 /* Override any gcc2 internal prototype to avoid an error.  */
6851 /* We use char because int might match the return type of a gcc2
6852     builtin and then its argument prototype would still apply.  */
6853 char dllload();
6854 char (*f)();
6855
6856 int main() {
6857
6858 /* The GNU C library defines this for functions which it implements
6859     to always fail with ENOSYS.  Some functions are actually named
6860     something starting with __ and the normal name is an alias.  */
6861 #if defined (__stub_dllload) || defined (__stub___dllload)
6862 choke me
6863 #else
6864 f = dllload;
6865 #endif
6866
6867 ; return 0; }
6868 EOF
6869 if { (eval echo configure:6870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6870   rm -rf conftest*
6871   eval "ac_cv_func_dllload=yes"
6872 else
6873   echo "configure: failed program was:" >&5
6874   cat conftest.$ac_ext >&5
6875   rm -rf conftest*
6876   eval "ac_cv_func_dllload=no"
6877 fi
6878 rm -f conftest*
6879 fi
6880
6881 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6882   echo "$ac_t""yes" 1>&6
6883   lt_cv_dlopen="dllload"
6884 else
6885   echo "$ac_t""no" 1>&6
6886 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6887 echo "configure:6888: checking for shl_load" >&5
6888 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6889   echo $ac_n "(cached) $ac_c" 1>&6
6890 else
6891   cat > conftest.$ac_ext <<EOF
6892 #line 6893 "configure"
6893 #include "confdefs.h"
6894 /* System header to define __stub macros and hopefully few prototypes,
6895     which can conflict with char shl_load(); below.  */
6896 #include <assert.h>
6897 /* Override any gcc2 internal prototype to avoid an error.  */
6898 /* We use char because int might match the return type of a gcc2
6899     builtin and then its argument prototype would still apply.  */
6900 char shl_load();
6901 char (*f)();
6902
6903 int main() {
6904
6905 /* The GNU C library defines this for functions which it implements
6906     to always fail with ENOSYS.  Some functions are actually named
6907     something starting with __ and the normal name is an alias.  */
6908 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6909 choke me
6910 #else
6911 f = shl_load;
6912 #endif
6913
6914 ; return 0; }
6915 EOF
6916 if { (eval echo configure:6917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6917   rm -rf conftest*
6918   eval "ac_cv_func_shl_load=yes"
6919 else
6920   echo "configure: failed program was:" >&5
6921   cat conftest.$ac_ext >&5
6922   rm -rf conftest*
6923   eval "ac_cv_func_shl_load=no"
6924 fi
6925 rm -f conftest*
6926 fi
6927
6928 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6929   echo "$ac_t""yes" 1>&6
6930   lt_cv_dlopen="shl_load"
6931 else
6932   echo "$ac_t""no" 1>&6
6933 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6934 echo "configure:6935: checking for shl_load in -ldld" >&5
6935 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6937   echo $ac_n "(cached) $ac_c" 1>&6
6938 else
6939   ac_save_LIBS="$LIBS"
6940 LIBS="-ldld  $LIBS"
6941 cat > conftest.$ac_ext <<EOF
6942 #line 6943 "configure"
6943 #include "confdefs.h"
6944 /* Override any gcc2 internal prototype to avoid an error.  */
6945 /* We use char because int might match the return type of a gcc2
6946     builtin and then its argument prototype would still apply.  */
6947 char shl_load();
6948
6949 int main() {
6950 shl_load()
6951 ; return 0; }
6952 EOF
6953 if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6954   rm -rf conftest*
6955   eval "ac_cv_lib_$ac_lib_var=yes"
6956 else
6957   echo "configure: failed program was:" >&5
6958   cat conftest.$ac_ext >&5
6959   rm -rf conftest*
6960   eval "ac_cv_lib_$ac_lib_var=no"
6961 fi
6962 rm -f conftest*
6963 LIBS="$ac_save_LIBS"
6964
6965 fi
6966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6967   echo "$ac_t""yes" 1>&6
6968   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6969 else
6970   echo "$ac_t""no" 1>&6
6971 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6972 echo "configure:6973: checking for dlopen" >&5
6973 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6974   echo $ac_n "(cached) $ac_c" 1>&6
6975 else
6976   cat > conftest.$ac_ext <<EOF
6977 #line 6978 "configure"
6978 #include "confdefs.h"
6979 /* System header to define __stub macros and hopefully few prototypes,
6980     which can conflict with char dlopen(); below.  */
6981 #include <assert.h>
6982 /* Override any gcc2 internal prototype to avoid an error.  */
6983 /* We use char because int might match the return type of a gcc2
6984     builtin and then its argument prototype would still apply.  */
6985 char dlopen();
6986 char (*f)();
6987
6988 int main() {
6989
6990 /* The GNU C library defines this for functions which it implements
6991     to always fail with ENOSYS.  Some functions are actually named
6992     something starting with __ and the normal name is an alias.  */
6993 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6994 choke me
6995 #else
6996 f = dlopen;
6997 #endif
6998
6999 ; return 0; }
7000 EOF
7001 if { (eval echo configure:7002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7002   rm -rf conftest*
7003   eval "ac_cv_func_dlopen=yes"
7004 else
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -rf conftest*
7008   eval "ac_cv_func_dlopen=no"
7009 fi
7010 rm -f conftest*
7011 fi
7012
7013 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
7014   echo "$ac_t""yes" 1>&6
7015   lt_cv_dlopen="dlopen"
7016 else
7017   echo "$ac_t""no" 1>&6
7018 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
7019 echo "configure:7020: checking for dlopen in -ldl" >&5
7020 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
7021 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7022   echo $ac_n "(cached) $ac_c" 1>&6
7023 else
7024   ac_save_LIBS="$LIBS"
7025 LIBS="-ldl  $LIBS"
7026 cat > conftest.$ac_ext <<EOF
7027 #line 7028 "configure"
7028 #include "confdefs.h"
7029 /* Override any gcc2 internal prototype to avoid an error.  */
7030 /* We use char because int might match the return type of a gcc2
7031     builtin and then its argument prototype would still apply.  */
7032 char dlopen();
7033
7034 int main() {
7035 dlopen()
7036 ; return 0; }
7037 EOF
7038 if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7039   rm -rf conftest*
7040   eval "ac_cv_lib_$ac_lib_var=yes"
7041 else
7042   echo "configure: failed program was:" >&5
7043   cat conftest.$ac_ext >&5
7044   rm -rf conftest*
7045   eval "ac_cv_lib_$ac_lib_var=no"
7046 fi
7047 rm -f conftest*
7048 LIBS="$ac_save_LIBS"
7049
7050 fi
7051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7052   echo "$ac_t""yes" 1>&6
7053   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
7054 else
7055   echo "$ac_t""no" 1>&6
7056 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
7057 echo "configure:7058: checking for dlopen in -lsvld" >&5
7058 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
7059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7060   echo $ac_n "(cached) $ac_c" 1>&6
7061 else
7062   ac_save_LIBS="$LIBS"
7063 LIBS="-lsvld  $LIBS"
7064 cat > conftest.$ac_ext <<EOF
7065 #line 7066 "configure"
7066 #include "confdefs.h"
7067 /* Override any gcc2 internal prototype to avoid an error.  */
7068 /* We use char because int might match the return type of a gcc2
7069     builtin and then its argument prototype would still apply.  */
7070 char dlopen();
7071
7072 int main() {
7073 dlopen()
7074 ; return 0; }
7075 EOF
7076 if { (eval echo configure:7077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7077   rm -rf conftest*
7078   eval "ac_cv_lib_$ac_lib_var=yes"
7079 else
7080   echo "configure: failed program was:" >&5
7081   cat conftest.$ac_ext >&5
7082   rm -rf conftest*
7083   eval "ac_cv_lib_$ac_lib_var=no"
7084 fi
7085 rm -f conftest*
7086 LIBS="$ac_save_LIBS"
7087
7088 fi
7089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7090   echo "$ac_t""yes" 1>&6
7091   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
7092 else
7093   echo "$ac_t""no" 1>&6
7094 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
7095 echo "configure:7096: checking for dld_link in -ldld" >&5
7096 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
7097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7098   echo $ac_n "(cached) $ac_c" 1>&6
7099 else
7100   ac_save_LIBS="$LIBS"
7101 LIBS="-ldld  $LIBS"
7102 cat > conftest.$ac_ext <<EOF
7103 #line 7104 "configure"
7104 #include "confdefs.h"
7105 /* Override any gcc2 internal prototype to avoid an error.  */
7106 /* We use char because int might match the return type of a gcc2
7107     builtin and then its argument prototype would still apply.  */
7108 char dld_link();
7109
7110 int main() {
7111 dld_link()
7112 ; return 0; }
7113 EOF
7114 if { (eval echo configure:7115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7115   rm -rf conftest*
7116   eval "ac_cv_lib_$ac_lib_var=yes"
7117 else
7118   echo "configure: failed program was:" >&5
7119   cat conftest.$ac_ext >&5
7120   rm -rf conftest*
7121   eval "ac_cv_lib_$ac_lib_var=no"
7122 fi
7123 rm -f conftest*
7124 LIBS="$ac_save_LIBS"
7125
7126 fi
7127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7128   echo "$ac_t""yes" 1>&6
7129   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
7130 else
7131   echo "$ac_t""no" 1>&6
7132 fi
7133
7134               
7135 fi
7136
7137             
7138 fi
7139
7140           
7141 fi
7142
7143         
7144 fi
7145
7146       
7147 fi
7148
7149     
7150 fi
7151
7152     ;;
7153   esac
7154
7155   if test "x$lt_cv_dlopen" != xno; then
7156     enable_dlopen=yes
7157   else
7158     enable_dlopen=no
7159   fi
7160
7161   case $lt_cv_dlopen in
7162   dlopen)
7163     save_CPPFLAGS="$CPPFLAGS"
7164         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7165
7166     save_LDFLAGS="$LDFLAGS"
7167     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7168
7169     save_LIBS="$LIBS"
7170     LIBS="$lt_cv_dlopen_libs $LIBS"
7171
7172     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7173 echo "configure:7174: checking whether a program can dlopen itself" >&5
7174 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7175   echo $ac_n "(cached) $ac_c" 1>&6
7176 else
7177           if test "$cross_compiling" = yes; then :
7178   lt_cv_dlopen_self=cross
7179 else
7180     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7181   lt_status=$lt_dlunknown
7182   cat > conftest.$ac_ext <<EOF
7183 #line 7184 "configure"
7184 #include "confdefs.h"
7185
7186 #if HAVE_DLFCN_H
7187 #include <dlfcn.h>
7188 #endif
7189
7190 #include <stdio.h>
7191
7192 #ifdef RTLD_GLOBAL
7193 #  define LT_DLGLOBAL           RTLD_GLOBAL
7194 #else
7195 #  ifdef DL_GLOBAL
7196 #    define LT_DLGLOBAL         DL_GLOBAL
7197 #  else
7198 #    define LT_DLGLOBAL         0
7199 #  endif
7200 #endif
7201
7202 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7203    find out it does not work in some platform. */
7204 #ifndef LT_DLLAZY_OR_NOW
7205 #  ifdef RTLD_LAZY
7206 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7207 #  else
7208 #    ifdef DL_LAZY
7209 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7210 #    else
7211 #      ifdef RTLD_NOW
7212 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7213 #      else
7214 #        ifdef DL_NOW
7215 #          define LT_DLLAZY_OR_NOW      DL_NOW
7216 #        else
7217 #          define LT_DLLAZY_OR_NOW      0
7218 #        endif
7219 #      endif
7220 #    endif
7221 #  endif
7222 #endif
7223
7224 #ifdef __cplusplus
7225 extern "C" void exit (int);
7226 #endif
7227
7228 void fnord() { int i=42;}
7229 int main ()
7230 {
7231   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7232   int status = $lt_dlunknown;
7233
7234   if (self)
7235     {
7236       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7237       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7238       /* dlclose (self); */
7239     }
7240
7241     exit (status);
7242 }
7243 EOF
7244   if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7245     (./conftest; exit; ) 2>/dev/null
7246     lt_status=$?
7247     case x$lt_status in
7248       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7249       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7250       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7251     esac
7252   else :
7253     # compilation failed
7254     lt_cv_dlopen_self=no
7255   fi
7256 fi
7257 rm -fr conftest*
7258
7259     
7260 fi
7261
7262 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7263
7264     if test "x$lt_cv_dlopen_self" = xyes; then
7265       LDFLAGS="$LDFLAGS $link_static_flag"
7266       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7267 echo "configure:7268: checking whether a statically linked program can dlopen itself" >&5
7268 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7269   echo $ac_n "(cached) $ac_c" 1>&6
7270 else
7271           if test "$cross_compiling" = yes; then :
7272   lt_cv_dlopen_self_static=cross
7273 else
7274     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7275   lt_status=$lt_dlunknown
7276   cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279
7280 #if HAVE_DLFCN_H
7281 #include <dlfcn.h>
7282 #endif
7283
7284 #include <stdio.h>
7285
7286 #ifdef RTLD_GLOBAL
7287 #  define LT_DLGLOBAL           RTLD_GLOBAL
7288 #else
7289 #  ifdef DL_GLOBAL
7290 #    define LT_DLGLOBAL         DL_GLOBAL
7291 #  else
7292 #    define LT_DLGLOBAL         0
7293 #  endif
7294 #endif
7295
7296 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7297    find out it does not work in some platform. */
7298 #ifndef LT_DLLAZY_OR_NOW
7299 #  ifdef RTLD_LAZY
7300 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7301 #  else
7302 #    ifdef DL_LAZY
7303 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7304 #    else
7305 #      ifdef RTLD_NOW
7306 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7307 #      else
7308 #        ifdef DL_NOW
7309 #          define LT_DLLAZY_OR_NOW      DL_NOW
7310 #        else
7311 #          define LT_DLLAZY_OR_NOW      0
7312 #        endif
7313 #      endif
7314 #    endif
7315 #  endif
7316 #endif
7317
7318 #ifdef __cplusplus
7319 extern "C" void exit (int);
7320 #endif
7321
7322 void fnord() { int i=42;}
7323 int main ()
7324 {
7325   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7326   int status = $lt_dlunknown;
7327
7328   if (self)
7329     {
7330       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7331       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7332       /* dlclose (self); */
7333     }
7334
7335     exit (status);
7336 }
7337 EOF
7338   if { (eval echo configure:7339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7339     (./conftest; exit; ) 2>/dev/null
7340     lt_status=$?
7341     case x$lt_status in
7342       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7343       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7344       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7345     esac
7346   else :
7347     # compilation failed
7348     lt_cv_dlopen_self_static=no
7349   fi
7350 fi
7351 rm -fr conftest*
7352
7353       
7354 fi
7355
7356 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7357     fi
7358
7359     CPPFLAGS="$save_CPPFLAGS"
7360     LDFLAGS="$save_LDFLAGS"
7361     LIBS="$save_LIBS"
7362     ;;
7363   esac
7364
7365   case $lt_cv_dlopen_self in
7366   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7367   *) enable_dlopen_self=unknown ;;
7368   esac
7369
7370   case $lt_cv_dlopen_self_static in
7371   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7372   *) enable_dlopen_self_static=unknown ;;
7373   esac
7374 fi
7375
7376
7377 if test "$enable_shared" = yes && test "$GCC" = yes; then
7378   case $archive_cmds in
7379   *'~'*)
7380     # FIXME: we may have to deal with multi-command sequences.
7381     ;;
7382   '$CC '*)
7383     # Test whether the compiler implicitly links with -lc since on some
7384     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7385     # to ld, don't add -lc before -lgcc.
7386     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7387 echo "configure:7388: checking whether -lc should be explicitly linked in" >&5
7388     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7389   echo $ac_n "(cached) $ac_c" 1>&6
7390 else
7391   $rm conftest*
7392     echo 'static int dummy;' > conftest.$ac_ext
7393
7394     if { (eval echo configure:7395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7395       soname=conftest
7396       lib=conftest
7397       libobjs=conftest.$ac_objext
7398       deplibs=
7399       wl=$lt_cv_prog_cc_wl
7400       compiler_flags=-v
7401       linker_flags=-v
7402       verstring=
7403       output_objdir=.
7404       libname=conftest
7405       save_allow_undefined_flag=$allow_undefined_flag
7406       allow_undefined_flag=
7407       if { (eval echo configure:7408: \"$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; }
7408       then
7409         lt_cv_archive_cmds_need_lc=no
7410       else
7411         lt_cv_archive_cmds_need_lc=yes
7412       fi
7413       allow_undefined_flag=$save_allow_undefined_flag
7414     else
7415       cat conftest.err 1>&5
7416     fi
7417 fi
7418
7419     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7420     ;;
7421   esac
7422 fi
7423 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7424
7425 # The second clause should only fire when bootstrapping the
7426 # libtool distribution, otherwise you forgot to ship ltmain.sh
7427 # with your package, and you will get complaints that there are
7428 # no rules to generate ltmain.sh.
7429 if test -f "$ltmain"; then
7430   :
7431 else
7432   # If there is no Makefile yet, we rely on a make rule to execute
7433   # `config.status --recheck' to rerun these tests and create the
7434   # libtool script then.
7435   test -f Makefile && make "$ltmain"
7436 fi
7437
7438 if test -f "$ltmain"; then
7439   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7440   $rm -f "${ofile}T"
7441
7442   echo creating $ofile
7443
7444   # Now quote all the things that may contain metacharacters while being
7445   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7446   # variables and quote the copies for generation of the libtool script.
7447   for var in echo old_CC old_CFLAGS SED \
7448     AR AR_FLAGS CC LD LN_S NM SHELL \
7449     reload_flag reload_cmds wl \
7450     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7451     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7452     library_names_spec soname_spec \
7453     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7454     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7455     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7456     old_striplib striplib file_magic_cmd export_symbols_cmds \
7457     deplibs_check_method allow_undefined_flag no_undefined_flag \
7458     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7459     global_symbol_to_c_name_address \
7460     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7461     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7462     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7463
7464     case $var in
7465     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7466     old_postinstall_cmds | old_postuninstall_cmds | \
7467     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7468     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7469     postinstall_cmds | postuninstall_cmds | \
7470     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7471       # Double-quote double-evaled strings.
7472       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7473       ;;
7474     *)
7475       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7476       ;;
7477     esac
7478   done
7479
7480   cat <<__EOF__ > "${ofile}T"
7481 #! $SHELL
7482
7483 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7484 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7485 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7486 #
7487 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7488 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7489 #
7490 # This program is free software; you can redistribute it and/or modify
7491 # it under the terms of the GNU General Public License as published by
7492 # the Free Software Foundation; either version 2 of the License, or
7493 # (at your option) any later version.
7494 #
7495 # This program is distributed in the hope that it will be useful, but
7496 # WITHOUT ANY WARRANTY; without even the implied warranty of
7497 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7498 # General Public License for more details.
7499 #
7500 # You should have received a copy of the GNU General Public License
7501 # along with this program; if not, write to the Free Software
7502 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7503 #
7504 # As a special exception to the GNU General Public License, if you
7505 # distribute this file as part of a program that contains a
7506 # configuration script generated by Autoconf, you may include it under
7507 # the same distribution terms that you use for the rest of that program.
7508
7509 # A sed that does not truncate output.
7510 SED=$lt_SED
7511
7512 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7513 Xsed="${SED} -e s/^X//"
7514
7515 # The HP-UX ksh and POSIX shell print the target directory to stdout
7516 # if CDPATH is set.
7517 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7518
7519 # ### BEGIN LIBTOOL CONFIG
7520
7521 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7522
7523 # Shell to use when invoking shell scripts.
7524 SHELL=$lt_SHELL
7525
7526 # Whether or not to build shared libraries.
7527 build_libtool_libs=$enable_shared
7528
7529 # Whether or not to build static libraries.
7530 build_old_libs=$enable_static
7531
7532 # Whether or not to add -lc for building shared libraries.
7533 build_libtool_need_lc=$need_lc
7534
7535 # Whether or not to optimize for fast installation.
7536 fast_install=$enable_fast_install
7537
7538 # The host system.
7539 host_alias=$host_alias
7540 host=$host
7541
7542 # An echo program that does not interpret backslashes.
7543 echo=$lt_echo
7544
7545 # The archiver.
7546 AR=$lt_AR
7547 AR_FLAGS=$lt_AR_FLAGS
7548
7549 # The default C compiler.
7550 CC=$lt_CC
7551
7552 # Is the compiler the GNU C compiler?
7553 with_gcc=$GCC
7554
7555 # The linker used to build libraries.
7556 LD=$lt_LD
7557
7558 # Whether we need hard or soft links.
7559 LN_S=$lt_LN_S
7560
7561 # A BSD-compatible nm program.
7562 NM=$lt_NM
7563
7564 # A symbol stripping program
7565 STRIP=$STRIP
7566
7567 # Used to examine libraries when file_magic_cmd begins "file"
7568 MAGIC_CMD=$MAGIC_CMD
7569
7570 # Used on cygwin: DLL creation program.
7571 DLLTOOL="$DLLTOOL"
7572
7573 # Used on cygwin: object dumper.
7574 OBJDUMP="$OBJDUMP"
7575
7576 # Used on cygwin: assembler.
7577 AS="$AS"
7578
7579 # The name of the directory that contains temporary libtool files.
7580 objdir=$objdir
7581
7582 # How to create reloadable object files.
7583 reload_flag=$lt_reload_flag
7584 reload_cmds=$lt_reload_cmds
7585
7586 # How to pass a linker flag through the compiler.
7587 wl=$lt_wl
7588
7589 # Object file suffix (normally "o").
7590 objext="$ac_objext"
7591
7592 # Old archive suffix (normally "a").
7593 libext="$libext"
7594
7595 # Executable file suffix (normally "").
7596 exeext="$exeext"
7597
7598 # Additional compiler flags for building library objects.
7599 pic_flag=$lt_pic_flag
7600 pic_mode=$pic_mode
7601
7602 # Does compiler simultaneously support -c and -o options?
7603 compiler_c_o=$lt_compiler_c_o
7604
7605 # Can we write directly to a .lo ?
7606 compiler_o_lo=$lt_compiler_o_lo
7607
7608 # Must we lock files when doing compilation ?
7609 need_locks=$lt_need_locks
7610
7611 # Do we need the lib prefix for modules?
7612 need_lib_prefix=$need_lib_prefix
7613
7614 # Do we need a version for libraries?
7615 need_version=$need_version
7616
7617 # Whether dlopen is supported.
7618 dlopen_support=$enable_dlopen
7619
7620 # Whether dlopen of programs is supported.
7621 dlopen_self=$enable_dlopen_self
7622
7623 # Whether dlopen of statically linked programs is supported.
7624 dlopen_self_static=$enable_dlopen_self_static
7625
7626 # Compiler flag to prevent dynamic linking.
7627 link_static_flag=$lt_link_static_flag
7628
7629 # Compiler flag to turn off builtin functions.
7630 no_builtin_flag=$lt_no_builtin_flag
7631
7632 # Compiler flag to allow reflexive dlopens.
7633 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7634
7635 # Compiler flag to generate shared objects directly from archives.
7636 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7637
7638 # Compiler flag to generate thread-safe objects.
7639 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7640
7641 # Library versioning type.
7642 version_type=$version_type
7643
7644 # Format of library name prefix.
7645 libname_spec=$lt_libname_spec
7646
7647 # List of archive names.  First name is the real one, the rest are links.
7648 # The last name is the one that the linker finds with -lNAME.
7649 library_names_spec=$lt_library_names_spec
7650
7651 # The coded name of the library, if different from the real name.
7652 soname_spec=$lt_soname_spec
7653
7654 # Commands used to build and install an old-style archive.
7655 RANLIB=$lt_RANLIB
7656 old_archive_cmds=$lt_old_archive_cmds
7657 old_postinstall_cmds=$lt_old_postinstall_cmds
7658 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7659
7660 # Create an old-style archive from a shared archive.
7661 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7662
7663 # Create a temporary old-style archive to link instead of a shared archive.
7664 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7665
7666 # Commands used to build and install a shared archive.
7667 archive_cmds=$lt_archive_cmds
7668 archive_expsym_cmds=$lt_archive_expsym_cmds
7669 postinstall_cmds=$lt_postinstall_cmds
7670 postuninstall_cmds=$lt_postuninstall_cmds
7671
7672 # Commands to strip libraries.
7673 old_striplib=$lt_old_striplib
7674 striplib=$lt_striplib
7675
7676 # Method to check whether dependent libraries are shared objects.
7677 deplibs_check_method=$lt_deplibs_check_method
7678
7679 # Command to use when deplibs_check_method == file_magic.
7680 file_magic_cmd=$lt_file_magic_cmd
7681
7682 # Flag that allows shared libraries with undefined symbols to be built.
7683 allow_undefined_flag=$lt_allow_undefined_flag
7684
7685 # Flag that forces no undefined symbols.
7686 no_undefined_flag=$lt_no_undefined_flag
7687
7688 # Commands used to finish a libtool library installation in a directory.
7689 finish_cmds=$lt_finish_cmds
7690
7691 # Same as above, but a single script fragment to be evaled but not shown.
7692 finish_eval=$lt_finish_eval
7693
7694 # Take the output of nm and produce a listing of raw symbols and C names.
7695 global_symbol_pipe=$lt_global_symbol_pipe
7696
7697 # Transform the output of nm in a proper C declaration
7698 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7699
7700 # Transform the output of nm in a C name address pair
7701 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7702
7703 # This is the shared library runtime path variable.
7704 runpath_var=$runpath_var
7705
7706 # This is the shared library path variable.
7707 shlibpath_var=$shlibpath_var
7708
7709 # Is shlibpath searched before the hard-coded library search path?
7710 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7711
7712 # How to hardcode a shared library path into an executable.
7713 hardcode_action=$hardcode_action
7714
7715 # Whether we should hardcode library paths into libraries.
7716 hardcode_into_libs=$hardcode_into_libs
7717
7718 # Flag to hardcode \$libdir into a binary during linking.
7719 # This must work even if \$libdir does not exist.
7720 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7721
7722 # Whether we need a single -rpath flag with a separated argument.
7723 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7724
7725 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7726 # resulting binary.
7727 hardcode_direct=$hardcode_direct
7728
7729 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7730 # resulting binary.
7731 hardcode_minus_L=$hardcode_minus_L
7732
7733 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7734 # the resulting binary.
7735 hardcode_shlibpath_var=$hardcode_shlibpath_var
7736
7737 # Variables whose values should be saved in libtool wrapper scripts and
7738 # restored at relink time.
7739 variables_saved_for_relink="$variables_saved_for_relink"
7740
7741 # Whether libtool must link a program against all its dependency libraries.
7742 link_all_deplibs=$link_all_deplibs
7743
7744 # Compile-time system search path for libraries
7745 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7746
7747 # Run-time system search path for libraries
7748 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7749
7750 # Fix the shell variable \$srcfile for the compiler.
7751 fix_srcfile_path="$fix_srcfile_path"
7752
7753 # Set to yes if exported symbols are required.
7754 always_export_symbols=$always_export_symbols
7755
7756 # The commands to list exported symbols.
7757 export_symbols_cmds=$lt_export_symbols_cmds
7758
7759 # The commands to extract the exported symbol list from a shared archive.
7760 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7761
7762 # Symbols that should not be listed in the preloaded symbols.
7763 exclude_expsyms=$lt_exclude_expsyms
7764
7765 # Symbols that must always be exported.
7766 include_expsyms=$lt_include_expsyms
7767
7768 # ### END LIBTOOL CONFIG
7769
7770 __EOF__
7771
7772   case $host_os in
7773   aix3*)
7774     cat <<\EOF >> "${ofile}T"
7775
7776 # AIX sometimes has problems with the GCC collect2 program.  For some
7777 # reason, if we set the COLLECT_NAMES environment variable, the problems
7778 # vanish in a puff of smoke.
7779 if test "X${COLLECT_NAMES+set}" != Xset; then
7780   COLLECT_NAMES=
7781   export COLLECT_NAMES
7782 fi
7783 EOF
7784     ;;
7785   esac
7786
7787   case $host_os in
7788   cygwin* | mingw* | pw32* | os2*)
7789     cat <<'EOF' >> "${ofile}T"
7790       # This is a source program that is used to create dlls on Windows
7791       # Don't remove nor modify the starting and closing comments
7792 # /* ltdll.c starts here */
7793 # #define WIN32_LEAN_AND_MEAN
7794 # #include <windows.h>
7795 # #undef WIN32_LEAN_AND_MEAN
7796 # #include <stdio.h>
7797 #
7798 # #ifndef __CYGWIN__
7799 # #  ifdef __CYGWIN32__
7800 # #    define __CYGWIN__ __CYGWIN32__
7801 # #  endif
7802 # #endif
7803 #
7804 # #ifdef __cplusplus
7805 # extern "C" {
7806 # #endif
7807 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7808 # #ifdef __cplusplus
7809 # }
7810 # #endif
7811 #
7812 # #ifdef __CYGWIN__
7813 # #include <cygwin/cygwin_dll.h>
7814 # DECLARE_CYGWIN_DLL( DllMain );
7815 # #endif
7816 # HINSTANCE __hDllInstance_base;
7817 #
7818 # BOOL APIENTRY
7819 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7820 # {
7821 #   __hDllInstance_base = hInst;
7822 #   return TRUE;
7823 # }
7824 # /* ltdll.c ends here */
7825         # This is a source program that is used to create import libraries
7826         # on Windows for dlls which lack them. Don't remove nor modify the
7827         # starting and closing comments
7828 # /* impgen.c starts here */
7829 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7830 #
7831 #  This file is part of GNU libtool.
7832 #
7833 #  This program is free software; you can redistribute it and/or modify
7834 #  it under the terms of the GNU General Public License as published by
7835 #  the Free Software Foundation; either version 2 of the License, or
7836 #  (at your option) any later version.
7837 #
7838 #  This program is distributed in the hope that it will be useful,
7839 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7840 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7841 #  GNU General Public License for more details.
7842 #
7843 #  You should have received a copy of the GNU General Public License
7844 #  along with this program; if not, write to the Free Software
7845 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7846 #  */
7847 #
7848 # #include <stdio.h>            /* for printf() */
7849 # #include <unistd.h>           /* for open(), lseek(), read() */
7850 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7851 # #include <string.h>           /* for strdup() */
7852 #
7853 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7854 # #ifndef O_BINARY
7855 # #define O_BINARY 0
7856 # #endif
7857 #
7858 # static unsigned int
7859 # pe_get16 (fd, offset)
7860 #      int fd;
7861 #      int offset;
7862 # {
7863 #   unsigned char b[2];
7864 #   lseek (fd, offset, SEEK_SET);
7865 #   read (fd, b, 2);
7866 #   return b[0] + (b[1]<<8);
7867 # }
7868 #
7869 # static unsigned int
7870 # pe_get32 (fd, offset)
7871 #     int fd;
7872 #     int offset;
7873 # {
7874 #   unsigned char b[4];
7875 #   lseek (fd, offset, SEEK_SET);
7876 #   read (fd, b, 4);
7877 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7878 # }
7879 #
7880 # static unsigned int
7881 # pe_as32 (ptr)
7882 #      void *ptr;
7883 # {
7884 #   unsigned char *b = ptr;
7885 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7886 # }
7887 #
7888 # int
7889 # main (argc, argv)
7890 #     int argc;
7891 #     char *argv[];
7892 # {
7893 #     int dll;
7894 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7895 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7896 #     unsigned long name_rvas, nexp;
7897 #     unsigned char *expdata, *erva;
7898 #     char *filename, *dll_name;
7899 #
7900 #     filename = argv[1];
7901 #
7902 #     dll = open(filename, O_RDONLY|O_BINARY);
7903 #     if (dll < 1)
7904 #       return 1;
7905 #
7906 #     dll_name = filename;
7907 #
7908 #     for (i=0; filename[i]; i++)
7909 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7910 #           dll_name = filename + i +1;
7911 #
7912 #     pe_header_offset = pe_get32 (dll, 0x3c);
7913 #     opthdr_ofs = pe_header_offset + 4 + 20;
7914 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7915 #
7916 #     if (num_entries < 1) /* no exports */
7917 #       return 1;
7918 #
7919 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7920 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7921 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7922 #     secptr = (pe_header_offset + 4 + 20 +
7923 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7924 #
7925 #     expptr = 0;
7926 #     for (i = 0; i < nsections; i++)
7927 #     {
7928 #       char sname[8];
7929 #       unsigned long secptr1 = secptr + 40 * i;
7930 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7931 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7932 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7933 #       lseek(dll, secptr1, SEEK_SET);
7934 #       read(dll, sname, 8);
7935 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7936 #       {
7937 #           expptr = fptr + (export_rva - vaddr);
7938 #           if (export_rva + export_size > vaddr + vsize)
7939 #               export_size = vsize - (export_rva - vaddr);
7940 #           break;
7941 #       }
7942 #     }
7943 #
7944 #     expdata = (unsigned char*)malloc(export_size);
7945 #     lseek (dll, expptr, SEEK_SET);
7946 #     read (dll, expdata, export_size);
7947 #     erva = expdata - export_rva;
7948 #
7949 #     nexp = pe_as32 (expdata+24);
7950 #     name_rvas = pe_as32 (expdata+32);
7951 #
7952 #     printf ("EXPORTS\n");
7953 #     for (i = 0; i<nexp; i++)
7954 #     {
7955 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7956 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7957 #     }
7958 #
7959 #     return 0;
7960 # }
7961 # /* impgen.c ends here */
7962
7963 EOF
7964     ;;
7965   esac
7966
7967   # We use sed instead of cat because bash on DJGPP gets confused if
7968   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7969   # text mode, it properly converts lines to CR/LF.  This bash problem
7970   # is reportedly fixed, but why not run on old versions too?
7971   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7972
7973   mv -f "${ofile}T" "$ofile" || \
7974     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7975   chmod +x "$ofile"
7976 fi
7977
7978
7979
7980
7981
7982 # This can be used to rebuild libtool when needed
7983 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7984
7985 # Always use our own libtool.
7986 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7987
7988 # Prevent multiple expansion
7989
7990
7991
7992 # test for ln hardlink support
7993 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7994 echo "configure:7995: checking whether ln works" >&5
7995 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7996   echo $ac_n "(cached) $ac_c" 1>&6
7997 else
7998   rm -f conftest.src conftest.dst
7999 echo "conftest" > conftest.src
8000 if ln conftest.src conftest.dst 2>/dev/null
8001 then
8002   ol_cv_prog_LN_H="ln"
8003 else
8004   ol_cv_prog_LN_H="cp"
8005 fi
8006 rm -f conftest.src conftest.dst
8007
8008 fi
8009 LN_H="$ol_cv_prog_LN_H"
8010 if test "$ol_cv_prog_LN_H" = "ln"; then
8011         echo "$ac_t""yes" 1>&6
8012 else
8013         echo "$ac_t""no" 1>&6
8014 fi
8015
8016 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
8017 echo "configure:8018: checking whether ln -s works" >&5
8018 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
8019   echo $ac_n "(cached) $ac_c" 1>&6
8020 else
8021   rm -f conftestdata
8022 if ln -s X conftestdata 2>/dev/null
8023 then
8024   rm -f conftestdata
8025   ac_cv_prog_LN_S="ln -s"
8026 else
8027   ac_cv_prog_LN_S=ln
8028 fi
8029 fi
8030 LN_S="$ac_cv_prog_LN_S"
8031 if test "$ac_cv_prog_LN_S" = "ln -s"; then
8032   echo "$ac_t""yes" 1>&6
8033 else
8034   echo "$ac_t""no" 1>&6
8035 fi
8036
8037
8038 ol_link_perl=no
8039 if test $ol_enable_perl != no ; then
8040         # Extract the first word of "perl", so it can be a program name with args.
8041 set dummy perl; ac_word=$2
8042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8043 echo "configure:8044: checking for $ac_word" >&5
8044 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
8045   echo $ac_n "(cached) $ac_c" 1>&6
8046 else
8047   case "$PERLBIN" in
8048   /*)
8049   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
8050   ;;
8051   ?:/*)
8052   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
8053   ;;
8054   *)
8055   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
8056   ac_dummy="$PATH"
8057   for ac_dir in $ac_dummy; do 
8058     test -z "$ac_dir" && ac_dir=.
8059     if test -f $ac_dir/$ac_word; then
8060       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
8061       break
8062     fi
8063   done
8064   IFS="$ac_save_ifs"
8065   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
8066   ;;
8067 esac
8068 fi
8069 PERLBIN="$ac_cv_path_PERLBIN"
8070 if test -n "$PERLBIN"; then
8071   echo "$ac_t""$PERLBIN" 1>&6
8072 else
8073   echo "$ac_t""no" 1>&6
8074 fi
8075
8076
8077         if test "no$PERLBIN" = "no" ; then
8078                 if test $ol_enable_perl = yes ; then
8079                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
8080                 fi
8081
8082         else
8083                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
8084                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
8085
8086                 if test x"$ol_with_perl_module" = "xstatic" ; then
8087                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
8088                 else
8089                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
8090                 fi
8091                                 ol_link_perl=yes
8092         fi
8093 fi
8094
8095 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
8096 echo "configure:8097: checking how to run the C preprocessor" >&5
8097 # On Suns, sometimes $CPP names a directory.
8098 if test -n "$CPP" && test -d "$CPP"; then
8099   CPP=
8100 fi
8101 if test -z "$CPP"; then
8102 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
8103   echo $ac_n "(cached) $ac_c" 1>&6
8104 else
8105     # This must be in double quotes, not single quotes, because CPP may get
8106   # substituted into the Makefile and "${CC-cc}" will confuse make.
8107   CPP="${CC-cc} -E"
8108   # On the NeXT, cc -E runs the code through the compiler's parser,
8109   # not just through cpp.
8110   cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8113 #include <assert.h>
8114 Syntax Error
8115 EOF
8116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8117 { (eval echo configure:8118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8119 if test -z "$ac_err"; then
8120   :
8121 else
8122   echo "$ac_err" >&5
8123   echo "configure: failed program was:" >&5
8124   cat conftest.$ac_ext >&5
8125   rm -rf conftest*
8126   CPP="${CC-cc} -E -traditional-cpp"
8127   cat > conftest.$ac_ext <<EOF
8128 #line 8129 "configure"
8129 #include "confdefs.h"
8130 #include <assert.h>
8131 Syntax Error
8132 EOF
8133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8134 { (eval echo configure:8135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8136 if test -z "$ac_err"; then
8137   :
8138 else
8139   echo "$ac_err" >&5
8140   echo "configure: failed program was:" >&5
8141   cat conftest.$ac_ext >&5
8142   rm -rf conftest*
8143   CPP="${CC-cc} -nologo -E"
8144   cat > conftest.$ac_ext <<EOF
8145 #line 8146 "configure"
8146 #include "confdefs.h"
8147 #include <assert.h>
8148 Syntax Error
8149 EOF
8150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8151 { (eval echo configure:8152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8153 if test -z "$ac_err"; then
8154   :
8155 else
8156   echo "$ac_err" >&5
8157   echo "configure: failed program was:" >&5
8158   cat conftest.$ac_ext >&5
8159   rm -rf conftest*
8160   CPP=/lib/cpp
8161 fi
8162 rm -f conftest*
8163 fi
8164 rm -f conftest*
8165 fi
8166 rm -f conftest*
8167   ac_cv_prog_CPP="$CPP"
8168 fi
8169   CPP="$ac_cv_prog_CPP"
8170 else
8171   ac_cv_prog_CPP="$CPP"
8172 fi
8173 echo "$ac_t""$CPP" 1>&6
8174
8175
8176
8177 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8178 echo "configure:8179: checking for Cygwin environment" >&5
8179 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8180   echo $ac_n "(cached) $ac_c" 1>&6
8181 else
8182   cat > conftest.$ac_ext <<EOF
8183 #line 8184 "configure"
8184 #include "confdefs.h"
8185
8186 int main() {
8187
8188 #ifndef __CYGWIN__
8189 #define __CYGWIN__ __CYGWIN32__
8190 #endif
8191 return __CYGWIN__;
8192 ; return 0; }
8193 EOF
8194 if { (eval echo configure:8195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8195   rm -rf conftest*
8196   ac_cv_cygwin=yes
8197 else
8198   echo "configure: failed program was:" >&5
8199   cat conftest.$ac_ext >&5
8200   rm -rf conftest*
8201   ac_cv_cygwin=no
8202 fi
8203 rm -f conftest*
8204 fi
8205
8206 echo "$ac_t""$ac_cv_cygwin" 1>&6
8207 CYGWIN=
8208 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8209 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8210 echo "configure:8211: checking for mingw32 environment" >&5
8211 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8212   echo $ac_n "(cached) $ac_c" 1>&6
8213 else
8214   cat > conftest.$ac_ext <<EOF
8215 #line 8216 "configure"
8216 #include "confdefs.h"
8217
8218 int main() {
8219 return __MINGW32__;
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8223   rm -rf conftest*
8224   ac_cv_mingw32=yes
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   ac_cv_mingw32=no
8230 fi
8231 rm -f conftest*
8232 fi
8233
8234 echo "$ac_t""$ac_cv_mingw32" 1>&6
8235 MINGW32=
8236 test "$ac_cv_mingw32" = yes && MINGW32=yes
8237
8238
8239
8240 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8241 echo "configure:8242: checking for executable suffix" >&5
8242 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8243   echo $ac_n "(cached) $ac_c" 1>&6
8244 else
8245   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8246   ac_cv_exeext=.exe
8247 else
8248   rm -f conftest*
8249   echo 'int main () { return 0; }' > conftest.$ac_ext
8250   ac_cv_exeext=
8251   if { (eval echo configure:8252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8252     for file in conftest.*; do
8253       case $file in
8254       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8255       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8256       esac
8257     done
8258   else
8259     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8260   fi
8261   rm -f conftest*
8262   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8263 fi
8264 fi
8265
8266 EXEEXT=""
8267 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8268 echo "$ac_t""${ac_cv_exeext}" 1>&6
8269 ac_exeext=$EXEEXT
8270
8271 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8272 echo "configure:8273: checking for object suffix" >&5
8273 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8274   echo $ac_n "(cached) $ac_c" 1>&6
8275 else
8276   rm -f conftest*
8277 echo 'int i = 1;' > conftest.$ac_ext
8278 if { (eval echo configure:8279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8279   for ac_file in conftest.*; do
8280     case $ac_file in
8281     *.c) ;;
8282     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8283     esac
8284   done
8285 else
8286   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8287 fi
8288 rm -f conftest*
8289 fi
8290
8291 echo "$ac_t""$ac_cv_objext" 1>&6
8292 OBJEXT=$ac_cv_objext
8293 ac_objext=$ac_cv_objext
8294
8295
8296 cat >> confdefs.h <<EOF
8297 #define EXEEXT "${EXEEXT}"
8298 EOF
8299
8300
8301 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8302 echo "configure:8303: checking for be_app in -lbe" >&5
8303 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8304 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8305   echo $ac_n "(cached) $ac_c" 1>&6
8306 else
8307   ac_save_LIBS="$LIBS"
8308 LIBS="-lbe -lroot -lnet $LIBS"
8309 cat > conftest.$ac_ext <<EOF
8310 #line 8311 "configure"
8311 #include "confdefs.h"
8312 /* Override any gcc2 internal prototype to avoid an error.  */
8313 /* We use char because int might match the return type of a gcc2
8314     builtin and then its argument prototype would still apply.  */
8315 char be_app();
8316
8317 int main() {
8318 be_app()
8319 ; return 0; }
8320 EOF
8321 if { (eval echo configure:8322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8322   rm -rf conftest*
8323   eval "ac_cv_lib_$ac_lib_var=yes"
8324 else
8325   echo "configure: failed program was:" >&5
8326   cat conftest.$ac_ext >&5
8327   rm -rf conftest*
8328   eval "ac_cv_lib_$ac_lib_var=no"
8329 fi
8330 rm -f conftest*
8331 LIBS="$ac_save_LIBS"
8332
8333 fi
8334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8335   echo "$ac_t""yes" 1>&6
8336   LIBS="$LIBS -lbe -lroot -lnet"
8337 else
8338   echo "$ac_t""no" 1>&6
8339 :
8340 fi
8341
8342
8343
8344
8345
8346 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8347 echo "configure:8348: checking for ${CC-cc} option to accept ANSI C" >&5
8348 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8349   echo $ac_n "(cached) $ac_c" 1>&6
8350 else
8351   am_cv_prog_cc_stdc=no
8352 ac_save_CC="$CC"
8353 # Don't try gcc -ansi; that turns off useful extensions and
8354 # breaks some systems' header files.
8355 # AIX                   -qlanglvl=ansi
8356 # Ultrix and OSF/1      -std1
8357 # HP-UX 10.20 and later -Ae
8358 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8359 # SVR4                  -Xc -D__EXTENSIONS__
8360 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8361 do
8362   CC="$ac_save_CC $ac_arg"
8363   cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 #include <stdarg.h>
8367 #include <stdio.h>
8368 #include <sys/types.h>
8369 #include <sys/stat.h>
8370 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8371 struct buf { int x; };
8372 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8373 static char *e (p, i)
8374      char **p;
8375      int i;
8376 {
8377   return p[i];
8378 }
8379 static char *f (char * (*g) (char **, int), char **p, ...)
8380 {
8381   char *s;
8382   va_list v;
8383   va_start (v,p);
8384   s = g (p, va_arg (v,int));
8385   va_end (v);
8386   return s;
8387 }
8388 int test (int i, double x);
8389 struct s1 {int (*f) (int a);};
8390 struct s2 {int (*f) (double a);};
8391 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8392 int argc;
8393 char **argv;
8394
8395 int main() {
8396
8397 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8398
8399 ; return 0; }
8400 EOF
8401 if { (eval echo configure:8402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8402   rm -rf conftest*
8403   am_cv_prog_cc_stdc="$ac_arg"; break
8404 else
8405   echo "configure: failed program was:" >&5
8406   cat conftest.$ac_ext >&5
8407 fi
8408 rm -f conftest*
8409 done
8410 CC="$ac_save_CC"
8411
8412 fi
8413
8414 if test -z "$am_cv_prog_cc_stdc"; then
8415   echo "$ac_t""none needed" 1>&6
8416 else
8417   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8418 fi
8419 case "x$am_cv_prog_cc_stdc" in
8420   x|xno) ;;
8421   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8422 esac
8423
8424 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8425         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8426 fi
8427
8428 # test for make depend flag
8429 OL_MKDEP=
8430 OL_MKDEP_FLAGS=
8431 if test -z "${MKDEP}"; then
8432         OL_MKDEP="${CC-cc}"
8433         if test -z "${MKDEP_FLAGS}"; then
8434                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8435 echo "configure:8436: checking for ${OL_MKDEP} depend flag" >&5
8436 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8437   echo $ac_n "(cached) $ac_c" 1>&6
8438 else
8439   
8440                         ol_cv_mkdep=no
8441                         for flag in "-M" "-xM"; do
8442                                 cat > conftest.c <<EOF
8443  noCode;
8444 EOF
8445                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8446                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8447                                 then
8448                                         if test ! -f conftest."${ac_object}" ; then
8449                                                 ol_cv_mkdep=$flag
8450                                                 OL_MKDEP_FLAGS="$flag"
8451                                                 break
8452                                         fi
8453                                 fi
8454                         done
8455                         rm -f conftest*
8456                 
8457 fi
8458
8459 echo "$ac_t""$ol_cv_mkdep" 1>&6
8460         else
8461                 cc_cv_mkdep=yes
8462                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8463         fi
8464 else
8465         cc_cv_mkdep=yes
8466         OL_MKDEP="${MKDEP}"
8467         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8468 fi
8469
8470
8471
8472 if test "${ol_cv_mkdep}" = no ; then
8473         # this will soon become an error
8474         echo "configure: warning: do not know how to generate dependencies" 1>&2
8475 fi
8476
8477 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8478 echo "configure:8479: checking for afopen in -ls" >&5
8479 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8480 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8481   echo $ac_n "(cached) $ac_c" 1>&6
8482 else
8483   ac_save_LIBS="$LIBS"
8484 LIBS="-ls  $LIBS"
8485 cat > conftest.$ac_ext <<EOF
8486 #line 8487 "configure"
8487 #include "confdefs.h"
8488 /* Override any gcc2 internal prototype to avoid an error.  */
8489 /* We use char because int might match the return type of a gcc2
8490     builtin and then its argument prototype would still apply.  */
8491 char afopen();
8492
8493 int main() {
8494 afopen()
8495 ; return 0; }
8496 EOF
8497 if { (eval echo configure:8498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8498   rm -rf conftest*
8499   eval "ac_cv_lib_$ac_lib_var=yes"
8500 else
8501   echo "configure: failed program was:" >&5
8502   cat conftest.$ac_ext >&5
8503   rm -rf conftest*
8504   eval "ac_cv_lib_$ac_lib_var=no"
8505 fi
8506 rm -f conftest*
8507 LIBS="$ac_save_LIBS"
8508
8509 fi
8510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8511   echo "$ac_t""yes" 1>&6
8512   
8513         AUTH_LIBS=-ls
8514         cat >> confdefs.h <<\EOF
8515 #define HAVE_AIX_SECURITY 1
8516 EOF
8517
8518
8519 else
8520   echo "$ac_t""no" 1>&6
8521 fi
8522
8523
8524 case "$target" in
8525 *-ibm-openedition)
8526         ac_cv_func_getopt=no
8527         cat >> confdefs.h <<\EOF
8528 #define BOTH_STRINGS_H 1
8529 EOF
8530
8531         ;;
8532 esac
8533
8534 ol_link_modules=no
8535 if test $ol_enable_modules != no ; then
8536         for ac_hdr in ltdl.h
8537 do
8538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8540 echo "configure:8541: checking for $ac_hdr" >&5
8541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8542   echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544   cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 #include <$ac_hdr>
8548 EOF
8549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8550 { (eval echo configure:8551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8552 if test -z "$ac_err"; then
8553   rm -rf conftest*
8554   eval "ac_cv_header_$ac_safe=yes"
8555 else
8556   echo "$ac_err" >&5
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -rf conftest*
8560   eval "ac_cv_header_$ac_safe=no"
8561 fi
8562 rm -f conftest*
8563 fi
8564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8565   echo "$ac_t""yes" 1>&6
8566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8567   cat >> confdefs.h <<EOF
8568 #define $ac_tr_hdr 1
8569 EOF
8570  
8571 else
8572   echo "$ac_t""no" 1>&6
8573 fi
8574 done
8575
8576
8577         if test $ac_cv_header_ltdl_h = no ; then
8578                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8579         fi
8580
8581         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8582 echo "configure:8583: checking for lt_dlinit in -lltdl" >&5
8583 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8585   echo $ac_n "(cached) $ac_c" 1>&6
8586 else
8587   ac_save_LIBS="$LIBS"
8588 LIBS="-lltdl  $LIBS"
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 /* Override any gcc2 internal prototype to avoid an error.  */
8593 /* We use char because int might match the return type of a gcc2
8594     builtin and then its argument prototype would still apply.  */
8595 char lt_dlinit();
8596
8597 int main() {
8598 lt_dlinit()
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8602   rm -rf conftest*
8603   eval "ac_cv_lib_$ac_lib_var=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_lib_$ac_lib_var=no"
8609 fi
8610 rm -f conftest*
8611 LIBS="$ac_save_LIBS"
8612
8613 fi
8614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8615   echo "$ac_t""yes" 1>&6
8616   
8617                 MODULES_LIBS=-lltdl
8618                 cat >> confdefs.h <<\EOF
8619 #define HAVE_LIBLTDL 1
8620 EOF
8621
8622         
8623 else
8624   echo "$ac_t""no" 1>&6
8625 fi
8626
8627
8628         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8629                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8630         fi
8631         ol_link_modules=yes
8632 else
8633         ol_with_bdb_module=static
8634         ol_with_dnssrv_module=static
8635         ol_with_hdb_module=static
8636         ol_with_ldap_module=static
8637         ol_with_ldbm_module=static
8638         ol_with_meta_module=static
8639         ol_with_monitor_module=static
8640         ol_with_null_module=static
8641         ol_with_passwd_module=static
8642         ol_with_perl_module=static
8643         ol_with_relay_module=static
8644         ol_with_shell_module=static
8645         ol_with_sql_module=static
8646         if test $ol_with_chain = mod ; then
8647                 echo "configure: warning: building static chain overlay" 1>&2
8648                 ol_with_chain=yes
8649         fi
8650         if test $ol_with_denyop = mod ; then
8651                 echo "configure: warning: building static denyop overlay" 1>&2
8652                 ol_with_denyop=yes
8653         fi
8654         if test $ol_with_dyngroup = mod ; then
8655                 echo "configure: warning: building static dyngroup overlay" 1>&2
8656                 ol_with_dyngroup=yes
8657         fi
8658         if test $ol_with_ppolicy = mod ; then
8659                 echo "configure: warning: building static ppolicy overlay" 1>&2
8660                 ol_with_ppolicy=yes
8661         fi
8662         if test $ol_with_proxycache = mod ; then
8663                 echo "configure: warning: building static proxycache overlay" 1>&2
8664                 ol_with_proxycache=yes
8665         fi
8666         if test $ol_with_rwm = mod ; then
8667                 echo "configure: warning: building static rwm overlay" 1>&2
8668                 ol_with_rwm=yes
8669         fi
8670 fi
8671
8672 # test for EBCDIC
8673 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8674 echo "configure:8675: checking for EBCDIC" >&5
8675 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8676   echo $ac_n "(cached) $ac_c" 1>&6
8677 else
8678   
8679         cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682
8683 #if !('M' == 0xd4)
8684 #include <__ASCII__/generate_error.h>
8685 #endif
8686
8687 EOF
8688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8689 { (eval echo configure:8690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8691 if test -z "$ac_err"; then
8692   rm -rf conftest*
8693   ol_cv_cpp_ebcdic=yes
8694 else
8695   echo "$ac_err" >&5
8696   echo "configure: failed program was:" >&5
8697   cat conftest.$ac_ext >&5
8698   rm -rf conftest*
8699   ol_cv_cpp_ebcdic=no
8700 fi
8701 rm -f conftest*
8702 fi
8703
8704 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8705 if test $ol_cv_cpp_ebcdic = yes ; then
8706         cat >> confdefs.h <<\EOF
8707 #define HAVE_EBCDIC 1
8708 EOF
8709
8710 fi
8711
8712 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8713 echo "configure:8714: checking for ANSI C header files" >&5
8714 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8715   echo $ac_n "(cached) $ac_c" 1>&6
8716 else
8717   cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 #include <stdlib.h>
8721 #include <stdarg.h>
8722 #include <string.h>
8723 #include <float.h>
8724 EOF
8725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8726 { (eval echo configure:8727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8728 if test -z "$ac_err"; then
8729   rm -rf conftest*
8730   ol_cv_header_stdc=yes
8731 else
8732   echo "$ac_err" >&5
8733   echo "configure: failed program was:" >&5
8734   cat conftest.$ac_ext >&5
8735   rm -rf conftest*
8736   ol_cv_header_stdc=no
8737 fi
8738 rm -f conftest*
8739
8740 if test $ol_cv_header_stdc = yes; then
8741   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <string.h>
8746 EOF
8747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8748   egrep "memchr" >/dev/null 2>&1; then
8749   :
8750 else
8751   rm -rf conftest*
8752   ol_cv_header_stdc=no
8753 fi
8754 rm -f conftest*
8755
8756 fi
8757
8758 if test $ol_cv_header_stdc = yes; then
8759   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8760 cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 #include <stdlib.h>
8764 EOF
8765 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8766   egrep "free" >/dev/null 2>&1; then
8767   :
8768 else
8769   rm -rf conftest*
8770   ol_cv_header_stdc=no
8771 fi
8772 rm -f conftest*
8773
8774 fi
8775
8776 if test $ol_cv_header_stdc = yes; then
8777   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8778 if test "$cross_compiling" = yes; then
8779   :
8780 else
8781   cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 #include <ctype.h>
8785 #ifndef HAVE_EBCDIC
8786 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8787 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8788 #else
8789 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8790                 || ('j' <= (c) && (c) <= 'r') \
8791                 || ('s' <= (c) && (c) <= 'z'))
8792 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8793 #endif
8794 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8795 int main () { int i; for (i = 0; i < 256; i++)
8796 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8797 exit (0); }
8798
8799 EOF
8800 if { (eval echo configure:8801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8801 then
8802   :
8803 else
8804   echo "configure: failed program was:" >&5
8805   cat conftest.$ac_ext >&5
8806   rm -fr conftest*
8807   ol_cv_header_stdc=no
8808 fi
8809 rm -fr conftest*
8810 fi
8811
8812 fi
8813 fi
8814
8815 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8816 if test $ol_cv_header_stdc = yes; then
8817   cat >> confdefs.h <<\EOF
8818 #define STDC_HEADERS 1
8819 EOF
8820
8821 fi
8822 ac_cv_header_stdc=disable
8823
8824
8825 if test $ol_cv_header_stdc != yes; then
8826         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8827 fi
8828
8829 ac_header_dirent=no
8830 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8831 do
8832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8833 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8834 echo "configure:8835: checking for $ac_hdr that defines DIR" >&5
8835 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8836   echo $ac_n "(cached) $ac_c" 1>&6
8837 else
8838   cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 #include <sys/types.h>
8842 #include <$ac_hdr>
8843 int main() {
8844 DIR *dirp = 0;
8845 ; return 0; }
8846 EOF
8847 if { (eval echo configure:8848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8848   rm -rf conftest*
8849   eval "ac_cv_header_dirent_$ac_safe=yes"
8850 else
8851   echo "configure: failed program was:" >&5
8852   cat conftest.$ac_ext >&5
8853   rm -rf conftest*
8854   eval "ac_cv_header_dirent_$ac_safe=no"
8855 fi
8856 rm -f conftest*
8857 fi
8858 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8859   echo "$ac_t""yes" 1>&6
8860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8861   cat >> confdefs.h <<EOF
8862 #define $ac_tr_hdr 1
8863 EOF
8864  ac_header_dirent=$ac_hdr; break
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868 done
8869 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8870 if test $ac_header_dirent = dirent.h; then
8871 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8872 echo "configure:8873: checking for opendir in -ldir" >&5
8873 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8874 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8875   echo $ac_n "(cached) $ac_c" 1>&6
8876 else
8877   ac_save_LIBS="$LIBS"
8878 LIBS="-ldir  $LIBS"
8879 cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882 /* Override any gcc2 internal prototype to avoid an error.  */
8883 /* We use char because int might match the return type of a gcc2
8884     builtin and then its argument prototype would still apply.  */
8885 char opendir();
8886
8887 int main() {
8888 opendir()
8889 ; return 0; }
8890 EOF
8891 if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8892   rm -rf conftest*
8893   eval "ac_cv_lib_$ac_lib_var=yes"
8894 else
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   eval "ac_cv_lib_$ac_lib_var=no"
8899 fi
8900 rm -f conftest*
8901 LIBS="$ac_save_LIBS"
8902
8903 fi
8904 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8905   echo "$ac_t""yes" 1>&6
8906   LIBS="$LIBS -ldir"
8907 else
8908   echo "$ac_t""no" 1>&6
8909 fi
8910
8911 else
8912 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8913 echo "configure:8914: checking for opendir in -lx" >&5
8914 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8916   echo $ac_n "(cached) $ac_c" 1>&6
8917 else
8918   ac_save_LIBS="$LIBS"
8919 LIBS="-lx  $LIBS"
8920 cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923 /* Override any gcc2 internal prototype to avoid an error.  */
8924 /* We use char because int might match the return type of a gcc2
8925     builtin and then its argument prototype would still apply.  */
8926 char opendir();
8927
8928 int main() {
8929 opendir()
8930 ; return 0; }
8931 EOF
8932 if { (eval echo configure:8933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8933   rm -rf conftest*
8934   eval "ac_cv_lib_$ac_lib_var=yes"
8935 else
8936   echo "configure: failed program was:" >&5
8937   cat conftest.$ac_ext >&5
8938   rm -rf conftest*
8939   eval "ac_cv_lib_$ac_lib_var=no"
8940 fi
8941 rm -f conftest*
8942 LIBS="$ac_save_LIBS"
8943
8944 fi
8945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8946   echo "$ac_t""yes" 1>&6
8947   LIBS="$LIBS -lx"
8948 else
8949   echo "$ac_t""no" 1>&6
8950 fi
8951
8952 fi
8953
8954 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8955 echo "configure:8956: checking for sys/wait.h that is POSIX.1 compatible" >&5
8956 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8957   echo $ac_n "(cached) $ac_c" 1>&6
8958 else
8959   cat > conftest.$ac_ext <<EOF
8960 #line 8961 "configure"
8961 #include "confdefs.h"
8962 #include <sys/types.h>
8963 #include <sys/wait.h>
8964 #ifndef WEXITSTATUS
8965 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8966 #endif
8967 #ifndef WIFEXITED
8968 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8969 #endif
8970 int main() {
8971 int s;
8972 wait (&s);
8973 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8974 ; return 0; }
8975 EOF
8976 if { (eval echo configure:8977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8977   rm -rf conftest*
8978   ac_cv_header_sys_wait_h=yes
8979 else
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   ac_cv_header_sys_wait_h=no
8984 fi
8985 rm -f conftest*
8986 fi
8987
8988 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8989 if test $ac_cv_header_sys_wait_h = yes; then
8990   cat >> confdefs.h <<\EOF
8991 #define HAVE_SYS_WAIT_H 1
8992 EOF
8993
8994 fi
8995
8996 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8997 echo "configure:8998: checking POSIX termios" >&5
8998 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8999   echo $ac_n "(cached) $ac_c" 1>&6
9000 else
9001   cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004 #include <sys/types.h>
9005 #include <unistd.h>
9006 #include <termios.h>
9007 int main() {
9008 /* SunOS 4.0.3 has termios.h but not the library calls.  */
9009    tcgetattr(0, 0);
9010 ; return 0; }
9011 EOF
9012 if { (eval echo configure:9013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9013   rm -rf conftest*
9014   am_cv_sys_posix_termios=yes
9015 else
9016   echo "configure: failed program was:" >&5
9017   cat conftest.$ac_ext >&5
9018   rm -rf conftest*
9019   am_cv_sys_posix_termios=no
9020 fi
9021 rm -f conftest*
9022 fi
9023
9024 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
9025
9026
9027  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
9028 echo "configure:9029: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
9029 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
9033
9034   gwinsz_in_termios_h=no
9035   if test $am_cv_sys_posix_termios = yes; then
9036     cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 #include <sys/types.h>
9040 #     include <termios.h>
9041 #     ifdef TIOCGWINSZ
9042         yes
9043 #     endif
9044     
9045 EOF
9046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9047   egrep "yes" >/dev/null 2>&1; then
9048   rm -rf conftest*
9049   gwinsz_in_termios_h=yes
9050 fi
9051 rm -f conftest*
9052
9053   fi
9054
9055   if test $gwinsz_in_termios_h = no; then
9056     cat > conftest.$ac_ext <<EOF
9057 #line 9058 "configure"
9058 #include "confdefs.h"
9059 #include <sys/types.h>
9060 #     include <sys/ioctl.h>
9061 #     ifdef TIOCGWINSZ
9062         yes
9063 #     endif
9064     
9065 EOF
9066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9067   egrep "yes" >/dev/null 2>&1; then
9068   rm -rf conftest*
9069   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
9070 fi
9071 rm -f conftest*
9072
9073   fi
9074   
9075 fi
9076
9077 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
9078   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
9079     cat >> confdefs.h <<\EOF
9080 #define GWINSZ_IN_SYS_IOCTL 1
9081 EOF
9082
9083   fi
9084
9085 if test $am_cv_sys_posix_termios = yes ; then
9086         cat >> confdefs.h <<\EOF
9087 #define HAVE_POSIX_TERMIOS 1
9088 EOF
9089
9090 fi
9091
9092 for ac_hdr in \
9093         arpa/inet.h             \
9094         arpa/nameser.h  \
9095         assert.h                \
9096         bits/types.h    \
9097         conio.h                 \
9098         crypt.h                 \
9099         direct.h                \
9100         errno.h                 \
9101         fcntl.h                 \
9102         filio.h                 \
9103         getopt.h                \
9104         grp.h                   \
9105         io.h                    \
9106         libutil.h               \
9107         limits.h                \
9108         locale.h                \
9109         netinet/tcp.h   \
9110         malloc.h                \
9111         memory.h                \
9112         psap.h                  \
9113         pwd.h                   \
9114         process.h               \
9115         resolv.h                \
9116         sgtty.h                 \
9117         shadow.h                \
9118         stddef.h                \
9119         string.h                \
9120         strings.h               \
9121         sysexits.h              \
9122         sys/file.h              \
9123         sys/filio.h             \
9124         sys/errno.h             \
9125         sys/ioctl.h             \
9126         sys/param.h             \
9127         sys/resource.h  \
9128         sys/select.h    \
9129         sys/socket.h    \
9130         sys/stat.h              \
9131         sys/syslog.h    \
9132         sys/time.h              \
9133         sys/types.h             \
9134         sys/ucred.h             \
9135         sys/uio.h               \
9136         syslog.h                \
9137         termios.h               \
9138         unistd.h                \
9139         winsock.h               \
9140         winsock2.h              \
9141
9142 do
9143 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9144 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9145 echo "configure:9146: checking for $ac_hdr" >&5
9146 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9147   echo $ac_n "(cached) $ac_c" 1>&6
9148 else
9149   cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 #include <$ac_hdr>
9153 EOF
9154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9155 { (eval echo configure:9156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9157 if test -z "$ac_err"; then
9158   rm -rf conftest*
9159   eval "ac_cv_header_$ac_safe=yes"
9160 else
9161   echo "$ac_err" >&5
9162   echo "configure: failed program was:" >&5
9163   cat conftest.$ac_ext >&5
9164   rm -rf conftest*
9165   eval "ac_cv_header_$ac_safe=no"
9166 fi
9167 rm -f conftest*
9168 fi
9169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9170   echo "$ac_t""yes" 1>&6
9171     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9172   cat >> confdefs.h <<EOF
9173 #define $ac_tr_hdr 1
9174 EOF
9175  
9176 else
9177   echo "$ac_t""no" 1>&6
9178 fi
9179 done
9180
9181
9182
9183
9184 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9185 echo "configure:9186: checking for sigset in -lV3" >&5
9186 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   ac_save_LIBS="$LIBS"
9191 LIBS="-lV3  $LIBS"
9192 cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195 /* Override any gcc2 internal prototype to avoid an error.  */
9196 /* We use char because int might match the return type of a gcc2
9197     builtin and then its argument prototype would still apply.  */
9198 char sigset();
9199
9200 int main() {
9201 sigset()
9202 ; return 0; }
9203 EOF
9204 if { (eval echo configure:9205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=yes"
9207 else
9208   echo "configure: failed program was:" >&5
9209   cat conftest.$ac_ext >&5
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=no"
9212 fi
9213 rm -f conftest*
9214 LIBS="$ac_save_LIBS"
9215
9216 fi
9217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9218   echo "$ac_t""yes" 1>&6
9219     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9220     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9221   cat >> confdefs.h <<EOF
9222 #define $ac_tr_lib 1
9223 EOF
9224
9225   LIBS="-lV3 $LIBS"
9226
9227 else
9228   echo "$ac_t""no" 1>&6
9229 fi
9230
9231
9232 if test "$ac_cv_header_winsock_h" = yes; then
9233 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9234 echo "configure:9235: checking for winsock" >&5
9235 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   save_LIBS="$LIBS"
9239 for curlib in ws2_32 wsock32; do
9240         LIBS="$LIBS -l$curlib"
9241         cat > conftest.$ac_ext <<EOF
9242 #line 9243 "configure"
9243 #include "confdefs.h"
9244 #include <winsock.h>
9245                         
9246 int main() {
9247
9248                         socket(0,0,0);
9249                         select(0,NULL,NULL,NULL,NULL);
9250                         closesocket(0);
9251                         gethostname(NULL,0);
9252                         
9253 ; return 0; }
9254 EOF
9255 if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9256   rm -rf conftest*
9257   ol_cv_winsock=yes
9258 else
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   ol_cv_winsock=no
9263 fi
9264 rm -f conftest*
9265
9266         if test $ol_cv_winsock = yes; then
9267                 cat >> confdefs.h <<\EOF
9268 #define HAVE_WINSOCK 1
9269 EOF
9270
9271                 ac_cv_func_socket=yes
9272                 ac_cv_func_select=yes
9273                 ac_cv_func_closesocket=yes
9274                 ac_cv_func_gethostname=yes
9275                 if test $curlib = ws2_32; then
9276                         ol_cv_winsock=winsock2
9277                         cat >> confdefs.h <<\EOF
9278 #define HAVE_WINSOCK2 1
9279 EOF
9280
9281                 fi
9282                 break
9283         fi
9284         LIBS="$save_LIBS"
9285 done
9286 fi
9287
9288 echo "$ac_t""$ol_cv_winsock" 1>&6
9289 fi
9290
9291
9292 echo $ac_n "checking for socket""... $ac_c" 1>&6
9293 echo "configure:9294: checking for socket" >&5
9294 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9295   echo $ac_n "(cached) $ac_c" 1>&6
9296 else
9297   cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 /* System header to define __stub macros and hopefully few prototypes,
9301     which can conflict with char socket(); below.  */
9302 #include <assert.h>
9303 /* Override any gcc2 internal prototype to avoid an error.  */
9304 /* We use char because int might match the return type of a gcc2
9305     builtin and then its argument prototype would still apply.  */
9306 char socket();
9307 char (*f)();
9308
9309 int main() {
9310
9311 /* The GNU C library defines this for functions which it implements
9312     to always fail with ENOSYS.  Some functions are actually named
9313     something starting with __ and the normal name is an alias.  */
9314 #if defined (__stub_socket) || defined (__stub___socket)
9315 choke me
9316 #else
9317 f = socket;
9318 #endif
9319
9320 ; return 0; }
9321 EOF
9322 if { (eval echo configure:9323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9323   rm -rf conftest*
9324   eval "ac_cv_func_socket=yes"
9325 else
9326   echo "configure: failed program was:" >&5
9327   cat conftest.$ac_ext >&5
9328   rm -rf conftest*
9329   eval "ac_cv_func_socket=no"
9330 fi
9331 rm -f conftest*
9332 fi
9333
9334 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9335   echo "$ac_t""yes" 1>&6
9336   :
9337 else
9338   echo "$ac_t""no" 1>&6
9339         
9340         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9341 echo "configure:9342: checking for main in -lsocket" >&5
9342 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9343 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9344   echo $ac_n "(cached) $ac_c" 1>&6
9345 else
9346   ac_save_LIBS="$LIBS"
9347 LIBS="-lsocket  $LIBS"
9348 cat > conftest.$ac_ext <<EOF
9349 #line 9350 "configure"
9350 #include "confdefs.h"
9351
9352 int main() {
9353 main()
9354 ; return 0; }
9355 EOF
9356 if { (eval echo configure:9357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9357   rm -rf conftest*
9358   eval "ac_cv_lib_$ac_lib_var=yes"
9359 else
9360   echo "configure: failed program was:" >&5
9361   cat conftest.$ac_ext >&5
9362   rm -rf conftest*
9363   eval "ac_cv_lib_$ac_lib_var=no"
9364 fi
9365 rm -f conftest*
9366 LIBS="$ac_save_LIBS"
9367
9368 fi
9369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9372     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9373   cat >> confdefs.h <<EOF
9374 #define $ac_tr_lib 1
9375 EOF
9376
9377   LIBS="-lsocket $LIBS"
9378
9379 else
9380   echo "$ac_t""no" 1>&6
9381 fi
9382
9383         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9384 echo "configure:9385: checking for main in -lnet" >&5
9385 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9386 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9387   echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389   ac_save_LIBS="$LIBS"
9390 LIBS="-lnet  $LIBS"
9391 cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394
9395 int main() {
9396 main()
9397 ; return 0; }
9398 EOF
9399 if { (eval echo configure:9400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9400   rm -rf conftest*
9401   eval "ac_cv_lib_$ac_lib_var=yes"
9402 else
9403   echo "configure: failed program was:" >&5
9404   cat conftest.$ac_ext >&5
9405   rm -rf conftest*
9406   eval "ac_cv_lib_$ac_lib_var=no"
9407 fi
9408 rm -f conftest*
9409 LIBS="$ac_save_LIBS"
9410
9411 fi
9412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9413   echo "$ac_t""yes" 1>&6
9414     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9415     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9416   cat >> confdefs.h <<EOF
9417 #define $ac_tr_lib 1
9418 EOF
9419
9420   LIBS="-lnet $LIBS"
9421
9422 else
9423   echo "$ac_t""no" 1>&6
9424 fi
9425
9426         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9427 echo "configure:9428: checking for main in -lnsl_s" >&5
9428 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9430   echo $ac_n "(cached) $ac_c" 1>&6
9431 else
9432   ac_save_LIBS="$LIBS"
9433 LIBS="-lnsl_s  $LIBS"
9434 cat > conftest.$ac_ext <<EOF
9435 #line 9436 "configure"
9436 #include "confdefs.h"
9437
9438 int main() {
9439 main()
9440 ; return 0; }
9441 EOF
9442 if { (eval echo configure:9443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9443   rm -rf conftest*
9444   eval "ac_cv_lib_$ac_lib_var=yes"
9445 else
9446   echo "configure: failed program was:" >&5
9447   cat conftest.$ac_ext >&5
9448   rm -rf conftest*
9449   eval "ac_cv_lib_$ac_lib_var=no"
9450 fi
9451 rm -f conftest*
9452 LIBS="$ac_save_LIBS"
9453
9454 fi
9455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9456   echo "$ac_t""yes" 1>&6
9457     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9458     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9459   cat >> confdefs.h <<EOF
9460 #define $ac_tr_lib 1
9461 EOF
9462
9463   LIBS="-lnsl_s $LIBS"
9464
9465 else
9466   echo "$ac_t""no" 1>&6
9467 fi
9468
9469         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9470 echo "configure:9471: checking for main in -lnsl" >&5
9471 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9473   echo $ac_n "(cached) $ac_c" 1>&6
9474 else
9475   ac_save_LIBS="$LIBS"
9476 LIBS="-lnsl  $LIBS"
9477 cat > conftest.$ac_ext <<EOF
9478 #line 9479 "configure"
9479 #include "confdefs.h"
9480
9481 int main() {
9482 main()
9483 ; return 0; }
9484 EOF
9485 if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9486   rm -rf conftest*
9487   eval "ac_cv_lib_$ac_lib_var=yes"
9488 else
9489   echo "configure: failed program was:" >&5
9490   cat conftest.$ac_ext >&5
9491   rm -rf conftest*
9492   eval "ac_cv_lib_$ac_lib_var=no"
9493 fi
9494 rm -f conftest*
9495 LIBS="$ac_save_LIBS"
9496
9497 fi
9498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9499   echo "$ac_t""yes" 1>&6
9500     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9501     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9502   cat >> confdefs.h <<EOF
9503 #define $ac_tr_lib 1
9504 EOF
9505
9506   LIBS="-lnsl $LIBS"
9507
9508 else
9509   echo "$ac_t""no" 1>&6
9510 fi
9511
9512         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9513 echo "configure:9514: checking for socket in -linet" >&5
9514 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9516   echo $ac_n "(cached) $ac_c" 1>&6
9517 else
9518   ac_save_LIBS="$LIBS"
9519 LIBS="-linet  $LIBS"
9520 cat > conftest.$ac_ext <<EOF
9521 #line 9522 "configure"
9522 #include "confdefs.h"
9523 /* Override any gcc2 internal prototype to avoid an error.  */
9524 /* We use char because int might match the return type of a gcc2
9525     builtin and then its argument prototype would still apply.  */
9526 char socket();
9527
9528 int main() {
9529 socket()
9530 ; return 0; }
9531 EOF
9532 if { (eval echo configure:9533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9533   rm -rf conftest*
9534   eval "ac_cv_lib_$ac_lib_var=yes"
9535 else
9536   echo "configure: failed program was:" >&5
9537   cat conftest.$ac_ext >&5
9538   rm -rf conftest*
9539   eval "ac_cv_lib_$ac_lib_var=no"
9540 fi
9541 rm -f conftest*
9542 LIBS="$ac_save_LIBS"
9543
9544 fi
9545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9546   echo "$ac_t""yes" 1>&6
9547     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9548     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9549   cat >> confdefs.h <<EOF
9550 #define $ac_tr_lib 1
9551 EOF
9552
9553   LIBS="-linet $LIBS"
9554
9555 else
9556   echo "$ac_t""no" 1>&6
9557 fi
9558
9559         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9560 echo "configure:9561: checking for main in -lgen" >&5
9561 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9563   echo $ac_n "(cached) $ac_c" 1>&6
9564 else
9565   ac_save_LIBS="$LIBS"
9566 LIBS="-lgen  $LIBS"
9567 cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570
9571 int main() {
9572 main()
9573 ; return 0; }
9574 EOF
9575 if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9576   rm -rf conftest*
9577   eval "ac_cv_lib_$ac_lib_var=yes"
9578 else
9579   echo "configure: failed program was:" >&5
9580   cat conftest.$ac_ext >&5
9581   rm -rf conftest*
9582   eval "ac_cv_lib_$ac_lib_var=no"
9583 fi
9584 rm -f conftest*
9585 LIBS="$ac_save_LIBS"
9586
9587 fi
9588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9589   echo "$ac_t""yes" 1>&6
9590     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9591     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9592   cat >> confdefs.h <<EOF
9593 #define $ac_tr_lib 1
9594 EOF
9595
9596   LIBS="-lgen $LIBS"
9597
9598 else
9599   echo "$ac_t""no" 1>&6
9600 fi
9601
9602
9603 fi
9604
9605
9606 echo $ac_n "checking for select""... $ac_c" 1>&6
9607 echo "configure:9608: checking for select" >&5
9608 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611   cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 /* System header to define __stub macros and hopefully few prototypes,
9615     which can conflict with char select(); below.  */
9616 #include <assert.h>
9617 /* Override any gcc2 internal prototype to avoid an error.  */
9618 /* We use char because int might match the return type of a gcc2
9619     builtin and then its argument prototype would still apply.  */
9620 char select();
9621 char (*f)();
9622
9623 int main() {
9624
9625 /* The GNU C library defines this for functions which it implements
9626     to always fail with ENOSYS.  Some functions are actually named
9627     something starting with __ and the normal name is an alias.  */
9628 #if defined (__stub_select) || defined (__stub___select)
9629 choke me
9630 #else
9631 f = select;
9632 #endif
9633
9634 ; return 0; }
9635 EOF
9636 if { (eval echo configure:9637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9637   rm -rf conftest*
9638   eval "ac_cv_func_select=yes"
9639 else
9640   echo "configure: failed program was:" >&5
9641   cat conftest.$ac_ext >&5
9642   rm -rf conftest*
9643   eval "ac_cv_func_select=no"
9644 fi
9645 rm -f conftest*
9646 fi
9647
9648 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9649   echo "$ac_t""yes" 1>&6
9650   :
9651 else
9652   echo "$ac_t""no" 1>&6
9653 { echo "configure: error: select() required." 1>&2; exit 1; }
9654 fi
9655
9656
9657 if test "${ac_cv_header_winsock_h}" != yes; then
9658                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9659 echo "configure:9660: checking types of arguments for select()" >&5
9660  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9661   echo $ac_n "(cached) $ac_c" 1>&6
9662 else
9663    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9664   echo $ac_n "(cached) $ac_c" 1>&6
9665 else
9666     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9667   echo $ac_n "(cached) $ac_c" 1>&6
9668 else
9669      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9670      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9671       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9672        cat > conftest.$ac_ext <<EOF
9673 #line 9674 "configure"
9674 #include "confdefs.h"
9675 #ifdef HAVE_SYS_TYPES_H
9676 #include <sys/types.h>
9677 #endif
9678 #ifdef HAVE_SYS_TIME_H
9679 #include <sys/time.h>
9680 #endif
9681 #ifdef HAVE_SYS_SELECT_H
9682 #include <sys/select.h>
9683 #endif
9684 #ifdef HAVE_SYS_SOCKET_H
9685 #include <sys/socket.h>
9686 #endif
9687 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);
9688 int main() {
9689
9690 ; return 0; }
9691 EOF
9692 if { (eval echo configure:9693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9693   rm -rf conftest*
9694           ac_not_found=no ; break 3
9695 else
9696   echo "configure: failed program was:" >&5
9697   cat conftest.$ac_ext >&5
9698   rm -rf conftest*
9699   ac_not_found=yes
9700 fi
9701 rm -f conftest*
9702       done
9703      done
9704     done
9705    
9706 fi
9707   
9708 fi
9709  
9710 fi
9711  if test "$ac_not_found" = yes; then
9712   ac_cv_func_select_arg1=int 
9713   ac_cv_func_select_arg234='int *' 
9714   ac_cv_func_select_arg5='struct timeval *'
9715  fi
9716  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9717  cat >> confdefs.h <<EOF
9718 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9719 EOF
9720
9721  cat >> confdefs.h <<EOF
9722 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9723 EOF
9724
9725  cat >> confdefs.h <<EOF
9726 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9727 EOF
9728
9729
9730 fi
9731
9732
9733 for ac_hdr in regex.h 
9734 do
9735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9737 echo "configure:9738: checking for $ac_hdr" >&5
9738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9739   echo $ac_n "(cached) $ac_c" 1>&6
9740 else
9741   cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 #include <$ac_hdr>
9745 EOF
9746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9747 { (eval echo configure:9748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9749 if test -z "$ac_err"; then
9750   rm -rf conftest*
9751   eval "ac_cv_header_$ac_safe=yes"
9752 else
9753   echo "$ac_err" >&5
9754   echo "configure: failed program was:" >&5
9755   cat conftest.$ac_ext >&5
9756   rm -rf conftest*
9757   eval "ac_cv_header_$ac_safe=no"
9758 fi
9759 rm -f conftest*
9760 fi
9761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9762   echo "$ac_t""yes" 1>&6
9763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9764   cat >> confdefs.h <<EOF
9765 #define $ac_tr_hdr 1
9766 EOF
9767  
9768 else
9769   echo "$ac_t""no" 1>&6
9770 fi
9771 done
9772
9773 if test "$ac_cv_header_regex_h" != yes ; then
9774         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9775 fi
9776
9777 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9778 echo "configure:9779: checking for library containing regfree" >&5
9779 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9780   echo $ac_n "(cached) $ac_c" 1>&6
9781 else
9782   ac_func_search_save_LIBS="$LIBS"
9783 ac_cv_search_regfree="no"
9784 cat > conftest.$ac_ext <<EOF
9785 #line 9786 "configure"
9786 #include "confdefs.h"
9787 /* Override any gcc2 internal prototype to avoid an error.  */
9788 /* We use char because int might match the return type of a gcc2
9789     builtin and then its argument prototype would still apply.  */
9790 char regfree();
9791
9792 int main() {
9793 regfree()
9794 ; return 0; }
9795 EOF
9796 if { (eval echo configure:9797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9797   rm -rf conftest*
9798   ac_cv_search_regfree="none required"
9799 else
9800   echo "configure: failed program was:" >&5
9801   cat conftest.$ac_ext >&5
9802 fi
9803 rm -f conftest*
9804 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9805 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9806 cat > conftest.$ac_ext <<EOF
9807 #line 9808 "configure"
9808 #include "confdefs.h"
9809 /* Override any gcc2 internal prototype to avoid an error.  */
9810 /* We use char because int might match the return type of a gcc2
9811     builtin and then its argument prototype would still apply.  */
9812 char regfree();
9813
9814 int main() {
9815 regfree()
9816 ; return 0; }
9817 EOF
9818 if { (eval echo configure:9819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9819   rm -rf conftest*
9820   ac_cv_search_regfree="-l$ac_lib"
9821 break
9822 else
9823   echo "configure: failed program was:" >&5
9824   cat conftest.$ac_ext >&5
9825 fi
9826 rm -f conftest*
9827 done
9828 LIBS="$ac_func_search_save_LIBS"
9829 fi
9830
9831 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9832 if test "$ac_cv_search_regfree" != "no"; then
9833   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9834   :
9835 else :
9836   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9837 fi
9838
9839
9840 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9841 echo "configure:9842: checking for compatible POSIX regex" >&5
9842 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9843   echo $ac_n "(cached) $ac_c" 1>&6
9844 else
9845   
9846         if test "$cross_compiling" = yes; then
9847   ol_cv_c_posix_regex=cross
9848 else
9849   cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852
9853 #include <sys/types.h>
9854 #include <regex.h>
9855 static char *pattern, *string;
9856 main()
9857 {
9858         int rc;
9859         regex_t re;
9860
9861         pattern = "^A";
9862
9863         if(regcomp(&re, pattern, 0)) {
9864                 return -1;
9865         }
9866         
9867         string = "ALL MATCH";
9868         
9869         rc = regexec(&re, string, 0, (void*)0, 0);
9870
9871         regfree(&re);
9872
9873         return rc;
9874 }
9875 EOF
9876 if { (eval echo configure:9877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9877 then
9878   ol_cv_c_posix_regex=yes
9879 else
9880   echo "configure: failed program was:" >&5
9881   cat conftest.$ac_ext >&5
9882   rm -fr conftest*
9883   ol_cv_c_posix_regex=no
9884 fi
9885 rm -fr conftest*
9886 fi
9887
9888 fi
9889
9890 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9891
9892 if test "$ol_cv_c_posix_regex" = no ; then
9893         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9894 fi
9895
9896
9897 have_uuid=no
9898 for ac_hdr in sys/uuid.h
9899 do
9900 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9901 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9902 echo "configure:9903: checking for $ac_hdr" >&5
9903 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9904   echo $ac_n "(cached) $ac_c" 1>&6
9905 else
9906   cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 #include <$ac_hdr>
9910 EOF
9911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9912 { (eval echo configure:9913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9914 if test -z "$ac_err"; then
9915   rm -rf conftest*
9916   eval "ac_cv_header_$ac_safe=yes"
9917 else
9918   echo "$ac_err" >&5
9919   echo "configure: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   rm -rf conftest*
9922   eval "ac_cv_header_$ac_safe=no"
9923 fi
9924 rm -f conftest*
9925 fi
9926 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9927   echo "$ac_t""yes" 1>&6
9928     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9929   cat >> confdefs.h <<EOF
9930 #define $ac_tr_hdr 1
9931 EOF
9932  
9933 else
9934   echo "$ac_t""no" 1>&6
9935 fi
9936 done
9937
9938 if test $ac_cv_header_sys_uuid_h = yes ; then
9939         save_LIBS="$LIBS"
9940         
9941 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9942 echo "configure:9943: checking for library containing uuid_to_str" >&5
9943 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9944   echo $ac_n "(cached) $ac_c" 1>&6
9945 else
9946   ac_func_search_save_LIBS="$LIBS"
9947 ac_cv_search_uuid_to_str="no"
9948 cat > conftest.$ac_ext <<EOF
9949 #line 9950 "configure"
9950 #include "confdefs.h"
9951 /* Override any gcc2 internal prototype to avoid an error.  */
9952 /* We use char because int might match the return type of a gcc2
9953     builtin and then its argument prototype would still apply.  */
9954 char uuid_to_str();
9955
9956 int main() {
9957 uuid_to_str()
9958 ; return 0; }
9959 EOF
9960 if { (eval echo configure:9961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9961   rm -rf conftest*
9962   ac_cv_search_uuid_to_str="none required"
9963 else
9964   echo "configure: failed program was:" >&5
9965   cat conftest.$ac_ext >&5
9966 fi
9967 rm -f conftest*
9968 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9969 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9970 cat > conftest.$ac_ext <<EOF
9971 #line 9972 "configure"
9972 #include "confdefs.h"
9973 /* Override any gcc2 internal prototype to avoid an error.  */
9974 /* We use char because int might match the return type of a gcc2
9975     builtin and then its argument prototype would still apply.  */
9976 char uuid_to_str();
9977
9978 int main() {
9979 uuid_to_str()
9980 ; return 0; }
9981 EOF
9982 if { (eval echo configure:9983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9983   rm -rf conftest*
9984   ac_cv_search_uuid_to_str="-l$ac_lib"
9985 break
9986 else
9987   echo "configure: failed program was:" >&5
9988   cat conftest.$ac_ext >&5
9989 fi
9990 rm -f conftest*
9991 done
9992 LIBS="$ac_func_search_save_LIBS"
9993 fi
9994
9995 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9996 if test "$ac_cv_search_uuid_to_str" != "no"; then
9997   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9998   have_uuid=yes
9999 else :
10000   :
10001 fi
10002         LIBS="$save_LIBS"
10003
10004         if test have_uuid = yes ; then
10005                 cat >> confdefs.h <<\EOF
10006 #define HAVE_UUID_TO_STR 1
10007 EOF
10008
10009
10010                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10011                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10012         fi
10013 fi
10014
10015 if test $have_uuid = no ; then
10016         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10017 echo "configure:10018: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10018         save_LIBS="$LIBS"
10019         LIBS="$LIBS -lrpcrt4"
10020         cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023
10024                 int __stdcall UuidCreate(void *);
10025                 int __stdcall UuidToStringA(void *,void **);
10026                 
10027 int main() {
10028
10029                 UuidCreate(0);
10030                 UuidToStringA(0,0);
10031                 
10032 ; return 0; }
10033 EOF
10034 if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10035   rm -rf conftest*
10036   need_rpcrt=yes
10037 else
10038   echo "configure: failed program was:" >&5
10039   cat conftest.$ac_ext >&5
10040   rm -rf conftest*
10041   need_rpcrt=no
10042 fi
10043 rm -f conftest*
10044         if test $need_rpcrt = yes; then
10045                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10046         fi
10047         LIBS="$save_LIBS"
10048         echo "$ac_t""$need_rpcrt" 1>&6
10049 fi
10050
10051 ol_link_dnssrv=no
10052 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10053 echo "configure:10054: checking for res_query" >&5
10054 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10055   echo $ac_n "(cached) $ac_c" 1>&6
10056 else
10057   cat > conftest.$ac_ext <<EOF
10058 #line 10059 "configure"
10059 #include "confdefs.h"
10060 /* System header to define __stub macros and hopefully few prototypes,
10061     which can conflict with char res_query(); below.  */
10062 #include <assert.h>
10063 /* Override any gcc2 internal prototype to avoid an error.  */
10064 /* We use char because int might match the return type of a gcc2
10065     builtin and then its argument prototype would still apply.  */
10066 char res_query();
10067 char (*f)();
10068
10069 int main() {
10070
10071 /* The GNU C library defines this for functions which it implements
10072     to always fail with ENOSYS.  Some functions are actually named
10073     something starting with __ and the normal name is an alias.  */
10074 #if defined (__stub_res_query) || defined (__stub___res_query)
10075 choke me
10076 #else
10077 f = res_query;
10078 #endif
10079
10080 ; return 0; }
10081 EOF
10082 if { (eval echo configure:10083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10083   rm -rf conftest*
10084   eval "ac_cv_func_res_query=yes"
10085 else
10086   echo "configure: failed program was:" >&5
10087   cat conftest.$ac_ext >&5
10088   rm -rf conftest*
10089   eval "ac_cv_func_res_query=no"
10090 fi
10091 rm -f conftest*
10092 fi
10093
10094 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10095   echo "$ac_t""yes" 1>&6
10096   :
10097 else
10098   echo "$ac_t""no" 1>&6
10099 fi
10100
10101 if test $ac_cv_func_res_query = no ; then 
10102         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10103 echo "configure:10104: checking for __res_query" >&5
10104 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   cat > conftest.$ac_ext <<EOF
10108 #line 10109 "configure"
10109 #include "confdefs.h"
10110 /* System header to define __stub macros and hopefully few prototypes,
10111     which can conflict with char __res_query(); below.  */
10112 #include <assert.h>
10113 /* Override any gcc2 internal prototype to avoid an error.  */
10114 /* We use char because int might match the return type of a gcc2
10115     builtin and then its argument prototype would still apply.  */
10116 char __res_query();
10117 char (*f)();
10118
10119 int main() {
10120
10121 /* The GNU C library defines this for functions which it implements
10122     to always fail with ENOSYS.  Some functions are actually named
10123     something starting with __ and the normal name is an alias.  */
10124 #if defined (__stub___res_query) || defined (__stub_____res_query)
10125 choke me
10126 #else
10127 f = __res_query;
10128 #endif
10129
10130 ; return 0; }
10131 EOF
10132 if { (eval echo configure:10133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10133   rm -rf conftest*
10134   eval "ac_cv_func___res_query=yes"
10135 else
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_func___res_query=no"
10140 fi
10141 rm -f conftest*
10142 fi
10143
10144 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10145   echo "$ac_t""yes" 1>&6
10146   :
10147 else
10148   echo "$ac_t""no" 1>&6
10149 fi
10150
10151         ac_cv_func_res_query=$ac_cv_func___res_query
10152 fi
10153
10154 if test $ac_cv_func_res_query = no ; then 
10155         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10156 echo "configure:10157: checking for res_query in -lbind" >&5
10157 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   ac_save_LIBS="$LIBS"
10162 LIBS="-lbind  $LIBS"
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 /* Override any gcc2 internal prototype to avoid an error.  */
10167 /* We use char because int might match the return type of a gcc2
10168     builtin and then its argument prototype would still apply.  */
10169 char res_query();
10170
10171 int main() {
10172 res_query()
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_lib_$ac_lib_var=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_lib_$ac_lib_var=no"
10183 fi
10184 rm -f conftest*
10185 LIBS="$ac_save_LIBS"
10186
10187 fi
10188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10191     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10192   cat >> confdefs.h <<EOF
10193 #define $ac_tr_lib 1
10194 EOF
10195
10196   LIBS="-lbind $LIBS"
10197
10198 else
10199   echo "$ac_t""no" 1>&6
10200 fi
10201
10202         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10203 fi
10204
10205 if test $ac_cv_func_res_query = no ; then 
10206         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10207 echo "configure:10208: checking for __res_query in -lbind" >&5
10208 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10209 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   ac_save_LIBS="$LIBS"
10213 LIBS="-lbind  $LIBS"
10214 cat > conftest.$ac_ext <<EOF
10215 #line 10216 "configure"
10216 #include "confdefs.h"
10217 /* Override any gcc2 internal prototype to avoid an error.  */
10218 /* We use char because int might match the return type of a gcc2
10219     builtin and then its argument prototype would still apply.  */
10220 char __res_query();
10221
10222 int main() {
10223 __res_query()
10224 ; return 0; }
10225 EOF
10226 if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10227   rm -rf conftest*
10228   eval "ac_cv_lib_$ac_lib_var=yes"
10229 else
10230   echo "configure: failed program was:" >&5
10231   cat conftest.$ac_ext >&5
10232   rm -rf conftest*
10233   eval "ac_cv_lib_$ac_lib_var=no"
10234 fi
10235 rm -f conftest*
10236 LIBS="$ac_save_LIBS"
10237
10238 fi
10239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10240   echo "$ac_t""yes" 1>&6
10241     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10242     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10243   cat >> confdefs.h <<EOF
10244 #define $ac_tr_lib 1
10245 EOF
10246
10247   LIBS="-lbind $LIBS"
10248
10249 else
10250   echo "$ac_t""no" 1>&6
10251 fi
10252
10253         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10254 fi
10255
10256 if test $ac_cv_func_res_query = no ; then 
10257         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10258 echo "configure:10259: checking for res_query in -lresolv" >&5
10259 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   ac_save_LIBS="$LIBS"
10264 LIBS="-lresolv  $LIBS"
10265 cat > conftest.$ac_ext <<EOF
10266 #line 10267 "configure"
10267 #include "confdefs.h"
10268 /* Override any gcc2 internal prototype to avoid an error.  */
10269 /* We use char because int might match the return type of a gcc2
10270     builtin and then its argument prototype would still apply.  */
10271 char res_query();
10272
10273 int main() {
10274 res_query()
10275 ; return 0; }
10276 EOF
10277 if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10278   rm -rf conftest*
10279   eval "ac_cv_lib_$ac_lib_var=yes"
10280 else
10281   echo "configure: failed program was:" >&5
10282   cat conftest.$ac_ext >&5
10283   rm -rf conftest*
10284   eval "ac_cv_lib_$ac_lib_var=no"
10285 fi
10286 rm -f conftest*
10287 LIBS="$ac_save_LIBS"
10288
10289 fi
10290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10291   echo "$ac_t""yes" 1>&6
10292     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10293     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10294   cat >> confdefs.h <<EOF
10295 #define $ac_tr_lib 1
10296 EOF
10297
10298   LIBS="-lresolv $LIBS"
10299
10300 else
10301   echo "$ac_t""no" 1>&6
10302 fi
10303
10304         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10305 fi
10306
10307 if test $ac_cv_func_res_query = no ; then 
10308         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10309 echo "configure:10310: checking for __res_query in -lresolv" >&5
10310 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10312   echo $ac_n "(cached) $ac_c" 1>&6
10313 else
10314   ac_save_LIBS="$LIBS"
10315 LIBS="-lresolv  $LIBS"
10316 cat > conftest.$ac_ext <<EOF
10317 #line 10318 "configure"
10318 #include "confdefs.h"
10319 /* Override any gcc2 internal prototype to avoid an error.  */
10320 /* We use char because int might match the return type of a gcc2
10321     builtin and then its argument prototype would still apply.  */
10322 char __res_query();
10323
10324 int main() {
10325 __res_query()
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10329   rm -rf conftest*
10330   eval "ac_cv_lib_$ac_lib_var=yes"
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   eval "ac_cv_lib_$ac_lib_var=no"
10336 fi
10337 rm -f conftest*
10338 LIBS="$ac_save_LIBS"
10339
10340 fi
10341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10342   echo "$ac_t""yes" 1>&6
10343     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10345   cat >> confdefs.h <<EOF
10346 #define $ac_tr_lib 1
10347 EOF
10348
10349   LIBS="-lresolv $LIBS"
10350
10351 else
10352   echo "$ac_t""no" 1>&6
10353 fi
10354
10355         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10356 fi
10357
10358 if test "$ac_cv_func_res_query" = yes ; then
10359         cat >> confdefs.h <<\EOF
10360 #define HAVE_RES_QUERY 1
10361 EOF
10362
10363
10364         if test $ol_enable_dnssrv != no ; then
10365                 ol_link_dnssrv=yes
10366         fi
10367 fi
10368
10369 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10370         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10371 fi
10372
10373 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10374 do
10375 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10376 echo "configure:10377: checking for $ac_func" >&5
10377 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   cat > conftest.$ac_ext <<EOF
10381 #line 10382 "configure"
10382 #include "confdefs.h"
10383 /* System header to define __stub macros and hopefully few prototypes,
10384     which can conflict with char $ac_func(); below.  */
10385 #include <assert.h>
10386 /* Override any gcc2 internal prototype to avoid an error.  */
10387 /* We use char because int might match the return type of a gcc2
10388     builtin and then its argument prototype would still apply.  */
10389 char $ac_func();
10390 char (*f)();
10391
10392 int main() {
10393
10394 /* The GNU C library defines this for functions which it implements
10395     to always fail with ENOSYS.  Some functions are actually named
10396     something starting with __ and the normal name is an alias.  */
10397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10398 choke me
10399 #else
10400 f = $ac_func;
10401 #endif
10402
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10406   rm -rf conftest*
10407   eval "ac_cv_func_$ac_func=yes"
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_func_$ac_func=no"
10413 fi
10414 rm -f conftest*
10415 fi
10416
10417 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10418   echo "$ac_t""yes" 1>&6
10419     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10420   cat >> confdefs.h <<EOF
10421 #define $ac_tr_func 1
10422 EOF
10423  
10424 else
10425   echo "$ac_t""no" 1>&6
10426 fi
10427 done
10428
10429
10430 ol_link_ipv6=no
10431 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10432         if test $ol_enable_ipv6 = yes ; then
10433                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10434         fi
10435 elif test $ol_enable_ipv6 != no ; then
10436         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10437 echo "configure:10438: checking INET6_ADDRSTRLEN" >&5
10438 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10439   echo $ac_n "(cached) $ac_c" 1>&6
10440 else
10441   
10442                 cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445
10446 #                       include <netinet/in.h>
10447 #                       ifdef INET6_ADDRSTRLEN
10448                                 __has_inet6_addrstrlen__;
10449 #                       endif
10450                 
10451 EOF
10452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10453   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10454   rm -rf conftest*
10455   ol_cv_inet6_addrstrlen=yes
10456 else
10457   rm -rf conftest*
10458   ol_cv_inet6_addrstrlen=no
10459 fi
10460 rm -f conftest*
10461
10462 fi
10463
10464 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10465
10466
10467         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10468 echo "configure:10469: checking struct sockaddr_storage" >&5
10469 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10470   echo $ac_n "(cached) $ac_c" 1>&6
10471 else
10472   
10473                 cat > conftest.$ac_ext <<EOF
10474 #line 10475 "configure"
10475 #include "confdefs.h"
10476
10477 #include <sys/types.h>
10478 #include <sys/socket.h>
10479
10480 int main() {
10481
10482                         struct sockaddr_storage ss;
10483
10484 ; return 0; }
10485 EOF
10486 if { (eval echo configure:10487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10487   rm -rf conftest*
10488   ol_cv_struct_sockaddr_storage=yes
10489 else
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   ol_cv_struct_sockaddr_storage=no
10494 fi
10495 rm -f conftest*
10496 fi
10497
10498 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10499
10500         if test $ol_cv_inet6_addrstrlen = yes \
10501                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10502                 ol_link_ipv6=yes
10503         elif test $ol_enable_ipv6 = yes \
10504                         -a $ol_cv_inet6_addrstrlen = no ; then
10505                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10506         elif test $ol_enable_ipv6 = yes \
10507                         -a $ol_cv_struct_sockaddr_storage = no ; then
10508                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10509         fi
10510 fi
10511
10512 if test $ol_enable_local != no ; then
10513         for ac_hdr in sys/un.h 
10514 do
10515 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10516 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10517 echo "configure:10518: checking for $ac_hdr" >&5
10518 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10519   echo $ac_n "(cached) $ac_c" 1>&6
10520 else
10521   cat > conftest.$ac_ext <<EOF
10522 #line 10523 "configure"
10523 #include "confdefs.h"
10524 #include <$ac_hdr>
10525 EOF
10526 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10527 { (eval echo configure:10528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10528 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10529 if test -z "$ac_err"; then
10530   rm -rf conftest*
10531   eval "ac_cv_header_$ac_safe=yes"
10532 else
10533   echo "$ac_err" >&5
10534   echo "configure: failed program was:" >&5
10535   cat conftest.$ac_ext >&5
10536   rm -rf conftest*
10537   eval "ac_cv_header_$ac_safe=no"
10538 fi
10539 rm -f conftest*
10540 fi
10541 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10542   echo "$ac_t""yes" 1>&6
10543     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10544   cat >> confdefs.h <<EOF
10545 #define $ac_tr_hdr 1
10546 EOF
10547  
10548 else
10549   echo "$ac_t""no" 1>&6
10550 fi
10551 done
10552
10553
10554         if test $ol_enable_local = auto ; then
10555                 ol_enable_local=$ac_cv_header_sys_un_h
10556         elif test $ac_cv_header_sys_un_h = no ; then
10557                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10558         fi
10559 fi
10560
10561 ol_link_kbind=no
10562 ol_link_krb5=no
10563 ol_link_krb4=no
10564
10565 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10566         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10567         -o $ol_with_kerberos = k425 ; then
10568
10569         for ac_hdr in krb5.h
10570 do
10571 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10572 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10573 echo "configure:10574: checking for $ac_hdr" >&5
10574 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10575   echo $ac_n "(cached) $ac_c" 1>&6
10576 else
10577   cat > conftest.$ac_ext <<EOF
10578 #line 10579 "configure"
10579 #include "confdefs.h"
10580 #include <$ac_hdr>
10581 EOF
10582 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10583 { (eval echo configure:10584: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10584 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10585 if test -z "$ac_err"; then
10586   rm -rf conftest*
10587   eval "ac_cv_header_$ac_safe=yes"
10588 else
10589   echo "$ac_err" >&5
10590   echo "configure: failed program was:" >&5
10591   cat conftest.$ac_ext >&5
10592   rm -rf conftest*
10593   eval "ac_cv_header_$ac_safe=no"
10594 fi
10595 rm -f conftest*
10596 fi
10597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10598   echo "$ac_t""yes" 1>&6
10599     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10600   cat >> confdefs.h <<EOF
10601 #define $ac_tr_hdr 1
10602 EOF
10603  
10604 else
10605   echo "$ac_t""no" 1>&6
10606 fi
10607 done
10608
10609
10610         if test $ac_cv_header_krb5_h = yes ; then
10611                                 for ac_hdr in heim_err.h
10612 do
10613 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10614 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10615 echo "configure:10616: checking for $ac_hdr" >&5
10616 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10617   echo $ac_n "(cached) $ac_c" 1>&6
10618 else
10619   cat > conftest.$ac_ext <<EOF
10620 #line 10621 "configure"
10621 #include "confdefs.h"
10622 #include <$ac_hdr>
10623 EOF
10624 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10625 { (eval echo configure:10626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10626 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10627 if test -z "$ac_err"; then
10628   rm -rf conftest*
10629   eval "ac_cv_header_$ac_safe=yes"
10630 else
10631   echo "$ac_err" >&5
10632   echo "configure: failed program was:" >&5
10633   cat conftest.$ac_ext >&5
10634   rm -rf conftest*
10635   eval "ac_cv_header_$ac_safe=no"
10636 fi
10637 rm -f conftest*
10638 fi
10639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10640   echo "$ac_t""yes" 1>&6
10641     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10642   cat >> confdefs.h <<EOF
10643 #define $ac_tr_hdr 1
10644 EOF
10645  
10646 else
10647   echo "$ac_t""no" 1>&6
10648 fi
10649 done
10650
10651                 if test $ac_cv_header_heim_err_h = yes ; then
10652                         krb5_impl=heimdal
10653                 else
10654                         krb5_impl=mit
10655                 fi
10656
10657                 if test $krb5_impl = mit; then
10658                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10659 echo "configure:10660: checking for main in -lk5crypto" >&5
10660 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10661 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10662   echo $ac_n "(cached) $ac_c" 1>&6
10663 else
10664   ac_save_LIBS="$LIBS"
10665 LIBS="-lk5crypto  $LIBS"
10666 cat > conftest.$ac_ext <<EOF
10667 #line 10668 "configure"
10668 #include "confdefs.h"
10669
10670 int main() {
10671 main()
10672 ; return 0; }
10673 EOF
10674 if { (eval echo configure:10675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=yes"
10677 else
10678   echo "configure: failed program was:" >&5
10679   cat conftest.$ac_ext >&5
10680   rm -rf conftest*
10681   eval "ac_cv_lib_$ac_lib_var=no"
10682 fi
10683 rm -f conftest*
10684 LIBS="$ac_save_LIBS"
10685
10686 fi
10687 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10688   echo "$ac_t""yes" 1>&6
10689   krb5crypto=k5crypto
10690 else
10691   echo "$ac_t""no" 1>&6
10692 krb5crypto=crypto
10693 fi
10694
10695
10696                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10697 echo "configure:10698: checking for main in -lkrb5" >&5
10698 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   ac_save_LIBS="$LIBS"
10703 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707
10708 int main() {
10709 main()
10710 ; return 0; }
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=yes"
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=no"
10720 fi
10721 rm -f conftest*
10722 LIBS="$ac_save_LIBS"
10723
10724 fi
10725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727   have_krb5=yes
10728                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10729 else
10730   echo "$ac_t""no" 1>&6
10731 have_krb5=no
10732 fi
10733
10734
10735                 elif test $krb5_impl = heimdal; then
10736                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10737 echo "configure:10738: checking for main in -ldes" >&5
10738 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   ac_save_LIBS="$LIBS"
10743 LIBS="-ldes  $LIBS"
10744 cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 int main() {
10749 main()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 LIBS="$ac_save_LIBS"
10763
10764 fi
10765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767   krb5crypto=des
10768 else
10769   echo "$ac_t""no" 1>&6
10770 krb5crypto=crypto
10771 fi
10772
10773
10774                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10775 echo "configure:10776: checking for main in -lkrb5" >&5
10776 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10777 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10778   echo $ac_n "(cached) $ac_c" 1>&6
10779 else
10780   ac_save_LIBS="$LIBS"
10781 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10782 cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785
10786 int main() {
10787 main()
10788 ; return 0; }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10791   rm -rf conftest*
10792   eval "ac_cv_lib_$ac_lib_var=yes"
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=no"
10798 fi
10799 rm -f conftest*
10800 LIBS="$ac_save_LIBS"
10801
10802 fi
10803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10804   echo "$ac_t""yes" 1>&6
10805   have_krb5=yes
10806                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10807 else
10808   echo "$ac_t""no" 1>&6
10809 have_krb5=no
10810 fi
10811
10812
10813                         cat >> confdefs.h <<\EOF
10814 #define HAVE_HEIMDAL_KERBEROS 1
10815 EOF
10816
10817
10818                 else
10819                         have_krb5=no
10820                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10821                 fi
10822
10823                 if test $have_krb5 = yes ; then
10824                         ol_link_krb5=yes
10825
10826                         cat >> confdefs.h <<\EOF
10827 #define HAVE_KRB5 1
10828 EOF
10829
10830
10831                         if test $ol_with_kerberos = k5only ; then
10832                                 ol_with_kerberos=found
10833                         fi
10834
10835                 elif test $ol_with_kerberos != auto ; then
10836                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10837                 fi
10838
10839         fi
10840 fi
10841
10842 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10843         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10844
10845         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10846 do
10847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10849 echo "configure:10850: checking for $ac_hdr" >&5
10850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10851   echo $ac_n "(cached) $ac_c" 1>&6
10852 else
10853   cat > conftest.$ac_ext <<EOF
10854 #line 10855 "configure"
10855 #include "confdefs.h"
10856 #include <$ac_hdr>
10857 EOF
10858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10859 { (eval echo configure:10860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10861 if test -z "$ac_err"; then
10862   rm -rf conftest*
10863   eval "ac_cv_header_$ac_safe=yes"
10864 else
10865   echo "$ac_err" >&5
10866   echo "configure: failed program was:" >&5
10867   cat conftest.$ac_ext >&5
10868   rm -rf conftest*
10869   eval "ac_cv_header_$ac_safe=no"
10870 fi
10871 rm -f conftest*
10872 fi
10873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10874   echo "$ac_t""yes" 1>&6
10875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10876   cat >> confdefs.h <<EOF
10877 #define $ac_tr_hdr 1
10878 EOF
10879  
10880 else
10881   echo "$ac_t""no" 1>&6
10882 fi
10883 done
10884
10885
10886         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10887                 if test $krb5_impl = mit; then
10888                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10889 echo "configure:10890: checking for main in -lkrb4" >&5
10890 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   ac_save_LIBS="$LIBS"
10895 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10896 cat > conftest.$ac_ext <<EOF
10897 #line 10898 "configure"
10898 #include "confdefs.h"
10899
10900 int main() {
10901 main()
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=no"
10912 fi
10913 rm -f conftest*
10914 LIBS="$ac_save_LIBS"
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   have_k425=yes
10920                                 KRB4_LIBS="-lkrb4 -ldes425"
10921 else
10922   echo "$ac_t""no" 1>&6
10923 have_k425=no
10924 fi
10925
10926
10927                 elif test $krb5_impl = heimdal; then
10928                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10929 echo "configure:10930: checking for main in -lkrb4" >&5
10930 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10931 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10932   echo $ac_n "(cached) $ac_c" 1>&6
10933 else
10934   ac_save_LIBS="$LIBS"
10935 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10936 cat > conftest.$ac_ext <<EOF
10937 #line 10938 "configure"
10938 #include "confdefs.h"
10939
10940 int main() {
10941 main()
10942 ; return 0; }
10943 EOF
10944 if { (eval echo configure:10945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10945   rm -rf conftest*
10946   eval "ac_cv_lib_$ac_lib_var=yes"
10947 else
10948   echo "configure: failed program was:" >&5
10949   cat conftest.$ac_ext >&5
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=no"
10952 fi
10953 rm -f conftest*
10954 LIBS="$ac_save_LIBS"
10955
10956 fi
10957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10958   echo "$ac_t""yes" 1>&6
10959   have_k425=yes
10960                                 KRB4_LIBS="-lkrb4"
10961 else
10962   echo "$ac_t""no" 1>&6
10963 have_k425=no
10964 fi
10965
10966
10967                 else
10968                         have_425=no
10969                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10970                 fi
10971
10972                 if test $have_k425 = yes ; then
10973                         ol_with_kerberos=found
10974                         ol_link_krb4=yes
10975
10976                         cat >> confdefs.h <<\EOF
10977 #define HAVE_KRB425 1
10978 EOF
10979
10980                         cat >> confdefs.h <<\EOF
10981 #define HAVE_KRB4 1
10982 EOF
10983
10984
10985                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10986 echo "configure:10987: checking for des_debug in Kerberos libraries" >&5
10987 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10988   echo $ac_n "(cached) $ac_c" 1>&6
10989 else
10990   
10991                                                                 save_LIBS="$LIBS"
10992                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10993                                 cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996
10997 #include <kerberosIV/krb.h>
10998 #include <kerberosIV/des.h>
10999 extern int des_debug;
11000
11001 int main() {
11002
11003 des_debug = 1;
11004
11005 ; return 0; }
11006 EOF
11007 if { (eval echo configure:11008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11008   rm -rf conftest*
11009   ol_cv_var_des_debug=yes
11010 else
11011   echo "configure: failed program was:" >&5
11012   cat conftest.$ac_ext >&5
11013   rm -rf conftest*
11014   ol_cv_var_des_debug=no
11015 fi
11016 rm -f conftest*
11017                                                                 LIBS="$save_LIBS"
11018                         
11019 fi
11020
11021 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11022
11023                         if test $ol_cv_var_des_debug = yes ; then
11024                                 cat >> confdefs.h <<\EOF
11025 #define HAVE_DES_DEBUG 1
11026 EOF
11027
11028                         fi
11029
11030                         LIBS="$save_LIBS"
11031                 fi
11032         fi
11033 fi
11034
11035 if test $ol_link_krb5 = yes ; then
11036         ol_with_kerberos=found
11037 fi
11038
11039 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11040         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11041
11042         for ac_hdr in krb.h des.h krb-archaeology.h 
11043 do
11044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11046 echo "configure:11047: checking for $ac_hdr" >&5
11047 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 #include <$ac_hdr>
11054 EOF
11055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11056 { (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11058 if test -z "$ac_err"; then
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=yes"
11061 else
11062   echo "$ac_err" >&5
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_header_$ac_safe=no"
11067 fi
11068 rm -f conftest*
11069 fi
11070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11071   echo "$ac_t""yes" 1>&6
11072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11073   cat >> confdefs.h <<EOF
11074 #define $ac_tr_hdr 1
11075 EOF
11076  
11077 else
11078   echo "$ac_t""no" 1>&6
11079 fi
11080 done
11081
11082
11083         if test $ac_cv_header_krb_h = yes ; then
11084                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11085 echo "configure:11086: checking for main in -lkrb" >&5
11086 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11087 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11088   echo $ac_n "(cached) $ac_c" 1>&6
11089 else
11090   ac_save_LIBS="$LIBS"
11091 LIBS="-lkrb -ldes $LIBS"
11092 cat > conftest.$ac_ext <<EOF
11093 #line 11094 "configure"
11094 #include "confdefs.h"
11095
11096 int main() {
11097 main()
11098 ; return 0; }
11099 EOF
11100 if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=yes"
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   eval "ac_cv_lib_$ac_lib_var=no"
11108 fi
11109 rm -f conftest*
11110 LIBS="$ac_save_LIBS"
11111
11112 fi
11113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11114   echo "$ac_t""yes" 1>&6
11115   have_k4=yes
11116 else
11117   echo "$ac_t""no" 1>&6
11118 have_k4=no
11119 fi
11120
11121
11122                 if test $have_k4 = yes ; then
11123                         ol_with_kerberos=found
11124                         ol_link_krb4=yes
11125
11126                         cat >> confdefs.h <<\EOF
11127 #define HAVE_KRB4 1
11128 EOF
11129
11130
11131                         KRB4_LIBS="-lkrb -ldes"
11132
11133                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11134                                 cat >> confdefs.h <<\EOF
11135 #define HAVE_KTH_KERBEROS 1
11136 EOF
11137
11138                         fi
11139                 fi
11140         fi
11141 fi
11142
11143 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11144         ol_link_kbind=yes
11145
11146 elif test $ol_enable_kbind = yes ; then
11147         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11148 fi
11149
11150 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11151         cat >> confdefs.h <<\EOF
11152 #define HAVE_KERBEROS 1
11153 EOF
11154
11155
11156 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11157         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11158 fi
11159
11160 ol_link_tls=no
11161 if test $ol_with_tls != no ; then
11162         for ac_hdr in openssl/ssl.h ssl.h
11163 do
11164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11166 echo "configure:11167: checking for $ac_hdr" >&5
11167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   cat > conftest.$ac_ext <<EOF
11171 #line 11172 "configure"
11172 #include "confdefs.h"
11173 #include <$ac_hdr>
11174 EOF
11175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11176 { (eval echo configure:11177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11178 if test -z "$ac_err"; then
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=yes"
11181 else
11182   echo "$ac_err" >&5
11183   echo "configure: failed program was:" >&5
11184   cat conftest.$ac_ext >&5
11185   rm -rf conftest*
11186   eval "ac_cv_header_$ac_safe=no"
11187 fi
11188 rm -f conftest*
11189 fi
11190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11193   cat >> confdefs.h <<EOF
11194 #define $ac_tr_hdr 1
11195 EOF
11196  
11197 else
11198   echo "$ac_t""no" 1>&6
11199 fi
11200 done
11201
11202         
11203         if test $ac_cv_header_openssl_ssl_h = yes \
11204                 -o $ac_cv_header_ssl_h = yes ; then
11205                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11206 echo "configure:11207: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11207 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11209   echo $ac_n "(cached) $ac_c" 1>&6
11210 else
11211   ac_save_LIBS="$LIBS"
11212 LIBS="-lssl -lcrypto $LIBS"
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* Override any gcc2 internal prototype to avoid an error.  */
11217 /* We use char because int might match the return type of a gcc2
11218     builtin and then its argument prototype would still apply.  */
11219 char SSLeay_add_ssl_algorithms();
11220
11221 int main() {
11222 SSLeay_add_ssl_algorithms()
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=yes"
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_lib_$ac_lib_var=no"
11233 fi
11234 rm -f conftest*
11235 LIBS="$ac_save_LIBS"
11236
11237 fi
11238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11239   echo "$ac_t""yes" 1>&6
11240   have_ssleay=yes
11241                         need_rsaref=no
11242 else
11243   echo "$ac_t""no" 1>&6
11244 have_ssleay=no
11245 fi
11246
11247                         
11248                 if test $have_ssleay = no ; then
11249                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11250 echo "configure:11251: checking for SSL_library_init in -lssl" >&5
11251 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   ac_save_LIBS="$LIBS"
11256 LIBS="-lssl -lcrypto $LIBS"
11257 cat > conftest.$ac_ext <<EOF
11258 #line 11259 "configure"
11259 #include "confdefs.h"
11260 /* Override any gcc2 internal prototype to avoid an error.  */
11261 /* We use char because int might match the return type of a gcc2
11262     builtin and then its argument prototype would still apply.  */
11263 char SSL_library_init();
11264
11265 int main() {
11266 SSL_library_init()
11267 ; return 0; }
11268 EOF
11269 if { (eval echo configure:11270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11270   rm -rf conftest*
11271   eval "ac_cv_lib_$ac_lib_var=yes"
11272 else
11273   echo "configure: failed program was:" >&5
11274   cat conftest.$ac_ext >&5
11275   rm -rf conftest*
11276   eval "ac_cv_lib_$ac_lib_var=no"
11277 fi
11278 rm -f conftest*
11279 LIBS="$ac_save_LIBS"
11280
11281 fi
11282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11283   echo "$ac_t""yes" 1>&6
11284   have_ssleay=yes
11285                                 need_rsaref=no
11286 else
11287   echo "$ac_t""no" 1>&6
11288 have_ssleay=no
11289 fi
11290
11291                 fi
11292
11293                 if test $have_ssleay = no ; then
11294                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11295 echo "configure:11296: checking for ssl3_accept in -lssl" >&5
11296 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11297 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11298   echo $ac_n "(cached) $ac_c" 1>&6
11299 else
11300   ac_save_LIBS="$LIBS"
11301 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11302 cat > conftest.$ac_ext <<EOF
11303 #line 11304 "configure"
11304 #include "confdefs.h"
11305 /* Override any gcc2 internal prototype to avoid an error.  */
11306 /* We use char because int might match the return type of a gcc2
11307     builtin and then its argument prototype would still apply.  */
11308 char ssl3_accept();
11309
11310 int main() {
11311 ssl3_accept()
11312 ; return 0; }
11313 EOF
11314 if { (eval echo configure:11315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11315   rm -rf conftest*
11316   eval "ac_cv_lib_$ac_lib_var=yes"
11317 else
11318   echo "configure: failed program was:" >&5
11319   cat conftest.$ac_ext >&5
11320   rm -rf conftest*
11321   eval "ac_cv_lib_$ac_lib_var=no"
11322 fi
11323 rm -f conftest*
11324 LIBS="$ac_save_LIBS"
11325
11326 fi
11327 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11328   echo "$ac_t""yes" 1>&6
11329   have_ssleay=yes
11330                                 need_rsaref=yes
11331 else
11332   echo "$ac_t""no" 1>&6
11333 have_ssleay=no
11334 fi
11335
11336                 fi
11337
11338                 if test $have_ssleay = yes ; then
11339                         ol_with_tls=found
11340                         ol_link_tls=yes
11341
11342                         cat >> confdefs.h <<\EOF
11343 #define HAVE_SSLEAY 1
11344 EOF
11345
11346
11347                         if test $need_rsaref = yes; then
11348                                 cat >> confdefs.h <<\EOF
11349 #define HAVE_RSAREF 1
11350 EOF
11351
11352
11353                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11354                         else
11355                                 TLS_LIBS="-lssl -lcrypto"
11356                         fi
11357                 fi
11358         fi
11359
11360 else
11361         echo "configure: warning: TLS data protection not supported!" 1>&2
11362 fi
11363
11364 WITH_TLS=no
11365 if test $ol_link_tls = yes ; then
11366         cat >> confdefs.h <<\EOF
11367 #define HAVE_TLS 1
11368 EOF
11369
11370         WITH_TLS=yes
11371
11372 elif test $ol_with_tls = auto ; then
11373         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11374         echo "configure: warning: TLS data protection not supported!" 1>&2
11375
11376 elif test $ol_with_tls != no ; then
11377         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11378 fi
11379
11380 if test $ol_enable_lmpasswd != no; then
11381         if test $ol_link_tls != yes ; then
11382                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11383         fi
11384
11385         cat >> confdefs.h <<\EOF
11386 #define SLAPD_LMHASH 1
11387 EOF
11388
11389 fi
11390
11391 ol_link_threads=no
11392
11393 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11394         -o $ol_with_threads = nt ; then
11395
11396         
11397         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11398 echo "configure:11399: checking for _beginthread" >&5
11399 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11400   echo $ac_n "(cached) $ac_c" 1>&6
11401 else
11402   cat > conftest.$ac_ext <<EOF
11403 #line 11404 "configure"
11404 #include "confdefs.h"
11405 /* System header to define __stub macros and hopefully few prototypes,
11406     which can conflict with char _beginthread(); below.  */
11407 #include <assert.h>
11408 /* Override any gcc2 internal prototype to avoid an error.  */
11409 /* We use char because int might match the return type of a gcc2
11410     builtin and then its argument prototype would still apply.  */
11411 char _beginthread();
11412 char (*f)();
11413
11414 int main() {
11415
11416 /* The GNU C library defines this for functions which it implements
11417     to always fail with ENOSYS.  Some functions are actually named
11418     something starting with __ and the normal name is an alias.  */
11419 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11420 choke me
11421 #else
11422 f = _beginthread;
11423 #endif
11424
11425 ; return 0; }
11426 EOF
11427 if { (eval echo configure:11428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11428   rm -rf conftest*
11429   eval "ac_cv_func__beginthread=yes"
11430 else
11431   echo "configure: failed program was:" >&5
11432   cat conftest.$ac_ext >&5
11433   rm -rf conftest*
11434   eval "ac_cv_func__beginthread=no"
11435 fi
11436 rm -f conftest*
11437 fi
11438
11439 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11440   echo "$ac_t""yes" 1>&6
11441   :
11442 else
11443   echo "$ac_t""no" 1>&6
11444 fi
11445
11446
11447         if test $ac_cv_func__beginthread = yes ; then
11448                 cat >> confdefs.h <<\EOF
11449 #define HAVE_NT_THREADS 1
11450 EOF
11451
11452                 ol_cv_nt_threads=yes
11453         fi
11454
11455
11456         if test "$ol_cv_nt_threads" = yes ; then
11457                 ol_link_threads=nt
11458                 ol_with_threads=found
11459                 ol_with_yielding_select=yes
11460
11461                 cat >> confdefs.h <<\EOF
11462 #define HAVE_NT_SERVICE_MANAGER 1
11463 EOF
11464
11465                 cat >> confdefs.h <<\EOF
11466 #define HAVE_NT_EVENT_LOG 1
11467 EOF
11468
11469         fi
11470
11471         if test $ol_with_threads = nt ; then
11472                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11473         fi
11474 fi
11475
11476 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11477         -o $ol_with_threads = posix ; then
11478
11479         for ac_hdr in pthread.h
11480 do
11481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11483 echo "configure:11484: checking for $ac_hdr" >&5
11484 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11485   echo $ac_n "(cached) $ac_c" 1>&6
11486 else
11487   cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <$ac_hdr>
11491 EOF
11492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11493 { (eval echo configure:11494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11495 if test -z "$ac_err"; then
11496   rm -rf conftest*
11497   eval "ac_cv_header_$ac_safe=yes"
11498 else
11499   echo "$ac_err" >&5
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   eval "ac_cv_header_$ac_safe=no"
11504 fi
11505 rm -f conftest*
11506 fi
11507 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11508   echo "$ac_t""yes" 1>&6
11509     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11510   cat >> confdefs.h <<EOF
11511 #define $ac_tr_hdr 1
11512 EOF
11513  
11514 else
11515   echo "$ac_t""no" 1>&6
11516 fi
11517 done
11518
11519
11520         if test $ac_cv_header_pthread_h = yes ; then
11521                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11522 echo "configure:11523: checking POSIX thread version" >&5
11523 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11524   echo $ac_n "(cached) $ac_c" 1>&6
11525 else
11526   
11527         cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530
11531 #               include <pthread.h>
11532         
11533 int main() {
11534
11535                 int i = PTHREAD_CREATE_JOINABLE;
11536         
11537 ; return 0; }
11538 EOF
11539 if { (eval echo configure:11540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11540   rm -rf conftest*
11541   
11542         cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545 #include <pthread.h>
11546 EOF
11547 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11548   egrep "pthread_detach" >/dev/null 2>&1; then
11549   rm -rf conftest*
11550   ol_cv_pthread_version=10
11551 else
11552   rm -rf conftest*
11553   ol_cv_pthread_version=8
11554 fi
11555 rm -f conftest*
11556
11557 else
11558   echo "configure: failed program was:" >&5
11559   cat conftest.$ac_ext >&5
11560   rm -rf conftest*
11561   
11562         cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565
11566 #               include <pthread.h>
11567 #               ifdef PTHREAD_CREATE_UNDETACHED
11568                 draft7
11569 #               endif
11570         
11571 EOF
11572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11573   egrep "draft7" >/dev/null 2>&1; then
11574   rm -rf conftest*
11575   ol_cv_pthread_version=7
11576 else
11577   rm -rf conftest*
11578   
11579         cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 #include <pthread.h>
11583 EOF
11584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11585   egrep "pthread_attr_init" >/dev/null 2>&1; then
11586   rm -rf conftest*
11587   ol_cv_pthread_version=6
11588 else
11589   rm -rf conftest*
11590   
11591         cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594
11595 #               include <pthread.h>
11596 #ifdef          PTHREAD_MUTEX_INITIALIZER
11597                 draft5
11598 #endif
11599         
11600 EOF
11601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11602   egrep "draft5" >/dev/null 2>&1; then
11603   rm -rf conftest*
11604   ol_cv_pthread_version=5
11605 else
11606   rm -rf conftest*
11607   ol_cv_pthread_version=4
11608 fi
11609 rm -f conftest*
11610  
11611 fi
11612 rm -f conftest*
11613  
11614 fi
11615 rm -f conftest*
11616  
11617 fi
11618 rm -f conftest*
11619
11620 fi
11621
11622 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11623
11624
11625                 if test $ol_cv_pthread_version != 0 ; then
11626                         cat >> confdefs.h <<EOF
11627 #define HAVE_PTHREADS $ol_cv_pthread_version
11628 EOF
11629
11630                 else
11631                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11632                 fi
11633
11634                 # consider threads found
11635                 ol_with_threads=found
11636
11637                 
11638         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11639 echo "configure:11640: checking for LinuxThreads pthread.h" >&5
11640 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11641   echo $ac_n "(cached) $ac_c" 1>&6
11642 else
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include <pthread.h>
11647 EOF
11648 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11649   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11650   rm -rf conftest*
11651   ol_cv_header_linux_threads=yes
11652 else
11653   rm -rf conftest*
11654   ol_cv_header_linux_threads=no
11655 fi
11656 rm -f conftest*
11657
11658                 
11659 fi
11660
11661 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11662         if test $ol_cv_header_linux_threads = yes; then
11663                 cat >> confdefs.h <<\EOF
11664 #define HAVE_LINUX_THREADS 1
11665 EOF
11666
11667         fi
11668
11669                 
11670         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11671 echo "configure:11672: checking for GNU Pth pthread.h" >&5
11672 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11673   echo $ac_n "(cached) $ac_c" 1>&6
11674 else
11675   cat > conftest.$ac_ext <<EOF
11676 #line 11677 "configure"
11677 #include "confdefs.h"
11678 #include <pthread.h>
11679 #ifdef _POSIX_THREAD_IS_GNU_PTH
11680         __gnu_pth__;
11681 #endif
11682
11683 EOF
11684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11685   egrep "__gnu_pth__" >/dev/null 2>&1; then
11686   rm -rf conftest*
11687   ol_cv_header_gnu_pth_pthread_h=yes
11688 else
11689   rm -rf conftest*
11690   ol_cv_header_gnu_pth_pthread_h=no
11691 fi
11692 rm -f conftest*
11693
11694                 
11695 fi
11696
11697 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11698
11699
11700                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11701                         for ac_hdr in sched.h
11702 do
11703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11705 echo "configure:11706: checking for $ac_hdr" >&5
11706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11707   echo $ac_n "(cached) $ac_c" 1>&6
11708 else
11709   cat > conftest.$ac_ext <<EOF
11710 #line 11711 "configure"
11711 #include "confdefs.h"
11712 #include <$ac_hdr>
11713 EOF
11714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11715 { (eval echo configure:11716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11717 if test -z "$ac_err"; then
11718   rm -rf conftest*
11719   eval "ac_cv_header_$ac_safe=yes"
11720 else
11721   echo "$ac_err" >&5
11722   echo "configure: failed program was:" >&5
11723   cat conftest.$ac_ext >&5
11724   rm -rf conftest*
11725   eval "ac_cv_header_$ac_safe=no"
11726 fi
11727 rm -f conftest*
11728 fi
11729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11730   echo "$ac_t""yes" 1>&6
11731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11732   cat >> confdefs.h <<EOF
11733 #define $ac_tr_hdr 1
11734 EOF
11735  
11736 else
11737   echo "$ac_t""no" 1>&6
11738 fi
11739 done
11740
11741                 fi
11742
11743                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11744                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11745 echo "configure:11746: checking for pthread_create in default libraries" >&5
11746 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11747   echo $ac_n "(cached) $ac_c" 1>&6
11748 else
11749   
11750                 if test "$cross_compiling" = yes; then
11751   cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11753 #include "confdefs.h"
11754 /* pthread test headers */
11755 #include <pthread.h>
11756 #if HAVE_PTHREADS < 7
11757 #include <errno.h>
11758 #endif
11759 #ifndef NULL
11760 #define NULL (void*)0
11761 #endif
11762
11763 static void *task(p)
11764         void *p;
11765 {
11766         return (void *) (p == NULL);
11767 }
11768
11769 int main() {
11770
11771         /* pthread test function */
11772 #ifndef PTHREAD_CREATE_DETACHED
11773 #define PTHREAD_CREATE_DETACHED 1
11774 #endif
11775         pthread_t t;
11776         int status;
11777         int detach = PTHREAD_CREATE_DETACHED;
11778
11779 #if HAVE_PTHREADS > 4
11780         /* Final pthreads */
11781         pthread_attr_t attr;
11782
11783         status = pthread_attr_init(&attr);
11784         if( status ) return status;
11785
11786 #if HAVE_PTHREADS < 7
11787         status = pthread_attr_setdetachstate(&attr, &detach);
11788         if( status < 0 ) status = errno;
11789 #else
11790         status = pthread_attr_setdetachstate(&attr, detach);
11791 #endif
11792         if( status ) return status;
11793         status = pthread_create( &t, &attr, task, NULL );
11794 #if HAVE_PTHREADS < 7
11795         if( status < 0 ) status = errno;
11796 #endif
11797         if( status ) return status;
11798 #else
11799         /* Draft 4 pthreads */
11800         status = pthread_create( &t, pthread_attr_default, task, NULL );
11801         if( status ) return errno;
11802
11803         /* give thread a chance to complete */
11804         /* it should remain joinable and hence detachable */
11805         sleep( 1 );
11806
11807         status = pthread_detach( &t );
11808         if( status ) return errno;
11809 #endif
11810
11811 #ifdef HAVE_LINUX_THREADS
11812         pthread_kill_other_threads_np();
11813 #endif
11814
11815         return 0;
11816
11817 ; return 0; }
11818 EOF
11819 if { (eval echo configure:11820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11820   rm -rf conftest*
11821   ol_cv_pthread_create=yes
11822 else
11823   echo "configure: failed program was:" >&5
11824   cat conftest.$ac_ext >&5
11825   rm -rf conftest*
11826   ol_cv_pthread_create=no
11827 fi
11828 rm -f conftest*
11829 else
11830   cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* pthread test headers */
11834 #include <pthread.h>
11835 #if HAVE_PTHREADS < 7
11836 #include <errno.h>
11837 #endif
11838 #ifndef NULL
11839 #define NULL (void*)0
11840 #endif
11841
11842 static void *task(p)
11843         void *p;
11844 {
11845         return (void *) (p == NULL);
11846 }
11847
11848
11849 int main(argc, argv)
11850         int argc;
11851         char **argv;
11852 {
11853
11854         /* pthread test function */
11855 #ifndef PTHREAD_CREATE_DETACHED
11856 #define PTHREAD_CREATE_DETACHED 1
11857 #endif
11858         pthread_t t;
11859         int status;
11860         int detach = PTHREAD_CREATE_DETACHED;
11861
11862 #if HAVE_PTHREADS > 4
11863         /* Final pthreads */
11864         pthread_attr_t attr;
11865
11866         status = pthread_attr_init(&attr);
11867         if( status ) return status;
11868
11869 #if HAVE_PTHREADS < 7
11870         status = pthread_attr_setdetachstate(&attr, &detach);
11871         if( status < 0 ) status = errno;
11872 #else
11873         status = pthread_attr_setdetachstate(&attr, detach);
11874 #endif
11875         if( status ) return status;
11876         status = pthread_create( &t, &attr, task, NULL );
11877 #if HAVE_PTHREADS < 7
11878         if( status < 0 ) status = errno;
11879 #endif
11880         if( status ) return status;
11881 #else
11882         /* Draft 4 pthreads */
11883         status = pthread_create( &t, pthread_attr_default, task, NULL );
11884         if( status ) return errno;
11885
11886         /* give thread a chance to complete */
11887         /* it should remain joinable and hence detachable */
11888         sleep( 1 );
11889
11890         status = pthread_detach( &t );
11891         if( status ) return errno;
11892 #endif
11893
11894 #ifdef HAVE_LINUX_THREADS
11895         pthread_kill_other_threads_np();
11896 #endif
11897
11898         return 0;
11899
11900 }
11901
11902 EOF
11903 if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11904 then
11905   ol_cv_pthread_create=yes
11906 else
11907   echo "configure: failed program was:" >&5
11908   cat conftest.$ac_ext >&5
11909   rm -fr conftest*
11910   ol_cv_pthread_create=no
11911 fi
11912 rm -fr conftest*
11913 fi
11914
11915 fi
11916
11917 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11918
11919                 if test $ol_cv_pthread_create != no ; then
11920                         ol_link_threads=posix
11921                         ol_link_pthreads=""
11922                 fi
11923                 
11924                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11925 if test "$ol_link_threads" = no ; then
11926         # try -kthread
11927         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11928 echo "configure:11929: checking for pthread link with -kthread" >&5
11929 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11930   echo $ac_n "(cached) $ac_c" 1>&6
11931 else
11932   
11933                 # save the flags
11934                 ol_LIBS="$LIBS"
11935                 LIBS="-kthread $LIBS"
11936
11937                 if test "$cross_compiling" = yes; then
11938   cat > conftest.$ac_ext <<EOF
11939 #line 11940 "configure"
11940 #include "confdefs.h"
11941 /* pthread test headers */
11942 #include <pthread.h>
11943 #if HAVE_PTHREADS < 7
11944 #include <errno.h>
11945 #endif
11946 #ifndef NULL
11947 #define NULL (void*)0
11948 #endif
11949
11950 static void *task(p)
11951         void *p;
11952 {
11953         return (void *) (p == NULL);
11954 }
11955
11956 int main() {
11957
11958         /* pthread test function */
11959 #ifndef PTHREAD_CREATE_DETACHED
11960 #define PTHREAD_CREATE_DETACHED 1
11961 #endif
11962         pthread_t t;
11963         int status;
11964         int detach = PTHREAD_CREATE_DETACHED;
11965
11966 #if HAVE_PTHREADS > 4
11967         /* Final pthreads */
11968         pthread_attr_t attr;
11969
11970         status = pthread_attr_init(&attr);
11971         if( status ) return status;
11972
11973 #if HAVE_PTHREADS < 7
11974         status = pthread_attr_setdetachstate(&attr, &detach);
11975         if( status < 0 ) status = errno;
11976 #else
11977         status = pthread_attr_setdetachstate(&attr, detach);
11978 #endif
11979         if( status ) return status;
11980         status = pthread_create( &t, &attr, task, NULL );
11981 #if HAVE_PTHREADS < 7
11982         if( status < 0 ) status = errno;
11983 #endif
11984         if( status ) return status;
11985 #else
11986         /* Draft 4 pthreads */
11987         status = pthread_create( &t, pthread_attr_default, task, NULL );
11988         if( status ) return errno;
11989
11990         /* give thread a chance to complete */
11991         /* it should remain joinable and hence detachable */
11992         sleep( 1 );
11993
11994         status = pthread_detach( &t );
11995         if( status ) return errno;
11996 #endif
11997
11998 #ifdef HAVE_LINUX_THREADS
11999         pthread_kill_other_threads_np();
12000 #endif
12001
12002         return 0;
12003
12004 ; return 0; }
12005 EOF
12006 if { (eval echo configure:12007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12007   rm -rf conftest*
12008   ol_cv_pthread_kthread=yes
12009 else
12010   echo "configure: failed program was:" >&5
12011   cat conftest.$ac_ext >&5
12012   rm -rf conftest*
12013   ol_cv_pthread_kthread=no
12014 fi
12015 rm -f conftest*
12016 else
12017   cat > conftest.$ac_ext <<EOF
12018 #line 12019 "configure"
12019 #include "confdefs.h"
12020 /* pthread test headers */
12021 #include <pthread.h>
12022 #if HAVE_PTHREADS < 7
12023 #include <errno.h>
12024 #endif
12025 #ifndef NULL
12026 #define NULL (void*)0
12027 #endif
12028
12029 static void *task(p)
12030         void *p;
12031 {
12032         return (void *) (p == NULL);
12033 }
12034
12035
12036 int main(argc, argv)
12037         int argc;
12038         char **argv;
12039 {
12040
12041         /* pthread test function */
12042 #ifndef PTHREAD_CREATE_DETACHED
12043 #define PTHREAD_CREATE_DETACHED 1
12044 #endif
12045         pthread_t t;
12046         int status;
12047         int detach = PTHREAD_CREATE_DETACHED;
12048
12049 #if HAVE_PTHREADS > 4
12050         /* Final pthreads */
12051         pthread_attr_t attr;
12052
12053         status = pthread_attr_init(&attr);
12054         if( status ) return status;
12055
12056 #if HAVE_PTHREADS < 7
12057         status = pthread_attr_setdetachstate(&attr, &detach);
12058         if( status < 0 ) status = errno;
12059 #else
12060         status = pthread_attr_setdetachstate(&attr, detach);
12061 #endif
12062         if( status ) return status;
12063         status = pthread_create( &t, &attr, task, NULL );
12064 #if HAVE_PTHREADS < 7
12065         if( status < 0 ) status = errno;
12066 #endif
12067         if( status ) return status;
12068 #else
12069         /* Draft 4 pthreads */
12070         status = pthread_create( &t, pthread_attr_default, task, NULL );
12071         if( status ) return errno;
12072
12073         /* give thread a chance to complete */
12074         /* it should remain joinable and hence detachable */
12075         sleep( 1 );
12076
12077         status = pthread_detach( &t );
12078         if( status ) return errno;
12079 #endif
12080
12081 #ifdef HAVE_LINUX_THREADS
12082         pthread_kill_other_threads_np();
12083 #endif
12084
12085         return 0;
12086
12087 }
12088
12089 EOF
12090 if { (eval echo configure:12091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12091 then
12092   ol_cv_pthread_kthread=yes
12093 else
12094   echo "configure: failed program was:" >&5
12095   cat conftest.$ac_ext >&5
12096   rm -fr conftest*
12097   ol_cv_pthread_kthread=no
12098 fi
12099 rm -fr conftest*
12100 fi
12101
12102
12103                 # restore the LIBS
12104                 LIBS="$ol_LIBS"
12105         
12106 fi
12107
12108 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12109
12110         if test $ol_cv_pthread_kthread = yes ; then
12111                 ol_link_pthreads="-kthread"
12112                 ol_link_threads=posix
12113         fi
12114 fi
12115
12116                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12117 if test "$ol_link_threads" = no ; then
12118         # try -pthread
12119         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12120 echo "configure:12121: checking for pthread link with -pthread" >&5
12121 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12122   echo $ac_n "(cached) $ac_c" 1>&6
12123 else
12124   
12125                 # save the flags
12126                 ol_LIBS="$LIBS"
12127                 LIBS="-pthread $LIBS"
12128
12129                 if test "$cross_compiling" = yes; then
12130   cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 /* pthread test headers */
12134 #include <pthread.h>
12135 #if HAVE_PTHREADS < 7
12136 #include <errno.h>
12137 #endif
12138 #ifndef NULL
12139 #define NULL (void*)0
12140 #endif
12141
12142 static void *task(p)
12143         void *p;
12144 {
12145         return (void *) (p == NULL);
12146 }
12147
12148 int main() {
12149
12150         /* pthread test function */
12151 #ifndef PTHREAD_CREATE_DETACHED
12152 #define PTHREAD_CREATE_DETACHED 1
12153 #endif
12154         pthread_t t;
12155         int status;
12156         int detach = PTHREAD_CREATE_DETACHED;
12157
12158 #if HAVE_PTHREADS > 4
12159         /* Final pthreads */
12160         pthread_attr_t attr;
12161
12162         status = pthread_attr_init(&attr);
12163         if( status ) return status;
12164
12165 #if HAVE_PTHREADS < 7
12166         status = pthread_attr_setdetachstate(&attr, &detach);
12167         if( status < 0 ) status = errno;
12168 #else
12169         status = pthread_attr_setdetachstate(&attr, detach);
12170 #endif
12171         if( status ) return status;
12172         status = pthread_create( &t, &attr, task, NULL );
12173 #if HAVE_PTHREADS < 7
12174         if( status < 0 ) status = errno;
12175 #endif
12176         if( status ) return status;
12177 #else
12178         /* Draft 4 pthreads */
12179         status = pthread_create( &t, pthread_attr_default, task, NULL );
12180         if( status ) return errno;
12181
12182         /* give thread a chance to complete */
12183         /* it should remain joinable and hence detachable */
12184         sleep( 1 );
12185
12186         status = pthread_detach( &t );
12187         if( status ) return errno;
12188 #endif
12189
12190 #ifdef HAVE_LINUX_THREADS
12191         pthread_kill_other_threads_np();
12192 #endif
12193
12194         return 0;
12195
12196 ; return 0; }
12197 EOF
12198 if { (eval echo configure:12199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12199   rm -rf conftest*
12200   ol_cv_pthread_pthread=yes
12201 else
12202   echo "configure: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   rm -rf conftest*
12205   ol_cv_pthread_pthread=no
12206 fi
12207 rm -f conftest*
12208 else
12209   cat > conftest.$ac_ext <<EOF
12210 #line 12211 "configure"
12211 #include "confdefs.h"
12212 /* pthread test headers */
12213 #include <pthread.h>
12214 #if HAVE_PTHREADS < 7
12215 #include <errno.h>
12216 #endif
12217 #ifndef NULL
12218 #define NULL (void*)0
12219 #endif
12220
12221 static void *task(p)
12222         void *p;
12223 {
12224         return (void *) (p == NULL);
12225 }
12226
12227
12228 int main(argc, argv)
12229         int argc;
12230         char **argv;
12231 {
12232
12233         /* pthread test function */
12234 #ifndef PTHREAD_CREATE_DETACHED
12235 #define PTHREAD_CREATE_DETACHED 1
12236 #endif
12237         pthread_t t;
12238         int status;
12239         int detach = PTHREAD_CREATE_DETACHED;
12240
12241 #if HAVE_PTHREADS > 4
12242         /* Final pthreads */
12243         pthread_attr_t attr;
12244
12245         status = pthread_attr_init(&attr);
12246         if( status ) return status;
12247
12248 #if HAVE_PTHREADS < 7
12249         status = pthread_attr_setdetachstate(&attr, &detach);
12250         if( status < 0 ) status = errno;
12251 #else
12252         status = pthread_attr_setdetachstate(&attr, detach);
12253 #endif
12254         if( status ) return status;
12255         status = pthread_create( &t, &attr, task, NULL );
12256 #if HAVE_PTHREADS < 7
12257         if( status < 0 ) status = errno;
12258 #endif
12259         if( status ) return status;
12260 #else
12261         /* Draft 4 pthreads */
12262         status = pthread_create( &t, pthread_attr_default, task, NULL );
12263         if( status ) return errno;
12264
12265         /* give thread a chance to complete */
12266         /* it should remain joinable and hence detachable */
12267         sleep( 1 );
12268
12269         status = pthread_detach( &t );
12270         if( status ) return errno;
12271 #endif
12272
12273 #ifdef HAVE_LINUX_THREADS
12274         pthread_kill_other_threads_np();
12275 #endif
12276
12277         return 0;
12278
12279 }
12280
12281 EOF
12282 if { (eval echo configure:12283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12283 then
12284   ol_cv_pthread_pthread=yes
12285 else
12286   echo "configure: failed program was:" >&5
12287   cat conftest.$ac_ext >&5
12288   rm -fr conftest*
12289   ol_cv_pthread_pthread=no
12290 fi
12291 rm -fr conftest*
12292 fi
12293
12294
12295                 # restore the LIBS
12296                 LIBS="$ol_LIBS"
12297         
12298 fi
12299
12300 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12301
12302         if test $ol_cv_pthread_pthread = yes ; then
12303                 ol_link_pthreads="-pthread"
12304                 ol_link_threads=posix
12305         fi
12306 fi
12307
12308                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12309 if test "$ol_link_threads" = no ; then
12310         # try -pthreads
12311         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12312 echo "configure:12313: checking for pthread link with -pthreads" >&5
12313 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12314   echo $ac_n "(cached) $ac_c" 1>&6
12315 else
12316   
12317                 # save the flags
12318                 ol_LIBS="$LIBS"
12319                 LIBS="-pthreads $LIBS"
12320
12321                 if test "$cross_compiling" = yes; then
12322   cat > conftest.$ac_ext <<EOF
12323 #line 12324 "configure"
12324 #include "confdefs.h"
12325 /* pthread test headers */
12326 #include <pthread.h>
12327 #if HAVE_PTHREADS < 7
12328 #include <errno.h>
12329 #endif
12330 #ifndef NULL
12331 #define NULL (void*)0
12332 #endif
12333
12334 static void *task(p)
12335         void *p;
12336 {
12337         return (void *) (p == NULL);
12338 }
12339
12340 int main() {
12341
12342         /* pthread test function */
12343 #ifndef PTHREAD_CREATE_DETACHED
12344 #define PTHREAD_CREATE_DETACHED 1
12345 #endif
12346         pthread_t t;
12347         int status;
12348         int detach = PTHREAD_CREATE_DETACHED;
12349
12350 #if HAVE_PTHREADS > 4
12351         /* Final pthreads */
12352         pthread_attr_t attr;
12353
12354         status = pthread_attr_init(&attr);
12355         if( status ) return status;
12356
12357 #if HAVE_PTHREADS < 7
12358         status = pthread_attr_setdetachstate(&attr, &detach);
12359         if( status < 0 ) status = errno;
12360 #else
12361         status = pthread_attr_setdetachstate(&attr, detach);
12362 #endif
12363         if( status ) return status;
12364         status = pthread_create( &t, &attr, task, NULL );
12365 #if HAVE_PTHREADS < 7
12366         if( status < 0 ) status = errno;
12367 #endif
12368         if( status ) return status;
12369 #else
12370         /* Draft 4 pthreads */
12371         status = pthread_create( &t, pthread_attr_default, task, NULL );
12372         if( status ) return errno;
12373
12374         /* give thread a chance to complete */
12375         /* it should remain joinable and hence detachable */
12376         sleep( 1 );
12377
12378         status = pthread_detach( &t );
12379         if( status ) return errno;
12380 #endif
12381
12382 #ifdef HAVE_LINUX_THREADS
12383         pthread_kill_other_threads_np();
12384 #endif
12385
12386         return 0;
12387
12388 ; return 0; }
12389 EOF
12390 if { (eval echo configure:12391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12391   rm -rf conftest*
12392   ol_cv_pthread_pthreads=yes
12393 else
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   ol_cv_pthread_pthreads=no
12398 fi
12399 rm -f conftest*
12400 else
12401   cat > conftest.$ac_ext <<EOF
12402 #line 12403 "configure"
12403 #include "confdefs.h"
12404 /* pthread test headers */
12405 #include <pthread.h>
12406 #if HAVE_PTHREADS < 7
12407 #include <errno.h>
12408 #endif
12409 #ifndef NULL
12410 #define NULL (void*)0
12411 #endif
12412
12413 static void *task(p)
12414         void *p;
12415 {
12416         return (void *) (p == NULL);
12417 }
12418
12419
12420 int main(argc, argv)
12421         int argc;
12422         char **argv;
12423 {
12424
12425         /* pthread test function */
12426 #ifndef PTHREAD_CREATE_DETACHED
12427 #define PTHREAD_CREATE_DETACHED 1
12428 #endif
12429         pthread_t t;
12430         int status;
12431         int detach = PTHREAD_CREATE_DETACHED;
12432
12433 #if HAVE_PTHREADS > 4
12434         /* Final pthreads */
12435         pthread_attr_t attr;
12436
12437         status = pthread_attr_init(&attr);
12438         if( status ) return status;
12439
12440 #if HAVE_PTHREADS < 7
12441         status = pthread_attr_setdetachstate(&attr, &detach);
12442         if( status < 0 ) status = errno;
12443 #else
12444         status = pthread_attr_setdetachstate(&attr, detach);
12445 #endif
12446         if( status ) return status;
12447         status = pthread_create( &t, &attr, task, NULL );
12448 #if HAVE_PTHREADS < 7
12449         if( status < 0 ) status = errno;
12450 #endif
12451         if( status ) return status;
12452 #else
12453         /* Draft 4 pthreads */
12454         status = pthread_create( &t, pthread_attr_default, task, NULL );
12455         if( status ) return errno;
12456
12457         /* give thread a chance to complete */
12458         /* it should remain joinable and hence detachable */
12459         sleep( 1 );
12460
12461         status = pthread_detach( &t );
12462         if( status ) return errno;
12463 #endif
12464
12465 #ifdef HAVE_LINUX_THREADS
12466         pthread_kill_other_threads_np();
12467 #endif
12468
12469         return 0;
12470
12471 }
12472
12473 EOF
12474 if { (eval echo configure:12475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12475 then
12476   ol_cv_pthread_pthreads=yes
12477 else
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -fr conftest*
12481   ol_cv_pthread_pthreads=no
12482 fi
12483 rm -fr conftest*
12484 fi
12485
12486
12487                 # restore the LIBS
12488                 LIBS="$ol_LIBS"
12489         
12490 fi
12491
12492 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12493
12494         if test $ol_cv_pthread_pthreads = yes ; then
12495                 ol_link_pthreads="-pthreads"
12496                 ol_link_threads=posix
12497         fi
12498 fi
12499
12500                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12501 if test "$ol_link_threads" = no ; then
12502         # try -mthreads
12503         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12504 echo "configure:12505: checking for pthread link with -mthreads" >&5
12505 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12506   echo $ac_n "(cached) $ac_c" 1>&6
12507 else
12508   
12509                 # save the flags
12510                 ol_LIBS="$LIBS"
12511                 LIBS="-mthreads $LIBS"
12512
12513                 if test "$cross_compiling" = yes; then
12514   cat > conftest.$ac_ext <<EOF
12515 #line 12516 "configure"
12516 #include "confdefs.h"
12517 /* pthread test headers */
12518 #include <pthread.h>
12519 #if HAVE_PTHREADS < 7
12520 #include <errno.h>
12521 #endif
12522 #ifndef NULL
12523 #define NULL (void*)0
12524 #endif
12525
12526 static void *task(p)
12527         void *p;
12528 {
12529         return (void *) (p == NULL);
12530 }
12531
12532 int main() {
12533
12534         /* pthread test function */
12535 #ifndef PTHREAD_CREATE_DETACHED
12536 #define PTHREAD_CREATE_DETACHED 1
12537 #endif
12538         pthread_t t;
12539         int status;
12540         int detach = PTHREAD_CREATE_DETACHED;
12541
12542 #if HAVE_PTHREADS > 4
12543         /* Final pthreads */
12544         pthread_attr_t attr;
12545
12546         status = pthread_attr_init(&attr);
12547         if( status ) return status;
12548
12549 #if HAVE_PTHREADS < 7
12550         status = pthread_attr_setdetachstate(&attr, &detach);
12551         if( status < 0 ) status = errno;
12552 #else
12553         status = pthread_attr_setdetachstate(&attr, detach);
12554 #endif
12555         if( status ) return status;
12556         status = pthread_create( &t, &attr, task, NULL );
12557 #if HAVE_PTHREADS < 7
12558         if( status < 0 ) status = errno;
12559 #endif
12560         if( status ) return status;
12561 #else
12562         /* Draft 4 pthreads */
12563         status = pthread_create( &t, pthread_attr_default, task, NULL );
12564         if( status ) return errno;
12565
12566         /* give thread a chance to complete */
12567         /* it should remain joinable and hence detachable */
12568         sleep( 1 );
12569
12570         status = pthread_detach( &t );
12571         if( status ) return errno;
12572 #endif
12573
12574 #ifdef HAVE_LINUX_THREADS
12575         pthread_kill_other_threads_np();
12576 #endif
12577
12578         return 0;
12579
12580 ; return 0; }
12581 EOF
12582 if { (eval echo configure:12583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12583   rm -rf conftest*
12584   ol_cv_pthread_mthreads=yes
12585 else
12586   echo "configure: failed program was:" >&5
12587   cat conftest.$ac_ext >&5
12588   rm -rf conftest*
12589   ol_cv_pthread_mthreads=no
12590 fi
12591 rm -f conftest*
12592 else
12593   cat > conftest.$ac_ext <<EOF
12594 #line 12595 "configure"
12595 #include "confdefs.h"
12596 /* pthread test headers */
12597 #include <pthread.h>
12598 #if HAVE_PTHREADS < 7
12599 #include <errno.h>
12600 #endif
12601 #ifndef NULL
12602 #define NULL (void*)0
12603 #endif
12604
12605 static void *task(p)
12606         void *p;
12607 {
12608         return (void *) (p == NULL);
12609 }
12610
12611
12612 int main(argc, argv)
12613         int argc;
12614         char **argv;
12615 {
12616
12617         /* pthread test function */
12618 #ifndef PTHREAD_CREATE_DETACHED
12619 #define PTHREAD_CREATE_DETACHED 1
12620 #endif
12621         pthread_t t;
12622         int status;
12623         int detach = PTHREAD_CREATE_DETACHED;
12624
12625 #if HAVE_PTHREADS > 4
12626         /* Final pthreads */
12627         pthread_attr_t attr;
12628
12629         status = pthread_attr_init(&attr);
12630         if( status ) return status;
12631
12632 #if HAVE_PTHREADS < 7
12633         status = pthread_attr_setdetachstate(&attr, &detach);
12634         if( status < 0 ) status = errno;
12635 #else
12636         status = pthread_attr_setdetachstate(&attr, detach);
12637 #endif
12638         if( status ) return status;
12639         status = pthread_create( &t, &attr, task, NULL );
12640 #if HAVE_PTHREADS < 7
12641         if( status < 0 ) status = errno;
12642 #endif
12643         if( status ) return status;
12644 #else
12645         /* Draft 4 pthreads */
12646         status = pthread_create( &t, pthread_attr_default, task, NULL );
12647         if( status ) return errno;
12648
12649         /* give thread a chance to complete */
12650         /* it should remain joinable and hence detachable */
12651         sleep( 1 );
12652
12653         status = pthread_detach( &t );
12654         if( status ) return errno;
12655 #endif
12656
12657 #ifdef HAVE_LINUX_THREADS
12658         pthread_kill_other_threads_np();
12659 #endif
12660
12661         return 0;
12662
12663 }
12664
12665 EOF
12666 if { (eval echo configure:12667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12667 then
12668   ol_cv_pthread_mthreads=yes
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -fr conftest*
12673   ol_cv_pthread_mthreads=no
12674 fi
12675 rm -fr conftest*
12676 fi
12677
12678
12679                 # restore the LIBS
12680                 LIBS="$ol_LIBS"
12681         
12682 fi
12683
12684 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12685
12686         if test $ol_cv_pthread_mthreads = yes ; then
12687                 ol_link_pthreads="-mthreads"
12688                 ol_link_threads=posix
12689         fi
12690 fi
12691
12692                 # Pthread try link: -thread (ol_cv_pthread_thread)
12693 if test "$ol_link_threads" = no ; then
12694         # try -thread
12695         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12696 echo "configure:12697: checking for pthread link with -thread" >&5
12697 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12698   echo $ac_n "(cached) $ac_c" 1>&6
12699 else
12700   
12701                 # save the flags
12702                 ol_LIBS="$LIBS"
12703                 LIBS="-thread $LIBS"
12704
12705                 if test "$cross_compiling" = yes; then
12706   cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 /* pthread test headers */
12710 #include <pthread.h>
12711 #if HAVE_PTHREADS < 7
12712 #include <errno.h>
12713 #endif
12714 #ifndef NULL
12715 #define NULL (void*)0
12716 #endif
12717
12718 static void *task(p)
12719         void *p;
12720 {
12721         return (void *) (p == NULL);
12722 }
12723
12724 int main() {
12725
12726         /* pthread test function */
12727 #ifndef PTHREAD_CREATE_DETACHED
12728 #define PTHREAD_CREATE_DETACHED 1
12729 #endif
12730         pthread_t t;
12731         int status;
12732         int detach = PTHREAD_CREATE_DETACHED;
12733
12734 #if HAVE_PTHREADS > 4
12735         /* Final pthreads */
12736         pthread_attr_t attr;
12737
12738         status = pthread_attr_init(&attr);
12739         if( status ) return status;
12740
12741 #if HAVE_PTHREADS < 7
12742         status = pthread_attr_setdetachstate(&attr, &detach);
12743         if( status < 0 ) status = errno;
12744 #else
12745         status = pthread_attr_setdetachstate(&attr, detach);
12746 #endif
12747         if( status ) return status;
12748         status = pthread_create( &t, &attr, task, NULL );
12749 #if HAVE_PTHREADS < 7
12750         if( status < 0 ) status = errno;
12751 #endif
12752         if( status ) return status;
12753 #else
12754         /* Draft 4 pthreads */
12755         status = pthread_create( &t, pthread_attr_default, task, NULL );
12756         if( status ) return errno;
12757
12758         /* give thread a chance to complete */
12759         /* it should remain joinable and hence detachable */
12760         sleep( 1 );
12761
12762         status = pthread_detach( &t );
12763         if( status ) return errno;
12764 #endif
12765
12766 #ifdef HAVE_LINUX_THREADS
12767         pthread_kill_other_threads_np();
12768 #endif
12769
12770         return 0;
12771
12772 ; return 0; }
12773 EOF
12774 if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12775   rm -rf conftest*
12776   ol_cv_pthread_thread=yes
12777 else
12778   echo "configure: failed program was:" >&5
12779   cat conftest.$ac_ext >&5
12780   rm -rf conftest*
12781   ol_cv_pthread_thread=no
12782 fi
12783 rm -f conftest*
12784 else
12785   cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 /* pthread test headers */
12789 #include <pthread.h>
12790 #if HAVE_PTHREADS < 7
12791 #include <errno.h>
12792 #endif
12793 #ifndef NULL
12794 #define NULL (void*)0
12795 #endif
12796
12797 static void *task(p)
12798         void *p;
12799 {
12800         return (void *) (p == NULL);
12801 }
12802
12803
12804 int main(argc, argv)
12805         int argc;
12806         char **argv;
12807 {
12808
12809         /* pthread test function */
12810 #ifndef PTHREAD_CREATE_DETACHED
12811 #define PTHREAD_CREATE_DETACHED 1
12812 #endif
12813         pthread_t t;
12814         int status;
12815         int detach = PTHREAD_CREATE_DETACHED;
12816
12817 #if HAVE_PTHREADS > 4
12818         /* Final pthreads */
12819         pthread_attr_t attr;
12820
12821         status = pthread_attr_init(&attr);
12822         if( status ) return status;
12823
12824 #if HAVE_PTHREADS < 7
12825         status = pthread_attr_setdetachstate(&attr, &detach);
12826         if( status < 0 ) status = errno;
12827 #else
12828         status = pthread_attr_setdetachstate(&attr, detach);
12829 #endif
12830         if( status ) return status;
12831         status = pthread_create( &t, &attr, task, NULL );
12832 #if HAVE_PTHREADS < 7
12833         if( status < 0 ) status = errno;
12834 #endif
12835         if( status ) return status;
12836 #else
12837         /* Draft 4 pthreads */
12838         status = pthread_create( &t, pthread_attr_default, task, NULL );
12839         if( status ) return errno;
12840
12841         /* give thread a chance to complete */
12842         /* it should remain joinable and hence detachable */
12843         sleep( 1 );
12844
12845         status = pthread_detach( &t );
12846         if( status ) return errno;
12847 #endif
12848
12849 #ifdef HAVE_LINUX_THREADS
12850         pthread_kill_other_threads_np();
12851 #endif
12852
12853         return 0;
12854
12855 }
12856
12857 EOF
12858 if { (eval echo configure:12859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12859 then
12860   ol_cv_pthread_thread=yes
12861 else
12862   echo "configure: failed program was:" >&5
12863   cat conftest.$ac_ext >&5
12864   rm -fr conftest*
12865   ol_cv_pthread_thread=no
12866 fi
12867 rm -fr conftest*
12868 fi
12869
12870
12871                 # restore the LIBS
12872                 LIBS="$ol_LIBS"
12873         
12874 fi
12875
12876 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12877
12878         if test $ol_cv_pthread_thread = yes ; then
12879                 ol_link_pthreads="-thread"
12880                 ol_link_threads=posix
12881         fi
12882 fi
12883
12884
12885                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12886 if test "$ol_link_threads" = no ; then
12887         # try -lpthread -lmach -lexc -lc_r
12888         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12889 echo "configure:12890: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12890 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12891   echo $ac_n "(cached) $ac_c" 1>&6
12892 else
12893   
12894                 # save the flags
12895                 ol_LIBS="$LIBS"
12896                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12897
12898                 if test "$cross_compiling" = yes; then
12899   cat > conftest.$ac_ext <<EOF
12900 #line 12901 "configure"
12901 #include "confdefs.h"
12902 /* pthread test headers */
12903 #include <pthread.h>
12904 #if HAVE_PTHREADS < 7
12905 #include <errno.h>
12906 #endif
12907 #ifndef NULL
12908 #define NULL (void*)0
12909 #endif
12910
12911 static void *task(p)
12912         void *p;
12913 {
12914         return (void *) (p == NULL);
12915 }
12916
12917 int main() {
12918
12919         /* pthread test function */
12920 #ifndef PTHREAD_CREATE_DETACHED
12921 #define PTHREAD_CREATE_DETACHED 1
12922 #endif
12923         pthread_t t;
12924         int status;
12925         int detach = PTHREAD_CREATE_DETACHED;
12926
12927 #if HAVE_PTHREADS > 4
12928         /* Final pthreads */
12929         pthread_attr_t attr;
12930
12931         status = pthread_attr_init(&attr);
12932         if( status ) return status;
12933
12934 #if HAVE_PTHREADS < 7
12935         status = pthread_attr_setdetachstate(&attr, &detach);
12936         if( status < 0 ) status = errno;
12937 #else
12938         status = pthread_attr_setdetachstate(&attr, detach);
12939 #endif
12940         if( status ) return status;
12941         status = pthread_create( &t, &attr, task, NULL );
12942 #if HAVE_PTHREADS < 7
12943         if( status < 0 ) status = errno;
12944 #endif
12945         if( status ) return status;
12946 #else
12947         /* Draft 4 pthreads */
12948         status = pthread_create( &t, pthread_attr_default, task, NULL );
12949         if( status ) return errno;
12950
12951         /* give thread a chance to complete */
12952         /* it should remain joinable and hence detachable */
12953         sleep( 1 );
12954
12955         status = pthread_detach( &t );
12956         if( status ) return errno;
12957 #endif
12958
12959 #ifdef HAVE_LINUX_THREADS
12960         pthread_kill_other_threads_np();
12961 #endif
12962
12963         return 0;
12964
12965 ; return 0; }
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12968   rm -rf conftest*
12969   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -rf conftest*
12974   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12975 fi
12976 rm -f conftest*
12977 else
12978   cat > conftest.$ac_ext <<EOF
12979 #line 12980 "configure"
12980 #include "confdefs.h"
12981 /* pthread test headers */
12982 #include <pthread.h>
12983 #if HAVE_PTHREADS < 7
12984 #include <errno.h>
12985 #endif
12986 #ifndef NULL
12987 #define NULL (void*)0
12988 #endif
12989
12990 static void *task(p)
12991         void *p;
12992 {
12993         return (void *) (p == NULL);
12994 }
12995
12996
12997 int main(argc, argv)
12998         int argc;
12999         char **argv;
13000 {
13001
13002         /* pthread test function */
13003 #ifndef PTHREAD_CREATE_DETACHED
13004 #define PTHREAD_CREATE_DETACHED 1
13005 #endif
13006         pthread_t t;
13007         int status;
13008         int detach = PTHREAD_CREATE_DETACHED;
13009
13010 #if HAVE_PTHREADS > 4
13011         /* Final pthreads */
13012         pthread_attr_t attr;
13013
13014         status = pthread_attr_init(&attr);
13015         if( status ) return status;
13016
13017 #if HAVE_PTHREADS < 7
13018         status = pthread_attr_setdetachstate(&attr, &detach);
13019         if( status < 0 ) status = errno;
13020 #else
13021         status = pthread_attr_setdetachstate(&attr, detach);
13022 #endif
13023         if( status ) return status;
13024         status = pthread_create( &t, &attr, task, NULL );
13025 #if HAVE_PTHREADS < 7
13026         if( status < 0 ) status = errno;
13027 #endif
13028         if( status ) return status;
13029 #else
13030         /* Draft 4 pthreads */
13031         status = pthread_create( &t, pthread_attr_default, task, NULL );
13032         if( status ) return errno;
13033
13034         /* give thread a chance to complete */
13035         /* it should remain joinable and hence detachable */
13036         sleep( 1 );
13037
13038         status = pthread_detach( &t );
13039         if( status ) return errno;
13040 #endif
13041
13042 #ifdef HAVE_LINUX_THREADS
13043         pthread_kill_other_threads_np();
13044 #endif
13045
13046         return 0;
13047
13048 }
13049
13050 EOF
13051 if { (eval echo configure:13052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13052 then
13053   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13054 else
13055   echo "configure: failed program was:" >&5
13056   cat conftest.$ac_ext >&5
13057   rm -fr conftest*
13058   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13059 fi
13060 rm -fr conftest*
13061 fi
13062
13063
13064                 # restore the LIBS
13065                 LIBS="$ol_LIBS"
13066         
13067 fi
13068
13069 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13070
13071         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13072                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13073                 ol_link_threads=posix
13074         fi
13075 fi
13076
13077                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13078 if test "$ol_link_threads" = no ; then
13079         # try -lpthread -lmach -lexc
13080         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13081 echo "configure:13082: checking for pthread link with -lpthread -lmach -lexc" >&5
13082 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13083   echo $ac_n "(cached) $ac_c" 1>&6
13084 else
13085   
13086                 # save the flags
13087                 ol_LIBS="$LIBS"
13088                 LIBS="-lpthread -lmach -lexc $LIBS"
13089
13090                 if test "$cross_compiling" = yes; then
13091   cat > conftest.$ac_ext <<EOF
13092 #line 13093 "configure"
13093 #include "confdefs.h"
13094 /* pthread test headers */
13095 #include <pthread.h>
13096 #if HAVE_PTHREADS < 7
13097 #include <errno.h>
13098 #endif
13099 #ifndef NULL
13100 #define NULL (void*)0
13101 #endif
13102
13103 static void *task(p)
13104         void *p;
13105 {
13106         return (void *) (p == NULL);
13107 }
13108
13109 int main() {
13110
13111         /* pthread test function */
13112 #ifndef PTHREAD_CREATE_DETACHED
13113 #define PTHREAD_CREATE_DETACHED 1
13114 #endif
13115         pthread_t t;
13116         int status;
13117         int detach = PTHREAD_CREATE_DETACHED;
13118
13119 #if HAVE_PTHREADS > 4
13120         /* Final pthreads */
13121         pthread_attr_t attr;
13122
13123         status = pthread_attr_init(&attr);
13124         if( status ) return status;
13125
13126 #if HAVE_PTHREADS < 7
13127         status = pthread_attr_setdetachstate(&attr, &detach);
13128         if( status < 0 ) status = errno;
13129 #else
13130         status = pthread_attr_setdetachstate(&attr, detach);
13131 #endif
13132         if( status ) return status;
13133         status = pthread_create( &t, &attr, task, NULL );
13134 #if HAVE_PTHREADS < 7
13135         if( status < 0 ) status = errno;
13136 #endif
13137         if( status ) return status;
13138 #else
13139         /* Draft 4 pthreads */
13140         status = pthread_create( &t, pthread_attr_default, task, NULL );
13141         if( status ) return errno;
13142
13143         /* give thread a chance to complete */
13144         /* it should remain joinable and hence detachable */
13145         sleep( 1 );
13146
13147         status = pthread_detach( &t );
13148         if( status ) return errno;
13149 #endif
13150
13151 #ifdef HAVE_LINUX_THREADS
13152         pthread_kill_other_threads_np();
13153 #endif
13154
13155         return 0;
13156
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13160   rm -rf conftest*
13161   ol_cv_pthread_lpthread_lmach_lexc=yes
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   ol_cv_pthread_lpthread_lmach_lexc=no
13167 fi
13168 rm -f conftest*
13169 else
13170   cat > conftest.$ac_ext <<EOF
13171 #line 13172 "configure"
13172 #include "confdefs.h"
13173 /* pthread test headers */
13174 #include <pthread.h>
13175 #if HAVE_PTHREADS < 7
13176 #include <errno.h>
13177 #endif
13178 #ifndef NULL
13179 #define NULL (void*)0
13180 #endif
13181
13182 static void *task(p)
13183         void *p;
13184 {
13185         return (void *) (p == NULL);
13186 }
13187
13188
13189 int main(argc, argv)
13190         int argc;
13191         char **argv;
13192 {
13193
13194         /* pthread test function */
13195 #ifndef PTHREAD_CREATE_DETACHED
13196 #define PTHREAD_CREATE_DETACHED 1
13197 #endif
13198         pthread_t t;
13199         int status;
13200         int detach = PTHREAD_CREATE_DETACHED;
13201
13202 #if HAVE_PTHREADS > 4
13203         /* Final pthreads */
13204         pthread_attr_t attr;
13205
13206         status = pthread_attr_init(&attr);
13207         if( status ) return status;
13208
13209 #if HAVE_PTHREADS < 7
13210         status = pthread_attr_setdetachstate(&attr, &detach);
13211         if( status < 0 ) status = errno;
13212 #else
13213         status = pthread_attr_setdetachstate(&attr, detach);
13214 #endif
13215         if( status ) return status;
13216         status = pthread_create( &t, &attr, task, NULL );
13217 #if HAVE_PTHREADS < 7
13218         if( status < 0 ) status = errno;
13219 #endif
13220         if( status ) return status;
13221 #else
13222         /* Draft 4 pthreads */
13223         status = pthread_create( &t, pthread_attr_default, task, NULL );
13224         if( status ) return errno;
13225
13226         /* give thread a chance to complete */
13227         /* it should remain joinable and hence detachable */
13228         sleep( 1 );
13229
13230         status = pthread_detach( &t );
13231         if( status ) return errno;
13232 #endif
13233
13234 #ifdef HAVE_LINUX_THREADS
13235         pthread_kill_other_threads_np();
13236 #endif
13237
13238         return 0;
13239
13240 }
13241
13242 EOF
13243 if { (eval echo configure:13244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13244 then
13245   ol_cv_pthread_lpthread_lmach_lexc=yes
13246 else
13247   echo "configure: failed program was:" >&5
13248   cat conftest.$ac_ext >&5
13249   rm -fr conftest*
13250   ol_cv_pthread_lpthread_lmach_lexc=no
13251 fi
13252 rm -fr conftest*
13253 fi
13254
13255
13256                 # restore the LIBS
13257                 LIBS="$ol_LIBS"
13258         
13259 fi
13260
13261 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13262
13263         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13264                 ol_link_pthreads="-lpthread -lmach -lexc"
13265                 ol_link_threads=posix
13266         fi
13267 fi
13268
13269
13270                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13271 if test "$ol_link_threads" = no ; then
13272         # try -lpthread -Wl,-woff,85
13273         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13274 echo "configure:13275: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13275 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13276   echo $ac_n "(cached) $ac_c" 1>&6
13277 else
13278   
13279                 # save the flags
13280                 ol_LIBS="$LIBS"
13281                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13282
13283                 if test "$cross_compiling" = yes; then
13284   cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* pthread test headers */
13288 #include <pthread.h>
13289 #if HAVE_PTHREADS < 7
13290 #include <errno.h>
13291 #endif
13292 #ifndef NULL
13293 #define NULL (void*)0
13294 #endif
13295
13296 static void *task(p)
13297         void *p;
13298 {
13299         return (void *) (p == NULL);
13300 }
13301
13302 int main() {
13303
13304         /* pthread test function */
13305 #ifndef PTHREAD_CREATE_DETACHED
13306 #define PTHREAD_CREATE_DETACHED 1
13307 #endif
13308         pthread_t t;
13309         int status;
13310         int detach = PTHREAD_CREATE_DETACHED;
13311
13312 #if HAVE_PTHREADS > 4
13313         /* Final pthreads */
13314         pthread_attr_t attr;
13315
13316         status = pthread_attr_init(&attr);
13317         if( status ) return status;
13318
13319 #if HAVE_PTHREADS < 7
13320         status = pthread_attr_setdetachstate(&attr, &detach);
13321         if( status < 0 ) status = errno;
13322 #else
13323         status = pthread_attr_setdetachstate(&attr, detach);
13324 #endif
13325         if( status ) return status;
13326         status = pthread_create( &t, &attr, task, NULL );
13327 #if HAVE_PTHREADS < 7
13328         if( status < 0 ) status = errno;
13329 #endif
13330         if( status ) return status;
13331 #else
13332         /* Draft 4 pthreads */
13333         status = pthread_create( &t, pthread_attr_default, task, NULL );
13334         if( status ) return errno;
13335
13336         /* give thread a chance to complete */
13337         /* it should remain joinable and hence detachable */
13338         sleep( 1 );
13339
13340         status = pthread_detach( &t );
13341         if( status ) return errno;
13342 #endif
13343
13344 #ifdef HAVE_LINUX_THREADS
13345         pthread_kill_other_threads_np();
13346 #endif
13347
13348         return 0;
13349
13350 ; return 0; }
13351 EOF
13352 if { (eval echo configure:13353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13353   rm -rf conftest*
13354   ol_cv_pthread_lib_lpthread_woff=yes
13355 else
13356   echo "configure: failed program was:" >&5
13357   cat conftest.$ac_ext >&5
13358   rm -rf conftest*
13359   ol_cv_pthread_lib_lpthread_woff=no
13360 fi
13361 rm -f conftest*
13362 else
13363   cat > conftest.$ac_ext <<EOF
13364 #line 13365 "configure"
13365 #include "confdefs.h"
13366 /* pthread test headers */
13367 #include <pthread.h>
13368 #if HAVE_PTHREADS < 7
13369 #include <errno.h>
13370 #endif
13371 #ifndef NULL
13372 #define NULL (void*)0
13373 #endif
13374
13375 static void *task(p)
13376         void *p;
13377 {
13378         return (void *) (p == NULL);
13379 }
13380
13381
13382 int main(argc, argv)
13383         int argc;
13384         char **argv;
13385 {
13386
13387         /* pthread test function */
13388 #ifndef PTHREAD_CREATE_DETACHED
13389 #define PTHREAD_CREATE_DETACHED 1
13390 #endif
13391         pthread_t t;
13392         int status;
13393         int detach = PTHREAD_CREATE_DETACHED;
13394
13395 #if HAVE_PTHREADS > 4
13396         /* Final pthreads */
13397         pthread_attr_t attr;
13398
13399         status = pthread_attr_init(&attr);
13400         if( status ) return status;
13401
13402 #if HAVE_PTHREADS < 7
13403         status = pthread_attr_setdetachstate(&attr, &detach);
13404         if( status < 0 ) status = errno;
13405 #else
13406         status = pthread_attr_setdetachstate(&attr, detach);
13407 #endif
13408         if( status ) return status;
13409         status = pthread_create( &t, &attr, task, NULL );
13410 #if HAVE_PTHREADS < 7
13411         if( status < 0 ) status = errno;
13412 #endif
13413         if( status ) return status;
13414 #else
13415         /* Draft 4 pthreads */
13416         status = pthread_create( &t, pthread_attr_default, task, NULL );
13417         if( status ) return errno;
13418
13419         /* give thread a chance to complete */
13420         /* it should remain joinable and hence detachable */
13421         sleep( 1 );
13422
13423         status = pthread_detach( &t );
13424         if( status ) return errno;
13425 #endif
13426
13427 #ifdef HAVE_LINUX_THREADS
13428         pthread_kill_other_threads_np();
13429 #endif
13430
13431         return 0;
13432
13433 }
13434
13435 EOF
13436 if { (eval echo configure:13437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13437 then
13438   ol_cv_pthread_lib_lpthread_woff=yes
13439 else
13440   echo "configure: failed program was:" >&5
13441   cat conftest.$ac_ext >&5
13442   rm -fr conftest*
13443   ol_cv_pthread_lib_lpthread_woff=no
13444 fi
13445 rm -fr conftest*
13446 fi
13447
13448
13449                 # restore the LIBS
13450                 LIBS="$ol_LIBS"
13451         
13452 fi
13453
13454 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13455
13456         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13457                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13458                 ol_link_threads=posix
13459         fi
13460 fi
13461
13462
13463                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13464 if test "$ol_link_threads" = no ; then
13465         # try -lpthread
13466         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13467 echo "configure:13468: checking for pthread link with -lpthread" >&5
13468 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13469   echo $ac_n "(cached) $ac_c" 1>&6
13470 else
13471   
13472                 # save the flags
13473                 ol_LIBS="$LIBS"
13474                 LIBS="-lpthread $LIBS"
13475
13476                 if test "$cross_compiling" = yes; then
13477   cat > conftest.$ac_ext <<EOF
13478 #line 13479 "configure"
13479 #include "confdefs.h"
13480 /* pthread test headers */
13481 #include <pthread.h>
13482 #if HAVE_PTHREADS < 7
13483 #include <errno.h>
13484 #endif
13485 #ifndef NULL
13486 #define NULL (void*)0
13487 #endif
13488
13489 static void *task(p)
13490         void *p;
13491 {
13492         return (void *) (p == NULL);
13493 }
13494
13495 int main() {
13496
13497         /* pthread test function */
13498 #ifndef PTHREAD_CREATE_DETACHED
13499 #define PTHREAD_CREATE_DETACHED 1
13500 #endif
13501         pthread_t t;
13502         int status;
13503         int detach = PTHREAD_CREATE_DETACHED;
13504
13505 #if HAVE_PTHREADS > 4
13506         /* Final pthreads */
13507         pthread_attr_t attr;
13508
13509         status = pthread_attr_init(&attr);
13510         if( status ) return status;
13511
13512 #if HAVE_PTHREADS < 7
13513         status = pthread_attr_setdetachstate(&attr, &detach);
13514         if( status < 0 ) status = errno;
13515 #else
13516         status = pthread_attr_setdetachstate(&attr, detach);
13517 #endif
13518         if( status ) return status;
13519         status = pthread_create( &t, &attr, task, NULL );
13520 #if HAVE_PTHREADS < 7
13521         if( status < 0 ) status = errno;
13522 #endif
13523         if( status ) return status;
13524 #else
13525         /* Draft 4 pthreads */
13526         status = pthread_create( &t, pthread_attr_default, task, NULL );
13527         if( status ) return errno;
13528
13529         /* give thread a chance to complete */
13530         /* it should remain joinable and hence detachable */
13531         sleep( 1 );
13532
13533         status = pthread_detach( &t );
13534         if( status ) return errno;
13535 #endif
13536
13537 #ifdef HAVE_LINUX_THREADS
13538         pthread_kill_other_threads_np();
13539 #endif
13540
13541         return 0;
13542
13543 ; return 0; }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13546   rm -rf conftest*
13547   ol_cv_pthread_lpthread=yes
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   ol_cv_pthread_lpthread=no
13553 fi
13554 rm -f conftest*
13555 else
13556   cat > conftest.$ac_ext <<EOF
13557 #line 13558 "configure"
13558 #include "confdefs.h"
13559 /* pthread test headers */
13560 #include <pthread.h>
13561 #if HAVE_PTHREADS < 7
13562 #include <errno.h>
13563 #endif
13564 #ifndef NULL
13565 #define NULL (void*)0
13566 #endif
13567
13568 static void *task(p)
13569         void *p;
13570 {
13571         return (void *) (p == NULL);
13572 }
13573
13574
13575 int main(argc, argv)
13576         int argc;
13577         char **argv;
13578 {
13579
13580         /* pthread test function */
13581 #ifndef PTHREAD_CREATE_DETACHED
13582 #define PTHREAD_CREATE_DETACHED 1
13583 #endif
13584         pthread_t t;
13585         int status;
13586         int detach = PTHREAD_CREATE_DETACHED;
13587
13588 #if HAVE_PTHREADS > 4
13589         /* Final pthreads */
13590         pthread_attr_t attr;
13591
13592         status = pthread_attr_init(&attr);
13593         if( status ) return status;
13594
13595 #if HAVE_PTHREADS < 7
13596         status = pthread_attr_setdetachstate(&attr, &detach);
13597         if( status < 0 ) status = errno;
13598 #else
13599         status = pthread_attr_setdetachstate(&attr, detach);
13600 #endif
13601         if( status ) return status;
13602         status = pthread_create( &t, &attr, task, NULL );
13603 #if HAVE_PTHREADS < 7
13604         if( status < 0 ) status = errno;
13605 #endif
13606         if( status ) return status;
13607 #else
13608         /* Draft 4 pthreads */
13609         status = pthread_create( &t, pthread_attr_default, task, NULL );
13610         if( status ) return errno;
13611
13612         /* give thread a chance to complete */
13613         /* it should remain joinable and hence detachable */
13614         sleep( 1 );
13615
13616         status = pthread_detach( &t );
13617         if( status ) return errno;
13618 #endif
13619
13620 #ifdef HAVE_LINUX_THREADS
13621         pthread_kill_other_threads_np();
13622 #endif
13623
13624         return 0;
13625
13626 }
13627
13628 EOF
13629 if { (eval echo configure:13630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13630 then
13631   ol_cv_pthread_lpthread=yes
13632 else
13633   echo "configure: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   rm -fr conftest*
13636   ol_cv_pthread_lpthread=no
13637 fi
13638 rm -fr conftest*
13639 fi
13640
13641
13642                 # restore the LIBS
13643                 LIBS="$ol_LIBS"
13644         
13645 fi
13646
13647 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13648
13649         if test $ol_cv_pthread_lpthread = yes ; then
13650                 ol_link_pthreads="-lpthread"
13651                 ol_link_threads=posix
13652         fi
13653 fi
13654
13655                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13656 if test "$ol_link_threads" = no ; then
13657         # try -lc_r
13658         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13659 echo "configure:13660: checking for pthread link with -lc_r" >&5
13660 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13661   echo $ac_n "(cached) $ac_c" 1>&6
13662 else
13663   
13664                 # save the flags
13665                 ol_LIBS="$LIBS"
13666                 LIBS="-lc_r $LIBS"
13667
13668                 if test "$cross_compiling" = yes; then
13669   cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* pthread test headers */
13673 #include <pthread.h>
13674 #if HAVE_PTHREADS < 7
13675 #include <errno.h>
13676 #endif
13677 #ifndef NULL
13678 #define NULL (void*)0
13679 #endif
13680
13681 static void *task(p)
13682         void *p;
13683 {
13684         return (void *) (p == NULL);
13685 }
13686
13687 int main() {
13688
13689         /* pthread test function */
13690 #ifndef PTHREAD_CREATE_DETACHED
13691 #define PTHREAD_CREATE_DETACHED 1
13692 #endif
13693         pthread_t t;
13694         int status;
13695         int detach = PTHREAD_CREATE_DETACHED;
13696
13697 #if HAVE_PTHREADS > 4
13698         /* Final pthreads */
13699         pthread_attr_t attr;
13700
13701         status = pthread_attr_init(&attr);
13702         if( status ) return status;
13703
13704 #if HAVE_PTHREADS < 7
13705         status = pthread_attr_setdetachstate(&attr, &detach);
13706         if( status < 0 ) status = errno;
13707 #else
13708         status = pthread_attr_setdetachstate(&attr, detach);
13709 #endif
13710         if( status ) return status;
13711         status = pthread_create( &t, &attr, task, NULL );
13712 #if HAVE_PTHREADS < 7
13713         if( status < 0 ) status = errno;
13714 #endif
13715         if( status ) return status;
13716 #else
13717         /* Draft 4 pthreads */
13718         status = pthread_create( &t, pthread_attr_default, task, NULL );
13719         if( status ) return errno;
13720
13721         /* give thread a chance to complete */
13722         /* it should remain joinable and hence detachable */
13723         sleep( 1 );
13724
13725         status = pthread_detach( &t );
13726         if( status ) return errno;
13727 #endif
13728
13729 #ifdef HAVE_LINUX_THREADS
13730         pthread_kill_other_threads_np();
13731 #endif
13732
13733         return 0;
13734
13735 ; return 0; }
13736 EOF
13737 if { (eval echo configure:13738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13738   rm -rf conftest*
13739   ol_cv_pthread_lc_r=yes
13740 else
13741   echo "configure: failed program was:" >&5
13742   cat conftest.$ac_ext >&5
13743   rm -rf conftest*
13744   ol_cv_pthread_lc_r=no
13745 fi
13746 rm -f conftest*
13747 else
13748   cat > conftest.$ac_ext <<EOF
13749 #line 13750 "configure"
13750 #include "confdefs.h"
13751 /* pthread test headers */
13752 #include <pthread.h>
13753 #if HAVE_PTHREADS < 7
13754 #include <errno.h>
13755 #endif
13756 #ifndef NULL
13757 #define NULL (void*)0
13758 #endif
13759
13760 static void *task(p)
13761         void *p;
13762 {
13763         return (void *) (p == NULL);
13764 }
13765
13766
13767 int main(argc, argv)
13768         int argc;
13769         char **argv;
13770 {
13771
13772         /* pthread test function */
13773 #ifndef PTHREAD_CREATE_DETACHED
13774 #define PTHREAD_CREATE_DETACHED 1
13775 #endif
13776         pthread_t t;
13777         int status;
13778         int detach = PTHREAD_CREATE_DETACHED;
13779
13780 #if HAVE_PTHREADS > 4
13781         /* Final pthreads */
13782         pthread_attr_t attr;
13783
13784         status = pthread_attr_init(&attr);
13785         if( status ) return status;
13786
13787 #if HAVE_PTHREADS < 7
13788         status = pthread_attr_setdetachstate(&attr, &detach);
13789         if( status < 0 ) status = errno;
13790 #else
13791         status = pthread_attr_setdetachstate(&attr, detach);
13792 #endif
13793         if( status ) return status;
13794         status = pthread_create( &t, &attr, task, NULL );
13795 #if HAVE_PTHREADS < 7
13796         if( status < 0 ) status = errno;
13797 #endif
13798         if( status ) return status;
13799 #else
13800         /* Draft 4 pthreads */
13801         status = pthread_create( &t, pthread_attr_default, task, NULL );
13802         if( status ) return errno;
13803
13804         /* give thread a chance to complete */
13805         /* it should remain joinable and hence detachable */
13806         sleep( 1 );
13807
13808         status = pthread_detach( &t );
13809         if( status ) return errno;
13810 #endif
13811
13812 #ifdef HAVE_LINUX_THREADS
13813         pthread_kill_other_threads_np();
13814 #endif
13815
13816         return 0;
13817
13818 }
13819
13820 EOF
13821 if { (eval echo configure:13822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13822 then
13823   ol_cv_pthread_lc_r=yes
13824 else
13825   echo "configure: failed program was:" >&5
13826   cat conftest.$ac_ext >&5
13827   rm -fr conftest*
13828   ol_cv_pthread_lc_r=no
13829 fi
13830 rm -fr conftest*
13831 fi
13832
13833
13834                 # restore the LIBS
13835                 LIBS="$ol_LIBS"
13836         
13837 fi
13838
13839 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13840
13841         if test $ol_cv_pthread_lc_r = yes ; then
13842                 ol_link_pthreads="-lc_r"
13843                 ol_link_threads=posix
13844         fi
13845 fi
13846
13847
13848                 # Pthread try link: -threads (ol_cv_pthread_threads)
13849 if test "$ol_link_threads" = no ; then
13850         # try -threads
13851         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13852 echo "configure:13853: checking for pthread link with -threads" >&5
13853 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13854   echo $ac_n "(cached) $ac_c" 1>&6
13855 else
13856   
13857                 # save the flags
13858                 ol_LIBS="$LIBS"
13859                 LIBS="-threads $LIBS"
13860
13861                 if test "$cross_compiling" = yes; then
13862   cat > conftest.$ac_ext <<EOF
13863 #line 13864 "configure"
13864 #include "confdefs.h"
13865 /* pthread test headers */
13866 #include <pthread.h>
13867 #if HAVE_PTHREADS < 7
13868 #include <errno.h>
13869 #endif
13870 #ifndef NULL
13871 #define NULL (void*)0
13872 #endif
13873
13874 static void *task(p)
13875         void *p;
13876 {
13877         return (void *) (p == NULL);
13878 }
13879
13880 int main() {
13881
13882         /* pthread test function */
13883 #ifndef PTHREAD_CREATE_DETACHED
13884 #define PTHREAD_CREATE_DETACHED 1
13885 #endif
13886         pthread_t t;
13887         int status;
13888         int detach = PTHREAD_CREATE_DETACHED;
13889
13890 #if HAVE_PTHREADS > 4
13891         /* Final pthreads */
13892         pthread_attr_t attr;
13893
13894         status = pthread_attr_init(&attr);
13895         if( status ) return status;
13896
13897 #if HAVE_PTHREADS < 7
13898         status = pthread_attr_setdetachstate(&attr, &detach);
13899         if( status < 0 ) status = errno;
13900 #else
13901         status = pthread_attr_setdetachstate(&attr, detach);
13902 #endif
13903         if( status ) return status;
13904         status = pthread_create( &t, &attr, task, NULL );
13905 #if HAVE_PTHREADS < 7
13906         if( status < 0 ) status = errno;
13907 #endif
13908         if( status ) return status;
13909 #else
13910         /* Draft 4 pthreads */
13911         status = pthread_create( &t, pthread_attr_default, task, NULL );
13912         if( status ) return errno;
13913
13914         /* give thread a chance to complete */
13915         /* it should remain joinable and hence detachable */
13916         sleep( 1 );
13917
13918         status = pthread_detach( &t );
13919         if( status ) return errno;
13920 #endif
13921
13922 #ifdef HAVE_LINUX_THREADS
13923         pthread_kill_other_threads_np();
13924 #endif
13925
13926         return 0;
13927
13928 ; return 0; }
13929 EOF
13930 if { (eval echo configure:13931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13931   rm -rf conftest*
13932   ol_cv_pthread_threads=yes
13933 else
13934   echo "configure: failed program was:" >&5
13935   cat conftest.$ac_ext >&5
13936   rm -rf conftest*
13937   ol_cv_pthread_threads=no
13938 fi
13939 rm -f conftest*
13940 else
13941   cat > conftest.$ac_ext <<EOF
13942 #line 13943 "configure"
13943 #include "confdefs.h"
13944 /* pthread test headers */
13945 #include <pthread.h>
13946 #if HAVE_PTHREADS < 7
13947 #include <errno.h>
13948 #endif
13949 #ifndef NULL
13950 #define NULL (void*)0
13951 #endif
13952
13953 static void *task(p)
13954         void *p;
13955 {
13956         return (void *) (p == NULL);
13957 }
13958
13959
13960 int main(argc, argv)
13961         int argc;
13962         char **argv;
13963 {
13964
13965         /* pthread test function */
13966 #ifndef PTHREAD_CREATE_DETACHED
13967 #define PTHREAD_CREATE_DETACHED 1
13968 #endif
13969         pthread_t t;
13970         int status;
13971         int detach = PTHREAD_CREATE_DETACHED;
13972
13973 #if HAVE_PTHREADS > 4
13974         /* Final pthreads */
13975         pthread_attr_t attr;
13976
13977         status = pthread_attr_init(&attr);
13978         if( status ) return status;
13979
13980 #if HAVE_PTHREADS < 7
13981         status = pthread_attr_setdetachstate(&attr, &detach);
13982         if( status < 0 ) status = errno;
13983 #else
13984         status = pthread_attr_setdetachstate(&attr, detach);
13985 #endif
13986         if( status ) return status;
13987         status = pthread_create( &t, &attr, task, NULL );
13988 #if HAVE_PTHREADS < 7
13989         if( status < 0 ) status = errno;
13990 #endif
13991         if( status ) return status;
13992 #else
13993         /* Draft 4 pthreads */
13994         status = pthread_create( &t, pthread_attr_default, task, NULL );
13995         if( status ) return errno;
13996
13997         /* give thread a chance to complete */
13998         /* it should remain joinable and hence detachable */
13999         sleep( 1 );
14000
14001         status = pthread_detach( &t );
14002         if( status ) return errno;
14003 #endif
14004
14005 #ifdef HAVE_LINUX_THREADS
14006         pthread_kill_other_threads_np();
14007 #endif
14008
14009         return 0;
14010
14011 }
14012
14013 EOF
14014 if { (eval echo configure:14015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14015 then
14016   ol_cv_pthread_threads=yes
14017 else
14018   echo "configure: failed program was:" >&5
14019   cat conftest.$ac_ext >&5
14020   rm -fr conftest*
14021   ol_cv_pthread_threads=no
14022 fi
14023 rm -fr conftest*
14024 fi
14025
14026
14027                 # restore the LIBS
14028                 LIBS="$ol_LIBS"
14029         
14030 fi
14031
14032 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14033
14034         if test $ol_cv_pthread_threads = yes ; then
14035                 ol_link_pthreads="-threads"
14036                 ol_link_threads=posix
14037         fi
14038 fi
14039
14040
14041                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14042 if test "$ol_link_threads" = no ; then
14043         # try -lpthreads -lmach -lexc -lc_r
14044         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14045 echo "configure:14046: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14046 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14047   echo $ac_n "(cached) $ac_c" 1>&6
14048 else
14049   
14050                 # save the flags
14051                 ol_LIBS="$LIBS"
14052                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14053
14054                 if test "$cross_compiling" = yes; then
14055   cat > conftest.$ac_ext <<EOF
14056 #line 14057 "configure"
14057 #include "confdefs.h"
14058 /* pthread test headers */
14059 #include <pthread.h>
14060 #if HAVE_PTHREADS < 7
14061 #include <errno.h>
14062 #endif
14063 #ifndef NULL
14064 #define NULL (void*)0
14065 #endif
14066
14067 static void *task(p)
14068         void *p;
14069 {
14070         return (void *) (p == NULL);
14071 }
14072
14073 int main() {
14074
14075         /* pthread test function */
14076 #ifndef PTHREAD_CREATE_DETACHED
14077 #define PTHREAD_CREATE_DETACHED 1
14078 #endif
14079         pthread_t t;
14080         int status;
14081         int detach = PTHREAD_CREATE_DETACHED;
14082
14083 #if HAVE_PTHREADS > 4
14084         /* Final pthreads */
14085         pthread_attr_t attr;
14086
14087         status = pthread_attr_init(&attr);
14088         if( status ) return status;
14089
14090 #if HAVE_PTHREADS < 7
14091         status = pthread_attr_setdetachstate(&attr, &detach);
14092         if( status < 0 ) status = errno;
14093 #else
14094         status = pthread_attr_setdetachstate(&attr, detach);
14095 #endif
14096         if( status ) return status;
14097         status = pthread_create( &t, &attr, task, NULL );
14098 #if HAVE_PTHREADS < 7
14099         if( status < 0 ) status = errno;
14100 #endif
14101         if( status ) return status;
14102 #else
14103         /* Draft 4 pthreads */
14104         status = pthread_create( &t, pthread_attr_default, task, NULL );
14105         if( status ) return errno;
14106
14107         /* give thread a chance to complete */
14108         /* it should remain joinable and hence detachable */
14109         sleep( 1 );
14110
14111         status = pthread_detach( &t );
14112         if( status ) return errno;
14113 #endif
14114
14115 #ifdef HAVE_LINUX_THREADS
14116         pthread_kill_other_threads_np();
14117 #endif
14118
14119         return 0;
14120
14121 ; return 0; }
14122 EOF
14123 if { (eval echo configure:14124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14124   rm -rf conftest*
14125   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14126 else
14127   echo "configure: failed program was:" >&5
14128   cat conftest.$ac_ext >&5
14129   rm -rf conftest*
14130   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14131 fi
14132 rm -f conftest*
14133 else
14134   cat > conftest.$ac_ext <<EOF
14135 #line 14136 "configure"
14136 #include "confdefs.h"
14137 /* pthread test headers */
14138 #include <pthread.h>
14139 #if HAVE_PTHREADS < 7
14140 #include <errno.h>
14141 #endif
14142 #ifndef NULL
14143 #define NULL (void*)0
14144 #endif
14145
14146 static void *task(p)
14147         void *p;
14148 {
14149         return (void *) (p == NULL);
14150 }
14151
14152
14153 int main(argc, argv)
14154         int argc;
14155         char **argv;
14156 {
14157
14158         /* pthread test function */
14159 #ifndef PTHREAD_CREATE_DETACHED
14160 #define PTHREAD_CREATE_DETACHED 1
14161 #endif
14162         pthread_t t;
14163         int status;
14164         int detach = PTHREAD_CREATE_DETACHED;
14165
14166 #if HAVE_PTHREADS > 4
14167         /* Final pthreads */
14168         pthread_attr_t attr;
14169
14170         status = pthread_attr_init(&attr);
14171         if( status ) return status;
14172
14173 #if HAVE_PTHREADS < 7
14174         status = pthread_attr_setdetachstate(&attr, &detach);
14175         if( status < 0 ) status = errno;
14176 #else
14177         status = pthread_attr_setdetachstate(&attr, detach);
14178 #endif
14179         if( status ) return status;
14180         status = pthread_create( &t, &attr, task, NULL );
14181 #if HAVE_PTHREADS < 7
14182         if( status < 0 ) status = errno;
14183 #endif
14184         if( status ) return status;
14185 #else
14186         /* Draft 4 pthreads */
14187         status = pthread_create( &t, pthread_attr_default, task, NULL );
14188         if( status ) return errno;
14189
14190         /* give thread a chance to complete */
14191         /* it should remain joinable and hence detachable */
14192         sleep( 1 );
14193
14194         status = pthread_detach( &t );
14195         if( status ) return errno;
14196 #endif
14197
14198 #ifdef HAVE_LINUX_THREADS
14199         pthread_kill_other_threads_np();
14200 #endif
14201
14202         return 0;
14203
14204 }
14205
14206 EOF
14207 if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14208 then
14209   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14210 else
14211   echo "configure: failed program was:" >&5
14212   cat conftest.$ac_ext >&5
14213   rm -fr conftest*
14214   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14215 fi
14216 rm -fr conftest*
14217 fi
14218
14219
14220                 # restore the LIBS
14221                 LIBS="$ol_LIBS"
14222         
14223 fi
14224
14225 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14226
14227         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14228                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14229                 ol_link_threads=posix
14230         fi
14231 fi
14232
14233                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14234 if test "$ol_link_threads" = no ; then
14235         # try -lpthreads -lmach -lexc
14236         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14237 echo "configure:14238: checking for pthread link with -lpthreads -lmach -lexc" >&5
14238 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14239   echo $ac_n "(cached) $ac_c" 1>&6
14240 else
14241   
14242                 # save the flags
14243                 ol_LIBS="$LIBS"
14244                 LIBS="-lpthreads -lmach -lexc $LIBS"
14245
14246                 if test "$cross_compiling" = yes; then
14247   cat > conftest.$ac_ext <<EOF
14248 #line 14249 "configure"
14249 #include "confdefs.h"
14250 /* pthread test headers */
14251 #include <pthread.h>
14252 #if HAVE_PTHREADS < 7
14253 #include <errno.h>
14254 #endif
14255 #ifndef NULL
14256 #define NULL (void*)0
14257 #endif
14258
14259 static void *task(p)
14260         void *p;
14261 {
14262         return (void *) (p == NULL);
14263 }
14264
14265 int main() {
14266
14267         /* pthread test function */
14268 #ifndef PTHREAD_CREATE_DETACHED
14269 #define PTHREAD_CREATE_DETACHED 1
14270 #endif
14271         pthread_t t;
14272         int status;
14273         int detach = PTHREAD_CREATE_DETACHED;
14274
14275 #if HAVE_PTHREADS > 4
14276         /* Final pthreads */
14277         pthread_attr_t attr;
14278
14279         status = pthread_attr_init(&attr);
14280         if( status ) return status;
14281
14282 #if HAVE_PTHREADS < 7
14283         status = pthread_attr_setdetachstate(&attr, &detach);
14284         if( status < 0 ) status = errno;
14285 #else
14286         status = pthread_attr_setdetachstate(&attr, detach);
14287 #endif
14288         if( status ) return status;
14289         status = pthread_create( &t, &attr, task, NULL );
14290 #if HAVE_PTHREADS < 7
14291         if( status < 0 ) status = errno;
14292 #endif
14293         if( status ) return status;
14294 #else
14295         /* Draft 4 pthreads */
14296         status = pthread_create( &t, pthread_attr_default, task, NULL );
14297         if( status ) return errno;
14298
14299         /* give thread a chance to complete */
14300         /* it should remain joinable and hence detachable */
14301         sleep( 1 );
14302
14303         status = pthread_detach( &t );
14304         if( status ) return errno;
14305 #endif
14306
14307 #ifdef HAVE_LINUX_THREADS
14308         pthread_kill_other_threads_np();
14309 #endif
14310
14311         return 0;
14312
14313 ; return 0; }
14314 EOF
14315 if { (eval echo configure:14316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14316   rm -rf conftest*
14317   ol_cv_pthread_lpthreads_lmach_lexc=yes
14318 else
14319   echo "configure: failed program was:" >&5
14320   cat conftest.$ac_ext >&5
14321   rm -rf conftest*
14322   ol_cv_pthread_lpthreads_lmach_lexc=no
14323 fi
14324 rm -f conftest*
14325 else
14326   cat > conftest.$ac_ext <<EOF
14327 #line 14328 "configure"
14328 #include "confdefs.h"
14329 /* pthread test headers */
14330 #include <pthread.h>
14331 #if HAVE_PTHREADS < 7
14332 #include <errno.h>
14333 #endif
14334 #ifndef NULL
14335 #define NULL (void*)0
14336 #endif
14337
14338 static void *task(p)
14339         void *p;
14340 {
14341         return (void *) (p == NULL);
14342 }
14343
14344
14345 int main(argc, argv)
14346         int argc;
14347         char **argv;
14348 {
14349
14350         /* pthread test function */
14351 #ifndef PTHREAD_CREATE_DETACHED
14352 #define PTHREAD_CREATE_DETACHED 1
14353 #endif
14354         pthread_t t;
14355         int status;
14356         int detach = PTHREAD_CREATE_DETACHED;
14357
14358 #if HAVE_PTHREADS > 4
14359         /* Final pthreads */
14360         pthread_attr_t attr;
14361
14362         status = pthread_attr_init(&attr);
14363         if( status ) return status;
14364
14365 #if HAVE_PTHREADS < 7
14366         status = pthread_attr_setdetachstate(&attr, &detach);
14367         if( status < 0 ) status = errno;
14368 #else
14369         status = pthread_attr_setdetachstate(&attr, detach);
14370 #endif
14371         if( status ) return status;
14372         status = pthread_create( &t, &attr, task, NULL );
14373 #if HAVE_PTHREADS < 7
14374         if( status < 0 ) status = errno;
14375 #endif
14376         if( status ) return status;
14377 #else
14378         /* Draft 4 pthreads */
14379         status = pthread_create( &t, pthread_attr_default, task, NULL );
14380         if( status ) return errno;
14381
14382         /* give thread a chance to complete */
14383         /* it should remain joinable and hence detachable */
14384         sleep( 1 );
14385
14386         status = pthread_detach( &t );
14387         if( status ) return errno;
14388 #endif
14389
14390 #ifdef HAVE_LINUX_THREADS
14391         pthread_kill_other_threads_np();
14392 #endif
14393
14394         return 0;
14395
14396 }
14397
14398 EOF
14399 if { (eval echo configure:14400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14400 then
14401   ol_cv_pthread_lpthreads_lmach_lexc=yes
14402 else
14403   echo "configure: failed program was:" >&5
14404   cat conftest.$ac_ext >&5
14405   rm -fr conftest*
14406   ol_cv_pthread_lpthreads_lmach_lexc=no
14407 fi
14408 rm -fr conftest*
14409 fi
14410
14411
14412                 # restore the LIBS
14413                 LIBS="$ol_LIBS"
14414         
14415 fi
14416
14417 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14418
14419         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14420                 ol_link_pthreads="-lpthreads -lmach -lexc"
14421                 ol_link_threads=posix
14422         fi
14423 fi
14424
14425                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14426 if test "$ol_link_threads" = no ; then
14427         # try -lpthreads -lexc
14428         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14429 echo "configure:14430: checking for pthread link with -lpthreads -lexc" >&5
14430 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14431   echo $ac_n "(cached) $ac_c" 1>&6
14432 else
14433   
14434                 # save the flags
14435                 ol_LIBS="$LIBS"
14436                 LIBS="-lpthreads -lexc $LIBS"
14437
14438                 if test "$cross_compiling" = yes; then
14439   cat > conftest.$ac_ext <<EOF
14440 #line 14441 "configure"
14441 #include "confdefs.h"
14442 /* pthread test headers */
14443 #include <pthread.h>
14444 #if HAVE_PTHREADS < 7
14445 #include <errno.h>
14446 #endif
14447 #ifndef NULL
14448 #define NULL (void*)0
14449 #endif
14450
14451 static void *task(p)
14452         void *p;
14453 {
14454         return (void *) (p == NULL);
14455 }
14456
14457 int main() {
14458
14459         /* pthread test function */
14460 #ifndef PTHREAD_CREATE_DETACHED
14461 #define PTHREAD_CREATE_DETACHED 1
14462 #endif
14463         pthread_t t;
14464         int status;
14465         int detach = PTHREAD_CREATE_DETACHED;
14466
14467 #if HAVE_PTHREADS > 4
14468         /* Final pthreads */
14469         pthread_attr_t attr;
14470
14471         status = pthread_attr_init(&attr);
14472         if( status ) return status;
14473
14474 #if HAVE_PTHREADS < 7
14475         status = pthread_attr_setdetachstate(&attr, &detach);
14476         if( status < 0 ) status = errno;
14477 #else
14478         status = pthread_attr_setdetachstate(&attr, detach);
14479 #endif
14480         if( status ) return status;
14481         status = pthread_create( &t, &attr, task, NULL );
14482 #if HAVE_PTHREADS < 7
14483         if( status < 0 ) status = errno;
14484 #endif
14485         if( status ) return status;
14486 #else
14487         /* Draft 4 pthreads */
14488         status = pthread_create( &t, pthread_attr_default, task, NULL );
14489         if( status ) return errno;
14490
14491         /* give thread a chance to complete */
14492         /* it should remain joinable and hence detachable */
14493         sleep( 1 );
14494
14495         status = pthread_detach( &t );
14496         if( status ) return errno;
14497 #endif
14498
14499 #ifdef HAVE_LINUX_THREADS
14500         pthread_kill_other_threads_np();
14501 #endif
14502
14503         return 0;
14504
14505 ; return 0; }
14506 EOF
14507 if { (eval echo configure:14508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14508   rm -rf conftest*
14509   ol_cv_pthread_lpthreads_lexc=yes
14510 else
14511   echo "configure: failed program was:" >&5
14512   cat conftest.$ac_ext >&5
14513   rm -rf conftest*
14514   ol_cv_pthread_lpthreads_lexc=no
14515 fi
14516 rm -f conftest*
14517 else
14518   cat > conftest.$ac_ext <<EOF
14519 #line 14520 "configure"
14520 #include "confdefs.h"
14521 /* pthread test headers */
14522 #include <pthread.h>
14523 #if HAVE_PTHREADS < 7
14524 #include <errno.h>
14525 #endif
14526 #ifndef NULL
14527 #define NULL (void*)0
14528 #endif
14529
14530 static void *task(p)
14531         void *p;
14532 {
14533         return (void *) (p == NULL);
14534 }
14535
14536
14537 int main(argc, argv)
14538         int argc;
14539         char **argv;
14540 {
14541
14542         /* pthread test function */
14543 #ifndef PTHREAD_CREATE_DETACHED
14544 #define PTHREAD_CREATE_DETACHED 1
14545 #endif
14546         pthread_t t;
14547         int status;
14548         int detach = PTHREAD_CREATE_DETACHED;
14549
14550 #if HAVE_PTHREADS > 4
14551         /* Final pthreads */
14552         pthread_attr_t attr;
14553
14554         status = pthread_attr_init(&attr);
14555         if( status ) return status;
14556
14557 #if HAVE_PTHREADS < 7
14558         status = pthread_attr_setdetachstate(&attr, &detach);
14559         if( status < 0 ) status = errno;
14560 #else
14561         status = pthread_attr_setdetachstate(&attr, detach);
14562 #endif
14563         if( status ) return status;
14564         status = pthread_create( &t, &attr, task, NULL );
14565 #if HAVE_PTHREADS < 7
14566         if( status < 0 ) status = errno;
14567 #endif
14568         if( status ) return status;
14569 #else
14570         /* Draft 4 pthreads */
14571         status = pthread_create( &t, pthread_attr_default, task, NULL );
14572         if( status ) return errno;
14573
14574         /* give thread a chance to complete */
14575         /* it should remain joinable and hence detachable */
14576         sleep( 1 );
14577
14578         status = pthread_detach( &t );
14579         if( status ) return errno;
14580 #endif
14581
14582 #ifdef HAVE_LINUX_THREADS
14583         pthread_kill_other_threads_np();
14584 #endif
14585
14586         return 0;
14587
14588 }
14589
14590 EOF
14591 if { (eval echo configure:14592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14592 then
14593   ol_cv_pthread_lpthreads_lexc=yes
14594 else
14595   echo "configure: failed program was:" >&5
14596   cat conftest.$ac_ext >&5
14597   rm -fr conftest*
14598   ol_cv_pthread_lpthreads_lexc=no
14599 fi
14600 rm -fr conftest*
14601 fi
14602
14603
14604                 # restore the LIBS
14605                 LIBS="$ol_LIBS"
14606         
14607 fi
14608
14609 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14610
14611         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14612                 ol_link_pthreads="-lpthreads -lexc"
14613                 ol_link_threads=posix
14614         fi
14615 fi
14616
14617
14618                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14619 if test "$ol_link_threads" = no ; then
14620         # try -lpthreads
14621         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14622 echo "configure:14623: checking for pthread link with -lpthreads" >&5
14623 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14624   echo $ac_n "(cached) $ac_c" 1>&6
14625 else
14626   
14627                 # save the flags
14628                 ol_LIBS="$LIBS"
14629                 LIBS="-lpthreads $LIBS"
14630
14631                 if test "$cross_compiling" = yes; then
14632   cat > conftest.$ac_ext <<EOF
14633 #line 14634 "configure"
14634 #include "confdefs.h"
14635 /* pthread test headers */
14636 #include <pthread.h>
14637 #if HAVE_PTHREADS < 7
14638 #include <errno.h>
14639 #endif
14640 #ifndef NULL
14641 #define NULL (void*)0
14642 #endif
14643
14644 static void *task(p)
14645         void *p;
14646 {
14647         return (void *) (p == NULL);
14648 }
14649
14650 int main() {
14651
14652         /* pthread test function */
14653 #ifndef PTHREAD_CREATE_DETACHED
14654 #define PTHREAD_CREATE_DETACHED 1
14655 #endif
14656         pthread_t t;
14657         int status;
14658         int detach = PTHREAD_CREATE_DETACHED;
14659
14660 #if HAVE_PTHREADS > 4
14661         /* Final pthreads */
14662         pthread_attr_t attr;
14663
14664         status = pthread_attr_init(&attr);
14665         if( status ) return status;
14666
14667 #if HAVE_PTHREADS < 7
14668         status = pthread_attr_setdetachstate(&attr, &detach);
14669         if( status < 0 ) status = errno;
14670 #else
14671         status = pthread_attr_setdetachstate(&attr, detach);
14672 #endif
14673         if( status ) return status;
14674         status = pthread_create( &t, &attr, task, NULL );
14675 #if HAVE_PTHREADS < 7
14676         if( status < 0 ) status = errno;
14677 #endif
14678         if( status ) return status;
14679 #else
14680         /* Draft 4 pthreads */
14681         status = pthread_create( &t, pthread_attr_default, task, NULL );
14682         if( status ) return errno;
14683
14684         /* give thread a chance to complete */
14685         /* it should remain joinable and hence detachable */
14686         sleep( 1 );
14687
14688         status = pthread_detach( &t );
14689         if( status ) return errno;
14690 #endif
14691
14692 #ifdef HAVE_LINUX_THREADS
14693         pthread_kill_other_threads_np();
14694 #endif
14695
14696         return 0;
14697
14698 ; return 0; }
14699 EOF
14700 if { (eval echo configure:14701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14701   rm -rf conftest*
14702   ol_cv_pthread_lib_lpthreads=yes
14703 else
14704   echo "configure: failed program was:" >&5
14705   cat conftest.$ac_ext >&5
14706   rm -rf conftest*
14707   ol_cv_pthread_lib_lpthreads=no
14708 fi
14709 rm -f conftest*
14710 else
14711   cat > conftest.$ac_ext <<EOF
14712 #line 14713 "configure"
14713 #include "confdefs.h"
14714 /* pthread test headers */
14715 #include <pthread.h>
14716 #if HAVE_PTHREADS < 7
14717 #include <errno.h>
14718 #endif
14719 #ifndef NULL
14720 #define NULL (void*)0
14721 #endif
14722
14723 static void *task(p)
14724         void *p;
14725 {
14726         return (void *) (p == NULL);
14727 }
14728
14729
14730 int main(argc, argv)
14731         int argc;
14732         char **argv;
14733 {
14734
14735         /* pthread test function */
14736 #ifndef PTHREAD_CREATE_DETACHED
14737 #define PTHREAD_CREATE_DETACHED 1
14738 #endif
14739         pthread_t t;
14740         int status;
14741         int detach = PTHREAD_CREATE_DETACHED;
14742
14743 #if HAVE_PTHREADS > 4
14744         /* Final pthreads */
14745         pthread_attr_t attr;
14746
14747         status = pthread_attr_init(&attr);
14748         if( status ) return status;
14749
14750 #if HAVE_PTHREADS < 7
14751         status = pthread_attr_setdetachstate(&attr, &detach);
14752         if( status < 0 ) status = errno;
14753 #else
14754         status = pthread_attr_setdetachstate(&attr, detach);
14755 #endif
14756         if( status ) return status;
14757         status = pthread_create( &t, &attr, task, NULL );
14758 #if HAVE_PTHREADS < 7
14759         if( status < 0 ) status = errno;
14760 #endif
14761         if( status ) return status;
14762 #else
14763         /* Draft 4 pthreads */
14764         status = pthread_create( &t, pthread_attr_default, task, NULL );
14765         if( status ) return errno;
14766
14767         /* give thread a chance to complete */
14768         /* it should remain joinable and hence detachable */
14769         sleep( 1 );
14770
14771         status = pthread_detach( &t );
14772         if( status ) return errno;
14773 #endif
14774
14775 #ifdef HAVE_LINUX_THREADS
14776         pthread_kill_other_threads_np();
14777 #endif
14778
14779         return 0;
14780
14781 }
14782
14783 EOF
14784 if { (eval echo configure:14785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14785 then
14786   ol_cv_pthread_lib_lpthreads=yes
14787 else
14788   echo "configure: failed program was:" >&5
14789   cat conftest.$ac_ext >&5
14790   rm -fr conftest*
14791   ol_cv_pthread_lib_lpthreads=no
14792 fi
14793 rm -fr conftest*
14794 fi
14795
14796
14797                 # restore the LIBS
14798                 LIBS="$ol_LIBS"
14799         
14800 fi
14801
14802 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14803
14804         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14805                 ol_link_pthreads="-lpthreads"
14806                 ol_link_threads=posix
14807         fi
14808 fi
14809
14810
14811                 if test $ol_link_threads != no ; then
14812                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14813
14814                                                 save_CPPFLAGS="$CPPFLAGS"
14815                         save_LIBS="$LIBS"
14816                         LIBS="$LTHREAD_LIBS $LIBS"
14817
14818                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14819 do
14820 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14821 echo "configure:14822: checking for $ac_func" >&5
14822 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14823   echo $ac_n "(cached) $ac_c" 1>&6
14824 else
14825   cat > conftest.$ac_ext <<EOF
14826 #line 14827 "configure"
14827 #include "confdefs.h"
14828 /* System header to define __stub macros and hopefully few prototypes,
14829     which can conflict with char $ac_func(); below.  */
14830 #include <assert.h>
14831 /* Override any gcc2 internal prototype to avoid an error.  */
14832 /* We use char because int might match the return type of a gcc2
14833     builtin and then its argument prototype would still apply.  */
14834 char $ac_func();
14835 char (*f)();
14836
14837 int main() {
14838
14839 /* The GNU C library defines this for functions which it implements
14840     to always fail with ENOSYS.  Some functions are actually named
14841     something starting with __ and the normal name is an alias.  */
14842 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14843 choke me
14844 #else
14845 f = $ac_func;
14846 #endif
14847
14848 ; return 0; }
14849 EOF
14850 if { (eval echo configure:14851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14851   rm -rf conftest*
14852   eval "ac_cv_func_$ac_func=yes"
14853 else
14854   echo "configure: failed program was:" >&5
14855   cat conftest.$ac_ext >&5
14856   rm -rf conftest*
14857   eval "ac_cv_func_$ac_func=no"
14858 fi
14859 rm -f conftest*
14860 fi
14861
14862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14863   echo "$ac_t""yes" 1>&6
14864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14865   cat >> confdefs.h <<EOF
14866 #define $ac_tr_func 1
14867 EOF
14868  
14869 else
14870   echo "$ac_t""no" 1>&6
14871 fi
14872 done
14873
14874
14875                         if test $ac_cv_func_sched_yield = no -a \
14876                                 $ac_cv_func_pthread_yield = no -a \
14877                                 $ac_cv_func_thr_yield = no ; then
14878                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14879 echo "configure:14880: checking for sched_yield in -lrt" >&5
14880 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14881 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14882   echo $ac_n "(cached) $ac_c" 1>&6
14883 else
14884   ac_save_LIBS="$LIBS"
14885 LIBS="-lrt  $LIBS"
14886 cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889 /* Override any gcc2 internal prototype to avoid an error.  */
14890 /* We use char because int might match the return type of a gcc2
14891     builtin and then its argument prototype would still apply.  */
14892 char sched_yield();
14893
14894 int main() {
14895 sched_yield()
14896 ; return 0; }
14897 EOF
14898 if { (eval echo configure:14899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14899   rm -rf conftest*
14900   eval "ac_cv_lib_$ac_lib_var=yes"
14901 else
14902   echo "configure: failed program was:" >&5
14903   cat conftest.$ac_ext >&5
14904   rm -rf conftest*
14905   eval "ac_cv_lib_$ac_lib_var=no"
14906 fi
14907 rm -f conftest*
14908 LIBS="$ac_save_LIBS"
14909
14910 fi
14911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14912   echo "$ac_t""yes" 1>&6
14913   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14914                                         cat >> confdefs.h <<\EOF
14915 #define HAVE_SCHED_YIELD 1
14916 EOF
14917
14918                                         ac_cv_func_sched_yield=yes
14919 else
14920   echo "$ac_t""no" 1>&6
14921 ac_cv_func_sched_yield=no
14922 fi
14923
14924                         fi
14925                         if test $ac_cv_func_sched_yield = no -a \
14926                                 $ac_cv_func_pthread_yield = no -a \
14927                                 "$ac_cv_func_thr_yield" = no ; then
14928                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14929                         fi
14930
14931                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14932 do
14933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14934 echo "configure:14935: checking for $ac_func" >&5
14935 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14936   echo $ac_n "(cached) $ac_c" 1>&6
14937 else
14938   cat > conftest.$ac_ext <<EOF
14939 #line 14940 "configure"
14940 #include "confdefs.h"
14941 /* System header to define __stub macros and hopefully few prototypes,
14942     which can conflict with char $ac_func(); below.  */
14943 #include <assert.h>
14944 /* Override any gcc2 internal prototype to avoid an error.  */
14945 /* We use char because int might match the return type of a gcc2
14946     builtin and then its argument prototype would still apply.  */
14947 char $ac_func();
14948 char (*f)();
14949
14950 int main() {
14951
14952 /* The GNU C library defines this for functions which it implements
14953     to always fail with ENOSYS.  Some functions are actually named
14954     something starting with __ and the normal name is an alias.  */
14955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14956 choke me
14957 #else
14958 f = $ac_func;
14959 #endif
14960
14961 ; return 0; }
14962 EOF
14963 if { (eval echo configure:14964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14964   rm -rf conftest*
14965   eval "ac_cv_func_$ac_func=yes"
14966 else
14967   echo "configure: failed program was:" >&5
14968   cat conftest.$ac_ext >&5
14969   rm -rf conftest*
14970   eval "ac_cv_func_$ac_func=no"
14971 fi
14972 rm -f conftest*
14973 fi
14974
14975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14976   echo "$ac_t""yes" 1>&6
14977     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14978   cat >> confdefs.h <<EOF
14979 #define $ac_tr_func 1
14980 EOF
14981  
14982 else
14983   echo "$ac_t""no" 1>&6
14984 fi
14985 done
14986
14987
14988                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14989 echo "configure:14990: checking for pthread_detach with <pthread.h>" >&5
14990 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14991   echo $ac_n "(cached) $ac_c" 1>&6
14992 else
14993   
14994                                                                 cat > conftest.$ac_ext <<EOF
14995 #line 14996 "configure"
14996 #include "confdefs.h"
14997
14998 #include <pthread.h>
14999 #ifndef NULL
15000 #define NULL (void*)0
15001 #endif
15002
15003 int main() {
15004 pthread_detach(NULL);
15005 ; return 0; }
15006 EOF
15007 if { (eval echo configure:15008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15008   rm -rf conftest*
15009   ol_cv_func_pthread_detach=yes
15010 else
15011   echo "configure: failed program was:" >&5
15012   cat conftest.$ac_ext >&5
15013   rm -rf conftest*
15014   ol_cv_func_pthread_detach=no
15015 fi
15016 rm -f conftest*
15017                         
15018 fi
15019
15020 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15021
15022                         if test $ol_cv_func_pthread_detach = no ; then
15023                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15024                         fi
15025
15026                         cat >> confdefs.h <<\EOF
15027 #define HAVE_PTHREAD_DETACH 1
15028 EOF
15029
15030
15031                                                 for ac_func in \
15032                                 pthread_setconcurrency \
15033                                 pthread_getconcurrency \
15034                                 thr_setconcurrency \
15035                                 thr_getconcurrency \
15036                         
15037 do
15038 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15039 echo "configure:15040: checking for $ac_func" >&5
15040 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15041   echo $ac_n "(cached) $ac_c" 1>&6
15042 else
15043   cat > conftest.$ac_ext <<EOF
15044 #line 15045 "configure"
15045 #include "confdefs.h"
15046 /* System header to define __stub macros and hopefully few prototypes,
15047     which can conflict with char $ac_func(); below.  */
15048 #include <assert.h>
15049 /* Override any gcc2 internal prototype to avoid an error.  */
15050 /* We use char because int might match the return type of a gcc2
15051     builtin and then its argument prototype would still apply.  */
15052 char $ac_func();
15053 char (*f)();
15054
15055 int main() {
15056
15057 /* The GNU C library defines this for functions which it implements
15058     to always fail with ENOSYS.  Some functions are actually named
15059     something starting with __ and the normal name is an alias.  */
15060 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15061 choke me
15062 #else
15063 f = $ac_func;
15064 #endif
15065
15066 ; return 0; }
15067 EOF
15068 if { (eval echo configure:15069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15069   rm -rf conftest*
15070   eval "ac_cv_func_$ac_func=yes"
15071 else
15072   echo "configure: failed program was:" >&5
15073   cat conftest.$ac_ext >&5
15074   rm -rf conftest*
15075   eval "ac_cv_func_$ac_func=no"
15076 fi
15077 rm -f conftest*
15078 fi
15079
15080 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15081   echo "$ac_t""yes" 1>&6
15082     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15083   cat >> confdefs.h <<EOF
15084 #define $ac_tr_func 1
15085 EOF
15086  
15087 else
15088   echo "$ac_t""no" 1>&6
15089 fi
15090 done
15091
15092
15093                         
15094         for ac_func in pthread_kill_other_threads_np
15095 do
15096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15097 echo "configure:15098: checking for $ac_func" >&5
15098 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15099   echo $ac_n "(cached) $ac_c" 1>&6
15100 else
15101   cat > conftest.$ac_ext <<EOF
15102 #line 15103 "configure"
15103 #include "confdefs.h"
15104 /* System header to define __stub macros and hopefully few prototypes,
15105     which can conflict with char $ac_func(); below.  */
15106 #include <assert.h>
15107 /* Override any gcc2 internal prototype to avoid an error.  */
15108 /* We use char because int might match the return type of a gcc2
15109     builtin and then its argument prototype would still apply.  */
15110 char $ac_func();
15111 char (*f)();
15112
15113 int main() {
15114
15115 /* The GNU C library defines this for functions which it implements
15116     to always fail with ENOSYS.  Some functions are actually named
15117     something starting with __ and the normal name is an alias.  */
15118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15119 choke me
15120 #else
15121 f = $ac_func;
15122 #endif
15123
15124 ; return 0; }
15125 EOF
15126 if { (eval echo configure:15127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15127   rm -rf conftest*
15128   eval "ac_cv_func_$ac_func=yes"
15129 else
15130   echo "configure: failed program was:" >&5
15131   cat conftest.$ac_ext >&5
15132   rm -rf conftest*
15133   eval "ac_cv_func_$ac_func=no"
15134 fi
15135 rm -f conftest*
15136 fi
15137
15138 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15139   echo "$ac_t""yes" 1>&6
15140     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15141   cat >> confdefs.h <<EOF
15142 #define $ac_tr_func 1
15143 EOF
15144  
15145 else
15146   echo "$ac_t""no" 1>&6
15147 fi
15148 done
15149
15150         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15151 echo "configure:15152: checking for LinuxThreads implementation" >&5
15152 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15156 fi
15157
15158 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15159
15160                         
15161         
15162         
15163         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15164 echo "configure:15165: checking for LinuxThreads consistency" >&5
15165 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15166   echo $ac_n "(cached) $ac_c" 1>&6
15167 else
15168   
15169                 if test $ol_cv_header_linux_threads = yes -a \
15170                         $ol_cv_sys_linux_threads = yes; then
15171                         ol_cv_linux_threads=yes
15172                 elif test $ol_cv_header_linux_threads = no -a \
15173                         $ol_cv_sys_linux_threads = no; then
15174                         ol_cv_linux_threads=no
15175                 else
15176                         ol_cv_linux_threads=error
15177                 fi
15178         
15179 fi
15180
15181 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15182
15183
15184                         if test $ol_cv_linux_threads = error; then
15185                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15186                         fi
15187
15188                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15189 echo "configure:15190: checking if pthread_create() works" >&5
15190 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15191   echo $ac_n "(cached) $ac_c" 1>&6
15192 else
15193   
15194                         if test "$cross_compiling" = yes; then
15195                                 ol_cv_pthread_create_works=yes
15196 else
15197   cat > conftest.$ac_ext <<EOF
15198 #line 15199 "configure"
15199 #include "confdefs.h"
15200 /* pthread test headers */
15201 #include <pthread.h>
15202 #if HAVE_PTHREADS < 7
15203 #include <errno.h>
15204 #endif
15205 #ifndef NULL
15206 #define NULL (void*)0
15207 #endif
15208
15209 static void *task(p)
15210         void *p;
15211 {
15212         return (void *) (p == NULL);
15213 }
15214
15215
15216 int main(argc, argv)
15217         int argc;
15218         char **argv;
15219 {
15220
15221         /* pthread test function */
15222 #ifndef PTHREAD_CREATE_DETACHED
15223 #define PTHREAD_CREATE_DETACHED 1
15224 #endif
15225         pthread_t t;
15226         int status;
15227         int detach = PTHREAD_CREATE_DETACHED;
15228
15229 #if HAVE_PTHREADS > 4
15230         /* Final pthreads */
15231         pthread_attr_t attr;
15232
15233         status = pthread_attr_init(&attr);
15234         if( status ) return status;
15235
15236 #if HAVE_PTHREADS < 7
15237         status = pthread_attr_setdetachstate(&attr, &detach);
15238         if( status < 0 ) status = errno;
15239 #else
15240         status = pthread_attr_setdetachstate(&attr, detach);
15241 #endif
15242         if( status ) return status;
15243         status = pthread_create( &t, &attr, task, NULL );
15244 #if HAVE_PTHREADS < 7
15245         if( status < 0 ) status = errno;
15246 #endif
15247         if( status ) return status;
15248 #else
15249         /* Draft 4 pthreads */
15250         status = pthread_create( &t, pthread_attr_default, task, NULL );
15251         if( status ) return errno;
15252
15253         /* give thread a chance to complete */
15254         /* it should remain joinable and hence detachable */
15255         sleep( 1 );
15256
15257         status = pthread_detach( &t );
15258         if( status ) return errno;
15259 #endif
15260
15261 #ifdef HAVE_LINUX_THREADS
15262         pthread_kill_other_threads_np();
15263 #endif
15264
15265         return 0;
15266
15267 }
15268
15269 EOF
15270 if { (eval echo configure:15271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15271 then
15272   ol_cv_pthread_create_works=yes
15273 else
15274   echo "configure: failed program was:" >&5
15275   cat conftest.$ac_ext >&5
15276   rm -fr conftest*
15277   ol_cv_pthread_create_works=no
15278 fi
15279 rm -fr conftest*
15280 fi
15281
15282 fi
15283
15284 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15285
15286                         if test $ol_cv_pthread_create_works = no ; then
15287                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15288                         fi
15289
15290                                                 if test $ol_with_yielding_select = auto ; then
15291                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15292 echo "configure:15293: checking if select yields when using pthreads" >&5
15293 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15294   echo $ac_n "(cached) $ac_c" 1>&6
15295 else
15296   
15297                                 if test "$cross_compiling" = yes; then
15298   ol_cv_pthread_select_yields=cross
15299 else
15300   cat > conftest.$ac_ext <<EOF
15301 #line 15302 "configure"
15302 #include "confdefs.h"
15303
15304 #include <sys/types.h>
15305 #include <sys/time.h>
15306 #include <unistd.h>
15307 #include <pthread.h>
15308 #ifndef NULL
15309 #define NULL (void*) 0
15310 #endif
15311
15312 static int fildes[2];
15313
15314 static void *task(p)
15315         void *p;
15316 {
15317         int i;
15318         struct timeval tv;
15319
15320         fd_set rfds;
15321
15322         tv.tv_sec=10;
15323         tv.tv_usec=0;
15324
15325         FD_ZERO(&rfds);
15326         FD_SET(fildes[0], &rfds);
15327
15328         /* we're not interested in any fds */
15329         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15330
15331         if(i < 0) {
15332                 perror("select");
15333                 exit(10);
15334         }
15335
15336         exit(0); /* if we exit here, the select blocked the whole process */
15337 }
15338
15339 int main(argc, argv)
15340         int argc;
15341         char **argv;
15342 {
15343         pthread_t t;
15344
15345         /* create a pipe to select */
15346         if(pipe(&fildes[0])) {
15347                 perror("select");
15348                 exit(1);
15349         }
15350
15351 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15352         (void) pthread_setconcurrency(2);
15353 #else
15354 #ifdef HAVE_THR_SETCONCURRENCY
15355         /* Set Solaris LWP concurrency to 2 */
15356         thr_setconcurrency(2);
15357 #endif
15358 #endif
15359
15360 #if HAVE_PTHREADS < 6
15361         pthread_create(&t, pthread_attr_default, task, NULL);
15362 #else
15363         pthread_create(&t, NULL, task, NULL);
15364 #endif
15365
15366         /* make sure task runs first */
15367 #if HAVE_THR_YIELD
15368         thr_yield();
15369 #elif defined( HAVE_SCHED_YIELD )
15370         sched_yield();
15371 #elif defined( HAVE_PTHREAD_YIELD )
15372         pthread_yield();
15373 #endif
15374
15375         exit(2);
15376 }
15377 EOF
15378 if { (eval echo configure:15379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15379 then
15380   ol_cv_pthread_select_yields=no
15381 else
15382   echo "configure: failed program was:" >&5
15383   cat conftest.$ac_ext >&5
15384   rm -fr conftest*
15385   ol_cv_pthread_select_yields=yes
15386 fi
15387 rm -fr conftest*
15388 fi
15389
15390 fi
15391
15392 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15393
15394                                 if test $ol_cv_pthread_select_yields = cross ; then
15395                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15396                                 fi
15397
15398                                 if test $ol_cv_pthread_select_yields = yes ; then
15399                                         ol_with_yielding_select=yes
15400                                 fi
15401                         fi
15402
15403                                                 CPPFLAGS="$save_CPPFLAGS"
15404                         LIBS="$save_LIBS"
15405                 else
15406                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15407                 fi
15408         fi
15409
15410         if test $ol_with_threads = posix ; then
15411                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15412         fi
15413 fi
15414
15415 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15416         -o $ol_with_threads = mach ; then
15417
15418                 for ac_hdr in mach/cthreads.h cthreads.h
15419 do
15420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15422 echo "configure:15423: checking for $ac_hdr" >&5
15423 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15424   echo $ac_n "(cached) $ac_c" 1>&6
15425 else
15426   cat > conftest.$ac_ext <<EOF
15427 #line 15428 "configure"
15428 #include "confdefs.h"
15429 #include <$ac_hdr>
15430 EOF
15431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15432 { (eval echo configure:15433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15434 if test -z "$ac_err"; then
15435   rm -rf conftest*
15436   eval "ac_cv_header_$ac_safe=yes"
15437 else
15438   echo "$ac_err" >&5
15439   echo "configure: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   rm -rf conftest*
15442   eval "ac_cv_header_$ac_safe=no"
15443 fi
15444 rm -f conftest*
15445 fi
15446 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15447   echo "$ac_t""yes" 1>&6
15448     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15449   cat >> confdefs.h <<EOF
15450 #define $ac_tr_hdr 1
15451 EOF
15452  
15453 else
15454   echo "$ac_t""no" 1>&6
15455 fi
15456 done
15457
15458         if test $ac_cv_header_mach_cthreads_h = yes ; then
15459                 ol_with_threads=found
15460
15461                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15462 echo "configure:15463: checking for cthread_fork" >&5
15463 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15464   echo $ac_n "(cached) $ac_c" 1>&6
15465 else
15466   cat > conftest.$ac_ext <<EOF
15467 #line 15468 "configure"
15468 #include "confdefs.h"
15469 /* System header to define __stub macros and hopefully few prototypes,
15470     which can conflict with char cthread_fork(); below.  */
15471 #include <assert.h>
15472 /* Override any gcc2 internal prototype to avoid an error.  */
15473 /* We use char because int might match the return type of a gcc2
15474     builtin and then its argument prototype would still apply.  */
15475 char cthread_fork();
15476 char (*f)();
15477
15478 int main() {
15479
15480 /* The GNU C library defines this for functions which it implements
15481     to always fail with ENOSYS.  Some functions are actually named
15482     something starting with __ and the normal name is an alias.  */
15483 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15484 choke me
15485 #else
15486 f = cthread_fork;
15487 #endif
15488
15489 ; return 0; }
15490 EOF
15491 if { (eval echo configure:15492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15492   rm -rf conftest*
15493   eval "ac_cv_func_cthread_fork=yes"
15494 else
15495   echo "configure: failed program was:" >&5
15496   cat conftest.$ac_ext >&5
15497   rm -rf conftest*
15498   eval "ac_cv_func_cthread_fork=no"
15499 fi
15500 rm -f conftest*
15501 fi
15502
15503 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15504   echo "$ac_t""yes" 1>&6
15505   ol_link_threads=yes
15506 else
15507   echo "$ac_t""no" 1>&6
15508 fi
15509
15510
15511                 if test $ol_link_threads = no ; then
15512                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15513 echo "configure:15514: checking for cthread_fork with -all_load" >&5
15514 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15515   echo $ac_n "(cached) $ac_c" 1>&6
15516 else
15517   
15518                                                                 save_LIBS="$LIBS"
15519                                 LIBS="-all_load $LIBS"
15520                                 cat > conftest.$ac_ext <<EOF
15521 #line 15522 "configure"
15522 #include "confdefs.h"
15523 #include <mach/cthreads.h>
15524 int main() {
15525
15526                                         cthread_fork((void *)0, (void *)0);
15527                                         
15528 ; return 0; }
15529 EOF
15530 if { (eval echo configure:15531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15531   rm -rf conftest*
15532   ol_cv_cthread_all_load=yes
15533 else
15534   echo "configure: failed program was:" >&5
15535   cat conftest.$ac_ext >&5
15536   rm -rf conftest*
15537   ol_cv_cthread_all_load=no
15538 fi
15539 rm -f conftest*
15540                                                                 LIBS="$save_LIBS"
15541                         
15542 fi
15543
15544 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15545
15546                         if test $ol_cv_cthread_all_load = yes ; then
15547                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15548                                 ol_link_threads=mach
15549                                 ol_with_threads=found
15550                         fi
15551                 fi
15552
15553         elif test $ac_cv_header_cthreads_h = yes ; then
15554                                 
15555                 ol_with_threads=found
15556  
15557                                 save_LIBS="$LIBS"
15558                 LIBS="$LIBS -lthreads"
15559                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15560 echo "configure:15561: checking for cthread_fork" >&5
15561 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15562   echo $ac_n "(cached) $ac_c" 1>&6
15563 else
15564   cat > conftest.$ac_ext <<EOF
15565 #line 15566 "configure"
15566 #include "confdefs.h"
15567 /* System header to define __stub macros and hopefully few prototypes,
15568     which can conflict with char cthread_fork(); below.  */
15569 #include <assert.h>
15570 /* Override any gcc2 internal prototype to avoid an error.  */
15571 /* We use char because int might match the return type of a gcc2
15572     builtin and then its argument prototype would still apply.  */
15573 char cthread_fork();
15574 char (*f)();
15575
15576 int main() {
15577
15578 /* The GNU C library defines this for functions which it implements
15579     to always fail with ENOSYS.  Some functions are actually named
15580     something starting with __ and the normal name is an alias.  */
15581 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15582 choke me
15583 #else
15584 f = cthread_fork;
15585 #endif
15586
15587 ; return 0; }
15588 EOF
15589 if { (eval echo configure:15590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15590   rm -rf conftest*
15591   eval "ac_cv_func_cthread_fork=yes"
15592 else
15593   echo "configure: failed program was:" >&5
15594   cat conftest.$ac_ext >&5
15595   rm -rf conftest*
15596   eval "ac_cv_func_cthread_fork=no"
15597 fi
15598 rm -f conftest*
15599 fi
15600
15601 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15602   echo "$ac_t""yes" 1>&6
15603   ol_link_threads=yes
15604 else
15605   echo "$ac_t""no" 1>&6
15606 fi
15607
15608                 LIBS="$save_LIBS"
15609
15610                 if test $ol_link_threads = yes ; then
15611                         LTHREAD_LIBS="-lthreads"
15612                         ol_link_threads=mach
15613                         ol_with_threads=found
15614                 else
15615                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15616                 fi
15617
15618         elif test $ol_with_threads = mach ; then
15619                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15620         fi
15621
15622         if test $ol_link_threads = mach ; then
15623                 cat >> confdefs.h <<\EOF
15624 #define HAVE_MACH_CTHREADS 1
15625 EOF
15626
15627         elif test $ol_with_threads = found ; then
15628                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15629         fi
15630 fi
15631
15632 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15633         -o $ol_with_threads = pth ; then
15634
15635         for ac_hdr in pth.h
15636 do
15637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15639 echo "configure:15640: checking for $ac_hdr" >&5
15640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15641   echo $ac_n "(cached) $ac_c" 1>&6
15642 else
15643   cat > conftest.$ac_ext <<EOF
15644 #line 15645 "configure"
15645 #include "confdefs.h"
15646 #include <$ac_hdr>
15647 EOF
15648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15649 { (eval echo configure:15650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15651 if test -z "$ac_err"; then
15652   rm -rf conftest*
15653   eval "ac_cv_header_$ac_safe=yes"
15654 else
15655   echo "$ac_err" >&5
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   eval "ac_cv_header_$ac_safe=no"
15660 fi
15661 rm -f conftest*
15662 fi
15663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15664   echo "$ac_t""yes" 1>&6
15665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15666   cat >> confdefs.h <<EOF
15667 #define $ac_tr_hdr 1
15668 EOF
15669  
15670 else
15671   echo "$ac_t""no" 1>&6
15672 fi
15673 done
15674
15675
15676         if test $ac_cv_header_pth_h = yes ; then
15677                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15678 echo "configure:15679: checking for pth_version in -lpth" >&5
15679 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15681   echo $ac_n "(cached) $ac_c" 1>&6
15682 else
15683   ac_save_LIBS="$LIBS"
15684 LIBS="-lpth  $LIBS"
15685 cat > conftest.$ac_ext <<EOF
15686 #line 15687 "configure"
15687 #include "confdefs.h"
15688 /* Override any gcc2 internal prototype to avoid an error.  */
15689 /* We use char because int might match the return type of a gcc2
15690     builtin and then its argument prototype would still apply.  */
15691 char pth_version();
15692
15693 int main() {
15694 pth_version()
15695 ; return 0; }
15696 EOF
15697 if { (eval echo configure:15698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15698   rm -rf conftest*
15699   eval "ac_cv_lib_$ac_lib_var=yes"
15700 else
15701   echo "configure: failed program was:" >&5
15702   cat conftest.$ac_ext >&5
15703   rm -rf conftest*
15704   eval "ac_cv_lib_$ac_lib_var=no"
15705 fi
15706 rm -f conftest*
15707 LIBS="$ac_save_LIBS"
15708
15709 fi
15710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15711   echo "$ac_t""yes" 1>&6
15712   have_pth=yes
15713 else
15714   echo "$ac_t""no" 1>&6
15715 have_pth=no
15716 fi
15717
15718
15719                 if test $have_pth = yes ; then
15720                         cat >> confdefs.h <<\EOF
15721 #define HAVE_GNU_PTH 1
15722 EOF
15723
15724                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15725                         ol_link_threads=pth
15726                         ol_with_threads=found
15727
15728                         if test $ol_with_yielding_select = auto ; then
15729                                 ol_with_yielding_select=yes
15730                         fi
15731                 fi
15732         fi
15733 fi
15734
15735 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15736         -o $ol_with_threads = lwp ; then
15737
15738                 for ac_hdr in thread.h synch.h
15739 do
15740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15742 echo "configure:15743: checking for $ac_hdr" >&5
15743 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15744   echo $ac_n "(cached) $ac_c" 1>&6
15745 else
15746   cat > conftest.$ac_ext <<EOF
15747 #line 15748 "configure"
15748 #include "confdefs.h"
15749 #include <$ac_hdr>
15750 EOF
15751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15752 { (eval echo configure:15753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15754 if test -z "$ac_err"; then
15755   rm -rf conftest*
15756   eval "ac_cv_header_$ac_safe=yes"
15757 else
15758   echo "$ac_err" >&5
15759   echo "configure: failed program was:" >&5
15760   cat conftest.$ac_ext >&5
15761   rm -rf conftest*
15762   eval "ac_cv_header_$ac_safe=no"
15763 fi
15764 rm -f conftest*
15765 fi
15766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15767   echo "$ac_t""yes" 1>&6
15768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15769   cat >> confdefs.h <<EOF
15770 #define $ac_tr_hdr 1
15771 EOF
15772  
15773 else
15774   echo "$ac_t""no" 1>&6
15775 fi
15776 done
15777
15778         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15779                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15780 echo "configure:15781: checking for thr_create in -lthread" >&5
15781 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15782 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15783   echo $ac_n "(cached) $ac_c" 1>&6
15784 else
15785   ac_save_LIBS="$LIBS"
15786 LIBS="-lthread  $LIBS"
15787 cat > conftest.$ac_ext <<EOF
15788 #line 15789 "configure"
15789 #include "confdefs.h"
15790 /* Override any gcc2 internal prototype to avoid an error.  */
15791 /* We use char because int might match the return type of a gcc2
15792     builtin and then its argument prototype would still apply.  */
15793 char thr_create();
15794
15795 int main() {
15796 thr_create()
15797 ; return 0; }
15798 EOF
15799 if { (eval echo configure:15800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15800   rm -rf conftest*
15801   eval "ac_cv_lib_$ac_lib_var=yes"
15802 else
15803   echo "configure: failed program was:" >&5
15804   cat conftest.$ac_ext >&5
15805   rm -rf conftest*
15806   eval "ac_cv_lib_$ac_lib_var=no"
15807 fi
15808 rm -f conftest*
15809 LIBS="$ac_save_LIBS"
15810
15811 fi
15812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15813   echo "$ac_t""yes" 1>&6
15814   have_thr=yes
15815 else
15816   echo "$ac_t""no" 1>&6
15817 have_thr=no
15818 fi
15819
15820
15821                 if test $have_thr = yes ; then
15822                         cat >> confdefs.h <<\EOF
15823 #define HAVE_THR 1
15824 EOF
15825
15826                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15827                         ol_link_threads=thr
15828
15829                         if test $ol_with_yielding_select = auto ; then
15830                                 ol_with_yielding_select=yes
15831                         fi
15832
15833                                                 for ac_func in \
15834                                 thr_setconcurrency \
15835                                 thr_getconcurrency \
15836                         
15837 do
15838 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15839 echo "configure:15840: checking for $ac_func" >&5
15840 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15841   echo $ac_n "(cached) $ac_c" 1>&6
15842 else
15843   cat > conftest.$ac_ext <<EOF
15844 #line 15845 "configure"
15845 #include "confdefs.h"
15846 /* System header to define __stub macros and hopefully few prototypes,
15847     which can conflict with char $ac_func(); below.  */
15848 #include <assert.h>
15849 /* Override any gcc2 internal prototype to avoid an error.  */
15850 /* We use char because int might match the return type of a gcc2
15851     builtin and then its argument prototype would still apply.  */
15852 char $ac_func();
15853 char (*f)();
15854
15855 int main() {
15856
15857 /* The GNU C library defines this for functions which it implements
15858     to always fail with ENOSYS.  Some functions are actually named
15859     something starting with __ and the normal name is an alias.  */
15860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15861 choke me
15862 #else
15863 f = $ac_func;
15864 #endif
15865
15866 ; return 0; }
15867 EOF
15868 if { (eval echo configure:15869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15869   rm -rf conftest*
15870   eval "ac_cv_func_$ac_func=yes"
15871 else
15872   echo "configure: failed program was:" >&5
15873   cat conftest.$ac_ext >&5
15874   rm -rf conftest*
15875   eval "ac_cv_func_$ac_func=no"
15876 fi
15877 rm -f conftest*
15878 fi
15879
15880 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15883   cat >> confdefs.h <<EOF
15884 #define $ac_tr_func 1
15885 EOF
15886  
15887 else
15888   echo "$ac_t""no" 1>&6
15889 fi
15890 done
15891
15892                 fi
15893         fi
15894
15895                 for ac_hdr in lwp/lwp.h
15896 do
15897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15899 echo "configure:15900: checking for $ac_hdr" >&5
15900 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15901   echo $ac_n "(cached) $ac_c" 1>&6
15902 else
15903   cat > conftest.$ac_ext <<EOF
15904 #line 15905 "configure"
15905 #include "confdefs.h"
15906 #include <$ac_hdr>
15907 EOF
15908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15909 { (eval echo configure:15910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15911 if test -z "$ac_err"; then
15912   rm -rf conftest*
15913   eval "ac_cv_header_$ac_safe=yes"
15914 else
15915   echo "$ac_err" >&5
15916   echo "configure: failed program was:" >&5
15917   cat conftest.$ac_ext >&5
15918   rm -rf conftest*
15919   eval "ac_cv_header_$ac_safe=no"
15920 fi
15921 rm -f conftest*
15922 fi
15923 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15924   echo "$ac_t""yes" 1>&6
15925     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15926   cat >> confdefs.h <<EOF
15927 #define $ac_tr_hdr 1
15928 EOF
15929  
15930 else
15931   echo "$ac_t""no" 1>&6
15932 fi
15933 done
15934
15935         if test $ac_cv_header_lwp_lwp_h = yes ; then
15936                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15937 echo "configure:15938: checking for lwp_create in -llwp" >&5
15938 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15940   echo $ac_n "(cached) $ac_c" 1>&6
15941 else
15942   ac_save_LIBS="$LIBS"
15943 LIBS="-llwp  $LIBS"
15944 cat > conftest.$ac_ext <<EOF
15945 #line 15946 "configure"
15946 #include "confdefs.h"
15947 /* Override any gcc2 internal prototype to avoid an error.  */
15948 /* We use char because int might match the return type of a gcc2
15949     builtin and then its argument prototype would still apply.  */
15950 char lwp_create();
15951
15952 int main() {
15953 lwp_create()
15954 ; return 0; }
15955 EOF
15956 if { (eval echo configure:15957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15957   rm -rf conftest*
15958   eval "ac_cv_lib_$ac_lib_var=yes"
15959 else
15960   echo "configure: failed program was:" >&5
15961   cat conftest.$ac_ext >&5
15962   rm -rf conftest*
15963   eval "ac_cv_lib_$ac_lib_var=no"
15964 fi
15965 rm -f conftest*
15966 LIBS="$ac_save_LIBS"
15967
15968 fi
15969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15970   echo "$ac_t""yes" 1>&6
15971   have_lwp=yes
15972 else
15973   echo "$ac_t""no" 1>&6
15974 have_lwp=no
15975 fi
15976
15977
15978                 if test $have_lwp = yes ; then
15979                         cat >> confdefs.h <<\EOF
15980 #define HAVE_LWP 1
15981 EOF
15982
15983                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15984                         ol_link_threads=lwp
15985
15986                         if test $ol_with_yielding_select = auto ; then
15987                                 ol_with_yielding_select=no
15988                         fi
15989                 fi
15990         fi
15991 fi
15992
15993 if test $ol_with_yielding_select = yes ; then
15994         cat >> confdefs.h <<\EOF
15995 #define HAVE_YIELDING_SELECT 1
15996 EOF
15997
15998 fi
15999
16000 if test $ol_with_threads = manual ; then
16001                 ol_link_threads=yes
16002
16003         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16004
16005         for ac_hdr in pthread.h sched.h
16006 do
16007 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16008 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16009 echo "configure:16010: checking for $ac_hdr" >&5
16010 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16011   echo $ac_n "(cached) $ac_c" 1>&6
16012 else
16013   cat > conftest.$ac_ext <<EOF
16014 #line 16015 "configure"
16015 #include "confdefs.h"
16016 #include <$ac_hdr>
16017 EOF
16018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16019 { (eval echo configure:16020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16021 if test -z "$ac_err"; then
16022   rm -rf conftest*
16023   eval "ac_cv_header_$ac_safe=yes"
16024 else
16025   echo "$ac_err" >&5
16026   echo "configure: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   rm -rf conftest*
16029   eval "ac_cv_header_$ac_safe=no"
16030 fi
16031 rm -f conftest*
16032 fi
16033 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16034   echo "$ac_t""yes" 1>&6
16035     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16036   cat >> confdefs.h <<EOF
16037 #define $ac_tr_hdr 1
16038 EOF
16039  
16040 else
16041   echo "$ac_t""no" 1>&6
16042 fi
16043 done
16044
16045         for ac_func in sched_yield pthread_yield
16046 do
16047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16048 echo "configure:16049: checking for $ac_func" >&5
16049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16050   echo $ac_n "(cached) $ac_c" 1>&6
16051 else
16052   cat > conftest.$ac_ext <<EOF
16053 #line 16054 "configure"
16054 #include "confdefs.h"
16055 /* System header to define __stub macros and hopefully few prototypes,
16056     which can conflict with char $ac_func(); below.  */
16057 #include <assert.h>
16058 /* Override any gcc2 internal prototype to avoid an error.  */
16059 /* We use char because int might match the return type of a gcc2
16060     builtin and then its argument prototype would still apply.  */
16061 char $ac_func();
16062 char (*f)();
16063
16064 int main() {
16065
16066 /* The GNU C library defines this for functions which it implements
16067     to always fail with ENOSYS.  Some functions are actually named
16068     something starting with __ and the normal name is an alias.  */
16069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16070 choke me
16071 #else
16072 f = $ac_func;
16073 #endif
16074
16075 ; return 0; }
16076 EOF
16077 if { (eval echo configure:16078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16078   rm -rf conftest*
16079   eval "ac_cv_func_$ac_func=yes"
16080 else
16081   echo "configure: failed program was:" >&5
16082   cat conftest.$ac_ext >&5
16083   rm -rf conftest*
16084   eval "ac_cv_func_$ac_func=no"
16085 fi
16086 rm -f conftest*
16087 fi
16088
16089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16090   echo "$ac_t""yes" 1>&6
16091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16092   cat >> confdefs.h <<EOF
16093 #define $ac_tr_func 1
16094 EOF
16095  
16096 else
16097   echo "$ac_t""no" 1>&6
16098 fi
16099 done
16100
16101         
16102         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16103 echo "configure:16104: checking for LinuxThreads pthread.h" >&5
16104 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16105   echo $ac_n "(cached) $ac_c" 1>&6
16106 else
16107   cat > conftest.$ac_ext <<EOF
16108 #line 16109 "configure"
16109 #include "confdefs.h"
16110 #include <pthread.h>
16111 EOF
16112 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16113   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16114   rm -rf conftest*
16115   ol_cv_header_linux_threads=yes
16116 else
16117   rm -rf conftest*
16118   ol_cv_header_linux_threads=no
16119 fi
16120 rm -f conftest*
16121
16122                 
16123 fi
16124
16125 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16126         if test $ol_cv_header_linux_threads = yes; then
16127                 cat >> confdefs.h <<\EOF
16128 #define HAVE_LINUX_THREADS 1
16129 EOF
16130
16131         fi
16132
16133
16134         for ac_hdr in mach/cthreads.h
16135 do
16136 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16137 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16138 echo "configure:16139: checking for $ac_hdr" >&5
16139 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16140   echo $ac_n "(cached) $ac_c" 1>&6
16141 else
16142   cat > conftest.$ac_ext <<EOF
16143 #line 16144 "configure"
16144 #include "confdefs.h"
16145 #include <$ac_hdr>
16146 EOF
16147 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16148 { (eval echo configure:16149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16149 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16150 if test -z "$ac_err"; then
16151   rm -rf conftest*
16152   eval "ac_cv_header_$ac_safe=yes"
16153 else
16154   echo "$ac_err" >&5
16155   echo "configure: failed program was:" >&5
16156   cat conftest.$ac_ext >&5
16157   rm -rf conftest*
16158   eval "ac_cv_header_$ac_safe=no"
16159 fi
16160 rm -f conftest*
16161 fi
16162 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16163   echo "$ac_t""yes" 1>&6
16164     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16165   cat >> confdefs.h <<EOF
16166 #define $ac_tr_hdr 1
16167 EOF
16168  
16169 else
16170   echo "$ac_t""no" 1>&6
16171 fi
16172 done
16173
16174         for ac_hdr in lwp/lwp.h
16175 do
16176 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16177 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16178 echo "configure:16179: checking for $ac_hdr" >&5
16179 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16180   echo $ac_n "(cached) $ac_c" 1>&6
16181 else
16182   cat > conftest.$ac_ext <<EOF
16183 #line 16184 "configure"
16184 #include "confdefs.h"
16185 #include <$ac_hdr>
16186 EOF
16187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16188 { (eval echo configure:16189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16190 if test -z "$ac_err"; then
16191   rm -rf conftest*
16192   eval "ac_cv_header_$ac_safe=yes"
16193 else
16194   echo "$ac_err" >&5
16195   echo "configure: failed program was:" >&5
16196   cat conftest.$ac_ext >&5
16197   rm -rf conftest*
16198   eval "ac_cv_header_$ac_safe=no"
16199 fi
16200 rm -f conftest*
16201 fi
16202 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16203   echo "$ac_t""yes" 1>&6
16204     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16205   cat >> confdefs.h <<EOF
16206 #define $ac_tr_hdr 1
16207 EOF
16208  
16209 else
16210   echo "$ac_t""no" 1>&6
16211 fi
16212 done
16213
16214         for ac_hdr in thread.h synch.h
16215 do
16216 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16217 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16218 echo "configure:16219: checking for $ac_hdr" >&5
16219 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16220   echo $ac_n "(cached) $ac_c" 1>&6
16221 else
16222   cat > conftest.$ac_ext <<EOF
16223 #line 16224 "configure"
16224 #include "confdefs.h"
16225 #include <$ac_hdr>
16226 EOF
16227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16228 { (eval echo configure:16229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16230 if test -z "$ac_err"; then
16231   rm -rf conftest*
16232   eval "ac_cv_header_$ac_safe=yes"
16233 else
16234   echo "$ac_err" >&5
16235   echo "configure: failed program was:" >&5
16236   cat conftest.$ac_ext >&5
16237   rm -rf conftest*
16238   eval "ac_cv_header_$ac_safe=no"
16239 fi
16240 rm -f conftest*
16241 fi
16242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16243   echo "$ac_t""yes" 1>&6
16244     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16245   cat >> confdefs.h <<EOF
16246 #define $ac_tr_hdr 1
16247 EOF
16248  
16249 else
16250   echo "$ac_t""no" 1>&6
16251 fi
16252 done
16253
16254 fi
16255
16256 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16257                         cat >> confdefs.h <<\EOF
16258 #define REENTRANT 1
16259 EOF
16260
16261         cat >> confdefs.h <<\EOF
16262 #define _REENTRANT 1
16263 EOF
16264
16265         cat >> confdefs.h <<\EOF
16266 #define THREAD_SAFE 1
16267 EOF
16268
16269         cat >> confdefs.h <<\EOF
16270 #define _THREAD_SAFE 1
16271 EOF
16272
16273         cat >> confdefs.h <<\EOF
16274 #define THREADSAFE 1
16275 EOF
16276
16277         cat >> confdefs.h <<\EOF
16278 #define _THREADSAFE 1
16279 EOF
16280
16281         cat >> confdefs.h <<\EOF
16282 #define _SGI_MP_SOURCE 1
16283 EOF
16284
16285
16286                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16287 echo "configure:16288: checking for thread specific errno" >&5
16288 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16289   echo $ac_n "(cached) $ac_c" 1>&6
16290 else
16291   
16292                 cat > conftest.$ac_ext <<EOF
16293 #line 16294 "configure"
16294 #include "confdefs.h"
16295 #include <errno.h>
16296 int main() {
16297 errno = 0;
16298 ; return 0; }
16299 EOF
16300 if { (eval echo configure:16301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16301   rm -rf conftest*
16302   ol_cv_errno_thread_specific=yes
16303 else
16304   echo "configure: failed program was:" >&5
16305   cat conftest.$ac_ext >&5
16306   rm -rf conftest*
16307   ol_cv_errno_thread_specific=no
16308 fi
16309 rm -f conftest*
16310         
16311 fi
16312
16313 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16314
16315                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16316 echo "configure:16317: checking for thread specific h_errno" >&5
16317 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16318   echo $ac_n "(cached) $ac_c" 1>&6
16319 else
16320   
16321                 cat > conftest.$ac_ext <<EOF
16322 #line 16323 "configure"
16323 #include "confdefs.h"
16324 #include <netdb.h>
16325 int main() {
16326 h_errno = 0;
16327 ; return 0; }
16328 EOF
16329 if { (eval echo configure:16330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16330   rm -rf conftest*
16331   ol_cv_h_errno_thread_specific=yes
16332 else
16333   echo "configure: failed program was:" >&5
16334   cat conftest.$ac_ext >&5
16335   rm -rf conftest*
16336   ol_cv_h_errno_thread_specific=no
16337 fi
16338 rm -f conftest*
16339         
16340 fi
16341
16342 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16343
16344         if test $ol_cv_errno_thread_specific != yes \
16345                 -o $ol_cv_h_errno_thread_specific != yes ; then
16346                 LIBS="$LTHREAD_LIBS $LIBS"
16347                 LTHREAD_LIBS=""
16348         fi
16349
16350 fi  
16351
16352 if test $ol_link_threads = no ; then
16353         if test $ol_with_threads = yes ; then
16354                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16355         fi
16356
16357         if test $ol_with_threads = auto ; then
16358                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16359                 ol_with_threads=no
16360         fi
16361
16362         cat >> confdefs.h <<\EOF
16363 #define NO_THREADS 1
16364 EOF
16365
16366         LTHREAD_LIBS=""
16367 fi
16368
16369 if test $ol_link_threads != no ; then
16370         cat >> confdefs.h <<\EOF
16371 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16372 EOF
16373
16374 fi
16375
16376 for ac_func in \
16377         ctime_r                 \
16378         gethostbyname_r gethostbyaddr_r \
16379
16380 do
16381 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16382 echo "configure:16383: checking for $ac_func" >&5
16383 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16384   echo $ac_n "(cached) $ac_c" 1>&6
16385 else
16386   cat > conftest.$ac_ext <<EOF
16387 #line 16388 "configure"
16388 #include "confdefs.h"
16389 /* System header to define __stub macros and hopefully few prototypes,
16390     which can conflict with char $ac_func(); below.  */
16391 #include <assert.h>
16392 /* Override any gcc2 internal prototype to avoid an error.  */
16393 /* We use char because int might match the return type of a gcc2
16394     builtin and then its argument prototype would still apply.  */
16395 char $ac_func();
16396 char (*f)();
16397
16398 int main() {
16399
16400 /* The GNU C library defines this for functions which it implements
16401     to always fail with ENOSYS.  Some functions are actually named
16402     something starting with __ and the normal name is an alias.  */
16403 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16404 choke me
16405 #else
16406 f = $ac_func;
16407 #endif
16408
16409 ; return 0; }
16410 EOF
16411 if { (eval echo configure:16412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16412   rm -rf conftest*
16413   eval "ac_cv_func_$ac_func=yes"
16414 else
16415   echo "configure: failed program was:" >&5
16416   cat conftest.$ac_ext >&5
16417   rm -rf conftest*
16418   eval "ac_cv_func_$ac_func=no"
16419 fi
16420 rm -f conftest*
16421 fi
16422
16423 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16424   echo "$ac_t""yes" 1>&6
16425     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16426   cat >> confdefs.h <<EOF
16427 #define $ac_tr_func 1
16428 EOF
16429  
16430 else
16431   echo "$ac_t""no" 1>&6
16432 fi
16433 done
16434
16435
16436 if test "$ac_cv_func_ctime_r" = no ; then
16437         ol_cv_func_ctime_r_nargs=0
16438 else
16439         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16440 echo "configure:16441: checking number of arguments of ctime_r" >&5
16441 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16442   echo $ac_n "(cached) $ac_c" 1>&6
16443 else
16444   cat > conftest.$ac_ext <<EOF
16445 #line 16446 "configure"
16446 #include "confdefs.h"
16447 #include <time.h>
16448 int main() {
16449 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16450 ; return 0; }
16451 EOF
16452 if { (eval echo configure:16453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16453   rm -rf conftest*
16454   ol_cv_func_ctime_r_nargs3=yes
16455 else
16456   echo "configure: failed program was:" >&5
16457   cat conftest.$ac_ext >&5
16458   rm -rf conftest*
16459   ol_cv_func_ctime_r_nargs3=no
16460 fi
16461 rm -f conftest*
16462
16463         cat > conftest.$ac_ext <<EOF
16464 #line 16465 "configure"
16465 #include "confdefs.h"
16466 #include <time.h>
16467 int main() {
16468 time_t ti; char *buffer; ctime_r(&ti,buffer);
16469 ; return 0; }
16470 EOF
16471 if { (eval echo configure:16472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16472   rm -rf conftest*
16473   ol_cv_func_ctime_r_nargs2=yes
16474 else
16475   echo "configure: failed program was:" >&5
16476   cat conftest.$ac_ext >&5
16477   rm -rf conftest*
16478   ol_cv_func_ctime_r_nargs2=no
16479 fi
16480 rm -f conftest*
16481
16482         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16483                 $ol_cv_func_ctime_r_nargs2 = no ; then
16484
16485                 ol_cv_func_ctime_r_nargs=3
16486
16487         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16488                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16489
16490                 ol_cv_func_ctime_r_nargs=2
16491
16492         else
16493                 ol_cv_func_ctime_r_nargs=0
16494         fi
16495   
16496 fi
16497
16498 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16499
16500   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16501         cat >> confdefs.h <<EOF
16502 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16503 EOF
16504
16505   fi
16506
16507 fi
16508
16509 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16510         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16511 echo "configure:16512: checking number of arguments of gethostbyname_r" >&5
16512 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16513   echo $ac_n "(cached) $ac_c" 1>&6
16514 else
16515   cat > conftest.$ac_ext <<EOF
16516 #line 16517 "configure"
16517 #include "confdefs.h"
16518 #include <sys/types.h>
16519 #include <sys/socket.h>
16520 #include <netinet/in.h>
16521 #include <netdb.h>
16522 #define BUFSIZE (sizeof(struct hostent)+10)
16523 int main() {
16524 struct hostent hent; char buffer[BUFSIZE];
16525                 int bufsize=BUFSIZE;int h_errno;
16526                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16527                         buffer, bufsize, &h_errno);
16528 ; return 0; }
16529 EOF
16530 if { (eval echo configure:16531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16531   rm -rf conftest*
16532   ol_cv_func_gethostbyname_r_nargs5=yes
16533 else
16534   echo "configure: failed program was:" >&5
16535   cat conftest.$ac_ext >&5
16536   rm -rf conftest*
16537   ol_cv_func_gethostbyname_r_nargs5=no
16538 fi
16539 rm -f conftest*
16540
16541         cat > conftest.$ac_ext <<EOF
16542 #line 16543 "configure"
16543 #include "confdefs.h"
16544 #include <sys/types.h>
16545 #include <sys/socket.h>
16546 #include <netinet/in.h>
16547 #include <netdb.h>
16548 #define BUFSIZE (sizeof(struct hostent)+10)
16549 int main() {
16550 struct hostent hent;struct hostent *rhent;
16551                 char buffer[BUFSIZE];
16552                 int bufsize=BUFSIZE;int h_errno;
16553                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16554                         &rhent, &h_errno);
16555 ; return 0; }
16556 EOF
16557 if { (eval echo configure:16558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16558   rm -rf conftest*
16559   ol_cv_func_gethostbyname_r_nargs6=yes
16560 else
16561   echo "configure: failed program was:" >&5
16562   cat conftest.$ac_ext >&5
16563   rm -rf conftest*
16564   ol_cv_func_gethostbyname_r_nargs6=no
16565 fi
16566 rm -f conftest*
16567
16568         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16569                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16570
16571                 ol_cv_func_gethostbyname_r_nargs=5
16572
16573         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16574                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16575
16576                 ol_cv_func_gethostbyname_r_nargs=6
16577
16578         else
16579                 ol_cv_func_gethostbyname_r_nargs=0
16580         fi
16581   
16582 fi
16583
16584 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16585   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16586         cat >> confdefs.h <<EOF
16587 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16588 EOF
16589
16590   fi
16591
16592 else
16593         ol_cv_func_gethostbyname_r_nargs=0
16594 fi
16595  
16596 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16597         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16598 echo "configure:16599: checking number of arguments of gethostbyaddr_r" >&5
16599 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16600   echo $ac_n "(cached) $ac_c" 1>&6
16601 else
16602   cat > conftest.$ac_ext <<EOF
16603 #line 16604 "configure"
16604 #include "confdefs.h"
16605 #include <sys/types.h>
16606 #include <sys/socket.h>
16607 #include <netinet/in.h>
16608 #include <netdb.h>
16609 #define BUFSIZE (sizeof(struct hostent)+10)
16610 int main() {
16611 struct hostent hent; char buffer[BUFSIZE]; 
16612             struct in_addr add;
16613             size_t alen=sizeof(struct in_addr);
16614             int bufsize=BUFSIZE;int h_errno;
16615                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16616                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16617 ; return 0; }
16618 EOF
16619 if { (eval echo configure:16620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16620   rm -rf conftest*
16621   ol_cv_func_gethostbyaddr_r_nargs7=yes
16622 else
16623   echo "configure: failed program was:" >&5
16624   cat conftest.$ac_ext >&5
16625   rm -rf conftest*
16626   ol_cv_func_gethostbyaddr_r_nargs7=no
16627 fi
16628 rm -f conftest*
16629
16630         cat > conftest.$ac_ext <<EOF
16631 #line 16632 "configure"
16632 #include "confdefs.h"
16633 #include <sys/types.h>
16634 #include <sys/socket.h>
16635 #include <netinet/in.h>
16636 #include <netdb.h>
16637 #define BUFSIZE (sizeof(struct hostent)+10)
16638 int main() {
16639 struct hostent hent;
16640                 struct hostent *rhent; char buffer[BUFSIZE]; 
16641                 struct in_addr add;
16642                 size_t alen=sizeof(struct in_addr);
16643                 int bufsize=BUFSIZE;int h_errno;
16644                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16645                         alen, AF_INET, &hent, buffer, bufsize, 
16646                         &rhent, &h_errno);
16647 ; return 0; }
16648 EOF
16649 if { (eval echo configure:16650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16650   rm -rf conftest*
16651   ol_cv_func_gethostbyaddr_r_nargs8=yes
16652 else
16653   echo "configure: failed program was:" >&5
16654   cat conftest.$ac_ext >&5
16655   rm -rf conftest*
16656   ol_cv_func_gethostbyaddr_r_nargs8=no
16657 fi
16658 rm -f conftest*
16659
16660         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16661                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16662
16663                 ol_cv_func_gethostbyaddr_r_nargs=7
16664
16665         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16666                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16667
16668                 ol_cv_func_gethostbyaddr_r_nargs=8
16669
16670         else
16671                 ol_cv_func_gethostbyaddr_r_nargs=0
16672         fi
16673   
16674 fi
16675
16676 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16677   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16678     cat >> confdefs.h <<EOF
16679 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16680 EOF
16681
16682   fi
16683
16684 else
16685         ol_cv_func_gethostbyaddr_r_nargs=0
16686 fi
16687
16688 ol_link_ldbm=no 
16689
16690 if test $ol_with_ldbm_api = auto \
16691         -o $ol_with_ldbm_api = berkeley \
16692         -o $ol_with_ldbm_api = bcompat ; then
16693
16694         if test $ol_with_ldbm_api = bcompat; then \
16695                 for ac_hdr in db_185.h db.h
16696 do
16697 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16698 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16699 echo "configure:16700: checking for $ac_hdr" >&5
16700 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16701   echo $ac_n "(cached) $ac_c" 1>&6
16702 else
16703   cat > conftest.$ac_ext <<EOF
16704 #line 16705 "configure"
16705 #include "confdefs.h"
16706 #include <$ac_hdr>
16707 EOF
16708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16709 { (eval echo configure:16710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16711 if test -z "$ac_err"; then
16712   rm -rf conftest*
16713   eval "ac_cv_header_$ac_safe=yes"
16714 else
16715   echo "$ac_err" >&5
16716   echo "configure: failed program was:" >&5
16717   cat conftest.$ac_ext >&5
16718   rm -rf conftest*
16719   eval "ac_cv_header_$ac_safe=no"
16720 fi
16721 rm -f conftest*
16722 fi
16723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16724   echo "$ac_t""yes" 1>&6
16725     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16726   cat >> confdefs.h <<EOF
16727 #define $ac_tr_hdr 1
16728 EOF
16729  
16730 else
16731   echo "$ac_t""no" 1>&6
16732 fi
16733 done
16734
16735 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16736         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16737 echo "configure:16738: checking if Berkeley DB header compatibility" >&5
16738 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16739   echo $ac_n "(cached) $ac_c" 1>&6
16740 else
16741   
16742                 cat > conftest.$ac_ext <<EOF
16743 #line 16744 "configure"
16744 #include "confdefs.h"
16745
16746 #if HAVE_DB_185_H
16747 #       include <db_185.h>
16748 #else
16749 #       include <db.h>
16750 #endif
16751
16752  /* this check could be improved */
16753 #ifndef DB_VERSION_MAJOR
16754 #       define DB_VERSION_MAJOR 1
16755 #endif
16756
16757 #if DB_VERSION_MAJOR == 1 
16758         __db_version_1
16759 #endif
16760
16761 EOF
16762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16763   egrep "__db_version_1" >/dev/null 2>&1; then
16764   rm -rf conftest*
16765   ol_cv_header_db1=yes
16766 else
16767   rm -rf conftest*
16768   ol_cv_header_db1=no
16769 fi
16770 rm -f conftest*
16771
16772 fi
16773
16774 echo "$ac_t""$ol_cv_header_db1" 1>&6
16775
16776         if test $ol_cv_header_db1 = yes ; then
16777                 ol_cv_lib_db=no
16778 if test $ol_cv_lib_db = no ; then
16779         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16780 echo "configure:16781: checking for Berkeley DB link (default)" >&5
16781 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16782   echo $ac_n "(cached) $ac_c" 1>&6
16783 else
16784   
16785         ol_DB_LIB=
16786         ol_LIBS=$LIBS
16787         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16788
16789         cat > conftest.$ac_ext <<EOF
16790 #line 16791 "configure"
16791 #include "confdefs.h"
16792
16793 #ifdef HAVE_DB_185_H
16794 # include <db_185.h>
16795 #else
16796 # include <db.h>
16797 #endif
16798
16799 #ifndef DB_VERSION_MAJOR
16800 # define DB_VERSION_MAJOR 1
16801 #endif
16802
16803 #ifndef NULL
16804 #define NULL ((void*)0)
16805 #endif
16806
16807 int main() {
16808
16809 #if DB_VERSION_MAJOR > 1
16810         {
16811                 char *version;
16812                 int major, minor, patch;
16813
16814                 version = db_version( &major, &minor, &patch );
16815
16816                 if( major != DB_VERSION_MAJOR ||
16817                         minor < DB_VERSION_MINOR )
16818                 {
16819                         printf("Berkeley DB version mismatch\n"
16820                                 "\texpected: %s\n\tgot: %s\n",
16821                                 DB_VERSION_STRING, version);
16822                         return 1;
16823                 }
16824         }
16825 #endif
16826
16827 #if DB_VERSION_MAJOR > 2
16828         db_env_create( NULL, 0 );
16829 #elif DB_VERSION_MAJOR > 1
16830         db_appexit( NULL );
16831 #else
16832         (void) dbopen( NULL, 0, 0, 0, NULL);
16833 #endif
16834
16835 ; return 0; }
16836 EOF
16837 if { (eval echo configure:16838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16838   rm -rf conftest*
16839   ol_cv_db_none=yes
16840 else
16841   echo "configure: failed program was:" >&5
16842   cat conftest.$ac_ext >&5
16843   rm -rf conftest*
16844   ol_cv_db_none=no
16845 fi
16846 rm -f conftest*
16847
16848         LIBS="$ol_LIBS"
16849
16850 fi
16851
16852 echo "$ac_t""$ol_cv_db_none" 1>&6
16853
16854         if test $ol_cv_db_none = yes ; then
16855                 ol_cv_lib_db=yes
16856         fi
16857 fi
16858
16859 if test $ol_cv_lib_db = no ; then
16860         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16861 echo "configure:16862: checking for Berkeley DB link (-ldb42)" >&5
16862 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16863   echo $ac_n "(cached) $ac_c" 1>&6
16864 else
16865   
16866         ol_DB_LIB=-ldb42
16867         ol_LIBS=$LIBS
16868         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16869
16870         cat > conftest.$ac_ext <<EOF
16871 #line 16872 "configure"
16872 #include "confdefs.h"
16873
16874 #ifdef HAVE_DB_185_H
16875 # include <db_185.h>
16876 #else
16877 # include <db.h>
16878 #endif
16879
16880 #ifndef DB_VERSION_MAJOR
16881 # define DB_VERSION_MAJOR 1
16882 #endif
16883
16884 #ifndef NULL
16885 #define NULL ((void*)0)
16886 #endif
16887
16888 int main() {
16889
16890 #if DB_VERSION_MAJOR > 1
16891         {
16892                 char *version;
16893                 int major, minor, patch;
16894
16895                 version = db_version( &major, &minor, &patch );
16896
16897                 if( major != DB_VERSION_MAJOR ||
16898                         minor < DB_VERSION_MINOR )
16899                 {
16900                         printf("Berkeley DB version mismatch\n"
16901                                 "\texpected: %s\n\tgot: %s\n",
16902                                 DB_VERSION_STRING, version);
16903                         return 1;
16904                 }
16905         }
16906 #endif
16907
16908 #if DB_VERSION_MAJOR > 2
16909         db_env_create( NULL, 0 );
16910 #elif DB_VERSION_MAJOR > 1
16911         db_appexit( NULL );
16912 #else
16913         (void) dbopen( NULL, 0, 0, 0, NULL);
16914 #endif
16915
16916 ; return 0; }
16917 EOF
16918 if { (eval echo configure:16919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16919   rm -rf conftest*
16920   ol_cv_db_db42=yes
16921 else
16922   echo "configure: failed program was:" >&5
16923   cat conftest.$ac_ext >&5
16924   rm -rf conftest*
16925   ol_cv_db_db42=no
16926 fi
16927 rm -f conftest*
16928
16929         LIBS="$ol_LIBS"
16930
16931 fi
16932
16933 echo "$ac_t""$ol_cv_db_db42" 1>&6
16934
16935         if test $ol_cv_db_db42 = yes ; then
16936                 ol_cv_lib_db=-ldb42
16937         fi
16938 fi
16939
16940 if test $ol_cv_lib_db = no ; then
16941         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16942 echo "configure:16943: checking for Berkeley DB link (-ldb-42)" >&5
16943 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16944   echo $ac_n "(cached) $ac_c" 1>&6
16945 else
16946   
16947         ol_DB_LIB=-ldb-42
16948         ol_LIBS=$LIBS
16949         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16950
16951         cat > conftest.$ac_ext <<EOF
16952 #line 16953 "configure"
16953 #include "confdefs.h"
16954
16955 #ifdef HAVE_DB_185_H
16956 # include <db_185.h>
16957 #else
16958 # include <db.h>
16959 #endif
16960
16961 #ifndef DB_VERSION_MAJOR
16962 # define DB_VERSION_MAJOR 1
16963 #endif
16964
16965 #ifndef NULL
16966 #define NULL ((void*)0)
16967 #endif
16968
16969 int main() {
16970
16971 #if DB_VERSION_MAJOR > 1
16972         {
16973                 char *version;
16974                 int major, minor, patch;
16975
16976                 version = db_version( &major, &minor, &patch );
16977
16978                 if( major != DB_VERSION_MAJOR ||
16979                         minor < DB_VERSION_MINOR )
16980                 {
16981                         printf("Berkeley DB version mismatch\n"
16982                                 "\texpected: %s\n\tgot: %s\n",
16983                                 DB_VERSION_STRING, version);
16984                         return 1;
16985                 }
16986         }
16987 #endif
16988
16989 #if DB_VERSION_MAJOR > 2
16990         db_env_create( NULL, 0 );
16991 #elif DB_VERSION_MAJOR > 1
16992         db_appexit( NULL );
16993 #else
16994         (void) dbopen( NULL, 0, 0, 0, NULL);
16995 #endif
16996
16997 ; return 0; }
16998 EOF
16999 if { (eval echo configure:17000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17000   rm -rf conftest*
17001   ol_cv_db_db_42=yes
17002 else
17003   echo "configure: failed program was:" >&5
17004   cat conftest.$ac_ext >&5
17005   rm -rf conftest*
17006   ol_cv_db_db_42=no
17007 fi
17008 rm -f conftest*
17009
17010         LIBS="$ol_LIBS"
17011
17012 fi
17013
17014 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17015
17016         if test $ol_cv_db_db_42 = yes ; then
17017                 ol_cv_lib_db=-ldb-42
17018         fi
17019 fi
17020
17021 if test $ol_cv_lib_db = no ; then
17022         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17023 echo "configure:17024: checking for Berkeley DB link (-ldb-4.2)" >&5
17024 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17025   echo $ac_n "(cached) $ac_c" 1>&6
17026 else
17027   
17028         ol_DB_LIB=-ldb-4.2
17029         ol_LIBS=$LIBS
17030         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17031
17032         cat > conftest.$ac_ext <<EOF
17033 #line 17034 "configure"
17034 #include "confdefs.h"
17035
17036 #ifdef HAVE_DB_185_H
17037 # include <db_185.h>
17038 #else
17039 # include <db.h>
17040 #endif
17041
17042 #ifndef DB_VERSION_MAJOR
17043 # define DB_VERSION_MAJOR 1
17044 #endif
17045
17046 #ifndef NULL
17047 #define NULL ((void*)0)
17048 #endif
17049
17050 int main() {
17051
17052 #if DB_VERSION_MAJOR > 1
17053         {
17054                 char *version;
17055                 int major, minor, patch;
17056
17057                 version = db_version( &major, &minor, &patch );
17058
17059                 if( major != DB_VERSION_MAJOR ||
17060                         minor < DB_VERSION_MINOR )
17061                 {
17062                         printf("Berkeley DB version mismatch\n"
17063                                 "\texpected: %s\n\tgot: %s\n",
17064                                 DB_VERSION_STRING, version);
17065                         return 1;
17066                 }
17067         }
17068 #endif
17069
17070 #if DB_VERSION_MAJOR > 2
17071         db_env_create( NULL, 0 );
17072 #elif DB_VERSION_MAJOR > 1
17073         db_appexit( NULL );
17074 #else
17075         (void) dbopen( NULL, 0, 0, 0, NULL);
17076 #endif
17077
17078 ; return 0; }
17079 EOF
17080 if { (eval echo configure:17081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17081   rm -rf conftest*
17082   ol_cv_db_db_4_dot_2=yes
17083 else
17084   echo "configure: failed program was:" >&5
17085   cat conftest.$ac_ext >&5
17086   rm -rf conftest*
17087   ol_cv_db_db_4_dot_2=no
17088 fi
17089 rm -f conftest*
17090
17091         LIBS="$ol_LIBS"
17092
17093 fi
17094
17095 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17096
17097         if test $ol_cv_db_db_4_dot_2 = yes ; then
17098                 ol_cv_lib_db=-ldb-4.2
17099         fi
17100 fi
17101
17102 if test $ol_cv_lib_db = no ; then
17103         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17104 echo "configure:17105: checking for Berkeley DB link (-ldb-4-2)" >&5
17105 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17106   echo $ac_n "(cached) $ac_c" 1>&6
17107 else
17108   
17109         ol_DB_LIB=-ldb-4-2
17110         ol_LIBS=$LIBS
17111         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17112
17113         cat > conftest.$ac_ext <<EOF
17114 #line 17115 "configure"
17115 #include "confdefs.h"
17116
17117 #ifdef HAVE_DB_185_H
17118 # include <db_185.h>
17119 #else
17120 # include <db.h>
17121 #endif
17122
17123 #ifndef DB_VERSION_MAJOR
17124 # define DB_VERSION_MAJOR 1
17125 #endif
17126
17127 #ifndef NULL
17128 #define NULL ((void*)0)
17129 #endif
17130
17131 int main() {
17132
17133 #if DB_VERSION_MAJOR > 1
17134         {
17135                 char *version;
17136                 int major, minor, patch;
17137
17138                 version = db_version( &major, &minor, &patch );
17139
17140                 if( major != DB_VERSION_MAJOR ||
17141                         minor < DB_VERSION_MINOR )
17142                 {
17143                         printf("Berkeley DB version mismatch\n"
17144                                 "\texpected: %s\n\tgot: %s\n",
17145                                 DB_VERSION_STRING, version);
17146                         return 1;
17147                 }
17148         }
17149 #endif
17150
17151 #if DB_VERSION_MAJOR > 2
17152         db_env_create( NULL, 0 );
17153 #elif DB_VERSION_MAJOR > 1
17154         db_appexit( NULL );
17155 #else
17156         (void) dbopen( NULL, 0, 0, 0, NULL);
17157 #endif
17158
17159 ; return 0; }
17160 EOF
17161 if { (eval echo configure:17162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17162   rm -rf conftest*
17163   ol_cv_db_db_4_2=yes
17164 else
17165   echo "configure: failed program was:" >&5
17166   cat conftest.$ac_ext >&5
17167   rm -rf conftest*
17168   ol_cv_db_db_4_2=no
17169 fi
17170 rm -f conftest*
17171
17172         LIBS="$ol_LIBS"
17173
17174 fi
17175
17176 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17177
17178         if test $ol_cv_db_db_4_2 = yes ; then
17179                 ol_cv_lib_db=-ldb-4-2
17180         fi
17181 fi
17182
17183 if test $ol_cv_lib_db = no ; then
17184         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17185 echo "configure:17186: checking for Berkeley DB link (-ldb-4)" >&5
17186 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17187   echo $ac_n "(cached) $ac_c" 1>&6
17188 else
17189   
17190         ol_DB_LIB=-ldb-4
17191         ol_LIBS=$LIBS
17192         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17193
17194         cat > conftest.$ac_ext <<EOF
17195 #line 17196 "configure"
17196 #include "confdefs.h"
17197
17198 #ifdef HAVE_DB_185_H
17199 # include <db_185.h>
17200 #else
17201 # include <db.h>
17202 #endif
17203
17204 #ifndef DB_VERSION_MAJOR
17205 # define DB_VERSION_MAJOR 1
17206 #endif
17207
17208 #ifndef NULL
17209 #define NULL ((void*)0)
17210 #endif
17211
17212 int main() {
17213
17214 #if DB_VERSION_MAJOR > 1
17215         {
17216                 char *version;
17217                 int major, minor, patch;
17218
17219                 version = db_version( &major, &minor, &patch );
17220
17221                 if( major != DB_VERSION_MAJOR ||
17222                         minor < DB_VERSION_MINOR )
17223                 {
17224                         printf("Berkeley DB version mismatch\n"
17225                                 "\texpected: %s\n\tgot: %s\n",
17226                                 DB_VERSION_STRING, version);
17227                         return 1;
17228                 }
17229         }
17230 #endif
17231
17232 #if DB_VERSION_MAJOR > 2
17233         db_env_create( NULL, 0 );
17234 #elif DB_VERSION_MAJOR > 1
17235         db_appexit( NULL );
17236 #else
17237         (void) dbopen( NULL, 0, 0, 0, NULL);
17238 #endif
17239
17240 ; return 0; }
17241 EOF
17242 if { (eval echo configure:17243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17243   rm -rf conftest*
17244   ol_cv_db_db_4=yes
17245 else
17246   echo "configure: failed program was:" >&5
17247   cat conftest.$ac_ext >&5
17248   rm -rf conftest*
17249   ol_cv_db_db_4=no
17250 fi
17251 rm -f conftest*
17252
17253         LIBS="$ol_LIBS"
17254
17255 fi
17256
17257 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17258
17259         if test $ol_cv_db_db_4 = yes ; then
17260                 ol_cv_lib_db=-ldb-4
17261         fi
17262 fi
17263
17264 if test $ol_cv_lib_db = no ; then
17265         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17266 echo "configure:17267: checking for Berkeley DB link (-ldb4)" >&5
17267 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17268   echo $ac_n "(cached) $ac_c" 1>&6
17269 else
17270   
17271         ol_DB_LIB=-ldb4
17272         ol_LIBS=$LIBS
17273         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17274
17275         cat > conftest.$ac_ext <<EOF
17276 #line 17277 "configure"
17277 #include "confdefs.h"
17278
17279 #ifdef HAVE_DB_185_H
17280 # include <db_185.h>
17281 #else
17282 # include <db.h>
17283 #endif
17284
17285 #ifndef DB_VERSION_MAJOR
17286 # define DB_VERSION_MAJOR 1
17287 #endif
17288
17289 #ifndef NULL
17290 #define NULL ((void*)0)
17291 #endif
17292
17293 int main() {
17294
17295 #if DB_VERSION_MAJOR > 1
17296         {
17297                 char *version;
17298                 int major, minor, patch;
17299
17300                 version = db_version( &major, &minor, &patch );
17301
17302                 if( major != DB_VERSION_MAJOR ||
17303                         minor < DB_VERSION_MINOR )
17304                 {
17305                         printf("Berkeley DB version mismatch\n"
17306                                 "\texpected: %s\n\tgot: %s\n",
17307                                 DB_VERSION_STRING, version);
17308                         return 1;
17309                 }
17310         }
17311 #endif
17312
17313 #if DB_VERSION_MAJOR > 2
17314         db_env_create( NULL, 0 );
17315 #elif DB_VERSION_MAJOR > 1
17316         db_appexit( NULL );
17317 #else
17318         (void) dbopen( NULL, 0, 0, 0, NULL);
17319 #endif
17320
17321 ; return 0; }
17322 EOF
17323 if { (eval echo configure:17324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17324   rm -rf conftest*
17325   ol_cv_db_db4=yes
17326 else
17327   echo "configure: failed program was:" >&5
17328   cat conftest.$ac_ext >&5
17329   rm -rf conftest*
17330   ol_cv_db_db4=no
17331 fi
17332 rm -f conftest*
17333
17334         LIBS="$ol_LIBS"
17335
17336 fi
17337
17338 echo "$ac_t""$ol_cv_db_db4" 1>&6
17339
17340         if test $ol_cv_db_db4 = yes ; then
17341                 ol_cv_lib_db=-ldb4
17342         fi
17343 fi
17344
17345 if test $ol_cv_lib_db = no ; then
17346         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17347 echo "configure:17348: checking for Berkeley DB link (-ldb)" >&5
17348 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17349   echo $ac_n "(cached) $ac_c" 1>&6
17350 else
17351   
17352         ol_DB_LIB=-ldb
17353         ol_LIBS=$LIBS
17354         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17355
17356         cat > conftest.$ac_ext <<EOF
17357 #line 17358 "configure"
17358 #include "confdefs.h"
17359
17360 #ifdef HAVE_DB_185_H
17361 # include <db_185.h>
17362 #else
17363 # include <db.h>
17364 #endif
17365
17366 #ifndef DB_VERSION_MAJOR
17367 # define DB_VERSION_MAJOR 1
17368 #endif
17369
17370 #ifndef NULL
17371 #define NULL ((void*)0)
17372 #endif
17373
17374 int main() {
17375
17376 #if DB_VERSION_MAJOR > 1
17377         {
17378                 char *version;
17379                 int major, minor, patch;
17380
17381                 version = db_version( &major, &minor, &patch );
17382
17383                 if( major != DB_VERSION_MAJOR ||
17384                         minor < DB_VERSION_MINOR )
17385                 {
17386                         printf("Berkeley DB version mismatch\n"
17387                                 "\texpected: %s\n\tgot: %s\n",
17388                                 DB_VERSION_STRING, version);
17389                         return 1;
17390                 }
17391         }
17392 #endif
17393
17394 #if DB_VERSION_MAJOR > 2
17395         db_env_create( NULL, 0 );
17396 #elif DB_VERSION_MAJOR > 1
17397         db_appexit( NULL );
17398 #else
17399         (void) dbopen( NULL, 0, 0, 0, NULL);
17400 #endif
17401
17402 ; return 0; }
17403 EOF
17404 if { (eval echo configure:17405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17405   rm -rf conftest*
17406   ol_cv_db_db=yes
17407 else
17408   echo "configure: failed program was:" >&5
17409   cat conftest.$ac_ext >&5
17410   rm -rf conftest*
17411   ol_cv_db_db=no
17412 fi
17413 rm -f conftest*
17414
17415         LIBS="$ol_LIBS"
17416
17417 fi
17418
17419 echo "$ac_t""$ol_cv_db_db" 1>&6
17420
17421         if test $ol_cv_db_db = yes ; then
17422                 ol_cv_lib_db=-ldb
17423         fi
17424 fi
17425
17426 if test $ol_cv_lib_db = no ; then
17427         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17428 echo "configure:17429: checking for Berkeley DB link (-ldb41)" >&5
17429 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17430   echo $ac_n "(cached) $ac_c" 1>&6
17431 else
17432   
17433         ol_DB_LIB=-ldb41
17434         ol_LIBS=$LIBS
17435         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17436
17437         cat > conftest.$ac_ext <<EOF
17438 #line 17439 "configure"
17439 #include "confdefs.h"
17440
17441 #ifdef HAVE_DB_185_H
17442 # include <db_185.h>
17443 #else
17444 # include <db.h>
17445 #endif
17446
17447 #ifndef DB_VERSION_MAJOR
17448 # define DB_VERSION_MAJOR 1
17449 #endif
17450
17451 #ifndef NULL
17452 #define NULL ((void*)0)
17453 #endif
17454
17455 int main() {
17456
17457 #if DB_VERSION_MAJOR > 1
17458         {
17459                 char *version;
17460                 int major, minor, patch;
17461
17462                 version = db_version( &major, &minor, &patch );
17463
17464                 if( major != DB_VERSION_MAJOR ||
17465                         minor < DB_VERSION_MINOR )
17466                 {
17467                         printf("Berkeley DB version mismatch\n"
17468                                 "\texpected: %s\n\tgot: %s\n",
17469                                 DB_VERSION_STRING, version);
17470                         return 1;
17471                 }
17472         }
17473 #endif
17474
17475 #if DB_VERSION_MAJOR > 2
17476         db_env_create( NULL, 0 );
17477 #elif DB_VERSION_MAJOR > 1
17478         db_appexit( NULL );
17479 #else
17480         (void) dbopen( NULL, 0, 0, 0, NULL);
17481 #endif
17482
17483 ; return 0; }
17484 EOF
17485 if { (eval echo configure:17486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17486   rm -rf conftest*
17487   ol_cv_db_db41=yes
17488 else
17489   echo "configure: failed program was:" >&5
17490   cat conftest.$ac_ext >&5
17491   rm -rf conftest*
17492   ol_cv_db_db41=no
17493 fi
17494 rm -f conftest*
17495
17496         LIBS="$ol_LIBS"
17497
17498 fi
17499
17500 echo "$ac_t""$ol_cv_db_db41" 1>&6
17501
17502         if test $ol_cv_db_db41 = yes ; then
17503                 ol_cv_lib_db=-ldb41
17504         fi
17505 fi
17506
17507 if test $ol_cv_lib_db = no ; then
17508         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17509 echo "configure:17510: checking for Berkeley DB link (-ldb-41)" >&5
17510 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17511   echo $ac_n "(cached) $ac_c" 1>&6
17512 else
17513   
17514         ol_DB_LIB=-ldb-41
17515         ol_LIBS=$LIBS
17516         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17517
17518         cat > conftest.$ac_ext <<EOF
17519 #line 17520 "configure"
17520 #include "confdefs.h"
17521
17522 #ifdef HAVE_DB_185_H
17523 # include <db_185.h>
17524 #else
17525 # include <db.h>
17526 #endif
17527
17528 #ifndef DB_VERSION_MAJOR
17529 # define DB_VERSION_MAJOR 1
17530 #endif
17531
17532 #ifndef NULL
17533 #define NULL ((void*)0)
17534 #endif
17535
17536 int main() {
17537
17538 #if DB_VERSION_MAJOR > 1
17539         {
17540                 char *version;
17541                 int major, minor, patch;
17542
17543                 version = db_version( &major, &minor, &patch );
17544
17545                 if( major != DB_VERSION_MAJOR ||
17546                         minor < DB_VERSION_MINOR )
17547                 {
17548                         printf("Berkeley DB version mismatch\n"
17549                                 "\texpected: %s\n\tgot: %s\n",
17550                                 DB_VERSION_STRING, version);
17551                         return 1;
17552                 }
17553         }
17554 #endif
17555
17556 #if DB_VERSION_MAJOR > 2
17557         db_env_create( NULL, 0 );
17558 #elif DB_VERSION_MAJOR > 1
17559         db_appexit( NULL );
17560 #else
17561         (void) dbopen( NULL, 0, 0, 0, NULL);
17562 #endif
17563
17564 ; return 0; }
17565 EOF
17566 if { (eval echo configure:17567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17567   rm -rf conftest*
17568   ol_cv_db_db_41=yes
17569 else
17570   echo "configure: failed program was:" >&5
17571   cat conftest.$ac_ext >&5
17572   rm -rf conftest*
17573   ol_cv_db_db_41=no
17574 fi
17575 rm -f conftest*
17576
17577         LIBS="$ol_LIBS"
17578
17579 fi
17580
17581 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17582
17583         if test $ol_cv_db_db_41 = yes ; then
17584                 ol_cv_lib_db=-ldb-41
17585         fi
17586 fi
17587
17588 if test $ol_cv_lib_db = no ; then
17589         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17590 echo "configure:17591: checking for Berkeley DB link (-ldb-4.1)" >&5
17591 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17592   echo $ac_n "(cached) $ac_c" 1>&6
17593 else
17594   
17595         ol_DB_LIB=-ldb-4.1
17596         ol_LIBS=$LIBS
17597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17598
17599         cat > conftest.$ac_ext <<EOF
17600 #line 17601 "configure"
17601 #include "confdefs.h"
17602
17603 #ifdef HAVE_DB_185_H
17604 # include <db_185.h>
17605 #else
17606 # include <db.h>
17607 #endif
17608
17609 #ifndef DB_VERSION_MAJOR
17610 # define DB_VERSION_MAJOR 1
17611 #endif
17612
17613 #ifndef NULL
17614 #define NULL ((void*)0)
17615 #endif
17616
17617 int main() {
17618
17619 #if DB_VERSION_MAJOR > 1
17620         {
17621                 char *version;
17622                 int major, minor, patch;
17623
17624                 version = db_version( &major, &minor, &patch );
17625
17626                 if( major != DB_VERSION_MAJOR ||
17627                         minor < DB_VERSION_MINOR )
17628                 {
17629                         printf("Berkeley DB version mismatch\n"
17630                                 "\texpected: %s\n\tgot: %s\n",
17631                                 DB_VERSION_STRING, version);
17632                         return 1;
17633                 }
17634         }
17635 #endif
17636
17637 #if DB_VERSION_MAJOR > 2
17638         db_env_create( NULL, 0 );
17639 #elif DB_VERSION_MAJOR > 1
17640         db_appexit( NULL );
17641 #else
17642         (void) dbopen( NULL, 0, 0, 0, NULL);
17643 #endif
17644
17645 ; return 0; }
17646 EOF
17647 if { (eval echo configure:17648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17648   rm -rf conftest*
17649   ol_cv_db_db_4_dot_1=yes
17650 else
17651   echo "configure: failed program was:" >&5
17652   cat conftest.$ac_ext >&5
17653   rm -rf conftest*
17654   ol_cv_db_db_4_dot_1=no
17655 fi
17656 rm -f conftest*
17657
17658         LIBS="$ol_LIBS"
17659
17660 fi
17661
17662 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17663
17664         if test $ol_cv_db_db_4_dot_1 = yes ; then
17665                 ol_cv_lib_db=-ldb-4.1
17666         fi
17667 fi
17668
17669 if test $ol_cv_lib_db = no ; then
17670         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17671 echo "configure:17672: checking for Berkeley DB link (-ldb-4-1)" >&5
17672 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17673   echo $ac_n "(cached) $ac_c" 1>&6
17674 else
17675   
17676         ol_DB_LIB=-ldb-4-1
17677         ol_LIBS=$LIBS
17678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17679
17680         cat > conftest.$ac_ext <<EOF
17681 #line 17682 "configure"
17682 #include "confdefs.h"
17683
17684 #ifdef HAVE_DB_185_H
17685 # include <db_185.h>
17686 #else
17687 # include <db.h>
17688 #endif
17689
17690 #ifndef DB_VERSION_MAJOR
17691 # define DB_VERSION_MAJOR 1
17692 #endif
17693
17694 #ifndef NULL
17695 #define NULL ((void*)0)
17696 #endif
17697
17698 int main() {
17699
17700 #if DB_VERSION_MAJOR > 1
17701         {
17702                 char *version;
17703                 int major, minor, patch;
17704
17705                 version = db_version( &major, &minor, &patch );
17706
17707                 if( major != DB_VERSION_MAJOR ||
17708                         minor < DB_VERSION_MINOR )
17709                 {
17710                         printf("Berkeley DB version mismatch\n"
17711                                 "\texpected: %s\n\tgot: %s\n",
17712                                 DB_VERSION_STRING, version);
17713                         return 1;
17714                 }
17715         }
17716 #endif
17717
17718 #if DB_VERSION_MAJOR > 2
17719         db_env_create( NULL, 0 );
17720 #elif DB_VERSION_MAJOR > 1
17721         db_appexit( NULL );
17722 #else
17723         (void) dbopen( NULL, 0, 0, 0, NULL);
17724 #endif
17725
17726 ; return 0; }
17727 EOF
17728 if { (eval echo configure:17729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17729   rm -rf conftest*
17730   ol_cv_db_db_4_1=yes
17731 else
17732   echo "configure: failed program was:" >&5
17733   cat conftest.$ac_ext >&5
17734   rm -rf conftest*
17735   ol_cv_db_db_4_1=no
17736 fi
17737 rm -f conftest*
17738
17739         LIBS="$ol_LIBS"
17740
17741 fi
17742
17743 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17744
17745         if test $ol_cv_db_db_4_1 = yes ; then
17746                 ol_cv_lib_db=-ldb-4-1
17747         fi
17748 fi
17749
17750 if test $ol_cv_lib_db = no ; then
17751         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17752 echo "configure:17753: checking for Berkeley DB link (-ldb3)" >&5
17753 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17754   echo $ac_n "(cached) $ac_c" 1>&6
17755 else
17756   
17757         ol_DB_LIB=-ldb3
17758         ol_LIBS=$LIBS
17759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17760
17761         cat > conftest.$ac_ext <<EOF
17762 #line 17763 "configure"
17763 #include "confdefs.h"
17764
17765 #ifdef HAVE_DB_185_H
17766 # include <db_185.h>
17767 #else
17768 # include <db.h>
17769 #endif
17770
17771 #ifndef DB_VERSION_MAJOR
17772 # define DB_VERSION_MAJOR 1
17773 #endif
17774
17775 #ifndef NULL
17776 #define NULL ((void*)0)
17777 #endif
17778
17779 int main() {
17780
17781 #if DB_VERSION_MAJOR > 1
17782         {
17783                 char *version;
17784                 int major, minor, patch;
17785
17786                 version = db_version( &major, &minor, &patch );
17787
17788                 if( major != DB_VERSION_MAJOR ||
17789                         minor < DB_VERSION_MINOR )
17790                 {
17791                         printf("Berkeley DB version mismatch\n"
17792                                 "\texpected: %s\n\tgot: %s\n",
17793                                 DB_VERSION_STRING, version);
17794                         return 1;
17795                 }
17796         }
17797 #endif
17798
17799 #if DB_VERSION_MAJOR > 2
17800         db_env_create( NULL, 0 );
17801 #elif DB_VERSION_MAJOR > 1
17802         db_appexit( NULL );
17803 #else
17804         (void) dbopen( NULL, 0, 0, 0, NULL);
17805 #endif
17806
17807 ; return 0; }
17808 EOF
17809 if { (eval echo configure:17810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17810   rm -rf conftest*
17811   ol_cv_db_db3=yes
17812 else
17813   echo "configure: failed program was:" >&5
17814   cat conftest.$ac_ext >&5
17815   rm -rf conftest*
17816   ol_cv_db_db3=no
17817 fi
17818 rm -f conftest*
17819
17820         LIBS="$ol_LIBS"
17821
17822 fi
17823
17824 echo "$ac_t""$ol_cv_db_db3" 1>&6
17825
17826         if test $ol_cv_db_db3 = yes ; then
17827                 ol_cv_lib_db=-ldb3
17828         fi
17829 fi
17830
17831 if test $ol_cv_lib_db = no ; then
17832         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17833 echo "configure:17834: checking for Berkeley DB link (-ldb-3)" >&5
17834 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17835   echo $ac_n "(cached) $ac_c" 1>&6
17836 else
17837   
17838         ol_DB_LIB=-ldb-3
17839         ol_LIBS=$LIBS
17840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17841
17842         cat > conftest.$ac_ext <<EOF
17843 #line 17844 "configure"
17844 #include "confdefs.h"
17845
17846 #ifdef HAVE_DB_185_H
17847 # include <db_185.h>
17848 #else
17849 # include <db.h>
17850 #endif
17851
17852 #ifndef DB_VERSION_MAJOR
17853 # define DB_VERSION_MAJOR 1
17854 #endif
17855
17856 #ifndef NULL
17857 #define NULL ((void*)0)
17858 #endif
17859
17860 int main() {
17861
17862 #if DB_VERSION_MAJOR > 1
17863         {
17864                 char *version;
17865                 int major, minor, patch;
17866
17867                 version = db_version( &major, &minor, &patch );
17868
17869                 if( major != DB_VERSION_MAJOR ||
17870                         minor < DB_VERSION_MINOR )
17871                 {
17872                         printf("Berkeley DB version mismatch\n"
17873                                 "\texpected: %s\n\tgot: %s\n",
17874                                 DB_VERSION_STRING, version);
17875                         return 1;
17876                 }
17877         }
17878 #endif
17879
17880 #if DB_VERSION_MAJOR > 2
17881         db_env_create( NULL, 0 );
17882 #elif DB_VERSION_MAJOR > 1
17883         db_appexit( NULL );
17884 #else
17885         (void) dbopen( NULL, 0, 0, 0, NULL);
17886 #endif
17887
17888 ; return 0; }
17889 EOF
17890 if { (eval echo configure:17891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17891   rm -rf conftest*
17892   ol_cv_db_db_3=yes
17893 else
17894   echo "configure: failed program was:" >&5
17895   cat conftest.$ac_ext >&5
17896   rm -rf conftest*
17897   ol_cv_db_db_3=no
17898 fi
17899 rm -f conftest*
17900
17901         LIBS="$ol_LIBS"
17902
17903 fi
17904
17905 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17906
17907         if test $ol_cv_db_db_3 = yes ; then
17908                 ol_cv_lib_db=-ldb-3
17909         fi
17910 fi
17911
17912 if test $ol_cv_lib_db = no ; then
17913         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17914 echo "configure:17915: checking for Berkeley DB link (-ldb2)" >&5
17915 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17916   echo $ac_n "(cached) $ac_c" 1>&6
17917 else
17918   
17919         ol_DB_LIB=-ldb2
17920         ol_LIBS=$LIBS
17921         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17922
17923         cat > conftest.$ac_ext <<EOF
17924 #line 17925 "configure"
17925 #include "confdefs.h"
17926
17927 #ifdef HAVE_DB_185_H
17928 # include <db_185.h>
17929 #else
17930 # include <db.h>
17931 #endif
17932
17933 #ifndef DB_VERSION_MAJOR
17934 # define DB_VERSION_MAJOR 1
17935 #endif
17936
17937 #ifndef NULL
17938 #define NULL ((void*)0)
17939 #endif
17940
17941 int main() {
17942
17943 #if DB_VERSION_MAJOR > 1
17944         {
17945                 char *version;
17946                 int major, minor, patch;
17947
17948                 version = db_version( &major, &minor, &patch );
17949
17950                 if( major != DB_VERSION_MAJOR ||
17951                         minor < DB_VERSION_MINOR )
17952                 {
17953                         printf("Berkeley DB version mismatch\n"
17954                                 "\texpected: %s\n\tgot: %s\n",
17955                                 DB_VERSION_STRING, version);
17956                         return 1;
17957                 }
17958         }
17959 #endif
17960
17961 #if DB_VERSION_MAJOR > 2
17962         db_env_create( NULL, 0 );
17963 #elif DB_VERSION_MAJOR > 1
17964         db_appexit( NULL );
17965 #else
17966         (void) dbopen( NULL, 0, 0, 0, NULL);
17967 #endif
17968
17969 ; return 0; }
17970 EOF
17971 if { (eval echo configure:17972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17972   rm -rf conftest*
17973   ol_cv_db_db2=yes
17974 else
17975   echo "configure: failed program was:" >&5
17976   cat conftest.$ac_ext >&5
17977   rm -rf conftest*
17978   ol_cv_db_db2=no
17979 fi
17980 rm -f conftest*
17981
17982         LIBS="$ol_LIBS"
17983
17984 fi
17985
17986 echo "$ac_t""$ol_cv_db_db2" 1>&6
17987
17988         if test $ol_cv_db_db2 = yes ; then
17989                 ol_cv_lib_db=-ldb2
17990         fi
17991 fi
17992
17993 if test $ol_cv_lib_db = no ; then
17994         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17995 echo "configure:17996: checking for Berkeley DB link (-ldb-2)" >&5
17996 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17997   echo $ac_n "(cached) $ac_c" 1>&6
17998 else
17999   
18000         ol_DB_LIB=-ldb-2
18001         ol_LIBS=$LIBS
18002         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18003
18004         cat > conftest.$ac_ext <<EOF
18005 #line 18006 "configure"
18006 #include "confdefs.h"
18007
18008 #ifdef HAVE_DB_185_H
18009 # include <db_185.h>
18010 #else
18011 # include <db.h>
18012 #endif
18013
18014 #ifndef DB_VERSION_MAJOR
18015 # define DB_VERSION_MAJOR 1
18016 #endif
18017
18018 #ifndef NULL
18019 #define NULL ((void*)0)
18020 #endif
18021
18022 int main() {
18023
18024 #if DB_VERSION_MAJOR > 1
18025         {
18026                 char *version;
18027                 int major, minor, patch;
18028
18029                 version = db_version( &major, &minor, &patch );
18030
18031                 if( major != DB_VERSION_MAJOR ||
18032                         minor < DB_VERSION_MINOR )
18033                 {
18034                         printf("Berkeley DB version mismatch\n"
18035                                 "\texpected: %s\n\tgot: %s\n",
18036                                 DB_VERSION_STRING, version);
18037                         return 1;
18038                 }
18039         }
18040 #endif
18041
18042 #if DB_VERSION_MAJOR > 2
18043         db_env_create( NULL, 0 );
18044 #elif DB_VERSION_MAJOR > 1
18045         db_appexit( NULL );
18046 #else
18047         (void) dbopen( NULL, 0, 0, 0, NULL);
18048 #endif
18049
18050 ; return 0; }
18051 EOF
18052 if { (eval echo configure:18053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18053   rm -rf conftest*
18054   ol_cv_db_db_2=yes
18055 else
18056   echo "configure: failed program was:" >&5
18057   cat conftest.$ac_ext >&5
18058   rm -rf conftest*
18059   ol_cv_db_db_2=no
18060 fi
18061 rm -f conftest*
18062
18063         LIBS="$ol_LIBS"
18064
18065 fi
18066
18067 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18068
18069         if test $ol_cv_db_db_2 = yes ; then
18070                 ol_cv_lib_db=-ldb-2
18071         fi
18072 fi
18073
18074 if test $ol_cv_lib_db = no ; then
18075         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18076 echo "configure:18077: checking for Berkeley DB link (-ldb1)" >&5
18077 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18078   echo $ac_n "(cached) $ac_c" 1>&6
18079 else
18080   
18081         ol_DB_LIB=-ldb1
18082         ol_LIBS=$LIBS
18083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18084
18085         cat > conftest.$ac_ext <<EOF
18086 #line 18087 "configure"
18087 #include "confdefs.h"
18088
18089 #ifdef HAVE_DB_185_H
18090 # include <db_185.h>
18091 #else
18092 # include <db.h>
18093 #endif
18094
18095 #ifndef DB_VERSION_MAJOR
18096 # define DB_VERSION_MAJOR 1
18097 #endif
18098
18099 #ifndef NULL
18100 #define NULL ((void*)0)
18101 #endif
18102
18103 int main() {
18104
18105 #if DB_VERSION_MAJOR > 1
18106         {
18107                 char *version;
18108                 int major, minor, patch;
18109
18110                 version = db_version( &major, &minor, &patch );
18111
18112                 if( major != DB_VERSION_MAJOR ||
18113                         minor < DB_VERSION_MINOR )
18114                 {
18115                         printf("Berkeley DB version mismatch\n"
18116                                 "\texpected: %s\n\tgot: %s\n",
18117                                 DB_VERSION_STRING, version);
18118                         return 1;
18119                 }
18120         }
18121 #endif
18122
18123 #if DB_VERSION_MAJOR > 2
18124         db_env_create( NULL, 0 );
18125 #elif DB_VERSION_MAJOR > 1
18126         db_appexit( NULL );
18127 #else
18128         (void) dbopen( NULL, 0, 0, 0, NULL);
18129 #endif
18130
18131 ; return 0; }
18132 EOF
18133 if { (eval echo configure:18134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18134   rm -rf conftest*
18135   ol_cv_db_db1=yes
18136 else
18137   echo "configure: failed program was:" >&5
18138   cat conftest.$ac_ext >&5
18139   rm -rf conftest*
18140   ol_cv_db_db1=no
18141 fi
18142 rm -f conftest*
18143
18144         LIBS="$ol_LIBS"
18145
18146 fi
18147
18148 echo "$ac_t""$ol_cv_db_db1" 1>&6
18149
18150         if test $ol_cv_db_db1 = yes ; then
18151                 ol_cv_lib_db=-ldb1
18152         fi
18153 fi
18154
18155 if test $ol_cv_lib_db = no ; then
18156         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18157 echo "configure:18158: checking for Berkeley DB link (-ldb-1)" >&5
18158 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18159   echo $ac_n "(cached) $ac_c" 1>&6
18160 else
18161   
18162         ol_DB_LIB=-ldb-1
18163         ol_LIBS=$LIBS
18164         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18165
18166         cat > conftest.$ac_ext <<EOF
18167 #line 18168 "configure"
18168 #include "confdefs.h"
18169
18170 #ifdef HAVE_DB_185_H
18171 # include <db_185.h>
18172 #else
18173 # include <db.h>
18174 #endif
18175
18176 #ifndef DB_VERSION_MAJOR
18177 # define DB_VERSION_MAJOR 1
18178 #endif
18179
18180 #ifndef NULL
18181 #define NULL ((void*)0)
18182 #endif
18183
18184 int main() {
18185
18186 #if DB_VERSION_MAJOR > 1
18187         {
18188                 char *version;
18189                 int major, minor, patch;
18190
18191                 version = db_version( &major, &minor, &patch );
18192
18193                 if( major != DB_VERSION_MAJOR ||
18194                         minor < DB_VERSION_MINOR )
18195                 {
18196                         printf("Berkeley DB version mismatch\n"
18197                                 "\texpected: %s\n\tgot: %s\n",
18198                                 DB_VERSION_STRING, version);
18199                         return 1;
18200                 }
18201         }
18202 #endif
18203
18204 #if DB_VERSION_MAJOR > 2
18205         db_env_create( NULL, 0 );
18206 #elif DB_VERSION_MAJOR > 1
18207         db_appexit( NULL );
18208 #else
18209         (void) dbopen( NULL, 0, 0, 0, NULL);
18210 #endif
18211
18212 ; return 0; }
18213 EOF
18214 if { (eval echo configure:18215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18215   rm -rf conftest*
18216   ol_cv_db_db_1=yes
18217 else
18218   echo "configure: failed program was:" >&5
18219   cat conftest.$ac_ext >&5
18220   rm -rf conftest*
18221   ol_cv_db_db_1=no
18222 fi
18223 rm -f conftest*
18224
18225         LIBS="$ol_LIBS"
18226
18227 fi
18228
18229 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18230
18231         if test $ol_cv_db_db_1 = yes ; then
18232                 ol_cv_lib_db=-ldb-1
18233         fi
18234 fi
18235
18236
18237                 if test "$ol_cv_lib_db" != no ; then
18238                         ol_cv_berkeley_db=yes
18239                 fi
18240         fi
18241 fi
18242
18243         else
18244                 ol_cv_berkeley_db=no
18245 for ac_hdr in db.h
18246 do
18247 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18248 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18249 echo "configure:18250: checking for $ac_hdr" >&5
18250 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18251   echo $ac_n "(cached) $ac_c" 1>&6
18252 else
18253   cat > conftest.$ac_ext <<EOF
18254 #line 18255 "configure"
18255 #include "confdefs.h"
18256 #include <$ac_hdr>
18257 EOF
18258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18259 { (eval echo configure:18260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18261 if test -z "$ac_err"; then
18262   rm -rf conftest*
18263   eval "ac_cv_header_$ac_safe=yes"
18264 else
18265   echo "$ac_err" >&5
18266   echo "configure: failed program was:" >&5
18267   cat conftest.$ac_ext >&5
18268   rm -rf conftest*
18269   eval "ac_cv_header_$ac_safe=no"
18270 fi
18271 rm -f conftest*
18272 fi
18273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18274   echo "$ac_t""yes" 1>&6
18275     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18276   cat >> confdefs.h <<EOF
18277 #define $ac_tr_hdr 1
18278 EOF
18279  
18280 else
18281   echo "$ac_t""no" 1>&6
18282 fi
18283 done
18284
18285 if test $ac_cv_header_db_h = yes; then
18286         ol_cv_lib_db=no
18287 if test $ol_cv_lib_db = no ; then
18288         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18289 echo "configure:18290: checking for Berkeley DB link (default)" >&5
18290 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18291   echo $ac_n "(cached) $ac_c" 1>&6
18292 else
18293   
18294         ol_DB_LIB=
18295         ol_LIBS=$LIBS
18296         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18297
18298         cat > conftest.$ac_ext <<EOF
18299 #line 18300 "configure"
18300 #include "confdefs.h"
18301
18302 #ifdef HAVE_DB_185_H
18303 # include <db_185.h>
18304 #else
18305 # include <db.h>
18306 #endif
18307
18308 #ifndef DB_VERSION_MAJOR
18309 # define DB_VERSION_MAJOR 1
18310 #endif
18311
18312 #ifndef NULL
18313 #define NULL ((void*)0)
18314 #endif
18315
18316 int main() {
18317
18318 #if DB_VERSION_MAJOR > 1
18319         {
18320                 char *version;
18321                 int major, minor, patch;
18322
18323                 version = db_version( &major, &minor, &patch );
18324
18325                 if( major != DB_VERSION_MAJOR ||
18326                         minor < DB_VERSION_MINOR )
18327                 {
18328                         printf("Berkeley DB version mismatch\n"
18329                                 "\texpected: %s\n\tgot: %s\n",
18330                                 DB_VERSION_STRING, version);
18331                         return 1;
18332                 }
18333         }
18334 #endif
18335
18336 #if DB_VERSION_MAJOR > 2
18337         db_env_create( NULL, 0 );
18338 #elif DB_VERSION_MAJOR > 1
18339         db_appexit( NULL );
18340 #else
18341         (void) dbopen( NULL, 0, 0, 0, NULL);
18342 #endif
18343
18344 ; return 0; }
18345 EOF
18346 if { (eval echo configure:18347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18347   rm -rf conftest*
18348   ol_cv_db_none=yes
18349 else
18350   echo "configure: failed program was:" >&5
18351   cat conftest.$ac_ext >&5
18352   rm -rf conftest*
18353   ol_cv_db_none=no
18354 fi
18355 rm -f conftest*
18356
18357         LIBS="$ol_LIBS"
18358
18359 fi
18360
18361 echo "$ac_t""$ol_cv_db_none" 1>&6
18362
18363         if test $ol_cv_db_none = yes ; then
18364                 ol_cv_lib_db=yes
18365         fi
18366 fi
18367
18368 if test $ol_cv_lib_db = no ; then
18369         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18370 echo "configure:18371: checking for Berkeley DB link (-ldb42)" >&5
18371 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18372   echo $ac_n "(cached) $ac_c" 1>&6
18373 else
18374   
18375         ol_DB_LIB=-ldb42
18376         ol_LIBS=$LIBS
18377         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18378
18379         cat > conftest.$ac_ext <<EOF
18380 #line 18381 "configure"
18381 #include "confdefs.h"
18382
18383 #ifdef HAVE_DB_185_H
18384 # include <db_185.h>
18385 #else
18386 # include <db.h>
18387 #endif
18388
18389 #ifndef DB_VERSION_MAJOR
18390 # define DB_VERSION_MAJOR 1
18391 #endif
18392
18393 #ifndef NULL
18394 #define NULL ((void*)0)
18395 #endif
18396
18397 int main() {
18398
18399 #if DB_VERSION_MAJOR > 1
18400         {
18401                 char *version;
18402                 int major, minor, patch;
18403
18404                 version = db_version( &major, &minor, &patch );
18405
18406                 if( major != DB_VERSION_MAJOR ||
18407                         minor < DB_VERSION_MINOR )
18408                 {
18409                         printf("Berkeley DB version mismatch\n"
18410                                 "\texpected: %s\n\tgot: %s\n",
18411                                 DB_VERSION_STRING, version);
18412                         return 1;
18413                 }
18414         }
18415 #endif
18416
18417 #if DB_VERSION_MAJOR > 2
18418         db_env_create( NULL, 0 );
18419 #elif DB_VERSION_MAJOR > 1
18420         db_appexit( NULL );
18421 #else
18422         (void) dbopen( NULL, 0, 0, 0, NULL);
18423 #endif
18424
18425 ; return 0; }
18426 EOF
18427 if { (eval echo configure:18428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18428   rm -rf conftest*
18429   ol_cv_db_db42=yes
18430 else
18431   echo "configure: failed program was:" >&5
18432   cat conftest.$ac_ext >&5
18433   rm -rf conftest*
18434   ol_cv_db_db42=no
18435 fi
18436 rm -f conftest*
18437
18438         LIBS="$ol_LIBS"
18439
18440 fi
18441
18442 echo "$ac_t""$ol_cv_db_db42" 1>&6
18443
18444         if test $ol_cv_db_db42 = yes ; then
18445                 ol_cv_lib_db=-ldb42
18446         fi
18447 fi
18448
18449 if test $ol_cv_lib_db = no ; then
18450         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18451 echo "configure:18452: checking for Berkeley DB link (-ldb-42)" >&5
18452 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18453   echo $ac_n "(cached) $ac_c" 1>&6
18454 else
18455   
18456         ol_DB_LIB=-ldb-42
18457         ol_LIBS=$LIBS
18458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18459
18460         cat > conftest.$ac_ext <<EOF
18461 #line 18462 "configure"
18462 #include "confdefs.h"
18463
18464 #ifdef HAVE_DB_185_H
18465 # include <db_185.h>
18466 #else
18467 # include <db.h>
18468 #endif
18469
18470 #ifndef DB_VERSION_MAJOR
18471 # define DB_VERSION_MAJOR 1
18472 #endif
18473
18474 #ifndef NULL
18475 #define NULL ((void*)0)
18476 #endif
18477
18478 int main() {
18479
18480 #if DB_VERSION_MAJOR > 1
18481         {
18482                 char *version;
18483                 int major, minor, patch;
18484
18485                 version = db_version( &major, &minor, &patch );
18486
18487                 if( major != DB_VERSION_MAJOR ||
18488                         minor < DB_VERSION_MINOR )
18489                 {
18490                         printf("Berkeley DB version mismatch\n"
18491                                 "\texpected: %s\n\tgot: %s\n",
18492                                 DB_VERSION_STRING, version);
18493                         return 1;
18494                 }
18495         }
18496 #endif
18497
18498 #if DB_VERSION_MAJOR > 2
18499         db_env_create( NULL, 0 );
18500 #elif DB_VERSION_MAJOR > 1
18501         db_appexit( NULL );
18502 #else
18503         (void) dbopen( NULL, 0, 0, 0, NULL);
18504 #endif
18505
18506 ; return 0; }
18507 EOF
18508 if { (eval echo configure:18509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18509   rm -rf conftest*
18510   ol_cv_db_db_42=yes
18511 else
18512   echo "configure: failed program was:" >&5
18513   cat conftest.$ac_ext >&5
18514   rm -rf conftest*
18515   ol_cv_db_db_42=no
18516 fi
18517 rm -f conftest*
18518
18519         LIBS="$ol_LIBS"
18520
18521 fi
18522
18523 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18524
18525         if test $ol_cv_db_db_42 = yes ; then
18526                 ol_cv_lib_db=-ldb-42
18527         fi
18528 fi
18529
18530 if test $ol_cv_lib_db = no ; then
18531         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18532 echo "configure:18533: checking for Berkeley DB link (-ldb-4.2)" >&5
18533 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18534   echo $ac_n "(cached) $ac_c" 1>&6
18535 else
18536   
18537         ol_DB_LIB=-ldb-4.2
18538         ol_LIBS=$LIBS
18539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18540
18541         cat > conftest.$ac_ext <<EOF
18542 #line 18543 "configure"
18543 #include "confdefs.h"
18544
18545 #ifdef HAVE_DB_185_H
18546 # include <db_185.h>
18547 #else
18548 # include <db.h>
18549 #endif
18550
18551 #ifndef DB_VERSION_MAJOR
18552 # define DB_VERSION_MAJOR 1
18553 #endif
18554
18555 #ifndef NULL
18556 #define NULL ((void*)0)
18557 #endif
18558
18559 int main() {
18560
18561 #if DB_VERSION_MAJOR > 1
18562         {
18563                 char *version;
18564                 int major, minor, patch;
18565
18566                 version = db_version( &major, &minor, &patch );
18567
18568                 if( major != DB_VERSION_MAJOR ||
18569                         minor < DB_VERSION_MINOR )
18570                 {
18571                         printf("Berkeley DB version mismatch\n"
18572                                 "\texpected: %s\n\tgot: %s\n",
18573                                 DB_VERSION_STRING, version);
18574                         return 1;
18575                 }
18576         }
18577 #endif
18578
18579 #if DB_VERSION_MAJOR > 2
18580         db_env_create( NULL, 0 );
18581 #elif DB_VERSION_MAJOR > 1
18582         db_appexit( NULL );
18583 #else
18584         (void) dbopen( NULL, 0, 0, 0, NULL);
18585 #endif
18586
18587 ; return 0; }
18588 EOF
18589 if { (eval echo configure:18590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18590   rm -rf conftest*
18591   ol_cv_db_db_4_dot_2=yes
18592 else
18593   echo "configure: failed program was:" >&5
18594   cat conftest.$ac_ext >&5
18595   rm -rf conftest*
18596   ol_cv_db_db_4_dot_2=no
18597 fi
18598 rm -f conftest*
18599
18600         LIBS="$ol_LIBS"
18601
18602 fi
18603
18604 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18605
18606         if test $ol_cv_db_db_4_dot_2 = yes ; then
18607                 ol_cv_lib_db=-ldb-4.2
18608         fi
18609 fi
18610
18611 if test $ol_cv_lib_db = no ; then
18612         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18613 echo "configure:18614: checking for Berkeley DB link (-ldb-4-2)" >&5
18614 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18615   echo $ac_n "(cached) $ac_c" 1>&6
18616 else
18617   
18618         ol_DB_LIB=-ldb-4-2
18619         ol_LIBS=$LIBS
18620         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18621
18622         cat > conftest.$ac_ext <<EOF
18623 #line 18624 "configure"
18624 #include "confdefs.h"
18625
18626 #ifdef HAVE_DB_185_H
18627 # include <db_185.h>
18628 #else
18629 # include <db.h>
18630 #endif
18631
18632 #ifndef DB_VERSION_MAJOR
18633 # define DB_VERSION_MAJOR 1
18634 #endif
18635
18636 #ifndef NULL
18637 #define NULL ((void*)0)
18638 #endif
18639
18640 int main() {
18641
18642 #if DB_VERSION_MAJOR > 1
18643         {
18644                 char *version;
18645                 int major, minor, patch;
18646
18647                 version = db_version( &major, &minor, &patch );
18648
18649                 if( major != DB_VERSION_MAJOR ||
18650                         minor < DB_VERSION_MINOR )
18651                 {
18652                         printf("Berkeley DB version mismatch\n"
18653                                 "\texpected: %s\n\tgot: %s\n",
18654                                 DB_VERSION_STRING, version);
18655                         return 1;
18656                 }
18657         }
18658 #endif
18659
18660 #if DB_VERSION_MAJOR > 2
18661         db_env_create( NULL, 0 );
18662 #elif DB_VERSION_MAJOR > 1
18663         db_appexit( NULL );
18664 #else
18665         (void) dbopen( NULL, 0, 0, 0, NULL);
18666 #endif
18667
18668 ; return 0; }
18669 EOF
18670 if { (eval echo configure:18671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18671   rm -rf conftest*
18672   ol_cv_db_db_4_2=yes
18673 else
18674   echo "configure: failed program was:" >&5
18675   cat conftest.$ac_ext >&5
18676   rm -rf conftest*
18677   ol_cv_db_db_4_2=no
18678 fi
18679 rm -f conftest*
18680
18681         LIBS="$ol_LIBS"
18682
18683 fi
18684
18685 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18686
18687         if test $ol_cv_db_db_4_2 = yes ; then
18688                 ol_cv_lib_db=-ldb-4-2
18689         fi
18690 fi
18691
18692 if test $ol_cv_lib_db = no ; then
18693         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18694 echo "configure:18695: checking for Berkeley DB link (-ldb-4)" >&5
18695 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18696   echo $ac_n "(cached) $ac_c" 1>&6
18697 else
18698   
18699         ol_DB_LIB=-ldb-4
18700         ol_LIBS=$LIBS
18701         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18702
18703         cat > conftest.$ac_ext <<EOF
18704 #line 18705 "configure"
18705 #include "confdefs.h"
18706
18707 #ifdef HAVE_DB_185_H
18708 # include <db_185.h>
18709 #else
18710 # include <db.h>
18711 #endif
18712
18713 #ifndef DB_VERSION_MAJOR
18714 # define DB_VERSION_MAJOR 1
18715 #endif
18716
18717 #ifndef NULL
18718 #define NULL ((void*)0)
18719 #endif
18720
18721 int main() {
18722
18723 #if DB_VERSION_MAJOR > 1
18724         {
18725                 char *version;
18726                 int major, minor, patch;
18727
18728                 version = db_version( &major, &minor, &patch );
18729
18730                 if( major != DB_VERSION_MAJOR ||
18731                         minor < DB_VERSION_MINOR )
18732                 {
18733                         printf("Berkeley DB version mismatch\n"
18734                                 "\texpected: %s\n\tgot: %s\n",
18735                                 DB_VERSION_STRING, version);
18736                         return 1;
18737                 }
18738         }
18739 #endif
18740
18741 #if DB_VERSION_MAJOR > 2
18742         db_env_create( NULL, 0 );
18743 #elif DB_VERSION_MAJOR > 1
18744         db_appexit( NULL );
18745 #else
18746         (void) dbopen( NULL, 0, 0, 0, NULL);
18747 #endif
18748
18749 ; return 0; }
18750 EOF
18751 if { (eval echo configure:18752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18752   rm -rf conftest*
18753   ol_cv_db_db_4=yes
18754 else
18755   echo "configure: failed program was:" >&5
18756   cat conftest.$ac_ext >&5
18757   rm -rf conftest*
18758   ol_cv_db_db_4=no
18759 fi
18760 rm -f conftest*
18761
18762         LIBS="$ol_LIBS"
18763
18764 fi
18765
18766 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18767
18768         if test $ol_cv_db_db_4 = yes ; then
18769                 ol_cv_lib_db=-ldb-4
18770         fi
18771 fi
18772
18773 if test $ol_cv_lib_db = no ; then
18774         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18775 echo "configure:18776: checking for Berkeley DB link (-ldb4)" >&5
18776 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18777   echo $ac_n "(cached) $ac_c" 1>&6
18778 else
18779   
18780         ol_DB_LIB=-ldb4
18781         ol_LIBS=$LIBS
18782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18783
18784         cat > conftest.$ac_ext <<EOF
18785 #line 18786 "configure"
18786 #include "confdefs.h"
18787
18788 #ifdef HAVE_DB_185_H
18789 # include <db_185.h>
18790 #else
18791 # include <db.h>
18792 #endif
18793
18794 #ifndef DB_VERSION_MAJOR
18795 # define DB_VERSION_MAJOR 1
18796 #endif
18797
18798 #ifndef NULL
18799 #define NULL ((void*)0)
18800 #endif
18801
18802 int main() {
18803
18804 #if DB_VERSION_MAJOR > 1
18805         {
18806                 char *version;
18807                 int major, minor, patch;
18808
18809                 version = db_version( &major, &minor, &patch );
18810
18811                 if( major != DB_VERSION_MAJOR ||
18812                         minor < DB_VERSION_MINOR )
18813                 {
18814                         printf("Berkeley DB version mismatch\n"
18815                                 "\texpected: %s\n\tgot: %s\n",
18816                                 DB_VERSION_STRING, version);
18817                         return 1;
18818                 }
18819         }
18820 #endif
18821
18822 #if DB_VERSION_MAJOR > 2
18823         db_env_create( NULL, 0 );
18824 #elif DB_VERSION_MAJOR > 1
18825         db_appexit( NULL );
18826 #else
18827         (void) dbopen( NULL, 0, 0, 0, NULL);
18828 #endif
18829
18830 ; return 0; }
18831 EOF
18832 if { (eval echo configure:18833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18833   rm -rf conftest*
18834   ol_cv_db_db4=yes
18835 else
18836   echo "configure: failed program was:" >&5
18837   cat conftest.$ac_ext >&5
18838   rm -rf conftest*
18839   ol_cv_db_db4=no
18840 fi
18841 rm -f conftest*
18842
18843         LIBS="$ol_LIBS"
18844
18845 fi
18846
18847 echo "$ac_t""$ol_cv_db_db4" 1>&6
18848
18849         if test $ol_cv_db_db4 = yes ; then
18850                 ol_cv_lib_db=-ldb4
18851         fi
18852 fi
18853
18854 if test $ol_cv_lib_db = no ; then
18855         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18856 echo "configure:18857: checking for Berkeley DB link (-ldb)" >&5
18857 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18858   echo $ac_n "(cached) $ac_c" 1>&6
18859 else
18860   
18861         ol_DB_LIB=-ldb
18862         ol_LIBS=$LIBS
18863         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18864
18865         cat > conftest.$ac_ext <<EOF
18866 #line 18867 "configure"
18867 #include "confdefs.h"
18868
18869 #ifdef HAVE_DB_185_H
18870 # include <db_185.h>
18871 #else
18872 # include <db.h>
18873 #endif
18874
18875 #ifndef DB_VERSION_MAJOR
18876 # define DB_VERSION_MAJOR 1
18877 #endif
18878
18879 #ifndef NULL
18880 #define NULL ((void*)0)
18881 #endif
18882
18883 int main() {
18884
18885 #if DB_VERSION_MAJOR > 1
18886         {
18887                 char *version;
18888                 int major, minor, patch;
18889
18890                 version = db_version( &major, &minor, &patch );
18891
18892                 if( major != DB_VERSION_MAJOR ||
18893                         minor < DB_VERSION_MINOR )
18894                 {
18895                         printf("Berkeley DB version mismatch\n"
18896                                 "\texpected: %s\n\tgot: %s\n",
18897                                 DB_VERSION_STRING, version);
18898                         return 1;
18899                 }
18900         }
18901 #endif
18902
18903 #if DB_VERSION_MAJOR > 2
18904         db_env_create( NULL, 0 );
18905 #elif DB_VERSION_MAJOR > 1
18906         db_appexit( NULL );
18907 #else
18908         (void) dbopen( NULL, 0, 0, 0, NULL);
18909 #endif
18910
18911 ; return 0; }
18912 EOF
18913 if { (eval echo configure:18914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18914   rm -rf conftest*
18915   ol_cv_db_db=yes
18916 else
18917   echo "configure: failed program was:" >&5
18918   cat conftest.$ac_ext >&5
18919   rm -rf conftest*
18920   ol_cv_db_db=no
18921 fi
18922 rm -f conftest*
18923
18924         LIBS="$ol_LIBS"
18925
18926 fi
18927
18928 echo "$ac_t""$ol_cv_db_db" 1>&6
18929
18930         if test $ol_cv_db_db = yes ; then
18931                 ol_cv_lib_db=-ldb
18932         fi
18933 fi
18934
18935 if test $ol_cv_lib_db = no ; then
18936         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18937 echo "configure:18938: checking for Berkeley DB link (-ldb41)" >&5
18938 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18939   echo $ac_n "(cached) $ac_c" 1>&6
18940 else
18941   
18942         ol_DB_LIB=-ldb41
18943         ol_LIBS=$LIBS
18944         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18945
18946         cat > conftest.$ac_ext <<EOF
18947 #line 18948 "configure"
18948 #include "confdefs.h"
18949
18950 #ifdef HAVE_DB_185_H
18951 # include <db_185.h>
18952 #else
18953 # include <db.h>
18954 #endif
18955
18956 #ifndef DB_VERSION_MAJOR
18957 # define DB_VERSION_MAJOR 1
18958 #endif
18959
18960 #ifndef NULL
18961 #define NULL ((void*)0)
18962 #endif
18963
18964 int main() {
18965
18966 #if DB_VERSION_MAJOR > 1
18967         {
18968                 char *version;
18969                 int major, minor, patch;
18970
18971                 version = db_version( &major, &minor, &patch );
18972
18973                 if( major != DB_VERSION_MAJOR ||
18974                         minor < DB_VERSION_MINOR )
18975                 {
18976                         printf("Berkeley DB version mismatch\n"
18977                                 "\texpected: %s\n\tgot: %s\n",
18978                                 DB_VERSION_STRING, version);
18979                         return 1;
18980                 }
18981         }
18982 #endif
18983
18984 #if DB_VERSION_MAJOR > 2
18985         db_env_create( NULL, 0 );
18986 #elif DB_VERSION_MAJOR > 1
18987         db_appexit( NULL );
18988 #else
18989         (void) dbopen( NULL, 0, 0, 0, NULL);
18990 #endif
18991
18992 ; return 0; }
18993 EOF
18994 if { (eval echo configure:18995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18995   rm -rf conftest*
18996   ol_cv_db_db41=yes
18997 else
18998   echo "configure: failed program was:" >&5
18999   cat conftest.$ac_ext >&5
19000   rm -rf conftest*
19001   ol_cv_db_db41=no
19002 fi
19003 rm -f conftest*
19004
19005         LIBS="$ol_LIBS"
19006
19007 fi
19008
19009 echo "$ac_t""$ol_cv_db_db41" 1>&6
19010
19011         if test $ol_cv_db_db41 = yes ; then
19012                 ol_cv_lib_db=-ldb41
19013         fi
19014 fi
19015
19016 if test $ol_cv_lib_db = no ; then
19017         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19018 echo "configure:19019: checking for Berkeley DB link (-ldb-41)" >&5
19019 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19020   echo $ac_n "(cached) $ac_c" 1>&6
19021 else
19022   
19023         ol_DB_LIB=-ldb-41
19024         ol_LIBS=$LIBS
19025         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19026
19027         cat > conftest.$ac_ext <<EOF
19028 #line 19029 "configure"
19029 #include "confdefs.h"
19030
19031 #ifdef HAVE_DB_185_H
19032 # include <db_185.h>
19033 #else
19034 # include <db.h>
19035 #endif
19036
19037 #ifndef DB_VERSION_MAJOR
19038 # define DB_VERSION_MAJOR 1
19039 #endif
19040
19041 #ifndef NULL
19042 #define NULL ((void*)0)
19043 #endif
19044
19045 int main() {
19046
19047 #if DB_VERSION_MAJOR > 1
19048         {
19049                 char *version;
19050                 int major, minor, patch;
19051
19052                 version = db_version( &major, &minor, &patch );
19053
19054                 if( major != DB_VERSION_MAJOR ||
19055                         minor < DB_VERSION_MINOR )
19056                 {
19057                         printf("Berkeley DB version mismatch\n"
19058                                 "\texpected: %s\n\tgot: %s\n",
19059                                 DB_VERSION_STRING, version);
19060                         return 1;
19061                 }
19062         }
19063 #endif
19064
19065 #if DB_VERSION_MAJOR > 2
19066         db_env_create( NULL, 0 );
19067 #elif DB_VERSION_MAJOR > 1
19068         db_appexit( NULL );
19069 #else
19070         (void) dbopen( NULL, 0, 0, 0, NULL);
19071 #endif
19072
19073 ; return 0; }
19074 EOF
19075 if { (eval echo configure:19076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19076   rm -rf conftest*
19077   ol_cv_db_db_41=yes
19078 else
19079   echo "configure: failed program was:" >&5
19080   cat conftest.$ac_ext >&5
19081   rm -rf conftest*
19082   ol_cv_db_db_41=no
19083 fi
19084 rm -f conftest*
19085
19086         LIBS="$ol_LIBS"
19087
19088 fi
19089
19090 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19091
19092         if test $ol_cv_db_db_41 = yes ; then
19093                 ol_cv_lib_db=-ldb-41
19094         fi
19095 fi
19096
19097 if test $ol_cv_lib_db = no ; then
19098         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19099 echo "configure:19100: checking for Berkeley DB link (-ldb-4.1)" >&5
19100 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19101   echo $ac_n "(cached) $ac_c" 1>&6
19102 else
19103   
19104         ol_DB_LIB=-ldb-4.1
19105         ol_LIBS=$LIBS
19106         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19107
19108         cat > conftest.$ac_ext <<EOF
19109 #line 19110 "configure"
19110 #include "confdefs.h"
19111
19112 #ifdef HAVE_DB_185_H
19113 # include <db_185.h>
19114 #else
19115 # include <db.h>
19116 #endif
19117
19118 #ifndef DB_VERSION_MAJOR
19119 # define DB_VERSION_MAJOR 1
19120 #endif
19121
19122 #ifndef NULL
19123 #define NULL ((void*)0)
19124 #endif
19125
19126 int main() {
19127
19128 #if DB_VERSION_MAJOR > 1
19129         {
19130                 char *version;
19131                 int major, minor, patch;
19132
19133                 version = db_version( &major, &minor, &patch );
19134
19135                 if( major != DB_VERSION_MAJOR ||
19136                         minor < DB_VERSION_MINOR )
19137                 {
19138                         printf("Berkeley DB version mismatch\n"
19139                                 "\texpected: %s\n\tgot: %s\n",
19140                                 DB_VERSION_STRING, version);
19141                         return 1;
19142                 }
19143         }
19144 #endif
19145
19146 #if DB_VERSION_MAJOR > 2
19147         db_env_create( NULL, 0 );
19148 #elif DB_VERSION_MAJOR > 1
19149         db_appexit( NULL );
19150 #else
19151         (void) dbopen( NULL, 0, 0, 0, NULL);
19152 #endif
19153
19154 ; return 0; }
19155 EOF
19156 if { (eval echo configure:19157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19157   rm -rf conftest*
19158   ol_cv_db_db_4_dot_1=yes
19159 else
19160   echo "configure: failed program was:" >&5
19161   cat conftest.$ac_ext >&5
19162   rm -rf conftest*
19163   ol_cv_db_db_4_dot_1=no
19164 fi
19165 rm -f conftest*
19166
19167         LIBS="$ol_LIBS"
19168
19169 fi
19170
19171 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19172
19173         if test $ol_cv_db_db_4_dot_1 = yes ; then
19174                 ol_cv_lib_db=-ldb-4.1
19175         fi
19176 fi
19177
19178 if test $ol_cv_lib_db = no ; then
19179         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19180 echo "configure:19181: checking for Berkeley DB link (-ldb-4-1)" >&5
19181 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19182   echo $ac_n "(cached) $ac_c" 1>&6
19183 else
19184   
19185         ol_DB_LIB=-ldb-4-1
19186         ol_LIBS=$LIBS
19187         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19188
19189         cat > conftest.$ac_ext <<EOF
19190 #line 19191 "configure"
19191 #include "confdefs.h"
19192
19193 #ifdef HAVE_DB_185_H
19194 # include <db_185.h>
19195 #else
19196 # include <db.h>
19197 #endif
19198
19199 #ifndef DB_VERSION_MAJOR
19200 # define DB_VERSION_MAJOR 1
19201 #endif
19202
19203 #ifndef NULL
19204 #define NULL ((void*)0)
19205 #endif
19206
19207 int main() {
19208
19209 #if DB_VERSION_MAJOR > 1
19210         {
19211                 char *version;
19212                 int major, minor, patch;
19213
19214                 version = db_version( &major, &minor, &patch );
19215
19216                 if( major != DB_VERSION_MAJOR ||
19217                         minor < DB_VERSION_MINOR )
19218                 {
19219                         printf("Berkeley DB version mismatch\n"
19220                                 "\texpected: %s\n\tgot: %s\n",
19221                                 DB_VERSION_STRING, version);
19222                         return 1;
19223                 }
19224         }
19225 #endif
19226
19227 #if DB_VERSION_MAJOR > 2
19228         db_env_create( NULL, 0 );
19229 #elif DB_VERSION_MAJOR > 1
19230         db_appexit( NULL );
19231 #else
19232         (void) dbopen( NULL, 0, 0, 0, NULL);
19233 #endif
19234
19235 ; return 0; }
19236 EOF
19237 if { (eval echo configure:19238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19238   rm -rf conftest*
19239   ol_cv_db_db_4_1=yes
19240 else
19241   echo "configure: failed program was:" >&5
19242   cat conftest.$ac_ext >&5
19243   rm -rf conftest*
19244   ol_cv_db_db_4_1=no
19245 fi
19246 rm -f conftest*
19247
19248         LIBS="$ol_LIBS"
19249
19250 fi
19251
19252 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19253
19254         if test $ol_cv_db_db_4_1 = yes ; then
19255                 ol_cv_lib_db=-ldb-4-1
19256         fi
19257 fi
19258
19259 if test $ol_cv_lib_db = no ; then
19260         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19261 echo "configure:19262: checking for Berkeley DB link (-ldb3)" >&5
19262 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19263   echo $ac_n "(cached) $ac_c" 1>&6
19264 else
19265   
19266         ol_DB_LIB=-ldb3
19267         ol_LIBS=$LIBS
19268         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19269
19270         cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273
19274 #ifdef HAVE_DB_185_H
19275 # include <db_185.h>
19276 #else
19277 # include <db.h>
19278 #endif
19279
19280 #ifndef DB_VERSION_MAJOR
19281 # define DB_VERSION_MAJOR 1
19282 #endif
19283
19284 #ifndef NULL
19285 #define NULL ((void*)0)
19286 #endif
19287
19288 int main() {
19289
19290 #if DB_VERSION_MAJOR > 1
19291         {
19292                 char *version;
19293                 int major, minor, patch;
19294
19295                 version = db_version( &major, &minor, &patch );
19296
19297                 if( major != DB_VERSION_MAJOR ||
19298                         minor < DB_VERSION_MINOR )
19299                 {
19300                         printf("Berkeley DB version mismatch\n"
19301                                 "\texpected: %s\n\tgot: %s\n",
19302                                 DB_VERSION_STRING, version);
19303                         return 1;
19304                 }
19305         }
19306 #endif
19307
19308 #if DB_VERSION_MAJOR > 2
19309         db_env_create( NULL, 0 );
19310 #elif DB_VERSION_MAJOR > 1
19311         db_appexit( NULL );
19312 #else
19313         (void) dbopen( NULL, 0, 0, 0, NULL);
19314 #endif
19315
19316 ; return 0; }
19317 EOF
19318 if { (eval echo configure:19319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19319   rm -rf conftest*
19320   ol_cv_db_db3=yes
19321 else
19322   echo "configure: failed program was:" >&5
19323   cat conftest.$ac_ext >&5
19324   rm -rf conftest*
19325   ol_cv_db_db3=no
19326 fi
19327 rm -f conftest*
19328
19329         LIBS="$ol_LIBS"
19330
19331 fi
19332
19333 echo "$ac_t""$ol_cv_db_db3" 1>&6
19334
19335         if test $ol_cv_db_db3 = yes ; then
19336                 ol_cv_lib_db=-ldb3
19337         fi
19338 fi
19339
19340 if test $ol_cv_lib_db = no ; then
19341         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19342 echo "configure:19343: checking for Berkeley DB link (-ldb-3)" >&5
19343 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19344   echo $ac_n "(cached) $ac_c" 1>&6
19345 else
19346   
19347         ol_DB_LIB=-ldb-3
19348         ol_LIBS=$LIBS
19349         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19350
19351         cat > conftest.$ac_ext <<EOF
19352 #line 19353 "configure"
19353 #include "confdefs.h"
19354
19355 #ifdef HAVE_DB_185_H
19356 # include <db_185.h>
19357 #else
19358 # include <db.h>
19359 #endif
19360
19361 #ifndef DB_VERSION_MAJOR
19362 # define DB_VERSION_MAJOR 1
19363 #endif
19364
19365 #ifndef NULL
19366 #define NULL ((void*)0)
19367 #endif
19368
19369 int main() {
19370
19371 #if DB_VERSION_MAJOR > 1
19372         {
19373                 char *version;
19374                 int major, minor, patch;
19375
19376                 version = db_version( &major, &minor, &patch );
19377
19378                 if( major != DB_VERSION_MAJOR ||
19379                         minor < DB_VERSION_MINOR )
19380                 {
19381                         printf("Berkeley DB version mismatch\n"
19382                                 "\texpected: %s\n\tgot: %s\n",
19383                                 DB_VERSION_STRING, version);
19384                         return 1;
19385                 }
19386         }
19387 #endif
19388
19389 #if DB_VERSION_MAJOR > 2
19390         db_env_create( NULL, 0 );
19391 #elif DB_VERSION_MAJOR > 1
19392         db_appexit( NULL );
19393 #else
19394         (void) dbopen( NULL, 0, 0, 0, NULL);
19395 #endif
19396
19397 ; return 0; }
19398 EOF
19399 if { (eval echo configure:19400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19400   rm -rf conftest*
19401   ol_cv_db_db_3=yes
19402 else
19403   echo "configure: failed program was:" >&5
19404   cat conftest.$ac_ext >&5
19405   rm -rf conftest*
19406   ol_cv_db_db_3=no
19407 fi
19408 rm -f conftest*
19409
19410         LIBS="$ol_LIBS"
19411
19412 fi
19413
19414 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19415
19416         if test $ol_cv_db_db_3 = yes ; then
19417                 ol_cv_lib_db=-ldb-3
19418         fi
19419 fi
19420
19421 if test $ol_cv_lib_db = no ; then
19422         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19423 echo "configure:19424: checking for Berkeley DB link (-ldb2)" >&5
19424 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19425   echo $ac_n "(cached) $ac_c" 1>&6
19426 else
19427   
19428         ol_DB_LIB=-ldb2
19429         ol_LIBS=$LIBS
19430         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19431
19432         cat > conftest.$ac_ext <<EOF
19433 #line 19434 "configure"
19434 #include "confdefs.h"
19435
19436 #ifdef HAVE_DB_185_H
19437 # include <db_185.h>
19438 #else
19439 # include <db.h>
19440 #endif
19441
19442 #ifndef DB_VERSION_MAJOR
19443 # define DB_VERSION_MAJOR 1
19444 #endif
19445
19446 #ifndef NULL
19447 #define NULL ((void*)0)
19448 #endif
19449
19450 int main() {
19451
19452 #if DB_VERSION_MAJOR > 1
19453         {
19454                 char *version;
19455                 int major, minor, patch;
19456
19457                 version = db_version( &major, &minor, &patch );
19458
19459                 if( major != DB_VERSION_MAJOR ||
19460                         minor < DB_VERSION_MINOR )
19461                 {
19462                         printf("Berkeley DB version mismatch\n"
19463                                 "\texpected: %s\n\tgot: %s\n",
19464                                 DB_VERSION_STRING, version);
19465                         return 1;
19466                 }
19467         }
19468 #endif
19469
19470 #if DB_VERSION_MAJOR > 2
19471         db_env_create( NULL, 0 );
19472 #elif DB_VERSION_MAJOR > 1
19473         db_appexit( NULL );
19474 #else
19475         (void) dbopen( NULL, 0, 0, 0, NULL);
19476 #endif
19477
19478 ; return 0; }
19479 EOF
19480 if { (eval echo configure:19481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19481   rm -rf conftest*
19482   ol_cv_db_db2=yes
19483 else
19484   echo "configure: failed program was:" >&5
19485   cat conftest.$ac_ext >&5
19486   rm -rf conftest*
19487   ol_cv_db_db2=no
19488 fi
19489 rm -f conftest*
19490
19491         LIBS="$ol_LIBS"
19492
19493 fi
19494
19495 echo "$ac_t""$ol_cv_db_db2" 1>&6
19496
19497         if test $ol_cv_db_db2 = yes ; then
19498                 ol_cv_lib_db=-ldb2
19499         fi
19500 fi
19501
19502 if test $ol_cv_lib_db = no ; then
19503         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19504 echo "configure:19505: checking for Berkeley DB link (-ldb-2)" >&5
19505 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19506   echo $ac_n "(cached) $ac_c" 1>&6
19507 else
19508   
19509         ol_DB_LIB=-ldb-2
19510         ol_LIBS=$LIBS
19511         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19512
19513         cat > conftest.$ac_ext <<EOF
19514 #line 19515 "configure"
19515 #include "confdefs.h"
19516
19517 #ifdef HAVE_DB_185_H
19518 # include <db_185.h>
19519 #else
19520 # include <db.h>
19521 #endif
19522
19523 #ifndef DB_VERSION_MAJOR
19524 # define DB_VERSION_MAJOR 1
19525 #endif
19526
19527 #ifndef NULL
19528 #define NULL ((void*)0)
19529 #endif
19530
19531 int main() {
19532
19533 #if DB_VERSION_MAJOR > 1
19534         {
19535                 char *version;
19536                 int major, minor, patch;
19537
19538                 version = db_version( &major, &minor, &patch );
19539
19540                 if( major != DB_VERSION_MAJOR ||
19541                         minor < DB_VERSION_MINOR )
19542                 {
19543                         printf("Berkeley DB version mismatch\n"
19544                                 "\texpected: %s\n\tgot: %s\n",
19545                                 DB_VERSION_STRING, version);
19546                         return 1;
19547                 }
19548         }
19549 #endif
19550
19551 #if DB_VERSION_MAJOR > 2
19552         db_env_create( NULL, 0 );
19553 #elif DB_VERSION_MAJOR > 1
19554         db_appexit( NULL );
19555 #else
19556         (void) dbopen( NULL, 0, 0, 0, NULL);
19557 #endif
19558
19559 ; return 0; }
19560 EOF
19561 if { (eval echo configure:19562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19562   rm -rf conftest*
19563   ol_cv_db_db_2=yes
19564 else
19565   echo "configure: failed program was:" >&5
19566   cat conftest.$ac_ext >&5
19567   rm -rf conftest*
19568   ol_cv_db_db_2=no
19569 fi
19570 rm -f conftest*
19571
19572         LIBS="$ol_LIBS"
19573
19574 fi
19575
19576 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19577
19578         if test $ol_cv_db_db_2 = yes ; then
19579                 ol_cv_lib_db=-ldb-2
19580         fi
19581 fi
19582
19583 if test $ol_cv_lib_db = no ; then
19584         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19585 echo "configure:19586: checking for Berkeley DB link (-ldb1)" >&5
19586 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19587   echo $ac_n "(cached) $ac_c" 1>&6
19588 else
19589   
19590         ol_DB_LIB=-ldb1
19591         ol_LIBS=$LIBS
19592         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19593
19594         cat > conftest.$ac_ext <<EOF
19595 #line 19596 "configure"
19596 #include "confdefs.h"
19597
19598 #ifdef HAVE_DB_185_H
19599 # include <db_185.h>
19600 #else
19601 # include <db.h>
19602 #endif
19603
19604 #ifndef DB_VERSION_MAJOR
19605 # define DB_VERSION_MAJOR 1
19606 #endif
19607
19608 #ifndef NULL
19609 #define NULL ((void*)0)
19610 #endif
19611
19612 int main() {
19613
19614 #if DB_VERSION_MAJOR > 1
19615         {
19616                 char *version;
19617                 int major, minor, patch;
19618
19619                 version = db_version( &major, &minor, &patch );
19620
19621                 if( major != DB_VERSION_MAJOR ||
19622                         minor < DB_VERSION_MINOR )
19623                 {
19624                         printf("Berkeley DB version mismatch\n"
19625                                 "\texpected: %s\n\tgot: %s\n",
19626                                 DB_VERSION_STRING, version);
19627                         return 1;
19628                 }
19629         }
19630 #endif
19631
19632 #if DB_VERSION_MAJOR > 2
19633         db_env_create( NULL, 0 );
19634 #elif DB_VERSION_MAJOR > 1
19635         db_appexit( NULL );
19636 #else
19637         (void) dbopen( NULL, 0, 0, 0, NULL);
19638 #endif
19639
19640 ; return 0; }
19641 EOF
19642 if { (eval echo configure:19643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19643   rm -rf conftest*
19644   ol_cv_db_db1=yes
19645 else
19646   echo "configure: failed program was:" >&5
19647   cat conftest.$ac_ext >&5
19648   rm -rf conftest*
19649   ol_cv_db_db1=no
19650 fi
19651 rm -f conftest*
19652
19653         LIBS="$ol_LIBS"
19654
19655 fi
19656
19657 echo "$ac_t""$ol_cv_db_db1" 1>&6
19658
19659         if test $ol_cv_db_db1 = yes ; then
19660                 ol_cv_lib_db=-ldb1
19661         fi
19662 fi
19663
19664 if test $ol_cv_lib_db = no ; then
19665         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19666 echo "configure:19667: checking for Berkeley DB link (-ldb-1)" >&5
19667 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19668   echo $ac_n "(cached) $ac_c" 1>&6
19669 else
19670   
19671         ol_DB_LIB=-ldb-1
19672         ol_LIBS=$LIBS
19673         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19674
19675         cat > conftest.$ac_ext <<EOF
19676 #line 19677 "configure"
19677 #include "confdefs.h"
19678
19679 #ifdef HAVE_DB_185_H
19680 # include <db_185.h>
19681 #else
19682 # include <db.h>
19683 #endif
19684
19685 #ifndef DB_VERSION_MAJOR
19686 # define DB_VERSION_MAJOR 1
19687 #endif
19688
19689 #ifndef NULL
19690 #define NULL ((void*)0)
19691 #endif
19692
19693 int main() {
19694
19695 #if DB_VERSION_MAJOR > 1
19696         {
19697                 char *version;
19698                 int major, minor, patch;
19699
19700                 version = db_version( &major, &minor, &patch );
19701
19702                 if( major != DB_VERSION_MAJOR ||
19703                         minor < DB_VERSION_MINOR )
19704                 {
19705                         printf("Berkeley DB version mismatch\n"
19706                                 "\texpected: %s\n\tgot: %s\n",
19707                                 DB_VERSION_STRING, version);
19708                         return 1;
19709                 }
19710         }
19711 #endif
19712
19713 #if DB_VERSION_MAJOR > 2
19714         db_env_create( NULL, 0 );
19715 #elif DB_VERSION_MAJOR > 1
19716         db_appexit( NULL );
19717 #else
19718         (void) dbopen( NULL, 0, 0, 0, NULL);
19719 #endif
19720
19721 ; return 0; }
19722 EOF
19723 if { (eval echo configure:19724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19724   rm -rf conftest*
19725   ol_cv_db_db_1=yes
19726 else
19727   echo "configure: failed program was:" >&5
19728   cat conftest.$ac_ext >&5
19729   rm -rf conftest*
19730   ol_cv_db_db_1=no
19731 fi
19732 rm -f conftest*
19733
19734         LIBS="$ol_LIBS"
19735
19736 fi
19737
19738 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19739
19740         if test $ol_cv_db_db_1 = yes ; then
19741                 ol_cv_lib_db=-ldb-1
19742         fi
19743 fi
19744
19745
19746         if test "$ol_cv_lib_db" != no ; then
19747                 ol_cv_berkeley_db=yes
19748                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19749 echo "configure:19750: checking for Berkeley DB thread support" >&5
19750 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19751   echo $ac_n "(cached) $ac_c" 1>&6
19752 else
19753   
19754         ol_LIBS="$LIBS"
19755         LIBS="$LTHREAD_LIBS $LIBS"
19756         if test $ol_cv_lib_db != yes ; then
19757                 LIBS="$ol_cv_lib_db $LIBS"
19758         fi
19759
19760         if test "$cross_compiling" = yes; then
19761   ol_cv_berkeley_db_thread=cross
19762 else
19763   cat > conftest.$ac_ext <<EOF
19764 #line 19765 "configure"
19765 #include "confdefs.h"
19766
19767 #ifdef HAVE_DB_185_H
19768         choke me;
19769 #else
19770 #include <db.h>
19771 #endif
19772 #ifndef NULL
19773 #define NULL ((void *)0)
19774 #endif
19775 main()
19776 {
19777         int rc;
19778         u_int32_t flags = DB_CREATE |
19779 #ifdef DB_PRIVATE
19780                 DB_PRIVATE |
19781 #endif
19782                 DB_THREAD;
19783
19784 #if DB_VERSION_MAJOR > 2
19785         DB_ENV *env = NULL;
19786
19787         rc = db_env_create( &env, 0 );
19788
19789         flags |= DB_INIT_MPOOL;
19790 #ifdef DB_MPOOL_PRIVATE
19791         flags |= DB_MPOOL_PRIVATE;
19792 #endif
19793
19794         if( rc ) {
19795                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19796                 return rc;
19797         }
19798
19799 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19800         rc = env->open( env, NULL, flags, 0 );
19801 #else
19802         rc = env->open( env, NULL, NULL, flags, 0 );
19803 #endif
19804
19805         if ( rc == 0 ) {
19806                 rc = env->close( env, 0 );
19807         }
19808
19809         if( rc ) {
19810                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19811                 return rc;
19812         }
19813
19814 #else
19815         DB_ENV env;
19816         memset( &env, '\0', sizeof(env) );
19817
19818         rc = db_appinit( NULL, NULL, &env, flags );
19819
19820         if( rc == 0 ) {
19821                 db_appexit( &env );
19822         }
19823
19824         unlink("__db_mpool.share");
19825         unlink("__db_lock.share");
19826 #endif
19827
19828         return rc;
19829 }
19830 EOF
19831 if { (eval echo configure:19832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19832 then
19833   ol_cv_berkeley_db_thread=yes
19834 else
19835   echo "configure: failed program was:" >&5
19836   cat conftest.$ac_ext >&5
19837   rm -fr conftest*
19838   ol_cv_berkeley_db_thread=no
19839 fi
19840 rm -fr conftest*
19841 fi
19842
19843
19844         LIBS="$ol_LIBS"
19845
19846 fi
19847
19848 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19849
19850         if test $ol_cv_berkeley_db_thread != no ; then
19851                 cat >> confdefs.h <<\EOF
19852 #define HAVE_BERKELEY_DB_THREAD 1
19853 EOF
19854
19855         fi
19856
19857         fi
19858 fi
19859
19860         fi
19861
19862         if test $ol_cv_berkeley_db != no ; then
19863                 cat >> confdefs.h <<\EOF
19864 #define HAVE_BERKELEY_DB 1
19865 EOF
19866
19867
19868                 ol_link_ldbm=berkeley
19869                 ol_with_ldbm_api=berkeley
19870
19871                 if test $ol_with_ldbm_type = hash ; then
19872                         cat >> confdefs.h <<\EOF
19873 #define LDBM_USE_DBHASH 1
19874 EOF
19875
19876                 else
19877                         cat >> confdefs.h <<\EOF
19878 #define LDBM_USE_DBBTREE 1
19879 EOF
19880
19881                 fi
19882
19883                                                 if test $ol_cv_lib_db != yes ; then
19884                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19885                 fi
19886         fi
19887 fi
19888
19889 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19890         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19891 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19892         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19893 echo "configure:19894: checking Berkeley DB version for BDB backend" >&5
19894 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19895   echo $ac_n "(cached) $ac_c" 1>&6
19896 else
19897   
19898         cat > conftest.$ac_ext <<EOF
19899 #line 19900 "configure"
19900 #include "confdefs.h"
19901
19902 #include <db.h>
19903
19904  /* this check could be improved */
19905 #ifndef DB_VERSION_MAJOR
19906 #       define DB_VERSION_MAJOR 1
19907 #endif
19908 #ifndef DB_VERSION_MINOR
19909 #       define DB_VERSION_MINOR 0
19910 #endif
19911
19912 /* require 4.2 or later */
19913 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19914         __db_version_compat
19915 #endif
19916         
19917 EOF
19918 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19919   egrep "__db_version_compat" >/dev/null 2>&1; then
19920   rm -rf conftest*
19921   ol_cv_bdb_compat=yes
19922 else
19923   rm -rf conftest*
19924   ol_cv_bdb_compat=no
19925 fi
19926 rm -f conftest*
19927
19928 fi
19929
19930 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19931
19932
19933         if test $ol_cv_bdb_compat = yes ; then
19934                 ol_enable_bdb=yes
19935         elif test $ol_enable_bdb = yes ; then
19936                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19937         else
19938                 ol_enable_bdb=no
19939         fi
19940 fi
19941 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19942         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19943 fi
19944
19945 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19946         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19947         ol_with_ldbm_api=none
19948 fi
19949
19950 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19951         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19952 echo "configure:19953: checking for MDBM library" >&5
19953 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19954   echo $ac_n "(cached) $ac_c" 1>&6
19955 else
19956         ol_LIBS="$LIBS"
19957         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19958 echo "configure:19959: checking for mdbm_set_chain" >&5
19959 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19960   echo $ac_n "(cached) $ac_c" 1>&6
19961 else
19962   cat > conftest.$ac_ext <<EOF
19963 #line 19964 "configure"
19964 #include "confdefs.h"
19965 /* System header to define __stub macros and hopefully few prototypes,
19966     which can conflict with char mdbm_set_chain(); below.  */
19967 #include <assert.h>
19968 /* Override any gcc2 internal prototype to avoid an error.  */
19969 /* We use char because int might match the return type of a gcc2
19970     builtin and then its argument prototype would still apply.  */
19971 char mdbm_set_chain();
19972 char (*f)();
19973
19974 int main() {
19975
19976 /* The GNU C library defines this for functions which it implements
19977     to always fail with ENOSYS.  Some functions are actually named
19978     something starting with __ and the normal name is an alias.  */
19979 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19980 choke me
19981 #else
19982 f = mdbm_set_chain;
19983 #endif
19984
19985 ; return 0; }
19986 EOF
19987 if { (eval echo configure:19988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19988   rm -rf conftest*
19989   eval "ac_cv_func_mdbm_set_chain=yes"
19990 else
19991   echo "configure: failed program was:" >&5
19992   cat conftest.$ac_ext >&5
19993   rm -rf conftest*
19994   eval "ac_cv_func_mdbm_set_chain=no"
19995 fi
19996 rm -f conftest*
19997 fi
19998
19999 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20000   echo "$ac_t""yes" 1>&6
20001   ol_cv_lib_mdbm=yes
20002 else
20003   echo "$ac_t""no" 1>&6
20004
20005                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20006 echo "configure:20007: checking for mdbm_set_chain in -lmdbm" >&5
20007 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20008 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20009   echo $ac_n "(cached) $ac_c" 1>&6
20010 else
20011   ac_save_LIBS="$LIBS"
20012 LIBS="-lmdbm  $LIBS"
20013 cat > conftest.$ac_ext <<EOF
20014 #line 20015 "configure"
20015 #include "confdefs.h"
20016 /* Override any gcc2 internal prototype to avoid an error.  */
20017 /* We use char because int might match the return type of a gcc2
20018     builtin and then its argument prototype would still apply.  */
20019 char mdbm_set_chain();
20020
20021 int main() {
20022 mdbm_set_chain()
20023 ; return 0; }
20024 EOF
20025 if { (eval echo configure:20026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20026   rm -rf conftest*
20027   eval "ac_cv_lib_$ac_lib_var=yes"
20028 else
20029   echo "configure: failed program was:" >&5
20030   cat conftest.$ac_ext >&5
20031   rm -rf conftest*
20032   eval "ac_cv_lib_$ac_lib_var=no"
20033 fi
20034 rm -f conftest*
20035 LIBS="$ac_save_LIBS"
20036
20037 fi
20038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20039   echo "$ac_t""yes" 1>&6
20040   ol_cv_lib_mdbm=-lmdbm
20041 else
20042   echo "$ac_t""no" 1>&6
20043 ol_cv_lib_mdbm=no
20044 fi
20045
20046         
20047 fi
20048
20049         LIBS="$ol_LIBS"
20050
20051 fi
20052
20053 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20054
20055
20056  for ac_hdr in mdbm.h
20057 do
20058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20060 echo "configure:20061: checking for $ac_hdr" >&5
20061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20062   echo $ac_n "(cached) $ac_c" 1>&6
20063 else
20064   cat > conftest.$ac_ext <<EOF
20065 #line 20066 "configure"
20066 #include "confdefs.h"
20067 #include <$ac_hdr>
20068 EOF
20069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20070 { (eval echo configure:20071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20072 if test -z "$ac_err"; then
20073   rm -rf conftest*
20074   eval "ac_cv_header_$ac_safe=yes"
20075 else
20076   echo "$ac_err" >&5
20077   echo "configure: failed program was:" >&5
20078   cat conftest.$ac_ext >&5
20079   rm -rf conftest*
20080   eval "ac_cv_header_$ac_safe=no"
20081 fi
20082 rm -f conftest*
20083 fi
20084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20085   echo "$ac_t""yes" 1>&6
20086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20087   cat >> confdefs.h <<EOF
20088 #define $ac_tr_hdr 1
20089 EOF
20090  
20091 else
20092   echo "$ac_t""no" 1>&6
20093 fi
20094 done
20095
20096  echo $ac_n "checking for db""... $ac_c" 1>&6
20097 echo "configure:20098: checking for db" >&5
20098 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20099   echo $ac_n "(cached) $ac_c" 1>&6
20100 else
20101   
20102         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20103                 ol_cv_mdbm=no
20104         else
20105                 ol_cv_mdbm=yes
20106         fi
20107
20108 fi
20109
20110 echo "$ac_t""$ol_cv_mdbm" 1>&6
20111  if test $ol_cv_mdbm = yes ; then
20112         cat >> confdefs.h <<\EOF
20113 #define HAVE_MDBM 1
20114 EOF
20115
20116  fi
20117
20118
20119         if test $ol_cv_mdbm = yes ; then
20120                 ol_link_ldbm=mdbm
20121                 ol_with_ldbm_api=mdbm
20122                 if test $ol_cv_lib_mdbm != yes ; then
20123                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20124                 fi
20125         fi
20126 fi
20127
20128 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20129         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20130 echo "configure:20131: checking for GDBM library" >&5
20131 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20132   echo $ac_n "(cached) $ac_c" 1>&6
20133 else
20134         ol_LIBS="$LIBS"
20135         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20136 echo "configure:20137: checking for gdbm_open" >&5
20137 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20138   echo $ac_n "(cached) $ac_c" 1>&6
20139 else
20140   cat > conftest.$ac_ext <<EOF
20141 #line 20142 "configure"
20142 #include "confdefs.h"
20143 /* System header to define __stub macros and hopefully few prototypes,
20144     which can conflict with char gdbm_open(); below.  */
20145 #include <assert.h>
20146 /* Override any gcc2 internal prototype to avoid an error.  */
20147 /* We use char because int might match the return type of a gcc2
20148     builtin and then its argument prototype would still apply.  */
20149 char gdbm_open();
20150 char (*f)();
20151
20152 int main() {
20153
20154 /* The GNU C library defines this for functions which it implements
20155     to always fail with ENOSYS.  Some functions are actually named
20156     something starting with __ and the normal name is an alias.  */
20157 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20158 choke me
20159 #else
20160 f = gdbm_open;
20161 #endif
20162
20163 ; return 0; }
20164 EOF
20165 if { (eval echo configure:20166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20166   rm -rf conftest*
20167   eval "ac_cv_func_gdbm_open=yes"
20168 else
20169   echo "configure: failed program was:" >&5
20170   cat conftest.$ac_ext >&5
20171   rm -rf conftest*
20172   eval "ac_cv_func_gdbm_open=no"
20173 fi
20174 rm -f conftest*
20175 fi
20176
20177 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20178   echo "$ac_t""yes" 1>&6
20179   ol_cv_lib_gdbm=yes
20180 else
20181   echo "$ac_t""no" 1>&6
20182
20183                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20184 echo "configure:20185: checking for gdbm_open in -lgdbm" >&5
20185 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20187   echo $ac_n "(cached) $ac_c" 1>&6
20188 else
20189   ac_save_LIBS="$LIBS"
20190 LIBS="-lgdbm  $LIBS"
20191 cat > conftest.$ac_ext <<EOF
20192 #line 20193 "configure"
20193 #include "confdefs.h"
20194 /* Override any gcc2 internal prototype to avoid an error.  */
20195 /* We use char because int might match the return type of a gcc2
20196     builtin and then its argument prototype would still apply.  */
20197 char gdbm_open();
20198
20199 int main() {
20200 gdbm_open()
20201 ; return 0; }
20202 EOF
20203 if { (eval echo configure:20204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20204   rm -rf conftest*
20205   eval "ac_cv_lib_$ac_lib_var=yes"
20206 else
20207   echo "configure: failed program was:" >&5
20208   cat conftest.$ac_ext >&5
20209   rm -rf conftest*
20210   eval "ac_cv_lib_$ac_lib_var=no"
20211 fi
20212 rm -f conftest*
20213 LIBS="$ac_save_LIBS"
20214
20215 fi
20216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20217   echo "$ac_t""yes" 1>&6
20218   ol_cv_lib_gdbm=-lgdbm
20219 else
20220   echo "$ac_t""no" 1>&6
20221 ol_cv_lib_gdbm=no
20222 fi
20223
20224         
20225 fi
20226
20227         LIBS="$ol_LIBS"
20228
20229 fi
20230
20231 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20232
20233
20234  for ac_hdr in gdbm.h
20235 do
20236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20238 echo "configure:20239: checking for $ac_hdr" >&5
20239 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20240   echo $ac_n "(cached) $ac_c" 1>&6
20241 else
20242   cat > conftest.$ac_ext <<EOF
20243 #line 20244 "configure"
20244 #include "confdefs.h"
20245 #include <$ac_hdr>
20246 EOF
20247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20248 { (eval echo configure:20249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20250 if test -z "$ac_err"; then
20251   rm -rf conftest*
20252   eval "ac_cv_header_$ac_safe=yes"
20253 else
20254   echo "$ac_err" >&5
20255   echo "configure: failed program was:" >&5
20256   cat conftest.$ac_ext >&5
20257   rm -rf conftest*
20258   eval "ac_cv_header_$ac_safe=no"
20259 fi
20260 rm -f conftest*
20261 fi
20262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20263   echo "$ac_t""yes" 1>&6
20264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20265   cat >> confdefs.h <<EOF
20266 #define $ac_tr_hdr 1
20267 EOF
20268  
20269 else
20270   echo "$ac_t""no" 1>&6
20271 fi
20272 done
20273
20274  echo $ac_n "checking for db""... $ac_c" 1>&6
20275 echo "configure:20276: checking for db" >&5
20276 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   
20280         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20281                 ol_cv_gdbm=no
20282         else
20283                 ol_cv_gdbm=yes
20284         fi
20285
20286 fi
20287
20288 echo "$ac_t""$ol_cv_gdbm" 1>&6
20289  if test $ol_cv_gdbm = yes ; then
20290         cat >> confdefs.h <<\EOF
20291 #define HAVE_GDBM 1
20292 EOF
20293
20294  fi
20295
20296
20297         if test $ol_cv_gdbm = yes ; then
20298                 ol_link_ldbm=gdbm
20299                 ol_with_ldbm_api=gdbm
20300
20301                 if test $ol_cv_lib_gdbm != yes ; then
20302                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20303                 fi
20304         fi
20305 fi
20306
20307 if test $ol_with_ldbm_api = ndbm ; then
20308         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20309 echo "configure:20310: checking for NDBM library" >&5
20310 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20311   echo $ac_n "(cached) $ac_c" 1>&6
20312 else
20313         ol_LIBS="$LIBS"
20314         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20315 echo "configure:20316: checking for dbm_open" >&5
20316 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20317   echo $ac_n "(cached) $ac_c" 1>&6
20318 else
20319   cat > conftest.$ac_ext <<EOF
20320 #line 20321 "configure"
20321 #include "confdefs.h"
20322 /* System header to define __stub macros and hopefully few prototypes,
20323     which can conflict with char dbm_open(); below.  */
20324 #include <assert.h>
20325 /* Override any gcc2 internal prototype to avoid an error.  */
20326 /* We use char because int might match the return type of a gcc2
20327     builtin and then its argument prototype would still apply.  */
20328 char dbm_open();
20329 char (*f)();
20330
20331 int main() {
20332
20333 /* The GNU C library defines this for functions which it implements
20334     to always fail with ENOSYS.  Some functions are actually named
20335     something starting with __ and the normal name is an alias.  */
20336 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20337 choke me
20338 #else
20339 f = dbm_open;
20340 #endif
20341
20342 ; return 0; }
20343 EOF
20344 if { (eval echo configure:20345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20345   rm -rf conftest*
20346   eval "ac_cv_func_dbm_open=yes"
20347 else
20348   echo "configure: failed program was:" >&5
20349   cat conftest.$ac_ext >&5
20350   rm -rf conftest*
20351   eval "ac_cv_func_dbm_open=no"
20352 fi
20353 rm -f conftest*
20354 fi
20355
20356 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20357   echo "$ac_t""yes" 1>&6
20358   ol_cv_lib_ndbm=yes
20359 else
20360   echo "$ac_t""no" 1>&6
20361
20362                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20363 echo "configure:20364: checking for dbm_open in -lndbm" >&5
20364 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20366   echo $ac_n "(cached) $ac_c" 1>&6
20367 else
20368   ac_save_LIBS="$LIBS"
20369 LIBS="-lndbm  $LIBS"
20370 cat > conftest.$ac_ext <<EOF
20371 #line 20372 "configure"
20372 #include "confdefs.h"
20373 /* Override any gcc2 internal prototype to avoid an error.  */
20374 /* We use char because int might match the return type of a gcc2
20375     builtin and then its argument prototype would still apply.  */
20376 char dbm_open();
20377
20378 int main() {
20379 dbm_open()
20380 ; return 0; }
20381 EOF
20382 if { (eval echo configure:20383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20383   rm -rf conftest*
20384   eval "ac_cv_lib_$ac_lib_var=yes"
20385 else
20386   echo "configure: failed program was:" >&5
20387   cat conftest.$ac_ext >&5
20388   rm -rf conftest*
20389   eval "ac_cv_lib_$ac_lib_var=no"
20390 fi
20391 rm -f conftest*
20392 LIBS="$ac_save_LIBS"
20393
20394 fi
20395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20396   echo "$ac_t""yes" 1>&6
20397   ol_cv_lib_ndbm=-lndbm
20398 else
20399   echo "$ac_t""no" 1>&6
20400
20401                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20402 echo "configure:20403: checking for dbm_open in -ldbm" >&5
20403 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20404 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20405   echo $ac_n "(cached) $ac_c" 1>&6
20406 else
20407   ac_save_LIBS="$LIBS"
20408 LIBS="-ldbm  $LIBS"
20409 cat > conftest.$ac_ext <<EOF
20410 #line 20411 "configure"
20411 #include "confdefs.h"
20412 /* Override any gcc2 internal prototype to avoid an error.  */
20413 /* We use char because int might match the return type of a gcc2
20414     builtin and then its argument prototype would still apply.  */
20415 char dbm_open();
20416
20417 int main() {
20418 dbm_open()
20419 ; return 0; }
20420 EOF
20421 if { (eval echo configure:20422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20422   rm -rf conftest*
20423   eval "ac_cv_lib_$ac_lib_var=yes"
20424 else
20425   echo "configure: failed program was:" >&5
20426   cat conftest.$ac_ext >&5
20427   rm -rf conftest*
20428   eval "ac_cv_lib_$ac_lib_var=no"
20429 fi
20430 rm -f conftest*
20431 LIBS="$ac_save_LIBS"
20432
20433 fi
20434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20435   echo "$ac_t""yes" 1>&6
20436   ol_cv_lib_ndbm=-ldbm
20437 else
20438   echo "$ac_t""no" 1>&6
20439 ol_cv_lib_ndbm=no
20440 fi
20441                 
20442 fi
20443
20444         
20445 fi
20446
20447         LIBS="$ol_LIBS"
20448
20449 fi
20450
20451 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20452
20453
20454  for ac_hdr in ndbm.h
20455 do
20456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20458 echo "configure:20459: checking for $ac_hdr" >&5
20459 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20460   echo $ac_n "(cached) $ac_c" 1>&6
20461 else
20462   cat > conftest.$ac_ext <<EOF
20463 #line 20464 "configure"
20464 #include "confdefs.h"
20465 #include <$ac_hdr>
20466 EOF
20467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20468 { (eval echo configure:20469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20470 if test -z "$ac_err"; then
20471   rm -rf conftest*
20472   eval "ac_cv_header_$ac_safe=yes"
20473 else
20474   echo "$ac_err" >&5
20475   echo "configure: failed program was:" >&5
20476   cat conftest.$ac_ext >&5
20477   rm -rf conftest*
20478   eval "ac_cv_header_$ac_safe=no"
20479 fi
20480 rm -f conftest*
20481 fi
20482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20483   echo "$ac_t""yes" 1>&6
20484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20485   cat >> confdefs.h <<EOF
20486 #define $ac_tr_hdr 1
20487 EOF
20488  
20489 else
20490   echo "$ac_t""no" 1>&6
20491 fi
20492 done
20493
20494  echo $ac_n "checking for db""... $ac_c" 1>&6
20495 echo "configure:20496: checking for db" >&5
20496 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20497   echo $ac_n "(cached) $ac_c" 1>&6
20498 else
20499   
20500         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20501                 ol_cv_ndbm=no
20502         else
20503                 ol_cv_ndbm=yes
20504         fi
20505
20506 fi
20507
20508 echo "$ac_t""$ol_cv_ndbm" 1>&6
20509  if test $ol_cv_ndbm = yes ; then
20510         cat >> confdefs.h <<\EOF
20511 #define HAVE_NDBM 1
20512 EOF
20513
20514  fi
20515
20516
20517         if test $ol_cv_ndbm = yes ; then
20518                 ol_link_ldbm=ndbm
20519                 ol_with_ldbm_api=ndbm
20520
20521                 if test $ol_cv_lib_ndbm != yes ; then
20522                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20523                 fi
20524         fi
20525 fi
20526
20527 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20528         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20529         if test $ol_enable_ldbm = yes ; then
20530                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20531         fi
20532
20533         echo "configure: warning: disabling LDBM" 1>&2
20534         ol_enable_ldbm=no
20535 fi
20536
20537
20538 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20539         BUILD_LIBS_DYNAMIC=shared
20540         cat >> confdefs.h <<\EOF
20541 #define LDAP_LIBS_DYNAMIC 1
20542 EOF
20543
20544         LTSTATIC=""
20545 else
20546         BUILD_LIBS_DYNAMIC=static
20547         LTSTATIC="-static"
20548 fi
20549
20550 if test $ol_enable_wrappers != no ; then
20551         for ac_hdr in tcpd.h
20552 do
20553 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20554 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20555 echo "configure:20556: checking for $ac_hdr" >&5
20556 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20557   echo $ac_n "(cached) $ac_c" 1>&6
20558 else
20559   cat > conftest.$ac_ext <<EOF
20560 #line 20561 "configure"
20561 #include "confdefs.h"
20562 #include <$ac_hdr>
20563 EOF
20564 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20565 { (eval echo configure:20566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20566 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20567 if test -z "$ac_err"; then
20568   rm -rf conftest*
20569   eval "ac_cv_header_$ac_safe=yes"
20570 else
20571   echo "$ac_err" >&5
20572   echo "configure: failed program was:" >&5
20573   cat conftest.$ac_ext >&5
20574   rm -rf conftest*
20575   eval "ac_cv_header_$ac_safe=no"
20576 fi
20577 rm -f conftest*
20578 fi
20579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20580   echo "$ac_t""yes" 1>&6
20581     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20582   cat >> confdefs.h <<EOF
20583 #define $ac_tr_hdr 1
20584 EOF
20585  
20586                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20587 echo "configure:20588: checking for TCP wrappers library" >&5
20588                 save_LIBS="$LIBS"
20589                 LIBS="$LIBS -lwrap"
20590                 cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593
20594 #include <tcpd.h>
20595 int allow_severity = 0;
20596 int deny_severity  = 0;
20597
20598 struct request_info *req;
20599                 
20600 int main() {
20601
20602 hosts_access(req)
20603                 
20604 ; return 0; }
20605 EOF
20606 if { (eval echo configure:20607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20607   rm -rf conftest*
20608   echo "$ac_t""-lwrap" 1>&6
20609                 have_wrappers=yes
20610                 LIBS="$save_LIBS"
20611 else
20612   echo "configure: failed program was:" >&5
20613   cat conftest.$ac_ext >&5
20614   rm -rf conftest*
20615   
20616                                 LIBS="$LIBS -lnsl"
20617                 cat > conftest.$ac_ext <<EOF
20618 #line 20619 "configure"
20619 #include "confdefs.h"
20620
20621 #include <tcpd.h>
20622 int allow_severity = 0;
20623 int deny_severity  = 0;
20624
20625 struct request_info *req;
20626                 
20627 int main() {
20628
20629 hosts_access(req)
20630                 
20631 ; return 0; }
20632 EOF
20633 if { (eval echo configure:20634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20634   rm -rf conftest*
20635   echo "$ac_t""-lwrap -lnsl" 1>&6
20636                 have_wrappers=yes
20637                 LIBS="$save_LIBS -lnsl"
20638 else
20639   echo "configure: failed program was:" >&5
20640   cat conftest.$ac_ext >&5
20641   rm -rf conftest*
20642   
20643                 echo "$ac_t""no" 1>&6
20644                 have_wrappers=no
20645                 LIBS=$save_LIBS
20646 fi
20647 rm -f conftest*
20648 fi
20649 rm -f conftest*
20650 else
20651   echo "$ac_t""no" 1>&6
20652 have_wrappers=no
20653 fi
20654 done
20655
20656
20657         if test $have_wrappers = yes ; then
20658                 cat >> confdefs.h <<\EOF
20659 #define HAVE_TCPD 1
20660 EOF
20661
20662                 WRAP_LIBS="-lwrap"
20663         elif test $ol_enable_wrappers = yes ; then
20664                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20665         else
20666                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20667                 WRAP_LIBS=""
20668         fi
20669 fi
20670
20671 if test $ol_enable_syslog != no ; then
20672         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20673 echo "configure:20674: checking for openlog" >&5
20674 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20675   echo $ac_n "(cached) $ac_c" 1>&6
20676 else
20677   cat > conftest.$ac_ext <<EOF
20678 #line 20679 "configure"
20679 #include "confdefs.h"
20680 /* System header to define __stub macros and hopefully few prototypes,
20681     which can conflict with char openlog(); below.  */
20682 #include <assert.h>
20683 /* Override any gcc2 internal prototype to avoid an error.  */
20684 /* We use char because int might match the return type of a gcc2
20685     builtin and then its argument prototype would still apply.  */
20686 char openlog();
20687 char (*f)();
20688
20689 int main() {
20690
20691 /* The GNU C library defines this for functions which it implements
20692     to always fail with ENOSYS.  Some functions are actually named
20693     something starting with __ and the normal name is an alias.  */
20694 #if defined (__stub_openlog) || defined (__stub___openlog)
20695 choke me
20696 #else
20697 f = openlog;
20698 #endif
20699
20700 ; return 0; }
20701 EOF
20702 if { (eval echo configure:20703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20703   rm -rf conftest*
20704   eval "ac_cv_func_openlog=yes"
20705 else
20706   echo "configure: failed program was:" >&5
20707   cat conftest.$ac_ext >&5
20708   rm -rf conftest*
20709   eval "ac_cv_func_openlog=no"
20710 fi
20711 rm -f conftest*
20712 fi
20713
20714 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20715   echo "$ac_t""yes" 1>&6
20716   :
20717 else
20718   echo "$ac_t""no" 1>&6
20719 fi
20720
20721         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20722                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20723         fi
20724         ol_enable_syslog=$ac_cv_func_openlog
20725 fi
20726
20727
20728 ol_link_sql=no
20729 if test $ol_enable_sql != no ; then
20730         for ac_hdr in sql.h sqlext.h
20731 do
20732 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20733 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20734 echo "configure:20735: checking for $ac_hdr" >&5
20735 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20736   echo $ac_n "(cached) $ac_c" 1>&6
20737 else
20738   cat > conftest.$ac_ext <<EOF
20739 #line 20740 "configure"
20740 #include "confdefs.h"
20741 #include <$ac_hdr>
20742 EOF
20743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20744 { (eval echo configure:20745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20745 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20746 if test -z "$ac_err"; then
20747   rm -rf conftest*
20748   eval "ac_cv_header_$ac_safe=yes"
20749 else
20750   echo "$ac_err" >&5
20751   echo "configure: failed program was:" >&5
20752   cat conftest.$ac_ext >&5
20753   rm -rf conftest*
20754   eval "ac_cv_header_$ac_safe=no"
20755 fi
20756 rm -f conftest*
20757 fi
20758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20759   echo "$ac_t""yes" 1>&6
20760     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20761   cat >> confdefs.h <<EOF
20762 #define $ac_tr_hdr 1
20763 EOF
20764  
20765 else
20766   echo "$ac_t""no" 1>&6
20767 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20768         
20769 fi
20770 done
20771
20772
20773         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20774 echo "configure:20775: checking for SQLDriverConnect in -liodbc" >&5
20775 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20777   echo $ac_n "(cached) $ac_c" 1>&6
20778 else
20779   ac_save_LIBS="$LIBS"
20780 LIBS="-liodbc  $LIBS"
20781 cat > conftest.$ac_ext <<EOF
20782 #line 20783 "configure"
20783 #include "confdefs.h"
20784 /* Override any gcc2 internal prototype to avoid an error.  */
20785 /* We use char because int might match the return type of a gcc2
20786     builtin and then its argument prototype would still apply.  */
20787 char SQLDriverConnect();
20788
20789 int main() {
20790 SQLDriverConnect()
20791 ; return 0; }
20792 EOF
20793 if { (eval echo configure:20794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20794   rm -rf conftest*
20795   eval "ac_cv_lib_$ac_lib_var=yes"
20796 else
20797   echo "configure: failed program was:" >&5
20798   cat conftest.$ac_ext >&5
20799   rm -rf conftest*
20800   eval "ac_cv_lib_$ac_lib_var=no"
20801 fi
20802 rm -f conftest*
20803 LIBS="$ac_save_LIBS"
20804
20805 fi
20806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20807   echo "$ac_t""yes" 1>&6
20808   have_iodbc=yes
20809 else
20810   echo "$ac_t""no" 1>&6
20811 have_iodbc=no
20812 fi
20813
20814         if test $have_iodbc = yes ; then
20815                 ol_link_sql="-liodbc"
20816         else
20817                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20818 echo "configure:20819: checking for SQLDriverConnect in -lodbc" >&5
20819 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20820 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20821   echo $ac_n "(cached) $ac_c" 1>&6
20822 else
20823   ac_save_LIBS="$LIBS"
20824 LIBS="-lodbc  $LIBS"
20825 cat > conftest.$ac_ext <<EOF
20826 #line 20827 "configure"
20827 #include "confdefs.h"
20828 /* Override any gcc2 internal prototype to avoid an error.  */
20829 /* We use char because int might match the return type of a gcc2
20830     builtin and then its argument prototype would still apply.  */
20831 char SQLDriverConnect();
20832
20833 int main() {
20834 SQLDriverConnect()
20835 ; return 0; }
20836 EOF
20837 if { (eval echo configure:20838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20838   rm -rf conftest*
20839   eval "ac_cv_lib_$ac_lib_var=yes"
20840 else
20841   echo "configure: failed program was:" >&5
20842   cat conftest.$ac_ext >&5
20843   rm -rf conftest*
20844   eval "ac_cv_lib_$ac_lib_var=no"
20845 fi
20846 rm -f conftest*
20847 LIBS="$ac_save_LIBS"
20848
20849 fi
20850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20851   echo "$ac_t""yes" 1>&6
20852   have_odbc=yes
20853 else
20854   echo "$ac_t""no" 1>&6
20855 have_odbc=no
20856 fi
20857
20858                 if test $have_odbc = yes ; then
20859                         ol_link_sql="-lodbc"
20860                 fi
20861         fi
20862
20863         if test $ol_link_sql != no ; then
20864                 SLAPD_SQL_LIBS="$ol_link_sql"
20865
20866         elif test $ol_enable_sql != auto ; then
20867                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20868         fi
20869 fi
20870
20871 ol_link_sasl=no
20872 ol_link_spasswd=no
20873 if test $ol_with_cyrus_sasl != no ; then
20874         for ac_hdr in sasl/sasl.h sasl.h
20875 do
20876 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20877 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20878 echo "configure:20879: checking for $ac_hdr" >&5
20879 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20880   echo $ac_n "(cached) $ac_c" 1>&6
20881 else
20882   cat > conftest.$ac_ext <<EOF
20883 #line 20884 "configure"
20884 #include "confdefs.h"
20885 #include <$ac_hdr>
20886 EOF
20887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20888 { (eval echo configure:20889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20890 if test -z "$ac_err"; then
20891   rm -rf conftest*
20892   eval "ac_cv_header_$ac_safe=yes"
20893 else
20894   echo "$ac_err" >&5
20895   echo "configure: failed program was:" >&5
20896   cat conftest.$ac_ext >&5
20897   rm -rf conftest*
20898   eval "ac_cv_header_$ac_safe=no"
20899 fi
20900 rm -f conftest*
20901 fi
20902 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20903   echo "$ac_t""yes" 1>&6
20904     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20905   cat >> confdefs.h <<EOF
20906 #define $ac_tr_hdr 1
20907 EOF
20908  
20909 else
20910   echo "$ac_t""no" 1>&6
20911 fi
20912 done
20913
20914
20915         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20916                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20917 echo "configure:20918: checking for sasl_client_init in -lsasl2" >&5
20918 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20919 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20920   echo $ac_n "(cached) $ac_c" 1>&6
20921 else
20922   ac_save_LIBS="$LIBS"
20923 LIBS="-lsasl2  $LIBS"
20924 cat > conftest.$ac_ext <<EOF
20925 #line 20926 "configure"
20926 #include "confdefs.h"
20927 /* Override any gcc2 internal prototype to avoid an error.  */
20928 /* We use char because int might match the return type of a gcc2
20929     builtin and then its argument prototype would still apply.  */
20930 char sasl_client_init();
20931
20932 int main() {
20933 sasl_client_init()
20934 ; return 0; }
20935 EOF
20936 if { (eval echo configure:20937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20937   rm -rf conftest*
20938   eval "ac_cv_lib_$ac_lib_var=yes"
20939 else
20940   echo "configure: failed program was:" >&5
20941   cat conftest.$ac_ext >&5
20942   rm -rf conftest*
20943   eval "ac_cv_lib_$ac_lib_var=no"
20944 fi
20945 rm -f conftest*
20946 LIBS="$ac_save_LIBS"
20947
20948 fi
20949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20950   echo "$ac_t""yes" 1>&6
20951   ol_link_sasl="-lsasl2"
20952 else
20953   echo "$ac_t""no" 1>&6
20954 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20955 echo "configure:20956: checking for sasl_client_init in -lsasl" >&5
20956 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20958   echo $ac_n "(cached) $ac_c" 1>&6
20959 else
20960   ac_save_LIBS="$LIBS"
20961 LIBS="-lsasl  $LIBS"
20962 cat > conftest.$ac_ext <<EOF
20963 #line 20964 "configure"
20964 #include "confdefs.h"
20965 /* Override any gcc2 internal prototype to avoid an error.  */
20966 /* We use char because int might match the return type of a gcc2
20967     builtin and then its argument prototype would still apply.  */
20968 char sasl_client_init();
20969
20970 int main() {
20971 sasl_client_init()
20972 ; return 0; }
20973 EOF
20974 if { (eval echo configure:20975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20975   rm -rf conftest*
20976   eval "ac_cv_lib_$ac_lib_var=yes"
20977 else
20978   echo "configure: failed program was:" >&5
20979   cat conftest.$ac_ext >&5
20980   rm -rf conftest*
20981   eval "ac_cv_lib_$ac_lib_var=no"
20982 fi
20983 rm -f conftest*
20984 LIBS="$ac_save_LIBS"
20985
20986 fi
20987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20988   echo "$ac_t""yes" 1>&6
20989   ol_link_sasl="-lsasl"
20990 else
20991   echo "$ac_t""no" 1>&6
20992 fi
20993
20994 fi
20995
20996         fi
20997
20998         if test $ol_link_sasl = no ; then
20999                 if test $ol_with_cyrus_sasl != auto ; then
21000                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21001                 else
21002                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21003                         echo "configure: warning: SASL authentication not supported!" 1>&2
21004                         if test $ol_link_tls = no ; then
21005                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21006                         fi
21007                 fi
21008         else
21009                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21010 echo "configure:21011: checking Cyrus SASL library version" >&5
21011 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21012   echo $ac_n "(cached) $ac_c" 1>&6
21013 else
21014   
21015         cat > conftest.$ac_ext <<EOF
21016 #line 21017 "configure"
21017 #include "confdefs.h"
21018
21019 #ifdef HAVE_SASL_SASL_H
21020 #include <sasl/sasl.h>
21021 #else
21022 #include <sasl.h>
21023 #endif
21024
21025 /* Require 2.1.15+ */
21026 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21027         char *__sasl_compat = "2.2+ or better okay (we guess)";
21028 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21029         && SASL_VERSION_STEP >=15
21030         char *__sasl_compat = "2.1.15+ or better okay";
21031 #endif
21032         
21033 EOF
21034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21035   egrep "__sasl_compat" >/dev/null 2>&1; then
21036   rm -rf conftest*
21037   ol_cv_sasl_compat=yes
21038 else
21039   rm -rf conftest*
21040   ol_cv_sasl_compat=no
21041 fi
21042 rm -f conftest*
21043
21044 fi
21045
21046 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21047
21048                 if test $ol_cv_sasl_compat = no ; then
21049                         ol_link_sasl=no
21050                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21051                 fi
21052
21053                 cat >> confdefs.h <<\EOF
21054 #define HAVE_CYRUS_SASL 1
21055 EOF
21056
21057                 SASL_LIBS="$ol_link_sasl"
21058                 if test $ol_enable_spasswd != no ; then
21059                         ol_link_spasswd=yes
21060                 fi
21061
21062                 ac_save_LIBS="$LIBS"
21063                 LIBS="$LIBS $ol_link_sasl"
21064                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21065 echo "configure:21066: checking for sasl_version" >&5
21066 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21067   echo $ac_n "(cached) $ac_c" 1>&6
21068 else
21069   cat > conftest.$ac_ext <<EOF
21070 #line 21071 "configure"
21071 #include "confdefs.h"
21072 /* System header to define __stub macros and hopefully few prototypes,
21073     which can conflict with char sasl_version(); below.  */
21074 #include <assert.h>
21075 /* Override any gcc2 internal prototype to avoid an error.  */
21076 /* We use char because int might match the return type of a gcc2
21077     builtin and then its argument prototype would still apply.  */
21078 char sasl_version();
21079 char (*f)();
21080
21081 int main() {
21082
21083 /* The GNU C library defines this for functions which it implements
21084     to always fail with ENOSYS.  Some functions are actually named
21085     something starting with __ and the normal name is an alias.  */
21086 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21087 choke me
21088 #else
21089 f = sasl_version;
21090 #endif
21091
21092 ; return 0; }
21093 EOF
21094 if { (eval echo configure:21095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21095   rm -rf conftest*
21096   eval "ac_cv_func_sasl_version=yes"
21097 else
21098   echo "configure: failed program was:" >&5
21099   cat conftest.$ac_ext >&5
21100   rm -rf conftest*
21101   eval "ac_cv_func_sasl_version=no"
21102 fi
21103 rm -f conftest*
21104 fi
21105
21106 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21107   echo "$ac_t""yes" 1>&6
21108   cat >> confdefs.h <<\EOF
21109 #define HAVE_SASL_VERSION 1
21110 EOF
21111
21112 else
21113   echo "$ac_t""no" 1>&6
21114 fi
21115
21116                 LIBS="$ac_save_LIBS"
21117         fi
21118
21119 else
21120         echo "configure: warning: SASL authentication not supported!" 1>&2
21121         if test $ol_link_tls = no ; then
21122                 echo "configure: warning: Strong authentication not supported!" 1>&2
21123         fi
21124 fi
21125
21126 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21127         dev=no
21128         if test -r /dev/urandom ; then
21129                 dev="/dev/urandom";
21130         elif test -r /idev/urandom ; then
21131                 dev="/idev/urandom";
21132         elif test -r /dev/srandom ; then
21133                 dev="/dev/srandom";
21134         elif test -r /dev/random ; then
21135                 dev="/dev/random";
21136         elif test -r /idev/random ; then
21137                 dev="/idev/random";
21138         fi
21139
21140         if test $dev != no ; then
21141                 cat >> confdefs.h <<EOF
21142 #define URANDOM_DEVICE "$dev"
21143 EOF
21144
21145         fi
21146 fi
21147
21148 ol_link_fetch=no
21149 if test $ol_with_fetch != no ; then
21150         ol_LIBS=$LIBS
21151 LIBS="-lfetch -lcom_err $LIBS"
21152 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21153 echo "configure:21154: checking fetch(3) library" >&5
21154 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21155   echo $ac_n "(cached) $ac_c" 1>&6
21156 else
21157   
21158         cat > conftest.$ac_ext <<EOF
21159 #line 21160 "configure"
21160 #include "confdefs.h"
21161
21162 #include <sys/param.h>
21163 #include <stdio.h>
21164 #include <fetch.h>
21165 int main() {
21166 struct url *u = fetchParseURL("file:///"); 
21167 ; return 0; }
21168 EOF
21169 if { (eval echo configure:21170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21170   rm -rf conftest*
21171   ol_cv_lib_fetch=yes
21172 else
21173   echo "configure: failed program was:" >&5
21174   cat conftest.$ac_ext >&5
21175   rm -rf conftest*
21176   ol_cv_lib_fetch=no
21177 fi
21178 rm -f conftest*
21179 fi
21180
21181 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21182 LIBS=$ol_LIBS
21183 if test $ol_cv_lib_fetch != no ; then
21184         ol_link_fetch="-lfetch -lcom_err"
21185         cat >> confdefs.h <<\EOF
21186 #define HAVE_FETCH 1
21187 EOF
21188
21189 fi
21190
21191
21192         if test $ol_cv_lib_fetch != no ; then
21193                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21194                 ol_link_fetch=freebsd
21195
21196         elif test $ol_with_fetch != auto ; then
21197                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21198         fi 
21199 fi
21200
21201 if test $ol_enable_crypt != no ; then
21202         save_LIBS="$LIBS"
21203         LIBS="$TLS_LIBS $LIBS"
21204
21205         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21206 echo "configure:21207: checking for crypt" >&5
21207 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21208   echo $ac_n "(cached) $ac_c" 1>&6
21209 else
21210   cat > conftest.$ac_ext <<EOF
21211 #line 21212 "configure"
21212 #include "confdefs.h"
21213 /* System header to define __stub macros and hopefully few prototypes,
21214     which can conflict with char crypt(); below.  */
21215 #include <assert.h>
21216 /* Override any gcc2 internal prototype to avoid an error.  */
21217 /* We use char because int might match the return type of a gcc2
21218     builtin and then its argument prototype would still apply.  */
21219 char crypt();
21220 char (*f)();
21221
21222 int main() {
21223
21224 /* The GNU C library defines this for functions which it implements
21225     to always fail with ENOSYS.  Some functions are actually named
21226     something starting with __ and the normal name is an alias.  */
21227 #if defined (__stub_crypt) || defined (__stub___crypt)
21228 choke me
21229 #else
21230 f = crypt;
21231 #endif
21232
21233 ; return 0; }
21234 EOF
21235 if { (eval echo configure:21236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21236   rm -rf conftest*
21237   eval "ac_cv_func_crypt=yes"
21238 else
21239   echo "configure: failed program was:" >&5
21240   cat conftest.$ac_ext >&5
21241   rm -rf conftest*
21242   eval "ac_cv_func_crypt=no"
21243 fi
21244 rm -f conftest*
21245 fi
21246
21247 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21248   echo "$ac_t""yes" 1>&6
21249   have_crypt=yes
21250 else
21251   echo "$ac_t""no" 1>&6
21252
21253                 LIBS="$save_LIBS"
21254                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21255 echo "configure:21256: checking for crypt in -lcrypt" >&5
21256 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21257 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21258   echo $ac_n "(cached) $ac_c" 1>&6
21259 else
21260   ac_save_LIBS="$LIBS"
21261 LIBS="-lcrypt  $LIBS"
21262 cat > conftest.$ac_ext <<EOF
21263 #line 21264 "configure"
21264 #include "confdefs.h"
21265 /* Override any gcc2 internal prototype to avoid an error.  */
21266 /* We use char because int might match the return type of a gcc2
21267     builtin and then its argument prototype would still apply.  */
21268 char crypt();
21269
21270 int main() {
21271 crypt()
21272 ; return 0; }
21273 EOF
21274 if { (eval echo configure:21275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21275   rm -rf conftest*
21276   eval "ac_cv_lib_$ac_lib_var=yes"
21277 else
21278   echo "configure: failed program was:" >&5
21279   cat conftest.$ac_ext >&5
21280   rm -rf conftest*
21281   eval "ac_cv_lib_$ac_lib_var=no"
21282 fi
21283 rm -f conftest*
21284 LIBS="$ac_save_LIBS"
21285
21286 fi
21287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21288   echo "$ac_t""yes" 1>&6
21289   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21290                         have_crypt=yes
21291 else
21292   echo "$ac_t""no" 1>&6
21293 have_crypt=no
21294 fi
21295
21296 fi
21297
21298
21299         LIBS="$save_LIBS"
21300
21301         if test $have_crypt = yes ; then
21302                 cat >> confdefs.h <<\EOF
21303 #define HAVE_CRYPT 1
21304 EOF
21305
21306         else
21307                 echo "configure: warning: could not find crypt" 1>&2
21308                 if test $ol_enable_crypt = yes ; then
21309                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21310                 fi
21311
21312                 echo "configure: warning: disabling crypt support" 1>&2
21313                 ol_enable_crypt=no
21314         fi
21315 fi
21316
21317 if test $ol_enable_proctitle != no ; then
21318         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21319 echo "configure:21320: checking for setproctitle" >&5
21320 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21321   echo $ac_n "(cached) $ac_c" 1>&6
21322 else
21323   cat > conftest.$ac_ext <<EOF
21324 #line 21325 "configure"
21325 #include "confdefs.h"
21326 /* System header to define __stub macros and hopefully few prototypes,
21327     which can conflict with char setproctitle(); below.  */
21328 #include <assert.h>
21329 /* Override any gcc2 internal prototype to avoid an error.  */
21330 /* We use char because int might match the return type of a gcc2
21331     builtin and then its argument prototype would still apply.  */
21332 char setproctitle();
21333 char (*f)();
21334
21335 int main() {
21336
21337 /* The GNU C library defines this for functions which it implements
21338     to always fail with ENOSYS.  Some functions are actually named
21339     something starting with __ and the normal name is an alias.  */
21340 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21341 choke me
21342 #else
21343 f = setproctitle;
21344 #endif
21345
21346 ; return 0; }
21347 EOF
21348 if { (eval echo configure:21349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21349   rm -rf conftest*
21350   eval "ac_cv_func_setproctitle=yes"
21351 else
21352   echo "configure: failed program was:" >&5
21353   cat conftest.$ac_ext >&5
21354   rm -rf conftest*
21355   eval "ac_cv_func_setproctitle=no"
21356 fi
21357 rm -f conftest*
21358 fi
21359
21360 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21361   echo "$ac_t""yes" 1>&6
21362   have_setproctitle=yes
21363 else
21364   echo "$ac_t""no" 1>&6
21365
21366                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21367 echo "configure:21368: checking for setproctitle in -lutil" >&5
21368 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21369 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21370   echo $ac_n "(cached) $ac_c" 1>&6
21371 else
21372   ac_save_LIBS="$LIBS"
21373 LIBS="-lutil  $LIBS"
21374 cat > conftest.$ac_ext <<EOF
21375 #line 21376 "configure"
21376 #include "confdefs.h"
21377 /* Override any gcc2 internal prototype to avoid an error.  */
21378 /* We use char because int might match the return type of a gcc2
21379     builtin and then its argument prototype would still apply.  */
21380 char setproctitle();
21381
21382 int main() {
21383 setproctitle()
21384 ; return 0; }
21385 EOF
21386 if { (eval echo configure:21387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21387   rm -rf conftest*
21388   eval "ac_cv_lib_$ac_lib_var=yes"
21389 else
21390   echo "configure: failed program was:" >&5
21391   cat conftest.$ac_ext >&5
21392   rm -rf conftest*
21393   eval "ac_cv_lib_$ac_lib_var=no"
21394 fi
21395 rm -f conftest*
21396 LIBS="$ac_save_LIBS"
21397
21398 fi
21399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21400   echo "$ac_t""yes" 1>&6
21401   have_setproctitle=yes
21402                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21403 else
21404   echo "$ac_t""no" 1>&6
21405 have_setproctitle=no
21406                         LIBOBJS="$LIBOBJS setproctitle.o"
21407                         LIBSRCS="$LIBSRCS setproctitle.c"
21408 fi
21409
21410 fi
21411
21412
21413         if test $have_setproctitle = yes ; then
21414                 cat >> confdefs.h <<\EOF
21415 #define HAVE_SETPROCTITLE 1
21416 EOF
21417
21418         fi
21419 fi
21420
21421 if test $ol_enable_slp != no ; then
21422         for ac_hdr in slp.h 
21423 do
21424 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21425 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21426 echo "configure:21427: checking for $ac_hdr" >&5
21427 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21428   echo $ac_n "(cached) $ac_c" 1>&6
21429 else
21430   cat > conftest.$ac_ext <<EOF
21431 #line 21432 "configure"
21432 #include "confdefs.h"
21433 #include <$ac_hdr>
21434 EOF
21435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21436 { (eval echo configure:21437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21438 if test -z "$ac_err"; then
21439   rm -rf conftest*
21440   eval "ac_cv_header_$ac_safe=yes"
21441 else
21442   echo "$ac_err" >&5
21443   echo "configure: failed program was:" >&5
21444   cat conftest.$ac_ext >&5
21445   rm -rf conftest*
21446   eval "ac_cv_header_$ac_safe=no"
21447 fi
21448 rm -f conftest*
21449 fi
21450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21451   echo "$ac_t""yes" 1>&6
21452     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21453   cat >> confdefs.h <<EOF
21454 #define $ac_tr_hdr 1
21455 EOF
21456  
21457 else
21458   echo "$ac_t""no" 1>&6
21459 fi
21460 done
21461
21462
21463         if test $ac_cv_header_slp_h = yes ; then
21464                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21465 echo "configure:21466: checking for SLPOpen in -lslp" >&5
21466 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21468   echo $ac_n "(cached) $ac_c" 1>&6
21469 else
21470   ac_save_LIBS="$LIBS"
21471 LIBS="-lslp  $LIBS"
21472 cat > conftest.$ac_ext <<EOF
21473 #line 21474 "configure"
21474 #include "confdefs.h"
21475 /* Override any gcc2 internal prototype to avoid an error.  */
21476 /* We use char because int might match the return type of a gcc2
21477     builtin and then its argument prototype would still apply.  */
21478 char SLPOpen();
21479
21480 int main() {
21481 SLPOpen()
21482 ; return 0; }
21483 EOF
21484 if { (eval echo configure:21485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21485   rm -rf conftest*
21486   eval "ac_cv_lib_$ac_lib_var=yes"
21487 else
21488   echo "configure: failed program was:" >&5
21489   cat conftest.$ac_ext >&5
21490   rm -rf conftest*
21491   eval "ac_cv_lib_$ac_lib_var=no"
21492 fi
21493 rm -f conftest*
21494 LIBS="$ac_save_LIBS"
21495
21496 fi
21497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21498   echo "$ac_t""yes" 1>&6
21499   have_slp=yes
21500 else
21501   echo "$ac_t""no" 1>&6
21502 have_slp=no
21503 fi
21504
21505                 if test $have_slp = yes ; then
21506                         cat >> confdefs.h <<\EOF
21507 #define HAVE_SLP 1
21508 EOF
21509
21510                         SLAPD_SLP_LIBS=-lslp
21511                 fi
21512
21513         elif test $ol_enable_slp = yes ; then
21514                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21515         fi
21516 fi
21517
21518
21519 echo $ac_n "checking long long""... $ac_c" 1>&6
21520 echo "configure:21521: checking long long" >&5
21521 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21522   echo $ac_n "(cached) $ac_c" 1>&6
21523 else
21524   
21525         cat > conftest.$ac_ext <<EOF
21526 #line 21527 "configure"
21527 #include "confdefs.h"
21528
21529 int main() {
21530 long long x;
21531 ; return 0; }
21532 EOF
21533 if { (eval echo configure:21534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21534   rm -rf conftest*
21535   ol_cv_type_long_long=yes
21536 else
21537   echo "configure: failed program was:" >&5
21538   cat conftest.$ac_ext >&5
21539   rm -rf conftest*
21540   ol_cv_type_long_long=no
21541 fi
21542 rm -f conftest*
21543 fi
21544
21545 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21546 if test $ol_cv_type_long_long = yes; then
21547         cat >> confdefs.h <<\EOF
21548 #define HAVE_LONG_LONG 1
21549 EOF
21550
21551 fi
21552
21553 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21554 echo "configure:21555: checking for ANSI C header files" >&5
21555 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21556   echo $ac_n "(cached) $ac_c" 1>&6
21557 else
21558   cat > conftest.$ac_ext <<EOF
21559 #line 21560 "configure"
21560 #include "confdefs.h"
21561 #include <stdlib.h>
21562 #include <stdarg.h>
21563 #include <string.h>
21564 #include <float.h>
21565 EOF
21566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21567 { (eval echo configure:21568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21569 if test -z "$ac_err"; then
21570   rm -rf conftest*
21571   ac_cv_header_stdc=yes
21572 else
21573   echo "$ac_err" >&5
21574   echo "configure: failed program was:" >&5
21575   cat conftest.$ac_ext >&5
21576   rm -rf conftest*
21577   ac_cv_header_stdc=no
21578 fi
21579 rm -f conftest*
21580
21581 if test $ac_cv_header_stdc = yes; then
21582   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21583 cat > conftest.$ac_ext <<EOF
21584 #line 21585 "configure"
21585 #include "confdefs.h"
21586 #include <string.h>
21587 EOF
21588 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21589   egrep "memchr" >/dev/null 2>&1; then
21590   :
21591 else
21592   rm -rf conftest*
21593   ac_cv_header_stdc=no
21594 fi
21595 rm -f conftest*
21596
21597 fi
21598
21599 if test $ac_cv_header_stdc = yes; then
21600   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21601 cat > conftest.$ac_ext <<EOF
21602 #line 21603 "configure"
21603 #include "confdefs.h"
21604 #include <stdlib.h>
21605 EOF
21606 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21607   egrep "free" >/dev/null 2>&1; then
21608   :
21609 else
21610   rm -rf conftest*
21611   ac_cv_header_stdc=no
21612 fi
21613 rm -f conftest*
21614
21615 fi
21616
21617 if test $ac_cv_header_stdc = yes; then
21618   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21619 if test "$cross_compiling" = yes; then
21620   :
21621 else
21622   cat > conftest.$ac_ext <<EOF
21623 #line 21624 "configure"
21624 #include "confdefs.h"
21625 #include <ctype.h>
21626 #if ((' ' & 0x0FF) == 0x020)
21627 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21628 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21629 #else
21630 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21631  || ('j' <= (c) && (c) <= 'r') \
21632  || ('s' <= (c) && (c) <= 'z'))
21633 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21634 #endif
21635 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21636 int main () { int i; for (i = 0; i < 256; i++)
21637 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21638 exit (0); }
21639
21640 EOF
21641 if { (eval echo configure:21642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21642 then
21643   :
21644 else
21645   echo "configure: failed program was:" >&5
21646   cat conftest.$ac_ext >&5
21647   rm -fr conftest*
21648   ac_cv_header_stdc=no
21649 fi
21650 rm -fr conftest*
21651 fi
21652
21653 fi
21654 fi
21655
21656 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21657 if test $ac_cv_header_stdc = yes; then
21658   cat >> confdefs.h <<\EOF
21659 #define STDC_HEADERS 1
21660 EOF
21661
21662 fi
21663
21664 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21665 echo "configure:21666: checking for mode_t" >&5
21666 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21667   echo $ac_n "(cached) $ac_c" 1>&6
21668 else
21669   cat > conftest.$ac_ext <<EOF
21670 #line 21671 "configure"
21671 #include "confdefs.h"
21672 #include <sys/types.h>
21673 #if STDC_HEADERS
21674 #include <stdlib.h>
21675 #include <stddef.h>
21676 #endif
21677
21678 EOF
21679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21680   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21681   rm -rf conftest*
21682   eval "ac_cv_type_mode_t=yes"
21683 else
21684   rm -rf conftest*
21685   eval "ac_cv_type_mode_t=no"
21686 fi
21687 rm -f conftest*
21688
21689 fi
21690 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21691   echo "$ac_t""yes" 1>&6
21692 else
21693   echo "$ac_t""no" 1>&6
21694   cat >> confdefs.h <<EOF
21695 #define mode_t int
21696 EOF
21697
21698 fi
21699
21700 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21701 echo "configure:21702: checking for off_t" >&5
21702 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21703   echo $ac_n "(cached) $ac_c" 1>&6
21704 else
21705   cat > conftest.$ac_ext <<EOF
21706 #line 21707 "configure"
21707 #include "confdefs.h"
21708 #include <sys/types.h>
21709 #if STDC_HEADERS
21710 #include <stdlib.h>
21711 #include <stddef.h>
21712 #endif
21713
21714 EOF
21715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21716   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21717   rm -rf conftest*
21718   eval "ac_cv_type_off_t=yes"
21719 else
21720   rm -rf conftest*
21721   eval "ac_cv_type_off_t=no"
21722 fi
21723 rm -f conftest*
21724
21725 fi
21726 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21727   echo "$ac_t""yes" 1>&6
21728 else
21729   echo "$ac_t""no" 1>&6
21730   cat >> confdefs.h <<EOF
21731 #define off_t long
21732 EOF
21733
21734 fi
21735
21736 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21737 echo "configure:21738: checking for pid_t" >&5
21738 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21739   echo $ac_n "(cached) $ac_c" 1>&6
21740 else
21741   cat > conftest.$ac_ext <<EOF
21742 #line 21743 "configure"
21743 #include "confdefs.h"
21744 #include <sys/types.h>
21745 #if STDC_HEADERS
21746 #include <stdlib.h>
21747 #include <stddef.h>
21748 #endif
21749
21750 EOF
21751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21752   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21753   rm -rf conftest*
21754   eval "ac_cv_type_pid_t=yes"
21755 else
21756   rm -rf conftest*
21757   eval "ac_cv_type_pid_t=no"
21758 fi
21759 rm -f conftest*
21760
21761 fi
21762 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21763   echo "$ac_t""yes" 1>&6
21764 else
21765   echo "$ac_t""no" 1>&6
21766   cat >> confdefs.h <<EOF
21767 #define pid_t int
21768 EOF
21769
21770 fi
21771
21772 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21773 echo "configure:21774: checking for ptrdiff_t" >&5
21774 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21775   echo $ac_n "(cached) $ac_c" 1>&6
21776 else
21777   cat > conftest.$ac_ext <<EOF
21778 #line 21779 "configure"
21779 #include "confdefs.h"
21780 #include <stddef.h>
21781 int main() {
21782 ptrdiff_t p
21783 ; return 0; }
21784 EOF
21785 if { (eval echo configure:21786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21786   rm -rf conftest*
21787   am_cv_type_ptrdiff_t=yes
21788 else
21789   echo "configure: failed program was:" >&5
21790   cat conftest.$ac_ext >&5
21791   rm -rf conftest*
21792   am_cv_type_ptrdiff_t=no
21793 fi
21794 rm -f conftest*
21795 fi
21796
21797 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21798    if test $am_cv_type_ptrdiff_t = yes; then
21799      cat >> confdefs.h <<\EOF
21800 #define HAVE_PTRDIFF_T 1
21801 EOF
21802
21803    fi
21804
21805 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21806 echo "configure:21807: checking return type of signal handlers" >&5
21807 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21808   echo $ac_n "(cached) $ac_c" 1>&6
21809 else
21810   cat > conftest.$ac_ext <<EOF
21811 #line 21812 "configure"
21812 #include "confdefs.h"
21813 #include <sys/types.h>
21814 #include <signal.h>
21815 #ifdef signal
21816 #undef signal
21817 #endif
21818 #ifdef __cplusplus
21819 extern "C" void (*signal (int, void (*)(int)))(int);
21820 #else
21821 void (*signal ()) ();
21822 #endif
21823
21824 int main() {
21825 int i;
21826 ; return 0; }
21827 EOF
21828 if { (eval echo configure:21829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21829   rm -rf conftest*
21830   ac_cv_type_signal=void
21831 else
21832   echo "configure: failed program was:" >&5
21833   cat conftest.$ac_ext >&5
21834   rm -rf conftest*
21835   ac_cv_type_signal=int
21836 fi
21837 rm -f conftest*
21838 fi
21839
21840 echo "$ac_t""$ac_cv_type_signal" 1>&6
21841 cat >> confdefs.h <<EOF
21842 #define RETSIGTYPE $ac_cv_type_signal
21843 EOF
21844
21845
21846 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21847 echo "configure:21848: checking for size_t" >&5
21848 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21849   echo $ac_n "(cached) $ac_c" 1>&6
21850 else
21851   cat > conftest.$ac_ext <<EOF
21852 #line 21853 "configure"
21853 #include "confdefs.h"
21854 #include <sys/types.h>
21855 #if STDC_HEADERS
21856 #include <stdlib.h>
21857 #include <stddef.h>
21858 #endif
21859
21860 EOF
21861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21862   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21863   rm -rf conftest*
21864   eval "ac_cv_type_size_t=yes"
21865 else
21866   rm -rf conftest*
21867   eval "ac_cv_type_size_t=no"
21868 fi
21869 rm -f conftest*
21870
21871 fi
21872 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21873   echo "$ac_t""yes" 1>&6
21874 else
21875   echo "$ac_t""no" 1>&6
21876   cat >> confdefs.h <<EOF
21877 #define size_t unsigned
21878 EOF
21879
21880 fi
21881
21882
21883 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21884 echo "configure:21885: checking for ssize_t" >&5
21885 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21886   echo $ac_n "(cached) $ac_c" 1>&6
21887 else
21888   cat > conftest.$ac_ext <<EOF
21889 #line 21890 "configure"
21890 #include "confdefs.h"
21891 #include <sys/types.h>
21892 #if STDC_HEADERS
21893 #include <stdlib.h>
21894 #include <stddef.h>
21895 #endif
21896
21897 EOF
21898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21899   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21900   rm -rf conftest*
21901   eval "ac_cv_type_ssize_t=yes"
21902 else
21903   rm -rf conftest*
21904   eval "ac_cv_type_ssize_t=no"
21905 fi
21906 rm -f conftest*
21907
21908 fi
21909 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21910   echo "$ac_t""yes" 1>&6
21911 else
21912   echo "$ac_t""no" 1>&6
21913   cat >> confdefs.h <<EOF
21914 #define ssize_t signed int
21915 EOF
21916
21917 fi
21918
21919 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21920 echo "configure:21921: checking for caddr_t" >&5
21921 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21922   echo $ac_n "(cached) $ac_c" 1>&6
21923 else
21924   cat > conftest.$ac_ext <<EOF
21925 #line 21926 "configure"
21926 #include "confdefs.h"
21927 #include <sys/types.h>
21928 #if STDC_HEADERS
21929 #include <stdlib.h>
21930 #include <stddef.h>
21931 #endif
21932
21933 EOF
21934 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21935   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21936   rm -rf conftest*
21937   eval "ac_cv_type_caddr_t=yes"
21938 else
21939   rm -rf conftest*
21940   eval "ac_cv_type_caddr_t=no"
21941 fi
21942 rm -f conftest*
21943
21944 fi
21945 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21946   echo "$ac_t""yes" 1>&6
21947 else
21948   echo "$ac_t""no" 1>&6
21949   cat >> confdefs.h <<EOF
21950 #define caddr_t char *
21951 EOF
21952
21953 fi
21954
21955
21956 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21957 echo "configure:21958: checking for socklen_t" >&5
21958 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21959   echo $ac_n "(cached) $ac_c" 1>&6
21960 else
21961   cat > conftest.$ac_ext <<EOF
21962 #line 21963 "configure"
21963 #include "confdefs.h"
21964
21965 #ifdef HAVE_SYS_TYPES_H
21966 #include <sys/types.h>
21967 #endif
21968 #ifdef HAVE_SYS_SOCKET_H
21969 #include <sys/socket.h>
21970 #endif
21971
21972 int main() {
21973 socklen_t len;
21974 ; return 0; }
21975 EOF
21976 if { (eval echo configure:21977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21977   rm -rf conftest*
21978   ol_cv_type_socklen_t=yes
21979 else
21980   echo "configure: failed program was:" >&5
21981   cat conftest.$ac_ext >&5
21982   rm -rf conftest*
21983   ol_cv_type_socklen_t=no
21984 fi
21985 rm -f conftest*
21986 fi
21987
21988 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21989   if test $ol_cv_type_socklen_t = no; then
21990     cat >> confdefs.h <<\EOF
21991 #define socklen_t int
21992 EOF
21993
21994   fi
21995  
21996 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21997 echo "configure:21998: checking for member st_blksize in aggregate type struct stat" >&5
21998 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21999   echo $ac_n "(cached) $ac_c" 1>&6
22000 else
22001   cat > conftest.$ac_ext <<EOF
22002 #line 22003 "configure"
22003 #include "confdefs.h"
22004 #include <sys/types.h>
22005 #include <sys/stat.h>
22006 int main() {
22007 struct stat foo; foo.st_blksize;
22008 ; return 0; }
22009 EOF
22010 if { (eval echo configure:22011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22011   rm -rf conftest*
22012   ac_cv_c_struct_member_st_blksize=yes
22013 else
22014   echo "configure: failed program was:" >&5
22015   cat conftest.$ac_ext >&5
22016   rm -rf conftest*
22017   ac_cv_c_struct_member_st_blksize=no
22018 fi
22019 rm -f conftest*
22020 fi
22021
22022 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22023 st_blksize="$ac_cv_c_struct_member_st_blksize"
22024 if test $ac_cv_c_struct_member_st_blksize = yes; then
22025   cat >> confdefs.h <<\EOF
22026 #define HAVE_ST_BLKSIZE 1
22027 EOF
22028
22029 fi
22030
22031 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22032 echo "configure:22033: checking whether time.h and sys/time.h may both be included" >&5
22033 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22034   echo $ac_n "(cached) $ac_c" 1>&6
22035 else
22036   cat > conftest.$ac_ext <<EOF
22037 #line 22038 "configure"
22038 #include "confdefs.h"
22039 #include <sys/types.h>
22040 #include <sys/time.h>
22041 #include <time.h>
22042 int main() {
22043 struct tm *tp;
22044 ; return 0; }
22045 EOF
22046 if { (eval echo configure:22047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22047   rm -rf conftest*
22048   ac_cv_header_time=yes
22049 else
22050   echo "configure: failed program was:" >&5
22051   cat conftest.$ac_ext >&5
22052   rm -rf conftest*
22053   ac_cv_header_time=no
22054 fi
22055 rm -f conftest*
22056 fi
22057
22058 echo "$ac_t""$ac_cv_header_time" 1>&6
22059 if test $ac_cv_header_time = yes; then
22060   cat >> confdefs.h <<\EOF
22061 #define TIME_WITH_SYS_TIME 1
22062 EOF
22063
22064 fi
22065
22066 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22067 echo "configure:22068: checking whether struct tm is in sys/time.h or time.h" >&5
22068 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22069   echo $ac_n "(cached) $ac_c" 1>&6
22070 else
22071   cat > conftest.$ac_ext <<EOF
22072 #line 22073 "configure"
22073 #include "confdefs.h"
22074 #include <sys/types.h>
22075 #include <time.h>
22076 int main() {
22077 struct tm *tp; tp->tm_sec;
22078 ; return 0; }
22079 EOF
22080 if { (eval echo configure:22081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22081   rm -rf conftest*
22082   ac_cv_struct_tm=time.h
22083 else
22084   echo "configure: failed program was:" >&5
22085   cat conftest.$ac_ext >&5
22086   rm -rf conftest*
22087   ac_cv_struct_tm=sys/time.h
22088 fi
22089 rm -f conftest*
22090 fi
22091
22092 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22093 if test $ac_cv_struct_tm = sys/time.h; then
22094   cat >> confdefs.h <<\EOF
22095 #define TM_IN_SYS_TIME 1
22096 EOF
22097
22098 fi
22099
22100 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22101 echo "configure:22102: checking for uid_t in sys/types.h" >&5
22102 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22103   echo $ac_n "(cached) $ac_c" 1>&6
22104 else
22105   cat > conftest.$ac_ext <<EOF
22106 #line 22107 "configure"
22107 #include "confdefs.h"
22108 #include <sys/types.h>
22109 EOF
22110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22111   egrep "uid_t" >/dev/null 2>&1; then
22112   rm -rf conftest*
22113   ac_cv_type_uid_t=yes
22114 else
22115   rm -rf conftest*
22116   ac_cv_type_uid_t=no
22117 fi
22118 rm -f conftest*
22119
22120 fi
22121
22122 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22123 if test $ac_cv_type_uid_t = no; then
22124   cat >> confdefs.h <<\EOF
22125 #define uid_t int
22126 EOF
22127
22128   cat >> confdefs.h <<\EOF
22129 #define gid_t int
22130 EOF
22131
22132 fi
22133
22134 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22135 echo "configure:22136: checking for sig_atomic_t" >&5
22136 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22137   echo $ac_n "(cached) $ac_c" 1>&6
22138 else
22139   cat > conftest.$ac_ext <<EOF
22140 #line 22141 "configure"
22141 #include "confdefs.h"
22142 #include <signal.h>
22143 int main() {
22144 sig_atomic_t atomic;
22145 ; return 0; }
22146 EOF
22147 if { (eval echo configure:22148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22148   rm -rf conftest*
22149   ol_cv_type_sig_atomic_t=yes
22150 else
22151   echo "configure: failed program was:" >&5
22152   cat conftest.$ac_ext >&5
22153   rm -rf conftest*
22154   ol_cv_type_sig_atomic_t=no
22155 fi
22156 rm -f conftest*
22157 fi
22158
22159 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22160   if test $ol_cv_type_sig_atomic_t = no; then
22161     cat >> confdefs.h <<\EOF
22162 #define sig_atomic_t int
22163 EOF
22164
22165   fi
22166  
22167
22168
22169 # test for pw_gecos in struct passwd
22170 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22171 echo "configure:22172: checking struct passwd for pw_gecos" >&5
22172 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22173   echo $ac_n "(cached) $ac_c" 1>&6
22174 else
22175   
22176         cat > conftest.$ac_ext <<EOF
22177 #line 22178 "configure"
22178 #include "confdefs.h"
22179 #include <pwd.h>
22180 int main() {
22181
22182         struct passwd pwd;
22183         pwd.pw_gecos = pwd.pw_name;
22184
22185 ; return 0; }
22186 EOF
22187 if { (eval echo configure:22188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22188   rm -rf conftest*
22189   ol_cv_struct_passwd_pw_gecos=yes
22190 else
22191   echo "configure: failed program was:" >&5
22192   cat conftest.$ac_ext >&5
22193   rm -rf conftest*
22194   ol_cv_struct_passwd_pw_gecos=no
22195 fi
22196 rm -f conftest*
22197 fi
22198
22199 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22200 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22201         cat >> confdefs.h <<\EOF
22202 #define HAVE_PW_GECOS 1
22203 EOF
22204
22205 fi
22206
22207 # test for pw_passwd in struct passwd
22208 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22209 echo "configure:22210: checking struct passwd for pw_passwd" >&5
22210 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22211   echo $ac_n "(cached) $ac_c" 1>&6
22212 else
22213   
22214         cat > conftest.$ac_ext <<EOF
22215 #line 22216 "configure"
22216 #include "confdefs.h"
22217 #include <pwd.h>
22218 int main() {
22219
22220         struct passwd pwd;
22221         pwd.pw_passwd = pwd.pw_name;
22222
22223 ; return 0; }
22224 EOF
22225 if { (eval echo configure:22226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22226   rm -rf conftest*
22227   ol_cv_struct_passwd_pw_passwd=yes
22228 else
22229   echo "configure: failed program was:" >&5
22230   cat conftest.$ac_ext >&5
22231   rm -rf conftest*
22232   ol_cv_struct_passwd_pw_passwd=no
22233 fi
22234 rm -f conftest*
22235 fi
22236
22237 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22238 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22239         cat >> confdefs.h <<\EOF
22240 #define HAVE_PW_PASSWD 1
22241 EOF
22242
22243 fi
22244
22245
22246 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22247 echo "configure:22248: checking if toupper() requires islower()" >&5
22248 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22249   echo $ac_n "(cached) $ac_c" 1>&6
22250 else
22251   
22252         if test "$cross_compiling" = yes; then
22253   ol_cv_c_upper_lower=safe
22254 else
22255   cat > conftest.$ac_ext <<EOF
22256 #line 22257 "configure"
22257 #include "confdefs.h"
22258
22259 #include <ctype.h>
22260 main()
22261 {
22262         if ('C' == toupper('C'))
22263                 exit(0);
22264         else
22265                 exit(1);
22266 }
22267 EOF
22268 if { (eval echo configure:22269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22269 then
22270   ol_cv_c_upper_lower=no
22271 else
22272   echo "configure: failed program was:" >&5
22273   cat conftest.$ac_ext >&5
22274   rm -fr conftest*
22275   ol_cv_c_upper_lower=yes
22276 fi
22277 rm -fr conftest*
22278 fi
22279
22280 fi
22281
22282 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22283 if test $ol_cv_c_upper_lower != no ; then
22284         cat >> confdefs.h <<\EOF
22285 #define C_UPPER_LOWER 1
22286 EOF
22287
22288 fi
22289
22290 echo $ac_n "checking for working const""... $ac_c" 1>&6
22291 echo "configure:22292: checking for working const" >&5
22292 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22293   echo $ac_n "(cached) $ac_c" 1>&6
22294 else
22295   cat > conftest.$ac_ext <<EOF
22296 #line 22297 "configure"
22297 #include "confdefs.h"
22298
22299 int main() {
22300
22301 /* Ultrix mips cc rejects this.  */
22302 typedef int charset[2]; const charset x;
22303 /* SunOS 4.1.1 cc rejects this.  */
22304 char const *const *ccp;
22305 char **p;
22306 /* NEC SVR4.0.2 mips cc rejects this.  */
22307 struct point {int x, y;};
22308 static struct point const zero = {0,0};
22309 /* AIX XL C 1.02.0.0 rejects this.
22310    It does not let you subtract one const X* pointer from another in an arm
22311    of an if-expression whose if-part is not a constant expression */
22312 const char *g = "string";
22313 ccp = &g + (g ? g-g : 0);
22314 /* HPUX 7.0 cc rejects these. */
22315 ++ccp;
22316 p = (char**) ccp;
22317 ccp = (char const *const *) p;
22318 { /* SCO 3.2v4 cc rejects this.  */
22319   char *t;
22320   char const *s = 0 ? (char *) 0 : (char const *) 0;
22321
22322   *t++ = 0;
22323 }
22324 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22325   int x[] = {25, 17};
22326   const int *foo = &x[0];
22327   ++foo;
22328 }
22329 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22330   typedef const int *iptr;
22331   iptr p = 0;
22332   ++p;
22333 }
22334 { /* AIX XL C 1.02.0.0 rejects this saying
22335      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22336   struct s { int j; const int *ap[3]; };
22337   struct s *b; b->j = 5;
22338 }
22339 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22340   const int foo = 10;
22341 }
22342
22343 ; return 0; }
22344 EOF
22345 if { (eval echo configure:22346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22346   rm -rf conftest*
22347   ac_cv_c_const=yes
22348 else
22349   echo "configure: failed program was:" >&5
22350   cat conftest.$ac_ext >&5
22351   rm -rf conftest*
22352   ac_cv_c_const=no
22353 fi
22354 rm -f conftest*
22355 fi
22356
22357 echo "$ac_t""$ac_cv_c_const" 1>&6
22358 if test $ac_cv_c_const = no; then
22359   cat >> confdefs.h <<\EOF
22360 #define const 
22361 EOF
22362
22363 fi
22364
22365 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22366 echo "configure:22367: checking if compiler understands volatile" >&5
22367 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22368   echo $ac_n "(cached) $ac_c" 1>&6
22369 else
22370   cat > conftest.$ac_ext <<EOF
22371 #line 22372 "configure"
22372 #include "confdefs.h"
22373 int x, y, z;
22374 int main() {
22375 volatile int a; int * volatile b = x ? &y : &z;
22376       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22377       *b = 0;
22378 ; return 0; }
22379 EOF
22380 if { (eval echo configure:22381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22381   rm -rf conftest*
22382   ol_cv_c_volatile=yes
22383 else
22384   echo "configure: failed program was:" >&5
22385   cat conftest.$ac_ext >&5
22386   rm -rf conftest*
22387   ol_cv_c_volatile=no
22388 fi
22389 rm -f conftest*
22390 fi
22391
22392 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22393   if test $ol_cv_c_volatile = yes; then
22394     : 
22395   else
22396     cat >> confdefs.h <<\EOF
22397 #define volatile 
22398 EOF
22399
22400   fi
22401  
22402
22403 if test $cross_compiling = yes ; then
22404         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22405         cat >> confdefs.h <<\EOF
22406 #define CROSS_COMPILING 1
22407 EOF
22408
22409 else
22410         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22411 echo "configure:22412: checking whether byte ordering is bigendian" >&5
22412 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22413   echo $ac_n "(cached) $ac_c" 1>&6
22414 else
22415   ac_cv_c_bigendian=unknown
22416 # See if sys/param.h defines the BYTE_ORDER macro.
22417 cat > conftest.$ac_ext <<EOF
22418 #line 22419 "configure"
22419 #include "confdefs.h"
22420 #include <sys/types.h>
22421 #include <sys/param.h>
22422 int main() {
22423
22424 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22425  bogus endian macros
22426 #endif
22427 ; return 0; }
22428 EOF
22429 if { (eval echo configure:22430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22430   rm -rf conftest*
22431   # It does; now see whether it defined to BIG_ENDIAN or not.
22432 cat > conftest.$ac_ext <<EOF
22433 #line 22434 "configure"
22434 #include "confdefs.h"
22435 #include <sys/types.h>
22436 #include <sys/param.h>
22437 int main() {
22438
22439 #if BYTE_ORDER != BIG_ENDIAN
22440  not big endian
22441 #endif
22442 ; return 0; }
22443 EOF
22444 if { (eval echo configure:22445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22445   rm -rf conftest*
22446   ac_cv_c_bigendian=yes
22447 else
22448   echo "configure: failed program was:" >&5
22449   cat conftest.$ac_ext >&5
22450   rm -rf conftest*
22451   ac_cv_c_bigendian=no
22452 fi
22453 rm -f conftest*
22454 else
22455   echo "configure: failed program was:" >&5
22456   cat conftest.$ac_ext >&5
22457 fi
22458 rm -f conftest*
22459 if test $ac_cv_c_bigendian = unknown; then
22460 if test "$cross_compiling" = yes; then
22461     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22462 else
22463   cat > conftest.$ac_ext <<EOF
22464 #line 22465 "configure"
22465 #include "confdefs.h"
22466 main () {
22467   /* Are we little or big endian?  From Harbison&Steele.  */
22468   union
22469   {
22470     long l;
22471     char c[sizeof (long)];
22472   } u;
22473   u.l = 1;
22474   exit (u.c[sizeof (long) - 1] == 1);
22475 }
22476 EOF
22477 if { (eval echo configure:22478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22478 then
22479   ac_cv_c_bigendian=no
22480 else
22481   echo "configure: failed program was:" >&5
22482   cat conftest.$ac_ext >&5
22483   rm -fr conftest*
22484   ac_cv_c_bigendian=yes
22485 fi
22486 rm -fr conftest*
22487 fi
22488
22489 fi
22490 fi
22491
22492 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22493 if test $ac_cv_c_bigendian = yes; then
22494   cat >> confdefs.h <<\EOF
22495 #define WORDS_BIGENDIAN 1
22496 EOF
22497
22498 fi
22499
22500 fi
22501
22502 echo $ac_n "checking size of short""... $ac_c" 1>&6
22503 echo "configure:22504: checking size of short" >&5 
22504 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22505   echo $ac_n "(cached) $ac_c" 1>&6
22506 else
22507   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22508   cat > conftest.$ac_ext <<EOF
22509 #line 22510 "configure"
22510 #include "confdefs.h"
22511 #include "confdefs.h" 
22512 #include <sys/types.h> 
22513  
22514
22515 int main() {
22516 switch (0) case 0: case (sizeof (short) == $ac_size):;
22517 ; return 0; }
22518 EOF
22519 if { (eval echo configure:22520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22520   rm -rf conftest*
22521   ac_cv_sizeof_short=$ac_size
22522 else
22523   echo "configure: failed program was:" >&5
22524   cat conftest.$ac_ext >&5
22525 fi
22526 rm -f conftest* 
22527   if test x$ac_cv_sizeof_short != x ; then break; fi 
22528 done 
22529
22530 fi
22531  
22532 if test x$ac_cv_sizeof_short = x ; then 
22533   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22534 fi 
22535 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22536 cat >> confdefs.h <<EOF
22537 #define SIZEOF_SHORT $ac_cv_sizeof_short
22538 EOF
22539  
22540  
22541 echo $ac_n "checking size of int""... $ac_c" 1>&6
22542 echo "configure:22543: checking size of int" >&5 
22543 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22544   echo $ac_n "(cached) $ac_c" 1>&6
22545 else
22546   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22547   cat > conftest.$ac_ext <<EOF
22548 #line 22549 "configure"
22549 #include "confdefs.h"
22550 #include "confdefs.h" 
22551 #include <sys/types.h> 
22552  
22553
22554 int main() {
22555 switch (0) case 0: case (sizeof (int) == $ac_size):;
22556 ; return 0; }
22557 EOF
22558 if { (eval echo configure:22559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22559   rm -rf conftest*
22560   ac_cv_sizeof_int=$ac_size
22561 else
22562   echo "configure: failed program was:" >&5
22563   cat conftest.$ac_ext >&5
22564 fi
22565 rm -f conftest* 
22566   if test x$ac_cv_sizeof_int != x ; then break; fi 
22567 done 
22568
22569 fi
22570  
22571 if test x$ac_cv_sizeof_int = x ; then 
22572   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22573 fi 
22574 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22575 cat >> confdefs.h <<EOF
22576 #define SIZEOF_INT $ac_cv_sizeof_int
22577 EOF
22578  
22579  
22580 echo $ac_n "checking size of long""... $ac_c" 1>&6
22581 echo "configure:22582: checking size of long" >&5 
22582 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22583   echo $ac_n "(cached) $ac_c" 1>&6
22584 else
22585   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22586   cat > conftest.$ac_ext <<EOF
22587 #line 22588 "configure"
22588 #include "confdefs.h"
22589 #include "confdefs.h" 
22590 #include <sys/types.h> 
22591  
22592
22593 int main() {
22594 switch (0) case 0: case (sizeof (long) == $ac_size):;
22595 ; return 0; }
22596 EOF
22597 if { (eval echo configure:22598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22598   rm -rf conftest*
22599   ac_cv_sizeof_long=$ac_size
22600 else
22601   echo "configure: failed program was:" >&5
22602   cat conftest.$ac_ext >&5
22603 fi
22604 rm -f conftest* 
22605   if test x$ac_cv_sizeof_long != x ; then break; fi 
22606 done 
22607
22608 fi
22609  
22610 if test x$ac_cv_sizeof_long = x ; then 
22611   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22612 fi 
22613 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22614 cat >> confdefs.h <<EOF
22615 #define SIZEOF_LONG $ac_cv_sizeof_long
22616 EOF
22617  
22618
22619
22620 if test "$ac_cv_sizeof_int" -lt 4 ; then
22621         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22622
22623         cat >> confdefs.h <<\EOF
22624 #define LBER_INT_T long
22625 EOF
22626
22627 else
22628         cat >> confdefs.h <<\EOF
22629 #define LBER_INT_T int
22630 EOF
22631
22632 fi
22633
22634 cat >> confdefs.h <<\EOF
22635 #define LBER_LEN_T long
22636 EOF
22637
22638 cat >> confdefs.h <<\EOF
22639 #define LBER_SOCKET_T int
22640 EOF
22641
22642 cat >> confdefs.h <<\EOF
22643 #define LBER_TAG_T long
22644 EOF
22645
22646
22647 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22648 echo "configure:22649: checking for 8-bit clean memcmp" >&5
22649 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22650   echo $ac_n "(cached) $ac_c" 1>&6
22651 else
22652   if test "$cross_compiling" = yes; then
22653   ac_cv_func_memcmp_clean=no
22654 else
22655   cat > conftest.$ac_ext <<EOF
22656 #line 22657 "configure"
22657 #include "confdefs.h"
22658
22659 main()
22660 {
22661   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22662   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22663 }
22664
22665 EOF
22666 if { (eval echo configure:22667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22667 then
22668   ac_cv_func_memcmp_clean=yes
22669 else
22670   echo "configure: failed program was:" >&5
22671   cat conftest.$ac_ext >&5
22672   rm -fr conftest*
22673   ac_cv_func_memcmp_clean=no
22674 fi
22675 rm -fr conftest*
22676 fi
22677
22678 fi
22679
22680 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22681 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22682
22683 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22684 echo "configure:22685: checking for strftime" >&5
22685 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22686   echo $ac_n "(cached) $ac_c" 1>&6
22687 else
22688   cat > conftest.$ac_ext <<EOF
22689 #line 22690 "configure"
22690 #include "confdefs.h"
22691 /* System header to define __stub macros and hopefully few prototypes,
22692     which can conflict with char strftime(); below.  */
22693 #include <assert.h>
22694 /* Override any gcc2 internal prototype to avoid an error.  */
22695 /* We use char because int might match the return type of a gcc2
22696     builtin and then its argument prototype would still apply.  */
22697 char strftime();
22698 char (*f)();
22699
22700 int main() {
22701
22702 /* The GNU C library defines this for functions which it implements
22703     to always fail with ENOSYS.  Some functions are actually named
22704     something starting with __ and the normal name is an alias.  */
22705 #if defined (__stub_strftime) || defined (__stub___strftime)
22706 choke me
22707 #else
22708 f = strftime;
22709 #endif
22710
22711 ; return 0; }
22712 EOF
22713 if { (eval echo configure:22714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22714   rm -rf conftest*
22715   eval "ac_cv_func_strftime=yes"
22716 else
22717   echo "configure: failed program was:" >&5
22718   cat conftest.$ac_ext >&5
22719   rm -rf conftest*
22720   eval "ac_cv_func_strftime=no"
22721 fi
22722 rm -f conftest*
22723 fi
22724
22725 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22726   echo "$ac_t""yes" 1>&6
22727   cat >> confdefs.h <<\EOF
22728 #define HAVE_STRFTIME 1
22729 EOF
22730
22731 else
22732   echo "$ac_t""no" 1>&6
22733 # strftime is in -lintl on SCO UNIX.
22734 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22735 echo "configure:22736: checking for strftime in -lintl" >&5
22736 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22737 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22738   echo $ac_n "(cached) $ac_c" 1>&6
22739 else
22740   ac_save_LIBS="$LIBS"
22741 LIBS="-lintl  $LIBS"
22742 cat > conftest.$ac_ext <<EOF
22743 #line 22744 "configure"
22744 #include "confdefs.h"
22745 /* Override any gcc2 internal prototype to avoid an error.  */
22746 /* We use char because int might match the return type of a gcc2
22747     builtin and then its argument prototype would still apply.  */
22748 char strftime();
22749
22750 int main() {
22751 strftime()
22752 ; return 0; }
22753 EOF
22754 if { (eval echo configure:22755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22755   rm -rf conftest*
22756   eval "ac_cv_lib_$ac_lib_var=yes"
22757 else
22758   echo "configure: failed program was:" >&5
22759   cat conftest.$ac_ext >&5
22760   rm -rf conftest*
22761   eval "ac_cv_lib_$ac_lib_var=no"
22762 fi
22763 rm -f conftest*
22764 LIBS="$ac_save_LIBS"
22765
22766 fi
22767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22768   echo "$ac_t""yes" 1>&6
22769   cat >> confdefs.h <<\EOF
22770 #define HAVE_STRFTIME 1
22771 EOF
22772
22773 LIBS="-lintl $LIBS"
22774 else
22775   echo "$ac_t""no" 1>&6
22776 fi
22777
22778 fi
22779
22780
22781 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22782 echo "configure:22783: checking for inet_aton()" >&5
22783 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22784   echo $ac_n "(cached) $ac_c" 1>&6
22785 else
22786   cat > conftest.$ac_ext <<EOF
22787 #line 22788 "configure"
22788 #include "confdefs.h"
22789
22790 #ifdef HAVE_SYS_TYPES_H
22791 #       include <sys/types.h>
22792 #endif
22793 #ifdef HAVE_SYS_SOCKET_H
22794 #       include <sys/socket.h>
22795 #       ifdef HAVE_SYS_SELECT_H
22796 #               include <sys/select.h>
22797 #       endif
22798 #       include <netinet/in.h>
22799 #       ifdef HAVE_ARPA_INET_H
22800 #               include <arpa/inet.h>
22801 #       endif
22802 #endif
22803
22804 int main() {
22805 struct in_addr in;
22806 int rc = inet_aton( "255.255.255.255", &in );
22807 ; return 0; }
22808 EOF
22809 if { (eval echo configure:22810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22810   rm -rf conftest*
22811   ol_cv_func_inet_aton=yes
22812 else
22813   echo "configure: failed program was:" >&5
22814   cat conftest.$ac_ext >&5
22815   rm -rf conftest*
22816   ol_cv_func_inet_aton=no
22817 fi
22818 rm -f conftest*
22819 fi
22820
22821 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22822   if test $ol_cv_func_inet_aton != no; then
22823     cat >> confdefs.h <<\EOF
22824 #define HAVE_INET_ATON 1
22825 EOF
22826
22827   fi
22828  
22829
22830 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22831 echo "configure:22832: checking for _spawnlp" >&5
22832 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22833   echo $ac_n "(cached) $ac_c" 1>&6
22834 else
22835   cat > conftest.$ac_ext <<EOF
22836 #line 22837 "configure"
22837 #include "confdefs.h"
22838 /* System header to define __stub macros and hopefully few prototypes,
22839     which can conflict with char _spawnlp(); below.  */
22840 #include <assert.h>
22841 /* Override any gcc2 internal prototype to avoid an error.  */
22842 /* We use char because int might match the return type of a gcc2
22843     builtin and then its argument prototype would still apply.  */
22844 char _spawnlp();
22845 char (*f)();
22846
22847 int main() {
22848
22849 /* The GNU C library defines this for functions which it implements
22850     to always fail with ENOSYS.  Some functions are actually named
22851     something starting with __ and the normal name is an alias.  */
22852 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22853 choke me
22854 #else
22855 f = _spawnlp;
22856 #endif
22857
22858 ; return 0; }
22859 EOF
22860 if { (eval echo configure:22861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22861   rm -rf conftest*
22862   eval "ac_cv_func__spawnlp=yes"
22863 else
22864   echo "configure: failed program was:" >&5
22865   cat conftest.$ac_ext >&5
22866   rm -rf conftest*
22867   eval "ac_cv_func__spawnlp=no"
22868 fi
22869 rm -f conftest*
22870 fi
22871
22872 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22873   echo "$ac_t""yes" 1>&6
22874   cat >> confdefs.h <<\EOF
22875 #define HAVE_SPAWNLP 1
22876 EOF
22877
22878 else
22879   echo "$ac_t""no" 1>&6
22880 fi
22881
22882
22883 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22884 echo "configure:22885: checking for _snprintf" >&5
22885 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22886   echo $ac_n "(cached) $ac_c" 1>&6
22887 else
22888   cat > conftest.$ac_ext <<EOF
22889 #line 22890 "configure"
22890 #include "confdefs.h"
22891 /* System header to define __stub macros and hopefully few prototypes,
22892     which can conflict with char _snprintf(); below.  */
22893 #include <assert.h>
22894 /* Override any gcc2 internal prototype to avoid an error.  */
22895 /* We use char because int might match the return type of a gcc2
22896     builtin and then its argument prototype would still apply.  */
22897 char _snprintf();
22898 char (*f)();
22899
22900 int main() {
22901
22902 /* The GNU C library defines this for functions which it implements
22903     to always fail with ENOSYS.  Some functions are actually named
22904     something starting with __ and the normal name is an alias.  */
22905 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22906 choke me
22907 #else
22908 f = _snprintf;
22909 #endif
22910
22911 ; return 0; }
22912 EOF
22913 if { (eval echo configure:22914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22914   rm -rf conftest*
22915   eval "ac_cv_func__snprintf=yes"
22916 else
22917   echo "configure: failed program was:" >&5
22918   cat conftest.$ac_ext >&5
22919   rm -rf conftest*
22920   eval "ac_cv_func__snprintf=no"
22921 fi
22922 rm -f conftest*
22923 fi
22924
22925 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22926   echo "$ac_t""yes" 1>&6
22927   ac_cv_func_snprintf=yes
22928         cat >> confdefs.h <<\EOF
22929 #define snprintf _snprintf
22930 EOF
22931
22932
22933 else
22934   echo "$ac_t""no" 1>&6
22935 fi
22936
22937
22938 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22939 echo "configure:22940: checking for _vsnprintf" >&5
22940 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22941   echo $ac_n "(cached) $ac_c" 1>&6
22942 else
22943   cat > conftest.$ac_ext <<EOF
22944 #line 22945 "configure"
22945 #include "confdefs.h"
22946 /* System header to define __stub macros and hopefully few prototypes,
22947     which can conflict with char _vsnprintf(); below.  */
22948 #include <assert.h>
22949 /* Override any gcc2 internal prototype to avoid an error.  */
22950 /* We use char because int might match the return type of a gcc2
22951     builtin and then its argument prototype would still apply.  */
22952 char _vsnprintf();
22953 char (*f)();
22954
22955 int main() {
22956
22957 /* The GNU C library defines this for functions which it implements
22958     to always fail with ENOSYS.  Some functions are actually named
22959     something starting with __ and the normal name is an alias.  */
22960 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22961 choke me
22962 #else
22963 f = _vsnprintf;
22964 #endif
22965
22966 ; return 0; }
22967 EOF
22968 if { (eval echo configure:22969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22969   rm -rf conftest*
22970   eval "ac_cv_func__vsnprintf=yes"
22971 else
22972   echo "configure: failed program was:" >&5
22973   cat conftest.$ac_ext >&5
22974   rm -rf conftest*
22975   eval "ac_cv_func__vsnprintf=no"
22976 fi
22977 rm -f conftest*
22978 fi
22979
22980 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22981   echo "$ac_t""yes" 1>&6
22982   ac_cv_func_vsnprintf=yes
22983         cat >> confdefs.h <<\EOF
22984 #define vsnprintf _vsnprintf
22985 EOF
22986
22987
22988 else
22989   echo "$ac_t""no" 1>&6
22990 fi
22991
22992
22993 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22994 echo "configure:22995: checking for vprintf" >&5
22995 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22996   echo $ac_n "(cached) $ac_c" 1>&6
22997 else
22998   cat > conftest.$ac_ext <<EOF
22999 #line 23000 "configure"
23000 #include "confdefs.h"
23001 /* System header to define __stub macros and hopefully few prototypes,
23002     which can conflict with char vprintf(); below.  */
23003 #include <assert.h>
23004 /* Override any gcc2 internal prototype to avoid an error.  */
23005 /* We use char because int might match the return type of a gcc2
23006     builtin and then its argument prototype would still apply.  */
23007 char vprintf();
23008 char (*f)();
23009
23010 int main() {
23011
23012 /* The GNU C library defines this for functions which it implements
23013     to always fail with ENOSYS.  Some functions are actually named
23014     something starting with __ and the normal name is an alias.  */
23015 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23016 choke me
23017 #else
23018 f = vprintf;
23019 #endif
23020
23021 ; return 0; }
23022 EOF
23023 if { (eval echo configure:23024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23024   rm -rf conftest*
23025   eval "ac_cv_func_vprintf=yes"
23026 else
23027   echo "configure: failed program was:" >&5
23028   cat conftest.$ac_ext >&5
23029   rm -rf conftest*
23030   eval "ac_cv_func_vprintf=no"
23031 fi
23032 rm -f conftest*
23033 fi
23034
23035 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23036   echo "$ac_t""yes" 1>&6
23037   cat >> confdefs.h <<\EOF
23038 #define HAVE_VPRINTF 1
23039 EOF
23040
23041 else
23042   echo "$ac_t""no" 1>&6
23043 fi
23044
23045 if test "$ac_cv_func_vprintf" != yes; then
23046 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23047 echo "configure:23048: checking for _doprnt" >&5
23048 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23049   echo $ac_n "(cached) $ac_c" 1>&6
23050 else
23051   cat > conftest.$ac_ext <<EOF
23052 #line 23053 "configure"
23053 #include "confdefs.h"
23054 /* System header to define __stub macros and hopefully few prototypes,
23055     which can conflict with char _doprnt(); below.  */
23056 #include <assert.h>
23057 /* Override any gcc2 internal prototype to avoid an error.  */
23058 /* We use char because int might match the return type of a gcc2
23059     builtin and then its argument prototype would still apply.  */
23060 char _doprnt();
23061 char (*f)();
23062
23063 int main() {
23064
23065 /* The GNU C library defines this for functions which it implements
23066     to always fail with ENOSYS.  Some functions are actually named
23067     something starting with __ and the normal name is an alias.  */
23068 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23069 choke me
23070 #else
23071 f = _doprnt;
23072 #endif
23073
23074 ; return 0; }
23075 EOF
23076 if { (eval echo configure:23077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23077   rm -rf conftest*
23078   eval "ac_cv_func__doprnt=yes"
23079 else
23080   echo "configure: failed program was:" >&5
23081   cat conftest.$ac_ext >&5
23082   rm -rf conftest*
23083   eval "ac_cv_func__doprnt=no"
23084 fi
23085 rm -f conftest*
23086 fi
23087
23088 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23089   echo "$ac_t""yes" 1>&6
23090   cat >> confdefs.h <<\EOF
23091 #define HAVE_DOPRNT 1
23092 EOF
23093
23094 else
23095   echo "$ac_t""no" 1>&6
23096 fi
23097
23098 fi
23099
23100
23101 if test $ac_cv_func_vprintf = yes ; then
23102                 for ac_func in snprintf vsnprintf
23103 do
23104 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23105 echo "configure:23106: checking for $ac_func" >&5
23106 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23107   echo $ac_n "(cached) $ac_c" 1>&6
23108 else
23109   cat > conftest.$ac_ext <<EOF
23110 #line 23111 "configure"
23111 #include "confdefs.h"
23112 /* System header to define __stub macros and hopefully few prototypes,
23113     which can conflict with char $ac_func(); below.  */
23114 #include <assert.h>
23115 /* Override any gcc2 internal prototype to avoid an error.  */
23116 /* We use char because int might match the return type of a gcc2
23117     builtin and then its argument prototype would still apply.  */
23118 char $ac_func();
23119 char (*f)();
23120
23121 int main() {
23122
23123 /* The GNU C library defines this for functions which it implements
23124     to always fail with ENOSYS.  Some functions are actually named
23125     something starting with __ and the normal name is an alias.  */
23126 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23127 choke me
23128 #else
23129 f = $ac_func;
23130 #endif
23131
23132 ; return 0; }
23133 EOF
23134 if { (eval echo configure:23135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23135   rm -rf conftest*
23136   eval "ac_cv_func_$ac_func=yes"
23137 else
23138   echo "configure: failed program was:" >&5
23139   cat conftest.$ac_ext >&5
23140   rm -rf conftest*
23141   eval "ac_cv_func_$ac_func=no"
23142 fi
23143 rm -f conftest*
23144 fi
23145
23146 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23147   echo "$ac_t""yes" 1>&6
23148     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23149   cat >> confdefs.h <<EOF
23150 #define $ac_tr_func 1
23151 EOF
23152  
23153 else
23154   echo "$ac_t""no" 1>&6
23155 fi
23156 done
23157
23158 fi
23159
23160 for ac_func in \
23161         bcopy                   \
23162         closesocket             \
23163         chroot                  \
23164         endgrent                \
23165         endpwent                \
23166         fcntl                   \
23167         flock                   \
23168         fstat                   \
23169         getdtablesize   \
23170         getgrgid                \
23171         gethostname             \
23172         getpass                 \
23173         getpassphrase   \
23174         getpwuid                \
23175         getpwnam                \
23176         getspnam                \
23177         gettimeofday    \
23178         initgroups              \
23179         lockf                   \
23180         memcpy                  \
23181         memmove                 \
23182         mkstemp                 \
23183         mktemp                  \
23184         pipe                    \
23185         read                    \
23186         recv                    \
23187         recvfrom                \
23188         setpwfile               \
23189         setgid                  \
23190         setegid                 \
23191         setsid                  \
23192         setuid                  \
23193         seteuid                 \
23194         sigaction               \
23195         signal                  \
23196         sigset                  \
23197         strdup                  \
23198         strerror                \
23199         strpbrk                 \
23200         strrchr                 \
23201         strsep                  \
23202         strstr                  \
23203         strtol                  \
23204         strtoul                 \
23205         strtoq                  \
23206         strtouq                 \
23207         strtoll                 \
23208         strspn                  \
23209         sysconf                 \
23210         usleep                  \
23211         waitpid                 \
23212         wait4                   \
23213         write                   \
23214         send                    \
23215         sendmsg                 \
23216         sendto                  \
23217
23218 do
23219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23220 echo "configure:23221: checking for $ac_func" >&5
23221 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23222   echo $ac_n "(cached) $ac_c" 1>&6
23223 else
23224   cat > conftest.$ac_ext <<EOF
23225 #line 23226 "configure"
23226 #include "confdefs.h"
23227 /* System header to define __stub macros and hopefully few prototypes,
23228     which can conflict with char $ac_func(); below.  */
23229 #include <assert.h>
23230 /* Override any gcc2 internal prototype to avoid an error.  */
23231 /* We use char because int might match the return type of a gcc2
23232     builtin and then its argument prototype would still apply.  */
23233 char $ac_func();
23234 char (*f)();
23235
23236 int main() {
23237
23238 /* The GNU C library defines this for functions which it implements
23239     to always fail with ENOSYS.  Some functions are actually named
23240     something starting with __ and the normal name is an alias.  */
23241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23242 choke me
23243 #else
23244 f = $ac_func;
23245 #endif
23246
23247 ; return 0; }
23248 EOF
23249 if { (eval echo configure:23250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23250   rm -rf conftest*
23251   eval "ac_cv_func_$ac_func=yes"
23252 else
23253   echo "configure: failed program was:" >&5
23254   cat conftest.$ac_ext >&5
23255   rm -rf conftest*
23256   eval "ac_cv_func_$ac_func=no"
23257 fi
23258 rm -f conftest*
23259 fi
23260
23261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23262   echo "$ac_t""yes" 1>&6
23263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23264   cat >> confdefs.h <<EOF
23265 #define $ac_tr_func 1
23266 EOF
23267  
23268 else
23269   echo "$ac_t""no" 1>&6
23270 fi
23271 done
23272
23273
23274 for ac_func in getopt getpeereid
23275 do
23276 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23277 echo "configure:23278: checking for $ac_func" >&5
23278 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23279   echo $ac_n "(cached) $ac_c" 1>&6
23280 else
23281   cat > conftest.$ac_ext <<EOF
23282 #line 23283 "configure"
23283 #include "confdefs.h"
23284 /* System header to define __stub macros and hopefully few prototypes,
23285     which can conflict with char $ac_func(); below.  */
23286 #include <assert.h>
23287 /* Override any gcc2 internal prototype to avoid an error.  */
23288 /* We use char because int might match the return type of a gcc2
23289     builtin and then its argument prototype would still apply.  */
23290 char $ac_func();
23291 char (*f)();
23292
23293 int main() {
23294
23295 /* The GNU C library defines this for functions which it implements
23296     to always fail with ENOSYS.  Some functions are actually named
23297     something starting with __ and the normal name is an alias.  */
23298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23299 choke me
23300 #else
23301 f = $ac_func;
23302 #endif
23303
23304 ; return 0; }
23305 EOF
23306 if { (eval echo configure:23307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23307   rm -rf conftest*
23308   eval "ac_cv_func_$ac_func=yes"
23309 else
23310   echo "configure: failed program was:" >&5
23311   cat conftest.$ac_ext >&5
23312   rm -rf conftest*
23313   eval "ac_cv_func_$ac_func=no"
23314 fi
23315 rm -f conftest*
23316 fi
23317
23318 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23319   echo "$ac_t""yes" 1>&6
23320     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23321   cat >> confdefs.h <<EOF
23322 #define $ac_tr_func 1
23323 EOF
23324  
23325 else
23326   echo "$ac_t""no" 1>&6
23327 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23328 fi
23329 done
23330
23331
23332
23333 if test "$ac_cv_func_getopt" != yes; then
23334         LIBSRCS="$LIBSRCS getopt.c"
23335 fi
23336 if test "$ac_cv_func_getpeereid" != yes; then
23337         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23338 echo "configure:23339: checking for msg_accrights in msghdr" >&5
23339 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23340   echo $ac_n "(cached) $ac_c" 1>&6
23341 else
23342   cat > conftest.$ac_ext <<EOF
23343 #line 23344 "configure"
23344 #include "confdefs.h"
23345 #include <sys/socket.h>
23346 int main() {
23347 struct msghdr m; m.msg_accrightslen=0
23348 ; return 0; }
23349 EOF
23350 if { (eval echo configure:23351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23351   rm -rf conftest*
23352   ol_cv_msghdr_msg_accrights=yes
23353 else
23354   echo "configure: failed program was:" >&5
23355   cat conftest.$ac_ext >&5
23356   rm -rf conftest*
23357   ol_cv_msghdr_msg_accrights=no
23358 fi
23359 rm -f conftest*
23360         
23361 fi
23362
23363 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23364   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23365         cat >> confdefs.h <<\EOF
23366 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23367 EOF
23368
23369   fi
23370
23371         LIBSRCS="$LIBSRCS getpeereid.c"
23372 fi
23373 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23374         if test "$ac_cv_func_snprintf" != yes; then
23375                 cat >> confdefs.h <<\EOF
23376 #define snprintf ber_pvt_snprintf
23377 EOF
23378
23379         fi
23380         if test "$ac_cv_func_vsnprintf" != yes; then
23381                 cat >> confdefs.h <<\EOF
23382 #define vsnprintf ber_pvt_vsnprintf
23383 EOF
23384
23385         fi
23386 fi
23387
23388 # Check Configuration
23389 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23390 echo "configure:23391: checking declaration of sys_errlist" >&5
23391 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23392   echo $ac_n "(cached) $ac_c" 1>&6
23393 else
23394   
23395         cat > conftest.$ac_ext <<EOF
23396 #line 23397 "configure"
23397 #include "confdefs.h"
23398
23399 #include <stdio.h>
23400 #include <sys/types.h>
23401 #include <errno.h>
23402 #ifdef WINNT
23403 #include <stdlib.h>
23404 #endif 
23405 int main() {
23406 char *c = (char *) *sys_errlist
23407 ; return 0; }
23408 EOF
23409 if { (eval echo configure:23410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23410   rm -rf conftest*
23411   ol_cv_dcl_sys_errlist=yes
23412         ol_cv_have_sys_errlist=yes
23413 else
23414   echo "configure: failed program was:" >&5
23415   cat conftest.$ac_ext >&5
23416   rm -rf conftest*
23417   ol_cv_dcl_sys_errlist=no
23418 fi
23419 rm -f conftest*
23420 fi
23421
23422 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23423 #
23424 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23425 if test $ol_cv_dcl_sys_errlist = no ; then
23426         cat >> confdefs.h <<\EOF
23427 #define DECL_SYS_ERRLIST 1
23428 EOF
23429
23430
23431         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23432 echo "configure:23433: checking existence of sys_errlist" >&5
23433 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23434   echo $ac_n "(cached) $ac_c" 1>&6
23435 else
23436   
23437                 cat > conftest.$ac_ext <<EOF
23438 #line 23439 "configure"
23439 #include "confdefs.h"
23440 #include <errno.h>
23441 int main() {
23442 char *c = (char *) *sys_errlist
23443 ; return 0; }
23444 EOF
23445 if { (eval echo configure:23446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23446   rm -rf conftest*
23447   ol_cv_have_sys_errlist=yes
23448 else
23449   echo "configure: failed program was:" >&5
23450   cat conftest.$ac_ext >&5
23451   rm -rf conftest*
23452   ol_cv_have_sys_errlist=no
23453 fi
23454 rm -f conftest*
23455 fi
23456
23457 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23458 fi
23459 if test $ol_cv_have_sys_errlist = yes ; then
23460         cat >> confdefs.h <<\EOF
23461 #define HAVE_SYS_ERRLIST 1
23462 EOF
23463
23464 fi
23465
23466
23467
23468 if test "$ol_enable_slapi" != no ; then
23469                         for ac_hdr in ltdl.h
23470 do
23471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23473 echo "configure:23474: checking for $ac_hdr" >&5
23474 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23475   echo $ac_n "(cached) $ac_c" 1>&6
23476 else
23477   cat > conftest.$ac_ext <<EOF
23478 #line 23479 "configure"
23479 #include "confdefs.h"
23480 #include <$ac_hdr>
23481 EOF
23482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23483 { (eval echo configure:23484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23485 if test -z "$ac_err"; then
23486   rm -rf conftest*
23487   eval "ac_cv_header_$ac_safe=yes"
23488 else
23489   echo "$ac_err" >&5
23490   echo "configure: failed program was:" >&5
23491   cat conftest.$ac_ext >&5
23492   rm -rf conftest*
23493   eval "ac_cv_header_$ac_safe=no"
23494 fi
23495 rm -f conftest*
23496 fi
23497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23498   echo "$ac_t""yes" 1>&6
23499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23500   cat >> confdefs.h <<EOF
23501 #define $ac_tr_hdr 1
23502 EOF
23503  
23504 else
23505   echo "$ac_t""no" 1>&6
23506 fi
23507 done
23508
23509
23510         if test $ac_cv_header_ltdl_h != yes ; then
23511                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23512         fi
23513         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23514 echo "configure:23515: checking for lt_dlinit in -lltdl" >&5
23515 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23516 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23517   echo $ac_n "(cached) $ac_c" 1>&6
23518 else
23519   ac_save_LIBS="$LIBS"
23520 LIBS="-lltdl  $LIBS"
23521 cat > conftest.$ac_ext <<EOF
23522 #line 23523 "configure"
23523 #include "confdefs.h"
23524 /* Override any gcc2 internal prototype to avoid an error.  */
23525 /* We use char because int might match the return type of a gcc2
23526     builtin and then its argument prototype would still apply.  */
23527 char lt_dlinit();
23528
23529 int main() {
23530 lt_dlinit()
23531 ; return 0; }
23532 EOF
23533 if { (eval echo configure:23534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23534   rm -rf conftest*
23535   eval "ac_cv_lib_$ac_lib_var=yes"
23536 else
23537   echo "configure: failed program was:" >&5
23538   cat conftest.$ac_ext >&5
23539   rm -rf conftest*
23540   eval "ac_cv_lib_$ac_lib_var=no"
23541 fi
23542 rm -f conftest*
23543 LIBS="$ac_save_LIBS"
23544
23545 fi
23546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23547   echo "$ac_t""yes" 1>&6
23548   
23549                 SLAPI_LIBS=-lltdl
23550                 LIBSLAPI=libslapi.a
23551                 LIBSLAPITOOLS=../libslapi.a
23552                 cat >> confdefs.h <<\EOF
23553 #define HAVE_LIBLTDL 1
23554 EOF
23555
23556         
23557 else
23558   echo "$ac_t""no" 1>&6
23559 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23560 fi
23561
23562
23563         cat >> confdefs.h <<\EOF
23564 #define LDAP_SLAPI 1
23565 EOF
23566
23567 fi
23568
23569 if test "$ol_enable_debug" != no ; then
23570         cat >> confdefs.h <<\EOF
23571 #define LDAP_DEBUG 1
23572 EOF
23573
23574 fi
23575 if test "$ol_enable_syslog" = yes ; then
23576         cat >> confdefs.h <<\EOF
23577 #define LDAP_SYSLOG 1
23578 EOF
23579
23580 fi
23581 if test "$ol_link_kbind" != no ; then
23582         cat >> confdefs.h <<\EOF
23583 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23584 EOF
23585
23586 fi
23587 if test "$ol_enable_proctitle" != no ; then
23588         cat >> confdefs.h <<\EOF
23589 #define LDAP_PROCTITLE 1
23590 EOF
23591
23592 fi
23593 if test "$ol_enable_referrals" != no ; then
23594         cat >> confdefs.h <<\EOF
23595 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23596 EOF
23597
23598 fi
23599 if test "$ol_enable_local" != no; then
23600         cat >> confdefs.h <<\EOF
23601 #define LDAP_PF_LOCAL 1
23602 EOF
23603
23604 fi
23605 if test "$ol_link_ipv6" != no; then
23606         cat >> confdefs.h <<\EOF
23607 #define LDAP_PF_INET6 1
23608 EOF
23609
23610 fi
23611 if test "$ol_enable_cleartext" != no ; then
23612         cat >> confdefs.h <<\EOF
23613 #define SLAPD_CLEARTEXT 1
23614 EOF
23615
23616 fi
23617 if test "$ol_enable_crypt" != no ; then
23618         cat >> confdefs.h <<\EOF
23619 #define SLAPD_CRYPT 1
23620 EOF
23621
23622 fi
23623 if test "$ol_link_spasswd" != no ; then
23624         cat >> confdefs.h <<\EOF
23625 #define SLAPD_SPASSWD 1
23626 EOF
23627
23628 fi
23629 if test "$ol_enable_multimaster" != no ; then
23630         cat >> confdefs.h <<\EOF
23631 #define SLAPD_MULTIMASTER 1
23632 EOF
23633
23634 fi
23635 if test "$ol_enable_rlookups" != no ; then
23636         cat >> confdefs.h <<\EOF
23637 #define SLAPD_RLOOKUPS 1
23638 EOF
23639
23640 fi
23641 if test "$ol_enable_aci" != no ; then
23642         cat >> confdefs.h <<\EOF
23643 #define SLAPD_ACI_ENABLED 1
23644 EOF
23645
23646 fi
23647
23648 if test "$ol_link_modules" != no ; then
23649         cat >> confdefs.h <<\EOF
23650 #define SLAPD_MODULES 1
23651 EOF
23652
23653         BUILD_SLAPD=yes
23654         SLAPD_MODULES_LDFLAGS="-dlopen self"
23655 fi
23656
23657 cat >> confdefs.h <<\EOF
23658 #define SLAPD_MOD_STATIC 1
23659 EOF
23660
23661 cat >> confdefs.h <<\EOF
23662 #define SLAPD_MOD_DYNAMIC 2
23663 EOF
23664
23665
23666 if test "$ol_enable_bdb" != no ; then
23667         cat >> confdefs.h <<\EOF
23668 #define SLAPD_BDB 1
23669 EOF
23670
23671         BUILD_SLAPD=yes
23672         BUILD_BDB=yes
23673         if test "$ol_with_bdb_module" != static ; then
23674                 cat >> confdefs.h <<\EOF
23675 #define SLAPD_BDB_DYNAMIC 1
23676 EOF
23677
23678                 BUILD_BDB=mod
23679                 BUILD_BDB_DYNAMIC=shared
23680                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23681         else
23682                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23683         fi
23684 fi
23685
23686 if test "$ol_link_dnssrv" != no ; then
23687         cat >> confdefs.h <<\EOF
23688 #define SLAPD_DNSSRV 1
23689 EOF
23690
23691         BUILD_SLAPD=yes
23692         BUILD_DNSSRV=yes
23693         if test "$ol_with_dnssrv_module" != static ; then
23694                 cat >> confdefs.h <<\EOF
23695 #define SLAPD_DNSSRV_DYNAMIC 1
23696 EOF
23697
23698                 BUILD_DNSSRV=mod
23699                 BUILD_DNSSRV_DYNAMIC=shared
23700                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23701         else
23702                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23703         fi
23704 fi
23705
23706 if test "$ol_enable_hdb" != no ; then
23707         cat >> confdefs.h <<\EOF
23708 #define SLAPD_HDB 1
23709 EOF
23710
23711         BUILD_SLAPD=yes
23712         BUILD_HDB=yes
23713         if test "$ol_with_hdb_module" != static ; then
23714                 cat >> confdefs.h <<\EOF
23715 #define SLAPD_HDB_DYNAMIC 1
23716 EOF
23717
23718                 BUILD_HDB=mod
23719                 BUILD_HDB_DYNAMIC=shared
23720                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23721         else
23722                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23723         fi
23724 fi
23725
23726 if test "$ol_enable_ldap" != no ; then
23727         cat >> confdefs.h <<\EOF
23728 #define SLAPD_LDAP 1
23729 EOF
23730
23731         BUILD_SLAPD=yes
23732         BUILD_LDAP=yes
23733         if test "$ol_with_ldap_module" != static ; then
23734                 cat >> confdefs.h <<\EOF
23735 #define SLAPD_LDAP_DYNAMIC 1
23736 EOF
23737
23738                 BUILD_LDAP=mod
23739                 BUILD_LDAP_DYNAMIC=shared
23740                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23741         else
23742                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23743         fi
23744 fi
23745
23746 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23747         cat >> confdefs.h <<\EOF
23748 #define SLAPD_LDBM 1
23749 EOF
23750
23751         BUILD_SLAPD=yes
23752         BUILD_LDBM=yes
23753         if test "$ol_with_ldbm_module" != static ; then
23754                 cat >> confdefs.h <<\EOF
23755 #define SLAPD_LDBM_DYNAMIC 1
23756 EOF
23757
23758                 BUILD_LDBM=mod
23759                 BUILD_LDBM_DYNAMIC=shared
23760                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23761         else
23762                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23763         fi
23764 fi
23765
23766 if test "$ol_enable_meta" != no ; then
23767         if test "$ol_enable_ldap" = no ; then
23768                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23769         fi
23770         if test "$ol_enable_rewrite" = no ; then
23771                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23772         fi
23773         cat >> confdefs.h <<\EOF
23774 #define SLAPD_META 1
23775 EOF
23776
23777         BUILD_SLAPD=yes
23778         BUILD_META=yes
23779         BUILD_REWRITE=yes
23780         if test "$ol_with_meta_module" != static ; then
23781                 cat >> confdefs.h <<\EOF
23782 #define SLAPD_META_DYNAMIC 1
23783 EOF
23784
23785                 BUILD_META=mod
23786                 BUILD_META_DYNAMIC=shared
23787                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23788         else
23789                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23790         fi
23791 fi
23792
23793 if test "$ol_enable_monitor" != no ; then
23794         cat >> confdefs.h <<\EOF
23795 #define SLAPD_MONITOR 1
23796 EOF
23797
23798         BUILD_SLAPD=yes
23799         BUILD_MONITOR=yes
23800         if test "$ol_with_monitor_module" != static ; then
23801                 cat >> confdefs.h <<\EOF
23802 #define SLAPD_MONITOR_DYNAMIC 1
23803 EOF
23804
23805                 BUILD_MONITOR=mod
23806                 BUILD_MONITOR_DYNAMIC=shared
23807                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23808         else
23809                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23810         fi
23811 fi
23812
23813 if test "$ol_enable_null" != no ; then
23814         cat >> confdefs.h <<\EOF
23815 #define SLAPD_NULL 1
23816 EOF
23817
23818         BUILD_SLAPD=yes
23819         BUILD_NULL=yes
23820         if test "$ol_with_null_module" != static ; then
23821                 cat >> confdefs.h <<\EOF
23822 #define SLAPD_NULL_DYNAMIC 1
23823 EOF
23824
23825                 BUILD_NULL=mod
23826                 BUILD_NULL_DYNAMIC=shared
23827                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23828         else
23829                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23830         fi
23831 fi
23832
23833 if test "$ol_enable_passwd" != no ; then
23834         cat >> confdefs.h <<\EOF
23835 #define SLAPD_PASSWD 1
23836 EOF
23837
23838         BUILD_SLAPD=yes
23839         BUILD_PASSWD=yes
23840         if test "$ol_with_passwd_module" != static ; then
23841                 cat >> confdefs.h <<\EOF
23842 #define SLAPD_PASSWD_DYNAMIC 1
23843 EOF
23844
23845                 BUILD_PASSWD=mod
23846                 BUILD_PASSWD_DYNAMIC=shared
23847                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23848         else
23849                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23850         fi
23851 fi
23852
23853 if test "$ol_link_perl" != no ; then
23854         cat >> confdefs.h <<\EOF
23855 #define SLAPD_PERL 1
23856 EOF
23857
23858         BUILD_SLAPD=yes
23859         BUILD_PERL=yes
23860         if test "$ol_with_perl_module" != static ; then
23861                 cat >> confdefs.h <<\EOF
23862 #define SLAPD_PERL_DYNAMIC 1
23863 EOF
23864
23865                 BUILD_PERL=mod
23866                 BUILD_PERL_DYNAMIC=shared
23867                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23868         else
23869                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23870         fi
23871 fi
23872
23873 if test "$ol_enable_relay" != no ; then
23874         cat >> confdefs.h <<\EOF
23875 #define SLAPD_RELAY 1
23876 EOF
23877
23878         BUILD_SLAPD=yes
23879         BUILD_RELAY=yes
23880         if test "$ol_with_relay_module" != static ; then
23881                 cat >> confdefs.h <<\EOF
23882 #define SLAPD_RELAY_DYNAMIC 1
23883 EOF
23884
23885                 BUILD_RELAY=mod
23886                 BUILD_RELAY_DYNAMIC=shared
23887                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23888         else
23889                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23890         fi
23891 fi
23892
23893 if test "$ol_enable_shell" != no ; then
23894         if test "$ol_link_thread" != no ; then
23895                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23896         fi
23897         cat >> confdefs.h <<\EOF
23898 #define SLAPD_SHELL 1
23899 EOF
23900
23901         BUILD_SLAPD=yes
23902         BUILD_SHELL=yes
23903         if test "$ol_with_shell_module" != static ; then
23904                 cat >> confdefs.h <<\EOF
23905 #define SLAPD_SHELL_DYNAMIC 1
23906 EOF
23907
23908                 BUILD_SHELL=mod
23909                 BUILD_SHELL_DYNAMIC=shared
23910                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23911         else
23912                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23913         fi
23914 fi
23915
23916 if test "$ol_link_sql" != no ; then
23917         cat >> confdefs.h <<\EOF
23918 #define SLAPD_SQL 1
23919 EOF
23920
23921         BUILD_SLAPD=yes
23922         BUILD_SQL=yes
23923         if test "$ol_with_sql_module" != static; then
23924                 cat >> confdefs.h <<\EOF
23925 #define SLAPD_SQL_DYNAMIC 1
23926 EOF
23927
23928                 BUILD_SQL=mod
23929                 BUILD_SQL_DYNAMIC=shared
23930                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23931         else
23932                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23933         fi
23934 fi
23935
23936 if test "$ol_with_chain" != no ; then
23937         BUILD_CHAIN=$ol_with_chain
23938         if test "$ol_with_chain" = mod ; then
23939                 MFLAG=SLAPD_MOD_DYNAMIC
23940                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23941         else
23942                 MFLAG=SLAPD_MOD_STATIC
23943         fi
23944         cat >> confdefs.h <<EOF
23945 #define SLAPD_OVER_CHAIN $MFLAG
23946 EOF
23947
23948 fi
23949
23950 if test "$ol_with_denyop" != no ; then
23951         BUILD_DENYOP=$ol_with_denyop
23952         if test "$ol_with_denyop" = mod ; then
23953                 MFLAG=SLAPD_MOD_DYNAMIC
23954                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23955         else
23956                 MFLAG=SLAPD_MOD_STATIC
23957         fi
23958         cat >> confdefs.h <<EOF
23959 #define SLAPD_OVER_DENYOP $MFLAG
23960 EOF
23961
23962 fi
23963
23964 if test "$ol_with_dyngroup" != no ; then
23965         BUILD_DYNGROUP=$ol_with_dyngroup
23966         if test "$ol_with_dyngroup" = mod ; then
23967                 MFLAG=SLAPD_MOD_DYNAMIC
23968                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23969         else
23970                 MFLAG=SLAPD_MOD_STATIC
23971         fi
23972         cat >> confdefs.h <<EOF
23973 #define SLAPD_OVER_DYNGROUP $MFLAG
23974 EOF
23975
23976 fi
23977
23978 if test "$ol_with_ppolicy" != no ; then
23979         BUILD_PPOLICY=$ol_with_ppolicy
23980         if test "$ol_with_ppolicy" = mod ; then
23981                 MFLAG=SLAPD_MOD_DYNAMIC
23982                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23983         else
23984                 MFLAG=SLAPD_MOD_STATIC
23985         fi
23986         cat >> confdefs.h <<EOF
23987 #define SLAPD_OVER_PPOLICY $MFLAG
23988 EOF
23989
23990 fi
23991
23992 if test "$ol_with_proxycache" != no ; then
23993         BUILD_PROXYCACHE=$ol_with_proxycache
23994         if test "$ol_with_proxycache" = mod ; then
23995                 MFLAG=SLAPD_MOD_DYNAMIC
23996                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23997         else
23998                 MFLAG=SLAPD_MOD_STATIC
23999         fi
24000         cat >> confdefs.h <<EOF
24001 #define SLAPD_OVER_PROXYCACHE $MFLAG
24002 EOF
24003
24004 fi
24005
24006 if test "$ol_with_rwm " != no ; then
24007         BUILD_REWRITE=yes
24008         BUILD_RWM=$ol_with_rwm
24009         if test "$ol_with_rwm" = mod ; then
24010                 MFLAG=SLAPD_MOD_DYNAMIC
24011                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24012         else
24013                 MFLAG=SLAPD_MOD_STATIC
24014         fi
24015         cat >> confdefs.h <<EOF
24016 #define SLAPD_OVER_RWM $MFLAG
24017 EOF
24018
24019 fi
24020
24021 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24022         $BUILD_SLAPD = yes ; then
24023         BUILD_SLURPD=yes
24024 fi
24025
24026 if test "$ol_enable_rewrite" != no ; then
24027         cat >> confdefs.h <<\EOF
24028 #define ENABLE_REWRITE 1
24029 EOF
24030
24031         BUILD_REWRITE=yes
24032 fi
24033
24034 if test "$ol_enable_slapi" != no ; then
24035         cat >> confdefs.h <<\EOF
24036 #define ENABLE_SLAPI 1
24037 EOF
24038
24039         BUILD_SLAPI=yes
24040         SLAPD_SLAPI_DEPEND=libslapi.a
24041 fi
24042
24043
24044
24045 if test "$ac_cv_mingw32" = yes ; then
24046         PLAT=NT
24047         SLAPD_MODULES_LDFLAGS=
24048 else
24049         PLAT=UNIX
24050 fi
24051
24052 if test -z "$SLAPD_STATIC_BACKENDS"; then
24053         SLAPD_NO_STATIC='#'
24054 else
24055         SLAPD_NO_STATIC=
24056 fi
24057
24058
24059
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 # Check whether --with-xxinstall or --without-xxinstall was given.
24137 if test "${with_xxinstall+set}" = set; then
24138   withval="$with_xxinstall"
24139   :
24140 fi
24141
24142
24143
24144 trap '' 1 2 15
24145
24146 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24147
24148 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24149 # Let make expand exec_prefix.
24150 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24151
24152 # Any assignment to VPATH causes Sun make to only execute
24153 # the first set of double-colon rules, so remove it if not needed.
24154 # If there is a colon in the path, we need to keep it.
24155 if test "x$srcdir" = x.; then
24156   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24157 fi
24158
24159 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24160
24161 DEFS=-DHAVE_CONFIG_H
24162
24163 # Without the "./", some shells look in PATH for config.status.
24164 : ${CONFIG_STATUS=./config.status}
24165
24166 echo creating $CONFIG_STATUS
24167 rm -f $CONFIG_STATUS
24168 cat > $CONFIG_STATUS <<EOF
24169 #! /bin/sh
24170 # Generated automatically by configure.
24171 # Run this file to recreate the current configuration.
24172 # This directory was configured as follows,
24173 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24174 #
24175 # $0 $ac_configure_args
24176 #
24177 # Compiler output produced by configure, useful for debugging
24178 # configure, is in ./config.log if it exists.
24179
24180 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24181 for ac_option
24182 do
24183   case "\$ac_option" in
24184   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24185     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24186     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24187   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24188     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24189     exit 0 ;;
24190   -help | --help | --hel | --he | --h)
24191     echo "\$ac_cs_usage"; exit 0 ;;
24192   *) echo "\$ac_cs_usage"; exit 1 ;;
24193   esac
24194 done
24195
24196 ac_given_srcdir=$srcdir
24197 ac_given_INSTALL="$INSTALL"
24198
24199 trap 'rm -fr `echo "\
24200 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24201 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24202 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24203 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24204 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24205 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24206 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24207 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24208 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24209 include/Makefile:build/top.mk:include/Makefile.in \
24210 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24211 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24212 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24213 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24214 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24215 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24216 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24217 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24218 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24219 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24220 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24221 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24222 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24223 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24224 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24225 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24226 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24227 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24228 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24229 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24230 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24231 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24232 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24233 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24234 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24235 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24236 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24237 tests/run \
24238 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24239  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24240 EOF
24241 cat >> $CONFIG_STATUS <<EOF
24242
24243 # Protect against being on the right side of a sed subst in config.status.
24244 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24245  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24246 $ac_vpsub
24247 $extrasub
24248 s%@SHELL@%$SHELL%g
24249 s%@CFLAGS@%$CFLAGS%g
24250 s%@CPPFLAGS@%$CPPFLAGS%g
24251 s%@CXXFLAGS@%$CXXFLAGS%g
24252 s%@FFLAGS@%$FFLAGS%g
24253 s%@DEFS@%$DEFS%g
24254 s%@LDFLAGS@%$LDFLAGS%g
24255 s%@LIBS@%$LIBS%g
24256 s%@exec_prefix@%$exec_prefix%g
24257 s%@prefix@%$prefix%g
24258 s%@program_transform_name@%$program_transform_name%g
24259 s%@bindir@%$bindir%g
24260 s%@sbindir@%$sbindir%g
24261 s%@libexecdir@%$libexecdir%g
24262 s%@datadir@%$datadir%g
24263 s%@sysconfdir@%$sysconfdir%g
24264 s%@sharedstatedir@%$sharedstatedir%g
24265 s%@localstatedir@%$localstatedir%g
24266 s%@libdir@%$libdir%g
24267 s%@includedir@%$includedir%g
24268 s%@oldincludedir@%$oldincludedir%g
24269 s%@infodir@%$infodir%g
24270 s%@mandir@%$mandir%g
24271 s%@host@%$host%g
24272 s%@host_alias@%$host_alias%g
24273 s%@host_cpu@%$host_cpu%g
24274 s%@host_vendor@%$host_vendor%g
24275 s%@host_os@%$host_os%g
24276 s%@target@%$target%g
24277 s%@target_alias@%$target_alias%g
24278 s%@target_cpu@%$target_cpu%g
24279 s%@target_vendor@%$target_vendor%g
24280 s%@target_os@%$target_os%g
24281 s%@build@%$build%g
24282 s%@build_alias@%$build_alias%g
24283 s%@build_cpu@%$build_cpu%g
24284 s%@build_vendor@%$build_vendor%g
24285 s%@build_os@%$build_os%g
24286 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24287 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24288 s%@INSTALL_DATA@%$INSTALL_DATA%g
24289 s%@PACKAGE@%$PACKAGE%g
24290 s%@VERSION@%$VERSION%g
24291 s%@ACLOCAL@%$ACLOCAL%g
24292 s%@AUTOCONF@%$AUTOCONF%g
24293 s%@AUTOMAKE@%$AUTOMAKE%g
24294 s%@AUTOHEADER@%$AUTOHEADER%g
24295 s%@MAKEINFO@%$MAKEINFO%g
24296 s%@install_sh@%$install_sh%g
24297 s%@AMTAR@%$AMTAR%g
24298 s%@AWK@%$AWK%g
24299 s%@AMTARFLAGS@%$AMTARFLAGS%g
24300 s%@SET_MAKE@%$SET_MAKE%g
24301 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24302 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24303 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24304 s%@top_builddir@%$top_builddir%g
24305 s%@ldap_subdir@%$ldap_subdir%g
24306 s%@CC@%$CC%g
24307 s%@AR@%$AR%g
24308 s%@LN_S@%$LN_S%g
24309 s%@OBJEXT@%$OBJEXT%g
24310 s%@EXEEXT@%$EXEEXT%g
24311 s%@ECHO@%$ECHO%g
24312 s%@RANLIB@%$RANLIB%g
24313 s%@STRIP@%$STRIP%g
24314 s%@DLLTOOL@%$DLLTOOL%g
24315 s%@AS@%$AS%g
24316 s%@OBJDUMP@%$OBJDUMP%g
24317 s%@CPP@%$CPP%g
24318 s%@LIBTOOL@%$LIBTOOL%g
24319 s%@LN_H@%$LN_H%g
24320 s%@PERLBIN@%$PERLBIN%g
24321 s%@OL_MKDEP@%$OL_MKDEP%g
24322 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24323 s%@LTSTATIC@%$LTSTATIC%g
24324 s%@LIBOBJS@%$LIBOBJS%g
24325 s%@LIBSRCS@%$LIBSRCS%g
24326 s%@PLAT@%$PLAT%g
24327 s%@WITH_TLS@%$WITH_TLS%g
24328 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24329 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24330 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24331 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24332 s%@BUILD_BDB@%$BUILD_BDB%g
24333 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24334 s%@BUILD_HDB@%$BUILD_HDB%g
24335 s%@BUILD_LDAP@%$BUILD_LDAP%g
24336 s%@BUILD_LDBM@%$BUILD_LDBM%g
24337 s%@BUILD_META@%$BUILD_META%g
24338 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24339 s%@BUILD_NULL@%$BUILD_NULL%g
24340 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24341 s%@BUILD_RELAY@%$BUILD_RELAY%g
24342 s%@BUILD_PERL@%$BUILD_PERL%g
24343 s%@BUILD_SHELL@%$BUILD_SHELL%g
24344 s%@BUILD_SQL@%$BUILD_SQL%g
24345 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24346 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24347 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24348 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24349 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24350 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24351 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24352 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24353 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24354 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24355 s%@BUILD_RELAY_DYNAMIC@%$BUILD_RELAY_DYNAMIC%g
24356 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24357 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24358 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24359 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24360 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24361 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24362 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24363 s%@BUILD_RWM@%$BUILD_RWM%g
24364 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24365 s%@LDAP_LIBS@%$LDAP_LIBS%g
24366 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24367 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24368 s%@LDBM_LIBS@%$LDBM_LIBS%g
24369 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24370 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24371 s%@WRAP_LIBS@%$WRAP_LIBS%g
24372 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24373 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24374 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24375 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24376 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24377 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24378 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24379 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24380 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24381 s%@KRB4_LIBS@%$KRB4_LIBS%g
24382 s%@KRB5_LIBS@%$KRB5_LIBS%g
24383 s%@SASL_LIBS@%$SASL_LIBS%g
24384 s%@TLS_LIBS@%$TLS_LIBS%g
24385 s%@MODULES_LIBS@%$MODULES_LIBS%g
24386 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24387 s%@LIBSLAPI@%$LIBSLAPI%g
24388 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24389 s%@AUTH_LIBS@%$AUTH_LIBS%g
24390 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24391 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24392 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24393 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24394
24395 CEOF
24396 EOF
24397
24398 cat >> $CONFIG_STATUS <<\EOF
24399
24400 # Split the substitutions into bite-sized pieces for seds with
24401 # small command number limits, like on Digital OSF/1 and HP-UX.
24402 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24403 ac_file=1 # Number of current file.
24404 ac_beg=1 # First line for current file.
24405 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24406 ac_more_lines=:
24407 ac_sed_cmds=""
24408 while $ac_more_lines; do
24409   if test $ac_beg -gt 1; then
24410     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24411   else
24412     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24413   fi
24414   if test ! -s conftest.s$ac_file; then
24415     ac_more_lines=false
24416     rm -f conftest.s$ac_file
24417   else
24418     if test -z "$ac_sed_cmds"; then
24419       ac_sed_cmds="sed -f conftest.s$ac_file"
24420     else
24421       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24422     fi
24423     ac_file=`expr $ac_file + 1`
24424     ac_beg=$ac_end
24425     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24426   fi
24427 done
24428 if test -z "$ac_sed_cmds"; then
24429   ac_sed_cmds=cat
24430 fi
24431 EOF
24432
24433 cat >> $CONFIG_STATUS <<EOF
24434
24435 CONFIG_FILES=\${CONFIG_FILES-"\
24436 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24437 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24438 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24439 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24440 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24441 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24442 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24443 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24444 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24445 include/Makefile:build/top.mk:include/Makefile.in \
24446 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24447 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24448 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24449 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24450 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24451 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24452 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24453 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24454 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24455 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24456 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24457 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24458 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24459 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24460 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24461 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24462 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24463 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24464 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24465 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24466 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24467 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24468 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24469 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24470 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24471 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24472 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24473 tests/run \
24474 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24475 "}
24476 EOF
24477 cat >> $CONFIG_STATUS <<\EOF
24478 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24479   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24480   case "$ac_file" in
24481   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24482        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24483   *) ac_file_in="${ac_file}.in" ;;
24484   esac
24485
24486   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24487
24488   # Remove last slash and all that follows it.  Not all systems have dirname.
24489   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24490   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24491     # The file is in a subdirectory.
24492     test ! -d "$ac_dir" && mkdir "$ac_dir"
24493     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24494     # A "../" for each directory in $ac_dir_suffix.
24495     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24496   else
24497     ac_dir_suffix= ac_dots=
24498   fi
24499
24500   case "$ac_given_srcdir" in
24501   .)  srcdir=.
24502       if test -z "$ac_dots"; then top_srcdir=.
24503       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24504   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24505   *) # Relative path.
24506     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24507     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24508   esac
24509
24510   case "$ac_given_INSTALL" in
24511   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24512   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24513   esac
24514
24515   echo creating "$ac_file"
24516   rm -f "$ac_file"
24517   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24518   case "$ac_file" in
24519   *[Mm]akefile*) ac_comsub="1i\\
24520 # $configure_input" ;;
24521   *) ac_comsub= ;;
24522   esac
24523
24524   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24525   sed -e "$ac_comsub
24526 s%@configure_input@%$configure_input%g
24527 s%@srcdir@%$srcdir%g
24528 s%@top_srcdir@%$top_srcdir%g
24529 s%@INSTALL@%$INSTALL%g
24530 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24531 fi; done
24532 rm -f conftest.s*
24533
24534 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24535 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24536 #
24537 # ac_d sets the value in "#define NAME VALUE" lines.
24538 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24539 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24540 ac_dC='\3'
24541 ac_dD='%g'
24542 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24543 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24544 ac_uB='\([      ]\)%\1#\2define\3'
24545 ac_uC=' '
24546 ac_uD='\4%g'
24547 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24548 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24549 ac_eB='$%\1#\2define\3'
24550 ac_eC=' '
24551 ac_eD='%g'
24552
24553 if test "${CONFIG_HEADERS+set}" != set; then
24554 EOF
24555 cat >> $CONFIG_STATUS <<EOF
24556   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24557 EOF
24558 cat >> $CONFIG_STATUS <<\EOF
24559 fi
24560 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24561   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24562   case "$ac_file" in
24563   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24564        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24565   *) ac_file_in="${ac_file}.in" ;;
24566   esac
24567
24568   echo creating $ac_file
24569
24570   rm -f conftest.frag conftest.in conftest.out
24571   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24572   cat $ac_file_inputs > conftest.in
24573
24574 EOF
24575
24576 # Transform confdefs.h into a sed script conftest.vals that substitutes
24577 # the proper values into config.h.in to produce config.h.  And first:
24578 # Protect against being on the right side of a sed subst in config.status.
24579 # Protect against being in an unquoted here document in config.status.
24580 rm -f conftest.vals
24581 cat > conftest.hdr <<\EOF
24582 s/[\\&%]/\\&/g
24583 s%[\\$`]%\\&%g
24584 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24585 s%ac_d%ac_u%gp
24586 s%ac_u%ac_e%gp
24587 EOF
24588 sed -n -f conftest.hdr confdefs.h > conftest.vals
24589 rm -f conftest.hdr
24590
24591 # This sed command replaces #undef with comments.  This is necessary, for
24592 # example, in the case of _POSIX_SOURCE, which is predefined and required
24593 # on some systems where configure will not decide to define it.
24594 cat >> conftest.vals <<\EOF
24595 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24596 EOF
24597
24598 # Break up conftest.vals because some shells have a limit on
24599 # the size of here documents, and old seds have small limits too.
24600
24601 rm -f conftest.tail
24602 while :
24603 do
24604   ac_lines=`grep -c . conftest.vals`
24605   # grep -c gives empty output for an empty file on some AIX systems.
24606   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24607   # Write a limited-size here document to conftest.frag.
24608   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24609   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24610   echo 'CEOF
24611   sed -f conftest.frag conftest.in > conftest.out
24612   rm -f conftest.in
24613   mv conftest.out conftest.in
24614 ' >> $CONFIG_STATUS
24615   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24616   rm -f conftest.vals
24617   mv conftest.tail conftest.vals
24618 done
24619 rm -f conftest.vals
24620
24621 cat >> $CONFIG_STATUS <<\EOF
24622   rm -f conftest.frag conftest.h
24623   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24624   cat conftest.in >> conftest.h
24625   rm -f conftest.in
24626   if cmp -s $ac_file conftest.h 2>/dev/null; then
24627     echo "$ac_file is unchanged"
24628     rm -f conftest.h
24629   else
24630     # Remove last slash and all that follows it.  Not all systems have dirname.
24631       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24632       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24633       # The file is in a subdirectory.
24634       test ! -d "$ac_dir" && mkdir "$ac_dir"
24635     fi
24636     rm -f $ac_file
24637     mv conftest.h $ac_file
24638   fi
24639 fi; done
24640
24641 EOF
24642 cat >> $CONFIG_STATUS <<EOF
24643
24644 EOF
24645 cat >> $CONFIG_STATUS <<\EOF
24646
24647 chmod +x tests/run
24648 date > stamp-h
24649 echo Please run \"make depend\" to build dependencies
24650
24651 exit 0
24652 EOF
24653 chmod +x $CONFIG_STATUS
24654 rm -fr confdefs* $ac_clean_files
24655 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24656