]> git.sur5r.net Git - openldap/blob - configure
Fix disabling switches
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.527 2004/04/08 04:10:20 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
86 ac_help="$ac_help
87     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
88 ac_help="$ac_help
89     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
90 ac_help="$ac_help
91     --enable-ldap         enable ldap backend no|yes|mod [no]"
92 ac_help="$ac_help
93     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
94 ac_help="$ac_help
95     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
96 ac_help="$ac_help
97     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
98 ac_help="$ac_help
99     --enable-meta         enable metadirectory backend no|yes|mod [no]"
100 ac_help="$ac_help
101     --enable-monitor      enable monitor backend no|yes|mod [yes]"
102 ac_help="$ac_help
103     --enable-null         enable null backend no|yes|mod [no]"
104 ac_help="$ac_help
105     --enable-passwd       enable passwd backend no|yes|mod [no]"
106 ac_help="$ac_help
107     --enable-perl         enable perl backend no|yes|mod [no]"
108 ac_help="$ac_help
109     --enable-relay        enable relay backend no|yes|mod [yes]"
110 ac_help="$ac_help
111     --enable-shell        enable shell backend no|yes|mod [no]"
112 ac_help="$ac_help
113     --enable-sql          enable sql backend no|yes|mod [no]"
114 ac_help="$ac_help
115
116 SLAPD Overlay Options:"
117 ac_help="$ac_help
118     --enable-chain        LDAP Chain Response no|yes|mod [no]"
119 ac_help="$ac_help
120     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
121 ac_help="$ac_help
122     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
123 ac_help="$ac_help
124     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
125 ac_help="$ac_help
126     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
127 ac_help="$ac_help
128     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
129 ac_help="$ac_help
130
131 SLURPD (Replication Daemon) Options:"
132 ac_help="$ac_help
133   --enable-slurpd         enable building slurpd [auto]"
134 ac_help="$ac_help
135
136 Library Generation & Linking Options"
137 ac_help="$ac_help
138   --enable-static[=PKGS]  build static libraries [default=yes]"
139 ac_help="$ac_help
140   --enable-shared[=PKGS]  build shared libraries [default=yes]"
141 ac_help="$ac_help
142   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
143 ac_help="$ac_help
144   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
145
146 # Find the correct PATH separator.  Usually this is `:', but
147 # DJGPP uses `;' like DOS.
148 if test "X${PATH_SEPARATOR+set}" != Xset; then
149   UNAME=${UNAME-`uname 2>/dev/null`}
150   case X$UNAME in
151     *-DOS) lt_cv_sys_path_separator=';' ;;
152     *)     lt_cv_sys_path_separator=':' ;;
153   esac
154   PATH_SEPARATOR=$lt_cv_sys_path_separator
155 fi
156
157
158 # Check that we are running under the correct shell.
159 SHELL=${CONFIG_SHELL-/bin/sh}
160
161 case X$ECHO in
162 X*--fallback-echo)
163   # Remove one level of quotation (which was required for Make).
164   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
165   ;;
166 esac
167
168 echo=${ECHO-echo}
169 if test "X$1" = X--no-reexec; then
170   # Discard the --no-reexec flag, and continue.
171   shift
172 elif test "X$1" = X--fallback-echo; then
173   # Avoid inline document here, it may be left over
174   :
175 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
176   # Yippee, $echo works!
177   :
178 else
179   # Restart under the correct shell.
180   exec $SHELL "$0" --no-reexec ${1+"$@"}
181 fi
182
183 if test "X$1" = X--fallback-echo; then
184   # used as fallback echo
185   shift
186   cat <<EOF
187
188 EOF
189   exit 0
190 fi
191
192 # The HP-UX ksh and POSIX shell print the target directory to stdout
193 # if CDPATH is set.
194 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
195
196 if test -z "$ECHO"; then
197 if test "X${echo_test_string+set}" != Xset; then
198 # find a string as large as possible, as long as the shell can cope with it
199   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
200     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
201     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
202        echo_test_string="`eval $cmd`" &&
203        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
204     then
205       break
206     fi
207   done
208 fi
209
210 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
211    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
212    test "X$echo_testing_string" = "X$echo_test_string"; then
213   :
214 else
215   # The Solaris, AIX, and Digital Unix default echo programs unquote
216   # backslashes.  This makes it impossible to quote backslashes using
217   #   echo "$something" | sed 's/\\/\\\\/g'
218   #
219   # So, first we look for a working echo in the user's PATH.
220
221   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
222   for dir in $PATH /usr/ucb; do
223     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
224        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
225        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
226        test "X$echo_testing_string" = "X$echo_test_string"; then
227       echo="$dir/echo"
228       break
229     fi
230   done
231   IFS="$save_ifs"
232
233   if test "X$echo" = Xecho; then
234     # We didn't find a better echo, so look for alternatives.
235     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
236        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
237        test "X$echo_testing_string" = "X$echo_test_string"; then
238       # This shell has a builtin print -r that does the trick.
239       echo='print -r'
240     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
241          test "X$CONFIG_SHELL" != X/bin/ksh; then
242       # If we have ksh, try running configure again with it.
243       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
244       export ORIGINAL_CONFIG_SHELL
245       CONFIG_SHELL=/bin/ksh
246       export CONFIG_SHELL
247       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
248     else
249       # Try using printf.
250       echo='printf %s\n'
251       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
252          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
253          test "X$echo_testing_string" = "X$echo_test_string"; then
254         # Cool, printf works
255         :
256       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
257            test "X$echo_testing_string" = 'X\t' &&
258            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
259            test "X$echo_testing_string" = "X$echo_test_string"; then
260         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
261         export CONFIG_SHELL
262         SHELL="$CONFIG_SHELL"
263         export SHELL
264         echo="$CONFIG_SHELL $0 --fallback-echo"
265       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
266            test "X$echo_testing_string" = 'X\t' &&
267            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
268            test "X$echo_testing_string" = "X$echo_test_string"; then
269         echo="$CONFIG_SHELL $0 --fallback-echo"
270       else
271         # maybe with a smaller string...
272         prev=:
273
274         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
275           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
276           then
277             break
278           fi
279           prev="$cmd"
280         done
281
282         if test "$prev" != 'sed 50q "$0"'; then
283           echo_test_string=`eval $prev`
284           export echo_test_string
285           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
286         else
287           # Oops.  We lost completely, so just stick with echo.
288           echo=echo
289         fi
290       fi
291     fi
292   fi
293 fi
294 fi
295
296 # Copy echo and quote the copy suitably for passing to libtool from
297 # the Makefile, instead of quoting the original, which is used later.
298 ECHO=$echo
299 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
300    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
301 fi
302
303
304 ac_help="$ac_help
305   --disable-libtool-lock  avoid locking (might break parallel builds)"
306 ac_help="$ac_help
307   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
308 ac_help="$ac_help
309
310 See INSTALL file for further details."
311
312 # Initialize some variables set by options.
313 # The variables have the same names as the options, with
314 # dashes changed to underlines.
315 build=NONE
316 cache_file=./config.cache
317 exec_prefix=NONE
318 host=NONE
319 no_create=
320 nonopt=NONE
321 no_recursion=
322 prefix=NONE
323 program_prefix=NONE
324 program_suffix=NONE
325 program_transform_name=s,x,x,
326 silent=
327 site=
328 srcdir=
329 target=NONE
330 verbose=
331 x_includes=NONE
332 x_libraries=NONE
333 bindir='${exec_prefix}/bin'
334 sbindir='${exec_prefix}/sbin'
335 libexecdir='${exec_prefix}/libexec'
336 datadir='${prefix}/share'
337 sysconfdir='${prefix}/etc'
338 sharedstatedir='${prefix}/com'
339 localstatedir='${prefix}/var'
340 libdir='${exec_prefix}/lib'
341 includedir='${prefix}/include'
342 oldincludedir='/usr/include'
343 infodir='${prefix}/info'
344 mandir='${prefix}/man'
345
346 # Initialize some other variables.
347 subdirs=
348 MFLAGS= MAKEFLAGS=
349 SHELL=${CONFIG_SHELL-/bin/sh}
350 # Maximum number of lines to put in a shell here document.
351 ac_max_here_lines=12
352
353 ac_prev=
354 for ac_option
355 do
356
357   # If the previous option needs an argument, assign it.
358   if test -n "$ac_prev"; then
359     eval "$ac_prev=\$ac_option"
360     ac_prev=
361     continue
362   fi
363
364   case "$ac_option" in
365   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
366   *) ac_optarg= ;;
367   esac
368
369   # Accept the important Cygnus configure options, so we can diagnose typos.
370
371   case "$ac_option" in
372
373   -bindir | --bindir | --bindi | --bind | --bin | --bi)
374     ac_prev=bindir ;;
375   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
376     bindir="$ac_optarg" ;;
377
378   -build | --build | --buil | --bui | --bu)
379     ac_prev=build ;;
380   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
381     build="$ac_optarg" ;;
382
383   -cache-file | --cache-file | --cache-fil | --cache-fi \
384   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
385     ac_prev=cache_file ;;
386   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
387   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
388     cache_file="$ac_optarg" ;;
389
390   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391     ac_prev=datadir ;;
392   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393   | --da=*)
394     datadir="$ac_optarg" ;;
395
396   -disable-* | --disable-*)
397     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
398     # Reject names that are not valid shell variable names.
399     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
400       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
401     fi
402     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
403     eval "enable_${ac_feature}=no" ;;
404
405   -enable-* | --enable-*)
406     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
407     # Reject names that are not valid shell variable names.
408     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
409       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
410     fi
411     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
412     case "$ac_option" in
413       *=*) ;;
414       *) ac_optarg=yes ;;
415     esac
416     eval "enable_${ac_feature}='$ac_optarg'" ;;
417
418   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420   | --exec | --exe | --ex)
421     ac_prev=exec_prefix ;;
422   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424   | --exec=* | --exe=* | --ex=*)
425     exec_prefix="$ac_optarg" ;;
426
427   -gas | --gas | --ga | --g)
428     # Obsolete; use --with-gas.
429     with_gas=yes ;;
430
431   -help | --help | --hel | --he)
432     # Omit some internal or obsolete options to make the list less imposing.
433     # This message is too long to be a string in the A/UX 3.1 sh.
434     cat << EOF
435 Usage: configure [options] [host]
436 Options: [defaults in brackets after descriptions]
437 Configuration:
438   --cache-file=FILE       cache test results in FILE
439   --help                  print this message
440   --no-create             do not create output files
441   --quiet, --silent       do not print \`checking...' messages
442   --version               print the version of autoconf that created configure
443 Directory and file names:
444   --prefix=PREFIX         install architecture-independent files in PREFIX
445                           [$ac_default_prefix]
446   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
447                           [same as prefix]
448   --bindir=DIR            user executables in DIR [EPREFIX/bin]
449   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
450   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
451   --datadir=DIR           read-only architecture-independent data in DIR
452                           [PREFIX/share]
453   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
454   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
455                           [PREFIX/com]
456   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
457   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
458   --includedir=DIR        C header files in DIR [PREFIX/include]
459   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
460   --infodir=DIR           info documentation in DIR [PREFIX/info]
461   --mandir=DIR            man documentation in DIR [PREFIX/man]
462   --srcdir=DIR            find the sources in DIR [configure dir or ..]
463   --program-prefix=PREFIX prepend PREFIX to installed program names
464   --program-suffix=SUFFIX append SUFFIX to installed program names
465   --program-transform-name=PROGRAM
466                           run sed PROGRAM on installed program names
467 EOF
468     cat << EOF
469 Host type:
470   --build=BUILD           configure for building on BUILD [BUILD=HOST]
471   --host=HOST             configure for HOST [guessed]
472   --target=TARGET         configure for TARGET [TARGET=HOST]
473 Features and packages:
474   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
475   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
476   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
477   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
478   --x-includes=DIR        X include files are in DIR
479   --x-libraries=DIR       X library files are in DIR
480 EOF
481     if test -n "$ac_help"; then
482       echo "--enable and --with options recognized:$ac_help"
483     fi
484     exit 0 ;;
485
486   -host | --host | --hos | --ho)
487     ac_prev=host ;;
488   -host=* | --host=* | --hos=* | --ho=*)
489     host="$ac_optarg" ;;
490
491   -includedir | --includedir | --includedi | --included | --include \
492   | --includ | --inclu | --incl | --inc)
493     ac_prev=includedir ;;
494   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
495   | --includ=* | --inclu=* | --incl=* | --inc=*)
496     includedir="$ac_optarg" ;;
497
498   -infodir | --infodir | --infodi | --infod | --info | --inf)
499     ac_prev=infodir ;;
500   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
501     infodir="$ac_optarg" ;;
502
503   -libdir | --libdir | --libdi | --libd)
504     ac_prev=libdir ;;
505   -libdir=* | --libdir=* | --libdi=* | --libd=*)
506     libdir="$ac_optarg" ;;
507
508   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
509   | --libexe | --libex | --libe)
510     ac_prev=libexecdir ;;
511   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
512   | --libexe=* | --libex=* | --libe=*)
513     libexecdir="$ac_optarg" ;;
514
515   -localstatedir | --localstatedir | --localstatedi | --localstated \
516   | --localstate | --localstat | --localsta | --localst \
517   | --locals | --local | --loca | --loc | --lo)
518     ac_prev=localstatedir ;;
519   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
520   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
521   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
522     localstatedir="$ac_optarg" ;;
523
524   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
525     ac_prev=mandir ;;
526   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
527     mandir="$ac_optarg" ;;
528
529   -nfp | --nfp | --nf)
530     # Obsolete; use --without-fp.
531     with_fp=no ;;
532
533   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
534   | --no-cr | --no-c)
535     no_create=yes ;;
536
537   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
538   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
539     no_recursion=yes ;;
540
541   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
542   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
543   | --oldin | --oldi | --old | --ol | --o)
544     ac_prev=oldincludedir ;;
545   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
546   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
547   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
548     oldincludedir="$ac_optarg" ;;
549
550   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
551     ac_prev=prefix ;;
552   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
553     prefix="$ac_optarg" ;;
554
555   -program-prefix | --program-prefix | --program-prefi | --program-pref \
556   | --program-pre | --program-pr | --program-p)
557     ac_prev=program_prefix ;;
558   -program-prefix=* | --program-prefix=* | --program-prefi=* \
559   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
560     program_prefix="$ac_optarg" ;;
561
562   -program-suffix | --program-suffix | --program-suffi | --program-suff \
563   | --program-suf | --program-su | --program-s)
564     ac_prev=program_suffix ;;
565   -program-suffix=* | --program-suffix=* | --program-suffi=* \
566   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
567     program_suffix="$ac_optarg" ;;
568
569   -program-transform-name | --program-transform-name \
570   | --program-transform-nam | --program-transform-na \
571   | --program-transform-n | --program-transform- \
572   | --program-transform | --program-transfor \
573   | --program-transfo | --program-transf \
574   | --program-trans | --program-tran \
575   | --progr-tra | --program-tr | --program-t)
576     ac_prev=program_transform_name ;;
577   -program-transform-name=* | --program-transform-name=* \
578   | --program-transform-nam=* | --program-transform-na=* \
579   | --program-transform-n=* | --program-transform-=* \
580   | --program-transform=* | --program-transfor=* \
581   | --program-transfo=* | --program-transf=* \
582   | --program-trans=* | --program-tran=* \
583   | --progr-tra=* | --program-tr=* | --program-t=*)
584     program_transform_name="$ac_optarg" ;;
585
586   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
587   | -silent | --silent | --silen | --sile | --sil)
588     silent=yes ;;
589
590   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
591     ac_prev=sbindir ;;
592   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
593   | --sbi=* | --sb=*)
594     sbindir="$ac_optarg" ;;
595
596   -sharedstatedir | --sharedstatedir | --sharedstatedi \
597   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
598   | --sharedst | --shareds | --shared | --share | --shar \
599   | --sha | --sh)
600     ac_prev=sharedstatedir ;;
601   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
602   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
603   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
604   | --sha=* | --sh=*)
605     sharedstatedir="$ac_optarg" ;;
606
607   -site | --site | --sit)
608     ac_prev=site ;;
609   -site=* | --site=* | --sit=*)
610     site="$ac_optarg" ;;
611
612   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
613     ac_prev=srcdir ;;
614   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
615     srcdir="$ac_optarg" ;;
616
617   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
618   | --syscon | --sysco | --sysc | --sys | --sy)
619     ac_prev=sysconfdir ;;
620   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
621   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
622     sysconfdir="$ac_optarg" ;;
623
624   -target | --target | --targe | --targ | --tar | --ta | --t)
625     ac_prev=target ;;
626   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
627     target="$ac_optarg" ;;
628
629   -v | -verbose | --verbose | --verbos | --verbo | --verb)
630     verbose=yes ;;
631
632   -version | --version | --versio | --versi | --vers)
633     echo "configure generated by autoconf version 2.13.1"
634     exit 0 ;;
635
636   -with-* | --with-*)
637     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
638     # Reject names that are not valid shell variable names.
639     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
640       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
641     fi
642     ac_package=`echo $ac_package| sed 's/-/_/g'`
643     case "$ac_option" in
644       *=*) ;;
645       *) ac_optarg=yes ;;
646     esac
647     eval "with_${ac_package}='$ac_optarg'" ;;
648
649   -without-* | --without-*)
650     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
651     # Reject names that are not valid shell variable names.
652     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
653       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
654     fi
655     ac_package=`echo $ac_package| sed 's/-/_/g'`
656     eval "with_${ac_package}=no" ;;
657
658   --x)
659     # Obsolete; use --with-x.
660     with_x=yes ;;
661
662   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
663   | --x-incl | --x-inc | --x-in | --x-i)
664     ac_prev=x_includes ;;
665   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
666   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
667     x_includes="$ac_optarg" ;;
668
669   -x-libraries | --x-libraries | --x-librarie | --x-librari \
670   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
671     ac_prev=x_libraries ;;
672   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
673   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
674     x_libraries="$ac_optarg" ;;
675
676   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
677     ;;
678
679   *)
680     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
681       echo "configure: warning: $ac_option: invalid host type" 1>&2
682     fi
683     if test "x$nonopt" != xNONE; then
684       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
685     fi
686     nonopt="$ac_option"
687     ;;
688
689   esac
690 done
691
692 if test -n "$ac_prev"; then
693   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
694 fi
695
696 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
697
698 # File descriptor usage:
699 # 0 standard input
700 # 1 file creation
701 # 2 errors and warnings
702 # 3 some systems may open it to /dev/tty
703 # 4 used on the Kubota Titan
704 # 6 checking for... messages and results
705 # 5 compiler messages saved in config.log
706 if test "$silent" = yes; then
707   exec 6>/dev/null
708 else
709   exec 6>&1
710 fi
711 exec 5>./config.log
712
713 echo "\
714 This file contains any messages produced by compilers while
715 running configure, to aid debugging if configure makes a mistake.
716 " 1>&5
717
718 # Strip out --no-create and --no-recursion so they do not pile up.
719 # Also quote any args containing shell metacharacters.
720 ac_configure_args=
721 for ac_arg
722 do
723   case "$ac_arg" in
724   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
725   | --no-cr | --no-c) ;;
726   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
727   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
728   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
729   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
730   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
731   esac
732 done
733
734 # NLS nuisances.
735 # Only set these to C if already set.  These must not be set unconditionally
736 # because not all systems understand e.g. LANG=C (notably SCO).
737 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
738 # Non-C LC_CTYPE values break the ctype check.
739 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
740 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
741 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
742 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
743
744 # confdefs.h avoids OS command line length limits that DEFS can exceed.
745 rm -rf conftest* confdefs.h
746 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
747 echo > confdefs.h
748
749 # A filename unique to this package, relative to the directory that
750 # configure is in, which we can look for to find out if srcdir is correct.
751 ac_unique_file=build/version.sh
752
753 # Find the source files, if location was not specified.
754 if test -z "$srcdir"; then
755   ac_srcdir_defaulted=yes
756   # Try the directory containing this script, then its parent.
757   ac_prog=$0
758   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
759   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
760   srcdir=$ac_confdir
761   if test ! -r $srcdir/$ac_unique_file; then
762     srcdir=..
763   fi
764 else
765   ac_srcdir_defaulted=no
766 fi
767 if test ! -r $srcdir/$ac_unique_file; then
768   if test "$ac_srcdir_defaulted" = yes; then
769     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
770   else
771     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
772   fi
773 fi
774 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
775
776 # Prefer explicitly selected file to automatically selected ones.
777 if test -z "$CONFIG_SITE"; then
778   if test "x$prefix" != xNONE; then
779     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
780   else
781     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
782   fi
783 fi
784 for ac_site_file in $CONFIG_SITE; do
785   if test -r "$ac_site_file"; then
786     echo "loading site script $ac_site_file"
787     . "$ac_site_file"
788   fi
789 done
790
791
792 ac_ext=c
793 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
794 ac_cpp='$CPP $CPPFLAGS'
795 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
796 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
797 cross_compiling=$ac_cv_prog_cc_cross
798
799 ac_exeext=
800 ac_objext=o
801 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
802   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
803   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
804     ac_n= ac_c='
805 ' ac_t='        '
806   else
807     ac_n=-n ac_c= ac_t=
808   fi
809 else
810   ac_n= ac_c='\c' ac_t=
811 fi
812
813
814 # set unset (borrowed from autoconf 2.49c)
815 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
816   ol_unset=unset
817 else
818   ol_unset=false
819 fi
820 # unset CDPATH
821 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
822
823 ac_aux_dir=
824 for ac_dir in build $srcdir/build; do
825   if test -f $ac_dir/install-sh; then
826     ac_aux_dir=$ac_dir
827     ac_install_sh="$ac_aux_dir/install-sh -c"
828     break
829   elif test -f $ac_dir/install.sh; then
830     ac_aux_dir=$ac_dir
831     ac_install_sh="$ac_aux_dir/install.sh -c"
832     break
833   elif test -f $ac_dir/shtool; then
834     ac_aux_dir=$ac_dir
835     ac_install_sh="$ac_aux_dir/shtool install -c"
836     break
837   fi
838 done
839 if test -z "$ac_aux_dir"; then
840   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
841 fi
842 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
843 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
844 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
845
846 eval `$ac_aux_dir/version.sh`
847 if test -z "$OL_STRING"; then
848         { echo "configure: error: could not determine version" 1>&2; exit 1; }
849 fi
850
851 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
852         ac_cv_shtool="$ac_aux_dir/shtool"
853 else
854         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
855 fi
856
857 SHTOOL="$ac_cv_shtool"
858
859 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
860 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
861
862 OPENLDAP_CVS=""
863 if test -d $ac_aux_dir/CVS; then
864         OPENLDAP_CVS="(from CVS sources) "
865 fi
866
867 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
868
869
870 echo $ac_n "checking host system type""... $ac_c" 1>&6
871 echo "configure:872: checking host system type" >&5
872 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
873
874 # Make sure we can run config.sub.
875   if $ac_config_sub sun4 >/dev/null 2>&1; then :
876     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
877   fi
878
879   ac_cv_host_alias=$host
880   case "$ac_cv_host_alias" in
881   NONE)
882     case $nonopt in
883     NONE)
884       if ac_cv_host_alias=`$ac_config_guess`; then :
885       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
886       fi ;;
887     *) ac_cv_host_alias=$nonopt ;;
888     esac ;;
889   esac
890
891   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
892   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
893   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
894   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
895 else
896   echo $ac_n "(cached) $ac_c" 1>&6
897 fi
898
899 echo "$ac_t""$ac_cv_host" 1>&6
900
901 host=$ac_cv_host
902 host_alias=$ac_cv_host_alias
903 host_cpu=$ac_cv_host_cpu
904 host_vendor=$ac_cv_host_vendor
905 host_os=$ac_cv_host_os
906
907
908
909
910
911 echo $ac_n "checking target system type""... $ac_c" 1>&6
912 echo "configure:913: checking target system type" >&5
913 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
914
915 # Make sure we can run config.sub.
916   if $ac_config_sub sun4 >/dev/null 2>&1; then :
917     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
918   fi
919
920   ac_cv_target_alias=$target
921   case "$ac_cv_target_alias" in
922   NONE)
923     case $nonopt in
924     NONE)
925       ac_cv_target_alias=$host_alias ;;
926
927     *) ac_cv_target_alias=$nonopt ;;
928     esac ;;
929   esac
930
931   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
932   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
933   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
934   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
935 else
936   echo $ac_n "(cached) $ac_c" 1>&6
937 fi
938
939 echo "$ac_t""$ac_cv_target" 1>&6
940
941 target=$ac_cv_target
942 target_alias=$ac_cv_target_alias
943 target_cpu=$ac_cv_target_cpu
944 target_vendor=$ac_cv_target_vendor
945 target_os=$ac_cv_target_os
946
947
948
949
950
951 echo $ac_n "checking build system type""... $ac_c" 1>&6
952 echo "configure:953: checking build system type" >&5
953 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
954
955 # Make sure we can run config.sub.
956   if $ac_config_sub sun4 >/dev/null 2>&1; then :
957     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
958   fi
959
960   ac_cv_build_alias=$build
961   case "$ac_cv_build_alias" in
962   NONE)
963     case $nonopt in
964     NONE)
965       ac_cv_build_alias=$host_alias ;;
966
967     *) ac_cv_build_alias=$nonopt ;;
968     esac ;;
969   esac
970
971   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
972   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
973   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
974   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
975 else
976   echo $ac_n "(cached) $ac_c" 1>&6
977 fi
978
979 echo "$ac_t""$ac_cv_build" 1>&6
980
981 build=$ac_cv_build
982 build_alias=$ac_cv_build_alias
983 build_cpu=$ac_cv_build_cpu
984 build_vendor=$ac_cv_build_vendor
985 build_os=$ac_cv_build_os
986
987
988
989
990
991 # Do some error checking and defaulting for the host and target type.
992 # The inputs are:
993 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
994 #
995 # The rules are:
996 # 1. You are not allowed to specify --host, --target, and nonopt at the
997 #    same time.
998 # 2. Host defaults to nonopt.
999 # 3. If nonopt is not specified, then host defaults to the current host,
1000 #    as determined by config.guess.
1001 # 4. Target and build default to nonopt.
1002 # 5. If nonopt is not specified, then target and build default to host.
1003
1004 # The aliases save the names the user supplied, while $host etc.
1005 # will get canonicalized.
1006 case $host---$target---$nonopt in
1007 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1008 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1009 esac
1010
1011 test "$host_alias" != "$target_alias" &&
1012   test "$program_prefix$program_suffix$program_transform_name" = \
1013     NONENONEs,x,x, &&
1014   program_prefix=${target_alias}-
1015
1016
1017 # Find a good install program.  We prefer a C program (faster),
1018 # so one script is as good as another.  But avoid the broken or
1019 # incompatible versions:
1020 # SysV /etc/install, /usr/sbin/install
1021 # SunOS /usr/etc/install
1022 # IRIX /sbin/install
1023 # AIX /bin/install
1024 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1025 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1026 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1027 # ./install, which can be erroneously created by make from ./install.sh.
1028 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1029 echo "configure:1030: checking for a BSD compatible install" >&5
1030 if test -z "$INSTALL"; then
1031 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1032   echo $ac_n "(cached) $ac_c" 1>&6
1033 else
1034     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1035   for ac_dir in $PATH; do
1036     # Account for people who put trailing slashes in PATH elements.
1037     case "$ac_dir/" in
1038     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1039     *)
1040       # OSF1 and SCO ODT 3.0 have their own names for install.
1041       # Don't use installbsd from OSF since it installs stuff as root
1042       # by default.
1043       for ac_prog in ginstall scoinst install; do
1044         if test -f $ac_dir/$ac_prog; then
1045           if test $ac_prog = install &&
1046             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1047             # AIX install.  It has an incompatible calling convention.
1048             :
1049           elif test $ac_prog = install &&
1050             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1051             # program-specific install script used by HP pwplus--don't use.
1052             :
1053           else
1054             ac_cv_path_install="$ac_dir/$ac_prog -c"
1055             break 2
1056           fi
1057         fi
1058       done
1059       ;;
1060     esac
1061   done
1062   IFS="$ac_save_IFS"
1063
1064 fi
1065   if test "${ac_cv_path_install+set}" = set; then
1066     INSTALL="$ac_cv_path_install"
1067   else
1068     # As a last resort, use the slow shell script.  We don't cache a
1069     # path for INSTALL within a source directory, because that will
1070     # break other packages using the cache if that directory is
1071     # removed, or if the path is relative.
1072     INSTALL="$ac_install_sh"
1073   fi
1074 fi
1075 echo "$ac_t""$INSTALL" 1>&6
1076
1077 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1078 # It thinks the first close brace ends the variable substitution.
1079 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1080
1081 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1082
1083 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1084
1085 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1086 echo "configure:1087: checking whether build environment is sane" >&5
1087 # Just in case
1088 sleep 1
1089 echo timestamp > conftestfile
1090 # Do `set' in a subshell so we don't clobber the current shell's
1091 # arguments.  Must try -L first in case configure is actually a
1092 # symlink; some systems play weird games with the mod time of symlinks
1093 # (eg FreeBSD returns the mod time of the symlink's containing
1094 # directory).
1095 if (
1096    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1097    if test "$*" = "X"; then
1098       # -L didn't work.
1099       set X `ls -t $srcdir/configure conftestfile`
1100    fi
1101    if test "$*" != "X $srcdir/configure conftestfile" \
1102       && test "$*" != "X conftestfile $srcdir/configure"; then
1103
1104       # If neither matched, then we have a broken ls.  This can happen
1105       # if, for instance, CONFIG_SHELL is bash and it inherits a
1106       # broken ls alias from the environment.  This has actually
1107       # happened.  Such a system could not be considered "sane".
1108       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1109 alias in your environment" 1>&2; exit 1; }
1110    fi
1111
1112    test "$2" = conftestfile
1113    )
1114 then
1115    # Ok.
1116    :
1117 else
1118    { echo "configure: error: newly created file is older than distributed files!
1119 Check your system clock" 1>&2; exit 1; }
1120 fi
1121 rm -f conftest*
1122 echo "$ac_t""yes" 1>&6
1123 if test "$program_transform_name" = s,x,x,; then
1124   program_transform_name=
1125 else
1126   # Double any \ or $.  echo might interpret backslashes.
1127   cat <<\EOF_SED > conftestsed
1128 s,\\,\\\\,g; s,\$,$$,g
1129 EOF_SED
1130   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1131   rm -f conftestsed
1132 fi
1133 test "$program_prefix" != NONE &&
1134   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1135 # Use a double $ so make ignores it.
1136 test "$program_suffix" != NONE &&
1137   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1138
1139 # sed with no file args requires a program.
1140 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1141
1142 for ac_prog in mawk gawk nawk awk
1143 do
1144 # Extract the first word of "$ac_prog", so it can be a program name with args.
1145 set dummy $ac_prog; ac_word=$2
1146 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1147 echo "configure:1148: checking for $ac_word" >&5
1148 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1149   echo $ac_n "(cached) $ac_c" 1>&6
1150 else
1151   if test -n "$AWK"; then
1152   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1153 else
1154   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1155   ac_dummy="$PATH"
1156   for ac_dir in $ac_dummy; do
1157     test -z "$ac_dir" && ac_dir=.
1158     if test -f $ac_dir/$ac_word; then
1159       ac_cv_prog_AWK="$ac_prog"
1160       break
1161     fi
1162   done
1163   IFS="$ac_save_ifs"
1164 fi
1165 fi
1166 AWK="$ac_cv_prog_AWK"
1167 if test -n "$AWK"; then
1168   echo "$ac_t""$AWK" 1>&6
1169 else
1170   echo "$ac_t""no" 1>&6
1171 fi
1172
1173 test -n "$AWK" && break
1174 done
1175
1176 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1177 echo "configure:1178: checking whether ${MAKE-make} sets \${MAKE}" >&5
1178 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1179 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1180   echo $ac_n "(cached) $ac_c" 1>&6
1181 else
1182   cat > conftestmake <<\EOF
1183 all:
1184         @echo 'ac_maketemp="${MAKE}"'
1185 EOF
1186 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1187 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1188 if test -n "$ac_maketemp"; then
1189   eval ac_cv_prog_make_${ac_make}_set=yes
1190 else
1191   eval ac_cv_prog_make_${ac_make}_set=no
1192 fi
1193 rm -f conftestmake
1194 fi
1195 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1196   echo "$ac_t""yes" 1>&6
1197   SET_MAKE=
1198 else
1199   echo "$ac_t""no" 1>&6
1200   SET_MAKE="MAKE=${MAKE-make}"
1201 fi
1202
1203
1204
1205 PACKAGE=$OL_PACKAGE
1206
1207 VERSION=$OL_VERSION
1208
1209 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1210   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1211 fi
1212
1213
1214
1215 missing_dir=`cd $ac_aux_dir && pwd`
1216 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1217 echo "configure:1218: checking for working aclocal" >&5
1218 # Run test in a subshell; some versions of sh will print an error if
1219 # an executable is not found, even if stderr is redirected.
1220 # Redirect stdin to placate older versions of autoconf.  Sigh.
1221 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1222    ACLOCAL=aclocal
1223    echo "$ac_t""found" 1>&6
1224 else
1225    ACLOCAL="$missing_dir/missing aclocal"
1226    echo "$ac_t""missing" 1>&6
1227 fi
1228
1229 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1230 echo "configure:1231: checking for working autoconf" >&5
1231 # Run test in a subshell; some versions of sh will print an error if
1232 # an executable is not found, even if stderr is redirected.
1233 # Redirect stdin to placate older versions of autoconf.  Sigh.
1234 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1235    AUTOCONF=autoconf
1236    echo "$ac_t""found" 1>&6
1237 else
1238    AUTOCONF="$missing_dir/missing autoconf"
1239    echo "$ac_t""missing" 1>&6
1240 fi
1241
1242 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working automake" >&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 (automake --version) < /dev/null > /dev/null 2>&1; then
1248    AUTOMAKE=automake
1249    echo "$ac_t""found" 1>&6
1250 else
1251    AUTOMAKE="$missing_dir/missing automake"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working autoheader" >&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 (autoheader --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOHEADER=autoheader
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOHEADER="$missing_dir/missing autoheader"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working makeinfo" >&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 (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1274    MAKEINFO=makeinfo
1275    echo "$ac_t""found" 1>&6
1276 else
1277    MAKEINFO="$missing_dir/missing makeinfo"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 install_sh="$missing_dir/install-sh"
1282 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1283
1284 for ac_prog in gnutar gtar tar
1285 do
1286 # Extract the first word of "$ac_prog", so it can be a program name with args.
1287 set dummy $ac_prog; ac_word=$2
1288 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1289 echo "configure:1290: checking for $ac_word" >&5
1290 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1291   echo $ac_n "(cached) $ac_c" 1>&6
1292 else
1293   if test -n "$AMTAR"; then
1294   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1295 else
1296   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1297   ac_dummy="$PATH"
1298   for ac_dir in $ac_dummy; do
1299     test -z "$ac_dir" && ac_dir=.
1300     if test -f $ac_dir/$ac_word; then
1301       ac_cv_prog_AMTAR="$ac_prog"
1302       break
1303     fi
1304   done
1305   IFS="$ac_save_ifs"
1306 fi
1307 fi
1308 AMTAR="$ac_cv_prog_AMTAR"
1309 if test -n "$AMTAR"; then
1310   echo "$ac_t""$AMTAR" 1>&6
1311 else
1312   echo "$ac_t""no" 1>&6
1313 fi
1314
1315 test -n "$AMTAR" && break
1316 done
1317
1318
1319 AMTARFLAGS=
1320 if test -n "$AMTAR"; then
1321   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1322         AMTARFLAGS=o
1323   fi
1324 fi
1325
1326 cat >> confdefs.h <<EOF
1327 #define OPENLDAP_PACKAGE "$PACKAGE"
1328 EOF
1329
1330 cat >> confdefs.h <<EOF
1331 #define OPENLDAP_VERSION "$VERSION"
1332 EOF
1333
1334
1335 cat >> confdefs.h <<EOF
1336 #define LDAP_VENDOR_VERSION $OL_API_INC
1337 EOF
1338
1339 cat >> confdefs.h <<EOF
1340 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1341 EOF
1342
1343 cat >> confdefs.h <<EOF
1344 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1349 EOF
1350
1351
1352 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1353
1354 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1355
1356 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1357
1358
1359
1360 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1361 echo "configure:1362: checking configure arguments" >&5
1362
1363
1364 top_builddir=`pwd`
1365
1366 ldap_subdir="/openldap"
1367
1368 # Check whether --with-subdir or --without-subdir was given.
1369 if test "${with_subdir+set}" = set; then
1370   withval="$with_subdir"
1371   case "$withval" in
1372         no) ldap_subdir=""
1373                 ;;
1374         yes)
1375                 ;;
1376         /*|\\*)
1377                 ldap_subdir="$withval"
1378                 ;;
1379         *)
1380                 ldap_subdir="/$withval"
1381                 ;;
1382 esac
1383
1384 fi
1385
1386
1387 # OpenLDAP --enable-debug
1388         # Check whether --enable-debug or --disable-debug was given.
1389 if test "${enable_debug+set}" = set; then
1390   enableval="$enable_debug"
1391   
1392         ol_arg=invalid
1393         for ol_val in auto yes no ; do
1394                 if test "$enableval" = "$ol_val" ; then
1395                         ol_arg="$ol_val"
1396                 fi
1397         done
1398         if test "$ol_arg" = "invalid" ; then
1399                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1400         fi
1401         ol_enable_debug="$ol_arg"
1402
1403 else
1404         ol_enable_debug="yes"
1405 fi
1406 # end --enable-debug
1407 # OpenLDAP --enable-dynamic
1408         # Check whether --enable-dynamic or --disable-dynamic was given.
1409 if test "${enable_dynamic+set}" = set; then
1410   enableval="$enable_dynamic"
1411   
1412         ol_arg=invalid
1413         for ol_val in auto yes no ; do
1414                 if test "$enableval" = "$ol_val" ; then
1415                         ol_arg="$ol_val"
1416                 fi
1417         done
1418         if test "$ol_arg" = "invalid" ; then
1419                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1420         fi
1421         ol_enable_dynamic="$ol_arg"
1422
1423 else
1424         ol_enable_dynamic="no"
1425 fi
1426 # end --enable-dynamic
1427 # OpenLDAP --enable-syslog
1428         # Check whether --enable-syslog or --disable-syslog was given.
1429 if test "${enable_syslog+set}" = set; then
1430   enableval="$enable_syslog"
1431   
1432         ol_arg=invalid
1433         for ol_val in auto yes no ; do
1434                 if test "$enableval" = "$ol_val" ; then
1435                         ol_arg="$ol_val"
1436                 fi
1437         done
1438         if test "$ol_arg" = "invalid" ; then
1439                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1440         fi
1441         ol_enable_syslog="$ol_arg"
1442
1443 else
1444         ol_enable_syslog="auto"
1445 fi
1446 # end --enable-syslog
1447 # OpenLDAP --enable-proctitle
1448         # Check whether --enable-proctitle or --disable-proctitle was given.
1449 if test "${enable_proctitle+set}" = set; then
1450   enableval="$enable_proctitle"
1451   
1452         ol_arg=invalid
1453         for ol_val in auto yes no ; do
1454                 if test "$enableval" = "$ol_val" ; then
1455                         ol_arg="$ol_val"
1456                 fi
1457         done
1458         if test "$ol_arg" = "invalid" ; then
1459                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1460         fi
1461         ol_enable_proctitle="$ol_arg"
1462
1463 else
1464         ol_enable_proctitle="yes"
1465 fi
1466 # end --enable-proctitle
1467 ol_enable_referrals=${ol_enable_referrals-no}
1468 ol_enable_kbind=${ol_enable_kbind-no}
1469 # OpenLDAP --enable-ipv6
1470         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1471 if test "${enable_ipv6+set}" = set; then
1472   enableval="$enable_ipv6"
1473   
1474         ol_arg=invalid
1475         for ol_val in auto yes no ; do
1476                 if test "$enableval" = "$ol_val" ; then
1477                         ol_arg="$ol_val"
1478                 fi
1479         done
1480         if test "$ol_arg" = "invalid" ; then
1481                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1482         fi
1483         ol_enable_ipv6="$ol_arg"
1484
1485 else
1486         ol_enable_ipv6="auto"
1487 fi
1488 # end --enable-ipv6
1489 # OpenLDAP --enable-local
1490         # Check whether --enable-local or --disable-local was given.
1491 if test "${enable_local+set}" = set; then
1492   enableval="$enable_local"
1493   
1494         ol_arg=invalid
1495         for ol_val in auto yes no ; do
1496                 if test "$enableval" = "$ol_val" ; then
1497                         ol_arg="$ol_val"
1498                 fi
1499         done
1500         if test "$ol_arg" = "invalid" ; then
1501                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1502         fi
1503         ol_enable_local="$ol_arg"
1504
1505 else
1506         ol_enable_local="auto"
1507 fi
1508 # end --enable-local
1509
1510
1511 # OpenLDAP --with-cyrus_sasl
1512         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1513 if test "${with_cyrus_sasl+set}" = set; then
1514   withval="$with_cyrus_sasl"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no  ; do
1518                 if test "$withval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1524         fi
1525         ol_with_cyrus_sasl="$ol_arg"
1526
1527 else
1528         ol_with_cyrus_sasl="auto"
1529 fi
1530 # end --with-cyrus_sasl
1531
1532 # OpenLDAP --with-fetch
1533         # Check whether --with-fetch or --without-fetch was given.
1534 if test "${with_fetch+set}" = set; then
1535   withval="$with_fetch"
1536   
1537         ol_arg=invalid
1538         for ol_val in auto yes no  ; do
1539                 if test "$withval" = "$ol_val" ; then
1540                         ol_arg="$ol_val"
1541                 fi
1542         done
1543         if test "$ol_arg" = "invalid" ; then
1544                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1545         fi
1546         ol_with_fetch="$ol_arg"
1547
1548 else
1549         ol_with_fetch="auto"
1550 fi
1551 # end --with-fetch
1552
1553 ol_with_kerberos=${ol_with_kerberos-auto}
1554 # OpenLDAP --with-threads
1555         # Check whether --with-threads or --without-threads was given.
1556 if test "${with_threads+set}" = set; then
1557   withval="$with_threads"
1558   
1559         ol_arg=invalid
1560         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1561                 if test "$withval" = "$ol_val" ; then
1562                         ol_arg="$ol_val"
1563                 fi
1564         done
1565         if test "$ol_arg" = "invalid" ; then
1566                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1567         fi
1568         ol_with_threads="$ol_arg"
1569
1570 else
1571         ol_with_threads="auto"
1572 fi
1573 # end --with-threads
1574
1575 # OpenLDAP --with-tls
1576         # Check whether --with-tls or --without-tls was given.
1577 if test "${with_tls+set}" = set; then
1578   withval="$with_tls"
1579   
1580         ol_arg=invalid
1581         for ol_val in auto ssleay openssl yes no  ; do
1582                 if test "$withval" = "$ol_val" ; then
1583                         ol_arg="$ol_val"
1584                 fi
1585         done
1586         if test "$ol_arg" = "invalid" ; then
1587                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1588         fi
1589         ol_with_tls="$ol_arg"
1590
1591 else
1592         ol_with_tls="auto"
1593 fi
1594 # end --with-tls
1595
1596 # OpenLDAP --with-yielding_select
1597         # Check whether --with-yielding_select or --without-yielding_select was given.
1598 if test "${with_yielding_select+set}" = set; then
1599   withval="$with_yielding_select"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto yes no manual  ; do
1603                 if test "$withval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1609         fi
1610         ol_with_yielding_select="$ol_arg"
1611
1612 else
1613         ol_with_yielding_select="auto"
1614 fi
1615 # end --with-yielding_select
1616
1617
1618
1619 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1620 if test "${with_xxslapdoptions+set}" = set; then
1621   withval="$with_xxslapdoptions"
1622   :
1623 fi
1624
1625 # OpenLDAP --enable-slapd
1626         # Check whether --enable-slapd or --disable-slapd was given.
1627 if test "${enable_slapd+set}" = set; then
1628   enableval="$enable_slapd"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no ; do
1632                 if test "$enableval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1638         fi
1639         ol_enable_slapd="$ol_arg"
1640
1641 else
1642         ol_enable_slapd="yes"
1643 fi
1644 # end --enable-slapd
1645 # OpenLDAP --enable-aci
1646         # Check whether --enable-aci or --disable-aci was given.
1647 if test "${enable_aci+set}" = set; then
1648   enableval="$enable_aci"
1649   
1650         ol_arg=invalid
1651         for ol_val in auto yes no ; do
1652                 if test "$enableval" = "$ol_val" ; then
1653                         ol_arg="$ol_val"
1654                 fi
1655         done
1656         if test "$ol_arg" = "invalid" ; then
1657                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1658         fi
1659         ol_enable_aci="$ol_arg"
1660
1661 else
1662         ol_enable_aci="no"
1663 fi
1664 # end --enable-aci
1665 # OpenLDAP --enable-cleartext
1666         # Check whether --enable-cleartext or --disable-cleartext was given.
1667 if test "${enable_cleartext+set}" = set; then
1668   enableval="$enable_cleartext"
1669   
1670         ol_arg=invalid
1671         for ol_val in auto yes no ; do
1672                 if test "$enableval" = "$ol_val" ; then
1673                         ol_arg="$ol_val"
1674                 fi
1675         done
1676         if test "$ol_arg" = "invalid" ; then
1677                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1678         fi
1679         ol_enable_cleartext="$ol_arg"
1680
1681 else
1682         ol_enable_cleartext="yes"
1683 fi
1684 # end --enable-cleartext
1685 # OpenLDAP --enable-crypt
1686         # Check whether --enable-crypt or --disable-crypt was given.
1687 if test "${enable_crypt+set}" = set; then
1688   enableval="$enable_crypt"
1689   
1690         ol_arg=invalid
1691         for ol_val in auto yes no ; do
1692                 if test "$enableval" = "$ol_val" ; then
1693                         ol_arg="$ol_val"
1694                 fi
1695         done
1696         if test "$ol_arg" = "invalid" ; then
1697                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1698         fi
1699         ol_enable_crypt="$ol_arg"
1700
1701 else
1702         ol_enable_crypt="no"
1703 fi
1704 # end --enable-crypt
1705 # OpenLDAP --enable-lmpasswd
1706         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1707 if test "${enable_lmpasswd+set}" = set; then
1708   enableval="$enable_lmpasswd"
1709   
1710         ol_arg=invalid
1711         for ol_val in auto yes no ; do
1712                 if test "$enableval" = "$ol_val" ; then
1713                         ol_arg="$ol_val"
1714                 fi
1715         done
1716         if test "$ol_arg" = "invalid" ; then
1717                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1718         fi
1719         ol_enable_lmpasswd="$ol_arg"
1720
1721 else
1722         ol_enable_lmpasswd="no"
1723 fi
1724 # end --enable-lmpasswd
1725 # OpenLDAP --enable-spasswd
1726         # Check whether --enable-spasswd or --disable-spasswd was given.
1727 if test "${enable_spasswd+set}" = set; then
1728   enableval="$enable_spasswd"
1729   
1730         ol_arg=invalid
1731         for ol_val in auto yes no ; do
1732                 if test "$enableval" = "$ol_val" ; then
1733                         ol_arg="$ol_val"
1734                 fi
1735         done
1736         if test "$ol_arg" = "invalid" ; then
1737                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1738         fi
1739         ol_enable_spasswd="$ol_arg"
1740
1741 else
1742         ol_enable_spasswd="no"
1743 fi
1744 # end --enable-spasswd
1745 # OpenLDAP --enable-modules
1746         # Check whether --enable-modules or --disable-modules was given.
1747 if test "${enable_modules+set}" = set; then
1748   enableval="$enable_modules"
1749   
1750         ol_arg=invalid
1751         for ol_val in auto yes no ; do
1752                 if test "$enableval" = "$ol_val" ; then
1753                         ol_arg="$ol_val"
1754                 fi
1755         done
1756         if test "$ol_arg" = "invalid" ; then
1757                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1758         fi
1759         ol_enable_modules="$ol_arg"
1760
1761 else
1762         ol_enable_modules="no"
1763 fi
1764 # end --enable-modules
1765 ol_enable_multimaster=${ol_enable_multimaster-no}
1766 # OpenLDAP --enable-rewrite
1767         # Check whether --enable-rewrite or --disable-rewrite was given.
1768 if test "${enable_rewrite+set}" = set; then
1769   enableval="$enable_rewrite"
1770   
1771         ol_arg=invalid
1772         for ol_val in auto yes no ; do
1773                 if test "$enableval" = "$ol_val" ; then
1774                         ol_arg="$ol_val"
1775                 fi
1776         done
1777         if test "$ol_arg" = "invalid" ; then
1778                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1779         fi
1780         ol_enable_rewrite="$ol_arg"
1781
1782 else
1783         ol_enable_rewrite="auto"
1784 fi
1785 # end --enable-rewrite
1786 # OpenLDAP --enable-rlookups
1787         # Check whether --enable-rlookups or --disable-rlookups was given.
1788 if test "${enable_rlookups+set}" = set; then
1789   enableval="$enable_rlookups"
1790   
1791         ol_arg=invalid
1792         for ol_val in auto yes no ; do
1793                 if test "$enableval" = "$ol_val" ; then
1794                         ol_arg="$ol_val"
1795                 fi
1796         done
1797         if test "$ol_arg" = "invalid" ; then
1798                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1799         fi
1800         ol_enable_rlookups="$ol_arg"
1801
1802 else
1803         ol_enable_rlookups="no"
1804 fi
1805 # end --enable-rlookups
1806 # OpenLDAP --enable-slapi
1807         # Check whether --enable-slapi or --disable-slapi was given.
1808 if test "${enable_slapi+set}" = set; then
1809   enableval="$enable_slapi"
1810   
1811         ol_arg=invalid
1812         for ol_val in auto yes no ; do
1813                 if test "$enableval" = "$ol_val" ; then
1814                         ol_arg="$ol_val"
1815                 fi
1816         done
1817         if test "$ol_arg" = "invalid" ; then
1818                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1819         fi
1820         ol_enable_slapi="$ol_arg"
1821
1822 else
1823         ol_enable_slapi="no"
1824 fi
1825 # end --enable-slapi
1826 # OpenLDAP --enable-slp
1827         # Check whether --enable-slp or --disable-slp was given.
1828 if test "${enable_slp+set}" = set; then
1829   enableval="$enable_slp"
1830   
1831         ol_arg=invalid
1832         for ol_val in auto yes no ; do
1833                 if test "$enableval" = "$ol_val" ; then
1834                         ol_arg="$ol_val"
1835                 fi
1836         done
1837         if test "$ol_arg" = "invalid" ; then
1838                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1839         fi
1840         ol_enable_slp="$ol_arg"
1841
1842 else
1843         ol_enable_slp="no"
1844 fi
1845 # end --enable-slp
1846 # OpenLDAP --enable-wrappers
1847         # Check whether --enable-wrappers or --disable-wrappers was given.
1848 if test "${enable_wrappers+set}" = set; then
1849   enableval="$enable_wrappers"
1850   
1851         ol_arg=invalid
1852         for ol_val in auto yes no ; do
1853                 if test "$enableval" = "$ol_val" ; then
1854                         ol_arg="$ol_val"
1855                 fi
1856         done
1857         if test "$ol_arg" = "invalid" ; then
1858                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1859         fi
1860         ol_enable_wrappers="$ol_arg"
1861
1862 else
1863         ol_enable_wrappers="no"
1864 fi
1865 # end --enable-wrappers
1866
1867
1868 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1869         passwd perl relay shell sql"
1870
1871 # OpenLDAP --enable-bdb
1872         # Check whether --enable-bdb or --disable-bdb was given.
1873 if test "${enable_bdb+set}" = set; then
1874   enableval="$enable_bdb"
1875   
1876         ol_arg=invalid
1877         for ol_val in no yes mod ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1884         fi
1885         ol_enable_bdb="$ol_arg"
1886
1887 else
1888         ol_enable_bdb="yes"
1889 fi
1890 # end --enable-bdb
1891 # OpenLDAP --enable-dnssrv
1892         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1893 if test "${enable_dnssrv+set}" = set; then
1894   enableval="$enable_dnssrv"
1895   
1896         ol_arg=invalid
1897         for ol_val in no yes mod ; do
1898                 if test "$enableval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1904         fi
1905         ol_enable_dnssrv="$ol_arg"
1906
1907 else
1908         ol_enable_dnssrv="no"
1909 fi
1910 # end --enable-dnssrv
1911 # OpenLDAP --enable-hdb
1912         # Check whether --enable-hdb or --disable-hdb was given.
1913 if test "${enable_hdb+set}" = set; then
1914   enableval="$enable_hdb"
1915   
1916         ol_arg=invalid
1917         for ol_val in no yes mod ; do
1918                 if test "$enableval" = "$ol_val" ; then
1919                         ol_arg="$ol_val"
1920                 fi
1921         done
1922         if test "$ol_arg" = "invalid" ; then
1923                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1924         fi
1925         ol_enable_hdb="$ol_arg"
1926
1927 else
1928         ol_enable_hdb="no"
1929 fi
1930 # end --enable-hdb
1931 # OpenLDAP --enable-ldap
1932         # Check whether --enable-ldap or --disable-ldap was given.
1933 if test "${enable_ldap+set}" = set; then
1934   enableval="$enable_ldap"
1935   
1936         ol_arg=invalid
1937         for ol_val in no yes mod ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1944         fi
1945         ol_enable_ldap="$ol_arg"
1946
1947 else
1948         ol_enable_ldap="no"
1949 fi
1950 # end --enable-ldap
1951 # OpenLDAP --enable-ldbm
1952         # Check whether --enable-ldbm or --disable-ldbm was given.
1953 if test "${enable_ldbm+set}" = set; then
1954   enableval="$enable_ldbm"
1955   
1956         ol_arg=invalid
1957         for ol_val in no yes mod ; do
1958                 if test "$enableval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
1964         fi
1965         ol_enable_ldbm="$ol_arg"
1966
1967 else
1968         ol_enable_ldbm="no"
1969 fi
1970 # end --enable-ldbm
1971 # OpenLDAP --with-ldbm_api
1972         # Check whether --with-ldbm_api or --without-ldbm_api was given.
1973 if test "${with_ldbm_api+set}" = set; then
1974   withval="$with_ldbm_api"
1975   
1976         ol_arg=invalid
1977         for ol_val in auto berkeley bcompat mdbm gdbm ; do
1978                 if test "$withval" = "$ol_val" ; then
1979                         ol_arg="$ol_val"
1980                 fi
1981         done
1982         if test "$ol_arg" = "invalid" ; then
1983                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
1984         fi
1985         ol_with_ldbm_api="$ol_arg"
1986
1987 else
1988         ol_with_ldbm_api="auto"
1989 fi
1990 # end --with-ldbm_api
1991
1992 # OpenLDAP --with-ldbm_type
1993         # Check whether --with-ldbm_type or --without-ldbm_type was given.
1994 if test "${with_ldbm_type+set}" = set; then
1995   withval="$with_ldbm_type"
1996   
1997         ol_arg=invalid
1998         for ol_val in auto btree hash ; do
1999                 if test "$withval" = "$ol_val" ; then
2000                         ol_arg="$ol_val"
2001                 fi
2002         done
2003         if test "$ol_arg" = "invalid" ; then
2004                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2005         fi
2006         ol_with_ldbm_type="$ol_arg"
2007
2008 else
2009         ol_with_ldbm_type="auto"
2010 fi
2011 # end --with-ldbm_type
2012
2013 # OpenLDAP --enable-meta
2014         # Check whether --enable-meta or --disable-meta was given.
2015 if test "${enable_meta+set}" = set; then
2016   enableval="$enable_meta"
2017   
2018         ol_arg=invalid
2019         for ol_val in no yes mod ; do
2020                 if test "$enableval" = "$ol_val" ; then
2021                         ol_arg="$ol_val"
2022                 fi
2023         done
2024         if test "$ol_arg" = "invalid" ; then
2025                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2026         fi
2027         ol_enable_meta="$ol_arg"
2028
2029 else
2030         ol_enable_meta="no"
2031 fi
2032 # end --enable-meta
2033 # OpenLDAP --enable-monitor
2034         # Check whether --enable-monitor or --disable-monitor was given.
2035 if test "${enable_monitor+set}" = set; then
2036   enableval="$enable_monitor"
2037   
2038         ol_arg=invalid
2039         for ol_val in no yes mod ; do
2040                 if test "$enableval" = "$ol_val" ; then
2041                         ol_arg="$ol_val"
2042                 fi
2043         done
2044         if test "$ol_arg" = "invalid" ; then
2045                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2046         fi
2047         ol_enable_monitor="$ol_arg"
2048
2049 else
2050         ol_enable_monitor="yes"
2051 fi
2052 # end --enable-monitor
2053 # OpenLDAP --enable-null
2054         # Check whether --enable-null or --disable-null was given.
2055 if test "${enable_null+set}" = set; then
2056   enableval="$enable_null"
2057   
2058         ol_arg=invalid
2059         for ol_val in no yes mod ; do
2060                 if test "$enableval" = "$ol_val" ; then
2061                         ol_arg="$ol_val"
2062                 fi
2063         done
2064         if test "$ol_arg" = "invalid" ; then
2065                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2066         fi
2067         ol_enable_null="$ol_arg"
2068
2069 else
2070         ol_enable_null="no"
2071 fi
2072 # end --enable-null
2073 # OpenLDAP --enable-passwd
2074         # Check whether --enable-passwd or --disable-passwd was given.
2075 if test "${enable_passwd+set}" = set; then
2076   enableval="$enable_passwd"
2077   
2078         ol_arg=invalid
2079         for ol_val in no yes mod ; do
2080                 if test "$enableval" = "$ol_val" ; then
2081                         ol_arg="$ol_val"
2082                 fi
2083         done
2084         if test "$ol_arg" = "invalid" ; then
2085                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2086         fi
2087         ol_enable_passwd="$ol_arg"
2088
2089 else
2090         ol_enable_passwd="no"
2091 fi
2092 # end --enable-passwd
2093 # OpenLDAP --enable-perl
2094         # Check whether --enable-perl or --disable-perl was given.
2095 if test "${enable_perl+set}" = set; then
2096   enableval="$enable_perl"
2097   
2098         ol_arg=invalid
2099         for ol_val in no yes mod ; do
2100                 if test "$enableval" = "$ol_val" ; then
2101                         ol_arg="$ol_val"
2102                 fi
2103         done
2104         if test "$ol_arg" = "invalid" ; then
2105                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2106         fi
2107         ol_enable_perl="$ol_arg"
2108
2109 else
2110         ol_enable_perl="no"
2111 fi
2112 # end --enable-perl
2113 # OpenLDAP --enable-relay
2114         # Check whether --enable-relay or --disable-relay was given.
2115 if test "${enable_relay+set}" = set; then
2116   enableval="$enable_relay"
2117   
2118         ol_arg=invalid
2119         for ol_val in no yes mod ; do
2120                 if test "$enableval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2126         fi
2127         ol_enable_relay="$ol_arg"
2128
2129 else
2130         ol_enable_relay="yes"
2131 fi
2132 # end --enable-relay
2133 # OpenLDAP --enable-shell
2134         # Check whether --enable-shell or --disable-shell was given.
2135 if test "${enable_shell+set}" = set; then
2136   enableval="$enable_shell"
2137   
2138         ol_arg=invalid
2139         for ol_val in no yes mod ; do
2140                 if test "$enableval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2146         fi
2147         ol_enable_shell="$ol_arg"
2148
2149 else
2150         ol_enable_shell="no"
2151 fi
2152 # end --enable-shell
2153 # OpenLDAP --enable-sql
2154         # Check whether --enable-sql or --disable-sql was given.
2155 if test "${enable_sql+set}" = set; then
2156   enableval="$enable_sql"
2157   
2158         ol_arg=invalid
2159         for ol_val in no yes mod ; do
2160                 if test "$enableval" = "$ol_val" ; then
2161                         ol_arg="$ol_val"
2162                 fi
2163         done
2164         if test "$ol_arg" = "invalid" ; then
2165                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2166         fi
2167         ol_enable_sql="$ol_arg"
2168
2169 else
2170         ol_enable_sql="no"
2171 fi
2172 # end --enable-sql
2173
2174 Overlays="chain denyop dyngroup ppolicy proxycache rwm"
2175
2176 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2177 if test "${with_xxslapoverlays+set}" = set; then
2178   withval="$with_xxslapoverlays"
2179   :
2180 fi
2181
2182 # OpenLDAP --enable-chain
2183         # Check whether --enable-chain or --disable-chain was given.
2184 if test "${enable_chain+set}" = set; then
2185   enableval="$enable_chain"
2186   
2187         ol_arg=invalid
2188         for ol_val in no yes mod ; 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-chain" 1>&2; exit 1; }
2195         fi
2196         ol_enable_chain="$ol_arg"
2197
2198 else
2199         ol_enable_chain="no"
2200 fi
2201 # end --enable-chain
2202
2203 # OpenLDAP --enable-denyop
2204         # Check whether --enable-denyop or --disable-denyop was given.
2205 if test "${enable_denyop+set}" = set; then
2206   enableval="$enable_denyop"
2207   
2208         ol_arg=invalid
2209         for ol_val in no yes mod ; do
2210                 if test "$enableval" = "$ol_val" ; then
2211                         ol_arg="$ol_val"
2212                 fi
2213         done
2214         if test "$ol_arg" = "invalid" ; then
2215                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2216         fi
2217         ol_enable_denyop="$ol_arg"
2218
2219 else
2220         ol_enable_denyop="no"
2221 fi
2222 # end --enable-denyop
2223
2224 # OpenLDAP --enable-dyngroup
2225         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2226 if test "${enable_dyngroup+set}" = set; then
2227   enableval="$enable_dyngroup"
2228   
2229         ol_arg=invalid
2230         for ol_val in no yes mod ; do
2231                 if test "$enableval" = "$ol_val" ; then
2232                         ol_arg="$ol_val"
2233                 fi
2234         done
2235         if test "$ol_arg" = "invalid" ; then
2236                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2237         fi
2238         ol_enable_dyngroup="$ol_arg"
2239
2240 else
2241         ol_enable_dyngroup="no"
2242 fi
2243 # end --enable-dyngroup
2244
2245 # OpenLDAP --enable-ppolicy
2246         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2247 if test "${enable_ppolicy+set}" = set; then
2248   enableval="$enable_ppolicy"
2249   
2250         ol_arg=invalid
2251         for ol_val in no yes mod ; do
2252                 if test "$enableval" = "$ol_val" ; then
2253                         ol_arg="$ol_val"
2254                 fi
2255         done
2256         if test "$ol_arg" = "invalid" ; then
2257                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2258         fi
2259         ol_enable_ppolicy="$ol_arg"
2260
2261 else
2262         ol_enable_ppolicy="no"
2263 fi
2264 # end --enable-ppolicy
2265
2266 # OpenLDAP --enable-proxycache
2267         # Check whether --enable-proxycache or --disable-proxycache was given.
2268 if test "${enable_proxycache+set}" = set; then
2269   enableval="$enable_proxycache"
2270   
2271         ol_arg=invalid
2272         for ol_val in no yes mod ; do
2273                 if test "$enableval" = "$ol_val" ; then
2274                         ol_arg="$ol_val"
2275                 fi
2276         done
2277         if test "$ol_arg" = "invalid" ; then
2278                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2279         fi
2280         ol_enable_proxycache="$ol_arg"
2281
2282 else
2283         ol_enable_proxycache="no"
2284 fi
2285 # end --enable-proxycache
2286
2287 # OpenLDAP --enable-rwm
2288         # Check whether --enable-rwm or --disable-rwm was given.
2289 if test "${enable_rwm+set}" = set; then
2290   enableval="$enable_rwm"
2291   
2292         ol_arg=invalid
2293         for ol_val in no yes mod ; do
2294                 if test "$enableval" = "$ol_val" ; then
2295                         ol_arg="$ol_val"
2296                 fi
2297         done
2298         if test "$ol_arg" = "invalid" ; then
2299                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2300         fi
2301         ol_enable_rwm="$ol_arg"
2302
2303 else
2304         ol_enable_rwm="no"
2305 fi
2306 # end --enable-rwm
2307
2308
2309 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2310 if test "${with_xxslurpdoptions+set}" = set; then
2311   withval="$with_xxslurpdoptions"
2312   :
2313 fi
2314
2315 # OpenLDAP --enable-slurpd
2316         # Check whether --enable-slurpd or --disable-slurpd was given.
2317 if test "${enable_slurpd+set}" = set; then
2318   enableval="$enable_slurpd"
2319   
2320         ol_arg=invalid
2321         for ol_val in auto yes no ; do
2322                 if test "$enableval" = "$ol_val" ; then
2323                         ol_arg="$ol_val"
2324                 fi
2325         done
2326         if test "$ol_arg" = "invalid" ; then
2327                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2328         fi
2329         ol_enable_slurpd="$ol_arg"
2330
2331 else
2332         ol_enable_slurpd="auto"
2333 fi
2334 # end --enable-slurpd
2335
2336 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2337 if test "${with_xxliboptions+set}" = set; then
2338   withval="$with_xxliboptions"
2339   :
2340 fi
2341
2342 # Check whether --enable-static or --disable-static was given.
2343 if test "${enable_static+set}" = set; then
2344   enableval="$enable_static"
2345   p=${PACKAGE-default}
2346 case $enableval in
2347 yes) enable_static=yes ;;
2348 no) enable_static=no ;;
2349 *)
2350   enable_static=no
2351   # Look at the argument we got.  We use all the common list separators.
2352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2353   for pkg in $enableval; do
2354     if test "X$pkg" = "X$p"; then
2355       enable_static=yes
2356     fi
2357   done
2358   IFS="$ac_save_ifs"
2359   ;;
2360 esac
2361 else
2362   enable_static=yes
2363 fi
2364
2365 # Check whether --enable-shared or --disable-shared was given.
2366 if test "${enable_shared+set}" = set; then
2367   enableval="$enable_shared"
2368   p=${PACKAGE-default}
2369 case $enableval in
2370 yes) enable_shared=yes ;;
2371 no) enable_shared=no ;;
2372 *)
2373   enable_shared=no
2374   # Look at the argument we got.  We use all the common list separators.
2375   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2376   for pkg in $enableval; do
2377     if test "X$pkg" = "X$p"; then
2378       enable_shared=yes
2379     fi
2380   done
2381   IFS="$ac_save_ifs"
2382   ;;
2383 esac
2384 else
2385   enable_shared=yes
2386 fi
2387
2388
2389
2390 # validate options
2391 if test $ol_enable_slapd = no ; then
2392                 if test $ol_enable_slapi = yes ; then
2393                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2394         fi
2395         for i in $Backends; do
2396                 eval "ol_tmp=\$ol_enable_$i"
2397                 if test $ol_tmp != no ; then
2398                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2399                         eval "ol_enable_$i=no"
2400                 fi
2401         done
2402         if test $ol_enable_modules = yes ; then
2403                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2404         fi
2405         if test $ol_enable_multimaster = yes ; then
2406                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2407         fi
2408         if test $ol_enable_wrappers = yes ; then
2409                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2410         fi
2411         if test $ol_enable_rlookups = yes ; then
2412                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2413         fi
2414         if test $ol_enable_aci = yes ; then
2415                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2416         fi
2417         if test $ol_with_ldbm_api != auto ; then
2418                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2419         fi
2420         if test $ol_with_ldbm_type != auto ; then
2421                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2422         fi
2423         if test $ol_enable_slurpd = yes ; then
2424                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2425         fi
2426         if test $ol_enable_rewrite = yes ; then
2427                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2428         fi
2429                 for i in $Overlays; do
2430                 eval "ol_tmp=\$ol_enable_$i"
2431                 if test $ol_tmp != no ; then
2432                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2433                         eval "ol_enable_$i=no"
2434                 fi
2435         done
2436
2437         # force settings to no
2438         ol_enable_slapi=no
2439
2440         ol_enable_modules=no
2441         ol_enable_multimaster=no
2442         ol_enable_rlookups=no
2443         ol_enable_aci=no
2444         ol_enable_wrappers=no
2445
2446         ol_with_ldbm_api=no
2447         ol_with_ldbm_type=no
2448
2449         ol_enable_slurpd=no
2450
2451         ol_enable_rewrite=no
2452
2453 elif test $ol_enable_ldbm = no ; then
2454         
2455         if test $ol_with_ldbm_api != auto ; then
2456                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2457         fi
2458
2459         if test $ol_with_ldbm_type != auto ; then
2460                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2461         fi
2462
2463         if test $ol_enable_modules != yes -a \
2464                 $ol_enable_bdb = no -a \
2465                 $ol_enable_dnssrv = no -a \
2466                 $ol_enable_hdb = no -a \
2467                 $ol_enable_ldap = no -a \
2468                 $ol_enable_meta = no -a \
2469                 $ol_enable_monitor = no -a \
2470                 $ol_enable_null = no -a \
2471                 $ol_enable_passwd = no -a \
2472                 $ol_enable_perl = no -a \
2473                 $ol_enable_relay = no -a \
2474                 $ol_enable_shell = no -a \
2475                 $ol_enable_sql = no ; then
2476
2477                 if test $ol_enable_slapd = yes ; then
2478                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2479                 else
2480                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2481                         ol_enable_slapd=no
2482                 fi
2483         fi
2484
2485         ol_with_ldbm_api=no
2486         ol_with_ldbm_type=no
2487
2488         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2489                 ol_with_ldbm_api=berkeley
2490         fi
2491
2492 else
2493                 if test $ol_with_ldbm_api = gdbm -a \
2494                 $ol_with_ldbm_type = btree ; then
2495                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2496         fi
2497         if test $ol_with_ldbm_api = mdbm -a \
2498                 $ol_with_ldbm_type = btree ; then
2499                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2500         fi
2501         if test $ol_with_ldbm_api = ndbm -a \
2502                 $ol_with_ldbm_type = btree ; then
2503                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2504         fi
2505
2506         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2507                 if test $ol_with_ldbm_api = auto ; then
2508                         ol_with_ldbm_api=berkeley
2509                 elif test $ol_with_ldbm_api != berkeley ; then
2510                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2511                 fi
2512
2513         elif test $ol_enable_bdb = auto ; then
2514                 if test $ol_with_ldbm_api != berkeley \
2515                         -o $ol_with_ldbm_api != auto ; then
2516                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2517                         ol_enable_bdb=no
2518                 fi
2519         fi
2520 fi
2521
2522 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2523         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2524 fi
2525
2526 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2527         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2528 fi
2529
2530 if test $ol_enable_slurpd = yes ; then
2531                 if test $ol_with_threads = no ; then
2532                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2533         fi
2534 fi
2535
2536 if test $ol_enable_lmpasswd = yes ; then
2537         if test $ol_with_tls = no ; then
2538                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2539         fi
2540 fi
2541
2542 if test $ol_enable_kbind = yes ; then
2543         if test $ol_with_kerberos = no ; then
2544                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2545         elif test $ol_with_kerberos = auto ; then
2546                 ol_with_kerberos=yes
2547         fi
2548
2549 elif test $ol_enable_kbind = no ; then
2550         if test $ol_with_kerberos = auto ; then
2551                 ol_with_kerberos=no
2552         elif test $ol_with_kerberos != no ; then
2553                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2554                 ol_with_kerberos=no
2555         fi
2556 fi
2557
2558 if test $ol_enable_spasswd = yes ; then
2559         if test $ol_with_cyrus_sasl = no ; then
2560                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2561         fi
2562         ol_with_cyrus_sasl=yes
2563 fi
2564
2565 echo "$ac_t""done" 1>&6
2566
2567 LDAP_LIBS=
2568 LDBM_LIBS=
2569 LTHREAD_LIBS=
2570 LUTIL_LIBS=
2571
2572 SLAPD_LIBS=
2573 SLURPD_LIBS=
2574
2575 BUILD_SLAPD=no
2576 BUILD_SLURPD=no
2577
2578 BUILD_THREAD=no
2579
2580 BUILD_SLAPI=no
2581 SLAPD_SLAPI_DEPEND=
2582
2583 BUILD_BDB=no
2584 BUILD_DNSSRV=no
2585 BUILD_HDB=no
2586 BUILD_LDAP=no
2587 BUILD_LDBM=no
2588 BUILD_META=no
2589 BUILD_MONITOR=no
2590 BUILD_NULL=no
2591 BUILD_PASSWD=no
2592 BUILD_PERL=no
2593 BUILD_RELAY=no
2594 BUILD_SHELL=no
2595 BUILD_SQL=no
2596
2597 BUILD_CHAIN=no
2598 BUILD_DENYOP=no
2599 BUILD_DYNGROUP=no
2600 BUILD_PPOLICY=no
2601 BUILD_PROXYCACHE=no
2602 BUILD_RWM=no
2603
2604 SLAPD_DYNAMIC_OVERLAYS=
2605
2606 SLAPD_MODULES_LDFLAGS=
2607 SLAPD_MODULES_CPPFLAGS=
2608
2609 SLAPD_STATIC_BACKENDS=
2610 SLAPD_DYNAMIC_BACKENDS=
2611
2612 SLAPD_PERL_LDFLAGS=
2613 MOD_PERL_LDFLAGS=
2614 PERL_CPPFLAGS=
2615
2616 SLAPD_SQL_LDFLAGS=
2617 SLAPD_SQL_LIBS=
2618 SLAPD_SQL_INCLUDES=
2619
2620 KRB4_LIBS=
2621 KRB5_LIBS=
2622 SASL_LIBS=
2623 TLS_LIBS=
2624 MODULES_LIBS=
2625 SLAPI_LIBS=
2626 LIBSLAPI=
2627 LIBSLAPITOOLS=
2628 AUTH_LIBS=
2629
2630 SLAPD_SLP_LIBS=
2631
2632
2633 # Find a good install program.  We prefer a C program (faster),
2634 # so one script is as good as another.  But avoid the broken or
2635 # incompatible versions:
2636 # SysV /etc/install, /usr/sbin/install
2637 # SunOS /usr/etc/install
2638 # IRIX /sbin/install
2639 # AIX /bin/install
2640 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2641 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2642 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2643 # ./install, which can be erroneously created by make from ./install.sh.
2644 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2645 echo "configure:2646: checking for a BSD compatible install" >&5
2646 if test -z "$INSTALL"; then
2647 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2648   echo $ac_n "(cached) $ac_c" 1>&6
2649 else
2650     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2651   for ac_dir in $PATH; do
2652     # Account for people who put trailing slashes in PATH elements.
2653     case "$ac_dir/" in
2654     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2655     *)
2656       # OSF1 and SCO ODT 3.0 have their own names for install.
2657       # Don't use installbsd from OSF since it installs stuff as root
2658       # by default.
2659       for ac_prog in ginstall scoinst install; do
2660         if test -f $ac_dir/$ac_prog; then
2661           if test $ac_prog = install &&
2662             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2663             # AIX install.  It has an incompatible calling convention.
2664             :
2665           elif test $ac_prog = install &&
2666             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2667             # program-specific install script used by HP pwplus--don't use.
2668             :
2669           else
2670             ac_cv_path_install="$ac_dir/$ac_prog -c"
2671             break 2
2672           fi
2673         fi
2674       done
2675       ;;
2676     esac
2677   done
2678   IFS="$ac_save_IFS"
2679
2680 fi
2681   if test "${ac_cv_path_install+set}" = set; then
2682     INSTALL="$ac_cv_path_install"
2683   else
2684     # As a last resort, use the slow shell script.  We don't cache a
2685     # path for INSTALL within a source directory, because that will
2686     # break other packages using the cache if that directory is
2687     # removed, or if the path is relative.
2688     INSTALL="$ac_install_sh"
2689   fi
2690 fi
2691 echo "$ac_t""$INSTALL" 1>&6
2692
2693 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2694 # It thinks the first close brace ends the variable substitution.
2695 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2696
2697 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2698
2699 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2700
2701
2702 cat >> confdefs.h <<\EOF
2703 #define HAVE_MKVERSION 1
2704 EOF
2705
2706
2707
2708
2709 ol_aix_threads=no
2710 case "$target" in
2711 *-*-aix*)       if test -z "$CC" ; then
2712                 case "$ol_with_threads" in
2713                 auto | yes |  posix) ol_aix_threads=yes ;;
2714                 esac
2715         fi
2716 ;;
2717 esac
2718
2719 if test $ol_aix_threads = yes ; then
2720         if test -z "${CC}" ; then
2721                 for ac_prog in cc_r xlc_r cc
2722 do
2723 # Extract the first word of "$ac_prog", so it can be a program name with args.
2724 set dummy $ac_prog; ac_word=$2
2725 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2726 echo "configure:2727: checking for $ac_word" >&5
2727 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2728   echo $ac_n "(cached) $ac_c" 1>&6
2729 else
2730   if test -n "$CC"; then
2731   ac_cv_prog_CC="$CC" # Let the user override the test.
2732 else
2733   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2734   ac_dummy="$PATH"
2735   for ac_dir in $ac_dummy; do
2736     test -z "$ac_dir" && ac_dir=.
2737     if test -f $ac_dir/$ac_word; then
2738       ac_cv_prog_CC="$ac_prog"
2739       break
2740     fi
2741   done
2742   IFS="$ac_save_ifs"
2743 fi
2744 fi
2745 CC="$ac_cv_prog_CC"
2746 if test -n "$CC"; then
2747   echo "$ac_t""$CC" 1>&6
2748 else
2749   echo "$ac_t""no" 1>&6
2750 fi
2751
2752 test -n "$CC" && break
2753 done
2754
2755
2756                 if test "$CC" = cc ; then
2757                                                 if test $ol_with_threads != auto ; then
2758                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2759                         else
2760                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2761                         fi
2762                         ol_with_threads=no
2763                 fi
2764         fi
2765
2766         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2767                 ol_with_threads=posix
2768                 ol_cv_pthread_create=yes
2769         fi
2770 fi
2771
2772 if test -z "${CC}"; then
2773         for ac_prog in cc gcc
2774 do
2775 # Extract the first word of "$ac_prog", so it can be a program name with args.
2776 set dummy $ac_prog; ac_word=$2
2777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2778 echo "configure:2779: checking for $ac_word" >&5
2779 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2780   echo $ac_n "(cached) $ac_c" 1>&6
2781 else
2782   if test -n "$CC"; then
2783   ac_cv_prog_CC="$CC" # Let the user override the test.
2784 else
2785   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2786   ac_dummy="$PATH"
2787   for ac_dir in $ac_dummy; do
2788     test -z "$ac_dir" && ac_dir=.
2789     if test -f $ac_dir/$ac_word; then
2790       ac_cv_prog_CC="$ac_prog"
2791       break
2792     fi
2793   done
2794   IFS="$ac_save_ifs"
2795 fi
2796 fi
2797 CC="$ac_cv_prog_CC"
2798 if test -n "$CC"; then
2799   echo "$ac_t""$CC" 1>&6
2800 else
2801   echo "$ac_t""no" 1>&6
2802 fi
2803
2804 test -n "$CC" && break
2805 done
2806 test -n "$CC" || CC="missing"
2807
2808
2809         if test "${CC}" = "missing" ; then
2810                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2811         fi
2812 fi
2813
2814 if test -z "${AR}"; then
2815         for ac_prog in ar gar
2816 do
2817 # Extract the first word of "$ac_prog", so it can be a program name with args.
2818 set dummy $ac_prog; ac_word=$2
2819 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2820 echo "configure:2821: checking for $ac_word" >&5
2821 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2822   echo $ac_n "(cached) $ac_c" 1>&6
2823 else
2824   if test -n "$AR"; then
2825   ac_cv_prog_AR="$AR" # Let the user override the test.
2826 else
2827   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2828   ac_dummy="$PATH"
2829   for ac_dir in $ac_dummy; do
2830     test -z "$ac_dir" && ac_dir=.
2831     if test -f $ac_dir/$ac_word; then
2832       ac_cv_prog_AR="$ac_prog"
2833       break
2834     fi
2835   done
2836   IFS="$ac_save_ifs"
2837 fi
2838 fi
2839 AR="$ac_cv_prog_AR"
2840 if test -n "$AR"; then
2841   echo "$ac_t""$AR" 1>&6
2842 else
2843   echo "$ac_t""no" 1>&6
2844 fi
2845
2846 test -n "$AR" && break
2847 done
2848 test -n "$AR" || AR="missing"
2849
2850
2851         if test "${AR}" = "missing" ; then
2852                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2853         fi
2854 fi
2855
2856
2857
2858 # Find the correct PATH separator.  Usually this is `:', but
2859 # DJGPP uses `;' like DOS.
2860 if test "X${PATH_SEPARATOR+set}" != Xset; then
2861   UNAME=${UNAME-`uname 2>/dev/null`}
2862   case X$UNAME in
2863     *-DOS) lt_cv_sys_path_separator=';' ;;
2864     *)     lt_cv_sys_path_separator=':' ;;
2865   esac
2866   PATH_SEPARATOR=$lt_cv_sys_path_separator
2867 fi
2868
2869 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2870 echo "configure:2871: checking for Cygwin environment" >&5
2871 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2872   echo $ac_n "(cached) $ac_c" 1>&6
2873 else
2874   cat > conftest.$ac_ext <<EOF
2875 #line 2876 "configure"
2876 #include "confdefs.h"
2877
2878 int main() {
2879
2880 #ifndef __CYGWIN__
2881 #define __CYGWIN__ __CYGWIN32__
2882 #endif
2883 return __CYGWIN__;
2884 ; return 0; }
2885 EOF
2886 if { (eval echo configure:2887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2887   rm -rf conftest*
2888   ac_cv_cygwin=yes
2889 else
2890   echo "configure: failed program was:" >&5
2891   cat conftest.$ac_ext >&5
2892   rm -rf conftest*
2893   ac_cv_cygwin=no
2894 fi
2895 rm -f conftest*
2896 fi
2897
2898 echo "$ac_t""$ac_cv_cygwin" 1>&6
2899 CYGWIN=
2900 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2901 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2902 echo "configure:2903: checking for mingw32 environment" >&5
2903 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2904   echo $ac_n "(cached) $ac_c" 1>&6
2905 else
2906   cat > conftest.$ac_ext <<EOF
2907 #line 2908 "configure"
2908 #include "confdefs.h"
2909
2910 int main() {
2911 return __MINGW32__;
2912 ; return 0; }
2913 EOF
2914 if { (eval echo configure:2915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2915   rm -rf conftest*
2916   ac_cv_mingw32=yes
2917 else
2918   echo "configure: failed program was:" >&5
2919   cat conftest.$ac_ext >&5
2920   rm -rf conftest*
2921   ac_cv_mingw32=no
2922 fi
2923 rm -f conftest*
2924 fi
2925
2926 echo "$ac_t""$ac_cv_mingw32" 1>&6
2927 MINGW32=
2928 test "$ac_cv_mingw32" = yes && MINGW32=yes
2929 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2930 echo "configure:2931: checking for EMX OS/2 environment" >&5
2931 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2932   echo $ac_n "(cached) $ac_c" 1>&6
2933 else
2934   cat > conftest.$ac_ext <<EOF
2935 #line 2936 "configure"
2936 #include "confdefs.h"
2937
2938 int main() {
2939 return __EMX__;
2940 ; return 0; }
2941 EOF
2942 if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2943   rm -rf conftest*
2944   ac_cv_emxos2=yes
2945 else
2946   echo "configure: failed program was:" >&5
2947   cat conftest.$ac_ext >&5
2948   rm -rf conftest*
2949   ac_cv_emxos2=no
2950 fi
2951 rm -f conftest*
2952 fi
2953
2954 echo "$ac_t""$ac_cv_emxos2" 1>&6
2955 EMXOS2=
2956 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2957 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2958 echo "configure:2959: checking how to run the C preprocessor" >&5
2959 # On Suns, sometimes $CPP names a directory.
2960 if test -n "$CPP" && test -d "$CPP"; then
2961   CPP=
2962 fi
2963 if test -z "$CPP"; then
2964 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967     # This must be in double quotes, not single quotes, because CPP may get
2968   # substituted into the Makefile and "${CC-cc}" will confuse make.
2969   CPP="${CC-cc} -E"
2970   # On the NeXT, cc -E runs the code through the compiler's parser,
2971   # not just through cpp.
2972   cat > conftest.$ac_ext <<EOF
2973 #line 2974 "configure"
2974 #include "confdefs.h"
2975 #include <assert.h>
2976 Syntax Error
2977 EOF
2978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2979 { (eval echo configure:2980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2981 if test -z "$ac_err"; then
2982   :
2983 else
2984   echo "$ac_err" >&5
2985   echo "configure: failed program was:" >&5
2986   cat conftest.$ac_ext >&5
2987   rm -rf conftest*
2988   CPP="${CC-cc} -E -traditional-cpp"
2989   cat > conftest.$ac_ext <<EOF
2990 #line 2991 "configure"
2991 #include "confdefs.h"
2992 #include <assert.h>
2993 Syntax Error
2994 EOF
2995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2996 { (eval echo configure:2997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2998 if test -z "$ac_err"; then
2999   :
3000 else
3001   echo "$ac_err" >&5
3002   echo "configure: failed program was:" >&5
3003   cat conftest.$ac_ext >&5
3004   rm -rf conftest*
3005   CPP="${CC-cc} -nologo -E"
3006   cat > conftest.$ac_ext <<EOF
3007 #line 3008 "configure"
3008 #include "confdefs.h"
3009 #include <assert.h>
3010 Syntax Error
3011 EOF
3012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3013 { (eval echo configure:3014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3015 if test -z "$ac_err"; then
3016   :
3017 else
3018   echo "$ac_err" >&5
3019   echo "configure: failed program was:" >&5
3020   cat conftest.$ac_ext >&5
3021   rm -rf conftest*
3022   CPP=/lib/cpp
3023 fi
3024 rm -f conftest*
3025 fi
3026 rm -f conftest*
3027 fi
3028 rm -f conftest*
3029   ac_cv_prog_CPP="$CPP"
3030 fi
3031   CPP="$ac_cv_prog_CPP"
3032 else
3033   ac_cv_prog_CPP="$CPP"
3034 fi
3035 echo "$ac_t""$CPP" 1>&6
3036
3037 # Check whether --enable-fast-install or --disable-fast-install was given.
3038 if test "${enable_fast_install+set}" = set; then
3039   enableval="$enable_fast_install"
3040   p=${PACKAGE-default}
3041 case $enableval in
3042 yes) enable_fast_install=yes ;;
3043 no) enable_fast_install=no ;;
3044 *)
3045   enable_fast_install=no
3046   # Look at the argument we got.  We use all the common list separators.
3047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3048   for pkg in $enableval; do
3049     if test "X$pkg" = "X$p"; then
3050       enable_fast_install=yes
3051     fi
3052   done
3053   IFS="$ac_save_ifs"
3054   ;;
3055 esac
3056 else
3057   enable_fast_install=yes
3058 fi
3059
3060 # Extract the first word of "gcc", so it can be a program name with args.
3061 set dummy gcc; ac_word=$2
3062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3063 echo "configure:3064: checking for $ac_word" >&5
3064 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   if test -n "$CC"; then
3068   ac_cv_prog_CC="$CC" # Let the user override the test.
3069 else
3070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3071   ac_dummy="$PATH"
3072   for ac_dir in $ac_dummy; do
3073     test -z "$ac_dir" && ac_dir=.
3074     if test -f $ac_dir/$ac_word; then
3075       ac_cv_prog_CC="gcc"
3076       break
3077     fi
3078   done
3079   IFS="$ac_save_ifs"
3080 fi
3081 fi
3082 CC="$ac_cv_prog_CC"
3083 if test -n "$CC"; then
3084   echo "$ac_t""$CC" 1>&6
3085 else
3086   echo "$ac_t""no" 1>&6
3087 fi
3088
3089 if test -z "$CC"; then
3090   # Extract the first word of "cc", so it can be a program name with args.
3091 set dummy cc; ac_word=$2
3092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3093 echo "configure:3094: checking for $ac_word" >&5
3094 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3095   echo $ac_n "(cached) $ac_c" 1>&6
3096 else
3097   if test -n "$CC"; then
3098   ac_cv_prog_CC="$CC" # Let the user override the test.
3099 else
3100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3101   ac_prog_rejected=no
3102   ac_dummy="$PATH"
3103   for ac_dir in $ac_dummy; do
3104     test -z "$ac_dir" && ac_dir=.
3105     if test -f $ac_dir/$ac_word; then
3106       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3107         ac_prog_rejected=yes
3108         continue
3109       fi
3110       ac_cv_prog_CC="cc"
3111       break
3112     fi
3113   done
3114   IFS="$ac_save_ifs"
3115 if test $ac_prog_rejected = yes; then
3116   # We found a bogon in the path, so make sure we never use it.
3117   set dummy $ac_cv_prog_CC
3118   shift
3119   if test $# -gt 0; then
3120     # We chose a different compiler from the bogus one.
3121     # However, it has the same basename, so the bogon will be chosen
3122     # first if we set CC to just the basename; use the full file name.
3123     shift
3124     set dummy "$ac_dir/$ac_word" "$@"
3125     shift
3126     ac_cv_prog_CC="$@"
3127   fi
3128 fi
3129 fi
3130 fi
3131 CC="$ac_cv_prog_CC"
3132 if test -n "$CC"; then
3133   echo "$ac_t""$CC" 1>&6
3134 else
3135   echo "$ac_t""no" 1>&6
3136 fi
3137
3138   if test -z "$CC"; then
3139     case "`uname -s`" in
3140     *win32* | *WIN32* | *CYGWIN*)
3141       # Extract the first word of "cl", so it can be a program name with args.
3142 set dummy cl; ac_word=$2
3143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3144 echo "configure:3145: checking for $ac_word" >&5
3145 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   if test -n "$CC"; then
3149   ac_cv_prog_CC="$CC" # Let the user override the test.
3150 else
3151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3152   ac_dummy="$PATH"
3153   for ac_dir in $ac_dummy; do
3154     test -z "$ac_dir" && ac_dir=.
3155     if test -f $ac_dir/$ac_word; then
3156       ac_cv_prog_CC="cl"
3157       break
3158     fi
3159   done
3160   IFS="$ac_save_ifs"
3161 fi
3162 fi
3163 CC="$ac_cv_prog_CC"
3164 if test -n "$CC"; then
3165   echo "$ac_t""$CC" 1>&6
3166 else
3167   echo "$ac_t""no" 1>&6
3168 fi
3169  ;;
3170     esac
3171   fi
3172   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3173 fi
3174
3175 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3176 echo "configure:3177: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3177
3178 ac_ext=c
3179 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3180 ac_cpp='$CPP $CPPFLAGS'
3181 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3182 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3183 cross_compiling=$ac_cv_prog_cc_cross
3184
3185 cat > conftest.$ac_ext << EOF
3186
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189
3190 main(){return(0);}
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3193   ac_cv_prog_cc_works=yes
3194   # If we can't run a trivial program, we are probably using a cross compiler.
3195   if (./conftest; exit) 2>/dev/null; then
3196     ac_cv_prog_cc_cross=no
3197   else
3198     ac_cv_prog_cc_cross=yes
3199   fi
3200 else
3201   echo "configure: failed program was:" >&5
3202   cat conftest.$ac_ext >&5
3203   ac_cv_prog_cc_works=no
3204 fi
3205 rm -fr conftest*
3206 ac_ext=c
3207 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3208 ac_cpp='$CPP $CPPFLAGS'
3209 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3210 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3211 cross_compiling=$ac_cv_prog_cc_cross
3212
3213 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3214 if test $ac_cv_prog_cc_works = no; then
3215   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3216 fi
3217 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3218 echo "configure:3219: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3219 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3220 cross_compiling=$ac_cv_prog_cc_cross
3221
3222 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3223 echo "configure:3224: checking whether we are using GNU C" >&5
3224 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227   cat > conftest.c <<EOF
3228 #ifdef __GNUC__
3229   yes;
3230 #endif
3231 EOF
3232 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3233: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3233   ac_cv_prog_gcc=yes
3234 else
3235   ac_cv_prog_gcc=no
3236 fi
3237 fi
3238
3239 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3240
3241 if test $ac_cv_prog_gcc = yes; then
3242   GCC=yes
3243 else
3244   GCC=
3245 fi
3246
3247 ac_test_CFLAGS="${CFLAGS+set}"
3248 ac_save_CFLAGS="$CFLAGS"
3249 CFLAGS=
3250 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3251 echo "configure:3252: checking whether ${CC-cc} accepts -g" >&5
3252 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3253   echo $ac_n "(cached) $ac_c" 1>&6
3254 else
3255   echo 'void f(){}' > conftest.c
3256 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3257   ac_cv_prog_cc_g=yes
3258 else
3259   ac_cv_prog_cc_g=no
3260 fi
3261 rm -f conftest*
3262
3263 fi
3264
3265 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3266 if test "$ac_test_CFLAGS" = set; then
3267   CFLAGS="$ac_save_CFLAGS"
3268 elif test $ac_cv_prog_cc_g = yes; then
3269   if test "$GCC" = yes; then
3270     CFLAGS="-g -O2"
3271   else
3272     CFLAGS="-g"
3273   fi
3274 else
3275   if test "$GCC" = yes; then
3276     CFLAGS="-O2"
3277   else
3278     CFLAGS=
3279   fi
3280 fi
3281
3282 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3283 if test "${with_gnu_ld+set}" = set; then
3284   withval="$with_gnu_ld"
3285   test "$withval" = no || with_gnu_ld=yes
3286 else
3287   with_gnu_ld=no
3288 fi
3289
3290 ac_prog=ld
3291 if test "$GCC" = yes; then
3292   # Check if gcc -print-prog-name=ld gives a path.
3293   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3294 echo "configure:3295: checking for ld used by GCC" >&5
3295   case $host in
3296   *-*-mingw*)
3297     # gcc leaves a trailing carriage return which upsets mingw
3298     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3299   *)
3300     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3301   esac
3302   case $ac_prog in
3303     # Accept absolute paths.
3304     [\\/]* | [A-Za-z]:[\\/]*)
3305       re_direlt='/[^/][^/]*/\.\./'
3306       # Canonicalize the path of ld
3307       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3308       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3309         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3310       done
3311       test -z "$LD" && LD="$ac_prog"
3312       ;;
3313   "")
3314     # If it fails, then pretend we aren't using GCC.
3315     ac_prog=ld
3316     ;;
3317   *)
3318     # If it is relative, then search for the first ld in PATH.
3319     with_gnu_ld=unknown
3320     ;;
3321   esac
3322 elif test "$with_gnu_ld" = yes; then
3323   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3324 echo "configure:3325: checking for GNU ld" >&5
3325 else
3326   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3327 echo "configure:3328: checking for non-GNU ld" >&5
3328 fi
3329 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3330   echo $ac_n "(cached) $ac_c" 1>&6
3331 else
3332   if test -z "$LD"; then
3333   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3334   for ac_dir in $PATH; do
3335     test -z "$ac_dir" && ac_dir=.
3336     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3337       lt_cv_path_LD="$ac_dir/$ac_prog"
3338       # Check to see if the program is GNU ld.  I'd rather use --version,
3339       # but apparently some GNU ld's only accept -v.
3340       # Break only if it was the GNU/non-GNU ld that we prefer.
3341       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3342         test "$with_gnu_ld" != no && break
3343       else
3344         test "$with_gnu_ld" != yes && break
3345       fi
3346     fi
3347   done
3348   IFS="$ac_save_ifs"
3349 else
3350   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3351 fi
3352 fi
3353
3354 LD="$lt_cv_path_LD"
3355 if test -n "$LD"; then
3356   echo "$ac_t""$LD" 1>&6
3357 else
3358   echo "$ac_t""no" 1>&6
3359 fi
3360 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3361 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3362 echo "configure:3363: checking if the linker ($LD) is GNU ld" >&5
3363 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3364   echo $ac_n "(cached) $ac_c" 1>&6
3365 else
3366   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3367 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3368   lt_cv_prog_gnu_ld=yes
3369 else
3370   lt_cv_prog_gnu_ld=no
3371 fi
3372 fi
3373
3374 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3375 with_gnu_ld=$lt_cv_prog_gnu_ld
3376
3377
3378 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3379 echo "configure:3380: checking for $LD option to reload object files" >&5
3380 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3381   echo $ac_n "(cached) $ac_c" 1>&6
3382 else
3383   lt_cv_ld_reload_flag='-r'
3384 fi
3385
3386 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3387 reload_flag=$lt_cv_ld_reload_flag
3388 test -n "$reload_flag" && reload_flag=" $reload_flag"
3389
3390 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3391 echo "configure:3392: checking for BSD-compatible nm" >&5
3392 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3393   echo $ac_n "(cached) $ac_c" 1>&6
3394 else
3395   if test -n "$NM"; then
3396   # Let the user override the test.
3397   lt_cv_path_NM="$NM"
3398 else
3399   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3400   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3401     test -z "$ac_dir" && ac_dir=.
3402     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3403     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3404       # Check to see if the nm accepts a BSD-compat flag.
3405       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3406       #   nm: unknown option "B" ignored
3407       # Tru64's nm complains that /dev/null is an invalid object file
3408       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3409         lt_cv_path_NM="$tmp_nm -B"
3410         break
3411       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3412         lt_cv_path_NM="$tmp_nm -p"
3413         break
3414       else
3415         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3416         continue # so that we can try to find one that supports BSD flags
3417       fi
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3422 fi
3423 fi
3424
3425 NM="$lt_cv_path_NM"
3426 echo "$ac_t""$NM" 1>&6
3427
3428 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3429 echo "configure:3430: checking for a sed that does not truncate output" >&5
3430 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3431   echo $ac_n "(cached) $ac_c" 1>&6
3432 else
3433   # Loop through the user's path and test for sed and gsed.
3434 # Then use that list of sed's as ones to test for truncation.
3435 as_executable_p="test -f"
3436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3437 for as_dir in $PATH
3438 do
3439   IFS=$as_save_IFS
3440   test -z "$as_dir" && as_dir=.
3441   for ac_prog in sed gsed; do
3442     for ac_exec_ext in '' $ac_executable_extensions; do
3443       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3444         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3445       fi
3446     done
3447   done
3448 done
3449
3450   # Create a temporary directory, and hook for its removal unless debugging.
3451 $debug ||
3452 {
3453   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3454   trap '{ (exit 1); exit 1; }' 1 2 13 15
3455 }
3456
3457 # Create a (secure) tmp directory for tmp files.
3458 : ${TMPDIR=/tmp}
3459 {
3460   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3461   test -n "$tmp" && test -d "$tmp"
3462 }  ||
3463 {
3464   tmp=$TMPDIR/sed$$-$RANDOM
3465   (umask 077 && mkdir $tmp)
3466 } ||
3467 {
3468    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3469    { (exit 1); exit 1; }
3470 }
3471   _max=0
3472   _count=0
3473   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3474   # along with /bin/sed that truncates output.
3475   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3476     test ! -f ${_sed} && break
3477     cat /dev/null > "$tmp/sed.in"
3478     _count=0
3479     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3480     # Check for GNU sed and select it if it is found.
3481     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3482       lt_cv_path_SED=${_sed}
3483       break
3484     fi
3485     while true; do
3486       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3487       mv "$tmp/sed.tmp" "$tmp/sed.in"
3488       cp "$tmp/sed.in" "$tmp/sed.nl"
3489       echo >>"$tmp/sed.nl"
3490       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3491       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3492       # 40000 chars as input seems more than enough
3493       test $_count -gt 10 && break
3494       _count=`expr $_count + 1`
3495       if test $_count -gt $_max; then
3496         _max=$_count
3497         lt_cv_path_SED=$_sed
3498       fi
3499     done
3500   done
3501   rm -rf "$tmp"
3502
3503 fi
3504
3505 if test "X$SED" != "X"; then
3506   lt_cv_path_SED=$SED
3507 else
3508   SED=$lt_cv_path_SED
3509 fi
3510 echo "$ac_t""$SED" 1>&6
3511
3512 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3513 echo "configure:3514: checking whether ln -s works" >&5
3514 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3515   echo $ac_n "(cached) $ac_c" 1>&6
3516 else
3517   rm -f conftestdata
3518 if ln -s X conftestdata 2>/dev/null
3519 then
3520   rm -f conftestdata
3521   ac_cv_prog_LN_S="ln -s"
3522 else
3523   ac_cv_prog_LN_S=ln
3524 fi
3525 fi
3526 LN_S="$ac_cv_prog_LN_S"
3527 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3528   echo "$ac_t""yes" 1>&6
3529 else
3530   echo "$ac_t""no" 1>&6
3531 fi
3532
3533 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3534 echo "configure:3535: checking how to recognise dependent libraries" >&5
3535 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3536   echo $ac_n "(cached) $ac_c" 1>&6
3537 else
3538   lt_cv_file_magic_cmd='$MAGIC_CMD'
3539 lt_cv_file_magic_test_file=
3540 lt_cv_deplibs_check_method='unknown'
3541 # Need to set the preceding variable on all platforms that support
3542 # interlibrary dependencies.
3543 # 'none' -- dependencies not supported.
3544 # `unknown' -- same as none, but documents that we really don't know.
3545 # 'pass_all' -- all dependencies passed with no checks.
3546 # 'test_compile' -- check by making test program.
3547 # 'file_magic [[regex]]' -- check by looking for files in library path
3548 # which responds to the $file_magic_cmd with a given egrep regex.
3549 # If you have `file' or equivalent on your system and you're not sure
3550 # whether `pass_all' will *always* work, you probably want this one.
3551
3552 case $host_os in
3553 aix4* | aix5*)
3554   lt_cv_deplibs_check_method=pass_all
3555   ;;
3556
3557 beos*)
3558   lt_cv_deplibs_check_method=pass_all
3559   ;;
3560
3561 bsdi4*)
3562   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3563   lt_cv_file_magic_cmd='/usr/bin/file -L'
3564   lt_cv_file_magic_test_file=/shlib/libc.so
3565   ;;
3566
3567 cygwin* | mingw* | pw32*)
3568   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3569   lt_cv_file_magic_cmd='$OBJDUMP -f'
3570   ;;
3571
3572 darwin* | rhapsody*)
3573   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3574   lt_cv_file_magic_cmd='/usr/bin/file -L'
3575   case "$host_os" in
3576   rhapsody* | darwin1.[012])
3577     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3578     ;;
3579   *) # Darwin 1.3 on
3580     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3581     ;;
3582   esac
3583   ;;
3584
3585 freebsd*)
3586   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3587     case $host_cpu in
3588     i*86 )
3589       # Not sure whether the presence of OpenBSD here was a mistake.
3590       # Let's accept both of them until this is cleared up.
3591       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3592       lt_cv_file_magic_cmd=/usr/bin/file
3593       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3594       ;;
3595     esac
3596   else
3597     lt_cv_deplibs_check_method=pass_all
3598   fi
3599   ;;
3600
3601 gnu*)
3602   lt_cv_deplibs_check_method=pass_all
3603   ;;
3604
3605 hpux10.20*|hpux11*)
3606   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3607   lt_cv_file_magic_cmd=/usr/bin/file
3608   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3609   ;;
3610
3611 irix5* | irix6* | nonstopux*)
3612   case $host_os in
3613   irix5* | nonstopux*)
3614     # this will be overridden with pass_all, but let us keep it just in case
3615     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3616     ;;
3617   *)
3618     case $LD in
3619     *-32|*"-32 ") libmagic=32-bit;;
3620     *-n32|*"-n32 ") libmagic=N32;;
3621     *-64|*"-64 ") libmagic=64-bit;;
3622     *) libmagic=never-match;;
3623     esac
3624     # this will be overridden with pass_all, but let us keep it just in case
3625     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3626     ;;
3627   esac
3628   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3629   lt_cv_deplibs_check_method=pass_all
3630   ;;
3631
3632 # This must be Linux ELF.
3633 linux-gnu*)
3634   case $host_cpu in
3635   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3636     lt_cv_deplibs_check_method=pass_all ;;
3637   *)
3638     # glibc up to 2.1.1 does not perform some relocations on ARM
3639     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3640   esac
3641   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3642   ;;
3643
3644 netbsd*)
3645   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3646     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3647   else
3648     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3649   fi
3650   ;;
3651
3652 newos6*)
3653   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3654   lt_cv_file_magic_cmd=/usr/bin/file
3655   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3656   ;;
3657
3658 openbsd*)
3659   lt_cv_file_magic_cmd=/usr/bin/file
3660   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3661   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3662     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3663   else
3664     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3665   fi
3666   ;;
3667
3668 openedition*)
3669   lt_cv_deplibs_check_method=pass_all
3670   ;;
3671
3672 osf3* | osf4* | osf5*)
3673   # this will be overridden with pass_all, but let us keep it just in case
3674   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3675   lt_cv_file_magic_test_file=/shlib/libc.so
3676   lt_cv_deplibs_check_method=pass_all
3677   ;;
3678
3679 sco3.2v5*)
3680   lt_cv_deplibs_check_method=pass_all
3681   ;;
3682
3683 solaris*)
3684   lt_cv_deplibs_check_method=pass_all
3685   lt_cv_file_magic_test_file=/lib/libc.so
3686   ;;
3687
3688 sysv5uw[78]* | sysv4*uw2*)
3689   lt_cv_deplibs_check_method=pass_all
3690   ;;
3691
3692 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3693   case $host_vendor in
3694   motorola)
3695     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]'
3696     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3697     ;;
3698   ncr)
3699     lt_cv_deplibs_check_method=pass_all
3700     ;;
3701   sequent)
3702     lt_cv_file_magic_cmd='/bin/file'
3703     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3704     ;;
3705   sni)
3706     lt_cv_file_magic_cmd='/bin/file'
3707     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3708     lt_cv_file_magic_test_file=/lib/libc.so
3709     ;;
3710   siemens)
3711     lt_cv_deplibs_check_method=pass_all
3712     ;;
3713   esac
3714   ;;
3715 esac
3716
3717 fi
3718
3719 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3720 file_magic_cmd=$lt_cv_file_magic_cmd
3721 deplibs_check_method=$lt_cv_deplibs_check_method
3722
3723 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3724 echo "configure:3725: checking for object suffix" >&5
3725 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3726   echo $ac_n "(cached) $ac_c" 1>&6
3727 else
3728   rm -f conftest*
3729 echo 'int i = 1;' > conftest.$ac_ext
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3731   for ac_file in conftest.*; do
3732     case $ac_file in
3733     *.c) ;;
3734     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3735     esac
3736   done
3737 else
3738   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3739 fi
3740 rm -f conftest*
3741 fi
3742
3743 echo "$ac_t""$ac_cv_objext" 1>&6
3744 OBJEXT=$ac_cv_objext
3745 ac_objext=$ac_cv_objext
3746
3747
3748
3749
3750 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3751 echo "configure:3752: checking for executable suffix" >&5
3752 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3753   echo $ac_n "(cached) $ac_c" 1>&6
3754 else
3755   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3756   ac_cv_exeext=.exe
3757 else
3758   rm -f conftest*
3759   echo 'int main () { return 0; }' > conftest.$ac_ext
3760   ac_cv_exeext=
3761   if { (eval echo configure:3762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3762     for file in conftest.*; do
3763       case $file in
3764       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3765       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3766       esac
3767     done
3768   else
3769     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3770   fi
3771   rm -f conftest*
3772   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3773 fi
3774 fi
3775
3776 EXEEXT=""
3777 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3778 echo "$ac_t""${ac_cv_exeext}" 1>&6
3779 ac_exeext=$EXEEXT
3780
3781 if test $host != $build; then
3782   ac_tool_prefix=${host_alias}-
3783 else
3784   ac_tool_prefix=
3785 fi
3786
3787
3788
3789
3790 # Check for command to grab the raw symbol name followed by C symbol from nm.
3791 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3792 echo "configure:3793: checking command to parse $NM output" >&5
3793 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3794   echo $ac_n "(cached) $ac_c" 1>&6
3795 else
3796   
3797 # These are sane defaults that work on at least a few old systems.
3798 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3799
3800 # Character class describing NM global symbol codes.
3801 symcode='[BCDEGRST]'
3802
3803 # Regexp to match symbols that can be accessed directly from C.
3804 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3805
3806 # Transform the above into a raw symbol and a C symbol.
3807 symxfrm='\1 \2\3 \3'
3808
3809 # Transform an extracted symbol line into a proper C declaration
3810 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3811
3812 # Transform an extracted symbol line into symbol name and symbol address
3813 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'"
3814
3815 # Define system-specific variables.
3816 case $host_os in
3817 aix*)
3818   symcode='[BCDT]'
3819   ;;
3820 cygwin* | mingw* | pw32*)
3821   symcode='[ABCDGISTW]'
3822   ;;
3823 hpux*) # Its linker distinguishes data from code symbols
3824   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3825   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'"
3826   ;;
3827 irix* | nonstopux*)
3828   symcode='[BCDEGRST]'
3829   ;;
3830 osf*)
3831   symcode='[BCDEGQRST]'
3832   ;;
3833 solaris* | sysv5*)
3834   symcode='[BDT]'
3835   ;;
3836 sysv4)
3837   symcode='[DFNSTU]'
3838   ;;
3839 esac
3840
3841 # Handle CRLF in mingw tool chain
3842 opt_cr=
3843 case $host_os in
3844 mingw*)
3845   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3846   ;;
3847 esac
3848
3849 # If we're using GNU nm, then use its standard symbol codes.
3850 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3851   symcode='[ABCDGISTW]'
3852 fi
3853
3854 # Try without a prefix undercore, then with it.
3855 for ac_symprfx in "" "_"; do
3856
3857   # Write the raw and C identifiers.
3858 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3859
3860   # Check to see that the pipe works correctly.
3861   pipe_works=no
3862   rm -f conftest*
3863   cat > conftest.$ac_ext <<EOF
3864 #ifdef __cplusplus
3865 extern "C" {
3866 #endif
3867 char nm_test_var;
3868 void nm_test_func(){}
3869 #ifdef __cplusplus
3870 }
3871 #endif
3872 int main(){nm_test_var='a';nm_test_func();return(0);}
3873 EOF
3874
3875   if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3876     # Now try to grab the symbols.
3877     nlist=conftest.nm
3878     if { (eval echo configure:3879: \"$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
3879       # Try sorting and uniquifying the output.
3880       if sort "$nlist" | uniq > "$nlist"T; then
3881         mv -f "$nlist"T "$nlist"
3882       else
3883         rm -f "$nlist"T
3884       fi
3885
3886       # Make sure that we snagged all the symbols we need.
3887       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3888         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3889           cat <<EOF > conftest.$ac_ext
3890 #ifdef __cplusplus
3891 extern "C" {
3892 #endif
3893
3894 EOF
3895           # Now generate the symbol file.
3896           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3897
3898           cat <<EOF >> conftest.$ac_ext
3899 #if defined (__STDC__) && __STDC__
3900 # define lt_ptr void *
3901 #else
3902 # define lt_ptr char *
3903 # define const
3904 #endif
3905
3906 /* The mapping between symbol names and symbols. */
3907 const struct {
3908   const char *name;
3909   lt_ptr address;
3910 }
3911 lt_preloaded_symbols[] =
3912 {
3913 EOF
3914           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3915           cat <<\EOF >> conftest.$ac_ext
3916   {0, (lt_ptr) 0}
3917 };
3918
3919 #ifdef __cplusplus
3920 }
3921 #endif
3922 EOF
3923           # Now try linking the two files.
3924           mv conftest.$ac_objext conftstm.$ac_objext
3925           save_LIBS="$LIBS"
3926           save_CFLAGS="$CFLAGS"
3927           LIBS="conftstm.$ac_objext"
3928           CFLAGS="$CFLAGS$no_builtin_flag"
3929           if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
3930             pipe_works=yes
3931           fi
3932           LIBS="$save_LIBS"
3933           CFLAGS="$save_CFLAGS"
3934         else
3935           echo "cannot find nm_test_func in $nlist" >&5
3936         fi
3937       else
3938         echo "cannot find nm_test_var in $nlist" >&5
3939       fi
3940     else
3941       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3942     fi
3943   else
3944     echo "$progname: failed program was:" >&5
3945     cat conftest.$ac_ext >&5
3946   fi
3947   rm -f conftest* conftst*
3948
3949   # Do not use the global_symbol_pipe unless it works.
3950   if test "$pipe_works" = yes; then
3951     break
3952   else
3953     lt_cv_sys_global_symbol_pipe=
3954   fi
3955 done
3956
3957 fi
3958
3959 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3960 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3961   global_symbol_to_cdecl=
3962   global_symbol_to_c_name_address=
3963 else
3964   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3965   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3966 fi
3967 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3968 then
3969   echo "$ac_t""failed" 1>&6
3970 else
3971   echo "$ac_t""ok" 1>&6
3972 fi
3973
3974 for ac_hdr in dlfcn.h
3975 do
3976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3978 echo "configure:3979: checking for $ac_hdr" >&5
3979 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3980   echo $ac_n "(cached) $ac_c" 1>&6
3981 else
3982   cat > conftest.$ac_ext <<EOF
3983 #line 3984 "configure"
3984 #include "confdefs.h"
3985 #include <$ac_hdr>
3986 EOF
3987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3988 { (eval echo configure:3989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3990 if test -z "$ac_err"; then
3991   rm -rf conftest*
3992   eval "ac_cv_header_$ac_safe=yes"
3993 else
3994   echo "$ac_err" >&5
3995   echo "configure: failed program was:" >&5
3996   cat conftest.$ac_ext >&5
3997   rm -rf conftest*
3998   eval "ac_cv_header_$ac_safe=no"
3999 fi
4000 rm -f conftest*
4001 fi
4002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4003   echo "$ac_t""yes" 1>&6
4004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4005   cat >> confdefs.h <<EOF
4006 #define $ac_tr_hdr 1
4007 EOF
4008  
4009 else
4010   echo "$ac_t""no" 1>&6
4011 fi
4012 done
4013
4014
4015
4016
4017
4018
4019 # Only perform the check for file, if the check method requires it
4020 case $deplibs_check_method in
4021 file_magic*)
4022   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4023     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4024 echo "configure:4025: checking for ${ac_tool_prefix}file" >&5
4025 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4026   echo $ac_n "(cached) $ac_c" 1>&6
4027 else
4028   case $MAGIC_CMD in
4029   /*)
4030   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4031   ;;
4032   ?:/*)
4033   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4034   ;;
4035   *)
4036   ac_save_MAGIC_CMD="$MAGIC_CMD"
4037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4038   ac_dummy="/usr/bin:$PATH"
4039   for ac_dir in $ac_dummy; do
4040     test -z "$ac_dir" && ac_dir=.
4041     if test -f $ac_dir/${ac_tool_prefix}file; then
4042       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4043       if test -n "$file_magic_test_file"; then
4044         case $deplibs_check_method in
4045         "file_magic "*)
4046           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4047           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4048           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4049             egrep "$file_magic_regex" > /dev/null; then
4050             :
4051           else
4052             cat <<EOF 1>&2
4053
4054 *** Warning: the command libtool uses to detect shared libraries,
4055 *** $file_magic_cmd, produces output that libtool cannot recognize.
4056 *** The result is that libtool may fail to recognize shared libraries
4057 *** as such.  This will affect the creation of libtool libraries that
4058 *** depend on shared libraries, but programs linked with such libtool
4059 *** libraries will work regardless of this problem.  Nevertheless, you
4060 *** may want to report the problem to your system manager and/or to
4061 *** bug-libtool@gnu.org
4062
4063 EOF
4064           fi ;;
4065         esac
4066       fi
4067       break
4068     fi
4069   done
4070   IFS="$ac_save_ifs"
4071   MAGIC_CMD="$ac_save_MAGIC_CMD"
4072   ;;
4073 esac
4074 fi
4075
4076 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4077 if test -n "$MAGIC_CMD"; then
4078   echo "$ac_t""$MAGIC_CMD" 1>&6
4079 else
4080   echo "$ac_t""no" 1>&6
4081 fi
4082
4083 if test -z "$lt_cv_path_MAGIC_CMD"; then
4084   if test -n "$ac_tool_prefix"; then
4085     echo $ac_n "checking for file""... $ac_c" 1>&6
4086 echo "configure:4087: checking for file" >&5
4087 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   case $MAGIC_CMD in
4091   /*)
4092   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4093   ;;
4094   ?:/*)
4095   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4096   ;;
4097   *)
4098   ac_save_MAGIC_CMD="$MAGIC_CMD"
4099   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4100   ac_dummy="/usr/bin:$PATH"
4101   for ac_dir in $ac_dummy; do
4102     test -z "$ac_dir" && ac_dir=.
4103     if test -f $ac_dir/file; then
4104       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4105       if test -n "$file_magic_test_file"; then
4106         case $deplibs_check_method in
4107         "file_magic "*)
4108           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4109           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4110           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4111             egrep "$file_magic_regex" > /dev/null; then
4112             :
4113           else
4114             cat <<EOF 1>&2
4115
4116 *** Warning: the command libtool uses to detect shared libraries,
4117 *** $file_magic_cmd, produces output that libtool cannot recognize.
4118 *** The result is that libtool may fail to recognize shared libraries
4119 *** as such.  This will affect the creation of libtool libraries that
4120 *** depend on shared libraries, but programs linked with such libtool
4121 *** libraries will work regardless of this problem.  Nevertheless, you
4122 *** may want to report the problem to your system manager and/or to
4123 *** bug-libtool@gnu.org
4124
4125 EOF
4126           fi ;;
4127         esac
4128       fi
4129       break
4130     fi
4131   done
4132   IFS="$ac_save_ifs"
4133   MAGIC_CMD="$ac_save_MAGIC_CMD"
4134   ;;
4135 esac
4136 fi
4137
4138 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4139 if test -n "$MAGIC_CMD"; then
4140   echo "$ac_t""$MAGIC_CMD" 1>&6
4141 else
4142   echo "$ac_t""no" 1>&6
4143 fi
4144
4145   else
4146     MAGIC_CMD=:
4147   fi
4148 fi
4149
4150   fi
4151   ;;
4152 esac
4153
4154 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4155 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4157 echo "configure:4158: checking for $ac_word" >&5
4158 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4159   echo $ac_n "(cached) $ac_c" 1>&6
4160 else
4161   if test -n "$RANLIB"; then
4162   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4163 else
4164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4165   ac_dummy="$PATH"
4166   for ac_dir in $ac_dummy; do
4167     test -z "$ac_dir" && ac_dir=.
4168     if test -f $ac_dir/$ac_word; then
4169       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4170       break
4171     fi
4172   done
4173   IFS="$ac_save_ifs"
4174 fi
4175 fi
4176 RANLIB="$ac_cv_prog_RANLIB"
4177 if test -n "$RANLIB"; then
4178   echo "$ac_t""$RANLIB" 1>&6
4179 else
4180   echo "$ac_t""no" 1>&6
4181 fi
4182
4183
4184 if test -z "$ac_cv_prog_RANLIB"; then
4185 if test -n "$ac_tool_prefix"; then
4186   # Extract the first word of "ranlib", so it can be a program name with args.
4187 set dummy ranlib; ac_word=$2
4188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4189 echo "configure:4190: checking for $ac_word" >&5
4190 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4191   echo $ac_n "(cached) $ac_c" 1>&6
4192 else
4193   if test -n "$RANLIB"; then
4194   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4195 else
4196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4197   ac_dummy="$PATH"
4198   for ac_dir in $ac_dummy; do
4199     test -z "$ac_dir" && ac_dir=.
4200     if test -f $ac_dir/$ac_word; then
4201       ac_cv_prog_RANLIB="ranlib"
4202       break
4203     fi
4204   done
4205   IFS="$ac_save_ifs"
4206   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4207 fi
4208 fi
4209 RANLIB="$ac_cv_prog_RANLIB"
4210 if test -n "$RANLIB"; then
4211   echo "$ac_t""$RANLIB" 1>&6
4212 else
4213   echo "$ac_t""no" 1>&6
4214 fi
4215
4216 else
4217   RANLIB=":"
4218 fi
4219 fi
4220
4221 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4222 set dummy ${ac_tool_prefix}strip; ac_word=$2
4223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4224 echo "configure:4225: checking for $ac_word" >&5
4225 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4226   echo $ac_n "(cached) $ac_c" 1>&6
4227 else
4228   if test -n "$STRIP"; then
4229   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4230 else
4231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4232   ac_dummy="$PATH"
4233   for ac_dir in $ac_dummy; do
4234     test -z "$ac_dir" && ac_dir=.
4235     if test -f $ac_dir/$ac_word; then
4236       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4237       break
4238     fi
4239   done
4240   IFS="$ac_save_ifs"
4241 fi
4242 fi
4243 STRIP="$ac_cv_prog_STRIP"
4244 if test -n "$STRIP"; then
4245   echo "$ac_t""$STRIP" 1>&6
4246 else
4247   echo "$ac_t""no" 1>&6
4248 fi
4249
4250
4251 if test -z "$ac_cv_prog_STRIP"; then
4252 if test -n "$ac_tool_prefix"; then
4253   # Extract the first word of "strip", so it can be a program name with args.
4254 set dummy strip; ac_word=$2
4255 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4256 echo "configure:4257: checking for $ac_word" >&5
4257 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4258   echo $ac_n "(cached) $ac_c" 1>&6
4259 else
4260   if test -n "$STRIP"; then
4261   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4262 else
4263   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4264   ac_dummy="$PATH"
4265   for ac_dir in $ac_dummy; do
4266     test -z "$ac_dir" && ac_dir=.
4267     if test -f $ac_dir/$ac_word; then
4268       ac_cv_prog_STRIP="strip"
4269       break
4270     fi
4271   done
4272   IFS="$ac_save_ifs"
4273   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4274 fi
4275 fi
4276 STRIP="$ac_cv_prog_STRIP"
4277 if test -n "$STRIP"; then
4278   echo "$ac_t""$STRIP" 1>&6
4279 else
4280   echo "$ac_t""no" 1>&6
4281 fi
4282
4283 else
4284   STRIP=":"
4285 fi
4286 fi
4287
4288
4289 enable_dlopen=yes
4290 enable_win32_dll=yes
4291
4292 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4293 if test "${enable_libtool_lock+set}" = set; then
4294   enableval="$enable_libtool_lock"
4295   :
4296 fi
4297
4298 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4299
4300 # Some flags need to be propagated to the compiler or linker for good
4301 # libtool support.
4302 case $host in
4303 *-*-irix6*)
4304   # Find out which ABI we are using.
4305   echo '#line 4306 "configure"' > conftest.$ac_ext
4306   if { (eval echo configure:4307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4307     case `/usr/bin/file conftest.$ac_objext` in
4308     *32-bit*)
4309       LD="${LD-ld} -32"
4310       ;;
4311     *N32*)
4312       LD="${LD-ld} -n32"
4313       ;;
4314     *64-bit*)
4315       LD="${LD-ld} -64"
4316       ;;
4317     esac
4318   fi
4319   rm -rf conftest*
4320   ;;
4321
4322 *-*-sco3.2v5*)
4323   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4324   SAVE_CFLAGS="$CFLAGS"
4325   CFLAGS="$CFLAGS -belf"
4326   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4327 echo "configure:4328: checking whether the C compiler needs -belf" >&5
4328 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4329   echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331   
4332      ac_ext=c
4333 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4334 ac_cpp='$CPP $CPPFLAGS'
4335 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4336 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4337 cross_compiling=$ac_cv_prog_cc_cross
4338
4339      cat > conftest.$ac_ext <<EOF
4340 #line 4341 "configure"
4341 #include "confdefs.h"
4342
4343 int main() {
4344
4345 ; return 0; }
4346 EOF
4347 if { (eval echo configure:4348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4348   rm -rf conftest*
4349   lt_cv_cc_needs_belf=yes
4350 else
4351   echo "configure: failed program was:" >&5
4352   cat conftest.$ac_ext >&5
4353   rm -rf conftest*
4354   lt_cv_cc_needs_belf=no
4355 fi
4356 rm -f conftest*
4357      ac_ext=c
4358 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4359 ac_cpp='$CPP $CPPFLAGS'
4360 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4361 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4362 cross_compiling=$ac_cv_prog_cc_cross
4363
4364 fi
4365
4366 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4367   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4368     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4369     CFLAGS="$SAVE_CFLAGS"
4370   fi
4371   ;;
4372
4373 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4374   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4375 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4376 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4377 echo "configure:4378: checking for $ac_word" >&5
4378 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4379   echo $ac_n "(cached) $ac_c" 1>&6
4380 else
4381   if test -n "$DLLTOOL"; then
4382   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4383 else
4384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4385   ac_dummy="$PATH"
4386   for ac_dir in $ac_dummy; do
4387     test -z "$ac_dir" && ac_dir=.
4388     if test -f $ac_dir/$ac_word; then
4389       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4390       break
4391     fi
4392   done
4393   IFS="$ac_save_ifs"
4394 fi
4395 fi
4396 DLLTOOL="$ac_cv_prog_DLLTOOL"
4397 if test -n "$DLLTOOL"; then
4398   echo "$ac_t""$DLLTOOL" 1>&6
4399 else
4400   echo "$ac_t""no" 1>&6
4401 fi
4402
4403
4404 if test -z "$ac_cv_prog_DLLTOOL"; then
4405 if test -n "$ac_tool_prefix"; then
4406   # Extract the first word of "dlltool", so it can be a program name with args.
4407 set dummy dlltool; ac_word=$2
4408 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4409 echo "configure:4410: checking for $ac_word" >&5
4410 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4411   echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413   if test -n "$DLLTOOL"; then
4414   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4415 else
4416   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4417   ac_dummy="$PATH"
4418   for ac_dir in $ac_dummy; do
4419     test -z "$ac_dir" && ac_dir=.
4420     if test -f $ac_dir/$ac_word; then
4421       ac_cv_prog_DLLTOOL="dlltool"
4422       break
4423     fi
4424   done
4425   IFS="$ac_save_ifs"
4426   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4427 fi
4428 fi
4429 DLLTOOL="$ac_cv_prog_DLLTOOL"
4430 if test -n "$DLLTOOL"; then
4431   echo "$ac_t""$DLLTOOL" 1>&6
4432 else
4433   echo "$ac_t""no" 1>&6
4434 fi
4435
4436 else
4437   DLLTOOL="false"
4438 fi
4439 fi
4440
4441   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4442 set dummy ${ac_tool_prefix}as; ac_word=$2
4443 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4444 echo "configure:4445: checking for $ac_word" >&5
4445 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4446   echo $ac_n "(cached) $ac_c" 1>&6
4447 else
4448   if test -n "$AS"; then
4449   ac_cv_prog_AS="$AS" # Let the user override the test.
4450 else
4451   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4452   ac_dummy="$PATH"
4453   for ac_dir in $ac_dummy; do
4454     test -z "$ac_dir" && ac_dir=.
4455     if test -f $ac_dir/$ac_word; then
4456       ac_cv_prog_AS="${ac_tool_prefix}as"
4457       break
4458     fi
4459   done
4460   IFS="$ac_save_ifs"
4461 fi
4462 fi
4463 AS="$ac_cv_prog_AS"
4464 if test -n "$AS"; then
4465   echo "$ac_t""$AS" 1>&6
4466 else
4467   echo "$ac_t""no" 1>&6
4468 fi
4469
4470
4471 if test -z "$ac_cv_prog_AS"; then
4472 if test -n "$ac_tool_prefix"; then
4473   # Extract the first word of "as", so it can be a program name with args.
4474 set dummy as; ac_word=$2
4475 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4476 echo "configure:4477: checking for $ac_word" >&5
4477 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   if test -n "$AS"; then
4481   ac_cv_prog_AS="$AS" # Let the user override the test.
4482 else
4483   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4484   ac_dummy="$PATH"
4485   for ac_dir in $ac_dummy; do
4486     test -z "$ac_dir" && ac_dir=.
4487     if test -f $ac_dir/$ac_word; then
4488       ac_cv_prog_AS="as"
4489       break
4490     fi
4491   done
4492   IFS="$ac_save_ifs"
4493   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4494 fi
4495 fi
4496 AS="$ac_cv_prog_AS"
4497 if test -n "$AS"; then
4498   echo "$ac_t""$AS" 1>&6
4499 else
4500   echo "$ac_t""no" 1>&6
4501 fi
4502
4503 else
4504   AS="false"
4505 fi
4506 fi
4507
4508   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4509 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4510 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4511 echo "configure:4512: checking for $ac_word" >&5
4512 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4513   echo $ac_n "(cached) $ac_c" 1>&6
4514 else
4515   if test -n "$OBJDUMP"; then
4516   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4517 else
4518   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4519   ac_dummy="$PATH"
4520   for ac_dir in $ac_dummy; do
4521     test -z "$ac_dir" && ac_dir=.
4522     if test -f $ac_dir/$ac_word; then
4523       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4524       break
4525     fi
4526   done
4527   IFS="$ac_save_ifs"
4528 fi
4529 fi
4530 OBJDUMP="$ac_cv_prog_OBJDUMP"
4531 if test -n "$OBJDUMP"; then
4532   echo "$ac_t""$OBJDUMP" 1>&6
4533 else
4534   echo "$ac_t""no" 1>&6
4535 fi
4536
4537
4538 if test -z "$ac_cv_prog_OBJDUMP"; then
4539 if test -n "$ac_tool_prefix"; then
4540   # Extract the first word of "objdump", so it can be a program name with args.
4541 set dummy objdump; ac_word=$2
4542 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4543 echo "configure:4544: checking for $ac_word" >&5
4544 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4545   echo $ac_n "(cached) $ac_c" 1>&6
4546 else
4547   if test -n "$OBJDUMP"; then
4548   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4549 else
4550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4551   ac_dummy="$PATH"
4552   for ac_dir in $ac_dummy; do
4553     test -z "$ac_dir" && ac_dir=.
4554     if test -f $ac_dir/$ac_word; then
4555       ac_cv_prog_OBJDUMP="objdump"
4556       break
4557     fi
4558   done
4559   IFS="$ac_save_ifs"
4560   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4561 fi
4562 fi
4563 OBJDUMP="$ac_cv_prog_OBJDUMP"
4564 if test -n "$OBJDUMP"; then
4565   echo "$ac_t""$OBJDUMP" 1>&6
4566 else
4567   echo "$ac_t""no" 1>&6
4568 fi
4569
4570 else
4571   OBJDUMP="false"
4572 fi
4573 fi
4574
4575
4576   # recent cygwin and mingw systems supply a stub DllMain which the user
4577   # can override, but on older systems we have to supply one
4578   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4579 echo "configure:4580: checking if libtool should supply DllMain function" >&5
4580 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4581   echo $ac_n "(cached) $ac_c" 1>&6
4582 else
4583   cat > conftest.$ac_ext <<EOF
4584 #line 4585 "configure"
4585 #include "confdefs.h"
4586
4587 int main() {
4588 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4589       DllMain (0, 0, 0);
4590 ; return 0; }
4591 EOF
4592 if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4593   rm -rf conftest*
4594   lt_cv_need_dllmain=no
4595 else
4596   echo "configure: failed program was:" >&5
4597   cat conftest.$ac_ext >&5
4598   rm -rf conftest*
4599   lt_cv_need_dllmain=yes
4600 fi
4601 rm -f conftest*
4602 fi
4603
4604 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4605
4606   case $host/$CC in
4607   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4608     # old mingw systems require "-dll" to link a DLL, while more recent ones
4609     # require "-mdll"
4610     SAVE_CFLAGS="$CFLAGS"
4611     CFLAGS="$CFLAGS -mdll"
4612     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4613 echo "configure:4614: checking how to link DLLs" >&5
4614 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4615   echo $ac_n "(cached) $ac_c" 1>&6
4616 else
4617   cat > conftest.$ac_ext <<EOF
4618 #line 4619 "configure"
4619 #include "confdefs.h"
4620
4621 int main() {
4622
4623 ; return 0; }
4624 EOF
4625 if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4626   rm -rf conftest*
4627   lt_cv_cc_dll_switch=-mdll
4628 else
4629   echo "configure: failed program was:" >&5
4630   cat conftest.$ac_ext >&5
4631   rm -rf conftest*
4632   lt_cv_cc_dll_switch=-dll
4633 fi
4634 rm -f conftest*
4635 fi
4636
4637 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4638     CFLAGS="$SAVE_CFLAGS" ;;
4639   *-*-cygwin* | *-*-pw32*)
4640     # cygwin systems need to pass --dll to the linker, and not link
4641     # crt.o which will require a WinMain@16 definition.
4642     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4643   esac
4644   ;;
4645   
4646 esac
4647
4648 # Sed substitution that helps us do robust quoting.  It backslashifies
4649 # metacharacters that are still active within double-quoted strings.
4650 Xsed='sed -e s/^X//'
4651 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4652
4653 # Same as above, but do not quote variable references.
4654 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4655
4656 # Sed substitution to delay expansion of an escaped shell variable in a
4657 # double_quote_subst'ed string.
4658 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4659
4660 # Constants:
4661 rm="rm -f"
4662
4663 # Global variables:
4664 default_ofile=libtool
4665 can_build_shared=yes
4666
4667 # All known linkers require a `.a' archive for static linking (except M$VC,
4668 # which needs '.lib').
4669 libext=a
4670 ltmain="$ac_aux_dir/ltmain.sh"
4671 ofile="$default_ofile"
4672 with_gnu_ld="$lt_cv_prog_gnu_ld"
4673 need_locks="$enable_libtool_lock"
4674
4675 old_CC="$CC"
4676 old_CFLAGS="$CFLAGS"
4677
4678 # Set sane defaults for various variables
4679 test -z "$AR" && AR=ar
4680 test -z "$AR_FLAGS" && AR_FLAGS=cru
4681 test -z "$AS" && AS=as
4682 test -z "$CC" && CC=cc
4683 test -z "$DLLTOOL" && DLLTOOL=dlltool
4684 test -z "$LD" && LD=ld
4685 test -z "$LN_S" && LN_S="ln -s"
4686 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4687 test -z "$NM" && NM=nm
4688 test -z "$OBJDUMP" && OBJDUMP=objdump
4689 test -z "$RANLIB" && RANLIB=:
4690 test -z "$STRIP" && STRIP=:
4691 test -z "$ac_objext" && ac_objext=o
4692
4693 if test x"$host" != x"$build"; then
4694   ac_tool_prefix=${host_alias}-
4695 else
4696   ac_tool_prefix=
4697 fi
4698
4699 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4700 case $host_os in
4701 linux-gnu*) ;;
4702 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4703 esac
4704
4705 case $host_os in
4706 aix3*)
4707   # AIX sometimes has problems with the GCC collect2 program.  For some
4708   # reason, if we set the COLLECT_NAMES environment variable, the problems
4709   # vanish in a puff of smoke.
4710   if test "X${COLLECT_NAMES+set}" != Xset; then
4711     COLLECT_NAMES=
4712     export COLLECT_NAMES
4713   fi
4714   ;;
4715 esac
4716
4717 # Determine commands to create old-style static archives.
4718 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4719 old_postinstall_cmds='chmod 644 $oldlib'
4720 old_postuninstall_cmds=
4721
4722 if test -n "$RANLIB"; then
4723   case $host_os in
4724   openbsd*)
4725     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4726     ;;
4727   *)
4728     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4729     ;;
4730   esac
4731   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4732 fi
4733
4734 # Allow CC to be a program name with arguments.
4735 set dummy $CC
4736 compiler="$2"
4737
4738 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4739 echo "configure:4740: checking for objdir" >&5
4740 rm -f .libs 2>/dev/null
4741 mkdir .libs 2>/dev/null
4742 if test -d .libs; then
4743   objdir=.libs
4744 else
4745   # MS-DOS does not allow filenames that begin with a dot.
4746   objdir=_libs
4747 fi
4748 rmdir .libs 2>/dev/null
4749 echo "$ac_t""$objdir" 1>&6
4750
4751
4752 # Check whether --with-pic or --without-pic was given.
4753 if test "${with_pic+set}" = set; then
4754   withval="$with_pic"
4755   pic_mode="$withval"
4756 else
4757   pic_mode=default
4758 fi
4759
4760 test -z "$pic_mode" && pic_mode=default
4761
4762 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4763 # in isolation, and that seeing it set (from the cache) indicates that
4764 # the associated values are set (in the cache) correctly too.
4765 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4766 echo "configure:4767: checking for $compiler option to produce PIC" >&5
4767 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4768   echo $ac_n "(cached) $ac_c" 1>&6
4769 else
4770    lt_cv_prog_cc_pic=
4771   lt_cv_prog_cc_shlib=
4772   lt_cv_prog_cc_wl=
4773   lt_cv_prog_cc_static=
4774   lt_cv_prog_cc_no_builtin=
4775   lt_cv_prog_cc_can_build_shared=$can_build_shared
4776
4777   if test "$GCC" = yes; then
4778     lt_cv_prog_cc_wl='-Wl,'
4779     lt_cv_prog_cc_static='-static'
4780
4781     case $host_os in
4782     aix*)
4783       # Below there is a dirty hack to force normal static linking with -ldl
4784       # The problem is because libdl dynamically linked with both libc and
4785       # libC (AIX C++ library), which obviously doesn't included in libraries
4786       # list by gcc. This cause undefined symbols with -static flags.
4787       # This hack allows C programs to be linked with "-static -ldl", but
4788       # not sure about C++ programs.
4789       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4790       ;;
4791     amigaos*)
4792       # FIXME: we need at least 68020 code to build shared libraries, but
4793       # adding the `-m68020' flag to GCC prevents building anything better,
4794       # like `-m68040'.
4795       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4796       ;;
4797     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4798       # PIC is the default for these OSes.
4799       ;;
4800     darwin* | rhapsody*)
4801       # PIC is the default on this platform
4802       # Common symbols not allowed in MH_DYLIB files
4803       lt_cv_prog_cc_pic='-fno-common'
4804       ;;
4805     cygwin* | mingw* | pw32* | os2*)
4806       # This hack is so that the source file can tell whether it is being
4807       # built for inclusion in a dll (and should export symbols for example).
4808       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4809       ;;
4810     sysv4*MP*)
4811       if test -d /usr/nec; then
4812          lt_cv_prog_cc_pic=-Kconform_pic
4813       fi
4814       ;;
4815     *)
4816       lt_cv_prog_cc_pic='-fPIC'
4817       ;;
4818     esac
4819   else
4820     # PORTME Check for PIC flags for the system compiler.
4821     case $host_os in
4822     aix3* | aix4* | aix5*)
4823       lt_cv_prog_cc_wl='-Wl,'
4824       # All AIX code is PIC.
4825       if test "$host_cpu" = ia64; then
4826         # AIX 5 now supports IA64 processor
4827         lt_cv_prog_cc_static='-Bstatic'
4828       else
4829         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4830       fi
4831       ;;
4832
4833     hpux9* | hpux10* | hpux11*)
4834       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4835       lt_cv_prog_cc_wl='-Wl,'
4836       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4837       lt_cv_prog_cc_pic='+Z'
4838       ;;
4839
4840     irix5* | irix6* | nonstopux*)
4841       lt_cv_prog_cc_wl='-Wl,'
4842       lt_cv_prog_cc_static='-non_shared'
4843       # PIC (with -KPIC) is the default.
4844       ;;
4845
4846     cygwin* | mingw* | pw32* | os2*)
4847       # This hack is so that the source file can tell whether it is being
4848       # built for inclusion in a dll (and should export symbols for example).
4849       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4850       ;;
4851
4852     newsos6)
4853       lt_cv_prog_cc_pic='-KPIC'
4854       lt_cv_prog_cc_static='-Bstatic'
4855       ;;
4856     
4857     openedition)
4858       # XPLINK code is PIC by default
4859       ;;
4860
4861     osf3* | osf4* | osf5*)
4862       # All OSF/1 code is PIC.
4863       lt_cv_prog_cc_wl='-Wl,'
4864       lt_cv_prog_cc_static='-non_shared'
4865       ;;
4866
4867     sco3.2v5*)
4868       lt_cv_prog_cc_pic='-Kpic'
4869       lt_cv_prog_cc_static='-dn'
4870       lt_cv_prog_cc_shlib='-belf'
4871       ;;
4872
4873     solaris*)
4874       lt_cv_prog_cc_pic='-KPIC'
4875       lt_cv_prog_cc_static='-Bstatic'
4876       lt_cv_prog_cc_wl='-Wl,'
4877       ;;
4878
4879     sunos4*)
4880       lt_cv_prog_cc_pic='-PIC'
4881       lt_cv_prog_cc_static='-Bstatic'
4882       lt_cv_prog_cc_wl='-Qoption ld '
4883       ;;
4884
4885     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4886       lt_cv_prog_cc_pic='-KPIC'
4887       lt_cv_prog_cc_static='-Bstatic'
4888       lt_cv_prog_cc_wl='-Wl,'
4889       ;;
4890
4891     uts4*)
4892       lt_cv_prog_cc_pic='-pic'
4893       lt_cv_prog_cc_static='-Bstatic'
4894       ;;
4895
4896     sysv4*MP*)
4897       if test -d /usr/nec ;then
4898         lt_cv_prog_cc_pic='-Kconform_pic'
4899         lt_cv_prog_cc_static='-Bstatic'
4900       fi
4901       ;;
4902
4903     *)
4904       lt_cv_prog_cc_can_build_shared=no
4905       ;;
4906     esac
4907   fi
4908
4909 fi
4910
4911 if test -z "$lt_cv_prog_cc_pic"; then
4912   echo "$ac_t""none" 1>&6
4913 else
4914   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4915
4916   # Check to make sure the pic_flag actually works.
4917   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4918 echo "configure:4919: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4919   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
4920   echo $ac_n "(cached) $ac_c" 1>&6
4921 else
4922       save_CFLAGS="$CFLAGS"
4923     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4924     cat > conftest.$ac_ext <<EOF
4925 #line 4926 "configure"
4926 #include "confdefs.h"
4927
4928 int main() {
4929
4930 ; return 0; }
4931 EOF
4932 if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4933   rm -rf conftest*
4934         case $host_os in
4935       hpux9* | hpux10* | hpux11*)
4936         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4937         # they create non-PIC objects.  So, if there were any warnings, we
4938         # assume that PIC is not supported.
4939         if test -s conftest.err; then
4940           lt_cv_prog_cc_pic_works=no
4941         else
4942           lt_cv_prog_cc_pic_works=yes
4943         fi
4944         ;;
4945       *)
4946         lt_cv_prog_cc_pic_works=yes
4947         ;;
4948       esac
4949     
4950 else
4951   echo "configure: failed program was:" >&5
4952   cat conftest.$ac_ext >&5
4953   rm -rf conftest*
4954         lt_cv_prog_cc_pic_works=no
4955     
4956 fi
4957 rm -f conftest*
4958     CFLAGS="$save_CFLAGS"
4959   
4960 fi
4961
4962
4963   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4964     lt_cv_prog_cc_pic=
4965     lt_cv_prog_cc_can_build_shared=no
4966   else
4967     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
4968   fi
4969
4970   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
4971 fi
4972
4973 # Check for any special shared library compilation flags.
4974 if test -n "$lt_cv_prog_cc_shlib"; then
4975   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
4976   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
4977   else
4978    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
4979     lt_cv_prog_cc_can_build_shared=no
4980   fi
4981 fi
4982
4983 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
4984 echo "configure:4985: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
4985 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
4986   echo $ac_n "(cached) $ac_c" 1>&6
4987 else
4988     lt_cv_prog_cc_static_works=no
4989   save_LDFLAGS="$LDFLAGS"
4990   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
4991   cat > conftest.$ac_ext <<EOF
4992 #line 4993 "configure"
4993 #include "confdefs.h"
4994
4995 int main() {
4996
4997 ; return 0; }
4998 EOF
4999 if { (eval echo configure:5000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5000   rm -rf conftest*
5001   lt_cv_prog_cc_static_works=yes
5002 else
5003   echo "configure: failed program was:" >&5
5004   cat conftest.$ac_ext >&5
5005 fi
5006 rm -f conftest*
5007   LDFLAGS="$save_LDFLAGS"
5008
5009 fi
5010
5011
5012 # Belt *and* braces to stop my trousers falling down:
5013 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5014 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5015
5016 pic_flag="$lt_cv_prog_cc_pic"
5017 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5018 wl="$lt_cv_prog_cc_wl"
5019 link_static_flag="$lt_cv_prog_cc_static"
5020 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5021 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5022
5023
5024 # Check to see if options -o and -c are simultaneously supported by compiler
5025 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5026 echo "configure:5027: checking if $compiler supports -c -o file.$ac_objext" >&5
5027 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5028   echo $ac_n "(cached) $ac_c" 1>&6
5029 else
5030   
5031 $rm -r conftest 2>/dev/null
5032 mkdir conftest
5033 cd conftest
5034 echo "int some_variable = 0;" > conftest.$ac_ext
5035 mkdir out
5036 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5037 # that will create temporary files in the current directory regardless of
5038 # the output directory.  Thus, making CWD read-only will cause this test
5039 # to fail, enabling locking or at least warning the user not to do parallel
5040 # builds.
5041 chmod -w .
5042 save_CFLAGS="$CFLAGS"
5043 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5044 compiler_c_o=no
5045 if { (eval echo configure:5046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5046   # The compiler can only warn and ignore the option if not recognized
5047   # So say no if there are warnings
5048   if test -s out/conftest.err; then
5049     lt_cv_compiler_c_o=no
5050   else
5051     lt_cv_compiler_c_o=yes
5052   fi
5053 else
5054   # Append any errors to the config.log.
5055   cat out/conftest.err 1>&5
5056   lt_cv_compiler_c_o=no
5057 fi
5058 CFLAGS="$save_CFLAGS"
5059 chmod u+w .
5060 $rm conftest* out/*
5061 rmdir out
5062 cd ..
5063 rmdir conftest
5064 $rm -r conftest 2>/dev/null
5065
5066 fi
5067
5068 compiler_c_o=$lt_cv_compiler_c_o
5069 echo "$ac_t""$compiler_c_o" 1>&6
5070
5071 if test x"$compiler_c_o" = x"yes"; then
5072   # Check to see if we can write to a .lo
5073   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5074 echo "configure:5075: checking if $compiler supports -c -o file.lo" >&5
5075   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5076   echo $ac_n "(cached) $ac_c" 1>&6
5077 else
5078   
5079   lt_cv_compiler_o_lo=no
5080   save_CFLAGS="$CFLAGS"
5081   CFLAGS="$CFLAGS -c -o conftest.lo"
5082   save_objext="$ac_objext"
5083   ac_objext=lo
5084   cat > conftest.$ac_ext <<EOF
5085 #line 5086 "configure"
5086 #include "confdefs.h"
5087
5088 int main() {
5089 int some_variable = 0;
5090 ; return 0; }
5091 EOF
5092 if { (eval echo configure:5093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5093   rm -rf conftest*
5094       # The compiler can only warn and ignore the option if not recognized
5095     # So say no if there are warnings
5096     if test -s conftest.err; then
5097       lt_cv_compiler_o_lo=no
5098     else
5099       lt_cv_compiler_o_lo=yes
5100     fi
5101   
5102 else
5103   echo "configure: failed program was:" >&5
5104   cat conftest.$ac_ext >&5
5105 fi
5106 rm -f conftest*
5107   ac_objext="$save_objext"
5108   CFLAGS="$save_CFLAGS"
5109   
5110 fi
5111
5112   compiler_o_lo=$lt_cv_compiler_o_lo
5113   echo "$ac_t""$compiler_o_lo" 1>&6
5114 else
5115   compiler_o_lo=no
5116 fi
5117
5118 # Check to see if we can do hard links to lock some files if needed
5119 hard_links="nottested"
5120 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5121   # do not overwrite the value of need_locks provided by the user
5122   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5123 echo "configure:5124: checking if we can lock with hard links" >&5
5124   hard_links=yes
5125   $rm conftest*
5126   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5127   touch conftest.a
5128   ln conftest.a conftest.b 2>&5 || hard_links=no
5129   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5130   echo "$ac_t""$hard_links" 1>&6
5131   if test "$hard_links" = no; then
5132     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5133     need_locks=warn
5134   fi
5135 else
5136   need_locks=no
5137 fi
5138
5139 if test "$GCC" = yes; then
5140   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5141   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5142 echo "configure:5143: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5143   echo "int some_variable = 0;" > conftest.$ac_ext
5144   save_CFLAGS="$CFLAGS"
5145   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5146   compiler_rtti_exceptions=no
5147   cat > conftest.$ac_ext <<EOF
5148 #line 5149 "configure"
5149 #include "confdefs.h"
5150
5151 int main() {
5152 int some_variable = 0;
5153 ; return 0; }
5154 EOF
5155 if { (eval echo configure:5156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5156   rm -rf conftest*
5157       # The compiler can only warn and ignore the option if not recognized
5158     # So say no if there are warnings
5159     if test -s conftest.err; then
5160       compiler_rtti_exceptions=no
5161     else
5162       compiler_rtti_exceptions=yes
5163     fi
5164   
5165 else
5166   echo "configure: failed program was:" >&5
5167   cat conftest.$ac_ext >&5
5168 fi
5169 rm -f conftest*
5170   CFLAGS="$save_CFLAGS"
5171   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5172
5173   if test "$compiler_rtti_exceptions" = "yes"; then
5174     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5175   else
5176     no_builtin_flag=' -fno-builtin'
5177   fi
5178 fi
5179
5180 # See if the linker supports building shared libraries.
5181 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5182 echo "configure:5183: checking whether the linker ($LD) supports shared libraries" >&5
5183
5184 allow_undefined_flag=
5185 no_undefined_flag=
5186 need_lib_prefix=unknown
5187 need_version=unknown
5188 # when you set need_version to no, make sure it does not cause -set_version
5189 # flags to be left without arguments
5190 archive_cmds=
5191 archive_expsym_cmds=
5192 old_archive_from_new_cmds=
5193 old_archive_from_expsyms_cmds=
5194 export_dynamic_flag_spec=
5195 whole_archive_flag_spec=
5196 thread_safe_flag_spec=
5197 hardcode_into_libs=no
5198 hardcode_libdir_flag_spec=
5199 hardcode_libdir_separator=
5200 hardcode_direct=no
5201 hardcode_minus_L=no
5202 hardcode_shlibpath_var=unsupported
5203 runpath_var=
5204 link_all_deplibs=unknown
5205 always_export_symbols=no
5206 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5207 # include_expsyms should be a list of space-separated symbols to be *always*
5208 # included in the symbol list
5209 include_expsyms=
5210 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5211 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5212 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5213 # as well as any symbol that contains `d'.
5214 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5215 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5216 # platforms (ab)use it in PIC code, but their linkers get confused if
5217 # the symbol is explicitly referenced.  Since portable code cannot
5218 # rely on this symbol name, it's probably fine to never include it in
5219 # preloaded symbol tables.
5220 extract_expsyms_cmds=
5221
5222 case $host_os in
5223 cygwin* | mingw* | pw32*)
5224   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5225   # When not using gcc, we currently assume that we are using
5226   # Microsoft Visual C++.
5227   if test "$GCC" != yes; then
5228     with_gnu_ld=no
5229   fi
5230   ;;
5231 openbsd*)
5232   with_gnu_ld=no
5233   ;;
5234 esac
5235
5236 ld_shlibs=yes
5237 if test "$with_gnu_ld" = yes; then
5238   # If archive_cmds runs LD, not CC, wlarc should be empty
5239   wlarc='${wl}'
5240
5241   # See if GNU ld supports shared libraries.
5242   case $host_os in
5243   aix3* | aix4* | aix5*)
5244     # On AIX, the GNU linker is very broken
5245     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5246     ld_shlibs=no
5247     cat <<EOF 1>&2
5248
5249 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5250 *** to be unable to reliably create shared libraries on AIX.
5251 *** Therefore, libtool is disabling shared libraries support.  If you
5252 *** really care for shared libraries, you may want to modify your PATH
5253 *** so that a non-GNU linker is found, and then restart.
5254
5255 EOF
5256     ;;
5257
5258   amigaos*)
5259     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)'
5260     hardcode_libdir_flag_spec='-L$libdir'
5261     hardcode_minus_L=yes
5262
5263     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5264     # that the semantics of dynamic libraries on AmigaOS, at least up
5265     # to version 4, is to share data among multiple programs linked
5266     # with the same dynamic library.  Since this doesn't match the
5267     # behavior of shared libraries on other platforms, we can use
5268     # them.
5269     ld_shlibs=no
5270     ;;
5271
5272   beos*)
5273     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5274       allow_undefined_flag=unsupported
5275       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5276       # support --undefined.  This deserves some investigation.  FIXME
5277       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5278     else
5279       ld_shlibs=no
5280     fi
5281     ;;
5282
5283   cygwin* | mingw* | pw32*)
5284     # hardcode_libdir_flag_spec is actually meaningless, as there is
5285     # no search path for DLLs.
5286     hardcode_libdir_flag_spec='-L$libdir'
5287     allow_undefined_flag=unsupported
5288     always_export_symbols=yes
5289
5290     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5291       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5292       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5293       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5294       else $CC -o impgen impgen.c ; fi)~
5295       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5296
5297     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5298
5299     # cygwin and mingw dlls have different entry points and sets of symbols
5300     # to exclude.
5301     # FIXME: what about values for MSVC?
5302     dll_entry=__cygwin_dll_entry@12
5303     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5304     case $host_os in
5305     mingw*)
5306       # mingw values
5307       dll_entry=_DllMainCRTStartup@12
5308       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5309       ;;
5310     esac
5311
5312     # mingw and cygwin differ, and it's simplest to just exclude the union
5313     # of the two symbol sets.
5314     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5315
5316     # recent cygwin and mingw systems supply a stub DllMain which the user
5317     # can override, but on older systems we have to supply one (in ltdll.c)
5318     if test "x$lt_cv_need_dllmain" = "xyes"; then
5319       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5320       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~
5321         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5322     else
5323       ltdll_obj=
5324       ltdll_cmds=
5325     fi
5326
5327     # Extract the symbol export list from an `--export-all' def file,
5328     # then regenerate the def file from the symbol export list, so that
5329     # the compiled dll only exports the symbol export list.
5330     # Be careful not to strip the DATA tag left be newer dlltools.
5331     export_symbols_cmds="$ltdll_cmds"'
5332       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5333       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5334
5335     # If the export-symbols file already is a .def file (1st line
5336     # is EXPORTS), use it as is.
5337     # If DATA tags from a recent dlltool are present, honour them!
5338     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5339         cp $export_symbols $output_objdir/$soname-def;
5340       else
5341         echo EXPORTS > $output_objdir/$soname-def;
5342         _lt_hint=1;
5343         cat $export_symbols | while read symbol; do
5344          set dummy \$symbol;
5345          case \$# in
5346            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5347            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5348            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5349          esac;
5350          _lt_hint=`expr 1 + \$_lt_hint`;
5351         done;
5352       fi~
5353       '"$ltdll_cmds"'
5354       $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~
5355       $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~
5356       $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~
5357       $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~
5358       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5359     ;;
5360
5361   netbsd*)
5362     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5363       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5364       wlarc=
5365     else
5366       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5367       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5368     fi
5369     ;;
5370
5371   solaris* | sysv5*)
5372     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5373       ld_shlibs=no
5374       cat <<EOF 1>&2
5375
5376 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5377 *** create shared libraries on Solaris systems.  Therefore, libtool
5378 *** is disabling shared libraries support.  We urge you to upgrade GNU
5379 *** binutils to release 2.9.1 or newer.  Another option is to modify
5380 *** your PATH or compiler configuration so that the native linker is
5381 *** used, and then restart.
5382
5383 EOF
5384     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5385       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5386       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5387     else
5388       ld_shlibs=no
5389     fi
5390     ;;
5391
5392   sunos4*)
5393     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5394     wlarc=
5395     hardcode_direct=yes
5396     hardcode_shlibpath_var=no
5397     ;;
5398
5399   *)
5400     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5401       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5402       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5403     else
5404       ld_shlibs=no
5405     fi
5406     ;;
5407   esac
5408
5409   if test "$ld_shlibs" = yes; then
5410     runpath_var=LD_RUN_PATH
5411     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5412     export_dynamic_flag_spec='${wl}--export-dynamic'
5413     case $host_os in
5414     cygwin* | mingw* | pw32*)
5415       # dlltool doesn't understand --whole-archive et. al.
5416       whole_archive_flag_spec=
5417       ;;
5418     *)
5419       # ancient GNU ld didn't support --whole-archive et. al.
5420       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5421         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5422       else
5423         whole_archive_flag_spec=
5424       fi
5425       ;;
5426     esac
5427   fi
5428 else
5429   # PORTME fill in a description of your system's linker (not GNU ld)
5430   case $host_os in
5431   aix3*)
5432     allow_undefined_flag=unsupported
5433     always_export_symbols=yes
5434     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'
5435     # Note: this linker hardcodes the directories in LIBPATH if there
5436     # are no directories specified by -L.
5437     hardcode_minus_L=yes
5438     if test "$GCC" = yes && test -z "$link_static_flag"; then
5439       # Neither direct hardcoding nor static linking is supported with a
5440       # broken collect2.
5441       hardcode_direct=unsupported
5442     fi
5443     ;;
5444
5445   aix4* | aix5*)
5446     if test "$host_cpu" = ia64; then
5447       # On IA64, the linker does run time linking by default, so we don't
5448       # have to do anything special.
5449       aix_use_runtimelinking=no
5450       exp_sym_flag='-Bexport'
5451       no_entry_flag=""
5452     else
5453       aix_use_runtimelinking=no
5454
5455       # Test if we are trying to use run time linking or normal
5456       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5457       # need to do runtime linking.
5458       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5459         for ld_flag in $LDFLAGS; do
5460           case $ld_flag in
5461           *-brtl*)
5462             aix_use_runtimelinking=yes
5463             break
5464           ;;
5465           esac
5466         done
5467       esac
5468
5469       exp_sym_flag='-bexport'
5470       no_entry_flag='-bnoentry'
5471     fi
5472
5473     # When large executables or shared objects are built, AIX ld can
5474     # have problems creating the table of contents.  If linking a library
5475     # or program results in "error TOC overflow" add -mminimal-toc to
5476     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5477     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5478
5479     hardcode_direct=yes
5480     archive_cmds=''
5481     hardcode_libdir_separator=':'
5482     if test "$GCC" = yes; then
5483       case $host_os in aix4.[012]|aix4.[012].*)
5484         collect2name=`${CC} -print-prog-name=collect2`
5485         if test -f "$collect2name" && \
5486           strings "$collect2name" | grep resolve_lib_name >/dev/null
5487         then
5488           # We have reworked collect2
5489           hardcode_direct=yes
5490         else
5491           # We have old collect2
5492           hardcode_direct=unsupported
5493           # It fails to find uninstalled libraries when the uninstalled
5494           # path is not listed in the libpath.  Setting hardcode_minus_L
5495           # to unsupported forces relinking
5496           hardcode_minus_L=yes
5497           hardcode_libdir_flag_spec='-L$libdir'
5498           hardcode_libdir_separator=
5499         fi
5500       esac
5501
5502       shared_flag='-shared'
5503     else
5504       # not using gcc
5505       if test "$host_cpu" = ia64; then
5506         shared_flag='${wl}-G'
5507       else
5508         if test "$aix_use_runtimelinking" = yes; then
5509           shared_flag='${wl}-G'
5510         else
5511           shared_flag='${wl}-bM:SRE'
5512         fi
5513       fi
5514     fi
5515
5516     # It seems that -bexpall can do strange things, so it is better to
5517     # generate a list of symbols to export.
5518     always_export_symbols=yes
5519     if test "$aix_use_runtimelinking" = yes; then
5520       # Warning - without using the other runtime loading flags (-brtl),
5521       # -berok will link without error, but may produce a broken library.
5522       allow_undefined_flag='-berok'
5523       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5524       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"
5525     else
5526       if test "$host_cpu" = ia64; then
5527         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5528         allow_undefined_flag="-z nodefs"
5529         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"
5530       else
5531         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5532         # Warning - without using the other run time loading flags,
5533         # -berok will link without error, but may produce a broken library.
5534         allow_undefined_flag='${wl}-berok'
5535         # This is a bit strange, but is similar to how AIX traditionally builds
5536         # it's shared libraries.
5537         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'
5538       fi
5539     fi
5540     ;;
5541
5542   amigaos*)
5543     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)'
5544     hardcode_libdir_flag_spec='-L$libdir'
5545     hardcode_minus_L=yes
5546     # see comment about different semantics on the GNU ld section
5547     ld_shlibs=no
5548     ;;
5549
5550   cygwin* | mingw* | pw32*)
5551     # When not using gcc, we currently assume that we are using
5552     # Microsoft Visual C++.
5553     # hardcode_libdir_flag_spec is actually meaningless, as there is
5554     # no search path for DLLs.
5555     hardcode_libdir_flag_spec=' '
5556     allow_undefined_flag=unsupported
5557     # Tell ltmain to make .lib files, not .a files.
5558     libext=lib
5559     # FIXME: Setting linknames here is a bad hack.
5560     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5561     # The linker will automatically build a .lib file if we build a DLL.
5562     old_archive_from_new_cmds='true'
5563     # FIXME: Should let the user specify the lib program.
5564     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5565     fix_srcfile_path='`cygpath -w "$srcfile"`'
5566     ;;
5567
5568   darwin* | rhapsody*)
5569     case "$host_os" in
5570     rhapsody* | darwin1.[012])
5571       allow_undefined_flag='-undefined suppress'
5572       ;;
5573     *) # Darwin 1.3 on
5574       allow_undefined_flag='-flat_namespace -undefined suppress'
5575       ;;
5576     esac
5577     # FIXME: Relying on posixy $() will cause problems for
5578     #        cross-compilation, but unfortunately the echo tests do not
5579     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5580     #        `"' quotes if we put them in here... so don't!
5581     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)'
5582     # We need to add '_' to the symbols in $export_symbols first
5583     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5584     hardcode_direct=yes
5585     hardcode_shlibpath_var=no
5586     whole_archive_flag_spec='-all_load $convenience'
5587     ;;
5588
5589   freebsd1*)
5590     ld_shlibs=no
5591     ;;
5592
5593   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5594   # support.  Future versions do this automatically, but an explicit c++rt0.o
5595   # does not break anything, and helps significantly (at the cost of a little
5596   # extra space).
5597   freebsd2.2*)
5598     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5599     hardcode_libdir_flag_spec='-R$libdir'
5600     hardcode_direct=yes
5601     hardcode_shlibpath_var=no
5602     ;;
5603
5604   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5605   freebsd2*)
5606     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5607     hardcode_direct=yes
5608     hardcode_minus_L=yes
5609     hardcode_shlibpath_var=no
5610     ;;
5611
5612   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5613   freebsd*)
5614     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5615     hardcode_libdir_flag_spec='-R$libdir'
5616     hardcode_direct=yes
5617     hardcode_shlibpath_var=no
5618     ;;
5619
5620   hpux9* | hpux10* | hpux11*)
5621     case $host_os in
5622     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' ;;
5623     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5624     esac
5625     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5626     hardcode_libdir_separator=:
5627     hardcode_direct=yes
5628     hardcode_minus_L=yes # Not in the search PATH, but as the default
5629                          # location of the library.
5630     export_dynamic_flag_spec='${wl}-E'
5631     ;;
5632
5633   irix5* | irix6* | nonstopux*)
5634     if test "$GCC" = yes; then
5635       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'
5636       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5637     else
5638       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'
5639       hardcode_libdir_flag_spec='-rpath $libdir'
5640     fi
5641     hardcode_libdir_separator=:
5642     link_all_deplibs=yes
5643     ;;
5644
5645   netbsd*)
5646     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5647       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5648     else
5649       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5650     fi
5651     hardcode_libdir_flag_spec='-R$libdir'
5652     hardcode_direct=yes
5653     hardcode_shlibpath_var=no
5654     ;;
5655
5656   newsos6)
5657     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5658     hardcode_direct=yes
5659     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5660     hardcode_libdir_separator=:
5661     hardcode_shlibpath_var=no
5662     ;;
5663
5664   openbsd*)
5665     hardcode_direct=yes
5666     hardcode_shlibpath_var=no
5667     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5668       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5669       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5670       export_dynamic_flag_spec='${wl}-E'
5671     else
5672       case "$host_os" in
5673       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5674         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5675         hardcode_libdir_flag_spec='-R$libdir'
5676         ;;
5677       *)
5678         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5679         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5680         ;;
5681       esac
5682     fi
5683     ;;
5684
5685   openedition*)
5686     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5687         cp \$linknames \$output_objdir && linknames=''"
5688     export_dynamic_flag_spec="-Wl,DLL"
5689     ;;
5690
5691   os2*)
5692     hardcode_libdir_flag_spec='-L$libdir'
5693     hardcode_minus_L=yes
5694     allow_undefined_flag=unsupported
5695     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'
5696     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5697     ;;
5698
5699   osf3*)
5700     if test "$GCC" = yes; then
5701       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5702       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'
5703     else
5704       allow_undefined_flag=' -expect_unresolved \*'
5705       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'
5706     fi
5707     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5708     hardcode_libdir_separator=:
5709     ;;
5710
5711   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5712     if test "$GCC" = yes; then
5713       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5714       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'
5715       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5716     else
5717       allow_undefined_flag=' -expect_unresolved \*'
5718       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'
5719       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5720       $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'
5721
5722       #Both c and cxx compiler support -rpath directly
5723       hardcode_libdir_flag_spec='-rpath $libdir'
5724     fi
5725     hardcode_libdir_separator=:
5726     ;;
5727
5728   sco3.2v5*)
5729     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5730     hardcode_shlibpath_var=no
5731     runpath_var=LD_RUN_PATH
5732     hardcode_runpath_var=yes
5733     export_dynamic_flag_spec='${wl}-Bexport'
5734     ;;
5735
5736   solaris*)
5737     # gcc --version < 3.0 without binutils cannot create self contained
5738     # shared libraries reliably, requiring libgcc.a to resolve some of
5739     # the object symbols generated in some cases.  Libraries that use
5740     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5741     # a copy of libgcc.a into every shared library to guarantee resolving
5742     # such symbols causes other problems:  According to Tim Van Holder
5743     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5744     # (to the application) exception stack for one thing.
5745     no_undefined_flag=' -z defs'
5746     if test "$GCC" = yes; then
5747       case `$CC --version 2>/dev/null` in
5748       [12].*)
5749         cat <<EOF 1>&2
5750
5751 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5752 *** create self contained shared libraries on Solaris systems, without
5753 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5754 *** -no-undefined support, which will at least allow you to build shared
5755 *** libraries.  However, you may find that when you link such libraries
5756 *** into an application without using GCC, you have to manually add
5757 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5758 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5759 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5760
5761 EOF
5762         no_undefined_flag=
5763         ;;
5764       esac
5765     fi
5766     # $CC -shared without GNU ld will not create a library from C++
5767     # object files and a static libstdc++, better avoid it by now
5768     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5769     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5770                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5771     hardcode_libdir_flag_spec='-R$libdir'
5772     hardcode_shlibpath_var=no
5773     case $host_os in
5774     solaris2.[0-5] | solaris2.[0-5].*) ;;
5775     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5776       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5777     esac
5778     link_all_deplibs=yes
5779     ;;
5780
5781   sunos4*)
5782     if test "x$host_vendor" = xsequent; then
5783       # Use $CC to link under sequent, because it throws in some extra .o
5784       # files that make .init and .fini sections work.
5785       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5786     else
5787       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5788     fi
5789     hardcode_libdir_flag_spec='-L$libdir'
5790     hardcode_direct=yes
5791     hardcode_minus_L=yes
5792     hardcode_shlibpath_var=no
5793     ;;
5794
5795   sysv4)
5796     case $host_vendor in
5797       sni)
5798         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5799         hardcode_direct=yes # is this really true???
5800         ;;
5801       siemens)
5802         ## LD is ld it makes a PLAMLIB
5803         ## CC just makes a GrossModule.
5804         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5805         reload_cmds='$CC -r -o $output$reload_objs'
5806         hardcode_direct=no
5807         ;;
5808       motorola)
5809         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5810         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5811         ;;
5812     esac
5813     runpath_var='LD_RUN_PATH'
5814     hardcode_shlibpath_var=no
5815     ;;
5816
5817   sysv4.3*)
5818     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5819     hardcode_shlibpath_var=no
5820     export_dynamic_flag_spec='-Bexport'
5821     ;;
5822
5823   sysv5*)
5824     no_undefined_flag=' -z text'
5825     # $CC -shared without GNU ld will not create a library from C++
5826     # object files and a static libstdc++, better avoid it by now
5827     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5828     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5829                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5830     hardcode_libdir_flag_spec=
5831     hardcode_shlibpath_var=no
5832     runpath_var='LD_RUN_PATH'
5833     ;;
5834
5835   uts4*)
5836     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5837     hardcode_libdir_flag_spec='-L$libdir'
5838     hardcode_shlibpath_var=no
5839     ;;
5840
5841   dgux*)
5842     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5843     hardcode_libdir_flag_spec='-L$libdir'
5844     hardcode_shlibpath_var=no
5845     ;;
5846
5847   sysv4*MP*)
5848     if test -d /usr/nec; then
5849       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5850       hardcode_shlibpath_var=no
5851       runpath_var=LD_RUN_PATH
5852       hardcode_runpath_var=yes
5853       ld_shlibs=yes
5854     fi
5855     ;;
5856
5857   sysv4.2uw2*)
5858     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_direct=yes
5860     hardcode_minus_L=no
5861     hardcode_shlibpath_var=no
5862     hardcode_runpath_var=yes
5863     runpath_var=LD_RUN_PATH
5864     ;;
5865
5866   sysv5uw7* | unixware7*)
5867     no_undefined_flag='${wl}-z ${wl}text'
5868     if test "$GCC" = yes; then
5869       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5870     else
5871       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5872     fi
5873     runpath_var='LD_RUN_PATH'
5874     hardcode_shlibpath_var=no
5875     ;;
5876
5877   *)
5878     ld_shlibs=no
5879     ;;
5880   esac
5881 fi
5882 echo "$ac_t""$ld_shlibs" 1>&6
5883 test "$ld_shlibs" = no && can_build_shared=no
5884
5885 # Check hardcoding attributes.
5886 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5887 echo "configure:5888: checking how to hardcode library paths into programs" >&5
5888 hardcode_action=
5889 if test -n "$hardcode_libdir_flag_spec" || \
5890    test -n "$runpath_var"; then
5891
5892   # We can hardcode non-existant directories.
5893   if test "$hardcode_direct" != no &&
5894      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5895      # have to relink, otherwise we might link with an installed library
5896      # when we should be linking with a yet-to-be-installed one
5897      ## test "$hardcode_shlibpath_var" != no &&
5898      test "$hardcode_minus_L" != no; then
5899     # Linking always hardcodes the temporary library directory.
5900     hardcode_action=relink
5901   else
5902     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5903     hardcode_action=immediate
5904   fi
5905 else
5906   # We cannot hardcode anything, or else we can only hardcode existing
5907   # directories.
5908   hardcode_action=unsupported
5909 fi
5910 echo "$ac_t""$hardcode_action" 1>&6
5911
5912 striplib=
5913 old_striplib=
5914 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5915 echo "configure:5916: checking whether stripping libraries is possible" >&5
5916 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5917   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5918   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5919   echo "$ac_t""yes" 1>&6
5920 else
5921   echo "$ac_t""no" 1>&6
5922 fi
5923
5924 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5925 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5926
5927 # PORTME Fill in your ld.so characteristics
5928 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
5929 echo "configure:5930: checking dynamic linker characteristics" >&5
5930 library_names_spec=
5931 libname_spec='lib$name'
5932 soname_spec=
5933 postinstall_cmds=
5934 postuninstall_cmds=
5935 finish_cmds=
5936 finish_eval=
5937 shlibpath_var=
5938 shlibpath_overrides_runpath=unknown
5939 version_type=none
5940 dynamic_linker="$host_os ld.so"
5941 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5942 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5943
5944 case $host_os in
5945 aix3*)
5946   version_type=linux
5947   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5948   shlibpath_var=LIBPATH
5949
5950   # AIX has no versioning support, so we append a major version to the name.
5951   soname_spec='${libname}${release}.so$major'
5952   ;;
5953
5954 aix4* | aix5*)
5955   version_type=linux
5956   need_lib_prefix=no
5957   need_version=no
5958   hardcode_into_libs=yes
5959   if test "$host_cpu" = ia64; then
5960     # AIX 5 supports IA64
5961     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5962     shlibpath_var=LD_LIBRARY_PATH
5963   else
5964     # With GCC up to 2.95.x, collect2 would create an import file
5965     # for dependence libraries.  The import file would start with
5966     # the line `#! .'.  This would cause the generated library to
5967     # depend on `.', always an invalid library.  This was fixed in
5968     # development snapshots of GCC prior to 3.0.
5969     case $host_os in
5970       aix4 | aix4.[01] | aix4.[01].*)
5971         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5972              echo ' yes '
5973              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5974           :
5975         else
5976           can_build_shared=no
5977         fi
5978         ;;
5979     esac
5980     # AIX (on Power*) has no versioning support, so currently we can
5981     # not hardcode correct soname into executable. Probably we can
5982     # add versioning support to collect2, so additional links can
5983     # be useful in future.
5984     if test "$aix_use_runtimelinking" = yes; then
5985       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5986       # instead of lib<name>.a to let people know that these are not
5987       # typical AIX shared libraries.
5988       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5989     else
5990       # We preserve .a as extension for shared libraries through AIX4.2
5991       # and later when we are not doing run time linking.
5992       library_names_spec='${libname}${release}.a $libname.a'
5993       soname_spec='${libname}${release}.so$major'
5994     fi
5995     shlibpath_var=LIBPATH
5996   fi
5997   hardcode_into_libs=yes
5998   ;;
5999
6000 amigaos*)
6001   library_names_spec='$libname.ixlibrary $libname.a'
6002   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6003   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'
6004   ;;
6005
6006 beos*)
6007   library_names_spec='${libname}.so'
6008   dynamic_linker="$host_os ld.so"
6009   shlibpath_var=LIBRARY_PATH
6010   ;;
6011
6012 bsdi4*)
6013   version_type=linux
6014   need_version=no
6015   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6016   soname_spec='${libname}${release}.so$major'
6017   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6018   shlibpath_var=LD_LIBRARY_PATH
6019   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6020   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6021   export_dynamic_flag_spec=-rdynamic
6022   # the default ld.so.conf also contains /usr/contrib/lib and
6023   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6024   # libtool to hard-code these into programs
6025   ;;
6026
6027 cygwin* | mingw* | pw32*)
6028   version_type=windows
6029   need_version=no
6030   need_lib_prefix=no
6031   case $GCC,$host_os in
6032   yes,cygwin*)
6033     library_names_spec='$libname.dll.a'
6034     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6035     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6036       dldir=$destdir/`dirname \$dlpath`~
6037       test -d \$dldir || mkdir -p \$dldir~
6038       $install_prog .libs/$dlname \$dldir/$dlname'
6039     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6040       dlpath=$dir/\$dldll~
6041        $rm \$dlpath'
6042     ;;
6043   yes,mingw*)
6044     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6045     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6046     ;;
6047   yes,pw32*)
6048     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6049     ;;
6050   *)
6051     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6052     ;;
6053   esac
6054   dynamic_linker='Win32 ld.exe'
6055   # FIXME: first we should search . and the directory the executable is in
6056   shlibpath_var=PATH
6057   ;;
6058
6059 darwin* | rhapsody*)
6060   dynamic_linker="$host_os dyld"
6061   version_type=darwin
6062   need_lib_prefix=no
6063   need_version=no
6064   # FIXME: Relying on posixy $() will cause problems for
6065   #        cross-compilation, but unfortunately the echo tests do not
6066   #        yet detect zsh echo's removal of \ escapes.
6067   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)'
6068   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6069   shlibpath_overrides_runpath=yes
6070   shlibpath_var=DYLD_LIBRARY_PATH
6071   ;;
6072
6073 freebsd1*)
6074   dynamic_linker=no
6075   ;;
6076
6077 freebsd*)
6078   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6079   version_type=freebsd-$objformat
6080   case $version_type in
6081     freebsd-elf*)
6082       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6083       need_version=no
6084       need_lib_prefix=no
6085       ;;
6086     freebsd-*)
6087       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6088       need_version=yes
6089       ;;
6090   esac
6091   shlibpath_var=LD_LIBRARY_PATH
6092   case $host_os in
6093   freebsd2*)
6094     shlibpath_overrides_runpath=yes
6095     ;;
6096   *)
6097     shlibpath_overrides_runpath=no
6098     hardcode_into_libs=yes
6099     ;;
6100   esac
6101   ;;
6102
6103 gnu*)
6104   version_type=linux
6105   need_lib_prefix=no
6106   need_version=no
6107   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6108   soname_spec='${libname}${release}.so$major'
6109   shlibpath_var=LD_LIBRARY_PATH
6110   hardcode_into_libs=yes
6111   ;;
6112
6113 hpux9* | hpux10* | hpux11*)
6114   # Give a soname corresponding to the major version so that dld.sl refuses to
6115   # link against other versions.
6116   dynamic_linker="$host_os dld.sl"
6117   version_type=sunos
6118   need_lib_prefix=no
6119   need_version=no
6120   shlibpath_var=SHLIB_PATH
6121   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6122   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6123   soname_spec='${libname}${release}.sl$major'
6124   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6125   postinstall_cmds='chmod 555 $lib'
6126   ;;
6127
6128 irix5* | irix6* | nonstopux*)
6129   case $host_os in
6130     nonstopux*) version_type=nonstopux ;;
6131     *)          version_type=irix ;;
6132   esac
6133   need_lib_prefix=no
6134   need_version=no
6135   soname_spec='${libname}${release}.so$major'
6136   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6137   case $host_os in
6138   irix5* | nonstopux*)
6139     libsuff= shlibsuff=
6140     ;;
6141   *)
6142     case $LD in # libtool.m4 will add one of these switches to LD
6143     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6144     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6145     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6146     *) libsuff= shlibsuff= libmagic=never-match;;
6147     esac
6148     ;;
6149   esac
6150   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6151   shlibpath_overrides_runpath=no
6152   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6153   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6154   ;;
6155
6156 # No shared lib support for Linux oldld, aout, or coff.
6157 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6158   dynamic_linker=no
6159   ;;
6160
6161 # This must be Linux ELF.
6162 linux-gnu*)
6163   version_type=linux
6164   need_lib_prefix=no
6165   need_version=no
6166   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6167   soname_spec='${libname}${release}.so$major'
6168   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6169   shlibpath_var=LD_LIBRARY_PATH
6170   shlibpath_overrides_runpath=no
6171   # This implies no fast_install, which is unacceptable.
6172   # Some rework will be needed to allow for fast_install
6173   # before this can be enabled.
6174   hardcode_into_libs=yes
6175
6176   # We used to test for /lib/ld.so.1 and disable shared libraries on
6177   # powerpc, because MkLinux only supported shared libraries with the
6178   # GNU dynamic linker.  Since this was broken with cross compilers,
6179   # most powerpc-linux boxes support dynamic linking these days and
6180   # people can always --disable-shared, the test was removed, and we
6181   # assume the GNU/Linux dynamic linker is in use.
6182   dynamic_linker='GNU/Linux ld.so'
6183   ;;
6184
6185 netbsd*)
6186   version_type=sunos
6187   need_lib_prefix=no
6188   need_version=no
6189   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6190     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6191     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6192     dynamic_linker='NetBSD (a.out) ld.so'
6193   else
6194     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6195     soname_spec='${libname}${release}.so$major'
6196     dynamic_linker='NetBSD ld.elf_so'
6197   fi
6198   shlibpath_var=LD_LIBRARY_PATH
6199   shlibpath_overrides_runpath=yes
6200   hardcode_into_libs=yes
6201   ;;
6202
6203 newsos6)
6204   version_type=linux
6205   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6206   shlibpath_var=LD_LIBRARY_PATH
6207   shlibpath_overrides_runpath=yes
6208   ;;
6209
6210 openbsd*)
6211   version_type=sunos
6212   need_lib_prefix=no
6213   need_version=no
6214   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6215     case "$host_os" in
6216     openbsd2.[89] | openbsd2.[89].*)
6217       shlibpath_overrides_runpath=no
6218       ;;
6219     *)
6220       shlibpath_overrides_runpath=yes
6221       ;;
6222     esac
6223   else
6224     shlibpath_overrides_runpath=yes
6225   fi
6226   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6227   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6228   shlibpath_var=LD_LIBRARY_PATH
6229   ;;
6230
6231 openedition*)
6232   need_lib_prefix=no
6233   need_version=no
6234   shlibpath_overrides_runpath=yes
6235   shlibpath_var=LIBPATH
6236   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6237   # the library's exports are in libname.x; this is the file that must
6238   # actually be linked with to use a DLL.
6239   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6240   ;;
6241
6242 os2*)
6243   libname_spec='$name'
6244   need_lib_prefix=no
6245   library_names_spec='$libname.dll $libname.a'
6246   dynamic_linker='OS/2 ld.exe'
6247   shlibpath_var=LIBPATH
6248   ;;
6249
6250 osf3* | osf4* | osf5*)
6251   version_type=osf
6252   need_version=no
6253   soname_spec='${libname}${release}.so$major'
6254   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6255   shlibpath_var=LD_LIBRARY_PATH
6256   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6257   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6258   hardcode_into_libs=yes
6259   ;;
6260
6261 sco3.2v5*)
6262   version_type=osf
6263   soname_spec='${libname}${release}.so$major'
6264   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6265   shlibpath_var=LD_LIBRARY_PATH
6266   ;;
6267
6268 solaris*)
6269   version_type=linux
6270   need_lib_prefix=no
6271   need_version=no
6272   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6273   soname_spec='${libname}${release}.so$major'
6274   shlibpath_var=LD_LIBRARY_PATH
6275   shlibpath_overrides_runpath=yes
6276   hardcode_into_libs=yes
6277   # ldd complains unless libraries are executable
6278   postinstall_cmds='chmod +x $lib'
6279   ;;
6280
6281 sunos4*)
6282   version_type=sunos
6283   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6284   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6285   shlibpath_var=LD_LIBRARY_PATH
6286   shlibpath_overrides_runpath=yes
6287   if test "$with_gnu_ld" = yes; then
6288     need_lib_prefix=no
6289   fi
6290   need_version=yes
6291   ;;
6292
6293 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6294   version_type=linux
6295   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6296   soname_spec='${libname}${release}.so$major'
6297   shlibpath_var=LD_LIBRARY_PATH
6298   case $host_vendor in
6299     sni)
6300       shlibpath_overrides_runpath=no
6301       need_lib_prefix=no
6302       export_dynamic_flag_spec='${wl}-Blargedynsym'
6303       runpath_var=LD_RUN_PATH
6304       ;;
6305     siemens)
6306       need_lib_prefix=no
6307       ;;
6308     motorola)
6309       need_lib_prefix=no
6310       need_version=no
6311       shlibpath_overrides_runpath=no
6312       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6313       ;;
6314   esac
6315   ;;
6316
6317 uts4*)
6318   version_type=linux
6319   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6320   soname_spec='${libname}${release}.so$major'
6321   shlibpath_var=LD_LIBRARY_PATH
6322   ;;
6323
6324 dgux*)
6325   version_type=linux
6326   need_lib_prefix=no
6327   need_version=no
6328   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6329   soname_spec='${libname}${release}.so$major'
6330   shlibpath_var=LD_LIBRARY_PATH
6331   ;;
6332
6333 sysv4*MP*)
6334   if test -d /usr/nec ;then
6335     version_type=linux
6336     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6337     soname_spec='$libname.so.$major'
6338     shlibpath_var=LD_LIBRARY_PATH
6339   fi
6340   ;;
6341
6342 *)
6343   dynamic_linker=no
6344   ;;
6345 esac
6346 echo "$ac_t""$dynamic_linker" 1>&6
6347 test "$dynamic_linker" = no && can_build_shared=no
6348
6349 # Report the final consequences.
6350 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6351 echo "configure:6352: checking if libtool supports shared libraries" >&5
6352 echo "$ac_t""$can_build_shared" 1>&6
6353
6354 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6355 echo "configure:6356: checking whether to build shared libraries" >&5
6356 test "$can_build_shared" = "no" && enable_shared=no
6357
6358 # On AIX, shared libraries and static libraries use the same namespace, and
6359 # are all built from PIC.
6360 case "$host_os" in
6361 aix3*)
6362   test "$enable_shared" = yes && enable_static=no
6363   if test -n "$RANLIB"; then
6364     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6365     postinstall_cmds='$RANLIB $lib'
6366   fi
6367   ;;
6368
6369 aix4*)
6370   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6371     test "$enable_shared" = yes && enable_static=no
6372   fi
6373   ;;
6374 esac
6375 echo "$ac_t""$enable_shared" 1>&6
6376
6377 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6378 echo "configure:6379: checking whether to build static libraries" >&5
6379 # Make sure either enable_shared or enable_static is yes.
6380 test "$enable_shared" = yes || enable_static=yes
6381 echo "$ac_t""$enable_static" 1>&6
6382
6383 if test "$hardcode_action" = relink; then
6384   # Fast installation is not supported
6385   enable_fast_install=no
6386 elif test "$shlibpath_overrides_runpath" = yes ||
6387      test "$enable_shared" = no; then
6388   # Fast installation is not necessary
6389   enable_fast_install=needless
6390 fi
6391
6392 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6393 if test "$GCC" = yes; then
6394   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6395 fi
6396
6397 if test "x$enable_dlopen" != xyes; then
6398   enable_dlopen=unknown
6399   enable_dlopen_self=unknown
6400   enable_dlopen_self_static=unknown
6401 else
6402   lt_cv_dlopen=no
6403   lt_cv_dlopen_libs=
6404
6405   case $host_os in
6406   beos*)
6407     lt_cv_dlopen="load_add_on"
6408     lt_cv_dlopen_libs=
6409     lt_cv_dlopen_self=yes
6410     ;;
6411
6412   cygwin* | mingw* | pw32*)
6413     lt_cv_dlopen="LoadLibrary"
6414     lt_cv_dlopen_libs=
6415    ;;
6416
6417   *)
6418     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6419 echo "configure:6420: checking for dllload" >&5
6420 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6421   echo $ac_n "(cached) $ac_c" 1>&6
6422 else
6423   cat > conftest.$ac_ext <<EOF
6424 #line 6425 "configure"
6425 #include "confdefs.h"
6426 /* System header to define __stub macros and hopefully few prototypes,
6427     which can conflict with char dllload(); below.  */
6428 #include <assert.h>
6429 /* Override any gcc2 internal prototype to avoid an error.  */
6430 /* We use char because int might match the return type of a gcc2
6431     builtin and then its argument prototype would still apply.  */
6432 char dllload();
6433 char (*f)();
6434
6435 int main() {
6436
6437 /* The GNU C library defines this for functions which it implements
6438     to always fail with ENOSYS.  Some functions are actually named
6439     something starting with __ and the normal name is an alias.  */
6440 #if defined (__stub_dllload) || defined (__stub___dllload)
6441 choke me
6442 #else
6443 f = dllload;
6444 #endif
6445
6446 ; return 0; }
6447 EOF
6448 if { (eval echo configure:6449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6449   rm -rf conftest*
6450   eval "ac_cv_func_dllload=yes"
6451 else
6452   echo "configure: failed program was:" >&5
6453   cat conftest.$ac_ext >&5
6454   rm -rf conftest*
6455   eval "ac_cv_func_dllload=no"
6456 fi
6457 rm -f conftest*
6458 fi
6459
6460 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6461   echo "$ac_t""yes" 1>&6
6462   lt_cv_dlopen="dllload"
6463 else
6464   echo "$ac_t""no" 1>&6
6465 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6466 echo "configure:6467: checking for shl_load" >&5
6467 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6468   echo $ac_n "(cached) $ac_c" 1>&6
6469 else
6470   cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6473 /* System header to define __stub macros and hopefully few prototypes,
6474     which can conflict with char shl_load(); below.  */
6475 #include <assert.h>
6476 /* Override any gcc2 internal prototype to avoid an error.  */
6477 /* We use char because int might match the return type of a gcc2
6478     builtin and then its argument prototype would still apply.  */
6479 char shl_load();
6480 char (*f)();
6481
6482 int main() {
6483
6484 /* The GNU C library defines this for functions which it implements
6485     to always fail with ENOSYS.  Some functions are actually named
6486     something starting with __ and the normal name is an alias.  */
6487 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6488 choke me
6489 #else
6490 f = shl_load;
6491 #endif
6492
6493 ; return 0; }
6494 EOF
6495 if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6496   rm -rf conftest*
6497   eval "ac_cv_func_shl_load=yes"
6498 else
6499   echo "configure: failed program was:" >&5
6500   cat conftest.$ac_ext >&5
6501   rm -rf conftest*
6502   eval "ac_cv_func_shl_load=no"
6503 fi
6504 rm -f conftest*
6505 fi
6506
6507 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6508   echo "$ac_t""yes" 1>&6
6509   lt_cv_dlopen="shl_load"
6510 else
6511   echo "$ac_t""no" 1>&6
6512 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6513 echo "configure:6514: checking for shl_load in -ldld" >&5
6514 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6515 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6516   echo $ac_n "(cached) $ac_c" 1>&6
6517 else
6518   ac_save_LIBS="$LIBS"
6519 LIBS="-ldld  $LIBS"
6520 cat > conftest.$ac_ext <<EOF
6521 #line 6522 "configure"
6522 #include "confdefs.h"
6523 /* Override any gcc2 internal prototype to avoid an error.  */
6524 /* We use char because int might match the return type of a gcc2
6525     builtin and then its argument prototype would still apply.  */
6526 char shl_load();
6527
6528 int main() {
6529 shl_load()
6530 ; return 0; }
6531 EOF
6532 if { (eval echo configure:6533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6533   rm -rf conftest*
6534   eval "ac_cv_lib_$ac_lib_var=yes"
6535 else
6536   echo "configure: failed program was:" >&5
6537   cat conftest.$ac_ext >&5
6538   rm -rf conftest*
6539   eval "ac_cv_lib_$ac_lib_var=no"
6540 fi
6541 rm -f conftest*
6542 LIBS="$ac_save_LIBS"
6543
6544 fi
6545 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6546   echo "$ac_t""yes" 1>&6
6547   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6548 else
6549   echo "$ac_t""no" 1>&6
6550 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6551 echo "configure:6552: checking for dlopen" >&5
6552 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6553   echo $ac_n "(cached) $ac_c" 1>&6
6554 else
6555   cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6558 /* System header to define __stub macros and hopefully few prototypes,
6559     which can conflict with char dlopen(); below.  */
6560 #include <assert.h>
6561 /* Override any gcc2 internal prototype to avoid an error.  */
6562 /* We use char because int might match the return type of a gcc2
6563     builtin and then its argument prototype would still apply.  */
6564 char dlopen();
6565 char (*f)();
6566
6567 int main() {
6568
6569 /* The GNU C library defines this for functions which it implements
6570     to always fail with ENOSYS.  Some functions are actually named
6571     something starting with __ and the normal name is an alias.  */
6572 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6573 choke me
6574 #else
6575 f = dlopen;
6576 #endif
6577
6578 ; return 0; }
6579 EOF
6580 if { (eval echo configure:6581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6581   rm -rf conftest*
6582   eval "ac_cv_func_dlopen=yes"
6583 else
6584   echo "configure: failed program was:" >&5
6585   cat conftest.$ac_ext >&5
6586   rm -rf conftest*
6587   eval "ac_cv_func_dlopen=no"
6588 fi
6589 rm -f conftest*
6590 fi
6591
6592 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6593   echo "$ac_t""yes" 1>&6
6594   lt_cv_dlopen="dlopen"
6595 else
6596   echo "$ac_t""no" 1>&6
6597 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6598 echo "configure:6599: checking for dlopen in -ldl" >&5
6599 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6600 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6601   echo $ac_n "(cached) $ac_c" 1>&6
6602 else
6603   ac_save_LIBS="$LIBS"
6604 LIBS="-ldl  $LIBS"
6605 cat > conftest.$ac_ext <<EOF
6606 #line 6607 "configure"
6607 #include "confdefs.h"
6608 /* Override any gcc2 internal prototype to avoid an error.  */
6609 /* We use char because int might match the return type of a gcc2
6610     builtin and then its argument prototype would still apply.  */
6611 char dlopen();
6612
6613 int main() {
6614 dlopen()
6615 ; return 0; }
6616 EOF
6617 if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6618   rm -rf conftest*
6619   eval "ac_cv_lib_$ac_lib_var=yes"
6620 else
6621   echo "configure: failed program was:" >&5
6622   cat conftest.$ac_ext >&5
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=no"
6625 fi
6626 rm -f conftest*
6627 LIBS="$ac_save_LIBS"
6628
6629 fi
6630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6631   echo "$ac_t""yes" 1>&6
6632   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6633 else
6634   echo "$ac_t""no" 1>&6
6635 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6636 echo "configure:6637: checking for dlopen in -lsvld" >&5
6637 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6638 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6639   echo $ac_n "(cached) $ac_c" 1>&6
6640 else
6641   ac_save_LIBS="$LIBS"
6642 LIBS="-lsvld  $LIBS"
6643 cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 /* Override any gcc2 internal prototype to avoid an error.  */
6647 /* We use char because int might match the return type of a gcc2
6648     builtin and then its argument prototype would still apply.  */
6649 char dlopen();
6650
6651 int main() {
6652 dlopen()
6653 ; return 0; }
6654 EOF
6655 if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6656   rm -rf conftest*
6657   eval "ac_cv_lib_$ac_lib_var=yes"
6658 else
6659   echo "configure: failed program was:" >&5
6660   cat conftest.$ac_ext >&5
6661   rm -rf conftest*
6662   eval "ac_cv_lib_$ac_lib_var=no"
6663 fi
6664 rm -f conftest*
6665 LIBS="$ac_save_LIBS"
6666
6667 fi
6668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6669   echo "$ac_t""yes" 1>&6
6670   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6671 else
6672   echo "$ac_t""no" 1>&6
6673 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6674 echo "configure:6675: checking for dld_link in -ldld" >&5
6675 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6676 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6677   echo $ac_n "(cached) $ac_c" 1>&6
6678 else
6679   ac_save_LIBS="$LIBS"
6680 LIBS="-ldld  $LIBS"
6681 cat > conftest.$ac_ext <<EOF
6682 #line 6683 "configure"
6683 #include "confdefs.h"
6684 /* Override any gcc2 internal prototype to avoid an error.  */
6685 /* We use char because int might match the return type of a gcc2
6686     builtin and then its argument prototype would still apply.  */
6687 char dld_link();
6688
6689 int main() {
6690 dld_link()
6691 ; return 0; }
6692 EOF
6693 if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6694   rm -rf conftest*
6695   eval "ac_cv_lib_$ac_lib_var=yes"
6696 else
6697   echo "configure: failed program was:" >&5
6698   cat conftest.$ac_ext >&5
6699   rm -rf conftest*
6700   eval "ac_cv_lib_$ac_lib_var=no"
6701 fi
6702 rm -f conftest*
6703 LIBS="$ac_save_LIBS"
6704
6705 fi
6706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6709 else
6710   echo "$ac_t""no" 1>&6
6711 fi
6712
6713               
6714 fi
6715
6716             
6717 fi
6718
6719           
6720 fi
6721
6722         
6723 fi
6724
6725       
6726 fi
6727
6728     
6729 fi
6730
6731     ;;
6732   esac
6733
6734   if test "x$lt_cv_dlopen" != xno; then
6735     enable_dlopen=yes
6736   else
6737     enable_dlopen=no
6738   fi
6739
6740   case $lt_cv_dlopen in
6741   dlopen)
6742     save_CPPFLAGS="$CPPFLAGS"
6743         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6744
6745     save_LDFLAGS="$LDFLAGS"
6746     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6747
6748     save_LIBS="$LIBS"
6749     LIBS="$lt_cv_dlopen_libs $LIBS"
6750
6751     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6752 echo "configure:6753: checking whether a program can dlopen itself" >&5
6753 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6754   echo $ac_n "(cached) $ac_c" 1>&6
6755 else
6756           if test "$cross_compiling" = yes; then :
6757   lt_cv_dlopen_self=cross
6758 else
6759     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6760   lt_status=$lt_dlunknown
6761   cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764
6765 #if HAVE_DLFCN_H
6766 #include <dlfcn.h>
6767 #endif
6768
6769 #include <stdio.h>
6770
6771 #ifdef RTLD_GLOBAL
6772 #  define LT_DLGLOBAL           RTLD_GLOBAL
6773 #else
6774 #  ifdef DL_GLOBAL
6775 #    define LT_DLGLOBAL         DL_GLOBAL
6776 #  else
6777 #    define LT_DLGLOBAL         0
6778 #  endif
6779 #endif
6780
6781 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6782    find out it does not work in some platform. */
6783 #ifndef LT_DLLAZY_OR_NOW
6784 #  ifdef RTLD_LAZY
6785 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6786 #  else
6787 #    ifdef DL_LAZY
6788 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6789 #    else
6790 #      ifdef RTLD_NOW
6791 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6792 #      else
6793 #        ifdef DL_NOW
6794 #          define LT_DLLAZY_OR_NOW      DL_NOW
6795 #        else
6796 #          define LT_DLLAZY_OR_NOW      0
6797 #        endif
6798 #      endif
6799 #    endif
6800 #  endif
6801 #endif
6802
6803 #ifdef __cplusplus
6804 extern "C" void exit (int);
6805 #endif
6806
6807 void fnord() { int i=42;}
6808 int main ()
6809 {
6810   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6811   int status = $lt_dlunknown;
6812
6813   if (self)
6814     {
6815       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6816       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6817       /* dlclose (self); */
6818     }
6819
6820     exit (status);
6821 }
6822 EOF
6823   if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6824     (./conftest; exit; ) 2>/dev/null
6825     lt_status=$?
6826     case x$lt_status in
6827       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6828       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6829       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6830     esac
6831   else :
6832     # compilation failed
6833     lt_cv_dlopen_self=no
6834   fi
6835 fi
6836 rm -fr conftest*
6837
6838     
6839 fi
6840
6841 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6842
6843     if test "x$lt_cv_dlopen_self" = xyes; then
6844       LDFLAGS="$LDFLAGS $link_static_flag"
6845       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6846 echo "configure:6847: checking whether a statically linked program can dlopen itself" >&5
6847 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6848   echo $ac_n "(cached) $ac_c" 1>&6
6849 else
6850           if test "$cross_compiling" = yes; then :
6851   lt_cv_dlopen_self_static=cross
6852 else
6853     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6854   lt_status=$lt_dlunknown
6855   cat > conftest.$ac_ext <<EOF
6856 #line 6857 "configure"
6857 #include "confdefs.h"
6858
6859 #if HAVE_DLFCN_H
6860 #include <dlfcn.h>
6861 #endif
6862
6863 #include <stdio.h>
6864
6865 #ifdef RTLD_GLOBAL
6866 #  define LT_DLGLOBAL           RTLD_GLOBAL
6867 #else
6868 #  ifdef DL_GLOBAL
6869 #    define LT_DLGLOBAL         DL_GLOBAL
6870 #  else
6871 #    define LT_DLGLOBAL         0
6872 #  endif
6873 #endif
6874
6875 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6876    find out it does not work in some platform. */
6877 #ifndef LT_DLLAZY_OR_NOW
6878 #  ifdef RTLD_LAZY
6879 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6880 #  else
6881 #    ifdef DL_LAZY
6882 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6883 #    else
6884 #      ifdef RTLD_NOW
6885 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6886 #      else
6887 #        ifdef DL_NOW
6888 #          define LT_DLLAZY_OR_NOW      DL_NOW
6889 #        else
6890 #          define LT_DLLAZY_OR_NOW      0
6891 #        endif
6892 #      endif
6893 #    endif
6894 #  endif
6895 #endif
6896
6897 #ifdef __cplusplus
6898 extern "C" void exit (int);
6899 #endif
6900
6901 void fnord() { int i=42;}
6902 int main ()
6903 {
6904   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6905   int status = $lt_dlunknown;
6906
6907   if (self)
6908     {
6909       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6910       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6911       /* dlclose (self); */
6912     }
6913
6914     exit (status);
6915 }
6916 EOF
6917   if { (eval echo configure:6918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6918     (./conftest; exit; ) 2>/dev/null
6919     lt_status=$?
6920     case x$lt_status in
6921       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6922       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6923       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6924     esac
6925   else :
6926     # compilation failed
6927     lt_cv_dlopen_self_static=no
6928   fi
6929 fi
6930 rm -fr conftest*
6931
6932       
6933 fi
6934
6935 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6936     fi
6937
6938     CPPFLAGS="$save_CPPFLAGS"
6939     LDFLAGS="$save_LDFLAGS"
6940     LIBS="$save_LIBS"
6941     ;;
6942   esac
6943
6944   case $lt_cv_dlopen_self in
6945   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6946   *) enable_dlopen_self=unknown ;;
6947   esac
6948
6949   case $lt_cv_dlopen_self_static in
6950   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6951   *) enable_dlopen_self_static=unknown ;;
6952   esac
6953 fi
6954
6955
6956 if test "$enable_shared" = yes && test "$GCC" = yes; then
6957   case $archive_cmds in
6958   *'~'*)
6959     # FIXME: we may have to deal with multi-command sequences.
6960     ;;
6961   '$CC '*)
6962     # Test whether the compiler implicitly links with -lc since on some
6963     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6964     # to ld, don't add -lc before -lgcc.
6965     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
6966 echo "configure:6967: checking whether -lc should be explicitly linked in" >&5
6967     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
6968   echo $ac_n "(cached) $ac_c" 1>&6
6969 else
6970   $rm conftest*
6971     echo 'static int dummy;' > conftest.$ac_ext
6972
6973     if { (eval echo configure:6974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6974       soname=conftest
6975       lib=conftest
6976       libobjs=conftest.$ac_objext
6977       deplibs=
6978       wl=$lt_cv_prog_cc_wl
6979       compiler_flags=-v
6980       linker_flags=-v
6981       verstring=
6982       output_objdir=.
6983       libname=conftest
6984       save_allow_undefined_flag=$allow_undefined_flag
6985       allow_undefined_flag=
6986       if { (eval echo configure:6987: \"$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; }
6987       then
6988         lt_cv_archive_cmds_need_lc=no
6989       else
6990         lt_cv_archive_cmds_need_lc=yes
6991       fi
6992       allow_undefined_flag=$save_allow_undefined_flag
6993     else
6994       cat conftest.err 1>&5
6995     fi
6996 fi
6997
6998     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
6999     ;;
7000   esac
7001 fi
7002 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7003
7004 # The second clause should only fire when bootstrapping the
7005 # libtool distribution, otherwise you forgot to ship ltmain.sh
7006 # with your package, and you will get complaints that there are
7007 # no rules to generate ltmain.sh.
7008 if test -f "$ltmain"; then
7009   :
7010 else
7011   # If there is no Makefile yet, we rely on a make rule to execute
7012   # `config.status --recheck' to rerun these tests and create the
7013   # libtool script then.
7014   test -f Makefile && make "$ltmain"
7015 fi
7016
7017 if test -f "$ltmain"; then
7018   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7019   $rm -f "${ofile}T"
7020
7021   echo creating $ofile
7022
7023   # Now quote all the things that may contain metacharacters while being
7024   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7025   # variables and quote the copies for generation of the libtool script.
7026   for var in echo old_CC old_CFLAGS SED \
7027     AR AR_FLAGS CC LD LN_S NM SHELL \
7028     reload_flag reload_cmds wl \
7029     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7030     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7031     library_names_spec soname_spec \
7032     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7033     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7034     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7035     old_striplib striplib file_magic_cmd export_symbols_cmds \
7036     deplibs_check_method allow_undefined_flag no_undefined_flag \
7037     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7038     global_symbol_to_c_name_address \
7039     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7040     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7041     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7042
7043     case $var in
7044     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7045     old_postinstall_cmds | old_postuninstall_cmds | \
7046     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7047     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7048     postinstall_cmds | postuninstall_cmds | \
7049     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7050       # Double-quote double-evaled strings.
7051       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7052       ;;
7053     *)
7054       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7055       ;;
7056     esac
7057   done
7058
7059   cat <<__EOF__ > "${ofile}T"
7060 #! $SHELL
7061
7062 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7063 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7064 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7065 #
7066 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7067 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7068 #
7069 # This program is free software; you can redistribute it and/or modify
7070 # it under the terms of the GNU General Public License as published by
7071 # the Free Software Foundation; either version 2 of the License, or
7072 # (at your option) any later version.
7073 #
7074 # This program is distributed in the hope that it will be useful, but
7075 # WITHOUT ANY WARRANTY; without even the implied warranty of
7076 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7077 # General Public License for more details.
7078 #
7079 # You should have received a copy of the GNU General Public License
7080 # along with this program; if not, write to the Free Software
7081 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7082 #
7083 # As a special exception to the GNU General Public License, if you
7084 # distribute this file as part of a program that contains a
7085 # configuration script generated by Autoconf, you may include it under
7086 # the same distribution terms that you use for the rest of that program.
7087
7088 # A sed that does not truncate output.
7089 SED=$lt_SED
7090
7091 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7092 Xsed="${SED} -e s/^X//"
7093
7094 # The HP-UX ksh and POSIX shell print the target directory to stdout
7095 # if CDPATH is set.
7096 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7097
7098 # ### BEGIN LIBTOOL CONFIG
7099
7100 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7101
7102 # Shell to use when invoking shell scripts.
7103 SHELL=$lt_SHELL
7104
7105 # Whether or not to build shared libraries.
7106 build_libtool_libs=$enable_shared
7107
7108 # Whether or not to build static libraries.
7109 build_old_libs=$enable_static
7110
7111 # Whether or not to add -lc for building shared libraries.
7112 build_libtool_need_lc=$need_lc
7113
7114 # Whether or not to optimize for fast installation.
7115 fast_install=$enable_fast_install
7116
7117 # The host system.
7118 host_alias=$host_alias
7119 host=$host
7120
7121 # An echo program that does not interpret backslashes.
7122 echo=$lt_echo
7123
7124 # The archiver.
7125 AR=$lt_AR
7126 AR_FLAGS=$lt_AR_FLAGS
7127
7128 # The default C compiler.
7129 CC=$lt_CC
7130
7131 # Is the compiler the GNU C compiler?
7132 with_gcc=$GCC
7133
7134 # The linker used to build libraries.
7135 LD=$lt_LD
7136
7137 # Whether we need hard or soft links.
7138 LN_S=$lt_LN_S
7139
7140 # A BSD-compatible nm program.
7141 NM=$lt_NM
7142
7143 # A symbol stripping program
7144 STRIP=$STRIP
7145
7146 # Used to examine libraries when file_magic_cmd begins "file"
7147 MAGIC_CMD=$MAGIC_CMD
7148
7149 # Used on cygwin: DLL creation program.
7150 DLLTOOL="$DLLTOOL"
7151
7152 # Used on cygwin: object dumper.
7153 OBJDUMP="$OBJDUMP"
7154
7155 # Used on cygwin: assembler.
7156 AS="$AS"
7157
7158 # The name of the directory that contains temporary libtool files.
7159 objdir=$objdir
7160
7161 # How to create reloadable object files.
7162 reload_flag=$lt_reload_flag
7163 reload_cmds=$lt_reload_cmds
7164
7165 # How to pass a linker flag through the compiler.
7166 wl=$lt_wl
7167
7168 # Object file suffix (normally "o").
7169 objext="$ac_objext"
7170
7171 # Old archive suffix (normally "a").
7172 libext="$libext"
7173
7174 # Executable file suffix (normally "").
7175 exeext="$exeext"
7176
7177 # Additional compiler flags for building library objects.
7178 pic_flag=$lt_pic_flag
7179 pic_mode=$pic_mode
7180
7181 # Does compiler simultaneously support -c and -o options?
7182 compiler_c_o=$lt_compiler_c_o
7183
7184 # Can we write directly to a .lo ?
7185 compiler_o_lo=$lt_compiler_o_lo
7186
7187 # Must we lock files when doing compilation ?
7188 need_locks=$lt_need_locks
7189
7190 # Do we need the lib prefix for modules?
7191 need_lib_prefix=$need_lib_prefix
7192
7193 # Do we need a version for libraries?
7194 need_version=$need_version
7195
7196 # Whether dlopen is supported.
7197 dlopen_support=$enable_dlopen
7198
7199 # Whether dlopen of programs is supported.
7200 dlopen_self=$enable_dlopen_self
7201
7202 # Whether dlopen of statically linked programs is supported.
7203 dlopen_self_static=$enable_dlopen_self_static
7204
7205 # Compiler flag to prevent dynamic linking.
7206 link_static_flag=$lt_link_static_flag
7207
7208 # Compiler flag to turn off builtin functions.
7209 no_builtin_flag=$lt_no_builtin_flag
7210
7211 # Compiler flag to allow reflexive dlopens.
7212 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7213
7214 # Compiler flag to generate shared objects directly from archives.
7215 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7216
7217 # Compiler flag to generate thread-safe objects.
7218 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7219
7220 # Library versioning type.
7221 version_type=$version_type
7222
7223 # Format of library name prefix.
7224 libname_spec=$lt_libname_spec
7225
7226 # List of archive names.  First name is the real one, the rest are links.
7227 # The last name is the one that the linker finds with -lNAME.
7228 library_names_spec=$lt_library_names_spec
7229
7230 # The coded name of the library, if different from the real name.
7231 soname_spec=$lt_soname_spec
7232
7233 # Commands used to build and install an old-style archive.
7234 RANLIB=$lt_RANLIB
7235 old_archive_cmds=$lt_old_archive_cmds
7236 old_postinstall_cmds=$lt_old_postinstall_cmds
7237 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7238
7239 # Create an old-style archive from a shared archive.
7240 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7241
7242 # Create a temporary old-style archive to link instead of a shared archive.
7243 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7244
7245 # Commands used to build and install a shared archive.
7246 archive_cmds=$lt_archive_cmds
7247 archive_expsym_cmds=$lt_archive_expsym_cmds
7248 postinstall_cmds=$lt_postinstall_cmds
7249 postuninstall_cmds=$lt_postuninstall_cmds
7250
7251 # Commands to strip libraries.
7252 old_striplib=$lt_old_striplib
7253 striplib=$lt_striplib
7254
7255 # Method to check whether dependent libraries are shared objects.
7256 deplibs_check_method=$lt_deplibs_check_method
7257
7258 # Command to use when deplibs_check_method == file_magic.
7259 file_magic_cmd=$lt_file_magic_cmd
7260
7261 # Flag that allows shared libraries with undefined symbols to be built.
7262 allow_undefined_flag=$lt_allow_undefined_flag
7263
7264 # Flag that forces no undefined symbols.
7265 no_undefined_flag=$lt_no_undefined_flag
7266
7267 # Commands used to finish a libtool library installation in a directory.
7268 finish_cmds=$lt_finish_cmds
7269
7270 # Same as above, but a single script fragment to be evaled but not shown.
7271 finish_eval=$lt_finish_eval
7272
7273 # Take the output of nm and produce a listing of raw symbols and C names.
7274 global_symbol_pipe=$lt_global_symbol_pipe
7275
7276 # Transform the output of nm in a proper C declaration
7277 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7278
7279 # Transform the output of nm in a C name address pair
7280 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7281
7282 # This is the shared library runtime path variable.
7283 runpath_var=$runpath_var
7284
7285 # This is the shared library path variable.
7286 shlibpath_var=$shlibpath_var
7287
7288 # Is shlibpath searched before the hard-coded library search path?
7289 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7290
7291 # How to hardcode a shared library path into an executable.
7292 hardcode_action=$hardcode_action
7293
7294 # Whether we should hardcode library paths into libraries.
7295 hardcode_into_libs=$hardcode_into_libs
7296
7297 # Flag to hardcode \$libdir into a binary during linking.
7298 # This must work even if \$libdir does not exist.
7299 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7300
7301 # Whether we need a single -rpath flag with a separated argument.
7302 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7303
7304 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7305 # resulting binary.
7306 hardcode_direct=$hardcode_direct
7307
7308 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7309 # resulting binary.
7310 hardcode_minus_L=$hardcode_minus_L
7311
7312 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7313 # the resulting binary.
7314 hardcode_shlibpath_var=$hardcode_shlibpath_var
7315
7316 # Variables whose values should be saved in libtool wrapper scripts and
7317 # restored at relink time.
7318 variables_saved_for_relink="$variables_saved_for_relink"
7319
7320 # Whether libtool must link a program against all its dependency libraries.
7321 link_all_deplibs=$link_all_deplibs
7322
7323 # Compile-time system search path for libraries
7324 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7325
7326 # Run-time system search path for libraries
7327 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7328
7329 # Fix the shell variable \$srcfile for the compiler.
7330 fix_srcfile_path="$fix_srcfile_path"
7331
7332 # Set to yes if exported symbols are required.
7333 always_export_symbols=$always_export_symbols
7334
7335 # The commands to list exported symbols.
7336 export_symbols_cmds=$lt_export_symbols_cmds
7337
7338 # The commands to extract the exported symbol list from a shared archive.
7339 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7340
7341 # Symbols that should not be listed in the preloaded symbols.
7342 exclude_expsyms=$lt_exclude_expsyms
7343
7344 # Symbols that must always be exported.
7345 include_expsyms=$lt_include_expsyms
7346
7347 # ### END LIBTOOL CONFIG
7348
7349 __EOF__
7350
7351   case $host_os in
7352   aix3*)
7353     cat <<\EOF >> "${ofile}T"
7354
7355 # AIX sometimes has problems with the GCC collect2 program.  For some
7356 # reason, if we set the COLLECT_NAMES environment variable, the problems
7357 # vanish in a puff of smoke.
7358 if test "X${COLLECT_NAMES+set}" != Xset; then
7359   COLLECT_NAMES=
7360   export COLLECT_NAMES
7361 fi
7362 EOF
7363     ;;
7364   esac
7365
7366   case $host_os in
7367   cygwin* | mingw* | pw32* | os2*)
7368     cat <<'EOF' >> "${ofile}T"
7369       # This is a source program that is used to create dlls on Windows
7370       # Don't remove nor modify the starting and closing comments
7371 # /* ltdll.c starts here */
7372 # #define WIN32_LEAN_AND_MEAN
7373 # #include <windows.h>
7374 # #undef WIN32_LEAN_AND_MEAN
7375 # #include <stdio.h>
7376 #
7377 # #ifndef __CYGWIN__
7378 # #  ifdef __CYGWIN32__
7379 # #    define __CYGWIN__ __CYGWIN32__
7380 # #  endif
7381 # #endif
7382 #
7383 # #ifdef __cplusplus
7384 # extern "C" {
7385 # #endif
7386 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7387 # #ifdef __cplusplus
7388 # }
7389 # #endif
7390 #
7391 # #ifdef __CYGWIN__
7392 # #include <cygwin/cygwin_dll.h>
7393 # DECLARE_CYGWIN_DLL( DllMain );
7394 # #endif
7395 # HINSTANCE __hDllInstance_base;
7396 #
7397 # BOOL APIENTRY
7398 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7399 # {
7400 #   __hDllInstance_base = hInst;
7401 #   return TRUE;
7402 # }
7403 # /* ltdll.c ends here */
7404         # This is a source program that is used to create import libraries
7405         # on Windows for dlls which lack them. Don't remove nor modify the
7406         # starting and closing comments
7407 # /* impgen.c starts here */
7408 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7409 #
7410 #  This file is part of GNU libtool.
7411 #
7412 #  This program is free software; you can redistribute it and/or modify
7413 #  it under the terms of the GNU General Public License as published by
7414 #  the Free Software Foundation; either version 2 of the License, or
7415 #  (at your option) any later version.
7416 #
7417 #  This program is distributed in the hope that it will be useful,
7418 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7419 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7420 #  GNU General Public License for more details.
7421 #
7422 #  You should have received a copy of the GNU General Public License
7423 #  along with this program; if not, write to the Free Software
7424 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7425 #  */
7426 #
7427 # #include <stdio.h>            /* for printf() */
7428 # #include <unistd.h>           /* for open(), lseek(), read() */
7429 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7430 # #include <string.h>           /* for strdup() */
7431 #
7432 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7433 # #ifndef O_BINARY
7434 # #define O_BINARY 0
7435 # #endif
7436 #
7437 # static unsigned int
7438 # pe_get16 (fd, offset)
7439 #      int fd;
7440 #      int offset;
7441 # {
7442 #   unsigned char b[2];
7443 #   lseek (fd, offset, SEEK_SET);
7444 #   read (fd, b, 2);
7445 #   return b[0] + (b[1]<<8);
7446 # }
7447 #
7448 # static unsigned int
7449 # pe_get32 (fd, offset)
7450 #     int fd;
7451 #     int offset;
7452 # {
7453 #   unsigned char b[4];
7454 #   lseek (fd, offset, SEEK_SET);
7455 #   read (fd, b, 4);
7456 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7457 # }
7458 #
7459 # static unsigned int
7460 # pe_as32 (ptr)
7461 #      void *ptr;
7462 # {
7463 #   unsigned char *b = ptr;
7464 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7465 # }
7466 #
7467 # int
7468 # main (argc, argv)
7469 #     int argc;
7470 #     char *argv[];
7471 # {
7472 #     int dll;
7473 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7474 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7475 #     unsigned long name_rvas, nexp;
7476 #     unsigned char *expdata, *erva;
7477 #     char *filename, *dll_name;
7478 #
7479 #     filename = argv[1];
7480 #
7481 #     dll = open(filename, O_RDONLY|O_BINARY);
7482 #     if (dll < 1)
7483 #       return 1;
7484 #
7485 #     dll_name = filename;
7486 #
7487 #     for (i=0; filename[i]; i++)
7488 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7489 #           dll_name = filename + i +1;
7490 #
7491 #     pe_header_offset = pe_get32 (dll, 0x3c);
7492 #     opthdr_ofs = pe_header_offset + 4 + 20;
7493 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7494 #
7495 #     if (num_entries < 1) /* no exports */
7496 #       return 1;
7497 #
7498 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7499 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7500 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7501 #     secptr = (pe_header_offset + 4 + 20 +
7502 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7503 #
7504 #     expptr = 0;
7505 #     for (i = 0; i < nsections; i++)
7506 #     {
7507 #       char sname[8];
7508 #       unsigned long secptr1 = secptr + 40 * i;
7509 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7510 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7511 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7512 #       lseek(dll, secptr1, SEEK_SET);
7513 #       read(dll, sname, 8);
7514 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7515 #       {
7516 #           expptr = fptr + (export_rva - vaddr);
7517 #           if (export_rva + export_size > vaddr + vsize)
7518 #               export_size = vsize - (export_rva - vaddr);
7519 #           break;
7520 #       }
7521 #     }
7522 #
7523 #     expdata = (unsigned char*)malloc(export_size);
7524 #     lseek (dll, expptr, SEEK_SET);
7525 #     read (dll, expdata, export_size);
7526 #     erva = expdata - export_rva;
7527 #
7528 #     nexp = pe_as32 (expdata+24);
7529 #     name_rvas = pe_as32 (expdata+32);
7530 #
7531 #     printf ("EXPORTS\n");
7532 #     for (i = 0; i<nexp; i++)
7533 #     {
7534 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7535 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7536 #     }
7537 #
7538 #     return 0;
7539 # }
7540 # /* impgen.c ends here */
7541
7542 EOF
7543     ;;
7544   esac
7545
7546   # We use sed instead of cat because bash on DJGPP gets confused if
7547   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7548   # text mode, it properly converts lines to CR/LF.  This bash problem
7549   # is reportedly fixed, but why not run on old versions too?
7550   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7551
7552   mv -f "${ofile}T" "$ofile" || \
7553     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7554   chmod +x "$ofile"
7555 fi
7556
7557
7558
7559
7560
7561 # This can be used to rebuild libtool when needed
7562 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7563
7564 # Always use our own libtool.
7565 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7566
7567 # Prevent multiple expansion
7568
7569
7570
7571 # test for ln hardlink support
7572 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7573 echo "configure:7574: checking whether ln works" >&5
7574 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7575   echo $ac_n "(cached) $ac_c" 1>&6
7576 else
7577   rm -f conftest.src conftest.dst
7578 echo "conftest" > conftest.src
7579 if ln conftest.src conftest.dst 2>/dev/null
7580 then
7581   ol_cv_prog_LN_H="ln"
7582 else
7583   ol_cv_prog_LN_H="cp"
7584 fi
7585 rm -f conftest.src conftest.dst
7586
7587 fi
7588 LN_H="$ol_cv_prog_LN_H"
7589 if test "$ol_cv_prog_LN_H" = "ln"; then
7590         echo "$ac_t""yes" 1>&6
7591 else
7592         echo "$ac_t""no" 1>&6
7593 fi
7594
7595 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7596 echo "configure:7597: checking whether ln -s works" >&5
7597 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7598   echo $ac_n "(cached) $ac_c" 1>&6
7599 else
7600   rm -f conftestdata
7601 if ln -s X conftestdata 2>/dev/null
7602 then
7603   rm -f conftestdata
7604   ac_cv_prog_LN_S="ln -s"
7605 else
7606   ac_cv_prog_LN_S=ln
7607 fi
7608 fi
7609 LN_S="$ac_cv_prog_LN_S"
7610 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7611   echo "$ac_t""yes" 1>&6
7612 else
7613   echo "$ac_t""no" 1>&6
7614 fi
7615
7616
7617 ol_link_perl=no
7618 if test $ol_enable_perl != no ; then
7619         # Extract the first word of "perl", so it can be a program name with args.
7620 set dummy perl; ac_word=$2
7621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7622 echo "configure:7623: checking for $ac_word" >&5
7623 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7624   echo $ac_n "(cached) $ac_c" 1>&6
7625 else
7626   case "$PERLBIN" in
7627   /*)
7628   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7629   ;;
7630   ?:/*)
7631   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7632   ;;
7633   *)
7634   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7635   ac_dummy="$PATH"
7636   for ac_dir in $ac_dummy; do 
7637     test -z "$ac_dir" && ac_dir=.
7638     if test -f $ac_dir/$ac_word; then
7639       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7640       break
7641     fi
7642   done
7643   IFS="$ac_save_ifs"
7644   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7645   ;;
7646 esac
7647 fi
7648 PERLBIN="$ac_cv_path_PERLBIN"
7649 if test -n "$PERLBIN"; then
7650   echo "$ac_t""$PERLBIN" 1>&6
7651 else
7652   echo "$ac_t""no" 1>&6
7653 fi
7654
7655
7656         if test "no$PERLBIN" = "no" ; then
7657                 if test $ol_enable_perl = yes ; then
7658                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7659                 fi
7660
7661         else
7662                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7663                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7664
7665                 if test x"$ol_enable_perl" = "xyes" ; then
7666                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7667                 else
7668                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7669                 fi
7670                                 ol_link_perl=yes
7671         fi
7672 fi
7673
7674 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7675 echo "configure:7676: checking how to run the C preprocessor" >&5
7676 # On Suns, sometimes $CPP names a directory.
7677 if test -n "$CPP" && test -d "$CPP"; then
7678   CPP=
7679 fi
7680 if test -z "$CPP"; then
7681 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7682   echo $ac_n "(cached) $ac_c" 1>&6
7683 else
7684     # This must be in double quotes, not single quotes, because CPP may get
7685   # substituted into the Makefile and "${CC-cc}" will confuse make.
7686   CPP="${CC-cc} -E"
7687   # On the NeXT, cc -E runs the code through the compiler's parser,
7688   # not just through cpp.
7689   cat > conftest.$ac_ext <<EOF
7690 #line 7691 "configure"
7691 #include "confdefs.h"
7692 #include <assert.h>
7693 Syntax Error
7694 EOF
7695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7696 { (eval echo configure:7697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7698 if test -z "$ac_err"; then
7699   :
7700 else
7701   echo "$ac_err" >&5
7702   echo "configure: failed program was:" >&5
7703   cat conftest.$ac_ext >&5
7704   rm -rf conftest*
7705   CPP="${CC-cc} -E -traditional-cpp"
7706   cat > conftest.$ac_ext <<EOF
7707 #line 7708 "configure"
7708 #include "confdefs.h"
7709 #include <assert.h>
7710 Syntax Error
7711 EOF
7712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7713 { (eval echo configure:7714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7715 if test -z "$ac_err"; then
7716   :
7717 else
7718   echo "$ac_err" >&5
7719   echo "configure: failed program was:" >&5
7720   cat conftest.$ac_ext >&5
7721   rm -rf conftest*
7722   CPP="${CC-cc} -nologo -E"
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 #include <assert.h>
7727 Syntax Error
7728 EOF
7729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7730 { (eval echo configure:7731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7732 if test -z "$ac_err"; then
7733   :
7734 else
7735   echo "$ac_err" >&5
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   CPP=/lib/cpp
7740 fi
7741 rm -f conftest*
7742 fi
7743 rm -f conftest*
7744 fi
7745 rm -f conftest*
7746   ac_cv_prog_CPP="$CPP"
7747 fi
7748   CPP="$ac_cv_prog_CPP"
7749 else
7750   ac_cv_prog_CPP="$CPP"
7751 fi
7752 echo "$ac_t""$CPP" 1>&6
7753
7754
7755
7756 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7757 echo "configure:7758: checking for Cygwin environment" >&5
7758 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7759   echo $ac_n "(cached) $ac_c" 1>&6
7760 else
7761   cat > conftest.$ac_ext <<EOF
7762 #line 7763 "configure"
7763 #include "confdefs.h"
7764
7765 int main() {
7766
7767 #ifndef __CYGWIN__
7768 #define __CYGWIN__ __CYGWIN32__
7769 #endif
7770 return __CYGWIN__;
7771 ; return 0; }
7772 EOF
7773 if { (eval echo configure:7774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7774   rm -rf conftest*
7775   ac_cv_cygwin=yes
7776 else
7777   echo "configure: failed program was:" >&5
7778   cat conftest.$ac_ext >&5
7779   rm -rf conftest*
7780   ac_cv_cygwin=no
7781 fi
7782 rm -f conftest*
7783 fi
7784
7785 echo "$ac_t""$ac_cv_cygwin" 1>&6
7786 CYGWIN=
7787 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7788 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7789 echo "configure:7790: checking for mingw32 environment" >&5
7790 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7791   echo $ac_n "(cached) $ac_c" 1>&6
7792 else
7793   cat > conftest.$ac_ext <<EOF
7794 #line 7795 "configure"
7795 #include "confdefs.h"
7796
7797 int main() {
7798 return __MINGW32__;
7799 ; return 0; }
7800 EOF
7801 if { (eval echo configure:7802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7802   rm -rf conftest*
7803   ac_cv_mingw32=yes
7804 else
7805   echo "configure: failed program was:" >&5
7806   cat conftest.$ac_ext >&5
7807   rm -rf conftest*
7808   ac_cv_mingw32=no
7809 fi
7810 rm -f conftest*
7811 fi
7812
7813 echo "$ac_t""$ac_cv_mingw32" 1>&6
7814 MINGW32=
7815 test "$ac_cv_mingw32" = yes && MINGW32=yes
7816
7817
7818
7819 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7820 echo "configure:7821: checking for executable suffix" >&5
7821 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7822   echo $ac_n "(cached) $ac_c" 1>&6
7823 else
7824   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7825   ac_cv_exeext=.exe
7826 else
7827   rm -f conftest*
7828   echo 'int main () { return 0; }' > conftest.$ac_ext
7829   ac_cv_exeext=
7830   if { (eval echo configure:7831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7831     for file in conftest.*; do
7832       case $file in
7833       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7834       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7835       esac
7836     done
7837   else
7838     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7839   fi
7840   rm -f conftest*
7841   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7842 fi
7843 fi
7844
7845 EXEEXT=""
7846 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7847 echo "$ac_t""${ac_cv_exeext}" 1>&6
7848 ac_exeext=$EXEEXT
7849
7850 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7851 echo "configure:7852: checking for object suffix" >&5
7852 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7853   echo $ac_n "(cached) $ac_c" 1>&6
7854 else
7855   rm -f conftest*
7856 echo 'int i = 1;' > conftest.$ac_ext
7857 if { (eval echo configure:7858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7858   for ac_file in conftest.*; do
7859     case $ac_file in
7860     *.c) ;;
7861     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7862     esac
7863   done
7864 else
7865   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7866 fi
7867 rm -f conftest*
7868 fi
7869
7870 echo "$ac_t""$ac_cv_objext" 1>&6
7871 OBJEXT=$ac_cv_objext
7872 ac_objext=$ac_cv_objext
7873
7874
7875 cat >> confdefs.h <<EOF
7876 #define EXEEXT "${EXEEXT}"
7877 EOF
7878
7879
7880 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7881 echo "configure:7882: checking for be_app in -lbe" >&5
7882 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7883 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7884   echo $ac_n "(cached) $ac_c" 1>&6
7885 else
7886   ac_save_LIBS="$LIBS"
7887 LIBS="-lbe -lroot -lnet $LIBS"
7888 cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 /* Override any gcc2 internal prototype to avoid an error.  */
7892 /* We use char because int might match the return type of a gcc2
7893     builtin and then its argument prototype would still apply.  */
7894 char be_app();
7895
7896 int main() {
7897 be_app()
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7901   rm -rf conftest*
7902   eval "ac_cv_lib_$ac_lib_var=yes"
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   eval "ac_cv_lib_$ac_lib_var=no"
7908 fi
7909 rm -f conftest*
7910 LIBS="$ac_save_LIBS"
7911
7912 fi
7913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7914   echo "$ac_t""yes" 1>&6
7915   LIBS="$LIBS -lbe -lroot -lnet"
7916 else
7917   echo "$ac_t""no" 1>&6
7918 :
7919 fi
7920
7921
7922
7923
7924
7925 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7926 echo "configure:7927: checking for ${CC-cc} option to accept ANSI C" >&5
7927 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7928   echo $ac_n "(cached) $ac_c" 1>&6
7929 else
7930   am_cv_prog_cc_stdc=no
7931 ac_save_CC="$CC"
7932 # Don't try gcc -ansi; that turns off useful extensions and
7933 # breaks some systems' header files.
7934 # AIX                   -qlanglvl=ansi
7935 # Ultrix and OSF/1      -std1
7936 # HP-UX 10.20 and later -Ae
7937 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7938 # SVR4                  -Xc -D__EXTENSIONS__
7939 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7940 do
7941   CC="$ac_save_CC $ac_arg"
7942   cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945 #include <stdarg.h>
7946 #include <stdio.h>
7947 #include <sys/types.h>
7948 #include <sys/stat.h>
7949 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7950 struct buf { int x; };
7951 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7952 static char *e (p, i)
7953      char **p;
7954      int i;
7955 {
7956   return p[i];
7957 }
7958 static char *f (char * (*g) (char **, int), char **p, ...)
7959 {
7960   char *s;
7961   va_list v;
7962   va_start (v,p);
7963   s = g (p, va_arg (v,int));
7964   va_end (v);
7965   return s;
7966 }
7967 int test (int i, double x);
7968 struct s1 {int (*f) (int a);};
7969 struct s2 {int (*f) (double a);};
7970 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7971 int argc;
7972 char **argv;
7973
7974 int main() {
7975
7976 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7977
7978 ; return 0; }
7979 EOF
7980 if { (eval echo configure:7981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7981   rm -rf conftest*
7982   am_cv_prog_cc_stdc="$ac_arg"; break
7983 else
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986 fi
7987 rm -f conftest*
7988 done
7989 CC="$ac_save_CC"
7990
7991 fi
7992
7993 if test -z "$am_cv_prog_cc_stdc"; then
7994   echo "$ac_t""none needed" 1>&6
7995 else
7996   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
7997 fi
7998 case "x$am_cv_prog_cc_stdc" in
7999   x|xno) ;;
8000   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8001 esac
8002
8003 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8004         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8005 fi
8006
8007 # test for make depend flag
8008 OL_MKDEP=
8009 OL_MKDEP_FLAGS=
8010 if test -z "${MKDEP}"; then
8011         OL_MKDEP="${CC-cc}"
8012         if test -z "${MKDEP_FLAGS}"; then
8013                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8014 echo "configure:8015: checking for ${OL_MKDEP} depend flag" >&5
8015 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8016   echo $ac_n "(cached) $ac_c" 1>&6
8017 else
8018   
8019                         ol_cv_mkdep=no
8020                         for flag in "-M" "-xM"; do
8021                                 cat > conftest.c <<EOF
8022  noCode;
8023 EOF
8024                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8025                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8026                                 then
8027                                         if test ! -f conftest."${ac_object}" ; then
8028                                                 ol_cv_mkdep=$flag
8029                                                 OL_MKDEP_FLAGS="$flag"
8030                                                 break
8031                                         fi
8032                                 fi
8033                         done
8034                         rm -f conftest*
8035                 
8036 fi
8037
8038 echo "$ac_t""$ol_cv_mkdep" 1>&6
8039         else
8040                 cc_cv_mkdep=yes
8041                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8042         fi
8043 else
8044         cc_cv_mkdep=yes
8045         OL_MKDEP="${MKDEP}"
8046         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8047 fi
8048
8049
8050
8051 if test "${ol_cv_mkdep}" = no ; then
8052         # this will soon become an error
8053         echo "configure: warning: do not know how to generate dependencies" 1>&2
8054 fi
8055
8056 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8057 echo "configure:8058: checking for afopen in -ls" >&5
8058 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8060   echo $ac_n "(cached) $ac_c" 1>&6
8061 else
8062   ac_save_LIBS="$LIBS"
8063 LIBS="-ls  $LIBS"
8064 cat > conftest.$ac_ext <<EOF
8065 #line 8066 "configure"
8066 #include "confdefs.h"
8067 /* Override any gcc2 internal prototype to avoid an error.  */
8068 /* We use char because int might match the return type of a gcc2
8069     builtin and then its argument prototype would still apply.  */
8070 char afopen();
8071
8072 int main() {
8073 afopen()
8074 ; return 0; }
8075 EOF
8076 if { (eval echo configure:8077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8077   rm -rf conftest*
8078   eval "ac_cv_lib_$ac_lib_var=yes"
8079 else
8080   echo "configure: failed program was:" >&5
8081   cat conftest.$ac_ext >&5
8082   rm -rf conftest*
8083   eval "ac_cv_lib_$ac_lib_var=no"
8084 fi
8085 rm -f conftest*
8086 LIBS="$ac_save_LIBS"
8087
8088 fi
8089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8090   echo "$ac_t""yes" 1>&6
8091   
8092         AUTH_LIBS=-ls
8093         cat >> confdefs.h <<\EOF
8094 #define HAVE_AIX_SECURITY 1
8095 EOF
8096
8097
8098 else
8099   echo "$ac_t""no" 1>&6
8100 fi
8101
8102
8103 case "$target" in
8104 *-ibm-openedition)
8105         ac_cv_func_getopt=no
8106         cat >> confdefs.h <<\EOF
8107 #define BOTH_STRINGS_H 1
8108 EOF
8109
8110         ;;
8111 esac
8112
8113 ol_link_modules=no
8114 if test $ol_enable_modules != no ; then
8115         for ac_hdr in ltdl.h
8116 do
8117 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8118 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8119 echo "configure:8120: checking for $ac_hdr" >&5
8120 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8121   echo $ac_n "(cached) $ac_c" 1>&6
8122 else
8123   cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 #include <$ac_hdr>
8127 EOF
8128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8129 { (eval echo configure:8130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8131 if test -z "$ac_err"; then
8132   rm -rf conftest*
8133   eval "ac_cv_header_$ac_safe=yes"
8134 else
8135   echo "$ac_err" >&5
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   eval "ac_cv_header_$ac_safe=no"
8140 fi
8141 rm -f conftest*
8142 fi
8143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8144   echo "$ac_t""yes" 1>&6
8145     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8146   cat >> confdefs.h <<EOF
8147 #define $ac_tr_hdr 1
8148 EOF
8149  
8150 else
8151   echo "$ac_t""no" 1>&6
8152 fi
8153 done
8154
8155
8156         if test $ac_cv_header_ltdl_h = no ; then
8157                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8158         fi
8159
8160         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8161 echo "configure:8162: checking for lt_dlinit in -lltdl" >&5
8162 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8163 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8164   echo $ac_n "(cached) $ac_c" 1>&6
8165 else
8166   ac_save_LIBS="$LIBS"
8167 LIBS="-lltdl  $LIBS"
8168 cat > conftest.$ac_ext <<EOF
8169 #line 8170 "configure"
8170 #include "confdefs.h"
8171 /* Override any gcc2 internal prototype to avoid an error.  */
8172 /* We use char because int might match the return type of a gcc2
8173     builtin and then its argument prototype would still apply.  */
8174 char lt_dlinit();
8175
8176 int main() {
8177 lt_dlinit()
8178 ; return 0; }
8179 EOF
8180 if { (eval echo configure:8181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8181   rm -rf conftest*
8182   eval "ac_cv_lib_$ac_lib_var=yes"
8183 else
8184   echo "configure: failed program was:" >&5
8185   cat conftest.$ac_ext >&5
8186   rm -rf conftest*
8187   eval "ac_cv_lib_$ac_lib_var=no"
8188 fi
8189 rm -f conftest*
8190 LIBS="$ac_save_LIBS"
8191
8192 fi
8193 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8194   echo "$ac_t""yes" 1>&6
8195   
8196                 MODULES_LIBS=-lltdl
8197                 cat >> confdefs.h <<\EOF
8198 #define HAVE_LIBLTDL 1
8199 EOF
8200
8201         
8202 else
8203   echo "$ac_t""no" 1>&6
8204 fi
8205
8206
8207         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8208                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8209         fi
8210         ol_link_modules=yes
8211
8212 else
8213         for i in $Backends; do
8214                 eval "ol_tmp=\$ol_enable_$i"
8215                 if test $ol_tmp = mod ; then
8216                         echo "configure: warning: building static $i backend" 1>&2
8217                         eval "ol_enable_$i=yes"
8218                 fi
8219         done
8220         for i in $Overlays; do
8221                 eval "ol_tmp=\$ol_enable_$i"
8222                 if test $ol_tmp = mod ; then
8223                         echo "configure: warning: building static $i overlay" 1>&2
8224                         eval "ol_enable_$i=yes"
8225                 fi
8226         done
8227 fi
8228
8229 # test for EBCDIC
8230 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8231 echo "configure:8232: checking for EBCDIC" >&5
8232 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8233   echo $ac_n "(cached) $ac_c" 1>&6
8234 else
8235   
8236         cat > conftest.$ac_ext <<EOF
8237 #line 8238 "configure"
8238 #include "confdefs.h"
8239
8240 #if !('M' == 0xd4)
8241 #include <__ASCII__/generate_error.h>
8242 #endif
8243
8244 EOF
8245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8246 { (eval echo configure:8247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8248 if test -z "$ac_err"; then
8249   rm -rf conftest*
8250   ol_cv_cpp_ebcdic=yes
8251 else
8252   echo "$ac_err" >&5
8253   echo "configure: failed program was:" >&5
8254   cat conftest.$ac_ext >&5
8255   rm -rf conftest*
8256   ol_cv_cpp_ebcdic=no
8257 fi
8258 rm -f conftest*
8259 fi
8260
8261 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8262 if test $ol_cv_cpp_ebcdic = yes ; then
8263         cat >> confdefs.h <<\EOF
8264 #define HAVE_EBCDIC 1
8265 EOF
8266
8267 fi
8268
8269 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8270 echo "configure:8271: checking for ANSI C header files" >&5
8271 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8272   echo $ac_n "(cached) $ac_c" 1>&6
8273 else
8274   cat > conftest.$ac_ext <<EOF
8275 #line 8276 "configure"
8276 #include "confdefs.h"
8277 #include <stdlib.h>
8278 #include <stdarg.h>
8279 #include <string.h>
8280 #include <float.h>
8281 EOF
8282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8283 { (eval echo configure:8284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8285 if test -z "$ac_err"; then
8286   rm -rf conftest*
8287   ol_cv_header_stdc=yes
8288 else
8289   echo "$ac_err" >&5
8290   echo "configure: failed program was:" >&5
8291   cat conftest.$ac_ext >&5
8292   rm -rf conftest*
8293   ol_cv_header_stdc=no
8294 fi
8295 rm -f conftest*
8296
8297 if test $ol_cv_header_stdc = yes; then
8298   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8299 cat > conftest.$ac_ext <<EOF
8300 #line 8301 "configure"
8301 #include "confdefs.h"
8302 #include <string.h>
8303 EOF
8304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8305   egrep "memchr" >/dev/null 2>&1; then
8306   :
8307 else
8308   rm -rf conftest*
8309   ol_cv_header_stdc=no
8310 fi
8311 rm -f conftest*
8312
8313 fi
8314
8315 if test $ol_cv_header_stdc = yes; then
8316   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 #include <stdlib.h>
8321 EOF
8322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8323   egrep "free" >/dev/null 2>&1; then
8324   :
8325 else
8326   rm -rf conftest*
8327   ol_cv_header_stdc=no
8328 fi
8329 rm -f conftest*
8330
8331 fi
8332
8333 if test $ol_cv_header_stdc = yes; then
8334   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8335 if test "$cross_compiling" = yes; then
8336   :
8337 else
8338   cat > conftest.$ac_ext <<EOF
8339 #line 8340 "configure"
8340 #include "confdefs.h"
8341 #include <ctype.h>
8342 #ifndef HAVE_EBCDIC
8343 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8344 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8345 #else
8346 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8347                 || ('j' <= (c) && (c) <= 'r') \
8348                 || ('s' <= (c) && (c) <= 'z'))
8349 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8350 #endif
8351 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8352 int main () { int i; for (i = 0; i < 256; i++)
8353 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8354 exit (0); }
8355
8356 EOF
8357 if { (eval echo configure:8358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8358 then
8359   :
8360 else
8361   echo "configure: failed program was:" >&5
8362   cat conftest.$ac_ext >&5
8363   rm -fr conftest*
8364   ol_cv_header_stdc=no
8365 fi
8366 rm -fr conftest*
8367 fi
8368
8369 fi
8370 fi
8371
8372 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8373 if test $ol_cv_header_stdc = yes; then
8374   cat >> confdefs.h <<\EOF
8375 #define STDC_HEADERS 1
8376 EOF
8377
8378 fi
8379 ac_cv_header_stdc=disable
8380
8381
8382 if test $ol_cv_header_stdc != yes; then
8383         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8384 fi
8385
8386 ac_header_dirent=no
8387 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8388 do
8389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8390 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8391 echo "configure:8392: checking for $ac_hdr that defines DIR" >&5
8392 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8393   echo $ac_n "(cached) $ac_c" 1>&6
8394 else
8395   cat > conftest.$ac_ext <<EOF
8396 #line 8397 "configure"
8397 #include "confdefs.h"
8398 #include <sys/types.h>
8399 #include <$ac_hdr>
8400 int main() {
8401 DIR *dirp = 0;
8402 ; return 0; }
8403 EOF
8404 if { (eval echo configure:8405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8405   rm -rf conftest*
8406   eval "ac_cv_header_dirent_$ac_safe=yes"
8407 else
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   eval "ac_cv_header_dirent_$ac_safe=no"
8412 fi
8413 rm -f conftest*
8414 fi
8415 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8416   echo "$ac_t""yes" 1>&6
8417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8418   cat >> confdefs.h <<EOF
8419 #define $ac_tr_hdr 1
8420 EOF
8421  ac_header_dirent=$ac_hdr; break
8422 else
8423   echo "$ac_t""no" 1>&6
8424 fi
8425 done
8426 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8427 if test $ac_header_dirent = dirent.h; then
8428 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8429 echo "configure:8430: checking for opendir in -ldir" >&5
8430 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8432   echo $ac_n "(cached) $ac_c" 1>&6
8433 else
8434   ac_save_LIBS="$LIBS"
8435 LIBS="-ldir  $LIBS"
8436 cat > conftest.$ac_ext <<EOF
8437 #line 8438 "configure"
8438 #include "confdefs.h"
8439 /* Override any gcc2 internal prototype to avoid an error.  */
8440 /* We use char because int might match the return type of a gcc2
8441     builtin and then its argument prototype would still apply.  */
8442 char opendir();
8443
8444 int main() {
8445 opendir()
8446 ; return 0; }
8447 EOF
8448 if { (eval echo configure:8449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8449   rm -rf conftest*
8450   eval "ac_cv_lib_$ac_lib_var=yes"
8451 else
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -rf conftest*
8455   eval "ac_cv_lib_$ac_lib_var=no"
8456 fi
8457 rm -f conftest*
8458 LIBS="$ac_save_LIBS"
8459
8460 fi
8461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8462   echo "$ac_t""yes" 1>&6
8463   LIBS="$LIBS -ldir"
8464 else
8465   echo "$ac_t""no" 1>&6
8466 fi
8467
8468 else
8469 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8470 echo "configure:8471: checking for opendir in -lx" >&5
8471 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8473   echo $ac_n "(cached) $ac_c" 1>&6
8474 else
8475   ac_save_LIBS="$LIBS"
8476 LIBS="-lx  $LIBS"
8477 cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 /* Override any gcc2 internal prototype to avoid an error.  */
8481 /* We use char because int might match the return type of a gcc2
8482     builtin and then its argument prototype would still apply.  */
8483 char opendir();
8484
8485 int main() {
8486 opendir()
8487 ; return 0; }
8488 EOF
8489 if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8490   rm -rf conftest*
8491   eval "ac_cv_lib_$ac_lib_var=yes"
8492 else
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -rf conftest*
8496   eval "ac_cv_lib_$ac_lib_var=no"
8497 fi
8498 rm -f conftest*
8499 LIBS="$ac_save_LIBS"
8500
8501 fi
8502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8503   echo "$ac_t""yes" 1>&6
8504   LIBS="$LIBS -lx"
8505 else
8506   echo "$ac_t""no" 1>&6
8507 fi
8508
8509 fi
8510
8511 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8512 echo "configure:8513: checking for sys/wait.h that is POSIX.1 compatible" >&5
8513 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8514   echo $ac_n "(cached) $ac_c" 1>&6
8515 else
8516   cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <sys/types.h>
8520 #include <sys/wait.h>
8521 #ifndef WEXITSTATUS
8522 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8523 #endif
8524 #ifndef WIFEXITED
8525 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8526 #endif
8527 int main() {
8528 int s;
8529 wait (&s);
8530 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8531 ; return 0; }
8532 EOF
8533 if { (eval echo configure:8534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8534   rm -rf conftest*
8535   ac_cv_header_sys_wait_h=yes
8536 else
8537   echo "configure: failed program was:" >&5
8538   cat conftest.$ac_ext >&5
8539   rm -rf conftest*
8540   ac_cv_header_sys_wait_h=no
8541 fi
8542 rm -f conftest*
8543 fi
8544
8545 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8546 if test $ac_cv_header_sys_wait_h = yes; then
8547   cat >> confdefs.h <<\EOF
8548 #define HAVE_SYS_WAIT_H 1
8549 EOF
8550
8551 fi
8552
8553 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8554 echo "configure:8555: checking POSIX termios" >&5
8555 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561 #include <sys/types.h>
8562 #include <unistd.h>
8563 #include <termios.h>
8564 int main() {
8565 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8566    tcgetattr(0, 0);
8567 ; return 0; }
8568 EOF
8569 if { (eval echo configure:8570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8570   rm -rf conftest*
8571   am_cv_sys_posix_termios=yes
8572 else
8573   echo "configure: failed program was:" >&5
8574   cat conftest.$ac_ext >&5
8575   rm -rf conftest*
8576   am_cv_sys_posix_termios=no
8577 fi
8578 rm -f conftest*
8579 fi
8580
8581 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8582
8583
8584  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8585 echo "configure:8586: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8586 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8590
8591   gwinsz_in_termios_h=no
8592   if test $am_cv_sys_posix_termios = yes; then
8593     cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596 #include <sys/types.h>
8597 #     include <termios.h>
8598 #     ifdef TIOCGWINSZ
8599         yes
8600 #     endif
8601     
8602 EOF
8603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8604   egrep "yes" >/dev/null 2>&1; then
8605   rm -rf conftest*
8606   gwinsz_in_termios_h=yes
8607 fi
8608 rm -f conftest*
8609
8610   fi
8611
8612   if test $gwinsz_in_termios_h = no; then
8613     cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 #include <sys/types.h>
8617 #     include <sys/ioctl.h>
8618 #     ifdef TIOCGWINSZ
8619         yes
8620 #     endif
8621     
8622 EOF
8623 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8624   egrep "yes" >/dev/null 2>&1; then
8625   rm -rf conftest*
8626   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8627 fi
8628 rm -f conftest*
8629
8630   fi
8631   
8632 fi
8633
8634 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8635   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8636     cat >> confdefs.h <<\EOF
8637 #define GWINSZ_IN_SYS_IOCTL 1
8638 EOF
8639
8640   fi
8641
8642 if test $am_cv_sys_posix_termios = yes ; then
8643         cat >> confdefs.h <<\EOF
8644 #define HAVE_POSIX_TERMIOS 1
8645 EOF
8646
8647 fi
8648
8649 for ac_hdr in \
8650         arpa/inet.h             \
8651         arpa/nameser.h  \
8652         assert.h                \
8653         bits/types.h    \
8654         conio.h                 \
8655         crypt.h                 \
8656         direct.h                \
8657         errno.h                 \
8658         fcntl.h                 \
8659         filio.h                 \
8660         getopt.h                \
8661         grp.h                   \
8662         io.h                    \
8663         libutil.h               \
8664         limits.h                \
8665         locale.h                \
8666         netinet/tcp.h   \
8667         malloc.h                \
8668         memory.h                \
8669         psap.h                  \
8670         pwd.h                   \
8671         process.h               \
8672         resolv.h                \
8673         sgtty.h                 \
8674         shadow.h                \
8675         stddef.h                \
8676         string.h                \
8677         strings.h               \
8678         sysexits.h              \
8679         sys/file.h              \
8680         sys/filio.h             \
8681         sys/errno.h             \
8682         sys/ioctl.h             \
8683         sys/param.h             \
8684         sys/resource.h  \
8685         sys/select.h    \
8686         sys/socket.h    \
8687         sys/stat.h              \
8688         sys/syslog.h    \
8689         sys/time.h              \
8690         sys/types.h             \
8691         sys/ucred.h             \
8692         sys/uio.h               \
8693         syslog.h                \
8694         termios.h               \
8695         unistd.h                \
8696         winsock.h               \
8697         winsock2.h              \
8698
8699 do
8700 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8701 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8702 echo "configure:8703: checking for $ac_hdr" >&5
8703 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8704   echo $ac_n "(cached) $ac_c" 1>&6
8705 else
8706   cat > conftest.$ac_ext <<EOF
8707 #line 8708 "configure"
8708 #include "confdefs.h"
8709 #include <$ac_hdr>
8710 EOF
8711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8712 { (eval echo configure:8713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8714 if test -z "$ac_err"; then
8715   rm -rf conftest*
8716   eval "ac_cv_header_$ac_safe=yes"
8717 else
8718   echo "$ac_err" >&5
8719   echo "configure: failed program was:" >&5
8720   cat conftest.$ac_ext >&5
8721   rm -rf conftest*
8722   eval "ac_cv_header_$ac_safe=no"
8723 fi
8724 rm -f conftest*
8725 fi
8726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8727   echo "$ac_t""yes" 1>&6
8728     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8729   cat >> confdefs.h <<EOF
8730 #define $ac_tr_hdr 1
8731 EOF
8732  
8733 else
8734   echo "$ac_t""no" 1>&6
8735 fi
8736 done
8737
8738
8739
8740
8741 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8742 echo "configure:8743: checking for sigset in -lV3" >&5
8743 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8745   echo $ac_n "(cached) $ac_c" 1>&6
8746 else
8747   ac_save_LIBS="$LIBS"
8748 LIBS="-lV3  $LIBS"
8749 cat > conftest.$ac_ext <<EOF
8750 #line 8751 "configure"
8751 #include "confdefs.h"
8752 /* Override any gcc2 internal prototype to avoid an error.  */
8753 /* We use char because int might match the return type of a gcc2
8754     builtin and then its argument prototype would still apply.  */
8755 char sigset();
8756
8757 int main() {
8758 sigset()
8759 ; return 0; }
8760 EOF
8761 if { (eval echo configure:8762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8762   rm -rf conftest*
8763   eval "ac_cv_lib_$ac_lib_var=yes"
8764 else
8765   echo "configure: failed program was:" >&5
8766   cat conftest.$ac_ext >&5
8767   rm -rf conftest*
8768   eval "ac_cv_lib_$ac_lib_var=no"
8769 fi
8770 rm -f conftest*
8771 LIBS="$ac_save_LIBS"
8772
8773 fi
8774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8775   echo "$ac_t""yes" 1>&6
8776     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8777     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8778   cat >> confdefs.h <<EOF
8779 #define $ac_tr_lib 1
8780 EOF
8781
8782   LIBS="-lV3 $LIBS"
8783
8784 else
8785   echo "$ac_t""no" 1>&6
8786 fi
8787
8788
8789 if test "$ac_cv_header_winsock_h" = yes; then
8790 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8791 echo "configure:8792: checking for winsock" >&5
8792 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8793   echo $ac_n "(cached) $ac_c" 1>&6
8794 else
8795   save_LIBS="$LIBS"
8796 for curlib in ws2_32 wsock32; do
8797         LIBS="$LIBS -l$curlib"
8798         cat > conftest.$ac_ext <<EOF
8799 #line 8800 "configure"
8800 #include "confdefs.h"
8801 #include <winsock.h>
8802                         
8803 int main() {
8804
8805                         socket(0,0,0);
8806                         select(0,NULL,NULL,NULL,NULL);
8807                         closesocket(0);
8808                         gethostname(NULL,0);
8809                         
8810 ; return 0; }
8811 EOF
8812 if { (eval echo configure:8813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8813   rm -rf conftest*
8814   ol_cv_winsock=yes
8815 else
8816   echo "configure: failed program was:" >&5
8817   cat conftest.$ac_ext >&5
8818   rm -rf conftest*
8819   ol_cv_winsock=no
8820 fi
8821 rm -f conftest*
8822
8823         if test $ol_cv_winsock = yes; then
8824                 cat >> confdefs.h <<\EOF
8825 #define HAVE_WINSOCK 1
8826 EOF
8827
8828                 ac_cv_func_socket=yes
8829                 ac_cv_func_select=yes
8830                 ac_cv_func_closesocket=yes
8831                 ac_cv_func_gethostname=yes
8832                 if test $curlib = ws2_32; then
8833                         ol_cv_winsock=winsock2
8834                         cat >> confdefs.h <<\EOF
8835 #define HAVE_WINSOCK2 1
8836 EOF
8837
8838                 fi
8839                 break
8840         fi
8841         LIBS="$save_LIBS"
8842 done
8843 fi
8844
8845 echo "$ac_t""$ol_cv_winsock" 1>&6
8846 fi
8847
8848
8849 echo $ac_n "checking for socket""... $ac_c" 1>&6
8850 echo "configure:8851: checking for socket" >&5
8851 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8852   echo $ac_n "(cached) $ac_c" 1>&6
8853 else
8854   cat > conftest.$ac_ext <<EOF
8855 #line 8856 "configure"
8856 #include "confdefs.h"
8857 /* System header to define __stub macros and hopefully few prototypes,
8858     which can conflict with char socket(); below.  */
8859 #include <assert.h>
8860 /* Override any gcc2 internal prototype to avoid an error.  */
8861 /* We use char because int might match the return type of a gcc2
8862     builtin and then its argument prototype would still apply.  */
8863 char socket();
8864 char (*f)();
8865
8866 int main() {
8867
8868 /* The GNU C library defines this for functions which it implements
8869     to always fail with ENOSYS.  Some functions are actually named
8870     something starting with __ and the normal name is an alias.  */
8871 #if defined (__stub_socket) || defined (__stub___socket)
8872 choke me
8873 #else
8874 f = socket;
8875 #endif
8876
8877 ; return 0; }
8878 EOF
8879 if { (eval echo configure:8880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8880   rm -rf conftest*
8881   eval "ac_cv_func_socket=yes"
8882 else
8883   echo "configure: failed program was:" >&5
8884   cat conftest.$ac_ext >&5
8885   rm -rf conftest*
8886   eval "ac_cv_func_socket=no"
8887 fi
8888 rm -f conftest*
8889 fi
8890
8891 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8892   echo "$ac_t""yes" 1>&6
8893   :
8894 else
8895   echo "$ac_t""no" 1>&6
8896         
8897         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8898 echo "configure:8899: checking for main in -lsocket" >&5
8899 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8900 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8901   echo $ac_n "(cached) $ac_c" 1>&6
8902 else
8903   ac_save_LIBS="$LIBS"
8904 LIBS="-lsocket  $LIBS"
8905 cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908
8909 int main() {
8910 main()
8911 ; return 0; }
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8914   rm -rf conftest*
8915   eval "ac_cv_lib_$ac_lib_var=yes"
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   eval "ac_cv_lib_$ac_lib_var=no"
8921 fi
8922 rm -f conftest*
8923 LIBS="$ac_save_LIBS"
8924
8925 fi
8926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8927   echo "$ac_t""yes" 1>&6
8928     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8929     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8930   cat >> confdefs.h <<EOF
8931 #define $ac_tr_lib 1
8932 EOF
8933
8934   LIBS="-lsocket $LIBS"
8935
8936 else
8937   echo "$ac_t""no" 1>&6
8938 fi
8939
8940         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8941 echo "configure:8942: checking for main in -lnet" >&5
8942 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8944   echo $ac_n "(cached) $ac_c" 1>&6
8945 else
8946   ac_save_LIBS="$LIBS"
8947 LIBS="-lnet  $LIBS"
8948 cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8951
8952 int main() {
8953 main()
8954 ; return 0; }
8955 EOF
8956 if { (eval echo configure:8957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8957   rm -rf conftest*
8958   eval "ac_cv_lib_$ac_lib_var=yes"
8959 else
8960   echo "configure: failed program was:" >&5
8961   cat conftest.$ac_ext >&5
8962   rm -rf conftest*
8963   eval "ac_cv_lib_$ac_lib_var=no"
8964 fi
8965 rm -f conftest*
8966 LIBS="$ac_save_LIBS"
8967
8968 fi
8969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8970   echo "$ac_t""yes" 1>&6
8971     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8972     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8973   cat >> confdefs.h <<EOF
8974 #define $ac_tr_lib 1
8975 EOF
8976
8977   LIBS="-lnet $LIBS"
8978
8979 else
8980   echo "$ac_t""no" 1>&6
8981 fi
8982
8983         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
8984 echo "configure:8985: checking for main in -lnsl_s" >&5
8985 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
8986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8987   echo $ac_n "(cached) $ac_c" 1>&6
8988 else
8989   ac_save_LIBS="$LIBS"
8990 LIBS="-lnsl_s  $LIBS"
8991 cat > conftest.$ac_ext <<EOF
8992 #line 8993 "configure"
8993 #include "confdefs.h"
8994
8995 int main() {
8996 main()
8997 ; return 0; }
8998 EOF
8999 if { (eval echo configure:9000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9000   rm -rf conftest*
9001   eval "ac_cv_lib_$ac_lib_var=yes"
9002 else
9003   echo "configure: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   rm -rf conftest*
9006   eval "ac_cv_lib_$ac_lib_var=no"
9007 fi
9008 rm -f conftest*
9009 LIBS="$ac_save_LIBS"
9010
9011 fi
9012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9013   echo "$ac_t""yes" 1>&6
9014     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9015     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9016   cat >> confdefs.h <<EOF
9017 #define $ac_tr_lib 1
9018 EOF
9019
9020   LIBS="-lnsl_s $LIBS"
9021
9022 else
9023   echo "$ac_t""no" 1>&6
9024 fi
9025
9026         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9027 echo "configure:9028: checking for main in -lnsl" >&5
9028 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9029 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9030   echo $ac_n "(cached) $ac_c" 1>&6
9031 else
9032   ac_save_LIBS="$LIBS"
9033 LIBS="-lnsl  $LIBS"
9034 cat > conftest.$ac_ext <<EOF
9035 #line 9036 "configure"
9036 #include "confdefs.h"
9037
9038 int main() {
9039 main()
9040 ; return 0; }
9041 EOF
9042 if { (eval echo configure:9043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9043   rm -rf conftest*
9044   eval "ac_cv_lib_$ac_lib_var=yes"
9045 else
9046   echo "configure: failed program was:" >&5
9047   cat conftest.$ac_ext >&5
9048   rm -rf conftest*
9049   eval "ac_cv_lib_$ac_lib_var=no"
9050 fi
9051 rm -f conftest*
9052 LIBS="$ac_save_LIBS"
9053
9054 fi
9055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9056   echo "$ac_t""yes" 1>&6
9057     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9058     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9059   cat >> confdefs.h <<EOF
9060 #define $ac_tr_lib 1
9061 EOF
9062
9063   LIBS="-lnsl $LIBS"
9064
9065 else
9066   echo "$ac_t""no" 1>&6
9067 fi
9068
9069         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9070 echo "configure:9071: checking for socket in -linet" >&5
9071 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9072 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9073   echo $ac_n "(cached) $ac_c" 1>&6
9074 else
9075   ac_save_LIBS="$LIBS"
9076 LIBS="-linet  $LIBS"
9077 cat > conftest.$ac_ext <<EOF
9078 #line 9079 "configure"
9079 #include "confdefs.h"
9080 /* Override any gcc2 internal prototype to avoid an error.  */
9081 /* We use char because int might match the return type of a gcc2
9082     builtin and then its argument prototype would still apply.  */
9083 char socket();
9084
9085 int main() {
9086 socket()
9087 ; return 0; }
9088 EOF
9089 if { (eval echo configure:9090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9090   rm -rf conftest*
9091   eval "ac_cv_lib_$ac_lib_var=yes"
9092 else
9093   echo "configure: failed program was:" >&5
9094   cat conftest.$ac_ext >&5
9095   rm -rf conftest*
9096   eval "ac_cv_lib_$ac_lib_var=no"
9097 fi
9098 rm -f conftest*
9099 LIBS="$ac_save_LIBS"
9100
9101 fi
9102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9103   echo "$ac_t""yes" 1>&6
9104     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9105     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9106   cat >> confdefs.h <<EOF
9107 #define $ac_tr_lib 1
9108 EOF
9109
9110   LIBS="-linet $LIBS"
9111
9112 else
9113   echo "$ac_t""no" 1>&6
9114 fi
9115
9116         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9117 echo "configure:9118: checking for main in -lgen" >&5
9118 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9119 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9120   echo $ac_n "(cached) $ac_c" 1>&6
9121 else
9122   ac_save_LIBS="$LIBS"
9123 LIBS="-lgen  $LIBS"
9124 cat > conftest.$ac_ext <<EOF
9125 #line 9126 "configure"
9126 #include "confdefs.h"
9127
9128 int main() {
9129 main()
9130 ; return 0; }
9131 EOF
9132 if { (eval echo configure:9133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9133   rm -rf conftest*
9134   eval "ac_cv_lib_$ac_lib_var=yes"
9135 else
9136   echo "configure: failed program was:" >&5
9137   cat conftest.$ac_ext >&5
9138   rm -rf conftest*
9139   eval "ac_cv_lib_$ac_lib_var=no"
9140 fi
9141 rm -f conftest*
9142 LIBS="$ac_save_LIBS"
9143
9144 fi
9145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9146   echo "$ac_t""yes" 1>&6
9147     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9148     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9149   cat >> confdefs.h <<EOF
9150 #define $ac_tr_lib 1
9151 EOF
9152
9153   LIBS="-lgen $LIBS"
9154
9155 else
9156   echo "$ac_t""no" 1>&6
9157 fi
9158
9159
9160 fi
9161
9162
9163 echo $ac_n "checking for select""... $ac_c" 1>&6
9164 echo "configure:9165: checking for select" >&5
9165 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9166   echo $ac_n "(cached) $ac_c" 1>&6
9167 else
9168   cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* System header to define __stub macros and hopefully few prototypes,
9172     which can conflict with char select(); below.  */
9173 #include <assert.h>
9174 /* Override any gcc2 internal prototype to avoid an error.  */
9175 /* We use char because int might match the return type of a gcc2
9176     builtin and then its argument prototype would still apply.  */
9177 char select();
9178 char (*f)();
9179
9180 int main() {
9181
9182 /* The GNU C library defines this for functions which it implements
9183     to always fail with ENOSYS.  Some functions are actually named
9184     something starting with __ and the normal name is an alias.  */
9185 #if defined (__stub_select) || defined (__stub___select)
9186 choke me
9187 #else
9188 f = select;
9189 #endif
9190
9191 ; return 0; }
9192 EOF
9193 if { (eval echo configure:9194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9194   rm -rf conftest*
9195   eval "ac_cv_func_select=yes"
9196 else
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_func_select=no"
9201 fi
9202 rm -f conftest*
9203 fi
9204
9205 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9206   echo "$ac_t""yes" 1>&6
9207   :
9208 else
9209   echo "$ac_t""no" 1>&6
9210 { echo "configure: error: select() required." 1>&2; exit 1; }
9211 fi
9212
9213
9214 if test "${ac_cv_header_winsock_h}" != yes; then
9215                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9216 echo "configure:9217: checking types of arguments for select()" >&5
9217  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9218   echo $ac_n "(cached) $ac_c" 1>&6
9219 else
9220    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9221   echo $ac_n "(cached) $ac_c" 1>&6
9222 else
9223     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9224   echo $ac_n "(cached) $ac_c" 1>&6
9225 else
9226      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9227      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9228       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9229        cat > conftest.$ac_ext <<EOF
9230 #line 9231 "configure"
9231 #include "confdefs.h"
9232 #ifdef HAVE_SYS_TYPES_H
9233 #include <sys/types.h>
9234 #endif
9235 #ifdef HAVE_SYS_TIME_H
9236 #include <sys/time.h>
9237 #endif
9238 #ifdef HAVE_SYS_SELECT_H
9239 #include <sys/select.h>
9240 #endif
9241 #ifdef HAVE_SYS_SOCKET_H
9242 #include <sys/socket.h>
9243 #endif
9244 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);
9245 int main() {
9246
9247 ; return 0; }
9248 EOF
9249 if { (eval echo configure:9250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9250   rm -rf conftest*
9251           ac_not_found=no ; break 3
9252 else
9253   echo "configure: failed program was:" >&5
9254   cat conftest.$ac_ext >&5
9255   rm -rf conftest*
9256   ac_not_found=yes
9257 fi
9258 rm -f conftest*
9259       done
9260      done
9261     done
9262    
9263 fi
9264   
9265 fi
9266  
9267 fi
9268  if test "$ac_not_found" = yes; then
9269   ac_cv_func_select_arg1=int 
9270   ac_cv_func_select_arg234='int *' 
9271   ac_cv_func_select_arg5='struct timeval *'
9272  fi
9273  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9274  cat >> confdefs.h <<EOF
9275 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9276 EOF
9277
9278  cat >> confdefs.h <<EOF
9279 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9280 EOF
9281
9282  cat >> confdefs.h <<EOF
9283 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9284 EOF
9285
9286
9287 fi
9288
9289
9290 for ac_hdr in regex.h 
9291 do
9292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9294 echo "configure:9295: checking for $ac_hdr" >&5
9295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9296   echo $ac_n "(cached) $ac_c" 1>&6
9297 else
9298   cat > conftest.$ac_ext <<EOF
9299 #line 9300 "configure"
9300 #include "confdefs.h"
9301 #include <$ac_hdr>
9302 EOF
9303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9304 { (eval echo configure:9305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9306 if test -z "$ac_err"; then
9307   rm -rf conftest*
9308   eval "ac_cv_header_$ac_safe=yes"
9309 else
9310   echo "$ac_err" >&5
9311   echo "configure: failed program was:" >&5
9312   cat conftest.$ac_ext >&5
9313   rm -rf conftest*
9314   eval "ac_cv_header_$ac_safe=no"
9315 fi
9316 rm -f conftest*
9317 fi
9318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9319   echo "$ac_t""yes" 1>&6
9320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9321   cat >> confdefs.h <<EOF
9322 #define $ac_tr_hdr 1
9323 EOF
9324  
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328 done
9329
9330 if test "$ac_cv_header_regex_h" != yes ; then
9331         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9332 fi
9333
9334 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9335 echo "configure:9336: checking for library containing regfree" >&5
9336 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9337   echo $ac_n "(cached) $ac_c" 1>&6
9338 else
9339   ac_func_search_save_LIBS="$LIBS"
9340 ac_cv_search_regfree="no"
9341 cat > conftest.$ac_ext <<EOF
9342 #line 9343 "configure"
9343 #include "confdefs.h"
9344 /* Override any gcc2 internal prototype to avoid an error.  */
9345 /* We use char because int might match the return type of a gcc2
9346     builtin and then its argument prototype would still apply.  */
9347 char regfree();
9348
9349 int main() {
9350 regfree()
9351 ; return 0; }
9352 EOF
9353 if { (eval echo configure:9354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9354   rm -rf conftest*
9355   ac_cv_search_regfree="none required"
9356 else
9357   echo "configure: failed program was:" >&5
9358   cat conftest.$ac_ext >&5
9359 fi
9360 rm -f conftest*
9361 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9362 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char regfree();
9370
9371 int main() {
9372 regfree()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   ac_cv_search_regfree="-l$ac_lib"
9378 break
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382 fi
9383 rm -f conftest*
9384 done
9385 LIBS="$ac_func_search_save_LIBS"
9386 fi
9387
9388 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9389 if test "$ac_cv_search_regfree" != "no"; then
9390   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9391   :
9392 else :
9393   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9394 fi
9395
9396
9397 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9398 echo "configure:9399: checking for compatible POSIX regex" >&5
9399 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9400   echo $ac_n "(cached) $ac_c" 1>&6
9401 else
9402   
9403         if test "$cross_compiling" = yes; then
9404   ol_cv_c_posix_regex=cross
9405 else
9406   cat > conftest.$ac_ext <<EOF
9407 #line 9408 "configure"
9408 #include "confdefs.h"
9409
9410 #include <sys/types.h>
9411 #include <regex.h>
9412 static char *pattern, *string;
9413 main()
9414 {
9415         int rc;
9416         regex_t re;
9417
9418         pattern = "^A";
9419
9420         if(regcomp(&re, pattern, 0)) {
9421                 return -1;
9422         }
9423         
9424         string = "ALL MATCH";
9425         
9426         rc = regexec(&re, string, 0, (void*)0, 0);
9427
9428         regfree(&re);
9429
9430         return rc;
9431 }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9434 then
9435   ol_cv_c_posix_regex=yes
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -fr conftest*
9440   ol_cv_c_posix_regex=no
9441 fi
9442 rm -fr conftest*
9443 fi
9444
9445 fi
9446
9447 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9448
9449 if test "$ol_cv_c_posix_regex" = no ; then
9450         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9451 fi
9452
9453
9454 have_uuid=no
9455 for ac_hdr in sys/uuid.h
9456 do
9457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9459 echo "configure:9460: checking for $ac_hdr" >&5
9460 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9461   echo $ac_n "(cached) $ac_c" 1>&6
9462 else
9463   cat > conftest.$ac_ext <<EOF
9464 #line 9465 "configure"
9465 #include "confdefs.h"
9466 #include <$ac_hdr>
9467 EOF
9468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9469 { (eval echo configure:9470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9471 if test -z "$ac_err"; then
9472   rm -rf conftest*
9473   eval "ac_cv_header_$ac_safe=yes"
9474 else
9475   echo "$ac_err" >&5
9476   echo "configure: failed program was:" >&5
9477   cat conftest.$ac_ext >&5
9478   rm -rf conftest*
9479   eval "ac_cv_header_$ac_safe=no"
9480 fi
9481 rm -f conftest*
9482 fi
9483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9484   echo "$ac_t""yes" 1>&6
9485     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9486   cat >> confdefs.h <<EOF
9487 #define $ac_tr_hdr 1
9488 EOF
9489  
9490 else
9491   echo "$ac_t""no" 1>&6
9492 fi
9493 done
9494
9495 if test $ac_cv_header_sys_uuid_h = yes ; then
9496         save_LIBS="$LIBS"
9497         
9498 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9499 echo "configure:9500: checking for library containing uuid_to_str" >&5
9500 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9501   echo $ac_n "(cached) $ac_c" 1>&6
9502 else
9503   ac_func_search_save_LIBS="$LIBS"
9504 ac_cv_search_uuid_to_str="no"
9505 cat > conftest.$ac_ext <<EOF
9506 #line 9507 "configure"
9507 #include "confdefs.h"
9508 /* Override any gcc2 internal prototype to avoid an error.  */
9509 /* We use char because int might match the return type of a gcc2
9510     builtin and then its argument prototype would still apply.  */
9511 char uuid_to_str();
9512
9513 int main() {
9514 uuid_to_str()
9515 ; return 0; }
9516 EOF
9517 if { (eval echo configure:9518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9518   rm -rf conftest*
9519   ac_cv_search_uuid_to_str="none required"
9520 else
9521   echo "configure: failed program was:" >&5
9522   cat conftest.$ac_ext >&5
9523 fi
9524 rm -f conftest*
9525 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9526 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9527 cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530 /* Override any gcc2 internal prototype to avoid an error.  */
9531 /* We use char because int might match the return type of a gcc2
9532     builtin and then its argument prototype would still apply.  */
9533 char uuid_to_str();
9534
9535 int main() {
9536 uuid_to_str()
9537 ; return 0; }
9538 EOF
9539 if { (eval echo configure:9540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9540   rm -rf conftest*
9541   ac_cv_search_uuid_to_str="-l$ac_lib"
9542 break
9543 else
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546 fi
9547 rm -f conftest*
9548 done
9549 LIBS="$ac_func_search_save_LIBS"
9550 fi
9551
9552 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9553 if test "$ac_cv_search_uuid_to_str" != "no"; then
9554   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9555   have_uuid=yes
9556 else :
9557   :
9558 fi
9559         LIBS="$save_LIBS"
9560
9561         if test have_uuid = yes ; then
9562                 cat >> confdefs.h <<\EOF
9563 #define HAVE_UUID_TO_STR 1
9564 EOF
9565
9566
9567                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9568                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9569         fi
9570 fi
9571
9572 if test $have_uuid = no ; then
9573         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9574 echo "configure:9575: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9575         save_LIBS="$LIBS"
9576         LIBS="$LIBS -lrpcrt4"
9577         cat > conftest.$ac_ext <<EOF
9578 #line 9579 "configure"
9579 #include "confdefs.h"
9580
9581                 int __stdcall UuidCreate(void *);
9582                 int __stdcall UuidToStringA(void *,void **);
9583                 
9584 int main() {
9585
9586                 UuidCreate(0);
9587                 UuidToStringA(0,0);
9588                 
9589 ; return 0; }
9590 EOF
9591 if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9592   rm -rf conftest*
9593   need_rpcrt=yes
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -rf conftest*
9598   need_rpcrt=no
9599 fi
9600 rm -f conftest*
9601         if test $need_rpcrt = yes; then
9602                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9603         fi
9604         LIBS="$save_LIBS"
9605         echo "$ac_t""$need_rpcrt" 1>&6
9606 fi
9607
9608 ol_link_dnssrv=no
9609 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9610 echo "configure:9611: checking for res_query" >&5
9611 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9612   echo $ac_n "(cached) $ac_c" 1>&6
9613 else
9614   cat > conftest.$ac_ext <<EOF
9615 #line 9616 "configure"
9616 #include "confdefs.h"
9617 /* System header to define __stub macros and hopefully few prototypes,
9618     which can conflict with char res_query(); below.  */
9619 #include <assert.h>
9620 /* Override any gcc2 internal prototype to avoid an error.  */
9621 /* We use char because int might match the return type of a gcc2
9622     builtin and then its argument prototype would still apply.  */
9623 char res_query();
9624 char (*f)();
9625
9626 int main() {
9627
9628 /* The GNU C library defines this for functions which it implements
9629     to always fail with ENOSYS.  Some functions are actually named
9630     something starting with __ and the normal name is an alias.  */
9631 #if defined (__stub_res_query) || defined (__stub___res_query)
9632 choke me
9633 #else
9634 f = res_query;
9635 #endif
9636
9637 ; return 0; }
9638 EOF
9639 if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9640   rm -rf conftest*
9641   eval "ac_cv_func_res_query=yes"
9642 else
9643   echo "configure: failed program was:" >&5
9644   cat conftest.$ac_ext >&5
9645   rm -rf conftest*
9646   eval "ac_cv_func_res_query=no"
9647 fi
9648 rm -f conftest*
9649 fi
9650
9651 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9652   echo "$ac_t""yes" 1>&6
9653   :
9654 else
9655   echo "$ac_t""no" 1>&6
9656 fi
9657
9658 if test $ac_cv_func_res_query = no ; then 
9659         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9660 echo "configure:9661: checking for __res_query" >&5
9661 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   cat > conftest.$ac_ext <<EOF
9665 #line 9666 "configure"
9666 #include "confdefs.h"
9667 /* System header to define __stub macros and hopefully few prototypes,
9668     which can conflict with char __res_query(); below.  */
9669 #include <assert.h>
9670 /* Override any gcc2 internal prototype to avoid an error.  */
9671 /* We use char because int might match the return type of a gcc2
9672     builtin and then its argument prototype would still apply.  */
9673 char __res_query();
9674 char (*f)();
9675
9676 int main() {
9677
9678 /* The GNU C library defines this for functions which it implements
9679     to always fail with ENOSYS.  Some functions are actually named
9680     something starting with __ and the normal name is an alias.  */
9681 #if defined (__stub___res_query) || defined (__stub_____res_query)
9682 choke me
9683 #else
9684 f = __res_query;
9685 #endif
9686
9687 ; return 0; }
9688 EOF
9689 if { (eval echo configure:9690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9690   rm -rf conftest*
9691   eval "ac_cv_func___res_query=yes"
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695   rm -rf conftest*
9696   eval "ac_cv_func___res_query=no"
9697 fi
9698 rm -f conftest*
9699 fi
9700
9701 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9702   echo "$ac_t""yes" 1>&6
9703   :
9704 else
9705   echo "$ac_t""no" 1>&6
9706 fi
9707
9708         ac_cv_func_res_query=$ac_cv_func___res_query
9709 fi
9710
9711 if test $ac_cv_func_res_query = no ; then 
9712         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9713 echo "configure:9714: checking for res_query in -lbind" >&5
9714 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9715 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9716   echo $ac_n "(cached) $ac_c" 1>&6
9717 else
9718   ac_save_LIBS="$LIBS"
9719 LIBS="-lbind  $LIBS"
9720 cat > conftest.$ac_ext <<EOF
9721 #line 9722 "configure"
9722 #include "confdefs.h"
9723 /* Override any gcc2 internal prototype to avoid an error.  */
9724 /* We use char because int might match the return type of a gcc2
9725     builtin and then its argument prototype would still apply.  */
9726 char res_query();
9727
9728 int main() {
9729 res_query()
9730 ; return 0; }
9731 EOF
9732 if { (eval echo configure:9733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9733   rm -rf conftest*
9734   eval "ac_cv_lib_$ac_lib_var=yes"
9735 else
9736   echo "configure: failed program was:" >&5
9737   cat conftest.$ac_ext >&5
9738   rm -rf conftest*
9739   eval "ac_cv_lib_$ac_lib_var=no"
9740 fi
9741 rm -f conftest*
9742 LIBS="$ac_save_LIBS"
9743
9744 fi
9745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9746   echo "$ac_t""yes" 1>&6
9747     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9748     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9749   cat >> confdefs.h <<EOF
9750 #define $ac_tr_lib 1
9751 EOF
9752
9753   LIBS="-lbind $LIBS"
9754
9755 else
9756   echo "$ac_t""no" 1>&6
9757 fi
9758
9759         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9760 fi
9761
9762 if test $ac_cv_func_res_query = no ; then 
9763         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9764 echo "configure:9765: checking for __res_query in -lbind" >&5
9765 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9766 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9767   echo $ac_n "(cached) $ac_c" 1>&6
9768 else
9769   ac_save_LIBS="$LIBS"
9770 LIBS="-lbind  $LIBS"
9771 cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 /* Override any gcc2 internal prototype to avoid an error.  */
9775 /* We use char because int might match the return type of a gcc2
9776     builtin and then its argument prototype would still apply.  */
9777 char __res_query();
9778
9779 int main() {
9780 __res_query()
9781 ; return 0; }
9782 EOF
9783 if { (eval echo configure:9784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9784   rm -rf conftest*
9785   eval "ac_cv_lib_$ac_lib_var=yes"
9786 else
9787   echo "configure: failed program was:" >&5
9788   cat conftest.$ac_ext >&5
9789   rm -rf conftest*
9790   eval "ac_cv_lib_$ac_lib_var=no"
9791 fi
9792 rm -f conftest*
9793 LIBS="$ac_save_LIBS"
9794
9795 fi
9796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9797   echo "$ac_t""yes" 1>&6
9798     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9799     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9800   cat >> confdefs.h <<EOF
9801 #define $ac_tr_lib 1
9802 EOF
9803
9804   LIBS="-lbind $LIBS"
9805
9806 else
9807   echo "$ac_t""no" 1>&6
9808 fi
9809
9810         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9811 fi
9812
9813 if test $ac_cv_func_res_query = no ; then 
9814         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9815 echo "configure:9816: checking for res_query in -lresolv" >&5
9816 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9817 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9818   echo $ac_n "(cached) $ac_c" 1>&6
9819 else
9820   ac_save_LIBS="$LIBS"
9821 LIBS="-lresolv  $LIBS"
9822 cat > conftest.$ac_ext <<EOF
9823 #line 9824 "configure"
9824 #include "confdefs.h"
9825 /* Override any gcc2 internal prototype to avoid an error.  */
9826 /* We use char because int might match the return type of a gcc2
9827     builtin and then its argument prototype would still apply.  */
9828 char res_query();
9829
9830 int main() {
9831 res_query()
9832 ; return 0; }
9833 EOF
9834 if { (eval echo configure:9835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9835   rm -rf conftest*
9836   eval "ac_cv_lib_$ac_lib_var=yes"
9837 else
9838   echo "configure: failed program was:" >&5
9839   cat conftest.$ac_ext >&5
9840   rm -rf conftest*
9841   eval "ac_cv_lib_$ac_lib_var=no"
9842 fi
9843 rm -f conftest*
9844 LIBS="$ac_save_LIBS"
9845
9846 fi
9847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9848   echo "$ac_t""yes" 1>&6
9849     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9850     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9851   cat >> confdefs.h <<EOF
9852 #define $ac_tr_lib 1
9853 EOF
9854
9855   LIBS="-lresolv $LIBS"
9856
9857 else
9858   echo "$ac_t""no" 1>&6
9859 fi
9860
9861         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9862 fi
9863
9864 if test $ac_cv_func_res_query = no ; then 
9865         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9866 echo "configure:9867: checking for __res_query in -lresolv" >&5
9867 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9869   echo $ac_n "(cached) $ac_c" 1>&6
9870 else
9871   ac_save_LIBS="$LIBS"
9872 LIBS="-lresolv  $LIBS"
9873 cat > conftest.$ac_ext <<EOF
9874 #line 9875 "configure"
9875 #include "confdefs.h"
9876 /* Override any gcc2 internal prototype to avoid an error.  */
9877 /* We use char because int might match the return type of a gcc2
9878     builtin and then its argument prototype would still apply.  */
9879 char __res_query();
9880
9881 int main() {
9882 __res_query()
9883 ; return 0; }
9884 EOF
9885 if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9886   rm -rf conftest*
9887   eval "ac_cv_lib_$ac_lib_var=yes"
9888 else
9889   echo "configure: failed program was:" >&5
9890   cat conftest.$ac_ext >&5
9891   rm -rf conftest*
9892   eval "ac_cv_lib_$ac_lib_var=no"
9893 fi
9894 rm -f conftest*
9895 LIBS="$ac_save_LIBS"
9896
9897 fi
9898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9899   echo "$ac_t""yes" 1>&6
9900     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9901     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9902   cat >> confdefs.h <<EOF
9903 #define $ac_tr_lib 1
9904 EOF
9905
9906   LIBS="-lresolv $LIBS"
9907
9908 else
9909   echo "$ac_t""no" 1>&6
9910 fi
9911
9912         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9913 fi
9914
9915 if test "$ac_cv_func_res_query" = yes ; then
9916         cat >> confdefs.h <<\EOF
9917 #define HAVE_RES_QUERY 1
9918 EOF
9919
9920
9921         if test $ol_enable_dnssrv != no ; then
9922                 ol_link_dnssrv=yes
9923         fi
9924 fi
9925
9926 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
9927         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
9928 fi
9929
9930 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
9931 do
9932 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9933 echo "configure:9934: checking for $ac_func" >&5
9934 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9935   echo $ac_n "(cached) $ac_c" 1>&6
9936 else
9937   cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940 /* System header to define __stub macros and hopefully few prototypes,
9941     which can conflict with char $ac_func(); below.  */
9942 #include <assert.h>
9943 /* Override any gcc2 internal prototype to avoid an error.  */
9944 /* We use char because int might match the return type of a gcc2
9945     builtin and then its argument prototype would still apply.  */
9946 char $ac_func();
9947 char (*f)();
9948
9949 int main() {
9950
9951 /* The GNU C library defines this for functions which it implements
9952     to always fail with ENOSYS.  Some functions are actually named
9953     something starting with __ and the normal name is an alias.  */
9954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9955 choke me
9956 #else
9957 f = $ac_func;
9958 #endif
9959
9960 ; return 0; }
9961 EOF
9962 if { (eval echo configure:9963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9963   rm -rf conftest*
9964   eval "ac_cv_func_$ac_func=yes"
9965 else
9966   echo "configure: failed program was:" >&5
9967   cat conftest.$ac_ext >&5
9968   rm -rf conftest*
9969   eval "ac_cv_func_$ac_func=no"
9970 fi
9971 rm -f conftest*
9972 fi
9973
9974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9975   echo "$ac_t""yes" 1>&6
9976     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9977   cat >> confdefs.h <<EOF
9978 #define $ac_tr_func 1
9979 EOF
9980  
9981 else
9982   echo "$ac_t""no" 1>&6
9983 fi
9984 done
9985
9986
9987 ol_link_ipv6=no
9988 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
9989         if test $ol_enable_ipv6 = yes ; then
9990                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
9991         fi
9992 elif test $ol_enable_ipv6 != no ; then
9993         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
9994 echo "configure:9995: checking INET6_ADDRSTRLEN" >&5
9995 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   
9999                 cat > conftest.$ac_ext <<EOF
10000 #line 10001 "configure"
10001 #include "confdefs.h"
10002
10003 #                       include <netinet/in.h>
10004 #                       ifdef INET6_ADDRSTRLEN
10005                                 __has_inet6_addrstrlen__;
10006 #                       endif
10007                 
10008 EOF
10009 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10010   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10011   rm -rf conftest*
10012   ol_cv_inet6_addrstrlen=yes
10013 else
10014   rm -rf conftest*
10015   ol_cv_inet6_addrstrlen=no
10016 fi
10017 rm -f conftest*
10018
10019 fi
10020
10021 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10022
10023
10024         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10025 echo "configure:10026: checking struct sockaddr_storage" >&5
10026 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10027   echo $ac_n "(cached) $ac_c" 1>&6
10028 else
10029   
10030                 cat > conftest.$ac_ext <<EOF
10031 #line 10032 "configure"
10032 #include "confdefs.h"
10033
10034 #include <sys/types.h>
10035 #include <sys/socket.h>
10036
10037 int main() {
10038
10039                         struct sockaddr_storage ss;
10040
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10044   rm -rf conftest*
10045   ol_cv_struct_sockaddr_storage=yes
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   ol_cv_struct_sockaddr_storage=no
10051 fi
10052 rm -f conftest*
10053 fi
10054
10055 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10056
10057         if test $ol_cv_inet6_addrstrlen = yes \
10058                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10059                 ol_link_ipv6=yes
10060         elif test $ol_enable_ipv6 = yes \
10061                         -a $ol_cv_inet6_addrstrlen = no ; then
10062                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10063         elif test $ol_enable_ipv6 = yes \
10064                         -a $ol_cv_struct_sockaddr_storage = no ; then
10065                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10066         fi
10067 fi
10068
10069 if test $ol_enable_local != no ; then
10070         for ac_hdr in sys/un.h 
10071 do
10072 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10073 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10074 echo "configure:10075: checking for $ac_hdr" >&5
10075 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10076   echo $ac_n "(cached) $ac_c" 1>&6
10077 else
10078   cat > conftest.$ac_ext <<EOF
10079 #line 10080 "configure"
10080 #include "confdefs.h"
10081 #include <$ac_hdr>
10082 EOF
10083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10084 { (eval echo configure:10085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10086 if test -z "$ac_err"; then
10087   rm -rf conftest*
10088   eval "ac_cv_header_$ac_safe=yes"
10089 else
10090   echo "$ac_err" >&5
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=no"
10095 fi
10096 rm -f conftest*
10097 fi
10098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10099   echo "$ac_t""yes" 1>&6
10100     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10101   cat >> confdefs.h <<EOF
10102 #define $ac_tr_hdr 1
10103 EOF
10104  
10105 else
10106   echo "$ac_t""no" 1>&6
10107 fi
10108 done
10109
10110
10111         if test $ol_enable_local = auto ; then
10112                 ol_enable_local=$ac_cv_header_sys_un_h
10113         elif test $ac_cv_header_sys_un_h = no ; then
10114                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10115         fi
10116 fi
10117
10118 ol_link_kbind=no
10119 ol_link_krb5=no
10120 ol_link_krb4=no
10121
10122 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10123         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10124         -o $ol_with_kerberos = k425 ; then
10125
10126         for ac_hdr in krb5.h
10127 do
10128 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10129 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10130 echo "configure:10131: checking for $ac_hdr" >&5
10131 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10132   echo $ac_n "(cached) $ac_c" 1>&6
10133 else
10134   cat > conftest.$ac_ext <<EOF
10135 #line 10136 "configure"
10136 #include "confdefs.h"
10137 #include <$ac_hdr>
10138 EOF
10139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10140 { (eval echo configure:10141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10142 if test -z "$ac_err"; then
10143   rm -rf conftest*
10144   eval "ac_cv_header_$ac_safe=yes"
10145 else
10146   echo "$ac_err" >&5
10147   echo "configure: failed program was:" >&5
10148   cat conftest.$ac_ext >&5
10149   rm -rf conftest*
10150   eval "ac_cv_header_$ac_safe=no"
10151 fi
10152 rm -f conftest*
10153 fi
10154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10155   echo "$ac_t""yes" 1>&6
10156     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10157   cat >> confdefs.h <<EOF
10158 #define $ac_tr_hdr 1
10159 EOF
10160  
10161 else
10162   echo "$ac_t""no" 1>&6
10163 fi
10164 done
10165
10166
10167         if test $ac_cv_header_krb5_h = yes ; then
10168                                 for ac_hdr in heim_err.h
10169 do
10170 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10171 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10172 echo "configure:10173: checking for $ac_hdr" >&5
10173 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10174   echo $ac_n "(cached) $ac_c" 1>&6
10175 else
10176   cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179 #include <$ac_hdr>
10180 EOF
10181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10182 { (eval echo configure:10183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10184 if test -z "$ac_err"; then
10185   rm -rf conftest*
10186   eval "ac_cv_header_$ac_safe=yes"
10187 else
10188   echo "$ac_err" >&5
10189   echo "configure: failed program was:" >&5
10190   cat conftest.$ac_ext >&5
10191   rm -rf conftest*
10192   eval "ac_cv_header_$ac_safe=no"
10193 fi
10194 rm -f conftest*
10195 fi
10196 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10197   echo "$ac_t""yes" 1>&6
10198     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10199   cat >> confdefs.h <<EOF
10200 #define $ac_tr_hdr 1
10201 EOF
10202  
10203 else
10204   echo "$ac_t""no" 1>&6
10205 fi
10206 done
10207
10208                 if test $ac_cv_header_heim_err_h = yes ; then
10209                         krb5_impl=heimdal
10210                 else
10211                         krb5_impl=mit
10212                 fi
10213
10214                 if test $krb5_impl = mit; then
10215                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10216 echo "configure:10217: checking for main in -lk5crypto" >&5
10217 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10218 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10219   echo $ac_n "(cached) $ac_c" 1>&6
10220 else
10221   ac_save_LIBS="$LIBS"
10222 LIBS="-lk5crypto  $LIBS"
10223 cat > conftest.$ac_ext <<EOF
10224 #line 10225 "configure"
10225 #include "confdefs.h"
10226
10227 int main() {
10228 main()
10229 ; return 0; }
10230 EOF
10231 if { (eval echo configure:10232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10232   rm -rf conftest*
10233   eval "ac_cv_lib_$ac_lib_var=yes"
10234 else
10235   echo "configure: failed program was:" >&5
10236   cat conftest.$ac_ext >&5
10237   rm -rf conftest*
10238   eval "ac_cv_lib_$ac_lib_var=no"
10239 fi
10240 rm -f conftest*
10241 LIBS="$ac_save_LIBS"
10242
10243 fi
10244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10245   echo "$ac_t""yes" 1>&6
10246   krb5crypto=k5crypto
10247 else
10248   echo "$ac_t""no" 1>&6
10249 krb5crypto=crypto
10250 fi
10251
10252
10253                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10254 echo "configure:10255: checking for main in -lkrb5" >&5
10255 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10257   echo $ac_n "(cached) $ac_c" 1>&6
10258 else
10259   ac_save_LIBS="$LIBS"
10260 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10261 cat > conftest.$ac_ext <<EOF
10262 #line 10263 "configure"
10263 #include "confdefs.h"
10264
10265 int main() {
10266 main()
10267 ; return 0; }
10268 EOF
10269 if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10270   rm -rf conftest*
10271   eval "ac_cv_lib_$ac_lib_var=yes"
10272 else
10273   echo "configure: failed program was:" >&5
10274   cat conftest.$ac_ext >&5
10275   rm -rf conftest*
10276   eval "ac_cv_lib_$ac_lib_var=no"
10277 fi
10278 rm -f conftest*
10279 LIBS="$ac_save_LIBS"
10280
10281 fi
10282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284   have_krb5=yes
10285                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10286 else
10287   echo "$ac_t""no" 1>&6
10288 have_krb5=no
10289 fi
10290
10291
10292                 elif test $krb5_impl = heimdal; then
10293                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10294 echo "configure:10295: checking for main in -ldes" >&5
10295 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10297   echo $ac_n "(cached) $ac_c" 1>&6
10298 else
10299   ac_save_LIBS="$LIBS"
10300 LIBS="-ldes  $LIBS"
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304
10305 int main() {
10306 main()
10307 ; return 0; }
10308 EOF
10309 if { (eval echo configure:10310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10310   rm -rf conftest*
10311   eval "ac_cv_lib_$ac_lib_var=yes"
10312 else
10313   echo "configure: failed program was:" >&5
10314   cat conftest.$ac_ext >&5
10315   rm -rf conftest*
10316   eval "ac_cv_lib_$ac_lib_var=no"
10317 fi
10318 rm -f conftest*
10319 LIBS="$ac_save_LIBS"
10320
10321 fi
10322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10323   echo "$ac_t""yes" 1>&6
10324   krb5crypto=des
10325 else
10326   echo "$ac_t""no" 1>&6
10327 krb5crypto=crypto
10328 fi
10329
10330
10331                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10332 echo "configure:10333: checking for main in -lkrb5" >&5
10333 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   ac_save_LIBS="$LIBS"
10338 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10339 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342
10343 int main() {
10344 main()
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_lib_$ac_lib_var=no"
10355 fi
10356 rm -f conftest*
10357 LIBS="$ac_save_LIBS"
10358
10359 fi
10360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362   have_krb5=yes
10363                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10364 else
10365   echo "$ac_t""no" 1>&6
10366 have_krb5=no
10367 fi
10368
10369
10370                         cat >> confdefs.h <<\EOF
10371 #define HAVE_HEIMDAL_KERBEROS 1
10372 EOF
10373
10374
10375                 else
10376                         have_krb5=no
10377                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10378                 fi
10379
10380                 if test $have_krb5 = yes ; then
10381                         ol_link_krb5=yes
10382
10383                         cat >> confdefs.h <<\EOF
10384 #define HAVE_KRB5 1
10385 EOF
10386
10387
10388                         if test $ol_with_kerberos = k5only ; then
10389                                 ol_with_kerberos=found
10390                         fi
10391
10392                 elif test $ol_with_kerberos != auto ; then
10393                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10394                 fi
10395
10396         fi
10397 fi
10398
10399 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10400         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10401
10402         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10403 do
10404 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10405 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10406 echo "configure:10407: checking for $ac_hdr" >&5
10407 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10408   echo $ac_n "(cached) $ac_c" 1>&6
10409 else
10410   cat > conftest.$ac_ext <<EOF
10411 #line 10412 "configure"
10412 #include "confdefs.h"
10413 #include <$ac_hdr>
10414 EOF
10415 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10416 { (eval echo configure:10417: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10417 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10418 if test -z "$ac_err"; then
10419   rm -rf conftest*
10420   eval "ac_cv_header_$ac_safe=yes"
10421 else
10422   echo "$ac_err" >&5
10423   echo "configure: failed program was:" >&5
10424   cat conftest.$ac_ext >&5
10425   rm -rf conftest*
10426   eval "ac_cv_header_$ac_safe=no"
10427 fi
10428 rm -f conftest*
10429 fi
10430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10431   echo "$ac_t""yes" 1>&6
10432     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10433   cat >> confdefs.h <<EOF
10434 #define $ac_tr_hdr 1
10435 EOF
10436  
10437 else
10438   echo "$ac_t""no" 1>&6
10439 fi
10440 done
10441
10442
10443         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10444                 if test $krb5_impl = mit; then
10445                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10446 echo "configure:10447: checking for main in -lkrb4" >&5
10447 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10448 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10449   echo $ac_n "(cached) $ac_c" 1>&6
10450 else
10451   ac_save_LIBS="$LIBS"
10452 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10453 cat > conftest.$ac_ext <<EOF
10454 #line 10455 "configure"
10455 #include "confdefs.h"
10456
10457 int main() {
10458 main()
10459 ; return 0; }
10460 EOF
10461 if { (eval echo configure:10462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10462   rm -rf conftest*
10463   eval "ac_cv_lib_$ac_lib_var=yes"
10464 else
10465   echo "configure: failed program was:" >&5
10466   cat conftest.$ac_ext >&5
10467   rm -rf conftest*
10468   eval "ac_cv_lib_$ac_lib_var=no"
10469 fi
10470 rm -f conftest*
10471 LIBS="$ac_save_LIBS"
10472
10473 fi
10474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10475   echo "$ac_t""yes" 1>&6
10476   have_k425=yes
10477                                 KRB4_LIBS="-lkrb4 -ldes425"
10478 else
10479   echo "$ac_t""no" 1>&6
10480 have_k425=no
10481 fi
10482
10483
10484                 elif test $krb5_impl = heimdal; then
10485                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10486 echo "configure:10487: checking for main in -lkrb4" >&5
10487 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10489   echo $ac_n "(cached) $ac_c" 1>&6
10490 else
10491   ac_save_LIBS="$LIBS"
10492 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10493 cat > conftest.$ac_ext <<EOF
10494 #line 10495 "configure"
10495 #include "confdefs.h"
10496
10497 int main() {
10498 main()
10499 ; return 0; }
10500 EOF
10501 if { (eval echo configure:10502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=yes"
10504 else
10505   echo "configure: failed program was:" >&5
10506   cat conftest.$ac_ext >&5
10507   rm -rf conftest*
10508   eval "ac_cv_lib_$ac_lib_var=no"
10509 fi
10510 rm -f conftest*
10511 LIBS="$ac_save_LIBS"
10512
10513 fi
10514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10515   echo "$ac_t""yes" 1>&6
10516   have_k425=yes
10517                                 KRB4_LIBS="-lkrb4"
10518 else
10519   echo "$ac_t""no" 1>&6
10520 have_k425=no
10521 fi
10522
10523
10524                 else
10525                         have_425=no
10526                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10527                 fi
10528
10529                 if test $have_k425 = yes ; then
10530                         ol_with_kerberos=found
10531                         ol_link_krb4=yes
10532
10533                         cat >> confdefs.h <<\EOF
10534 #define HAVE_KRB425 1
10535 EOF
10536
10537                         cat >> confdefs.h <<\EOF
10538 #define HAVE_KRB4 1
10539 EOF
10540
10541
10542                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10543 echo "configure:10544: checking for des_debug in Kerberos libraries" >&5
10544 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10545   echo $ac_n "(cached) $ac_c" 1>&6
10546 else
10547   
10548                                                                 save_LIBS="$LIBS"
10549                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10550                                 cat > conftest.$ac_ext <<EOF
10551 #line 10552 "configure"
10552 #include "confdefs.h"
10553
10554 #include <kerberosIV/krb.h>
10555 #include <kerberosIV/des.h>
10556 extern int des_debug;
10557
10558 int main() {
10559
10560 des_debug = 1;
10561
10562 ; return 0; }
10563 EOF
10564 if { (eval echo configure:10565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10565   rm -rf conftest*
10566   ol_cv_var_des_debug=yes
10567 else
10568   echo "configure: failed program was:" >&5
10569   cat conftest.$ac_ext >&5
10570   rm -rf conftest*
10571   ol_cv_var_des_debug=no
10572 fi
10573 rm -f conftest*
10574                                                                 LIBS="$save_LIBS"
10575                         
10576 fi
10577
10578 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10579
10580                         if test $ol_cv_var_des_debug = yes ; then
10581                                 cat >> confdefs.h <<\EOF
10582 #define HAVE_DES_DEBUG 1
10583 EOF
10584
10585                         fi
10586
10587                         LIBS="$save_LIBS"
10588                 fi
10589         fi
10590 fi
10591
10592 if test $ol_link_krb5 = yes ; then
10593         ol_with_kerberos=found
10594 fi
10595
10596 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10597         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10598
10599         for ac_hdr in krb.h des.h krb-archaeology.h 
10600 do
10601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10603 echo "configure:10604: checking for $ac_hdr" >&5
10604 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10605   echo $ac_n "(cached) $ac_c" 1>&6
10606 else
10607   cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610 #include <$ac_hdr>
10611 EOF
10612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10613 { (eval echo configure:10614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10615 if test -z "$ac_err"; then
10616   rm -rf conftest*
10617   eval "ac_cv_header_$ac_safe=yes"
10618 else
10619   echo "$ac_err" >&5
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   eval "ac_cv_header_$ac_safe=no"
10624 fi
10625 rm -f conftest*
10626 fi
10627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10628   echo "$ac_t""yes" 1>&6
10629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10630   cat >> confdefs.h <<EOF
10631 #define $ac_tr_hdr 1
10632 EOF
10633  
10634 else
10635   echo "$ac_t""no" 1>&6
10636 fi
10637 done
10638
10639
10640         if test $ac_cv_header_krb_h = yes ; then
10641                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10642 echo "configure:10643: checking for main in -lkrb" >&5
10643 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10645   echo $ac_n "(cached) $ac_c" 1>&6
10646 else
10647   ac_save_LIBS="$LIBS"
10648 LIBS="-lkrb -ldes $LIBS"
10649 cat > conftest.$ac_ext <<EOF
10650 #line 10651 "configure"
10651 #include "confdefs.h"
10652
10653 int main() {
10654 main()
10655 ; return 0; }
10656 EOF
10657 if { (eval echo configure:10658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10658   rm -rf conftest*
10659   eval "ac_cv_lib_$ac_lib_var=yes"
10660 else
10661   echo "configure: failed program was:" >&5
10662   cat conftest.$ac_ext >&5
10663   rm -rf conftest*
10664   eval "ac_cv_lib_$ac_lib_var=no"
10665 fi
10666 rm -f conftest*
10667 LIBS="$ac_save_LIBS"
10668
10669 fi
10670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10671   echo "$ac_t""yes" 1>&6
10672   have_k4=yes
10673 else
10674   echo "$ac_t""no" 1>&6
10675 have_k4=no
10676 fi
10677
10678
10679                 if test $have_k4 = yes ; then
10680                         ol_with_kerberos=found
10681                         ol_link_krb4=yes
10682
10683                         cat >> confdefs.h <<\EOF
10684 #define HAVE_KRB4 1
10685 EOF
10686
10687
10688                         KRB4_LIBS="-lkrb -ldes"
10689
10690                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10691                                 cat >> confdefs.h <<\EOF
10692 #define HAVE_KTH_KERBEROS 1
10693 EOF
10694
10695                         fi
10696                 fi
10697         fi
10698 fi
10699
10700 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10701         ol_link_kbind=yes
10702
10703 elif test $ol_enable_kbind = yes ; then
10704         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10705 fi
10706
10707 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10708         cat >> confdefs.h <<\EOF
10709 #define HAVE_KERBEROS 1
10710 EOF
10711
10712
10713 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10714         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10715 fi
10716
10717 ol_link_tls=no
10718 if test $ol_with_tls != no ; then
10719         for ac_hdr in openssl/ssl.h ssl.h
10720 do
10721 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10722 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10723 echo "configure:10724: checking for $ac_hdr" >&5
10724 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10725   echo $ac_n "(cached) $ac_c" 1>&6
10726 else
10727   cat > conftest.$ac_ext <<EOF
10728 #line 10729 "configure"
10729 #include "confdefs.h"
10730 #include <$ac_hdr>
10731 EOF
10732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10733 { (eval echo configure:10734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10735 if test -z "$ac_err"; then
10736   rm -rf conftest*
10737   eval "ac_cv_header_$ac_safe=yes"
10738 else
10739   echo "$ac_err" >&5
10740   echo "configure: failed program was:" >&5
10741   cat conftest.$ac_ext >&5
10742   rm -rf conftest*
10743   eval "ac_cv_header_$ac_safe=no"
10744 fi
10745 rm -f conftest*
10746 fi
10747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10748   echo "$ac_t""yes" 1>&6
10749     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10750   cat >> confdefs.h <<EOF
10751 #define $ac_tr_hdr 1
10752 EOF
10753  
10754 else
10755   echo "$ac_t""no" 1>&6
10756 fi
10757 done
10758
10759         
10760         if test $ac_cv_header_openssl_ssl_h = yes \
10761                 -o $ac_cv_header_ssl_h = yes ; then
10762                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10763 echo "configure:10764: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10764 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10766   echo $ac_n "(cached) $ac_c" 1>&6
10767 else
10768   ac_save_LIBS="$LIBS"
10769 LIBS="-lssl -lcrypto $LIBS"
10770 cat > conftest.$ac_ext <<EOF
10771 #line 10772 "configure"
10772 #include "confdefs.h"
10773 /* Override any gcc2 internal prototype to avoid an error.  */
10774 /* We use char because int might match the return type of a gcc2
10775     builtin and then its argument prototype would still apply.  */
10776 char SSLeay_add_ssl_algorithms();
10777
10778 int main() {
10779 SSLeay_add_ssl_algorithms()
10780 ; return 0; }
10781 EOF
10782 if { (eval echo configure:10783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10783   rm -rf conftest*
10784   eval "ac_cv_lib_$ac_lib_var=yes"
10785 else
10786   echo "configure: failed program was:" >&5
10787   cat conftest.$ac_ext >&5
10788   rm -rf conftest*
10789   eval "ac_cv_lib_$ac_lib_var=no"
10790 fi
10791 rm -f conftest*
10792 LIBS="$ac_save_LIBS"
10793
10794 fi
10795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10796   echo "$ac_t""yes" 1>&6
10797   have_ssleay=yes
10798                         need_rsaref=no
10799 else
10800   echo "$ac_t""no" 1>&6
10801 have_ssleay=no
10802 fi
10803
10804                         
10805                 if test $have_ssleay = no ; then
10806                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10807 echo "configure:10808: checking for SSL_library_init in -lssl" >&5
10808 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10809 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10810   echo $ac_n "(cached) $ac_c" 1>&6
10811 else
10812   ac_save_LIBS="$LIBS"
10813 LIBS="-lssl -lcrypto $LIBS"
10814 cat > conftest.$ac_ext <<EOF
10815 #line 10816 "configure"
10816 #include "confdefs.h"
10817 /* Override any gcc2 internal prototype to avoid an error.  */
10818 /* We use char because int might match the return type of a gcc2
10819     builtin and then its argument prototype would still apply.  */
10820 char SSL_library_init();
10821
10822 int main() {
10823 SSL_library_init()
10824 ; return 0; }
10825 EOF
10826 if { (eval echo configure:10827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10827   rm -rf conftest*
10828   eval "ac_cv_lib_$ac_lib_var=yes"
10829 else
10830   echo "configure: failed program was:" >&5
10831   cat conftest.$ac_ext >&5
10832   rm -rf conftest*
10833   eval "ac_cv_lib_$ac_lib_var=no"
10834 fi
10835 rm -f conftest*
10836 LIBS="$ac_save_LIBS"
10837
10838 fi
10839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10840   echo "$ac_t""yes" 1>&6
10841   have_ssleay=yes
10842                                 need_rsaref=no
10843 else
10844   echo "$ac_t""no" 1>&6
10845 have_ssleay=no
10846 fi
10847
10848                 fi
10849
10850                 if test $have_ssleay = no ; then
10851                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10852 echo "configure:10853: checking for ssl3_accept in -lssl" >&5
10853 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10854 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10855   echo $ac_n "(cached) $ac_c" 1>&6
10856 else
10857   ac_save_LIBS="$LIBS"
10858 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10859 cat > conftest.$ac_ext <<EOF
10860 #line 10861 "configure"
10861 #include "confdefs.h"
10862 /* Override any gcc2 internal prototype to avoid an error.  */
10863 /* We use char because int might match the return type of a gcc2
10864     builtin and then its argument prototype would still apply.  */
10865 char ssl3_accept();
10866
10867 int main() {
10868 ssl3_accept()
10869 ; return 0; }
10870 EOF
10871 if { (eval echo configure:10872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10872   rm -rf conftest*
10873   eval "ac_cv_lib_$ac_lib_var=yes"
10874 else
10875   echo "configure: failed program was:" >&5
10876   cat conftest.$ac_ext >&5
10877   rm -rf conftest*
10878   eval "ac_cv_lib_$ac_lib_var=no"
10879 fi
10880 rm -f conftest*
10881 LIBS="$ac_save_LIBS"
10882
10883 fi
10884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10885   echo "$ac_t""yes" 1>&6
10886   have_ssleay=yes
10887                                 need_rsaref=yes
10888 else
10889   echo "$ac_t""no" 1>&6
10890 have_ssleay=no
10891 fi
10892
10893                 fi
10894
10895                 if test $have_ssleay = yes ; then
10896                         ol_with_tls=found
10897                         ol_link_tls=yes
10898
10899                         cat >> confdefs.h <<\EOF
10900 #define HAVE_SSLEAY 1
10901 EOF
10902
10903
10904                         if test $need_rsaref = yes; then
10905                                 cat >> confdefs.h <<\EOF
10906 #define HAVE_RSAREF 1
10907 EOF
10908
10909
10910                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10911                         else
10912                                 TLS_LIBS="-lssl -lcrypto"
10913                         fi
10914                 fi
10915         fi
10916
10917 else
10918         echo "configure: warning: TLS data protection not supported!" 1>&2
10919 fi
10920
10921 WITH_TLS=no
10922 if test $ol_link_tls = yes ; then
10923         cat >> confdefs.h <<\EOF
10924 #define HAVE_TLS 1
10925 EOF
10926
10927         WITH_TLS=yes
10928
10929 elif test $ol_with_tls = auto ; then
10930         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10931         echo "configure: warning: TLS data protection not supported!" 1>&2
10932
10933 elif test $ol_with_tls != no ; then
10934         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10935 fi
10936
10937 if test $ol_enable_lmpasswd != no; then
10938         if test $ol_link_tls != yes ; then
10939                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10940         fi
10941
10942         cat >> confdefs.h <<\EOF
10943 #define SLAPD_LMHASH 1
10944 EOF
10945
10946 fi
10947
10948 ol_link_threads=no
10949
10950 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10951         -o $ol_with_threads = nt ; then
10952
10953         
10954         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
10955 echo "configure:10956: checking for _beginthread" >&5
10956 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
10957   echo $ac_n "(cached) $ac_c" 1>&6
10958 else
10959   cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962 /* System header to define __stub macros and hopefully few prototypes,
10963     which can conflict with char _beginthread(); below.  */
10964 #include <assert.h>
10965 /* Override any gcc2 internal prototype to avoid an error.  */
10966 /* We use char because int might match the return type of a gcc2
10967     builtin and then its argument prototype would still apply.  */
10968 char _beginthread();
10969 char (*f)();
10970
10971 int main() {
10972
10973 /* The GNU C library defines this for functions which it implements
10974     to always fail with ENOSYS.  Some functions are actually named
10975     something starting with __ and the normal name is an alias.  */
10976 #if defined (__stub__beginthread) || defined (__stub____beginthread)
10977 choke me
10978 #else
10979 f = _beginthread;
10980 #endif
10981
10982 ; return 0; }
10983 EOF
10984 if { (eval echo configure:10985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10985   rm -rf conftest*
10986   eval "ac_cv_func__beginthread=yes"
10987 else
10988   echo "configure: failed program was:" >&5
10989   cat conftest.$ac_ext >&5
10990   rm -rf conftest*
10991   eval "ac_cv_func__beginthread=no"
10992 fi
10993 rm -f conftest*
10994 fi
10995
10996 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
10997   echo "$ac_t""yes" 1>&6
10998   :
10999 else
11000   echo "$ac_t""no" 1>&6
11001 fi
11002
11003
11004         if test $ac_cv_func__beginthread = yes ; then
11005                 cat >> confdefs.h <<\EOF
11006 #define HAVE_NT_THREADS 1
11007 EOF
11008
11009                 ol_cv_nt_threads=yes
11010         fi
11011
11012
11013         if test "$ol_cv_nt_threads" = yes ; then
11014                 ol_link_threads=nt
11015                 ol_with_threads=found
11016                 ol_with_yielding_select=yes
11017
11018                 cat >> confdefs.h <<\EOF
11019 #define HAVE_NT_SERVICE_MANAGER 1
11020 EOF
11021
11022                 cat >> confdefs.h <<\EOF
11023 #define HAVE_NT_EVENT_LOG 1
11024 EOF
11025
11026         fi
11027
11028         if test $ol_with_threads = nt ; then
11029                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11030         fi
11031 fi
11032
11033 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11034         -o $ol_with_threads = posix ; then
11035
11036         for ac_hdr in pthread.h
11037 do
11038 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11039 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11040 echo "configure:11041: checking for $ac_hdr" >&5
11041 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11042   echo $ac_n "(cached) $ac_c" 1>&6
11043 else
11044   cat > conftest.$ac_ext <<EOF
11045 #line 11046 "configure"
11046 #include "confdefs.h"
11047 #include <$ac_hdr>
11048 EOF
11049 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11050 { (eval echo configure:11051: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11051 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11052 if test -z "$ac_err"; then
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=yes"
11055 else
11056   echo "$ac_err" >&5
11057   echo "configure: failed program was:" >&5
11058   cat conftest.$ac_ext >&5
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=no"
11061 fi
11062 rm -f conftest*
11063 fi
11064 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11065   echo "$ac_t""yes" 1>&6
11066     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11067   cat >> confdefs.h <<EOF
11068 #define $ac_tr_hdr 1
11069 EOF
11070  
11071 else
11072   echo "$ac_t""no" 1>&6
11073 fi
11074 done
11075
11076
11077         if test $ac_cv_header_pthread_h = yes ; then
11078                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11079 echo "configure:11080: checking POSIX thread version" >&5
11080 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11081   echo $ac_n "(cached) $ac_c" 1>&6
11082 else
11083   
11084         cat > conftest.$ac_ext <<EOF
11085 #line 11086 "configure"
11086 #include "confdefs.h"
11087
11088 #               include <pthread.h>
11089         
11090 int main() {
11091
11092                 int i = PTHREAD_CREATE_JOINABLE;
11093         
11094 ; return 0; }
11095 EOF
11096 if { (eval echo configure:11097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11097   rm -rf conftest*
11098   
11099         cat > conftest.$ac_ext <<EOF
11100 #line 11101 "configure"
11101 #include "confdefs.h"
11102 #include <pthread.h>
11103 EOF
11104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11105   egrep "pthread_detach" >/dev/null 2>&1; then
11106   rm -rf conftest*
11107   ol_cv_pthread_version=10
11108 else
11109   rm -rf conftest*
11110   ol_cv_pthread_version=8
11111 fi
11112 rm -f conftest*
11113
11114 else
11115   echo "configure: failed program was:" >&5
11116   cat conftest.$ac_ext >&5
11117   rm -rf conftest*
11118   
11119         cat > conftest.$ac_ext <<EOF
11120 #line 11121 "configure"
11121 #include "confdefs.h"
11122
11123 #               include <pthread.h>
11124 #               ifdef PTHREAD_CREATE_UNDETACHED
11125                 draft7
11126 #               endif
11127         
11128 EOF
11129 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11130   egrep "draft7" >/dev/null 2>&1; then
11131   rm -rf conftest*
11132   ol_cv_pthread_version=7
11133 else
11134   rm -rf conftest*
11135   
11136         cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139 #include <pthread.h>
11140 EOF
11141 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11142   egrep "pthread_attr_init" >/dev/null 2>&1; then
11143   rm -rf conftest*
11144   ol_cv_pthread_version=6
11145 else
11146   rm -rf conftest*
11147   
11148         cat > conftest.$ac_ext <<EOF
11149 #line 11150 "configure"
11150 #include "confdefs.h"
11151
11152 #               include <pthread.h>
11153 #ifdef          PTHREAD_MUTEX_INITIALIZER
11154                 draft5
11155 #endif
11156         
11157 EOF
11158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11159   egrep "draft5" >/dev/null 2>&1; then
11160   rm -rf conftest*
11161   ol_cv_pthread_version=5
11162 else
11163   rm -rf conftest*
11164   ol_cv_pthread_version=4
11165 fi
11166 rm -f conftest*
11167  
11168 fi
11169 rm -f conftest*
11170  
11171 fi
11172 rm -f conftest*
11173  
11174 fi
11175 rm -f conftest*
11176
11177 fi
11178
11179 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11180
11181
11182                 if test $ol_cv_pthread_version != 0 ; then
11183                         cat >> confdefs.h <<EOF
11184 #define HAVE_PTHREADS $ol_cv_pthread_version
11185 EOF
11186
11187                 else
11188                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11189                 fi
11190
11191                 # consider threads found
11192                 ol_with_threads=found
11193
11194                 
11195         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11196 echo "configure:11197: checking for LinuxThreads pthread.h" >&5
11197 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11198   echo $ac_n "(cached) $ac_c" 1>&6
11199 else
11200   cat > conftest.$ac_ext <<EOF
11201 #line 11202 "configure"
11202 #include "confdefs.h"
11203 #include <pthread.h>
11204 EOF
11205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11206   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11207   rm -rf conftest*
11208   ol_cv_header_linux_threads=yes
11209 else
11210   rm -rf conftest*
11211   ol_cv_header_linux_threads=no
11212 fi
11213 rm -f conftest*
11214
11215                 
11216 fi
11217
11218 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11219         if test $ol_cv_header_linux_threads = yes; then
11220                 cat >> confdefs.h <<\EOF
11221 #define HAVE_LINUX_THREADS 1
11222 EOF
11223
11224         fi
11225
11226                 
11227         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11228 echo "configure:11229: checking for GNU Pth pthread.h" >&5
11229 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11230   echo $ac_n "(cached) $ac_c" 1>&6
11231 else
11232   cat > conftest.$ac_ext <<EOF
11233 #line 11234 "configure"
11234 #include "confdefs.h"
11235 #include <pthread.h>
11236 #ifdef _POSIX_THREAD_IS_GNU_PTH
11237         __gnu_pth__;
11238 #endif
11239
11240 EOF
11241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11242   egrep "__gnu_pth__" >/dev/null 2>&1; then
11243   rm -rf conftest*
11244   ol_cv_header_gnu_pth_pthread_h=yes
11245 else
11246   rm -rf conftest*
11247   ol_cv_header_gnu_pth_pthread_h=no
11248 fi
11249 rm -f conftest*
11250
11251                 
11252 fi
11253
11254 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11255
11256
11257                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11258                         for ac_hdr in sched.h
11259 do
11260 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11261 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11262 echo "configure:11263: checking for $ac_hdr" >&5
11263 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11264   echo $ac_n "(cached) $ac_c" 1>&6
11265 else
11266   cat > conftest.$ac_ext <<EOF
11267 #line 11268 "configure"
11268 #include "confdefs.h"
11269 #include <$ac_hdr>
11270 EOF
11271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11272 { (eval echo configure:11273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11274 if test -z "$ac_err"; then
11275   rm -rf conftest*
11276   eval "ac_cv_header_$ac_safe=yes"
11277 else
11278   echo "$ac_err" >&5
11279   echo "configure: failed program was:" >&5
11280   cat conftest.$ac_ext >&5
11281   rm -rf conftest*
11282   eval "ac_cv_header_$ac_safe=no"
11283 fi
11284 rm -f conftest*
11285 fi
11286 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11287   echo "$ac_t""yes" 1>&6
11288     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11289   cat >> confdefs.h <<EOF
11290 #define $ac_tr_hdr 1
11291 EOF
11292  
11293 else
11294   echo "$ac_t""no" 1>&6
11295 fi
11296 done
11297
11298                 fi
11299
11300                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11301                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11302 echo "configure:11303: checking for pthread_create in default libraries" >&5
11303 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11304   echo $ac_n "(cached) $ac_c" 1>&6
11305 else
11306   
11307                 if test "$cross_compiling" = yes; then
11308   cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 /* pthread test headers */
11312 #include <pthread.h>
11313 #if HAVE_PTHREADS < 7
11314 #include <errno.h>
11315 #endif
11316 #ifndef NULL
11317 #define NULL (void*)0
11318 #endif
11319
11320 static void *task(p)
11321         void *p;
11322 {
11323         return (void *) (p == NULL);
11324 }
11325
11326 int main() {
11327
11328         /* pthread test function */
11329 #ifndef PTHREAD_CREATE_DETACHED
11330 #define PTHREAD_CREATE_DETACHED 1
11331 #endif
11332         pthread_t t;
11333         int status;
11334         int detach = PTHREAD_CREATE_DETACHED;
11335
11336 #if HAVE_PTHREADS > 4
11337         /* Final pthreads */
11338         pthread_attr_t attr;
11339
11340         status = pthread_attr_init(&attr);
11341         if( status ) return status;
11342
11343 #if HAVE_PTHREADS < 7
11344         status = pthread_attr_setdetachstate(&attr, &detach);
11345         if( status < 0 ) status = errno;
11346 #else
11347         status = pthread_attr_setdetachstate(&attr, detach);
11348 #endif
11349         if( status ) return status;
11350         status = pthread_create( &t, &attr, task, NULL );
11351 #if HAVE_PTHREADS < 7
11352         if( status < 0 ) status = errno;
11353 #endif
11354         if( status ) return status;
11355 #else
11356         /* Draft 4 pthreads */
11357         status = pthread_create( &t, pthread_attr_default, task, NULL );
11358         if( status ) return errno;
11359
11360         /* give thread a chance to complete */
11361         /* it should remain joinable and hence detachable */
11362         sleep( 1 );
11363
11364         status = pthread_detach( &t );
11365         if( status ) return errno;
11366 #endif
11367
11368 #ifdef HAVE_LINUX_THREADS
11369         pthread_kill_other_threads_np();
11370 #endif
11371
11372         return 0;
11373
11374 ; return 0; }
11375 EOF
11376 if { (eval echo configure:11377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11377   rm -rf conftest*
11378   ol_cv_pthread_create=yes
11379 else
11380   echo "configure: failed program was:" >&5
11381   cat conftest.$ac_ext >&5
11382   rm -rf conftest*
11383   ol_cv_pthread_create=no
11384 fi
11385 rm -f conftest*
11386 else
11387   cat > conftest.$ac_ext <<EOF
11388 #line 11389 "configure"
11389 #include "confdefs.h"
11390 /* pthread test headers */
11391 #include <pthread.h>
11392 #if HAVE_PTHREADS < 7
11393 #include <errno.h>
11394 #endif
11395 #ifndef NULL
11396 #define NULL (void*)0
11397 #endif
11398
11399 static void *task(p)
11400         void *p;
11401 {
11402         return (void *) (p == NULL);
11403 }
11404
11405
11406 int main(argc, argv)
11407         int argc;
11408         char **argv;
11409 {
11410
11411         /* pthread test function */
11412 #ifndef PTHREAD_CREATE_DETACHED
11413 #define PTHREAD_CREATE_DETACHED 1
11414 #endif
11415         pthread_t t;
11416         int status;
11417         int detach = PTHREAD_CREATE_DETACHED;
11418
11419 #if HAVE_PTHREADS > 4
11420         /* Final pthreads */
11421         pthread_attr_t attr;
11422
11423         status = pthread_attr_init(&attr);
11424         if( status ) return status;
11425
11426 #if HAVE_PTHREADS < 7
11427         status = pthread_attr_setdetachstate(&attr, &detach);
11428         if( status < 0 ) status = errno;
11429 #else
11430         status = pthread_attr_setdetachstate(&attr, detach);
11431 #endif
11432         if( status ) return status;
11433         status = pthread_create( &t, &attr, task, NULL );
11434 #if HAVE_PTHREADS < 7
11435         if( status < 0 ) status = errno;
11436 #endif
11437         if( status ) return status;
11438 #else
11439         /* Draft 4 pthreads */
11440         status = pthread_create( &t, pthread_attr_default, task, NULL );
11441         if( status ) return errno;
11442
11443         /* give thread a chance to complete */
11444         /* it should remain joinable and hence detachable */
11445         sleep( 1 );
11446
11447         status = pthread_detach( &t );
11448         if( status ) return errno;
11449 #endif
11450
11451 #ifdef HAVE_LINUX_THREADS
11452         pthread_kill_other_threads_np();
11453 #endif
11454
11455         return 0;
11456
11457 }
11458
11459 EOF
11460 if { (eval echo configure:11461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11461 then
11462   ol_cv_pthread_create=yes
11463 else
11464   echo "configure: failed program was:" >&5
11465   cat conftest.$ac_ext >&5
11466   rm -fr conftest*
11467   ol_cv_pthread_create=no
11468 fi
11469 rm -fr conftest*
11470 fi
11471
11472 fi
11473
11474 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11475
11476                 if test $ol_cv_pthread_create != no ; then
11477                         ol_link_threads=posix
11478                         ol_link_pthreads=""
11479                 fi
11480                 
11481                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11482 if test "$ol_link_threads" = no ; then
11483         # try -kthread
11484         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11485 echo "configure:11486: checking for pthread link with -kthread" >&5
11486 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11487   echo $ac_n "(cached) $ac_c" 1>&6
11488 else
11489   
11490                 # save the flags
11491                 ol_LIBS="$LIBS"
11492                 LIBS="-kthread $LIBS"
11493
11494                 if test "$cross_compiling" = yes; then
11495   cat > conftest.$ac_ext <<EOF
11496 #line 11497 "configure"
11497 #include "confdefs.h"
11498 /* pthread test headers */
11499 #include <pthread.h>
11500 #if HAVE_PTHREADS < 7
11501 #include <errno.h>
11502 #endif
11503 #ifndef NULL
11504 #define NULL (void*)0
11505 #endif
11506
11507 static void *task(p)
11508         void *p;
11509 {
11510         return (void *) (p == NULL);
11511 }
11512
11513 int main() {
11514
11515         /* pthread test function */
11516 #ifndef PTHREAD_CREATE_DETACHED
11517 #define PTHREAD_CREATE_DETACHED 1
11518 #endif
11519         pthread_t t;
11520         int status;
11521         int detach = PTHREAD_CREATE_DETACHED;
11522
11523 #if HAVE_PTHREADS > 4
11524         /* Final pthreads */
11525         pthread_attr_t attr;
11526
11527         status = pthread_attr_init(&attr);
11528         if( status ) return status;
11529
11530 #if HAVE_PTHREADS < 7
11531         status = pthread_attr_setdetachstate(&attr, &detach);
11532         if( status < 0 ) status = errno;
11533 #else
11534         status = pthread_attr_setdetachstate(&attr, detach);
11535 #endif
11536         if( status ) return status;
11537         status = pthread_create( &t, &attr, task, NULL );
11538 #if HAVE_PTHREADS < 7
11539         if( status < 0 ) status = errno;
11540 #endif
11541         if( status ) return status;
11542 #else
11543         /* Draft 4 pthreads */
11544         status = pthread_create( &t, pthread_attr_default, task, NULL );
11545         if( status ) return errno;
11546
11547         /* give thread a chance to complete */
11548         /* it should remain joinable and hence detachable */
11549         sleep( 1 );
11550
11551         status = pthread_detach( &t );
11552         if( status ) return errno;
11553 #endif
11554
11555 #ifdef HAVE_LINUX_THREADS
11556         pthread_kill_other_threads_np();
11557 #endif
11558
11559         return 0;
11560
11561 ; return 0; }
11562 EOF
11563 if { (eval echo configure:11564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11564   rm -rf conftest*
11565   ol_cv_pthread_kthread=yes
11566 else
11567   echo "configure: failed program was:" >&5
11568   cat conftest.$ac_ext >&5
11569   rm -rf conftest*
11570   ol_cv_pthread_kthread=no
11571 fi
11572 rm -f conftest*
11573 else
11574   cat > conftest.$ac_ext <<EOF
11575 #line 11576 "configure"
11576 #include "confdefs.h"
11577 /* pthread test headers */
11578 #include <pthread.h>
11579 #if HAVE_PTHREADS < 7
11580 #include <errno.h>
11581 #endif
11582 #ifndef NULL
11583 #define NULL (void*)0
11584 #endif
11585
11586 static void *task(p)
11587         void *p;
11588 {
11589         return (void *) (p == NULL);
11590 }
11591
11592
11593 int main(argc, argv)
11594         int argc;
11595         char **argv;
11596 {
11597
11598         /* pthread test function */
11599 #ifndef PTHREAD_CREATE_DETACHED
11600 #define PTHREAD_CREATE_DETACHED 1
11601 #endif
11602         pthread_t t;
11603         int status;
11604         int detach = PTHREAD_CREATE_DETACHED;
11605
11606 #if HAVE_PTHREADS > 4
11607         /* Final pthreads */
11608         pthread_attr_t attr;
11609
11610         status = pthread_attr_init(&attr);
11611         if( status ) return status;
11612
11613 #if HAVE_PTHREADS < 7
11614         status = pthread_attr_setdetachstate(&attr, &detach);
11615         if( status < 0 ) status = errno;
11616 #else
11617         status = pthread_attr_setdetachstate(&attr, detach);
11618 #endif
11619         if( status ) return status;
11620         status = pthread_create( &t, &attr, task, NULL );
11621 #if HAVE_PTHREADS < 7
11622         if( status < 0 ) status = errno;
11623 #endif
11624         if( status ) return status;
11625 #else
11626         /* Draft 4 pthreads */
11627         status = pthread_create( &t, pthread_attr_default, task, NULL );
11628         if( status ) return errno;
11629
11630         /* give thread a chance to complete */
11631         /* it should remain joinable and hence detachable */
11632         sleep( 1 );
11633
11634         status = pthread_detach( &t );
11635         if( status ) return errno;
11636 #endif
11637
11638 #ifdef HAVE_LINUX_THREADS
11639         pthread_kill_other_threads_np();
11640 #endif
11641
11642         return 0;
11643
11644 }
11645
11646 EOF
11647 if { (eval echo configure:11648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11648 then
11649   ol_cv_pthread_kthread=yes
11650 else
11651   echo "configure: failed program was:" >&5
11652   cat conftest.$ac_ext >&5
11653   rm -fr conftest*
11654   ol_cv_pthread_kthread=no
11655 fi
11656 rm -fr conftest*
11657 fi
11658
11659
11660                 # restore the LIBS
11661                 LIBS="$ol_LIBS"
11662         
11663 fi
11664
11665 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11666
11667         if test $ol_cv_pthread_kthread = yes ; then
11668                 ol_link_pthreads="-kthread"
11669                 ol_link_threads=posix
11670         fi
11671 fi
11672
11673                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11674 if test "$ol_link_threads" = no ; then
11675         # try -pthread
11676         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11677 echo "configure:11678: checking for pthread link with -pthread" >&5
11678 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11679   echo $ac_n "(cached) $ac_c" 1>&6
11680 else
11681   
11682                 # save the flags
11683                 ol_LIBS="$LIBS"
11684                 LIBS="-pthread $LIBS"
11685
11686                 if test "$cross_compiling" = yes; then
11687   cat > conftest.$ac_ext <<EOF
11688 #line 11689 "configure"
11689 #include "confdefs.h"
11690 /* pthread test headers */
11691 #include <pthread.h>
11692 #if HAVE_PTHREADS < 7
11693 #include <errno.h>
11694 #endif
11695 #ifndef NULL
11696 #define NULL (void*)0
11697 #endif
11698
11699 static void *task(p)
11700         void *p;
11701 {
11702         return (void *) (p == NULL);
11703 }
11704
11705 int main() {
11706
11707         /* pthread test function */
11708 #ifndef PTHREAD_CREATE_DETACHED
11709 #define PTHREAD_CREATE_DETACHED 1
11710 #endif
11711         pthread_t t;
11712         int status;
11713         int detach = PTHREAD_CREATE_DETACHED;
11714
11715 #if HAVE_PTHREADS > 4
11716         /* Final pthreads */
11717         pthread_attr_t attr;
11718
11719         status = pthread_attr_init(&attr);
11720         if( status ) return status;
11721
11722 #if HAVE_PTHREADS < 7
11723         status = pthread_attr_setdetachstate(&attr, &detach);
11724         if( status < 0 ) status = errno;
11725 #else
11726         status = pthread_attr_setdetachstate(&attr, detach);
11727 #endif
11728         if( status ) return status;
11729         status = pthread_create( &t, &attr, task, NULL );
11730 #if HAVE_PTHREADS < 7
11731         if( status < 0 ) status = errno;
11732 #endif
11733         if( status ) return status;
11734 #else
11735         /* Draft 4 pthreads */
11736         status = pthread_create( &t, pthread_attr_default, task, NULL );
11737         if( status ) return errno;
11738
11739         /* give thread a chance to complete */
11740         /* it should remain joinable and hence detachable */
11741         sleep( 1 );
11742
11743         status = pthread_detach( &t );
11744         if( status ) return errno;
11745 #endif
11746
11747 #ifdef HAVE_LINUX_THREADS
11748         pthread_kill_other_threads_np();
11749 #endif
11750
11751         return 0;
11752
11753 ; return 0; }
11754 EOF
11755 if { (eval echo configure:11756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11756   rm -rf conftest*
11757   ol_cv_pthread_pthread=yes
11758 else
11759   echo "configure: failed program was:" >&5
11760   cat conftest.$ac_ext >&5
11761   rm -rf conftest*
11762   ol_cv_pthread_pthread=no
11763 fi
11764 rm -f conftest*
11765 else
11766   cat > conftest.$ac_ext <<EOF
11767 #line 11768 "configure"
11768 #include "confdefs.h"
11769 /* pthread test headers */
11770 #include <pthread.h>
11771 #if HAVE_PTHREADS < 7
11772 #include <errno.h>
11773 #endif
11774 #ifndef NULL
11775 #define NULL (void*)0
11776 #endif
11777
11778 static void *task(p)
11779         void *p;
11780 {
11781         return (void *) (p == NULL);
11782 }
11783
11784
11785 int main(argc, argv)
11786         int argc;
11787         char **argv;
11788 {
11789
11790         /* pthread test function */
11791 #ifndef PTHREAD_CREATE_DETACHED
11792 #define PTHREAD_CREATE_DETACHED 1
11793 #endif
11794         pthread_t t;
11795         int status;
11796         int detach = PTHREAD_CREATE_DETACHED;
11797
11798 #if HAVE_PTHREADS > 4
11799         /* Final pthreads */
11800         pthread_attr_t attr;
11801
11802         status = pthread_attr_init(&attr);
11803         if( status ) return status;
11804
11805 #if HAVE_PTHREADS < 7
11806         status = pthread_attr_setdetachstate(&attr, &detach);
11807         if( status < 0 ) status = errno;
11808 #else
11809         status = pthread_attr_setdetachstate(&attr, detach);
11810 #endif
11811         if( status ) return status;
11812         status = pthread_create( &t, &attr, task, NULL );
11813 #if HAVE_PTHREADS < 7
11814         if( status < 0 ) status = errno;
11815 #endif
11816         if( status ) return status;
11817 #else
11818         /* Draft 4 pthreads */
11819         status = pthread_create( &t, pthread_attr_default, task, NULL );
11820         if( status ) return errno;
11821
11822         /* give thread a chance to complete */
11823         /* it should remain joinable and hence detachable */
11824         sleep( 1 );
11825
11826         status = pthread_detach( &t );
11827         if( status ) return errno;
11828 #endif
11829
11830 #ifdef HAVE_LINUX_THREADS
11831         pthread_kill_other_threads_np();
11832 #endif
11833
11834         return 0;
11835
11836 }
11837
11838 EOF
11839 if { (eval echo configure:11840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11840 then
11841   ol_cv_pthread_pthread=yes
11842 else
11843   echo "configure: failed program was:" >&5
11844   cat conftest.$ac_ext >&5
11845   rm -fr conftest*
11846   ol_cv_pthread_pthread=no
11847 fi
11848 rm -fr conftest*
11849 fi
11850
11851
11852                 # restore the LIBS
11853                 LIBS="$ol_LIBS"
11854         
11855 fi
11856
11857 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11858
11859         if test $ol_cv_pthread_pthread = yes ; then
11860                 ol_link_pthreads="-pthread"
11861                 ol_link_threads=posix
11862         fi
11863 fi
11864
11865                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11866 if test "$ol_link_threads" = no ; then
11867         # try -pthreads
11868         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11869 echo "configure:11870: checking for pthread link with -pthreads" >&5
11870 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11871   echo $ac_n "(cached) $ac_c" 1>&6
11872 else
11873   
11874                 # save the flags
11875                 ol_LIBS="$LIBS"
11876                 LIBS="-pthreads $LIBS"
11877
11878                 if test "$cross_compiling" = yes; then
11879   cat > conftest.$ac_ext <<EOF
11880 #line 11881 "configure"
11881 #include "confdefs.h"
11882 /* pthread test headers */
11883 #include <pthread.h>
11884 #if HAVE_PTHREADS < 7
11885 #include <errno.h>
11886 #endif
11887 #ifndef NULL
11888 #define NULL (void*)0
11889 #endif
11890
11891 static void *task(p)
11892         void *p;
11893 {
11894         return (void *) (p == NULL);
11895 }
11896
11897 int main() {
11898
11899         /* pthread test function */
11900 #ifndef PTHREAD_CREATE_DETACHED
11901 #define PTHREAD_CREATE_DETACHED 1
11902 #endif
11903         pthread_t t;
11904         int status;
11905         int detach = PTHREAD_CREATE_DETACHED;
11906
11907 #if HAVE_PTHREADS > 4
11908         /* Final pthreads */
11909         pthread_attr_t attr;
11910
11911         status = pthread_attr_init(&attr);
11912         if( status ) return status;
11913
11914 #if HAVE_PTHREADS < 7
11915         status = pthread_attr_setdetachstate(&attr, &detach);
11916         if( status < 0 ) status = errno;
11917 #else
11918         status = pthread_attr_setdetachstate(&attr, detach);
11919 #endif
11920         if( status ) return status;
11921         status = pthread_create( &t, &attr, task, NULL );
11922 #if HAVE_PTHREADS < 7
11923         if( status < 0 ) status = errno;
11924 #endif
11925         if( status ) return status;
11926 #else
11927         /* Draft 4 pthreads */
11928         status = pthread_create( &t, pthread_attr_default, task, NULL );
11929         if( status ) return errno;
11930
11931         /* give thread a chance to complete */
11932         /* it should remain joinable and hence detachable */
11933         sleep( 1 );
11934
11935         status = pthread_detach( &t );
11936         if( status ) return errno;
11937 #endif
11938
11939 #ifdef HAVE_LINUX_THREADS
11940         pthread_kill_other_threads_np();
11941 #endif
11942
11943         return 0;
11944
11945 ; return 0; }
11946 EOF
11947 if { (eval echo configure:11948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11948   rm -rf conftest*
11949   ol_cv_pthread_pthreads=yes
11950 else
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -rf conftest*
11954   ol_cv_pthread_pthreads=no
11955 fi
11956 rm -f conftest*
11957 else
11958   cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961 /* pthread test headers */
11962 #include <pthread.h>
11963 #if HAVE_PTHREADS < 7
11964 #include <errno.h>
11965 #endif
11966 #ifndef NULL
11967 #define NULL (void*)0
11968 #endif
11969
11970 static void *task(p)
11971         void *p;
11972 {
11973         return (void *) (p == NULL);
11974 }
11975
11976
11977 int main(argc, argv)
11978         int argc;
11979         char **argv;
11980 {
11981
11982         /* pthread test function */
11983 #ifndef PTHREAD_CREATE_DETACHED
11984 #define PTHREAD_CREATE_DETACHED 1
11985 #endif
11986         pthread_t t;
11987         int status;
11988         int detach = PTHREAD_CREATE_DETACHED;
11989
11990 #if HAVE_PTHREADS > 4
11991         /* Final pthreads */
11992         pthread_attr_t attr;
11993
11994         status = pthread_attr_init(&attr);
11995         if( status ) return status;
11996
11997 #if HAVE_PTHREADS < 7
11998         status = pthread_attr_setdetachstate(&attr, &detach);
11999         if( status < 0 ) status = errno;
12000 #else
12001         status = pthread_attr_setdetachstate(&attr, detach);
12002 #endif
12003         if( status ) return status;
12004         status = pthread_create( &t, &attr, task, NULL );
12005 #if HAVE_PTHREADS < 7
12006         if( status < 0 ) status = errno;
12007 #endif
12008         if( status ) return status;
12009 #else
12010         /* Draft 4 pthreads */
12011         status = pthread_create( &t, pthread_attr_default, task, NULL );
12012         if( status ) return errno;
12013
12014         /* give thread a chance to complete */
12015         /* it should remain joinable and hence detachable */
12016         sleep( 1 );
12017
12018         status = pthread_detach( &t );
12019         if( status ) return errno;
12020 #endif
12021
12022 #ifdef HAVE_LINUX_THREADS
12023         pthread_kill_other_threads_np();
12024 #endif
12025
12026         return 0;
12027
12028 }
12029
12030 EOF
12031 if { (eval echo configure:12032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12032 then
12033   ol_cv_pthread_pthreads=yes
12034 else
12035   echo "configure: failed program was:" >&5
12036   cat conftest.$ac_ext >&5
12037   rm -fr conftest*
12038   ol_cv_pthread_pthreads=no
12039 fi
12040 rm -fr conftest*
12041 fi
12042
12043
12044                 # restore the LIBS
12045                 LIBS="$ol_LIBS"
12046         
12047 fi
12048
12049 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12050
12051         if test $ol_cv_pthread_pthreads = yes ; then
12052                 ol_link_pthreads="-pthreads"
12053                 ol_link_threads=posix
12054         fi
12055 fi
12056
12057                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12058 if test "$ol_link_threads" = no ; then
12059         # try -mthreads
12060         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12061 echo "configure:12062: checking for pthread link with -mthreads" >&5
12062 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12063   echo $ac_n "(cached) $ac_c" 1>&6
12064 else
12065   
12066                 # save the flags
12067                 ol_LIBS="$LIBS"
12068                 LIBS="-mthreads $LIBS"
12069
12070                 if test "$cross_compiling" = yes; then
12071   cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 /* pthread test headers */
12075 #include <pthread.h>
12076 #if HAVE_PTHREADS < 7
12077 #include <errno.h>
12078 #endif
12079 #ifndef NULL
12080 #define NULL (void*)0
12081 #endif
12082
12083 static void *task(p)
12084         void *p;
12085 {
12086         return (void *) (p == NULL);
12087 }
12088
12089 int main() {
12090
12091         /* pthread test function */
12092 #ifndef PTHREAD_CREATE_DETACHED
12093 #define PTHREAD_CREATE_DETACHED 1
12094 #endif
12095         pthread_t t;
12096         int status;
12097         int detach = PTHREAD_CREATE_DETACHED;
12098
12099 #if HAVE_PTHREADS > 4
12100         /* Final pthreads */
12101         pthread_attr_t attr;
12102
12103         status = pthread_attr_init(&attr);
12104         if( status ) return status;
12105
12106 #if HAVE_PTHREADS < 7
12107         status = pthread_attr_setdetachstate(&attr, &detach);
12108         if( status < 0 ) status = errno;
12109 #else
12110         status = pthread_attr_setdetachstate(&attr, detach);
12111 #endif
12112         if( status ) return status;
12113         status = pthread_create( &t, &attr, task, NULL );
12114 #if HAVE_PTHREADS < 7
12115         if( status < 0 ) status = errno;
12116 #endif
12117         if( status ) return status;
12118 #else
12119         /* Draft 4 pthreads */
12120         status = pthread_create( &t, pthread_attr_default, task, NULL );
12121         if( status ) return errno;
12122
12123         /* give thread a chance to complete */
12124         /* it should remain joinable and hence detachable */
12125         sleep( 1 );
12126
12127         status = pthread_detach( &t );
12128         if( status ) return errno;
12129 #endif
12130
12131 #ifdef HAVE_LINUX_THREADS
12132         pthread_kill_other_threads_np();
12133 #endif
12134
12135         return 0;
12136
12137 ; return 0; }
12138 EOF
12139 if { (eval echo configure:12140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12140   rm -rf conftest*
12141   ol_cv_pthread_mthreads=yes
12142 else
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -rf conftest*
12146   ol_cv_pthread_mthreads=no
12147 fi
12148 rm -f conftest*
12149 else
12150   cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 /* pthread test headers */
12154 #include <pthread.h>
12155 #if HAVE_PTHREADS < 7
12156 #include <errno.h>
12157 #endif
12158 #ifndef NULL
12159 #define NULL (void*)0
12160 #endif
12161
12162 static void *task(p)
12163         void *p;
12164 {
12165         return (void *) (p == NULL);
12166 }
12167
12168
12169 int main(argc, argv)
12170         int argc;
12171         char **argv;
12172 {
12173
12174         /* pthread test function */
12175 #ifndef PTHREAD_CREATE_DETACHED
12176 #define PTHREAD_CREATE_DETACHED 1
12177 #endif
12178         pthread_t t;
12179         int status;
12180         int detach = PTHREAD_CREATE_DETACHED;
12181
12182 #if HAVE_PTHREADS > 4
12183         /* Final pthreads */
12184         pthread_attr_t attr;
12185
12186         status = pthread_attr_init(&attr);
12187         if( status ) return status;
12188
12189 #if HAVE_PTHREADS < 7
12190         status = pthread_attr_setdetachstate(&attr, &detach);
12191         if( status < 0 ) status = errno;
12192 #else
12193         status = pthread_attr_setdetachstate(&attr, detach);
12194 #endif
12195         if( status ) return status;
12196         status = pthread_create( &t, &attr, task, NULL );
12197 #if HAVE_PTHREADS < 7
12198         if( status < 0 ) status = errno;
12199 #endif
12200         if( status ) return status;
12201 #else
12202         /* Draft 4 pthreads */
12203         status = pthread_create( &t, pthread_attr_default, task, NULL );
12204         if( status ) return errno;
12205
12206         /* give thread a chance to complete */
12207         /* it should remain joinable and hence detachable */
12208         sleep( 1 );
12209
12210         status = pthread_detach( &t );
12211         if( status ) return errno;
12212 #endif
12213
12214 #ifdef HAVE_LINUX_THREADS
12215         pthread_kill_other_threads_np();
12216 #endif
12217
12218         return 0;
12219
12220 }
12221
12222 EOF
12223 if { (eval echo configure:12224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12224 then
12225   ol_cv_pthread_mthreads=yes
12226 else
12227   echo "configure: failed program was:" >&5
12228   cat conftest.$ac_ext >&5
12229   rm -fr conftest*
12230   ol_cv_pthread_mthreads=no
12231 fi
12232 rm -fr conftest*
12233 fi
12234
12235
12236                 # restore the LIBS
12237                 LIBS="$ol_LIBS"
12238         
12239 fi
12240
12241 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12242
12243         if test $ol_cv_pthread_mthreads = yes ; then
12244                 ol_link_pthreads="-mthreads"
12245                 ol_link_threads=posix
12246         fi
12247 fi
12248
12249                 # Pthread try link: -thread (ol_cv_pthread_thread)
12250 if test "$ol_link_threads" = no ; then
12251         # try -thread
12252         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12253 echo "configure:12254: checking for pthread link with -thread" >&5
12254 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12255   echo $ac_n "(cached) $ac_c" 1>&6
12256 else
12257   
12258                 # save the flags
12259                 ol_LIBS="$LIBS"
12260                 LIBS="-thread $LIBS"
12261
12262                 if test "$cross_compiling" = yes; then
12263   cat > conftest.$ac_ext <<EOF
12264 #line 12265 "configure"
12265 #include "confdefs.h"
12266 /* pthread test headers */
12267 #include <pthread.h>
12268 #if HAVE_PTHREADS < 7
12269 #include <errno.h>
12270 #endif
12271 #ifndef NULL
12272 #define NULL (void*)0
12273 #endif
12274
12275 static void *task(p)
12276         void *p;
12277 {
12278         return (void *) (p == NULL);
12279 }
12280
12281 int main() {
12282
12283         /* pthread test function */
12284 #ifndef PTHREAD_CREATE_DETACHED
12285 #define PTHREAD_CREATE_DETACHED 1
12286 #endif
12287         pthread_t t;
12288         int status;
12289         int detach = PTHREAD_CREATE_DETACHED;
12290
12291 #if HAVE_PTHREADS > 4
12292         /* Final pthreads */
12293         pthread_attr_t attr;
12294
12295         status = pthread_attr_init(&attr);
12296         if( status ) return status;
12297
12298 #if HAVE_PTHREADS < 7
12299         status = pthread_attr_setdetachstate(&attr, &detach);
12300         if( status < 0 ) status = errno;
12301 #else
12302         status = pthread_attr_setdetachstate(&attr, detach);
12303 #endif
12304         if( status ) return status;
12305         status = pthread_create( &t, &attr, task, NULL );
12306 #if HAVE_PTHREADS < 7
12307         if( status < 0 ) status = errno;
12308 #endif
12309         if( status ) return status;
12310 #else
12311         /* Draft 4 pthreads */
12312         status = pthread_create( &t, pthread_attr_default, task, NULL );
12313         if( status ) return errno;
12314
12315         /* give thread a chance to complete */
12316         /* it should remain joinable and hence detachable */
12317         sleep( 1 );
12318
12319         status = pthread_detach( &t );
12320         if( status ) return errno;
12321 #endif
12322
12323 #ifdef HAVE_LINUX_THREADS
12324         pthread_kill_other_threads_np();
12325 #endif
12326
12327         return 0;
12328
12329 ; return 0; }
12330 EOF
12331 if { (eval echo configure:12332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12332   rm -rf conftest*
12333   ol_cv_pthread_thread=yes
12334 else
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -rf conftest*
12338   ol_cv_pthread_thread=no
12339 fi
12340 rm -f conftest*
12341 else
12342   cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345 /* pthread test headers */
12346 #include <pthread.h>
12347 #if HAVE_PTHREADS < 7
12348 #include <errno.h>
12349 #endif
12350 #ifndef NULL
12351 #define NULL (void*)0
12352 #endif
12353
12354 static void *task(p)
12355         void *p;
12356 {
12357         return (void *) (p == NULL);
12358 }
12359
12360
12361 int main(argc, argv)
12362         int argc;
12363         char **argv;
12364 {
12365
12366         /* pthread test function */
12367 #ifndef PTHREAD_CREATE_DETACHED
12368 #define PTHREAD_CREATE_DETACHED 1
12369 #endif
12370         pthread_t t;
12371         int status;
12372         int detach = PTHREAD_CREATE_DETACHED;
12373
12374 #if HAVE_PTHREADS > 4
12375         /* Final pthreads */
12376         pthread_attr_t attr;
12377
12378         status = pthread_attr_init(&attr);
12379         if( status ) return status;
12380
12381 #if HAVE_PTHREADS < 7
12382         status = pthread_attr_setdetachstate(&attr, &detach);
12383         if( status < 0 ) status = errno;
12384 #else
12385         status = pthread_attr_setdetachstate(&attr, detach);
12386 #endif
12387         if( status ) return status;
12388         status = pthread_create( &t, &attr, task, NULL );
12389 #if HAVE_PTHREADS < 7
12390         if( status < 0 ) status = errno;
12391 #endif
12392         if( status ) return status;
12393 #else
12394         /* Draft 4 pthreads */
12395         status = pthread_create( &t, pthread_attr_default, task, NULL );
12396         if( status ) return errno;
12397
12398         /* give thread a chance to complete */
12399         /* it should remain joinable and hence detachable */
12400         sleep( 1 );
12401
12402         status = pthread_detach( &t );
12403         if( status ) return errno;
12404 #endif
12405
12406 #ifdef HAVE_LINUX_THREADS
12407         pthread_kill_other_threads_np();
12408 #endif
12409
12410         return 0;
12411
12412 }
12413
12414 EOF
12415 if { (eval echo configure:12416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12416 then
12417   ol_cv_pthread_thread=yes
12418 else
12419   echo "configure: failed program was:" >&5
12420   cat conftest.$ac_ext >&5
12421   rm -fr conftest*
12422   ol_cv_pthread_thread=no
12423 fi
12424 rm -fr conftest*
12425 fi
12426
12427
12428                 # restore the LIBS
12429                 LIBS="$ol_LIBS"
12430         
12431 fi
12432
12433 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12434
12435         if test $ol_cv_pthread_thread = yes ; then
12436                 ol_link_pthreads="-thread"
12437                 ol_link_threads=posix
12438         fi
12439 fi
12440
12441
12442                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12443 if test "$ol_link_threads" = no ; then
12444         # try -lpthread -lmach -lexc -lc_r
12445         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12446 echo "configure:12447: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12447 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12448   echo $ac_n "(cached) $ac_c" 1>&6
12449 else
12450   
12451                 # save the flags
12452                 ol_LIBS="$LIBS"
12453                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12454
12455                 if test "$cross_compiling" = yes; then
12456   cat > conftest.$ac_ext <<EOF
12457 #line 12458 "configure"
12458 #include "confdefs.h"
12459 /* pthread test headers */
12460 #include <pthread.h>
12461 #if HAVE_PTHREADS < 7
12462 #include <errno.h>
12463 #endif
12464 #ifndef NULL
12465 #define NULL (void*)0
12466 #endif
12467
12468 static void *task(p)
12469         void *p;
12470 {
12471         return (void *) (p == NULL);
12472 }
12473
12474 int main() {
12475
12476         /* pthread test function */
12477 #ifndef PTHREAD_CREATE_DETACHED
12478 #define PTHREAD_CREATE_DETACHED 1
12479 #endif
12480         pthread_t t;
12481         int status;
12482         int detach = PTHREAD_CREATE_DETACHED;
12483
12484 #if HAVE_PTHREADS > 4
12485         /* Final pthreads */
12486         pthread_attr_t attr;
12487
12488         status = pthread_attr_init(&attr);
12489         if( status ) return status;
12490
12491 #if HAVE_PTHREADS < 7
12492         status = pthread_attr_setdetachstate(&attr, &detach);
12493         if( status < 0 ) status = errno;
12494 #else
12495         status = pthread_attr_setdetachstate(&attr, detach);
12496 #endif
12497         if( status ) return status;
12498         status = pthread_create( &t, &attr, task, NULL );
12499 #if HAVE_PTHREADS < 7
12500         if( status < 0 ) status = errno;
12501 #endif
12502         if( status ) return status;
12503 #else
12504         /* Draft 4 pthreads */
12505         status = pthread_create( &t, pthread_attr_default, task, NULL );
12506         if( status ) return errno;
12507
12508         /* give thread a chance to complete */
12509         /* it should remain joinable and hence detachable */
12510         sleep( 1 );
12511
12512         status = pthread_detach( &t );
12513         if( status ) return errno;
12514 #endif
12515
12516 #ifdef HAVE_LINUX_THREADS
12517         pthread_kill_other_threads_np();
12518 #endif
12519
12520         return 0;
12521
12522 ; return 0; }
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12525   rm -rf conftest*
12526   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -rf conftest*
12531   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12532 fi
12533 rm -f conftest*
12534 else
12535   cat > conftest.$ac_ext <<EOF
12536 #line 12537 "configure"
12537 #include "confdefs.h"
12538 /* pthread test headers */
12539 #include <pthread.h>
12540 #if HAVE_PTHREADS < 7
12541 #include <errno.h>
12542 #endif
12543 #ifndef NULL
12544 #define NULL (void*)0
12545 #endif
12546
12547 static void *task(p)
12548         void *p;
12549 {
12550         return (void *) (p == NULL);
12551 }
12552
12553
12554 int main(argc, argv)
12555         int argc;
12556         char **argv;
12557 {
12558
12559         /* pthread test function */
12560 #ifndef PTHREAD_CREATE_DETACHED
12561 #define PTHREAD_CREATE_DETACHED 1
12562 #endif
12563         pthread_t t;
12564         int status;
12565         int detach = PTHREAD_CREATE_DETACHED;
12566
12567 #if HAVE_PTHREADS > 4
12568         /* Final pthreads */
12569         pthread_attr_t attr;
12570
12571         status = pthread_attr_init(&attr);
12572         if( status ) return status;
12573
12574 #if HAVE_PTHREADS < 7
12575         status = pthread_attr_setdetachstate(&attr, &detach);
12576         if( status < 0 ) status = errno;
12577 #else
12578         status = pthread_attr_setdetachstate(&attr, detach);
12579 #endif
12580         if( status ) return status;
12581         status = pthread_create( &t, &attr, task, NULL );
12582 #if HAVE_PTHREADS < 7
12583         if( status < 0 ) status = errno;
12584 #endif
12585         if( status ) return status;
12586 #else
12587         /* Draft 4 pthreads */
12588         status = pthread_create( &t, pthread_attr_default, task, NULL );
12589         if( status ) return errno;
12590
12591         /* give thread a chance to complete */
12592         /* it should remain joinable and hence detachable */
12593         sleep( 1 );
12594
12595         status = pthread_detach( &t );
12596         if( status ) return errno;
12597 #endif
12598
12599 #ifdef HAVE_LINUX_THREADS
12600         pthread_kill_other_threads_np();
12601 #endif
12602
12603         return 0;
12604
12605 }
12606
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12609 then
12610   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -fr conftest*
12615   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12616 fi
12617 rm -fr conftest*
12618 fi
12619
12620
12621                 # restore the LIBS
12622                 LIBS="$ol_LIBS"
12623         
12624 fi
12625
12626 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12627
12628         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12629                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12630                 ol_link_threads=posix
12631         fi
12632 fi
12633
12634                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12635 if test "$ol_link_threads" = no ; then
12636         # try -lpthread -lmach -lexc
12637         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12638 echo "configure:12639: checking for pthread link with -lpthread -lmach -lexc" >&5
12639 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12640   echo $ac_n "(cached) $ac_c" 1>&6
12641 else
12642   
12643                 # save the flags
12644                 ol_LIBS="$LIBS"
12645                 LIBS="-lpthread -lmach -lexc $LIBS"
12646
12647                 if test "$cross_compiling" = yes; then
12648   cat > conftest.$ac_ext <<EOF
12649 #line 12650 "configure"
12650 #include "confdefs.h"
12651 /* pthread test headers */
12652 #include <pthread.h>
12653 #if HAVE_PTHREADS < 7
12654 #include <errno.h>
12655 #endif
12656 #ifndef NULL
12657 #define NULL (void*)0
12658 #endif
12659
12660 static void *task(p)
12661         void *p;
12662 {
12663         return (void *) (p == NULL);
12664 }
12665
12666 int main() {
12667
12668         /* pthread test function */
12669 #ifndef PTHREAD_CREATE_DETACHED
12670 #define PTHREAD_CREATE_DETACHED 1
12671 #endif
12672         pthread_t t;
12673         int status;
12674         int detach = PTHREAD_CREATE_DETACHED;
12675
12676 #if HAVE_PTHREADS > 4
12677         /* Final pthreads */
12678         pthread_attr_t attr;
12679
12680         status = pthread_attr_init(&attr);
12681         if( status ) return status;
12682
12683 #if HAVE_PTHREADS < 7
12684         status = pthread_attr_setdetachstate(&attr, &detach);
12685         if( status < 0 ) status = errno;
12686 #else
12687         status = pthread_attr_setdetachstate(&attr, detach);
12688 #endif
12689         if( status ) return status;
12690         status = pthread_create( &t, &attr, task, NULL );
12691 #if HAVE_PTHREADS < 7
12692         if( status < 0 ) status = errno;
12693 #endif
12694         if( status ) return status;
12695 #else
12696         /* Draft 4 pthreads */
12697         status = pthread_create( &t, pthread_attr_default, task, NULL );
12698         if( status ) return errno;
12699
12700         /* give thread a chance to complete */
12701         /* it should remain joinable and hence detachable */
12702         sleep( 1 );
12703
12704         status = pthread_detach( &t );
12705         if( status ) return errno;
12706 #endif
12707
12708 #ifdef HAVE_LINUX_THREADS
12709         pthread_kill_other_threads_np();
12710 #endif
12711
12712         return 0;
12713
12714 ; return 0; }
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12717   rm -rf conftest*
12718   ol_cv_pthread_lpthread_lmach_lexc=yes
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   ol_cv_pthread_lpthread_lmach_lexc=no
12724 fi
12725 rm -f conftest*
12726 else
12727   cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 /* pthread test headers */
12731 #include <pthread.h>
12732 #if HAVE_PTHREADS < 7
12733 #include <errno.h>
12734 #endif
12735 #ifndef NULL
12736 #define NULL (void*)0
12737 #endif
12738
12739 static void *task(p)
12740         void *p;
12741 {
12742         return (void *) (p == NULL);
12743 }
12744
12745
12746 int main(argc, argv)
12747         int argc;
12748         char **argv;
12749 {
12750
12751         /* pthread test function */
12752 #ifndef PTHREAD_CREATE_DETACHED
12753 #define PTHREAD_CREATE_DETACHED 1
12754 #endif
12755         pthread_t t;
12756         int status;
12757         int detach = PTHREAD_CREATE_DETACHED;
12758
12759 #if HAVE_PTHREADS > 4
12760         /* Final pthreads */
12761         pthread_attr_t attr;
12762
12763         status = pthread_attr_init(&attr);
12764         if( status ) return status;
12765
12766 #if HAVE_PTHREADS < 7
12767         status = pthread_attr_setdetachstate(&attr, &detach);
12768         if( status < 0 ) status = errno;
12769 #else
12770         status = pthread_attr_setdetachstate(&attr, detach);
12771 #endif
12772         if( status ) return status;
12773         status = pthread_create( &t, &attr, task, NULL );
12774 #if HAVE_PTHREADS < 7
12775         if( status < 0 ) status = errno;
12776 #endif
12777         if( status ) return status;
12778 #else
12779         /* Draft 4 pthreads */
12780         status = pthread_create( &t, pthread_attr_default, task, NULL );
12781         if( status ) return errno;
12782
12783         /* give thread a chance to complete */
12784         /* it should remain joinable and hence detachable */
12785         sleep( 1 );
12786
12787         status = pthread_detach( &t );
12788         if( status ) return errno;
12789 #endif
12790
12791 #ifdef HAVE_LINUX_THREADS
12792         pthread_kill_other_threads_np();
12793 #endif
12794
12795         return 0;
12796
12797 }
12798
12799 EOF
12800 if { (eval echo configure:12801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12801 then
12802   ol_cv_pthread_lpthread_lmach_lexc=yes
12803 else
12804   echo "configure: failed program was:" >&5
12805   cat conftest.$ac_ext >&5
12806   rm -fr conftest*
12807   ol_cv_pthread_lpthread_lmach_lexc=no
12808 fi
12809 rm -fr conftest*
12810 fi
12811
12812
12813                 # restore the LIBS
12814                 LIBS="$ol_LIBS"
12815         
12816 fi
12817
12818 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12819
12820         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12821                 ol_link_pthreads="-lpthread -lmach -lexc"
12822                 ol_link_threads=posix
12823         fi
12824 fi
12825
12826
12827                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12828 if test "$ol_link_threads" = no ; then
12829         # try -lpthread -Wl,-woff,85
12830         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12831 echo "configure:12832: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12832 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12833   echo $ac_n "(cached) $ac_c" 1>&6
12834 else
12835   
12836                 # save the flags
12837                 ol_LIBS="$LIBS"
12838                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12839
12840                 if test "$cross_compiling" = yes; then
12841   cat > conftest.$ac_ext <<EOF
12842 #line 12843 "configure"
12843 #include "confdefs.h"
12844 /* pthread test headers */
12845 #include <pthread.h>
12846 #if HAVE_PTHREADS < 7
12847 #include <errno.h>
12848 #endif
12849 #ifndef NULL
12850 #define NULL (void*)0
12851 #endif
12852
12853 static void *task(p)
12854         void *p;
12855 {
12856         return (void *) (p == NULL);
12857 }
12858
12859 int main() {
12860
12861         /* pthread test function */
12862 #ifndef PTHREAD_CREATE_DETACHED
12863 #define PTHREAD_CREATE_DETACHED 1
12864 #endif
12865         pthread_t t;
12866         int status;
12867         int detach = PTHREAD_CREATE_DETACHED;
12868
12869 #if HAVE_PTHREADS > 4
12870         /* Final pthreads */
12871         pthread_attr_t attr;
12872
12873         status = pthread_attr_init(&attr);
12874         if( status ) return status;
12875
12876 #if HAVE_PTHREADS < 7
12877         status = pthread_attr_setdetachstate(&attr, &detach);
12878         if( status < 0 ) status = errno;
12879 #else
12880         status = pthread_attr_setdetachstate(&attr, detach);
12881 #endif
12882         if( status ) return status;
12883         status = pthread_create( &t, &attr, task, NULL );
12884 #if HAVE_PTHREADS < 7
12885         if( status < 0 ) status = errno;
12886 #endif
12887         if( status ) return status;
12888 #else
12889         /* Draft 4 pthreads */
12890         status = pthread_create( &t, pthread_attr_default, task, NULL );
12891         if( status ) return errno;
12892
12893         /* give thread a chance to complete */
12894         /* it should remain joinable and hence detachable */
12895         sleep( 1 );
12896
12897         status = pthread_detach( &t );
12898         if( status ) return errno;
12899 #endif
12900
12901 #ifdef HAVE_LINUX_THREADS
12902         pthread_kill_other_threads_np();
12903 #endif
12904
12905         return 0;
12906
12907 ; return 0; }
12908 EOF
12909 if { (eval echo configure:12910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12910   rm -rf conftest*
12911   ol_cv_pthread_lib_lpthread_woff=yes
12912 else
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -rf conftest*
12916   ol_cv_pthread_lib_lpthread_woff=no
12917 fi
12918 rm -f conftest*
12919 else
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 /* pthread test headers */
12924 #include <pthread.h>
12925 #if HAVE_PTHREADS < 7
12926 #include <errno.h>
12927 #endif
12928 #ifndef NULL
12929 #define NULL (void*)0
12930 #endif
12931
12932 static void *task(p)
12933         void *p;
12934 {
12935         return (void *) (p == NULL);
12936 }
12937
12938
12939 int main(argc, argv)
12940         int argc;
12941         char **argv;
12942 {
12943
12944         /* pthread test function */
12945 #ifndef PTHREAD_CREATE_DETACHED
12946 #define PTHREAD_CREATE_DETACHED 1
12947 #endif
12948         pthread_t t;
12949         int status;
12950         int detach = PTHREAD_CREATE_DETACHED;
12951
12952 #if HAVE_PTHREADS > 4
12953         /* Final pthreads */
12954         pthread_attr_t attr;
12955
12956         status = pthread_attr_init(&attr);
12957         if( status ) return status;
12958
12959 #if HAVE_PTHREADS < 7
12960         status = pthread_attr_setdetachstate(&attr, &detach);
12961         if( status < 0 ) status = errno;
12962 #else
12963         status = pthread_attr_setdetachstate(&attr, detach);
12964 #endif
12965         if( status ) return status;
12966         status = pthread_create( &t, &attr, task, NULL );
12967 #if HAVE_PTHREADS < 7
12968         if( status < 0 ) status = errno;
12969 #endif
12970         if( status ) return status;
12971 #else
12972         /* Draft 4 pthreads */
12973         status = pthread_create( &t, pthread_attr_default, task, NULL );
12974         if( status ) return errno;
12975
12976         /* give thread a chance to complete */
12977         /* it should remain joinable and hence detachable */
12978         sleep( 1 );
12979
12980         status = pthread_detach( &t );
12981         if( status ) return errno;
12982 #endif
12983
12984 #ifdef HAVE_LINUX_THREADS
12985         pthread_kill_other_threads_np();
12986 #endif
12987
12988         return 0;
12989
12990 }
12991
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12994 then
12995   ol_cv_pthread_lib_lpthread_woff=yes
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -fr conftest*
13000   ol_cv_pthread_lib_lpthread_woff=no
13001 fi
13002 rm -fr conftest*
13003 fi
13004
13005
13006                 # restore the LIBS
13007                 LIBS="$ol_LIBS"
13008         
13009 fi
13010
13011 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13012
13013         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13014                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13015                 ol_link_threads=posix
13016         fi
13017 fi
13018
13019
13020                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13021 if test "$ol_link_threads" = no ; then
13022         # try -lpthread
13023         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13024 echo "configure:13025: checking for pthread link with -lpthread" >&5
13025 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13026   echo $ac_n "(cached) $ac_c" 1>&6
13027 else
13028   
13029                 # save the flags
13030                 ol_LIBS="$LIBS"
13031                 LIBS="-lpthread $LIBS"
13032
13033                 if test "$cross_compiling" = yes; then
13034   cat > conftest.$ac_ext <<EOF
13035 #line 13036 "configure"
13036 #include "confdefs.h"
13037 /* pthread test headers */
13038 #include <pthread.h>
13039 #if HAVE_PTHREADS < 7
13040 #include <errno.h>
13041 #endif
13042 #ifndef NULL
13043 #define NULL (void*)0
13044 #endif
13045
13046 static void *task(p)
13047         void *p;
13048 {
13049         return (void *) (p == NULL);
13050 }
13051
13052 int main() {
13053
13054         /* pthread test function */
13055 #ifndef PTHREAD_CREATE_DETACHED
13056 #define PTHREAD_CREATE_DETACHED 1
13057 #endif
13058         pthread_t t;
13059         int status;
13060         int detach = PTHREAD_CREATE_DETACHED;
13061
13062 #if HAVE_PTHREADS > 4
13063         /* Final pthreads */
13064         pthread_attr_t attr;
13065
13066         status = pthread_attr_init(&attr);
13067         if( status ) return status;
13068
13069 #if HAVE_PTHREADS < 7
13070         status = pthread_attr_setdetachstate(&attr, &detach);
13071         if( status < 0 ) status = errno;
13072 #else
13073         status = pthread_attr_setdetachstate(&attr, detach);
13074 #endif
13075         if( status ) return status;
13076         status = pthread_create( &t, &attr, task, NULL );
13077 #if HAVE_PTHREADS < 7
13078         if( status < 0 ) status = errno;
13079 #endif
13080         if( status ) return status;
13081 #else
13082         /* Draft 4 pthreads */
13083         status = pthread_create( &t, pthread_attr_default, task, NULL );
13084         if( status ) return errno;
13085
13086         /* give thread a chance to complete */
13087         /* it should remain joinable and hence detachable */
13088         sleep( 1 );
13089
13090         status = pthread_detach( &t );
13091         if( status ) return errno;
13092 #endif
13093
13094 #ifdef HAVE_LINUX_THREADS
13095         pthread_kill_other_threads_np();
13096 #endif
13097
13098         return 0;
13099
13100 ; return 0; }
13101 EOF
13102 if { (eval echo configure:13103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13103   rm -rf conftest*
13104   ol_cv_pthread_lpthread=yes
13105 else
13106   echo "configure: failed program was:" >&5
13107   cat conftest.$ac_ext >&5
13108   rm -rf conftest*
13109   ol_cv_pthread_lpthread=no
13110 fi
13111 rm -f conftest*
13112 else
13113   cat > conftest.$ac_ext <<EOF
13114 #line 13115 "configure"
13115 #include "confdefs.h"
13116 /* pthread test headers */
13117 #include <pthread.h>
13118 #if HAVE_PTHREADS < 7
13119 #include <errno.h>
13120 #endif
13121 #ifndef NULL
13122 #define NULL (void*)0
13123 #endif
13124
13125 static void *task(p)
13126         void *p;
13127 {
13128         return (void *) (p == NULL);
13129 }
13130
13131
13132 int main(argc, argv)
13133         int argc;
13134         char **argv;
13135 {
13136
13137         /* pthread test function */
13138 #ifndef PTHREAD_CREATE_DETACHED
13139 #define PTHREAD_CREATE_DETACHED 1
13140 #endif
13141         pthread_t t;
13142         int status;
13143         int detach = PTHREAD_CREATE_DETACHED;
13144
13145 #if HAVE_PTHREADS > 4
13146         /* Final pthreads */
13147         pthread_attr_t attr;
13148
13149         status = pthread_attr_init(&attr);
13150         if( status ) return status;
13151
13152 #if HAVE_PTHREADS < 7
13153         status = pthread_attr_setdetachstate(&attr, &detach);
13154         if( status < 0 ) status = errno;
13155 #else
13156         status = pthread_attr_setdetachstate(&attr, detach);
13157 #endif
13158         if( status ) return status;
13159         status = pthread_create( &t, &attr, task, NULL );
13160 #if HAVE_PTHREADS < 7
13161         if( status < 0 ) status = errno;
13162 #endif
13163         if( status ) return status;
13164 #else
13165         /* Draft 4 pthreads */
13166         status = pthread_create( &t, pthread_attr_default, task, NULL );
13167         if( status ) return errno;
13168
13169         /* give thread a chance to complete */
13170         /* it should remain joinable and hence detachable */
13171         sleep( 1 );
13172
13173         status = pthread_detach( &t );
13174         if( status ) return errno;
13175 #endif
13176
13177 #ifdef HAVE_LINUX_THREADS
13178         pthread_kill_other_threads_np();
13179 #endif
13180
13181         return 0;
13182
13183 }
13184
13185 EOF
13186 if { (eval echo configure:13187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13187 then
13188   ol_cv_pthread_lpthread=yes
13189 else
13190   echo "configure: failed program was:" >&5
13191   cat conftest.$ac_ext >&5
13192   rm -fr conftest*
13193   ol_cv_pthread_lpthread=no
13194 fi
13195 rm -fr conftest*
13196 fi
13197
13198
13199                 # restore the LIBS
13200                 LIBS="$ol_LIBS"
13201         
13202 fi
13203
13204 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13205
13206         if test $ol_cv_pthread_lpthread = yes ; then
13207                 ol_link_pthreads="-lpthread"
13208                 ol_link_threads=posix
13209         fi
13210 fi
13211
13212                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13213 if test "$ol_link_threads" = no ; then
13214         # try -lc_r
13215         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13216 echo "configure:13217: checking for pthread link with -lc_r" >&5
13217 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13218   echo $ac_n "(cached) $ac_c" 1>&6
13219 else
13220   
13221                 # save the flags
13222                 ol_LIBS="$LIBS"
13223                 LIBS="-lc_r $LIBS"
13224
13225                 if test "$cross_compiling" = yes; then
13226   cat > conftest.$ac_ext <<EOF
13227 #line 13228 "configure"
13228 #include "confdefs.h"
13229 /* pthread test headers */
13230 #include <pthread.h>
13231 #if HAVE_PTHREADS < 7
13232 #include <errno.h>
13233 #endif
13234 #ifndef NULL
13235 #define NULL (void*)0
13236 #endif
13237
13238 static void *task(p)
13239         void *p;
13240 {
13241         return (void *) (p == NULL);
13242 }
13243
13244 int main() {
13245
13246         /* pthread test function */
13247 #ifndef PTHREAD_CREATE_DETACHED
13248 #define PTHREAD_CREATE_DETACHED 1
13249 #endif
13250         pthread_t t;
13251         int status;
13252         int detach = PTHREAD_CREATE_DETACHED;
13253
13254 #if HAVE_PTHREADS > 4
13255         /* Final pthreads */
13256         pthread_attr_t attr;
13257
13258         status = pthread_attr_init(&attr);
13259         if( status ) return status;
13260
13261 #if HAVE_PTHREADS < 7
13262         status = pthread_attr_setdetachstate(&attr, &detach);
13263         if( status < 0 ) status = errno;
13264 #else
13265         status = pthread_attr_setdetachstate(&attr, detach);
13266 #endif
13267         if( status ) return status;
13268         status = pthread_create( &t, &attr, task, NULL );
13269 #if HAVE_PTHREADS < 7
13270         if( status < 0 ) status = errno;
13271 #endif
13272         if( status ) return status;
13273 #else
13274         /* Draft 4 pthreads */
13275         status = pthread_create( &t, pthread_attr_default, task, NULL );
13276         if( status ) return errno;
13277
13278         /* give thread a chance to complete */
13279         /* it should remain joinable and hence detachable */
13280         sleep( 1 );
13281
13282         status = pthread_detach( &t );
13283         if( status ) return errno;
13284 #endif
13285
13286 #ifdef HAVE_LINUX_THREADS
13287         pthread_kill_other_threads_np();
13288 #endif
13289
13290         return 0;
13291
13292 ; return 0; }
13293 EOF
13294 if { (eval echo configure:13295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13295   rm -rf conftest*
13296   ol_cv_pthread_lc_r=yes
13297 else
13298   echo "configure: failed program was:" >&5
13299   cat conftest.$ac_ext >&5
13300   rm -rf conftest*
13301   ol_cv_pthread_lc_r=no
13302 fi
13303 rm -f conftest*
13304 else
13305   cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* pthread test headers */
13309 #include <pthread.h>
13310 #if HAVE_PTHREADS < 7
13311 #include <errno.h>
13312 #endif
13313 #ifndef NULL
13314 #define NULL (void*)0
13315 #endif
13316
13317 static void *task(p)
13318         void *p;
13319 {
13320         return (void *) (p == NULL);
13321 }
13322
13323
13324 int main(argc, argv)
13325         int argc;
13326         char **argv;
13327 {
13328
13329         /* pthread test function */
13330 #ifndef PTHREAD_CREATE_DETACHED
13331 #define PTHREAD_CREATE_DETACHED 1
13332 #endif
13333         pthread_t t;
13334         int status;
13335         int detach = PTHREAD_CREATE_DETACHED;
13336
13337 #if HAVE_PTHREADS > 4
13338         /* Final pthreads */
13339         pthread_attr_t attr;
13340
13341         status = pthread_attr_init(&attr);
13342         if( status ) return status;
13343
13344 #if HAVE_PTHREADS < 7
13345         status = pthread_attr_setdetachstate(&attr, &detach);
13346         if( status < 0 ) status = errno;
13347 #else
13348         status = pthread_attr_setdetachstate(&attr, detach);
13349 #endif
13350         if( status ) return status;
13351         status = pthread_create( &t, &attr, task, NULL );
13352 #if HAVE_PTHREADS < 7
13353         if( status < 0 ) status = errno;
13354 #endif
13355         if( status ) return status;
13356 #else
13357         /* Draft 4 pthreads */
13358         status = pthread_create( &t, pthread_attr_default, task, NULL );
13359         if( status ) return errno;
13360
13361         /* give thread a chance to complete */
13362         /* it should remain joinable and hence detachable */
13363         sleep( 1 );
13364
13365         status = pthread_detach( &t );
13366         if( status ) return errno;
13367 #endif
13368
13369 #ifdef HAVE_LINUX_THREADS
13370         pthread_kill_other_threads_np();
13371 #endif
13372
13373         return 0;
13374
13375 }
13376
13377 EOF
13378 if { (eval echo configure:13379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13379 then
13380   ol_cv_pthread_lc_r=yes
13381 else
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -fr conftest*
13385   ol_cv_pthread_lc_r=no
13386 fi
13387 rm -fr conftest*
13388 fi
13389
13390
13391                 # restore the LIBS
13392                 LIBS="$ol_LIBS"
13393         
13394 fi
13395
13396 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13397
13398         if test $ol_cv_pthread_lc_r = yes ; then
13399                 ol_link_pthreads="-lc_r"
13400                 ol_link_threads=posix
13401         fi
13402 fi
13403
13404
13405                 # Pthread try link: -threads (ol_cv_pthread_threads)
13406 if test "$ol_link_threads" = no ; then
13407         # try -threads
13408         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13409 echo "configure:13410: checking for pthread link with -threads" >&5
13410 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13411   echo $ac_n "(cached) $ac_c" 1>&6
13412 else
13413   
13414                 # save the flags
13415                 ol_LIBS="$LIBS"
13416                 LIBS="-threads $LIBS"
13417
13418                 if test "$cross_compiling" = yes; then
13419   cat > conftest.$ac_ext <<EOF
13420 #line 13421 "configure"
13421 #include "confdefs.h"
13422 /* pthread test headers */
13423 #include <pthread.h>
13424 #if HAVE_PTHREADS < 7
13425 #include <errno.h>
13426 #endif
13427 #ifndef NULL
13428 #define NULL (void*)0
13429 #endif
13430
13431 static void *task(p)
13432         void *p;
13433 {
13434         return (void *) (p == NULL);
13435 }
13436
13437 int main() {
13438
13439         /* pthread test function */
13440 #ifndef PTHREAD_CREATE_DETACHED
13441 #define PTHREAD_CREATE_DETACHED 1
13442 #endif
13443         pthread_t t;
13444         int status;
13445         int detach = PTHREAD_CREATE_DETACHED;
13446
13447 #if HAVE_PTHREADS > 4
13448         /* Final pthreads */
13449         pthread_attr_t attr;
13450
13451         status = pthread_attr_init(&attr);
13452         if( status ) return status;
13453
13454 #if HAVE_PTHREADS < 7
13455         status = pthread_attr_setdetachstate(&attr, &detach);
13456         if( status < 0 ) status = errno;
13457 #else
13458         status = pthread_attr_setdetachstate(&attr, detach);
13459 #endif
13460         if( status ) return status;
13461         status = pthread_create( &t, &attr, task, NULL );
13462 #if HAVE_PTHREADS < 7
13463         if( status < 0 ) status = errno;
13464 #endif
13465         if( status ) return status;
13466 #else
13467         /* Draft 4 pthreads */
13468         status = pthread_create( &t, pthread_attr_default, task, NULL );
13469         if( status ) return errno;
13470
13471         /* give thread a chance to complete */
13472         /* it should remain joinable and hence detachable */
13473         sleep( 1 );
13474
13475         status = pthread_detach( &t );
13476         if( status ) return errno;
13477 #endif
13478
13479 #ifdef HAVE_LINUX_THREADS
13480         pthread_kill_other_threads_np();
13481 #endif
13482
13483         return 0;
13484
13485 ; return 0; }
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13488   rm -rf conftest*
13489   ol_cv_pthread_threads=yes
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -rf conftest*
13494   ol_cv_pthread_threads=no
13495 fi
13496 rm -f conftest*
13497 else
13498   cat > conftest.$ac_ext <<EOF
13499 #line 13500 "configure"
13500 #include "confdefs.h"
13501 /* pthread test headers */
13502 #include <pthread.h>
13503 #if HAVE_PTHREADS < 7
13504 #include <errno.h>
13505 #endif
13506 #ifndef NULL
13507 #define NULL (void*)0
13508 #endif
13509
13510 static void *task(p)
13511         void *p;
13512 {
13513         return (void *) (p == NULL);
13514 }
13515
13516
13517 int main(argc, argv)
13518         int argc;
13519         char **argv;
13520 {
13521
13522         /* pthread test function */
13523 #ifndef PTHREAD_CREATE_DETACHED
13524 #define PTHREAD_CREATE_DETACHED 1
13525 #endif
13526         pthread_t t;
13527         int status;
13528         int detach = PTHREAD_CREATE_DETACHED;
13529
13530 #if HAVE_PTHREADS > 4
13531         /* Final pthreads */
13532         pthread_attr_t attr;
13533
13534         status = pthread_attr_init(&attr);
13535         if( status ) return status;
13536
13537 #if HAVE_PTHREADS < 7
13538         status = pthread_attr_setdetachstate(&attr, &detach);
13539         if( status < 0 ) status = errno;
13540 #else
13541         status = pthread_attr_setdetachstate(&attr, detach);
13542 #endif
13543         if( status ) return status;
13544         status = pthread_create( &t, &attr, task, NULL );
13545 #if HAVE_PTHREADS < 7
13546         if( status < 0 ) status = errno;
13547 #endif
13548         if( status ) return status;
13549 #else
13550         /* Draft 4 pthreads */
13551         status = pthread_create( &t, pthread_attr_default, task, NULL );
13552         if( status ) return errno;
13553
13554         /* give thread a chance to complete */
13555         /* it should remain joinable and hence detachable */
13556         sleep( 1 );
13557
13558         status = pthread_detach( &t );
13559         if( status ) return errno;
13560 #endif
13561
13562 #ifdef HAVE_LINUX_THREADS
13563         pthread_kill_other_threads_np();
13564 #endif
13565
13566         return 0;
13567
13568 }
13569
13570 EOF
13571 if { (eval echo configure:13572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13572 then
13573   ol_cv_pthread_threads=yes
13574 else
13575   echo "configure: failed program was:" >&5
13576   cat conftest.$ac_ext >&5
13577   rm -fr conftest*
13578   ol_cv_pthread_threads=no
13579 fi
13580 rm -fr conftest*
13581 fi
13582
13583
13584                 # restore the LIBS
13585                 LIBS="$ol_LIBS"
13586         
13587 fi
13588
13589 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13590
13591         if test $ol_cv_pthread_threads = yes ; then
13592                 ol_link_pthreads="-threads"
13593                 ol_link_threads=posix
13594         fi
13595 fi
13596
13597
13598                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13599 if test "$ol_link_threads" = no ; then
13600         # try -lpthreads -lmach -lexc -lc_r
13601         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13602 echo "configure:13603: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13603 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13604   echo $ac_n "(cached) $ac_c" 1>&6
13605 else
13606   
13607                 # save the flags
13608                 ol_LIBS="$LIBS"
13609                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13610
13611                 if test "$cross_compiling" = yes; then
13612   cat > conftest.$ac_ext <<EOF
13613 #line 13614 "configure"
13614 #include "confdefs.h"
13615 /* pthread test headers */
13616 #include <pthread.h>
13617 #if HAVE_PTHREADS < 7
13618 #include <errno.h>
13619 #endif
13620 #ifndef NULL
13621 #define NULL (void*)0
13622 #endif
13623
13624 static void *task(p)
13625         void *p;
13626 {
13627         return (void *) (p == NULL);
13628 }
13629
13630 int main() {
13631
13632         /* pthread test function */
13633 #ifndef PTHREAD_CREATE_DETACHED
13634 #define PTHREAD_CREATE_DETACHED 1
13635 #endif
13636         pthread_t t;
13637         int status;
13638         int detach = PTHREAD_CREATE_DETACHED;
13639
13640 #if HAVE_PTHREADS > 4
13641         /* Final pthreads */
13642         pthread_attr_t attr;
13643
13644         status = pthread_attr_init(&attr);
13645         if( status ) return status;
13646
13647 #if HAVE_PTHREADS < 7
13648         status = pthread_attr_setdetachstate(&attr, &detach);
13649         if( status < 0 ) status = errno;
13650 #else
13651         status = pthread_attr_setdetachstate(&attr, detach);
13652 #endif
13653         if( status ) return status;
13654         status = pthread_create( &t, &attr, task, NULL );
13655 #if HAVE_PTHREADS < 7
13656         if( status < 0 ) status = errno;
13657 #endif
13658         if( status ) return status;
13659 #else
13660         /* Draft 4 pthreads */
13661         status = pthread_create( &t, pthread_attr_default, task, NULL );
13662         if( status ) return errno;
13663
13664         /* give thread a chance to complete */
13665         /* it should remain joinable and hence detachable */
13666         sleep( 1 );
13667
13668         status = pthread_detach( &t );
13669         if( status ) return errno;
13670 #endif
13671
13672 #ifdef HAVE_LINUX_THREADS
13673         pthread_kill_other_threads_np();
13674 #endif
13675
13676         return 0;
13677
13678 ; return 0; }
13679 EOF
13680 if { (eval echo configure:13681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13681   rm -rf conftest*
13682   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13683 else
13684   echo "configure: failed program was:" >&5
13685   cat conftest.$ac_ext >&5
13686   rm -rf conftest*
13687   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13688 fi
13689 rm -f conftest*
13690 else
13691   cat > conftest.$ac_ext <<EOF
13692 #line 13693 "configure"
13693 #include "confdefs.h"
13694 /* pthread test headers */
13695 #include <pthread.h>
13696 #if HAVE_PTHREADS < 7
13697 #include <errno.h>
13698 #endif
13699 #ifndef NULL
13700 #define NULL (void*)0
13701 #endif
13702
13703 static void *task(p)
13704         void *p;
13705 {
13706         return (void *) (p == NULL);
13707 }
13708
13709
13710 int main(argc, argv)
13711         int argc;
13712         char **argv;
13713 {
13714
13715         /* pthread test function */
13716 #ifndef PTHREAD_CREATE_DETACHED
13717 #define PTHREAD_CREATE_DETACHED 1
13718 #endif
13719         pthread_t t;
13720         int status;
13721         int detach = PTHREAD_CREATE_DETACHED;
13722
13723 #if HAVE_PTHREADS > 4
13724         /* Final pthreads */
13725         pthread_attr_t attr;
13726
13727         status = pthread_attr_init(&attr);
13728         if( status ) return status;
13729
13730 #if HAVE_PTHREADS < 7
13731         status = pthread_attr_setdetachstate(&attr, &detach);
13732         if( status < 0 ) status = errno;
13733 #else
13734         status = pthread_attr_setdetachstate(&attr, detach);
13735 #endif
13736         if( status ) return status;
13737         status = pthread_create( &t, &attr, task, NULL );
13738 #if HAVE_PTHREADS < 7
13739         if( status < 0 ) status = errno;
13740 #endif
13741         if( status ) return status;
13742 #else
13743         /* Draft 4 pthreads */
13744         status = pthread_create( &t, pthread_attr_default, task, NULL );
13745         if( status ) return errno;
13746
13747         /* give thread a chance to complete */
13748         /* it should remain joinable and hence detachable */
13749         sleep( 1 );
13750
13751         status = pthread_detach( &t );
13752         if( status ) return errno;
13753 #endif
13754
13755 #ifdef HAVE_LINUX_THREADS
13756         pthread_kill_other_threads_np();
13757 #endif
13758
13759         return 0;
13760
13761 }
13762
13763 EOF
13764 if { (eval echo configure:13765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13765 then
13766   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13767 else
13768   echo "configure: failed program was:" >&5
13769   cat conftest.$ac_ext >&5
13770   rm -fr conftest*
13771   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13772 fi
13773 rm -fr conftest*
13774 fi
13775
13776
13777                 # restore the LIBS
13778                 LIBS="$ol_LIBS"
13779         
13780 fi
13781
13782 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13783
13784         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13785                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13786                 ol_link_threads=posix
13787         fi
13788 fi
13789
13790                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13791 if test "$ol_link_threads" = no ; then
13792         # try -lpthreads -lmach -lexc
13793         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13794 echo "configure:13795: checking for pthread link with -lpthreads -lmach -lexc" >&5
13795 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13796   echo $ac_n "(cached) $ac_c" 1>&6
13797 else
13798   
13799                 # save the flags
13800                 ol_LIBS="$LIBS"
13801                 LIBS="-lpthreads -lmach -lexc $LIBS"
13802
13803                 if test "$cross_compiling" = yes; then
13804   cat > conftest.$ac_ext <<EOF
13805 #line 13806 "configure"
13806 #include "confdefs.h"
13807 /* pthread test headers */
13808 #include <pthread.h>
13809 #if HAVE_PTHREADS < 7
13810 #include <errno.h>
13811 #endif
13812 #ifndef NULL
13813 #define NULL (void*)0
13814 #endif
13815
13816 static void *task(p)
13817         void *p;
13818 {
13819         return (void *) (p == NULL);
13820 }
13821
13822 int main() {
13823
13824         /* pthread test function */
13825 #ifndef PTHREAD_CREATE_DETACHED
13826 #define PTHREAD_CREATE_DETACHED 1
13827 #endif
13828         pthread_t t;
13829         int status;
13830         int detach = PTHREAD_CREATE_DETACHED;
13831
13832 #if HAVE_PTHREADS > 4
13833         /* Final pthreads */
13834         pthread_attr_t attr;
13835
13836         status = pthread_attr_init(&attr);
13837         if( status ) return status;
13838
13839 #if HAVE_PTHREADS < 7
13840         status = pthread_attr_setdetachstate(&attr, &detach);
13841         if( status < 0 ) status = errno;
13842 #else
13843         status = pthread_attr_setdetachstate(&attr, detach);
13844 #endif
13845         if( status ) return status;
13846         status = pthread_create( &t, &attr, task, NULL );
13847 #if HAVE_PTHREADS < 7
13848         if( status < 0 ) status = errno;
13849 #endif
13850         if( status ) return status;
13851 #else
13852         /* Draft 4 pthreads */
13853         status = pthread_create( &t, pthread_attr_default, task, NULL );
13854         if( status ) return errno;
13855
13856         /* give thread a chance to complete */
13857         /* it should remain joinable and hence detachable */
13858         sleep( 1 );
13859
13860         status = pthread_detach( &t );
13861         if( status ) return errno;
13862 #endif
13863
13864 #ifdef HAVE_LINUX_THREADS
13865         pthread_kill_other_threads_np();
13866 #endif
13867
13868         return 0;
13869
13870 ; return 0; }
13871 EOF
13872 if { (eval echo configure:13873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13873   rm -rf conftest*
13874   ol_cv_pthread_lpthreads_lmach_lexc=yes
13875 else
13876   echo "configure: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   rm -rf conftest*
13879   ol_cv_pthread_lpthreads_lmach_lexc=no
13880 fi
13881 rm -f conftest*
13882 else
13883   cat > conftest.$ac_ext <<EOF
13884 #line 13885 "configure"
13885 #include "confdefs.h"
13886 /* pthread test headers */
13887 #include <pthread.h>
13888 #if HAVE_PTHREADS < 7
13889 #include <errno.h>
13890 #endif
13891 #ifndef NULL
13892 #define NULL (void*)0
13893 #endif
13894
13895 static void *task(p)
13896         void *p;
13897 {
13898         return (void *) (p == NULL);
13899 }
13900
13901
13902 int main(argc, argv)
13903         int argc;
13904         char **argv;
13905 {
13906
13907         /* pthread test function */
13908 #ifndef PTHREAD_CREATE_DETACHED
13909 #define PTHREAD_CREATE_DETACHED 1
13910 #endif
13911         pthread_t t;
13912         int status;
13913         int detach = PTHREAD_CREATE_DETACHED;
13914
13915 #if HAVE_PTHREADS > 4
13916         /* Final pthreads */
13917         pthread_attr_t attr;
13918
13919         status = pthread_attr_init(&attr);
13920         if( status ) return status;
13921
13922 #if HAVE_PTHREADS < 7
13923         status = pthread_attr_setdetachstate(&attr, &detach);
13924         if( status < 0 ) status = errno;
13925 #else
13926         status = pthread_attr_setdetachstate(&attr, detach);
13927 #endif
13928         if( status ) return status;
13929         status = pthread_create( &t, &attr, task, NULL );
13930 #if HAVE_PTHREADS < 7
13931         if( status < 0 ) status = errno;
13932 #endif
13933         if( status ) return status;
13934 #else
13935         /* Draft 4 pthreads */
13936         status = pthread_create( &t, pthread_attr_default, task, NULL );
13937         if( status ) return errno;
13938
13939         /* give thread a chance to complete */
13940         /* it should remain joinable and hence detachable */
13941         sleep( 1 );
13942
13943         status = pthread_detach( &t );
13944         if( status ) return errno;
13945 #endif
13946
13947 #ifdef HAVE_LINUX_THREADS
13948         pthread_kill_other_threads_np();
13949 #endif
13950
13951         return 0;
13952
13953 }
13954
13955 EOF
13956 if { (eval echo configure:13957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13957 then
13958   ol_cv_pthread_lpthreads_lmach_lexc=yes
13959 else
13960   echo "configure: failed program was:" >&5
13961   cat conftest.$ac_ext >&5
13962   rm -fr conftest*
13963   ol_cv_pthread_lpthreads_lmach_lexc=no
13964 fi
13965 rm -fr conftest*
13966 fi
13967
13968
13969                 # restore the LIBS
13970                 LIBS="$ol_LIBS"
13971         
13972 fi
13973
13974 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
13975
13976         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13977                 ol_link_pthreads="-lpthreads -lmach -lexc"
13978                 ol_link_threads=posix
13979         fi
13980 fi
13981
13982                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13983 if test "$ol_link_threads" = no ; then
13984         # try -lpthreads -lexc
13985         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
13986 echo "configure:13987: checking for pthread link with -lpthreads -lexc" >&5
13987 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
13988   echo $ac_n "(cached) $ac_c" 1>&6
13989 else
13990   
13991                 # save the flags
13992                 ol_LIBS="$LIBS"
13993                 LIBS="-lpthreads -lexc $LIBS"
13994
13995                 if test "$cross_compiling" = yes; then
13996   cat > conftest.$ac_ext <<EOF
13997 #line 13998 "configure"
13998 #include "confdefs.h"
13999 /* pthread test headers */
14000 #include <pthread.h>
14001 #if HAVE_PTHREADS < 7
14002 #include <errno.h>
14003 #endif
14004 #ifndef NULL
14005 #define NULL (void*)0
14006 #endif
14007
14008 static void *task(p)
14009         void *p;
14010 {
14011         return (void *) (p == NULL);
14012 }
14013
14014 int main() {
14015
14016         /* pthread test function */
14017 #ifndef PTHREAD_CREATE_DETACHED
14018 #define PTHREAD_CREATE_DETACHED 1
14019 #endif
14020         pthread_t t;
14021         int status;
14022         int detach = PTHREAD_CREATE_DETACHED;
14023
14024 #if HAVE_PTHREADS > 4
14025         /* Final pthreads */
14026         pthread_attr_t attr;
14027
14028         status = pthread_attr_init(&attr);
14029         if( status ) return status;
14030
14031 #if HAVE_PTHREADS < 7
14032         status = pthread_attr_setdetachstate(&attr, &detach);
14033         if( status < 0 ) status = errno;
14034 #else
14035         status = pthread_attr_setdetachstate(&attr, detach);
14036 #endif
14037         if( status ) return status;
14038         status = pthread_create( &t, &attr, task, NULL );
14039 #if HAVE_PTHREADS < 7
14040         if( status < 0 ) status = errno;
14041 #endif
14042         if( status ) return status;
14043 #else
14044         /* Draft 4 pthreads */
14045         status = pthread_create( &t, pthread_attr_default, task, NULL );
14046         if( status ) return errno;
14047
14048         /* give thread a chance to complete */
14049         /* it should remain joinable and hence detachable */
14050         sleep( 1 );
14051
14052         status = pthread_detach( &t );
14053         if( status ) return errno;
14054 #endif
14055
14056 #ifdef HAVE_LINUX_THREADS
14057         pthread_kill_other_threads_np();
14058 #endif
14059
14060         return 0;
14061
14062 ; return 0; }
14063 EOF
14064 if { (eval echo configure:14065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14065   rm -rf conftest*
14066   ol_cv_pthread_lpthreads_lexc=yes
14067 else
14068   echo "configure: failed program was:" >&5
14069   cat conftest.$ac_ext >&5
14070   rm -rf conftest*
14071   ol_cv_pthread_lpthreads_lexc=no
14072 fi
14073 rm -f conftest*
14074 else
14075   cat > conftest.$ac_ext <<EOF
14076 #line 14077 "configure"
14077 #include "confdefs.h"
14078 /* pthread test headers */
14079 #include <pthread.h>
14080 #if HAVE_PTHREADS < 7
14081 #include <errno.h>
14082 #endif
14083 #ifndef NULL
14084 #define NULL (void*)0
14085 #endif
14086
14087 static void *task(p)
14088         void *p;
14089 {
14090         return (void *) (p == NULL);
14091 }
14092
14093
14094 int main(argc, argv)
14095         int argc;
14096         char **argv;
14097 {
14098
14099         /* pthread test function */
14100 #ifndef PTHREAD_CREATE_DETACHED
14101 #define PTHREAD_CREATE_DETACHED 1
14102 #endif
14103         pthread_t t;
14104         int status;
14105         int detach = PTHREAD_CREATE_DETACHED;
14106
14107 #if HAVE_PTHREADS > 4
14108         /* Final pthreads */
14109         pthread_attr_t attr;
14110
14111         status = pthread_attr_init(&attr);
14112         if( status ) return status;
14113
14114 #if HAVE_PTHREADS < 7
14115         status = pthread_attr_setdetachstate(&attr, &detach);
14116         if( status < 0 ) status = errno;
14117 #else
14118         status = pthread_attr_setdetachstate(&attr, detach);
14119 #endif
14120         if( status ) return status;
14121         status = pthread_create( &t, &attr, task, NULL );
14122 #if HAVE_PTHREADS < 7
14123         if( status < 0 ) status = errno;
14124 #endif
14125         if( status ) return status;
14126 #else
14127         /* Draft 4 pthreads */
14128         status = pthread_create( &t, pthread_attr_default, task, NULL );
14129         if( status ) return errno;
14130
14131         /* give thread a chance to complete */
14132         /* it should remain joinable and hence detachable */
14133         sleep( 1 );
14134
14135         status = pthread_detach( &t );
14136         if( status ) return errno;
14137 #endif
14138
14139 #ifdef HAVE_LINUX_THREADS
14140         pthread_kill_other_threads_np();
14141 #endif
14142
14143         return 0;
14144
14145 }
14146
14147 EOF
14148 if { (eval echo configure:14149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14149 then
14150   ol_cv_pthread_lpthreads_lexc=yes
14151 else
14152   echo "configure: failed program was:" >&5
14153   cat conftest.$ac_ext >&5
14154   rm -fr conftest*
14155   ol_cv_pthread_lpthreads_lexc=no
14156 fi
14157 rm -fr conftest*
14158 fi
14159
14160
14161                 # restore the LIBS
14162                 LIBS="$ol_LIBS"
14163         
14164 fi
14165
14166 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14167
14168         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14169                 ol_link_pthreads="-lpthreads -lexc"
14170                 ol_link_threads=posix
14171         fi
14172 fi
14173
14174
14175                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14176 if test "$ol_link_threads" = no ; then
14177         # try -lpthreads
14178         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14179 echo "configure:14180: checking for pthread link with -lpthreads" >&5
14180 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14181   echo $ac_n "(cached) $ac_c" 1>&6
14182 else
14183   
14184                 # save the flags
14185                 ol_LIBS="$LIBS"
14186                 LIBS="-lpthreads $LIBS"
14187
14188                 if test "$cross_compiling" = yes; then
14189   cat > conftest.$ac_ext <<EOF
14190 #line 14191 "configure"
14191 #include "confdefs.h"
14192 /* pthread test headers */
14193 #include <pthread.h>
14194 #if HAVE_PTHREADS < 7
14195 #include <errno.h>
14196 #endif
14197 #ifndef NULL
14198 #define NULL (void*)0
14199 #endif
14200
14201 static void *task(p)
14202         void *p;
14203 {
14204         return (void *) (p == NULL);
14205 }
14206
14207 int main() {
14208
14209         /* pthread test function */
14210 #ifndef PTHREAD_CREATE_DETACHED
14211 #define PTHREAD_CREATE_DETACHED 1
14212 #endif
14213         pthread_t t;
14214         int status;
14215         int detach = PTHREAD_CREATE_DETACHED;
14216
14217 #if HAVE_PTHREADS > 4
14218         /* Final pthreads */
14219         pthread_attr_t attr;
14220
14221         status = pthread_attr_init(&attr);
14222         if( status ) return status;
14223
14224 #if HAVE_PTHREADS < 7
14225         status = pthread_attr_setdetachstate(&attr, &detach);
14226         if( status < 0 ) status = errno;
14227 #else
14228         status = pthread_attr_setdetachstate(&attr, detach);
14229 #endif
14230         if( status ) return status;
14231         status = pthread_create( &t, &attr, task, NULL );
14232 #if HAVE_PTHREADS < 7
14233         if( status < 0 ) status = errno;
14234 #endif
14235         if( status ) return status;
14236 #else
14237         /* Draft 4 pthreads */
14238         status = pthread_create( &t, pthread_attr_default, task, NULL );
14239         if( status ) return errno;
14240
14241         /* give thread a chance to complete */
14242         /* it should remain joinable and hence detachable */
14243         sleep( 1 );
14244
14245         status = pthread_detach( &t );
14246         if( status ) return errno;
14247 #endif
14248
14249 #ifdef HAVE_LINUX_THREADS
14250         pthread_kill_other_threads_np();
14251 #endif
14252
14253         return 0;
14254
14255 ; return 0; }
14256 EOF
14257 if { (eval echo configure:14258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14258   rm -rf conftest*
14259   ol_cv_pthread_lib_lpthreads=yes
14260 else
14261   echo "configure: failed program was:" >&5
14262   cat conftest.$ac_ext >&5
14263   rm -rf conftest*
14264   ol_cv_pthread_lib_lpthreads=no
14265 fi
14266 rm -f conftest*
14267 else
14268   cat > conftest.$ac_ext <<EOF
14269 #line 14270 "configure"
14270 #include "confdefs.h"
14271 /* pthread test headers */
14272 #include <pthread.h>
14273 #if HAVE_PTHREADS < 7
14274 #include <errno.h>
14275 #endif
14276 #ifndef NULL
14277 #define NULL (void*)0
14278 #endif
14279
14280 static void *task(p)
14281         void *p;
14282 {
14283         return (void *) (p == NULL);
14284 }
14285
14286
14287 int main(argc, argv)
14288         int argc;
14289         char **argv;
14290 {
14291
14292         /* pthread test function */
14293 #ifndef PTHREAD_CREATE_DETACHED
14294 #define PTHREAD_CREATE_DETACHED 1
14295 #endif
14296         pthread_t t;
14297         int status;
14298         int detach = PTHREAD_CREATE_DETACHED;
14299
14300 #if HAVE_PTHREADS > 4
14301         /* Final pthreads */
14302         pthread_attr_t attr;
14303
14304         status = pthread_attr_init(&attr);
14305         if( status ) return status;
14306
14307 #if HAVE_PTHREADS < 7
14308         status = pthread_attr_setdetachstate(&attr, &detach);
14309         if( status < 0 ) status = errno;
14310 #else
14311         status = pthread_attr_setdetachstate(&attr, detach);
14312 #endif
14313         if( status ) return status;
14314         status = pthread_create( &t, &attr, task, NULL );
14315 #if HAVE_PTHREADS < 7
14316         if( status < 0 ) status = errno;
14317 #endif
14318         if( status ) return status;
14319 #else
14320         /* Draft 4 pthreads */
14321         status = pthread_create( &t, pthread_attr_default, task, NULL );
14322         if( status ) return errno;
14323
14324         /* give thread a chance to complete */
14325         /* it should remain joinable and hence detachable */
14326         sleep( 1 );
14327
14328         status = pthread_detach( &t );
14329         if( status ) return errno;
14330 #endif
14331
14332 #ifdef HAVE_LINUX_THREADS
14333         pthread_kill_other_threads_np();
14334 #endif
14335
14336         return 0;
14337
14338 }
14339
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14342 then
14343   ol_cv_pthread_lib_lpthreads=yes
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347   rm -fr conftest*
14348   ol_cv_pthread_lib_lpthreads=no
14349 fi
14350 rm -fr conftest*
14351 fi
14352
14353
14354                 # restore the LIBS
14355                 LIBS="$ol_LIBS"
14356         
14357 fi
14358
14359 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14360
14361         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14362                 ol_link_pthreads="-lpthreads"
14363                 ol_link_threads=posix
14364         fi
14365 fi
14366
14367
14368                 if test $ol_link_threads != no ; then
14369                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14370
14371                                                 save_CPPFLAGS="$CPPFLAGS"
14372                         save_LIBS="$LIBS"
14373                         LIBS="$LTHREAD_LIBS $LIBS"
14374
14375                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14376 do
14377 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14378 echo "configure:14379: checking for $ac_func" >&5
14379 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14380   echo $ac_n "(cached) $ac_c" 1>&6
14381 else
14382   cat > conftest.$ac_ext <<EOF
14383 #line 14384 "configure"
14384 #include "confdefs.h"
14385 /* System header to define __stub macros and hopefully few prototypes,
14386     which can conflict with char $ac_func(); below.  */
14387 #include <assert.h>
14388 /* Override any gcc2 internal prototype to avoid an error.  */
14389 /* We use char because int might match the return type of a gcc2
14390     builtin and then its argument prototype would still apply.  */
14391 char $ac_func();
14392 char (*f)();
14393
14394 int main() {
14395
14396 /* The GNU C library defines this for functions which it implements
14397     to always fail with ENOSYS.  Some functions are actually named
14398     something starting with __ and the normal name is an alias.  */
14399 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14400 choke me
14401 #else
14402 f = $ac_func;
14403 #endif
14404
14405 ; return 0; }
14406 EOF
14407 if { (eval echo configure:14408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14408   rm -rf conftest*
14409   eval "ac_cv_func_$ac_func=yes"
14410 else
14411   echo "configure: failed program was:" >&5
14412   cat conftest.$ac_ext >&5
14413   rm -rf conftest*
14414   eval "ac_cv_func_$ac_func=no"
14415 fi
14416 rm -f conftest*
14417 fi
14418
14419 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14420   echo "$ac_t""yes" 1>&6
14421     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14422   cat >> confdefs.h <<EOF
14423 #define $ac_tr_func 1
14424 EOF
14425  
14426 else
14427   echo "$ac_t""no" 1>&6
14428 fi
14429 done
14430
14431
14432                         if test $ac_cv_func_sched_yield = no -a \
14433                                 $ac_cv_func_pthread_yield = no -a \
14434                                 $ac_cv_func_thr_yield = no ; then
14435                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14436 echo "configure:14437: checking for sched_yield in -lrt" >&5
14437 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14438 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14439   echo $ac_n "(cached) $ac_c" 1>&6
14440 else
14441   ac_save_LIBS="$LIBS"
14442 LIBS="-lrt  $LIBS"
14443 cat > conftest.$ac_ext <<EOF
14444 #line 14445 "configure"
14445 #include "confdefs.h"
14446 /* Override any gcc2 internal prototype to avoid an error.  */
14447 /* We use char because int might match the return type of a gcc2
14448     builtin and then its argument prototype would still apply.  */
14449 char sched_yield();
14450
14451 int main() {
14452 sched_yield()
14453 ; return 0; }
14454 EOF
14455 if { (eval echo configure:14456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14456   rm -rf conftest*
14457   eval "ac_cv_lib_$ac_lib_var=yes"
14458 else
14459   echo "configure: failed program was:" >&5
14460   cat conftest.$ac_ext >&5
14461   rm -rf conftest*
14462   eval "ac_cv_lib_$ac_lib_var=no"
14463 fi
14464 rm -f conftest*
14465 LIBS="$ac_save_LIBS"
14466
14467 fi
14468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14469   echo "$ac_t""yes" 1>&6
14470   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14471                                         cat >> confdefs.h <<\EOF
14472 #define HAVE_SCHED_YIELD 1
14473 EOF
14474
14475                                         ac_cv_func_sched_yield=yes
14476 else
14477   echo "$ac_t""no" 1>&6
14478 ac_cv_func_sched_yield=no
14479 fi
14480
14481                         fi
14482                         if test $ac_cv_func_sched_yield = no -a \
14483                                 $ac_cv_func_pthread_yield = no -a \
14484                                 "$ac_cv_func_thr_yield" = no ; then
14485                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14486                         fi
14487
14488                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14489 do
14490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14491 echo "configure:14492: checking for $ac_func" >&5
14492 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14493   echo $ac_n "(cached) $ac_c" 1>&6
14494 else
14495   cat > conftest.$ac_ext <<EOF
14496 #line 14497 "configure"
14497 #include "confdefs.h"
14498 /* System header to define __stub macros and hopefully few prototypes,
14499     which can conflict with char $ac_func(); below.  */
14500 #include <assert.h>
14501 /* Override any gcc2 internal prototype to avoid an error.  */
14502 /* We use char because int might match the return type of a gcc2
14503     builtin and then its argument prototype would still apply.  */
14504 char $ac_func();
14505 char (*f)();
14506
14507 int main() {
14508
14509 /* The GNU C library defines this for functions which it implements
14510     to always fail with ENOSYS.  Some functions are actually named
14511     something starting with __ and the normal name is an alias.  */
14512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14513 choke me
14514 #else
14515 f = $ac_func;
14516 #endif
14517
14518 ; return 0; }
14519 EOF
14520 if { (eval echo configure:14521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14521   rm -rf conftest*
14522   eval "ac_cv_func_$ac_func=yes"
14523 else
14524   echo "configure: failed program was:" >&5
14525   cat conftest.$ac_ext >&5
14526   rm -rf conftest*
14527   eval "ac_cv_func_$ac_func=no"
14528 fi
14529 rm -f conftest*
14530 fi
14531
14532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14533   echo "$ac_t""yes" 1>&6
14534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14535   cat >> confdefs.h <<EOF
14536 #define $ac_tr_func 1
14537 EOF
14538  
14539 else
14540   echo "$ac_t""no" 1>&6
14541 fi
14542 done
14543
14544
14545                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14546 echo "configure:14547: checking for pthread_detach with <pthread.h>" >&5
14547 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14548   echo $ac_n "(cached) $ac_c" 1>&6
14549 else
14550   
14551                                                                 cat > conftest.$ac_ext <<EOF
14552 #line 14553 "configure"
14553 #include "confdefs.h"
14554
14555 #include <pthread.h>
14556 #ifndef NULL
14557 #define NULL (void*)0
14558 #endif
14559
14560 int main() {
14561 pthread_detach(NULL);
14562 ; return 0; }
14563 EOF
14564 if { (eval echo configure:14565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14565   rm -rf conftest*
14566   ol_cv_func_pthread_detach=yes
14567 else
14568   echo "configure: failed program was:" >&5
14569   cat conftest.$ac_ext >&5
14570   rm -rf conftest*
14571   ol_cv_func_pthread_detach=no
14572 fi
14573 rm -f conftest*
14574                         
14575 fi
14576
14577 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14578
14579                         if test $ol_cv_func_pthread_detach = no ; then
14580                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14581                         fi
14582
14583                         cat >> confdefs.h <<\EOF
14584 #define HAVE_PTHREAD_DETACH 1
14585 EOF
14586
14587
14588                                                 for ac_func in \
14589                                 pthread_setconcurrency \
14590                                 pthread_getconcurrency \
14591                                 thr_setconcurrency \
14592                                 thr_getconcurrency \
14593                         
14594 do
14595 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14596 echo "configure:14597: checking for $ac_func" >&5
14597 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14598   echo $ac_n "(cached) $ac_c" 1>&6
14599 else
14600   cat > conftest.$ac_ext <<EOF
14601 #line 14602 "configure"
14602 #include "confdefs.h"
14603 /* System header to define __stub macros and hopefully few prototypes,
14604     which can conflict with char $ac_func(); below.  */
14605 #include <assert.h>
14606 /* Override any gcc2 internal prototype to avoid an error.  */
14607 /* We use char because int might match the return type of a gcc2
14608     builtin and then its argument prototype would still apply.  */
14609 char $ac_func();
14610 char (*f)();
14611
14612 int main() {
14613
14614 /* The GNU C library defines this for functions which it implements
14615     to always fail with ENOSYS.  Some functions are actually named
14616     something starting with __ and the normal name is an alias.  */
14617 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14618 choke me
14619 #else
14620 f = $ac_func;
14621 #endif
14622
14623 ; return 0; }
14624 EOF
14625 if { (eval echo configure:14626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14626   rm -rf conftest*
14627   eval "ac_cv_func_$ac_func=yes"
14628 else
14629   echo "configure: failed program was:" >&5
14630   cat conftest.$ac_ext >&5
14631   rm -rf conftest*
14632   eval "ac_cv_func_$ac_func=no"
14633 fi
14634 rm -f conftest*
14635 fi
14636
14637 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14638   echo "$ac_t""yes" 1>&6
14639     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14640   cat >> confdefs.h <<EOF
14641 #define $ac_tr_func 1
14642 EOF
14643  
14644 else
14645   echo "$ac_t""no" 1>&6
14646 fi
14647 done
14648
14649
14650                         
14651         for ac_func in pthread_kill_other_threads_np
14652 do
14653 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14654 echo "configure:14655: checking for $ac_func" >&5
14655 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14656   echo $ac_n "(cached) $ac_c" 1>&6
14657 else
14658   cat > conftest.$ac_ext <<EOF
14659 #line 14660 "configure"
14660 #include "confdefs.h"
14661 /* System header to define __stub macros and hopefully few prototypes,
14662     which can conflict with char $ac_func(); below.  */
14663 #include <assert.h>
14664 /* Override any gcc2 internal prototype to avoid an error.  */
14665 /* We use char because int might match the return type of a gcc2
14666     builtin and then its argument prototype would still apply.  */
14667 char $ac_func();
14668 char (*f)();
14669
14670 int main() {
14671
14672 /* The GNU C library defines this for functions which it implements
14673     to always fail with ENOSYS.  Some functions are actually named
14674     something starting with __ and the normal name is an alias.  */
14675 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14676 choke me
14677 #else
14678 f = $ac_func;
14679 #endif
14680
14681 ; return 0; }
14682 EOF
14683 if { (eval echo configure:14684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14684   rm -rf conftest*
14685   eval "ac_cv_func_$ac_func=yes"
14686 else
14687   echo "configure: failed program was:" >&5
14688   cat conftest.$ac_ext >&5
14689   rm -rf conftest*
14690   eval "ac_cv_func_$ac_func=no"
14691 fi
14692 rm -f conftest*
14693 fi
14694
14695 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14696   echo "$ac_t""yes" 1>&6
14697     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14698   cat >> confdefs.h <<EOF
14699 #define $ac_tr_func 1
14700 EOF
14701  
14702 else
14703   echo "$ac_t""no" 1>&6
14704 fi
14705 done
14706
14707         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14708 echo "configure:14709: checking for LinuxThreads implementation" >&5
14709 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14710   echo $ac_n "(cached) $ac_c" 1>&6
14711 else
14712   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14713 fi
14714
14715 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14716
14717                         
14718         
14719         
14720         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14721 echo "configure:14722: checking for LinuxThreads consistency" >&5
14722 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14723   echo $ac_n "(cached) $ac_c" 1>&6
14724 else
14725   
14726                 if test $ol_cv_header_linux_threads = yes -a \
14727                         $ol_cv_sys_linux_threads = yes; then
14728                         ol_cv_linux_threads=yes
14729                 elif test $ol_cv_header_linux_threads = no -a \
14730                         $ol_cv_sys_linux_threads = no; then
14731                         ol_cv_linux_threads=no
14732                 else
14733                         ol_cv_linux_threads=error
14734                 fi
14735         
14736 fi
14737
14738 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14739
14740
14741                         if test $ol_cv_linux_threads = error; then
14742                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14743                         fi
14744
14745                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14746 echo "configure:14747: checking if pthread_create() works" >&5
14747 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14748   echo $ac_n "(cached) $ac_c" 1>&6
14749 else
14750   
14751                         if test "$cross_compiling" = yes; then
14752                                 ol_cv_pthread_create_works=yes
14753 else
14754   cat > conftest.$ac_ext <<EOF
14755 #line 14756 "configure"
14756 #include "confdefs.h"
14757 /* pthread test headers */
14758 #include <pthread.h>
14759 #if HAVE_PTHREADS < 7
14760 #include <errno.h>
14761 #endif
14762 #ifndef NULL
14763 #define NULL (void*)0
14764 #endif
14765
14766 static void *task(p)
14767         void *p;
14768 {
14769         return (void *) (p == NULL);
14770 }
14771
14772
14773 int main(argc, argv)
14774         int argc;
14775         char **argv;
14776 {
14777
14778         /* pthread test function */
14779 #ifndef PTHREAD_CREATE_DETACHED
14780 #define PTHREAD_CREATE_DETACHED 1
14781 #endif
14782         pthread_t t;
14783         int status;
14784         int detach = PTHREAD_CREATE_DETACHED;
14785
14786 #if HAVE_PTHREADS > 4
14787         /* Final pthreads */
14788         pthread_attr_t attr;
14789
14790         status = pthread_attr_init(&attr);
14791         if( status ) return status;
14792
14793 #if HAVE_PTHREADS < 7
14794         status = pthread_attr_setdetachstate(&attr, &detach);
14795         if( status < 0 ) status = errno;
14796 #else
14797         status = pthread_attr_setdetachstate(&attr, detach);
14798 #endif
14799         if( status ) return status;
14800         status = pthread_create( &t, &attr, task, NULL );
14801 #if HAVE_PTHREADS < 7
14802         if( status < 0 ) status = errno;
14803 #endif
14804         if( status ) return status;
14805 #else
14806         /* Draft 4 pthreads */
14807         status = pthread_create( &t, pthread_attr_default, task, NULL );
14808         if( status ) return errno;
14809
14810         /* give thread a chance to complete */
14811         /* it should remain joinable and hence detachable */
14812         sleep( 1 );
14813
14814         status = pthread_detach( &t );
14815         if( status ) return errno;
14816 #endif
14817
14818 #ifdef HAVE_LINUX_THREADS
14819         pthread_kill_other_threads_np();
14820 #endif
14821
14822         return 0;
14823
14824 }
14825
14826 EOF
14827 if { (eval echo configure:14828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14828 then
14829   ol_cv_pthread_create_works=yes
14830 else
14831   echo "configure: failed program was:" >&5
14832   cat conftest.$ac_ext >&5
14833   rm -fr conftest*
14834   ol_cv_pthread_create_works=no
14835 fi
14836 rm -fr conftest*
14837 fi
14838
14839 fi
14840
14841 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14842
14843                         if test $ol_cv_pthread_create_works = no ; then
14844                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14845                         fi
14846
14847                                                 if test $ol_with_yielding_select = auto ; then
14848                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14849 echo "configure:14850: checking if select yields when using pthreads" >&5
14850 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
14851   echo $ac_n "(cached) $ac_c" 1>&6
14852 else
14853   
14854                                 if test "$cross_compiling" = yes; then
14855   ol_cv_pthread_select_yields=cross
14856 else
14857   cat > conftest.$ac_ext <<EOF
14858 #line 14859 "configure"
14859 #include "confdefs.h"
14860
14861 #include <sys/types.h>
14862 #include <sys/time.h>
14863 #include <unistd.h>
14864 #include <pthread.h>
14865 #ifndef NULL
14866 #define NULL (void*) 0
14867 #endif
14868
14869 static int fildes[2];
14870
14871 static void *task(p)
14872         void *p;
14873 {
14874         int i;
14875         struct timeval tv;
14876
14877         fd_set rfds;
14878
14879         tv.tv_sec=10;
14880         tv.tv_usec=0;
14881
14882         FD_ZERO(&rfds);
14883         FD_SET(fildes[0], &rfds);
14884
14885         /* we're not interested in any fds */
14886         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14887
14888         if(i < 0) {
14889                 perror("select");
14890                 exit(10);
14891         }
14892
14893         exit(0); /* if we exit here, the select blocked the whole process */
14894 }
14895
14896 int main(argc, argv)
14897         int argc;
14898         char **argv;
14899 {
14900         pthread_t t;
14901
14902         /* create a pipe to select */
14903         if(pipe(&fildes[0])) {
14904                 perror("select");
14905                 exit(1);
14906         }
14907
14908 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14909         (void) pthread_setconcurrency(2);
14910 #else
14911 #ifdef HAVE_THR_SETCONCURRENCY
14912         /* Set Solaris LWP concurrency to 2 */
14913         thr_setconcurrency(2);
14914 #endif
14915 #endif
14916
14917 #if HAVE_PTHREADS < 6
14918         pthread_create(&t, pthread_attr_default, task, NULL);
14919 #else
14920         pthread_create(&t, NULL, task, NULL);
14921 #endif
14922
14923         /* make sure task runs first */
14924 #if HAVE_THR_YIELD
14925         thr_yield();
14926 #elif defined( HAVE_SCHED_YIELD )
14927         sched_yield();
14928 #elif defined( HAVE_PTHREAD_YIELD )
14929         pthread_yield();
14930 #endif
14931
14932         exit(2);
14933 }
14934 EOF
14935 if { (eval echo configure:14936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14936 then
14937   ol_cv_pthread_select_yields=no
14938 else
14939   echo "configure: failed program was:" >&5
14940   cat conftest.$ac_ext >&5
14941   rm -fr conftest*
14942   ol_cv_pthread_select_yields=yes
14943 fi
14944 rm -fr conftest*
14945 fi
14946
14947 fi
14948
14949 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
14950
14951                                 if test $ol_cv_pthread_select_yields = cross ; then
14952                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
14953                                 fi
14954
14955                                 if test $ol_cv_pthread_select_yields = yes ; then
14956                                         ol_with_yielding_select=yes
14957                                 fi
14958                         fi
14959
14960                                                 CPPFLAGS="$save_CPPFLAGS"
14961                         LIBS="$save_LIBS"
14962                 else
14963                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
14964                 fi
14965         fi
14966
14967         if test $ol_with_threads = posix ; then
14968                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
14969         fi
14970 fi
14971
14972 if test $ol_with_threads = auto -o $ol_with_threads = yes \
14973         -o $ol_with_threads = mach ; then
14974
14975                 for ac_hdr in mach/cthreads.h cthreads.h
14976 do
14977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14979 echo "configure:14980: checking for $ac_hdr" >&5
14980 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14981   echo $ac_n "(cached) $ac_c" 1>&6
14982 else
14983   cat > conftest.$ac_ext <<EOF
14984 #line 14985 "configure"
14985 #include "confdefs.h"
14986 #include <$ac_hdr>
14987 EOF
14988 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14989 { (eval echo configure:14990: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14990 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14991 if test -z "$ac_err"; then
14992   rm -rf conftest*
14993   eval "ac_cv_header_$ac_safe=yes"
14994 else
14995   echo "$ac_err" >&5
14996   echo "configure: failed program was:" >&5
14997   cat conftest.$ac_ext >&5
14998   rm -rf conftest*
14999   eval "ac_cv_header_$ac_safe=no"
15000 fi
15001 rm -f conftest*
15002 fi
15003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15004   echo "$ac_t""yes" 1>&6
15005     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15006   cat >> confdefs.h <<EOF
15007 #define $ac_tr_hdr 1
15008 EOF
15009  
15010 else
15011   echo "$ac_t""no" 1>&6
15012 fi
15013 done
15014
15015         if test $ac_cv_header_mach_cthreads_h = yes ; then
15016                 ol_with_threads=found
15017
15018                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15019 echo "configure:15020: checking for cthread_fork" >&5
15020 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15021   echo $ac_n "(cached) $ac_c" 1>&6
15022 else
15023   cat > conftest.$ac_ext <<EOF
15024 #line 15025 "configure"
15025 #include "confdefs.h"
15026 /* System header to define __stub macros and hopefully few prototypes,
15027     which can conflict with char cthread_fork(); below.  */
15028 #include <assert.h>
15029 /* Override any gcc2 internal prototype to avoid an error.  */
15030 /* We use char because int might match the return type of a gcc2
15031     builtin and then its argument prototype would still apply.  */
15032 char cthread_fork();
15033 char (*f)();
15034
15035 int main() {
15036
15037 /* The GNU C library defines this for functions which it implements
15038     to always fail with ENOSYS.  Some functions are actually named
15039     something starting with __ and the normal name is an alias.  */
15040 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15041 choke me
15042 #else
15043 f = cthread_fork;
15044 #endif
15045
15046 ; return 0; }
15047 EOF
15048 if { (eval echo configure:15049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15049   rm -rf conftest*
15050   eval "ac_cv_func_cthread_fork=yes"
15051 else
15052   echo "configure: failed program was:" >&5
15053   cat conftest.$ac_ext >&5
15054   rm -rf conftest*
15055   eval "ac_cv_func_cthread_fork=no"
15056 fi
15057 rm -f conftest*
15058 fi
15059
15060 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15061   echo "$ac_t""yes" 1>&6
15062   ol_link_threads=yes
15063 else
15064   echo "$ac_t""no" 1>&6
15065 fi
15066
15067
15068                 if test $ol_link_threads = no ; then
15069                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15070 echo "configure:15071: checking for cthread_fork with -all_load" >&5
15071 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15072   echo $ac_n "(cached) $ac_c" 1>&6
15073 else
15074   
15075                                                                 save_LIBS="$LIBS"
15076                                 LIBS="-all_load $LIBS"
15077                                 cat > conftest.$ac_ext <<EOF
15078 #line 15079 "configure"
15079 #include "confdefs.h"
15080 #include <mach/cthreads.h>
15081 int main() {
15082
15083                                         cthread_fork((void *)0, (void *)0);
15084                                         
15085 ; return 0; }
15086 EOF
15087 if { (eval echo configure:15088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15088   rm -rf conftest*
15089   ol_cv_cthread_all_load=yes
15090 else
15091   echo "configure: failed program was:" >&5
15092   cat conftest.$ac_ext >&5
15093   rm -rf conftest*
15094   ol_cv_cthread_all_load=no
15095 fi
15096 rm -f conftest*
15097                                                                 LIBS="$save_LIBS"
15098                         
15099 fi
15100
15101 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15102
15103                         if test $ol_cv_cthread_all_load = yes ; then
15104                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15105                                 ol_link_threads=mach
15106                                 ol_with_threads=found
15107                         fi
15108                 fi
15109
15110         elif test $ac_cv_header_cthreads_h = yes ; then
15111                                 
15112                 ol_with_threads=found
15113  
15114                                 save_LIBS="$LIBS"
15115                 LIBS="$LIBS -lthreads"
15116                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15117 echo "configure:15118: checking for cthread_fork" >&5
15118 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15119   echo $ac_n "(cached) $ac_c" 1>&6
15120 else
15121   cat > conftest.$ac_ext <<EOF
15122 #line 15123 "configure"
15123 #include "confdefs.h"
15124 /* System header to define __stub macros and hopefully few prototypes,
15125     which can conflict with char cthread_fork(); below.  */
15126 #include <assert.h>
15127 /* Override any gcc2 internal prototype to avoid an error.  */
15128 /* We use char because int might match the return type of a gcc2
15129     builtin and then its argument prototype would still apply.  */
15130 char cthread_fork();
15131 char (*f)();
15132
15133 int main() {
15134
15135 /* The GNU C library defines this for functions which it implements
15136     to always fail with ENOSYS.  Some functions are actually named
15137     something starting with __ and the normal name is an alias.  */
15138 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15139 choke me
15140 #else
15141 f = cthread_fork;
15142 #endif
15143
15144 ; return 0; }
15145 EOF
15146 if { (eval echo configure:15147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15147   rm -rf conftest*
15148   eval "ac_cv_func_cthread_fork=yes"
15149 else
15150   echo "configure: failed program was:" >&5
15151   cat conftest.$ac_ext >&5
15152   rm -rf conftest*
15153   eval "ac_cv_func_cthread_fork=no"
15154 fi
15155 rm -f conftest*
15156 fi
15157
15158 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15159   echo "$ac_t""yes" 1>&6
15160   ol_link_threads=yes
15161 else
15162   echo "$ac_t""no" 1>&6
15163 fi
15164
15165                 LIBS="$save_LIBS"
15166
15167                 if test $ol_link_threads = yes ; then
15168                         LTHREAD_LIBS="-lthreads"
15169                         ol_link_threads=mach
15170                         ol_with_threads=found
15171                 else
15172                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15173                 fi
15174
15175         elif test $ol_with_threads = mach ; then
15176                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15177         fi
15178
15179         if test $ol_link_threads = mach ; then
15180                 cat >> confdefs.h <<\EOF
15181 #define HAVE_MACH_CTHREADS 1
15182 EOF
15183
15184         elif test $ol_with_threads = found ; then
15185                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15186         fi
15187 fi
15188
15189 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15190         -o $ol_with_threads = pth ; then
15191
15192         for ac_hdr in pth.h
15193 do
15194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15196 echo "configure:15197: checking for $ac_hdr" >&5
15197 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15198   echo $ac_n "(cached) $ac_c" 1>&6
15199 else
15200   cat > conftest.$ac_ext <<EOF
15201 #line 15202 "configure"
15202 #include "confdefs.h"
15203 #include <$ac_hdr>
15204 EOF
15205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15206 { (eval echo configure:15207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15208 if test -z "$ac_err"; then
15209   rm -rf conftest*
15210   eval "ac_cv_header_$ac_safe=yes"
15211 else
15212   echo "$ac_err" >&5
15213   echo "configure: failed program was:" >&5
15214   cat conftest.$ac_ext >&5
15215   rm -rf conftest*
15216   eval "ac_cv_header_$ac_safe=no"
15217 fi
15218 rm -f conftest*
15219 fi
15220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15221   echo "$ac_t""yes" 1>&6
15222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15223   cat >> confdefs.h <<EOF
15224 #define $ac_tr_hdr 1
15225 EOF
15226  
15227 else
15228   echo "$ac_t""no" 1>&6
15229 fi
15230 done
15231
15232
15233         if test $ac_cv_header_pth_h = yes ; then
15234                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15235 echo "configure:15236: checking for pth_version in -lpth" >&5
15236 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15238   echo $ac_n "(cached) $ac_c" 1>&6
15239 else
15240   ac_save_LIBS="$LIBS"
15241 LIBS="-lpth  $LIBS"
15242 cat > conftest.$ac_ext <<EOF
15243 #line 15244 "configure"
15244 #include "confdefs.h"
15245 /* Override any gcc2 internal prototype to avoid an error.  */
15246 /* We use char because int might match the return type of a gcc2
15247     builtin and then its argument prototype would still apply.  */
15248 char pth_version();
15249
15250 int main() {
15251 pth_version()
15252 ; return 0; }
15253 EOF
15254 if { (eval echo configure:15255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15255   rm -rf conftest*
15256   eval "ac_cv_lib_$ac_lib_var=yes"
15257 else
15258   echo "configure: failed program was:" >&5
15259   cat conftest.$ac_ext >&5
15260   rm -rf conftest*
15261   eval "ac_cv_lib_$ac_lib_var=no"
15262 fi
15263 rm -f conftest*
15264 LIBS="$ac_save_LIBS"
15265
15266 fi
15267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15268   echo "$ac_t""yes" 1>&6
15269   have_pth=yes
15270 else
15271   echo "$ac_t""no" 1>&6
15272 have_pth=no
15273 fi
15274
15275
15276                 if test $have_pth = yes ; then
15277                         cat >> confdefs.h <<\EOF
15278 #define HAVE_GNU_PTH 1
15279 EOF
15280
15281                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15282                         ol_link_threads=pth
15283                         ol_with_threads=found
15284
15285                         if test $ol_with_yielding_select = auto ; then
15286                                 ol_with_yielding_select=yes
15287                         fi
15288                 fi
15289         fi
15290 fi
15291
15292 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15293         -o $ol_with_threads = lwp ; then
15294
15295                 for ac_hdr in thread.h synch.h
15296 do
15297 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15298 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15299 echo "configure:15300: checking for $ac_hdr" >&5
15300 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15301   echo $ac_n "(cached) $ac_c" 1>&6
15302 else
15303   cat > conftest.$ac_ext <<EOF
15304 #line 15305 "configure"
15305 #include "confdefs.h"
15306 #include <$ac_hdr>
15307 EOF
15308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15309 { (eval echo configure:15310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15311 if test -z "$ac_err"; then
15312   rm -rf conftest*
15313   eval "ac_cv_header_$ac_safe=yes"
15314 else
15315   echo "$ac_err" >&5
15316   echo "configure: failed program was:" >&5
15317   cat conftest.$ac_ext >&5
15318   rm -rf conftest*
15319   eval "ac_cv_header_$ac_safe=no"
15320 fi
15321 rm -f conftest*
15322 fi
15323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15324   echo "$ac_t""yes" 1>&6
15325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15326   cat >> confdefs.h <<EOF
15327 #define $ac_tr_hdr 1
15328 EOF
15329  
15330 else
15331   echo "$ac_t""no" 1>&6
15332 fi
15333 done
15334
15335         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15336                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15337 echo "configure:15338: checking for thr_create in -lthread" >&5
15338 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15339 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15340   echo $ac_n "(cached) $ac_c" 1>&6
15341 else
15342   ac_save_LIBS="$LIBS"
15343 LIBS="-lthread  $LIBS"
15344 cat > conftest.$ac_ext <<EOF
15345 #line 15346 "configure"
15346 #include "confdefs.h"
15347 /* Override any gcc2 internal prototype to avoid an error.  */
15348 /* We use char because int might match the return type of a gcc2
15349     builtin and then its argument prototype would still apply.  */
15350 char thr_create();
15351
15352 int main() {
15353 thr_create()
15354 ; return 0; }
15355 EOF
15356 if { (eval echo configure:15357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15357   rm -rf conftest*
15358   eval "ac_cv_lib_$ac_lib_var=yes"
15359 else
15360   echo "configure: failed program was:" >&5
15361   cat conftest.$ac_ext >&5
15362   rm -rf conftest*
15363   eval "ac_cv_lib_$ac_lib_var=no"
15364 fi
15365 rm -f conftest*
15366 LIBS="$ac_save_LIBS"
15367
15368 fi
15369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15370   echo "$ac_t""yes" 1>&6
15371   have_thr=yes
15372 else
15373   echo "$ac_t""no" 1>&6
15374 have_thr=no
15375 fi
15376
15377
15378                 if test $have_thr = yes ; then
15379                         cat >> confdefs.h <<\EOF
15380 #define HAVE_THR 1
15381 EOF
15382
15383                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15384                         ol_link_threads=thr
15385
15386                         if test $ol_with_yielding_select = auto ; then
15387                                 ol_with_yielding_select=yes
15388                         fi
15389
15390                                                 for ac_func in \
15391                                 thr_setconcurrency \
15392                                 thr_getconcurrency \
15393                         
15394 do
15395 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15396 echo "configure:15397: checking for $ac_func" >&5
15397 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15398   echo $ac_n "(cached) $ac_c" 1>&6
15399 else
15400   cat > conftest.$ac_ext <<EOF
15401 #line 15402 "configure"
15402 #include "confdefs.h"
15403 /* System header to define __stub macros and hopefully few prototypes,
15404     which can conflict with char $ac_func(); below.  */
15405 #include <assert.h>
15406 /* Override any gcc2 internal prototype to avoid an error.  */
15407 /* We use char because int might match the return type of a gcc2
15408     builtin and then its argument prototype would still apply.  */
15409 char $ac_func();
15410 char (*f)();
15411
15412 int main() {
15413
15414 /* The GNU C library defines this for functions which it implements
15415     to always fail with ENOSYS.  Some functions are actually named
15416     something starting with __ and the normal name is an alias.  */
15417 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15418 choke me
15419 #else
15420 f = $ac_func;
15421 #endif
15422
15423 ; return 0; }
15424 EOF
15425 if { (eval echo configure:15426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15426   rm -rf conftest*
15427   eval "ac_cv_func_$ac_func=yes"
15428 else
15429   echo "configure: failed program was:" >&5
15430   cat conftest.$ac_ext >&5
15431   rm -rf conftest*
15432   eval "ac_cv_func_$ac_func=no"
15433 fi
15434 rm -f conftest*
15435 fi
15436
15437 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15438   echo "$ac_t""yes" 1>&6
15439     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15440   cat >> confdefs.h <<EOF
15441 #define $ac_tr_func 1
15442 EOF
15443  
15444 else
15445   echo "$ac_t""no" 1>&6
15446 fi
15447 done
15448
15449                 fi
15450         fi
15451
15452                 for ac_hdr in lwp/lwp.h
15453 do
15454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15456 echo "configure:15457: checking for $ac_hdr" >&5
15457 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15458   echo $ac_n "(cached) $ac_c" 1>&6
15459 else
15460   cat > conftest.$ac_ext <<EOF
15461 #line 15462 "configure"
15462 #include "confdefs.h"
15463 #include <$ac_hdr>
15464 EOF
15465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15466 { (eval echo configure:15467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15468 if test -z "$ac_err"; then
15469   rm -rf conftest*
15470   eval "ac_cv_header_$ac_safe=yes"
15471 else
15472   echo "$ac_err" >&5
15473   echo "configure: failed program was:" >&5
15474   cat conftest.$ac_ext >&5
15475   rm -rf conftest*
15476   eval "ac_cv_header_$ac_safe=no"
15477 fi
15478 rm -f conftest*
15479 fi
15480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15481   echo "$ac_t""yes" 1>&6
15482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15483   cat >> confdefs.h <<EOF
15484 #define $ac_tr_hdr 1
15485 EOF
15486  
15487 else
15488   echo "$ac_t""no" 1>&6
15489 fi
15490 done
15491
15492         if test $ac_cv_header_lwp_lwp_h = yes ; then
15493                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15494 echo "configure:15495: checking for lwp_create in -llwp" >&5
15495 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15496 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15497   echo $ac_n "(cached) $ac_c" 1>&6
15498 else
15499   ac_save_LIBS="$LIBS"
15500 LIBS="-llwp  $LIBS"
15501 cat > conftest.$ac_ext <<EOF
15502 #line 15503 "configure"
15503 #include "confdefs.h"
15504 /* Override any gcc2 internal prototype to avoid an error.  */
15505 /* We use char because int might match the return type of a gcc2
15506     builtin and then its argument prototype would still apply.  */
15507 char lwp_create();
15508
15509 int main() {
15510 lwp_create()
15511 ; return 0; }
15512 EOF
15513 if { (eval echo configure:15514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15514   rm -rf conftest*
15515   eval "ac_cv_lib_$ac_lib_var=yes"
15516 else
15517   echo "configure: failed program was:" >&5
15518   cat conftest.$ac_ext >&5
15519   rm -rf conftest*
15520   eval "ac_cv_lib_$ac_lib_var=no"
15521 fi
15522 rm -f conftest*
15523 LIBS="$ac_save_LIBS"
15524
15525 fi
15526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15527   echo "$ac_t""yes" 1>&6
15528   have_lwp=yes
15529 else
15530   echo "$ac_t""no" 1>&6
15531 have_lwp=no
15532 fi
15533
15534
15535                 if test $have_lwp = yes ; then
15536                         cat >> confdefs.h <<\EOF
15537 #define HAVE_LWP 1
15538 EOF
15539
15540                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15541                         ol_link_threads=lwp
15542
15543                         if test $ol_with_yielding_select = auto ; then
15544                                 ol_with_yielding_select=no
15545                         fi
15546                 fi
15547         fi
15548 fi
15549
15550 if test $ol_with_yielding_select = yes ; then
15551         cat >> confdefs.h <<\EOF
15552 #define HAVE_YIELDING_SELECT 1
15553 EOF
15554
15555 fi
15556
15557 if test $ol_with_threads = manual ; then
15558                 ol_link_threads=yes
15559
15560         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15561
15562         for ac_hdr in pthread.h sched.h
15563 do
15564 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15565 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15566 echo "configure:15567: checking for $ac_hdr" >&5
15567 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15568   echo $ac_n "(cached) $ac_c" 1>&6
15569 else
15570   cat > conftest.$ac_ext <<EOF
15571 #line 15572 "configure"
15572 #include "confdefs.h"
15573 #include <$ac_hdr>
15574 EOF
15575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15576 { (eval echo configure:15577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15578 if test -z "$ac_err"; then
15579   rm -rf conftest*
15580   eval "ac_cv_header_$ac_safe=yes"
15581 else
15582   echo "$ac_err" >&5
15583   echo "configure: failed program was:" >&5
15584   cat conftest.$ac_ext >&5
15585   rm -rf conftest*
15586   eval "ac_cv_header_$ac_safe=no"
15587 fi
15588 rm -f conftest*
15589 fi
15590 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15591   echo "$ac_t""yes" 1>&6
15592     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15593   cat >> confdefs.h <<EOF
15594 #define $ac_tr_hdr 1
15595 EOF
15596  
15597 else
15598   echo "$ac_t""no" 1>&6
15599 fi
15600 done
15601
15602         for ac_func in sched_yield pthread_yield
15603 do
15604 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15605 echo "configure:15606: checking for $ac_func" >&5
15606 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15607   echo $ac_n "(cached) $ac_c" 1>&6
15608 else
15609   cat > conftest.$ac_ext <<EOF
15610 #line 15611 "configure"
15611 #include "confdefs.h"
15612 /* System header to define __stub macros and hopefully few prototypes,
15613     which can conflict with char $ac_func(); below.  */
15614 #include <assert.h>
15615 /* Override any gcc2 internal prototype to avoid an error.  */
15616 /* We use char because int might match the return type of a gcc2
15617     builtin and then its argument prototype would still apply.  */
15618 char $ac_func();
15619 char (*f)();
15620
15621 int main() {
15622
15623 /* The GNU C library defines this for functions which it implements
15624     to always fail with ENOSYS.  Some functions are actually named
15625     something starting with __ and the normal name is an alias.  */
15626 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15627 choke me
15628 #else
15629 f = $ac_func;
15630 #endif
15631
15632 ; return 0; }
15633 EOF
15634 if { (eval echo configure:15635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15635   rm -rf conftest*
15636   eval "ac_cv_func_$ac_func=yes"
15637 else
15638   echo "configure: failed program was:" >&5
15639   cat conftest.$ac_ext >&5
15640   rm -rf conftest*
15641   eval "ac_cv_func_$ac_func=no"
15642 fi
15643 rm -f conftest*
15644 fi
15645
15646 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15647   echo "$ac_t""yes" 1>&6
15648     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15649   cat >> confdefs.h <<EOF
15650 #define $ac_tr_func 1
15651 EOF
15652  
15653 else
15654   echo "$ac_t""no" 1>&6
15655 fi
15656 done
15657
15658         
15659         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15660 echo "configure:15661: checking for LinuxThreads pthread.h" >&5
15661 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15662   echo $ac_n "(cached) $ac_c" 1>&6
15663 else
15664   cat > conftest.$ac_ext <<EOF
15665 #line 15666 "configure"
15666 #include "confdefs.h"
15667 #include <pthread.h>
15668 EOF
15669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15670   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15671   rm -rf conftest*
15672   ol_cv_header_linux_threads=yes
15673 else
15674   rm -rf conftest*
15675   ol_cv_header_linux_threads=no
15676 fi
15677 rm -f conftest*
15678
15679                 
15680 fi
15681
15682 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15683         if test $ol_cv_header_linux_threads = yes; then
15684                 cat >> confdefs.h <<\EOF
15685 #define HAVE_LINUX_THREADS 1
15686 EOF
15687
15688         fi
15689
15690
15691         for ac_hdr in mach/cthreads.h
15692 do
15693 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15694 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15695 echo "configure:15696: checking for $ac_hdr" >&5
15696 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15697   echo $ac_n "(cached) $ac_c" 1>&6
15698 else
15699   cat > conftest.$ac_ext <<EOF
15700 #line 15701 "configure"
15701 #include "confdefs.h"
15702 #include <$ac_hdr>
15703 EOF
15704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15705 { (eval echo configure:15706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15707 if test -z "$ac_err"; then
15708   rm -rf conftest*
15709   eval "ac_cv_header_$ac_safe=yes"
15710 else
15711   echo "$ac_err" >&5
15712   echo "configure: failed program was:" >&5
15713   cat conftest.$ac_ext >&5
15714   rm -rf conftest*
15715   eval "ac_cv_header_$ac_safe=no"
15716 fi
15717 rm -f conftest*
15718 fi
15719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15720   echo "$ac_t""yes" 1>&6
15721     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15722   cat >> confdefs.h <<EOF
15723 #define $ac_tr_hdr 1
15724 EOF
15725  
15726 else
15727   echo "$ac_t""no" 1>&6
15728 fi
15729 done
15730
15731         for ac_hdr in lwp/lwp.h
15732 do
15733 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15734 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15735 echo "configure:15736: checking for $ac_hdr" >&5
15736 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15737   echo $ac_n "(cached) $ac_c" 1>&6
15738 else
15739   cat > conftest.$ac_ext <<EOF
15740 #line 15741 "configure"
15741 #include "confdefs.h"
15742 #include <$ac_hdr>
15743 EOF
15744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15745 { (eval echo configure:15746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15747 if test -z "$ac_err"; then
15748   rm -rf conftest*
15749   eval "ac_cv_header_$ac_safe=yes"
15750 else
15751   echo "$ac_err" >&5
15752   echo "configure: failed program was:" >&5
15753   cat conftest.$ac_ext >&5
15754   rm -rf conftest*
15755   eval "ac_cv_header_$ac_safe=no"
15756 fi
15757 rm -f conftest*
15758 fi
15759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15760   echo "$ac_t""yes" 1>&6
15761     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15762   cat >> confdefs.h <<EOF
15763 #define $ac_tr_hdr 1
15764 EOF
15765  
15766 else
15767   echo "$ac_t""no" 1>&6
15768 fi
15769 done
15770
15771         for ac_hdr in thread.h synch.h
15772 do
15773 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15774 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15775 echo "configure:15776: checking for $ac_hdr" >&5
15776 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15777   echo $ac_n "(cached) $ac_c" 1>&6
15778 else
15779   cat > conftest.$ac_ext <<EOF
15780 #line 15781 "configure"
15781 #include "confdefs.h"
15782 #include <$ac_hdr>
15783 EOF
15784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15785 { (eval echo configure:15786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15787 if test -z "$ac_err"; then
15788   rm -rf conftest*
15789   eval "ac_cv_header_$ac_safe=yes"
15790 else
15791   echo "$ac_err" >&5
15792   echo "configure: failed program was:" >&5
15793   cat conftest.$ac_ext >&5
15794   rm -rf conftest*
15795   eval "ac_cv_header_$ac_safe=no"
15796 fi
15797 rm -f conftest*
15798 fi
15799 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15800   echo "$ac_t""yes" 1>&6
15801     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15802   cat >> confdefs.h <<EOF
15803 #define $ac_tr_hdr 1
15804 EOF
15805  
15806 else
15807   echo "$ac_t""no" 1>&6
15808 fi
15809 done
15810
15811 fi
15812
15813 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15814                         cat >> confdefs.h <<\EOF
15815 #define REENTRANT 1
15816 EOF
15817
15818         cat >> confdefs.h <<\EOF
15819 #define _REENTRANT 1
15820 EOF
15821
15822         cat >> confdefs.h <<\EOF
15823 #define THREAD_SAFE 1
15824 EOF
15825
15826         cat >> confdefs.h <<\EOF
15827 #define _THREAD_SAFE 1
15828 EOF
15829
15830         cat >> confdefs.h <<\EOF
15831 #define THREADSAFE 1
15832 EOF
15833
15834         cat >> confdefs.h <<\EOF
15835 #define _THREADSAFE 1
15836 EOF
15837
15838         cat >> confdefs.h <<\EOF
15839 #define _SGI_MP_SOURCE 1
15840 EOF
15841
15842
15843                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15844 echo "configure:15845: checking for thread specific errno" >&5
15845 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15846   echo $ac_n "(cached) $ac_c" 1>&6
15847 else
15848   
15849                 cat > conftest.$ac_ext <<EOF
15850 #line 15851 "configure"
15851 #include "confdefs.h"
15852 #include <errno.h>
15853 int main() {
15854 errno = 0;
15855 ; return 0; }
15856 EOF
15857 if { (eval echo configure:15858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15858   rm -rf conftest*
15859   ol_cv_errno_thread_specific=yes
15860 else
15861   echo "configure: failed program was:" >&5
15862   cat conftest.$ac_ext >&5
15863   rm -rf conftest*
15864   ol_cv_errno_thread_specific=no
15865 fi
15866 rm -f conftest*
15867         
15868 fi
15869
15870 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15871
15872                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15873 echo "configure:15874: checking for thread specific h_errno" >&5
15874 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15875   echo $ac_n "(cached) $ac_c" 1>&6
15876 else
15877   
15878                 cat > conftest.$ac_ext <<EOF
15879 #line 15880 "configure"
15880 #include "confdefs.h"
15881 #include <netdb.h>
15882 int main() {
15883 h_errno = 0;
15884 ; return 0; }
15885 EOF
15886 if { (eval echo configure:15887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15887   rm -rf conftest*
15888   ol_cv_h_errno_thread_specific=yes
15889 else
15890   echo "configure: failed program was:" >&5
15891   cat conftest.$ac_ext >&5
15892   rm -rf conftest*
15893   ol_cv_h_errno_thread_specific=no
15894 fi
15895 rm -f conftest*
15896         
15897 fi
15898
15899 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15900
15901         if test $ol_cv_errno_thread_specific != yes \
15902                 -o $ol_cv_h_errno_thread_specific != yes ; then
15903                 LIBS="$LTHREAD_LIBS $LIBS"
15904                 LTHREAD_LIBS=""
15905         fi
15906
15907 fi  
15908
15909 if test $ol_link_threads = no ; then
15910         if test $ol_with_threads = yes ; then
15911                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15912         fi
15913
15914         if test $ol_with_threads = auto ; then
15915                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15916                 ol_with_threads=no
15917         fi
15918
15919         cat >> confdefs.h <<\EOF
15920 #define NO_THREADS 1
15921 EOF
15922
15923         LTHREAD_LIBS=""
15924 fi
15925
15926 if test $ol_link_threads != no ; then
15927         cat >> confdefs.h <<\EOF
15928 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
15929 EOF
15930
15931 fi
15932
15933 for ac_func in \
15934         ctime_r                 \
15935         gethostbyname_r gethostbyaddr_r \
15936
15937 do
15938 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15939 echo "configure:15940: checking for $ac_func" >&5
15940 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15941   echo $ac_n "(cached) $ac_c" 1>&6
15942 else
15943   cat > conftest.$ac_ext <<EOF
15944 #line 15945 "configure"
15945 #include "confdefs.h"
15946 /* System header to define __stub macros and hopefully few prototypes,
15947     which can conflict with char $ac_func(); below.  */
15948 #include <assert.h>
15949 /* Override any gcc2 internal prototype to avoid an error.  */
15950 /* We use char because int might match the return type of a gcc2
15951     builtin and then its argument prototype would still apply.  */
15952 char $ac_func();
15953 char (*f)();
15954
15955 int main() {
15956
15957 /* The GNU C library defines this for functions which it implements
15958     to always fail with ENOSYS.  Some functions are actually named
15959     something starting with __ and the normal name is an alias.  */
15960 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15961 choke me
15962 #else
15963 f = $ac_func;
15964 #endif
15965
15966 ; return 0; }
15967 EOF
15968 if { (eval echo configure:15969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15969   rm -rf conftest*
15970   eval "ac_cv_func_$ac_func=yes"
15971 else
15972   echo "configure: failed program was:" >&5
15973   cat conftest.$ac_ext >&5
15974   rm -rf conftest*
15975   eval "ac_cv_func_$ac_func=no"
15976 fi
15977 rm -f conftest*
15978 fi
15979
15980 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15981   echo "$ac_t""yes" 1>&6
15982     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15983   cat >> confdefs.h <<EOF
15984 #define $ac_tr_func 1
15985 EOF
15986  
15987 else
15988   echo "$ac_t""no" 1>&6
15989 fi
15990 done
15991
15992
15993 if test "$ac_cv_func_ctime_r" = no ; then
15994         ol_cv_func_ctime_r_nargs=0
15995 else
15996         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
15997 echo "configure:15998: checking number of arguments of ctime_r" >&5
15998 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
15999   echo $ac_n "(cached) $ac_c" 1>&6
16000 else
16001   cat > conftest.$ac_ext <<EOF
16002 #line 16003 "configure"
16003 #include "confdefs.h"
16004 #include <time.h>
16005 int main() {
16006 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16007 ; return 0; }
16008 EOF
16009 if { (eval echo configure:16010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16010   rm -rf conftest*
16011   ol_cv_func_ctime_r_nargs3=yes
16012 else
16013   echo "configure: failed program was:" >&5
16014   cat conftest.$ac_ext >&5
16015   rm -rf conftest*
16016   ol_cv_func_ctime_r_nargs3=no
16017 fi
16018 rm -f conftest*
16019
16020         cat > conftest.$ac_ext <<EOF
16021 #line 16022 "configure"
16022 #include "confdefs.h"
16023 #include <time.h>
16024 int main() {
16025 time_t ti; char *buffer; ctime_r(&ti,buffer);
16026 ; return 0; }
16027 EOF
16028 if { (eval echo configure:16029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16029   rm -rf conftest*
16030   ol_cv_func_ctime_r_nargs2=yes
16031 else
16032   echo "configure: failed program was:" >&5
16033   cat conftest.$ac_ext >&5
16034   rm -rf conftest*
16035   ol_cv_func_ctime_r_nargs2=no
16036 fi
16037 rm -f conftest*
16038
16039         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16040                 $ol_cv_func_ctime_r_nargs2 = no ; then
16041
16042                 ol_cv_func_ctime_r_nargs=3
16043
16044         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16045                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16046
16047                 ol_cv_func_ctime_r_nargs=2
16048
16049         else
16050                 ol_cv_func_ctime_r_nargs=0
16051         fi
16052   
16053 fi
16054
16055 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16056
16057   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16058         cat >> confdefs.h <<EOF
16059 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16060 EOF
16061
16062   fi
16063
16064 fi
16065
16066 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16067         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16068 echo "configure:16069: checking number of arguments of gethostbyname_r" >&5
16069 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16070   echo $ac_n "(cached) $ac_c" 1>&6
16071 else
16072   cat > conftest.$ac_ext <<EOF
16073 #line 16074 "configure"
16074 #include "confdefs.h"
16075 #include <sys/types.h>
16076 #include <sys/socket.h>
16077 #include <netinet/in.h>
16078 #include <netdb.h>
16079 #define BUFSIZE (sizeof(struct hostent)+10)
16080 int main() {
16081 struct hostent hent; char buffer[BUFSIZE];
16082                 int bufsize=BUFSIZE;int h_errno;
16083                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16084                         buffer, bufsize, &h_errno);
16085 ; return 0; }
16086 EOF
16087 if { (eval echo configure:16088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16088   rm -rf conftest*
16089   ol_cv_func_gethostbyname_r_nargs5=yes
16090 else
16091   echo "configure: failed program was:" >&5
16092   cat conftest.$ac_ext >&5
16093   rm -rf conftest*
16094   ol_cv_func_gethostbyname_r_nargs5=no
16095 fi
16096 rm -f conftest*
16097
16098         cat > conftest.$ac_ext <<EOF
16099 #line 16100 "configure"
16100 #include "confdefs.h"
16101 #include <sys/types.h>
16102 #include <sys/socket.h>
16103 #include <netinet/in.h>
16104 #include <netdb.h>
16105 #define BUFSIZE (sizeof(struct hostent)+10)
16106 int main() {
16107 struct hostent hent;struct hostent *rhent;
16108                 char buffer[BUFSIZE];
16109                 int bufsize=BUFSIZE;int h_errno;
16110                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16111                         &rhent, &h_errno);
16112 ; return 0; }
16113 EOF
16114 if { (eval echo configure:16115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16115   rm -rf conftest*
16116   ol_cv_func_gethostbyname_r_nargs6=yes
16117 else
16118   echo "configure: failed program was:" >&5
16119   cat conftest.$ac_ext >&5
16120   rm -rf conftest*
16121   ol_cv_func_gethostbyname_r_nargs6=no
16122 fi
16123 rm -f conftest*
16124
16125         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16126                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16127
16128                 ol_cv_func_gethostbyname_r_nargs=5
16129
16130         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16131                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16132
16133                 ol_cv_func_gethostbyname_r_nargs=6
16134
16135         else
16136                 ol_cv_func_gethostbyname_r_nargs=0
16137         fi
16138   
16139 fi
16140
16141 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16142   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16143         cat >> confdefs.h <<EOF
16144 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16145 EOF
16146
16147   fi
16148
16149 else
16150         ol_cv_func_gethostbyname_r_nargs=0
16151 fi
16152  
16153 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16154         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16155 echo "configure:16156: checking number of arguments of gethostbyaddr_r" >&5
16156 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16157   echo $ac_n "(cached) $ac_c" 1>&6
16158 else
16159   cat > conftest.$ac_ext <<EOF
16160 #line 16161 "configure"
16161 #include "confdefs.h"
16162 #include <sys/types.h>
16163 #include <sys/socket.h>
16164 #include <netinet/in.h>
16165 #include <netdb.h>
16166 #define BUFSIZE (sizeof(struct hostent)+10)
16167 int main() {
16168 struct hostent hent; char buffer[BUFSIZE]; 
16169             struct in_addr add;
16170             size_t alen=sizeof(struct in_addr);
16171             int bufsize=BUFSIZE;int h_errno;
16172                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16173                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16174 ; return 0; }
16175 EOF
16176 if { (eval echo configure:16177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16177   rm -rf conftest*
16178   ol_cv_func_gethostbyaddr_r_nargs7=yes
16179 else
16180   echo "configure: failed program was:" >&5
16181   cat conftest.$ac_ext >&5
16182   rm -rf conftest*
16183   ol_cv_func_gethostbyaddr_r_nargs7=no
16184 fi
16185 rm -f conftest*
16186
16187         cat > conftest.$ac_ext <<EOF
16188 #line 16189 "configure"
16189 #include "confdefs.h"
16190 #include <sys/types.h>
16191 #include <sys/socket.h>
16192 #include <netinet/in.h>
16193 #include <netdb.h>
16194 #define BUFSIZE (sizeof(struct hostent)+10)
16195 int main() {
16196 struct hostent hent;
16197                 struct hostent *rhent; char buffer[BUFSIZE]; 
16198                 struct in_addr add;
16199                 size_t alen=sizeof(struct in_addr);
16200                 int bufsize=BUFSIZE;int h_errno;
16201                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16202                         alen, AF_INET, &hent, buffer, bufsize, 
16203                         &rhent, &h_errno);
16204 ; return 0; }
16205 EOF
16206 if { (eval echo configure:16207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16207   rm -rf conftest*
16208   ol_cv_func_gethostbyaddr_r_nargs8=yes
16209 else
16210   echo "configure: failed program was:" >&5
16211   cat conftest.$ac_ext >&5
16212   rm -rf conftest*
16213   ol_cv_func_gethostbyaddr_r_nargs8=no
16214 fi
16215 rm -f conftest*
16216
16217         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16218                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16219
16220                 ol_cv_func_gethostbyaddr_r_nargs=7
16221
16222         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16223                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16224
16225                 ol_cv_func_gethostbyaddr_r_nargs=8
16226
16227         else
16228                 ol_cv_func_gethostbyaddr_r_nargs=0
16229         fi
16230   
16231 fi
16232
16233 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16234   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16235     cat >> confdefs.h <<EOF
16236 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16237 EOF
16238
16239   fi
16240
16241 else
16242         ol_cv_func_gethostbyaddr_r_nargs=0
16243 fi
16244
16245 ol_link_ldbm=no 
16246
16247 if test $ol_with_ldbm_api = auto \
16248         -o $ol_with_ldbm_api = berkeley \
16249         -o $ol_with_ldbm_api = bcompat ; then
16250
16251         if test $ol_with_ldbm_api = bcompat; then \
16252                 for ac_hdr in db_185.h db.h
16253 do
16254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16256 echo "configure:16257: checking for $ac_hdr" >&5
16257 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16258   echo $ac_n "(cached) $ac_c" 1>&6
16259 else
16260   cat > conftest.$ac_ext <<EOF
16261 #line 16262 "configure"
16262 #include "confdefs.h"
16263 #include <$ac_hdr>
16264 EOF
16265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16266 { (eval echo configure:16267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16268 if test -z "$ac_err"; then
16269   rm -rf conftest*
16270   eval "ac_cv_header_$ac_safe=yes"
16271 else
16272   echo "$ac_err" >&5
16273   echo "configure: failed program was:" >&5
16274   cat conftest.$ac_ext >&5
16275   rm -rf conftest*
16276   eval "ac_cv_header_$ac_safe=no"
16277 fi
16278 rm -f conftest*
16279 fi
16280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16281   echo "$ac_t""yes" 1>&6
16282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16283   cat >> confdefs.h <<EOF
16284 #define $ac_tr_hdr 1
16285 EOF
16286  
16287 else
16288   echo "$ac_t""no" 1>&6
16289 fi
16290 done
16291
16292 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16293         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16294 echo "configure:16295: checking if Berkeley DB header compatibility" >&5
16295 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16296   echo $ac_n "(cached) $ac_c" 1>&6
16297 else
16298   
16299                 cat > conftest.$ac_ext <<EOF
16300 #line 16301 "configure"
16301 #include "confdefs.h"
16302
16303 #if HAVE_DB_185_H
16304 #       include <db_185.h>
16305 #else
16306 #       include <db.h>
16307 #endif
16308
16309  /* this check could be improved */
16310 #ifndef DB_VERSION_MAJOR
16311 #       define DB_VERSION_MAJOR 1
16312 #endif
16313
16314 #if DB_VERSION_MAJOR == 1 
16315         __db_version_1
16316 #endif
16317
16318 EOF
16319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16320   egrep "__db_version_1" >/dev/null 2>&1; then
16321   rm -rf conftest*
16322   ol_cv_header_db1=yes
16323 else
16324   rm -rf conftest*
16325   ol_cv_header_db1=no
16326 fi
16327 rm -f conftest*
16328
16329 fi
16330
16331 echo "$ac_t""$ol_cv_header_db1" 1>&6
16332
16333         if test $ol_cv_header_db1 = yes ; then
16334                 ol_cv_lib_db=no
16335 if test $ol_cv_lib_db = no ; then
16336         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16337 echo "configure:16338: checking for Berkeley DB link (default)" >&5
16338 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16339   echo $ac_n "(cached) $ac_c" 1>&6
16340 else
16341   
16342         ol_DB_LIB=
16343         ol_LIBS=$LIBS
16344         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16345
16346         cat > conftest.$ac_ext <<EOF
16347 #line 16348 "configure"
16348 #include "confdefs.h"
16349
16350 #ifdef HAVE_DB_185_H
16351 # include <db_185.h>
16352 #else
16353 # include <db.h>
16354 #endif
16355
16356 #ifndef DB_VERSION_MAJOR
16357 # define DB_VERSION_MAJOR 1
16358 #endif
16359
16360 #ifndef NULL
16361 #define NULL ((void*)0)
16362 #endif
16363
16364 int main() {
16365
16366 #if DB_VERSION_MAJOR > 1
16367         {
16368                 char *version;
16369                 int major, minor, patch;
16370
16371                 version = db_version( &major, &minor, &patch );
16372
16373                 if( major != DB_VERSION_MAJOR ||
16374                         minor < DB_VERSION_MINOR )
16375                 {
16376                         printf("Berkeley DB version mismatch\n"
16377                                 "\texpected: %s\n\tgot: %s\n",
16378                                 DB_VERSION_STRING, version);
16379                         return 1;
16380                 }
16381         }
16382 #endif
16383
16384 #if DB_VERSION_MAJOR > 2
16385         db_env_create( NULL, 0 );
16386 #elif DB_VERSION_MAJOR > 1
16387         db_appexit( NULL );
16388 #else
16389         (void) dbopen( NULL, 0, 0, 0, NULL);
16390 #endif
16391
16392 ; return 0; }
16393 EOF
16394 if { (eval echo configure:16395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16395   rm -rf conftest*
16396   ol_cv_db_none=yes
16397 else
16398   echo "configure: failed program was:" >&5
16399   cat conftest.$ac_ext >&5
16400   rm -rf conftest*
16401   ol_cv_db_none=no
16402 fi
16403 rm -f conftest*
16404
16405         LIBS="$ol_LIBS"
16406
16407 fi
16408
16409 echo "$ac_t""$ol_cv_db_none" 1>&6
16410
16411         if test $ol_cv_db_none = yes ; then
16412                 ol_cv_lib_db=yes
16413         fi
16414 fi
16415
16416 if test $ol_cv_lib_db = no ; then
16417         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16418 echo "configure:16419: checking for Berkeley DB link (-ldb42)" >&5
16419 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16420   echo $ac_n "(cached) $ac_c" 1>&6
16421 else
16422   
16423         ol_DB_LIB=-ldb42
16424         ol_LIBS=$LIBS
16425         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16426
16427         cat > conftest.$ac_ext <<EOF
16428 #line 16429 "configure"
16429 #include "confdefs.h"
16430
16431 #ifdef HAVE_DB_185_H
16432 # include <db_185.h>
16433 #else
16434 # include <db.h>
16435 #endif
16436
16437 #ifndef DB_VERSION_MAJOR
16438 # define DB_VERSION_MAJOR 1
16439 #endif
16440
16441 #ifndef NULL
16442 #define NULL ((void*)0)
16443 #endif
16444
16445 int main() {
16446
16447 #if DB_VERSION_MAJOR > 1
16448         {
16449                 char *version;
16450                 int major, minor, patch;
16451
16452                 version = db_version( &major, &minor, &patch );
16453
16454                 if( major != DB_VERSION_MAJOR ||
16455                         minor < DB_VERSION_MINOR )
16456                 {
16457                         printf("Berkeley DB version mismatch\n"
16458                                 "\texpected: %s\n\tgot: %s\n",
16459                                 DB_VERSION_STRING, version);
16460                         return 1;
16461                 }
16462         }
16463 #endif
16464
16465 #if DB_VERSION_MAJOR > 2
16466         db_env_create( NULL, 0 );
16467 #elif DB_VERSION_MAJOR > 1
16468         db_appexit( NULL );
16469 #else
16470         (void) dbopen( NULL, 0, 0, 0, NULL);
16471 #endif
16472
16473 ; return 0; }
16474 EOF
16475 if { (eval echo configure:16476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16476   rm -rf conftest*
16477   ol_cv_db_db42=yes
16478 else
16479   echo "configure: failed program was:" >&5
16480   cat conftest.$ac_ext >&5
16481   rm -rf conftest*
16482   ol_cv_db_db42=no
16483 fi
16484 rm -f conftest*
16485
16486         LIBS="$ol_LIBS"
16487
16488 fi
16489
16490 echo "$ac_t""$ol_cv_db_db42" 1>&6
16491
16492         if test $ol_cv_db_db42 = yes ; then
16493                 ol_cv_lib_db=-ldb42
16494         fi
16495 fi
16496
16497 if test $ol_cv_lib_db = no ; then
16498         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16499 echo "configure:16500: checking for Berkeley DB link (-ldb-42)" >&5
16500 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16501   echo $ac_n "(cached) $ac_c" 1>&6
16502 else
16503   
16504         ol_DB_LIB=-ldb-42
16505         ol_LIBS=$LIBS
16506         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16507
16508         cat > conftest.$ac_ext <<EOF
16509 #line 16510 "configure"
16510 #include "confdefs.h"
16511
16512 #ifdef HAVE_DB_185_H
16513 # include <db_185.h>
16514 #else
16515 # include <db.h>
16516 #endif
16517
16518 #ifndef DB_VERSION_MAJOR
16519 # define DB_VERSION_MAJOR 1
16520 #endif
16521
16522 #ifndef NULL
16523 #define NULL ((void*)0)
16524 #endif
16525
16526 int main() {
16527
16528 #if DB_VERSION_MAJOR > 1
16529         {
16530                 char *version;
16531                 int major, minor, patch;
16532
16533                 version = db_version( &major, &minor, &patch );
16534
16535                 if( major != DB_VERSION_MAJOR ||
16536                         minor < DB_VERSION_MINOR )
16537                 {
16538                         printf("Berkeley DB version mismatch\n"
16539                                 "\texpected: %s\n\tgot: %s\n",
16540                                 DB_VERSION_STRING, version);
16541                         return 1;
16542                 }
16543         }
16544 #endif
16545
16546 #if DB_VERSION_MAJOR > 2
16547         db_env_create( NULL, 0 );
16548 #elif DB_VERSION_MAJOR > 1
16549         db_appexit( NULL );
16550 #else
16551         (void) dbopen( NULL, 0, 0, 0, NULL);
16552 #endif
16553
16554 ; return 0; }
16555 EOF
16556 if { (eval echo configure:16557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16557   rm -rf conftest*
16558   ol_cv_db_db_42=yes
16559 else
16560   echo "configure: failed program was:" >&5
16561   cat conftest.$ac_ext >&5
16562   rm -rf conftest*
16563   ol_cv_db_db_42=no
16564 fi
16565 rm -f conftest*
16566
16567         LIBS="$ol_LIBS"
16568
16569 fi
16570
16571 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16572
16573         if test $ol_cv_db_db_42 = yes ; then
16574                 ol_cv_lib_db=-ldb-42
16575         fi
16576 fi
16577
16578 if test $ol_cv_lib_db = no ; then
16579         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16580 echo "configure:16581: checking for Berkeley DB link (-ldb-4.2)" >&5
16581 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16582   echo $ac_n "(cached) $ac_c" 1>&6
16583 else
16584   
16585         ol_DB_LIB=-ldb-4.2
16586         ol_LIBS=$LIBS
16587         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16588
16589         cat > conftest.$ac_ext <<EOF
16590 #line 16591 "configure"
16591 #include "confdefs.h"
16592
16593 #ifdef HAVE_DB_185_H
16594 # include <db_185.h>
16595 #else
16596 # include <db.h>
16597 #endif
16598
16599 #ifndef DB_VERSION_MAJOR
16600 # define DB_VERSION_MAJOR 1
16601 #endif
16602
16603 #ifndef NULL
16604 #define NULL ((void*)0)
16605 #endif
16606
16607 int main() {
16608
16609 #if DB_VERSION_MAJOR > 1
16610         {
16611                 char *version;
16612                 int major, minor, patch;
16613
16614                 version = db_version( &major, &minor, &patch );
16615
16616                 if( major != DB_VERSION_MAJOR ||
16617                         minor < DB_VERSION_MINOR )
16618                 {
16619                         printf("Berkeley DB version mismatch\n"
16620                                 "\texpected: %s\n\tgot: %s\n",
16621                                 DB_VERSION_STRING, version);
16622                         return 1;
16623                 }
16624         }
16625 #endif
16626
16627 #if DB_VERSION_MAJOR > 2
16628         db_env_create( NULL, 0 );
16629 #elif DB_VERSION_MAJOR > 1
16630         db_appexit( NULL );
16631 #else
16632         (void) dbopen( NULL, 0, 0, 0, NULL);
16633 #endif
16634
16635 ; return 0; }
16636 EOF
16637 if { (eval echo configure:16638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16638   rm -rf conftest*
16639   ol_cv_db_db_4_dot_2=yes
16640 else
16641   echo "configure: failed program was:" >&5
16642   cat conftest.$ac_ext >&5
16643   rm -rf conftest*
16644   ol_cv_db_db_4_dot_2=no
16645 fi
16646 rm -f conftest*
16647
16648         LIBS="$ol_LIBS"
16649
16650 fi
16651
16652 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16653
16654         if test $ol_cv_db_db_4_dot_2 = yes ; then
16655                 ol_cv_lib_db=-ldb-4.2
16656         fi
16657 fi
16658
16659 if test $ol_cv_lib_db = no ; then
16660         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16661 echo "configure:16662: checking for Berkeley DB link (-ldb-4-2)" >&5
16662 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16663   echo $ac_n "(cached) $ac_c" 1>&6
16664 else
16665   
16666         ol_DB_LIB=-ldb-4-2
16667         ol_LIBS=$LIBS
16668         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16669
16670         cat > conftest.$ac_ext <<EOF
16671 #line 16672 "configure"
16672 #include "confdefs.h"
16673
16674 #ifdef HAVE_DB_185_H
16675 # include <db_185.h>
16676 #else
16677 # include <db.h>
16678 #endif
16679
16680 #ifndef DB_VERSION_MAJOR
16681 # define DB_VERSION_MAJOR 1
16682 #endif
16683
16684 #ifndef NULL
16685 #define NULL ((void*)0)
16686 #endif
16687
16688 int main() {
16689
16690 #if DB_VERSION_MAJOR > 1
16691         {
16692                 char *version;
16693                 int major, minor, patch;
16694
16695                 version = db_version( &major, &minor, &patch );
16696
16697                 if( major != DB_VERSION_MAJOR ||
16698                         minor < DB_VERSION_MINOR )
16699                 {
16700                         printf("Berkeley DB version mismatch\n"
16701                                 "\texpected: %s\n\tgot: %s\n",
16702                                 DB_VERSION_STRING, version);
16703                         return 1;
16704                 }
16705         }
16706 #endif
16707
16708 #if DB_VERSION_MAJOR > 2
16709         db_env_create( NULL, 0 );
16710 #elif DB_VERSION_MAJOR > 1
16711         db_appexit( NULL );
16712 #else
16713         (void) dbopen( NULL, 0, 0, 0, NULL);
16714 #endif
16715
16716 ; return 0; }
16717 EOF
16718 if { (eval echo configure:16719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16719   rm -rf conftest*
16720   ol_cv_db_db_4_2=yes
16721 else
16722   echo "configure: failed program was:" >&5
16723   cat conftest.$ac_ext >&5
16724   rm -rf conftest*
16725   ol_cv_db_db_4_2=no
16726 fi
16727 rm -f conftest*
16728
16729         LIBS="$ol_LIBS"
16730
16731 fi
16732
16733 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16734
16735         if test $ol_cv_db_db_4_2 = yes ; then
16736                 ol_cv_lib_db=-ldb-4-2
16737         fi
16738 fi
16739
16740 if test $ol_cv_lib_db = no ; then
16741         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16742 echo "configure:16743: checking for Berkeley DB link (-ldb-4)" >&5
16743 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16744   echo $ac_n "(cached) $ac_c" 1>&6
16745 else
16746   
16747         ol_DB_LIB=-ldb-4
16748         ol_LIBS=$LIBS
16749         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16750
16751         cat > conftest.$ac_ext <<EOF
16752 #line 16753 "configure"
16753 #include "confdefs.h"
16754
16755 #ifdef HAVE_DB_185_H
16756 # include <db_185.h>
16757 #else
16758 # include <db.h>
16759 #endif
16760
16761 #ifndef DB_VERSION_MAJOR
16762 # define DB_VERSION_MAJOR 1
16763 #endif
16764
16765 #ifndef NULL
16766 #define NULL ((void*)0)
16767 #endif
16768
16769 int main() {
16770
16771 #if DB_VERSION_MAJOR > 1
16772         {
16773                 char *version;
16774                 int major, minor, patch;
16775
16776                 version = db_version( &major, &minor, &patch );
16777
16778                 if( major != DB_VERSION_MAJOR ||
16779                         minor < DB_VERSION_MINOR )
16780                 {
16781                         printf("Berkeley DB version mismatch\n"
16782                                 "\texpected: %s\n\tgot: %s\n",
16783                                 DB_VERSION_STRING, version);
16784                         return 1;
16785                 }
16786         }
16787 #endif
16788
16789 #if DB_VERSION_MAJOR > 2
16790         db_env_create( NULL, 0 );
16791 #elif DB_VERSION_MAJOR > 1
16792         db_appexit( NULL );
16793 #else
16794         (void) dbopen( NULL, 0, 0, 0, NULL);
16795 #endif
16796
16797 ; return 0; }
16798 EOF
16799 if { (eval echo configure:16800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16800   rm -rf conftest*
16801   ol_cv_db_db_4=yes
16802 else
16803   echo "configure: failed program was:" >&5
16804   cat conftest.$ac_ext >&5
16805   rm -rf conftest*
16806   ol_cv_db_db_4=no
16807 fi
16808 rm -f conftest*
16809
16810         LIBS="$ol_LIBS"
16811
16812 fi
16813
16814 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16815
16816         if test $ol_cv_db_db_4 = yes ; then
16817                 ol_cv_lib_db=-ldb-4
16818         fi
16819 fi
16820
16821 if test $ol_cv_lib_db = no ; then
16822         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16823 echo "configure:16824: checking for Berkeley DB link (-ldb4)" >&5
16824 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16825   echo $ac_n "(cached) $ac_c" 1>&6
16826 else
16827   
16828         ol_DB_LIB=-ldb4
16829         ol_LIBS=$LIBS
16830         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16831
16832         cat > conftest.$ac_ext <<EOF
16833 #line 16834 "configure"
16834 #include "confdefs.h"
16835
16836 #ifdef HAVE_DB_185_H
16837 # include <db_185.h>
16838 #else
16839 # include <db.h>
16840 #endif
16841
16842 #ifndef DB_VERSION_MAJOR
16843 # define DB_VERSION_MAJOR 1
16844 #endif
16845
16846 #ifndef NULL
16847 #define NULL ((void*)0)
16848 #endif
16849
16850 int main() {
16851
16852 #if DB_VERSION_MAJOR > 1
16853         {
16854                 char *version;
16855                 int major, minor, patch;
16856
16857                 version = db_version( &major, &minor, &patch );
16858
16859                 if( major != DB_VERSION_MAJOR ||
16860                         minor < DB_VERSION_MINOR )
16861                 {
16862                         printf("Berkeley DB version mismatch\n"
16863                                 "\texpected: %s\n\tgot: %s\n",
16864                                 DB_VERSION_STRING, version);
16865                         return 1;
16866                 }
16867         }
16868 #endif
16869
16870 #if DB_VERSION_MAJOR > 2
16871         db_env_create( NULL, 0 );
16872 #elif DB_VERSION_MAJOR > 1
16873         db_appexit( NULL );
16874 #else
16875         (void) dbopen( NULL, 0, 0, 0, NULL);
16876 #endif
16877
16878 ; return 0; }
16879 EOF
16880 if { (eval echo configure:16881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16881   rm -rf conftest*
16882   ol_cv_db_db4=yes
16883 else
16884   echo "configure: failed program was:" >&5
16885   cat conftest.$ac_ext >&5
16886   rm -rf conftest*
16887   ol_cv_db_db4=no
16888 fi
16889 rm -f conftest*
16890
16891         LIBS="$ol_LIBS"
16892
16893 fi
16894
16895 echo "$ac_t""$ol_cv_db_db4" 1>&6
16896
16897         if test $ol_cv_db_db4 = yes ; then
16898                 ol_cv_lib_db=-ldb4
16899         fi
16900 fi
16901
16902 if test $ol_cv_lib_db = no ; then
16903         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16904 echo "configure:16905: checking for Berkeley DB link (-ldb)" >&5
16905 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16906   echo $ac_n "(cached) $ac_c" 1>&6
16907 else
16908   
16909         ol_DB_LIB=-ldb
16910         ol_LIBS=$LIBS
16911         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16912
16913         cat > conftest.$ac_ext <<EOF
16914 #line 16915 "configure"
16915 #include "confdefs.h"
16916
16917 #ifdef HAVE_DB_185_H
16918 # include <db_185.h>
16919 #else
16920 # include <db.h>
16921 #endif
16922
16923 #ifndef DB_VERSION_MAJOR
16924 # define DB_VERSION_MAJOR 1
16925 #endif
16926
16927 #ifndef NULL
16928 #define NULL ((void*)0)
16929 #endif
16930
16931 int main() {
16932
16933 #if DB_VERSION_MAJOR > 1
16934         {
16935                 char *version;
16936                 int major, minor, patch;
16937
16938                 version = db_version( &major, &minor, &patch );
16939
16940                 if( major != DB_VERSION_MAJOR ||
16941                         minor < DB_VERSION_MINOR )
16942                 {
16943                         printf("Berkeley DB version mismatch\n"
16944                                 "\texpected: %s\n\tgot: %s\n",
16945                                 DB_VERSION_STRING, version);
16946                         return 1;
16947                 }
16948         }
16949 #endif
16950
16951 #if DB_VERSION_MAJOR > 2
16952         db_env_create( NULL, 0 );
16953 #elif DB_VERSION_MAJOR > 1
16954         db_appexit( NULL );
16955 #else
16956         (void) dbopen( NULL, 0, 0, 0, NULL);
16957 #endif
16958
16959 ; return 0; }
16960 EOF
16961 if { (eval echo configure:16962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16962   rm -rf conftest*
16963   ol_cv_db_db=yes
16964 else
16965   echo "configure: failed program was:" >&5
16966   cat conftest.$ac_ext >&5
16967   rm -rf conftest*
16968   ol_cv_db_db=no
16969 fi
16970 rm -f conftest*
16971
16972         LIBS="$ol_LIBS"
16973
16974 fi
16975
16976 echo "$ac_t""$ol_cv_db_db" 1>&6
16977
16978         if test $ol_cv_db_db = yes ; then
16979                 ol_cv_lib_db=-ldb
16980         fi
16981 fi
16982
16983 if test $ol_cv_lib_db = no ; then
16984         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16985 echo "configure:16986: checking for Berkeley DB link (-ldb41)" >&5
16986 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16987   echo $ac_n "(cached) $ac_c" 1>&6
16988 else
16989   
16990         ol_DB_LIB=-ldb41
16991         ol_LIBS=$LIBS
16992         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16993
16994         cat > conftest.$ac_ext <<EOF
16995 #line 16996 "configure"
16996 #include "confdefs.h"
16997
16998 #ifdef HAVE_DB_185_H
16999 # include <db_185.h>
17000 #else
17001 # include <db.h>
17002 #endif
17003
17004 #ifndef DB_VERSION_MAJOR
17005 # define DB_VERSION_MAJOR 1
17006 #endif
17007
17008 #ifndef NULL
17009 #define NULL ((void*)0)
17010 #endif
17011
17012 int main() {
17013
17014 #if DB_VERSION_MAJOR > 1
17015         {
17016                 char *version;
17017                 int major, minor, patch;
17018
17019                 version = db_version( &major, &minor, &patch );
17020
17021                 if( major != DB_VERSION_MAJOR ||
17022                         minor < DB_VERSION_MINOR )
17023                 {
17024                         printf("Berkeley DB version mismatch\n"
17025                                 "\texpected: %s\n\tgot: %s\n",
17026                                 DB_VERSION_STRING, version);
17027                         return 1;
17028                 }
17029         }
17030 #endif
17031
17032 #if DB_VERSION_MAJOR > 2
17033         db_env_create( NULL, 0 );
17034 #elif DB_VERSION_MAJOR > 1
17035         db_appexit( NULL );
17036 #else
17037         (void) dbopen( NULL, 0, 0, 0, NULL);
17038 #endif
17039
17040 ; return 0; }
17041 EOF
17042 if { (eval echo configure:17043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17043   rm -rf conftest*
17044   ol_cv_db_db41=yes
17045 else
17046   echo "configure: failed program was:" >&5
17047   cat conftest.$ac_ext >&5
17048   rm -rf conftest*
17049   ol_cv_db_db41=no
17050 fi
17051 rm -f conftest*
17052
17053         LIBS="$ol_LIBS"
17054
17055 fi
17056
17057 echo "$ac_t""$ol_cv_db_db41" 1>&6
17058
17059         if test $ol_cv_db_db41 = yes ; then
17060                 ol_cv_lib_db=-ldb41
17061         fi
17062 fi
17063
17064 if test $ol_cv_lib_db = no ; then
17065         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17066 echo "configure:17067: checking for Berkeley DB link (-ldb-41)" >&5
17067 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17068   echo $ac_n "(cached) $ac_c" 1>&6
17069 else
17070   
17071         ol_DB_LIB=-ldb-41
17072         ol_LIBS=$LIBS
17073         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17074
17075         cat > conftest.$ac_ext <<EOF
17076 #line 17077 "configure"
17077 #include "confdefs.h"
17078
17079 #ifdef HAVE_DB_185_H
17080 # include <db_185.h>
17081 #else
17082 # include <db.h>
17083 #endif
17084
17085 #ifndef DB_VERSION_MAJOR
17086 # define DB_VERSION_MAJOR 1
17087 #endif
17088
17089 #ifndef NULL
17090 #define NULL ((void*)0)
17091 #endif
17092
17093 int main() {
17094
17095 #if DB_VERSION_MAJOR > 1
17096         {
17097                 char *version;
17098                 int major, minor, patch;
17099
17100                 version = db_version( &major, &minor, &patch );
17101
17102                 if( major != DB_VERSION_MAJOR ||
17103                         minor < DB_VERSION_MINOR )
17104                 {
17105                         printf("Berkeley DB version mismatch\n"
17106                                 "\texpected: %s\n\tgot: %s\n",
17107                                 DB_VERSION_STRING, version);
17108                         return 1;
17109                 }
17110         }
17111 #endif
17112
17113 #if DB_VERSION_MAJOR > 2
17114         db_env_create( NULL, 0 );
17115 #elif DB_VERSION_MAJOR > 1
17116         db_appexit( NULL );
17117 #else
17118         (void) dbopen( NULL, 0, 0, 0, NULL);
17119 #endif
17120
17121 ; return 0; }
17122 EOF
17123 if { (eval echo configure:17124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17124   rm -rf conftest*
17125   ol_cv_db_db_41=yes
17126 else
17127   echo "configure: failed program was:" >&5
17128   cat conftest.$ac_ext >&5
17129   rm -rf conftest*
17130   ol_cv_db_db_41=no
17131 fi
17132 rm -f conftest*
17133
17134         LIBS="$ol_LIBS"
17135
17136 fi
17137
17138 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17139
17140         if test $ol_cv_db_db_41 = yes ; then
17141                 ol_cv_lib_db=-ldb-41
17142         fi
17143 fi
17144
17145 if test $ol_cv_lib_db = no ; then
17146         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17147 echo "configure:17148: checking for Berkeley DB link (-ldb-4.1)" >&5
17148 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17149   echo $ac_n "(cached) $ac_c" 1>&6
17150 else
17151   
17152         ol_DB_LIB=-ldb-4.1
17153         ol_LIBS=$LIBS
17154         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17155
17156         cat > conftest.$ac_ext <<EOF
17157 #line 17158 "configure"
17158 #include "confdefs.h"
17159
17160 #ifdef HAVE_DB_185_H
17161 # include <db_185.h>
17162 #else
17163 # include <db.h>
17164 #endif
17165
17166 #ifndef DB_VERSION_MAJOR
17167 # define DB_VERSION_MAJOR 1
17168 #endif
17169
17170 #ifndef NULL
17171 #define NULL ((void*)0)
17172 #endif
17173
17174 int main() {
17175
17176 #if DB_VERSION_MAJOR > 1
17177         {
17178                 char *version;
17179                 int major, minor, patch;
17180
17181                 version = db_version( &major, &minor, &patch );
17182
17183                 if( major != DB_VERSION_MAJOR ||
17184                         minor < DB_VERSION_MINOR )
17185                 {
17186                         printf("Berkeley DB version mismatch\n"
17187                                 "\texpected: %s\n\tgot: %s\n",
17188                                 DB_VERSION_STRING, version);
17189                         return 1;
17190                 }
17191         }
17192 #endif
17193
17194 #if DB_VERSION_MAJOR > 2
17195         db_env_create( NULL, 0 );
17196 #elif DB_VERSION_MAJOR > 1
17197         db_appexit( NULL );
17198 #else
17199         (void) dbopen( NULL, 0, 0, 0, NULL);
17200 #endif
17201
17202 ; return 0; }
17203 EOF
17204 if { (eval echo configure:17205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17205   rm -rf conftest*
17206   ol_cv_db_db_4_dot_1=yes
17207 else
17208   echo "configure: failed program was:" >&5
17209   cat conftest.$ac_ext >&5
17210   rm -rf conftest*
17211   ol_cv_db_db_4_dot_1=no
17212 fi
17213 rm -f conftest*
17214
17215         LIBS="$ol_LIBS"
17216
17217 fi
17218
17219 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17220
17221         if test $ol_cv_db_db_4_dot_1 = yes ; then
17222                 ol_cv_lib_db=-ldb-4.1
17223         fi
17224 fi
17225
17226 if test $ol_cv_lib_db = no ; then
17227         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17228 echo "configure:17229: checking for Berkeley DB link (-ldb-4-1)" >&5
17229 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17230   echo $ac_n "(cached) $ac_c" 1>&6
17231 else
17232   
17233         ol_DB_LIB=-ldb-4-1
17234         ol_LIBS=$LIBS
17235         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17236
17237         cat > conftest.$ac_ext <<EOF
17238 #line 17239 "configure"
17239 #include "confdefs.h"
17240
17241 #ifdef HAVE_DB_185_H
17242 # include <db_185.h>
17243 #else
17244 # include <db.h>
17245 #endif
17246
17247 #ifndef DB_VERSION_MAJOR
17248 # define DB_VERSION_MAJOR 1
17249 #endif
17250
17251 #ifndef NULL
17252 #define NULL ((void*)0)
17253 #endif
17254
17255 int main() {
17256
17257 #if DB_VERSION_MAJOR > 1
17258         {
17259                 char *version;
17260                 int major, minor, patch;
17261
17262                 version = db_version( &major, &minor, &patch );
17263
17264                 if( major != DB_VERSION_MAJOR ||
17265                         minor < DB_VERSION_MINOR )
17266                 {
17267                         printf("Berkeley DB version mismatch\n"
17268                                 "\texpected: %s\n\tgot: %s\n",
17269                                 DB_VERSION_STRING, version);
17270                         return 1;
17271                 }
17272         }
17273 #endif
17274
17275 #if DB_VERSION_MAJOR > 2
17276         db_env_create( NULL, 0 );
17277 #elif DB_VERSION_MAJOR > 1
17278         db_appexit( NULL );
17279 #else
17280         (void) dbopen( NULL, 0, 0, 0, NULL);
17281 #endif
17282
17283 ; return 0; }
17284 EOF
17285 if { (eval echo configure:17286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17286   rm -rf conftest*
17287   ol_cv_db_db_4_1=yes
17288 else
17289   echo "configure: failed program was:" >&5
17290   cat conftest.$ac_ext >&5
17291   rm -rf conftest*
17292   ol_cv_db_db_4_1=no
17293 fi
17294 rm -f conftest*
17295
17296         LIBS="$ol_LIBS"
17297
17298 fi
17299
17300 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17301
17302         if test $ol_cv_db_db_4_1 = yes ; then
17303                 ol_cv_lib_db=-ldb-4-1
17304         fi
17305 fi
17306
17307 if test $ol_cv_lib_db = no ; then
17308         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17309 echo "configure:17310: checking for Berkeley DB link (-ldb3)" >&5
17310 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17311   echo $ac_n "(cached) $ac_c" 1>&6
17312 else
17313   
17314         ol_DB_LIB=-ldb3
17315         ol_LIBS=$LIBS
17316         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17317
17318         cat > conftest.$ac_ext <<EOF
17319 #line 17320 "configure"
17320 #include "confdefs.h"
17321
17322 #ifdef HAVE_DB_185_H
17323 # include <db_185.h>
17324 #else
17325 # include <db.h>
17326 #endif
17327
17328 #ifndef DB_VERSION_MAJOR
17329 # define DB_VERSION_MAJOR 1
17330 #endif
17331
17332 #ifndef NULL
17333 #define NULL ((void*)0)
17334 #endif
17335
17336 int main() {
17337
17338 #if DB_VERSION_MAJOR > 1
17339         {
17340                 char *version;
17341                 int major, minor, patch;
17342
17343                 version = db_version( &major, &minor, &patch );
17344
17345                 if( major != DB_VERSION_MAJOR ||
17346                         minor < DB_VERSION_MINOR )
17347                 {
17348                         printf("Berkeley DB version mismatch\n"
17349                                 "\texpected: %s\n\tgot: %s\n",
17350                                 DB_VERSION_STRING, version);
17351                         return 1;
17352                 }
17353         }
17354 #endif
17355
17356 #if DB_VERSION_MAJOR > 2
17357         db_env_create( NULL, 0 );
17358 #elif DB_VERSION_MAJOR > 1
17359         db_appexit( NULL );
17360 #else
17361         (void) dbopen( NULL, 0, 0, 0, NULL);
17362 #endif
17363
17364 ; return 0; }
17365 EOF
17366 if { (eval echo configure:17367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17367   rm -rf conftest*
17368   ol_cv_db_db3=yes
17369 else
17370   echo "configure: failed program was:" >&5
17371   cat conftest.$ac_ext >&5
17372   rm -rf conftest*
17373   ol_cv_db_db3=no
17374 fi
17375 rm -f conftest*
17376
17377         LIBS="$ol_LIBS"
17378
17379 fi
17380
17381 echo "$ac_t""$ol_cv_db_db3" 1>&6
17382
17383         if test $ol_cv_db_db3 = yes ; then
17384                 ol_cv_lib_db=-ldb3
17385         fi
17386 fi
17387
17388 if test $ol_cv_lib_db = no ; then
17389         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17390 echo "configure:17391: checking for Berkeley DB link (-ldb-3)" >&5
17391 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17392   echo $ac_n "(cached) $ac_c" 1>&6
17393 else
17394   
17395         ol_DB_LIB=-ldb-3
17396         ol_LIBS=$LIBS
17397         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17398
17399         cat > conftest.$ac_ext <<EOF
17400 #line 17401 "configure"
17401 #include "confdefs.h"
17402
17403 #ifdef HAVE_DB_185_H
17404 # include <db_185.h>
17405 #else
17406 # include <db.h>
17407 #endif
17408
17409 #ifndef DB_VERSION_MAJOR
17410 # define DB_VERSION_MAJOR 1
17411 #endif
17412
17413 #ifndef NULL
17414 #define NULL ((void*)0)
17415 #endif
17416
17417 int main() {
17418
17419 #if DB_VERSION_MAJOR > 1
17420         {
17421                 char *version;
17422                 int major, minor, patch;
17423
17424                 version = db_version( &major, &minor, &patch );
17425
17426                 if( major != DB_VERSION_MAJOR ||
17427                         minor < DB_VERSION_MINOR )
17428                 {
17429                         printf("Berkeley DB version mismatch\n"
17430                                 "\texpected: %s\n\tgot: %s\n",
17431                                 DB_VERSION_STRING, version);
17432                         return 1;
17433                 }
17434         }
17435 #endif
17436
17437 #if DB_VERSION_MAJOR > 2
17438         db_env_create( NULL, 0 );
17439 #elif DB_VERSION_MAJOR > 1
17440         db_appexit( NULL );
17441 #else
17442         (void) dbopen( NULL, 0, 0, 0, NULL);
17443 #endif
17444
17445 ; return 0; }
17446 EOF
17447 if { (eval echo configure:17448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17448   rm -rf conftest*
17449   ol_cv_db_db_3=yes
17450 else
17451   echo "configure: failed program was:" >&5
17452   cat conftest.$ac_ext >&5
17453   rm -rf conftest*
17454   ol_cv_db_db_3=no
17455 fi
17456 rm -f conftest*
17457
17458         LIBS="$ol_LIBS"
17459
17460 fi
17461
17462 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17463
17464         if test $ol_cv_db_db_3 = yes ; then
17465                 ol_cv_lib_db=-ldb-3
17466         fi
17467 fi
17468
17469 if test $ol_cv_lib_db = no ; then
17470         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17471 echo "configure:17472: checking for Berkeley DB link (-ldb2)" >&5
17472 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17473   echo $ac_n "(cached) $ac_c" 1>&6
17474 else
17475   
17476         ol_DB_LIB=-ldb2
17477         ol_LIBS=$LIBS
17478         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17479
17480         cat > conftest.$ac_ext <<EOF
17481 #line 17482 "configure"
17482 #include "confdefs.h"
17483
17484 #ifdef HAVE_DB_185_H
17485 # include <db_185.h>
17486 #else
17487 # include <db.h>
17488 #endif
17489
17490 #ifndef DB_VERSION_MAJOR
17491 # define DB_VERSION_MAJOR 1
17492 #endif
17493
17494 #ifndef NULL
17495 #define NULL ((void*)0)
17496 #endif
17497
17498 int main() {
17499
17500 #if DB_VERSION_MAJOR > 1
17501         {
17502                 char *version;
17503                 int major, minor, patch;
17504
17505                 version = db_version( &major, &minor, &patch );
17506
17507                 if( major != DB_VERSION_MAJOR ||
17508                         minor < DB_VERSION_MINOR )
17509                 {
17510                         printf("Berkeley DB version mismatch\n"
17511                                 "\texpected: %s\n\tgot: %s\n",
17512                                 DB_VERSION_STRING, version);
17513                         return 1;
17514                 }
17515         }
17516 #endif
17517
17518 #if DB_VERSION_MAJOR > 2
17519         db_env_create( NULL, 0 );
17520 #elif DB_VERSION_MAJOR > 1
17521         db_appexit( NULL );
17522 #else
17523         (void) dbopen( NULL, 0, 0, 0, NULL);
17524 #endif
17525
17526 ; return 0; }
17527 EOF
17528 if { (eval echo configure:17529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17529   rm -rf conftest*
17530   ol_cv_db_db2=yes
17531 else
17532   echo "configure: failed program was:" >&5
17533   cat conftest.$ac_ext >&5
17534   rm -rf conftest*
17535   ol_cv_db_db2=no
17536 fi
17537 rm -f conftest*
17538
17539         LIBS="$ol_LIBS"
17540
17541 fi
17542
17543 echo "$ac_t""$ol_cv_db_db2" 1>&6
17544
17545         if test $ol_cv_db_db2 = yes ; then
17546                 ol_cv_lib_db=-ldb2
17547         fi
17548 fi
17549
17550 if test $ol_cv_lib_db = no ; then
17551         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17552 echo "configure:17553: checking for Berkeley DB link (-ldb-2)" >&5
17553 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17554   echo $ac_n "(cached) $ac_c" 1>&6
17555 else
17556   
17557         ol_DB_LIB=-ldb-2
17558         ol_LIBS=$LIBS
17559         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17560
17561         cat > conftest.$ac_ext <<EOF
17562 #line 17563 "configure"
17563 #include "confdefs.h"
17564
17565 #ifdef HAVE_DB_185_H
17566 # include <db_185.h>
17567 #else
17568 # include <db.h>
17569 #endif
17570
17571 #ifndef DB_VERSION_MAJOR
17572 # define DB_VERSION_MAJOR 1
17573 #endif
17574
17575 #ifndef NULL
17576 #define NULL ((void*)0)
17577 #endif
17578
17579 int main() {
17580
17581 #if DB_VERSION_MAJOR > 1
17582         {
17583                 char *version;
17584                 int major, minor, patch;
17585
17586                 version = db_version( &major, &minor, &patch );
17587
17588                 if( major != DB_VERSION_MAJOR ||
17589                         minor < DB_VERSION_MINOR )
17590                 {
17591                         printf("Berkeley DB version mismatch\n"
17592                                 "\texpected: %s\n\tgot: %s\n",
17593                                 DB_VERSION_STRING, version);
17594                         return 1;
17595                 }
17596         }
17597 #endif
17598
17599 #if DB_VERSION_MAJOR > 2
17600         db_env_create( NULL, 0 );
17601 #elif DB_VERSION_MAJOR > 1
17602         db_appexit( NULL );
17603 #else
17604         (void) dbopen( NULL, 0, 0, 0, NULL);
17605 #endif
17606
17607 ; return 0; }
17608 EOF
17609 if { (eval echo configure:17610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17610   rm -rf conftest*
17611   ol_cv_db_db_2=yes
17612 else
17613   echo "configure: failed program was:" >&5
17614   cat conftest.$ac_ext >&5
17615   rm -rf conftest*
17616   ol_cv_db_db_2=no
17617 fi
17618 rm -f conftest*
17619
17620         LIBS="$ol_LIBS"
17621
17622 fi
17623
17624 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17625
17626         if test $ol_cv_db_db_2 = yes ; then
17627                 ol_cv_lib_db=-ldb-2
17628         fi
17629 fi
17630
17631 if test $ol_cv_lib_db = no ; then
17632         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17633 echo "configure:17634: checking for Berkeley DB link (-ldb1)" >&5
17634 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17635   echo $ac_n "(cached) $ac_c" 1>&6
17636 else
17637   
17638         ol_DB_LIB=-ldb1
17639         ol_LIBS=$LIBS
17640         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17641
17642         cat > conftest.$ac_ext <<EOF
17643 #line 17644 "configure"
17644 #include "confdefs.h"
17645
17646 #ifdef HAVE_DB_185_H
17647 # include <db_185.h>
17648 #else
17649 # include <db.h>
17650 #endif
17651
17652 #ifndef DB_VERSION_MAJOR
17653 # define DB_VERSION_MAJOR 1
17654 #endif
17655
17656 #ifndef NULL
17657 #define NULL ((void*)0)
17658 #endif
17659
17660 int main() {
17661
17662 #if DB_VERSION_MAJOR > 1
17663         {
17664                 char *version;
17665                 int major, minor, patch;
17666
17667                 version = db_version( &major, &minor, &patch );
17668
17669                 if( major != DB_VERSION_MAJOR ||
17670                         minor < DB_VERSION_MINOR )
17671                 {
17672                         printf("Berkeley DB version mismatch\n"
17673                                 "\texpected: %s\n\tgot: %s\n",
17674                                 DB_VERSION_STRING, version);
17675                         return 1;
17676                 }
17677         }
17678 #endif
17679
17680 #if DB_VERSION_MAJOR > 2
17681         db_env_create( NULL, 0 );
17682 #elif DB_VERSION_MAJOR > 1
17683         db_appexit( NULL );
17684 #else
17685         (void) dbopen( NULL, 0, 0, 0, NULL);
17686 #endif
17687
17688 ; return 0; }
17689 EOF
17690 if { (eval echo configure:17691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17691   rm -rf conftest*
17692   ol_cv_db_db1=yes
17693 else
17694   echo "configure: failed program was:" >&5
17695   cat conftest.$ac_ext >&5
17696   rm -rf conftest*
17697   ol_cv_db_db1=no
17698 fi
17699 rm -f conftest*
17700
17701         LIBS="$ol_LIBS"
17702
17703 fi
17704
17705 echo "$ac_t""$ol_cv_db_db1" 1>&6
17706
17707         if test $ol_cv_db_db1 = yes ; then
17708                 ol_cv_lib_db=-ldb1
17709         fi
17710 fi
17711
17712 if test $ol_cv_lib_db = no ; then
17713         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17714 echo "configure:17715: checking for Berkeley DB link (-ldb-1)" >&5
17715 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17716   echo $ac_n "(cached) $ac_c" 1>&6
17717 else
17718   
17719         ol_DB_LIB=-ldb-1
17720         ol_LIBS=$LIBS
17721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17722
17723         cat > conftest.$ac_ext <<EOF
17724 #line 17725 "configure"
17725 #include "confdefs.h"
17726
17727 #ifdef HAVE_DB_185_H
17728 # include <db_185.h>
17729 #else
17730 # include <db.h>
17731 #endif
17732
17733 #ifndef DB_VERSION_MAJOR
17734 # define DB_VERSION_MAJOR 1
17735 #endif
17736
17737 #ifndef NULL
17738 #define NULL ((void*)0)
17739 #endif
17740
17741 int main() {
17742
17743 #if DB_VERSION_MAJOR > 1
17744         {
17745                 char *version;
17746                 int major, minor, patch;
17747
17748                 version = db_version( &major, &minor, &patch );
17749
17750                 if( major != DB_VERSION_MAJOR ||
17751                         minor < DB_VERSION_MINOR )
17752                 {
17753                         printf("Berkeley DB version mismatch\n"
17754                                 "\texpected: %s\n\tgot: %s\n",
17755                                 DB_VERSION_STRING, version);
17756                         return 1;
17757                 }
17758         }
17759 #endif
17760
17761 #if DB_VERSION_MAJOR > 2
17762         db_env_create( NULL, 0 );
17763 #elif DB_VERSION_MAJOR > 1
17764         db_appexit( NULL );
17765 #else
17766         (void) dbopen( NULL, 0, 0, 0, NULL);
17767 #endif
17768
17769 ; return 0; }
17770 EOF
17771 if { (eval echo configure:17772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17772   rm -rf conftest*
17773   ol_cv_db_db_1=yes
17774 else
17775   echo "configure: failed program was:" >&5
17776   cat conftest.$ac_ext >&5
17777   rm -rf conftest*
17778   ol_cv_db_db_1=no
17779 fi
17780 rm -f conftest*
17781
17782         LIBS="$ol_LIBS"
17783
17784 fi
17785
17786 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17787
17788         if test $ol_cv_db_db_1 = yes ; then
17789                 ol_cv_lib_db=-ldb-1
17790         fi
17791 fi
17792
17793
17794                 if test "$ol_cv_lib_db" != no ; then
17795                         ol_cv_berkeley_db=yes
17796                 fi
17797         fi
17798 fi
17799
17800         else
17801                 ol_cv_berkeley_db=no
17802 for ac_hdr in db.h
17803 do
17804 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17805 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17806 echo "configure:17807: checking for $ac_hdr" >&5
17807 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17808   echo $ac_n "(cached) $ac_c" 1>&6
17809 else
17810   cat > conftest.$ac_ext <<EOF
17811 #line 17812 "configure"
17812 #include "confdefs.h"
17813 #include <$ac_hdr>
17814 EOF
17815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17816 { (eval echo configure:17817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17818 if test -z "$ac_err"; then
17819   rm -rf conftest*
17820   eval "ac_cv_header_$ac_safe=yes"
17821 else
17822   echo "$ac_err" >&5
17823   echo "configure: failed program was:" >&5
17824   cat conftest.$ac_ext >&5
17825   rm -rf conftest*
17826   eval "ac_cv_header_$ac_safe=no"
17827 fi
17828 rm -f conftest*
17829 fi
17830 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17831   echo "$ac_t""yes" 1>&6
17832     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17833   cat >> confdefs.h <<EOF
17834 #define $ac_tr_hdr 1
17835 EOF
17836  
17837 else
17838   echo "$ac_t""no" 1>&6
17839 fi
17840 done
17841
17842 if test $ac_cv_header_db_h = yes; then
17843         ol_cv_lib_db=no
17844 if test $ol_cv_lib_db = no ; then
17845         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17846 echo "configure:17847: checking for Berkeley DB link (default)" >&5
17847 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17848   echo $ac_n "(cached) $ac_c" 1>&6
17849 else
17850   
17851         ol_DB_LIB=
17852         ol_LIBS=$LIBS
17853         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17854
17855         cat > conftest.$ac_ext <<EOF
17856 #line 17857 "configure"
17857 #include "confdefs.h"
17858
17859 #ifdef HAVE_DB_185_H
17860 # include <db_185.h>
17861 #else
17862 # include <db.h>
17863 #endif
17864
17865 #ifndef DB_VERSION_MAJOR
17866 # define DB_VERSION_MAJOR 1
17867 #endif
17868
17869 #ifndef NULL
17870 #define NULL ((void*)0)
17871 #endif
17872
17873 int main() {
17874
17875 #if DB_VERSION_MAJOR > 1
17876         {
17877                 char *version;
17878                 int major, minor, patch;
17879
17880                 version = db_version( &major, &minor, &patch );
17881
17882                 if( major != DB_VERSION_MAJOR ||
17883                         minor < DB_VERSION_MINOR )
17884                 {
17885                         printf("Berkeley DB version mismatch\n"
17886                                 "\texpected: %s\n\tgot: %s\n",
17887                                 DB_VERSION_STRING, version);
17888                         return 1;
17889                 }
17890         }
17891 #endif
17892
17893 #if DB_VERSION_MAJOR > 2
17894         db_env_create( NULL, 0 );
17895 #elif DB_VERSION_MAJOR > 1
17896         db_appexit( NULL );
17897 #else
17898         (void) dbopen( NULL, 0, 0, 0, NULL);
17899 #endif
17900
17901 ; return 0; }
17902 EOF
17903 if { (eval echo configure:17904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17904   rm -rf conftest*
17905   ol_cv_db_none=yes
17906 else
17907   echo "configure: failed program was:" >&5
17908   cat conftest.$ac_ext >&5
17909   rm -rf conftest*
17910   ol_cv_db_none=no
17911 fi
17912 rm -f conftest*
17913
17914         LIBS="$ol_LIBS"
17915
17916 fi
17917
17918 echo "$ac_t""$ol_cv_db_none" 1>&6
17919
17920         if test $ol_cv_db_none = yes ; then
17921                 ol_cv_lib_db=yes
17922         fi
17923 fi
17924
17925 if test $ol_cv_lib_db = no ; then
17926         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17927 echo "configure:17928: checking for Berkeley DB link (-ldb42)" >&5
17928 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17929   echo $ac_n "(cached) $ac_c" 1>&6
17930 else
17931   
17932         ol_DB_LIB=-ldb42
17933         ol_LIBS=$LIBS
17934         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17935
17936         cat > conftest.$ac_ext <<EOF
17937 #line 17938 "configure"
17938 #include "confdefs.h"
17939
17940 #ifdef HAVE_DB_185_H
17941 # include <db_185.h>
17942 #else
17943 # include <db.h>
17944 #endif
17945
17946 #ifndef DB_VERSION_MAJOR
17947 # define DB_VERSION_MAJOR 1
17948 #endif
17949
17950 #ifndef NULL
17951 #define NULL ((void*)0)
17952 #endif
17953
17954 int main() {
17955
17956 #if DB_VERSION_MAJOR > 1
17957         {
17958                 char *version;
17959                 int major, minor, patch;
17960
17961                 version = db_version( &major, &minor, &patch );
17962
17963                 if( major != DB_VERSION_MAJOR ||
17964                         minor < DB_VERSION_MINOR )
17965                 {
17966                         printf("Berkeley DB version mismatch\n"
17967                                 "\texpected: %s\n\tgot: %s\n",
17968                                 DB_VERSION_STRING, version);
17969                         return 1;
17970                 }
17971         }
17972 #endif
17973
17974 #if DB_VERSION_MAJOR > 2
17975         db_env_create( NULL, 0 );
17976 #elif DB_VERSION_MAJOR > 1
17977         db_appexit( NULL );
17978 #else
17979         (void) dbopen( NULL, 0, 0, 0, NULL);
17980 #endif
17981
17982 ; return 0; }
17983 EOF
17984 if { (eval echo configure:17985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17985   rm -rf conftest*
17986   ol_cv_db_db42=yes
17987 else
17988   echo "configure: failed program was:" >&5
17989   cat conftest.$ac_ext >&5
17990   rm -rf conftest*
17991   ol_cv_db_db42=no
17992 fi
17993 rm -f conftest*
17994
17995         LIBS="$ol_LIBS"
17996
17997 fi
17998
17999 echo "$ac_t""$ol_cv_db_db42" 1>&6
18000
18001         if test $ol_cv_db_db42 = yes ; then
18002                 ol_cv_lib_db=-ldb42
18003         fi
18004 fi
18005
18006 if test $ol_cv_lib_db = no ; then
18007         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18008 echo "configure:18009: checking for Berkeley DB link (-ldb-42)" >&5
18009 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18010   echo $ac_n "(cached) $ac_c" 1>&6
18011 else
18012   
18013         ol_DB_LIB=-ldb-42
18014         ol_LIBS=$LIBS
18015         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18016
18017         cat > conftest.$ac_ext <<EOF
18018 #line 18019 "configure"
18019 #include "confdefs.h"
18020
18021 #ifdef HAVE_DB_185_H
18022 # include <db_185.h>
18023 #else
18024 # include <db.h>
18025 #endif
18026
18027 #ifndef DB_VERSION_MAJOR
18028 # define DB_VERSION_MAJOR 1
18029 #endif
18030
18031 #ifndef NULL
18032 #define NULL ((void*)0)
18033 #endif
18034
18035 int main() {
18036
18037 #if DB_VERSION_MAJOR > 1
18038         {
18039                 char *version;
18040                 int major, minor, patch;
18041
18042                 version = db_version( &major, &minor, &patch );
18043
18044                 if( major != DB_VERSION_MAJOR ||
18045                         minor < DB_VERSION_MINOR )
18046                 {
18047                         printf("Berkeley DB version mismatch\n"
18048                                 "\texpected: %s\n\tgot: %s\n",
18049                                 DB_VERSION_STRING, version);
18050                         return 1;
18051                 }
18052         }
18053 #endif
18054
18055 #if DB_VERSION_MAJOR > 2
18056         db_env_create( NULL, 0 );
18057 #elif DB_VERSION_MAJOR > 1
18058         db_appexit( NULL );
18059 #else
18060         (void) dbopen( NULL, 0, 0, 0, NULL);
18061 #endif
18062
18063 ; return 0; }
18064 EOF
18065 if { (eval echo configure:18066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18066   rm -rf conftest*
18067   ol_cv_db_db_42=yes
18068 else
18069   echo "configure: failed program was:" >&5
18070   cat conftest.$ac_ext >&5
18071   rm -rf conftest*
18072   ol_cv_db_db_42=no
18073 fi
18074 rm -f conftest*
18075
18076         LIBS="$ol_LIBS"
18077
18078 fi
18079
18080 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18081
18082         if test $ol_cv_db_db_42 = yes ; then
18083                 ol_cv_lib_db=-ldb-42
18084         fi
18085 fi
18086
18087 if test $ol_cv_lib_db = no ; then
18088         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18089 echo "configure:18090: checking for Berkeley DB link (-ldb-4.2)" >&5
18090 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18091   echo $ac_n "(cached) $ac_c" 1>&6
18092 else
18093   
18094         ol_DB_LIB=-ldb-4.2
18095         ol_LIBS=$LIBS
18096         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18097
18098         cat > conftest.$ac_ext <<EOF
18099 #line 18100 "configure"
18100 #include "confdefs.h"
18101
18102 #ifdef HAVE_DB_185_H
18103 # include <db_185.h>
18104 #else
18105 # include <db.h>
18106 #endif
18107
18108 #ifndef DB_VERSION_MAJOR
18109 # define DB_VERSION_MAJOR 1
18110 #endif
18111
18112 #ifndef NULL
18113 #define NULL ((void*)0)
18114 #endif
18115
18116 int main() {
18117
18118 #if DB_VERSION_MAJOR > 1
18119         {
18120                 char *version;
18121                 int major, minor, patch;
18122
18123                 version = db_version( &major, &minor, &patch );
18124
18125                 if( major != DB_VERSION_MAJOR ||
18126                         minor < DB_VERSION_MINOR )
18127                 {
18128                         printf("Berkeley DB version mismatch\n"
18129                                 "\texpected: %s\n\tgot: %s\n",
18130                                 DB_VERSION_STRING, version);
18131                         return 1;
18132                 }
18133         }
18134 #endif
18135
18136 #if DB_VERSION_MAJOR > 2
18137         db_env_create( NULL, 0 );
18138 #elif DB_VERSION_MAJOR > 1
18139         db_appexit( NULL );
18140 #else
18141         (void) dbopen( NULL, 0, 0, 0, NULL);
18142 #endif
18143
18144 ; return 0; }
18145 EOF
18146 if { (eval echo configure:18147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18147   rm -rf conftest*
18148   ol_cv_db_db_4_dot_2=yes
18149 else
18150   echo "configure: failed program was:" >&5
18151   cat conftest.$ac_ext >&5
18152   rm -rf conftest*
18153   ol_cv_db_db_4_dot_2=no
18154 fi
18155 rm -f conftest*
18156
18157         LIBS="$ol_LIBS"
18158
18159 fi
18160
18161 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18162
18163         if test $ol_cv_db_db_4_dot_2 = yes ; then
18164                 ol_cv_lib_db=-ldb-4.2
18165         fi
18166 fi
18167
18168 if test $ol_cv_lib_db = no ; then
18169         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18170 echo "configure:18171: checking for Berkeley DB link (-ldb-4-2)" >&5
18171 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18172   echo $ac_n "(cached) $ac_c" 1>&6
18173 else
18174   
18175         ol_DB_LIB=-ldb-4-2
18176         ol_LIBS=$LIBS
18177         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18178
18179         cat > conftest.$ac_ext <<EOF
18180 #line 18181 "configure"
18181 #include "confdefs.h"
18182
18183 #ifdef HAVE_DB_185_H
18184 # include <db_185.h>
18185 #else
18186 # include <db.h>
18187 #endif
18188
18189 #ifndef DB_VERSION_MAJOR
18190 # define DB_VERSION_MAJOR 1
18191 #endif
18192
18193 #ifndef NULL
18194 #define NULL ((void*)0)
18195 #endif
18196
18197 int main() {
18198
18199 #if DB_VERSION_MAJOR > 1
18200         {
18201                 char *version;
18202                 int major, minor, patch;
18203
18204                 version = db_version( &major, &minor, &patch );
18205
18206                 if( major != DB_VERSION_MAJOR ||
18207                         minor < DB_VERSION_MINOR )
18208                 {
18209                         printf("Berkeley DB version mismatch\n"
18210                                 "\texpected: %s\n\tgot: %s\n",
18211                                 DB_VERSION_STRING, version);
18212                         return 1;
18213                 }
18214         }
18215 #endif
18216
18217 #if DB_VERSION_MAJOR > 2
18218         db_env_create( NULL, 0 );
18219 #elif DB_VERSION_MAJOR > 1
18220         db_appexit( NULL );
18221 #else
18222         (void) dbopen( NULL, 0, 0, 0, NULL);
18223 #endif
18224
18225 ; return 0; }
18226 EOF
18227 if { (eval echo configure:18228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18228   rm -rf conftest*
18229   ol_cv_db_db_4_2=yes
18230 else
18231   echo "configure: failed program was:" >&5
18232   cat conftest.$ac_ext >&5
18233   rm -rf conftest*
18234   ol_cv_db_db_4_2=no
18235 fi
18236 rm -f conftest*
18237
18238         LIBS="$ol_LIBS"
18239
18240 fi
18241
18242 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18243
18244         if test $ol_cv_db_db_4_2 = yes ; then
18245                 ol_cv_lib_db=-ldb-4-2
18246         fi
18247 fi
18248
18249 if test $ol_cv_lib_db = no ; then
18250         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18251 echo "configure:18252: checking for Berkeley DB link (-ldb-4)" >&5
18252 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18253   echo $ac_n "(cached) $ac_c" 1>&6
18254 else
18255   
18256         ol_DB_LIB=-ldb-4
18257         ol_LIBS=$LIBS
18258         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18259
18260         cat > conftest.$ac_ext <<EOF
18261 #line 18262 "configure"
18262 #include "confdefs.h"
18263
18264 #ifdef HAVE_DB_185_H
18265 # include <db_185.h>
18266 #else
18267 # include <db.h>
18268 #endif
18269
18270 #ifndef DB_VERSION_MAJOR
18271 # define DB_VERSION_MAJOR 1
18272 #endif
18273
18274 #ifndef NULL
18275 #define NULL ((void*)0)
18276 #endif
18277
18278 int main() {
18279
18280 #if DB_VERSION_MAJOR > 1
18281         {
18282                 char *version;
18283                 int major, minor, patch;
18284
18285                 version = db_version( &major, &minor, &patch );
18286
18287                 if( major != DB_VERSION_MAJOR ||
18288                         minor < DB_VERSION_MINOR )
18289                 {
18290                         printf("Berkeley DB version mismatch\n"
18291                                 "\texpected: %s\n\tgot: %s\n",
18292                                 DB_VERSION_STRING, version);
18293                         return 1;
18294                 }
18295         }
18296 #endif
18297
18298 #if DB_VERSION_MAJOR > 2
18299         db_env_create( NULL, 0 );
18300 #elif DB_VERSION_MAJOR > 1
18301         db_appexit( NULL );
18302 #else
18303         (void) dbopen( NULL, 0, 0, 0, NULL);
18304 #endif
18305
18306 ; return 0; }
18307 EOF
18308 if { (eval echo configure:18309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18309   rm -rf conftest*
18310   ol_cv_db_db_4=yes
18311 else
18312   echo "configure: failed program was:" >&5
18313   cat conftest.$ac_ext >&5
18314   rm -rf conftest*
18315   ol_cv_db_db_4=no
18316 fi
18317 rm -f conftest*
18318
18319         LIBS="$ol_LIBS"
18320
18321 fi
18322
18323 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18324
18325         if test $ol_cv_db_db_4 = yes ; then
18326                 ol_cv_lib_db=-ldb-4
18327         fi
18328 fi
18329
18330 if test $ol_cv_lib_db = no ; then
18331         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18332 echo "configure:18333: checking for Berkeley DB link (-ldb4)" >&5
18333 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18334   echo $ac_n "(cached) $ac_c" 1>&6
18335 else
18336   
18337         ol_DB_LIB=-ldb4
18338         ol_LIBS=$LIBS
18339         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18340
18341         cat > conftest.$ac_ext <<EOF
18342 #line 18343 "configure"
18343 #include "confdefs.h"
18344
18345 #ifdef HAVE_DB_185_H
18346 # include <db_185.h>
18347 #else
18348 # include <db.h>
18349 #endif
18350
18351 #ifndef DB_VERSION_MAJOR
18352 # define DB_VERSION_MAJOR 1
18353 #endif
18354
18355 #ifndef NULL
18356 #define NULL ((void*)0)
18357 #endif
18358
18359 int main() {
18360
18361 #if DB_VERSION_MAJOR > 1
18362         {
18363                 char *version;
18364                 int major, minor, patch;
18365
18366                 version = db_version( &major, &minor, &patch );
18367
18368                 if( major != DB_VERSION_MAJOR ||
18369                         minor < DB_VERSION_MINOR )
18370                 {
18371                         printf("Berkeley DB version mismatch\n"
18372                                 "\texpected: %s\n\tgot: %s\n",
18373                                 DB_VERSION_STRING, version);
18374                         return 1;
18375                 }
18376         }
18377 #endif
18378
18379 #if DB_VERSION_MAJOR > 2
18380         db_env_create( NULL, 0 );
18381 #elif DB_VERSION_MAJOR > 1
18382         db_appexit( NULL );
18383 #else
18384         (void) dbopen( NULL, 0, 0, 0, NULL);
18385 #endif
18386
18387 ; return 0; }
18388 EOF
18389 if { (eval echo configure:18390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18390   rm -rf conftest*
18391   ol_cv_db_db4=yes
18392 else
18393   echo "configure: failed program was:" >&5
18394   cat conftest.$ac_ext >&5
18395   rm -rf conftest*
18396   ol_cv_db_db4=no
18397 fi
18398 rm -f conftest*
18399
18400         LIBS="$ol_LIBS"
18401
18402 fi
18403
18404 echo "$ac_t""$ol_cv_db_db4" 1>&6
18405
18406         if test $ol_cv_db_db4 = yes ; then
18407                 ol_cv_lib_db=-ldb4
18408         fi
18409 fi
18410
18411 if test $ol_cv_lib_db = no ; then
18412         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18413 echo "configure:18414: checking for Berkeley DB link (-ldb)" >&5
18414 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18415   echo $ac_n "(cached) $ac_c" 1>&6
18416 else
18417   
18418         ol_DB_LIB=-ldb
18419         ol_LIBS=$LIBS
18420         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18421
18422         cat > conftest.$ac_ext <<EOF
18423 #line 18424 "configure"
18424 #include "confdefs.h"
18425
18426 #ifdef HAVE_DB_185_H
18427 # include <db_185.h>
18428 #else
18429 # include <db.h>
18430 #endif
18431
18432 #ifndef DB_VERSION_MAJOR
18433 # define DB_VERSION_MAJOR 1
18434 #endif
18435
18436 #ifndef NULL
18437 #define NULL ((void*)0)
18438 #endif
18439
18440 int main() {
18441
18442 #if DB_VERSION_MAJOR > 1
18443         {
18444                 char *version;
18445                 int major, minor, patch;
18446
18447                 version = db_version( &major, &minor, &patch );
18448
18449                 if( major != DB_VERSION_MAJOR ||
18450                         minor < DB_VERSION_MINOR )
18451                 {
18452                         printf("Berkeley DB version mismatch\n"
18453                                 "\texpected: %s\n\tgot: %s\n",
18454                                 DB_VERSION_STRING, version);
18455                         return 1;
18456                 }
18457         }
18458 #endif
18459
18460 #if DB_VERSION_MAJOR > 2
18461         db_env_create( NULL, 0 );
18462 #elif DB_VERSION_MAJOR > 1
18463         db_appexit( NULL );
18464 #else
18465         (void) dbopen( NULL, 0, 0, 0, NULL);
18466 #endif
18467
18468 ; return 0; }
18469 EOF
18470 if { (eval echo configure:18471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18471   rm -rf conftest*
18472   ol_cv_db_db=yes
18473 else
18474   echo "configure: failed program was:" >&5
18475   cat conftest.$ac_ext >&5
18476   rm -rf conftest*
18477   ol_cv_db_db=no
18478 fi
18479 rm -f conftest*
18480
18481         LIBS="$ol_LIBS"
18482
18483 fi
18484
18485 echo "$ac_t""$ol_cv_db_db" 1>&6
18486
18487         if test $ol_cv_db_db = yes ; then
18488                 ol_cv_lib_db=-ldb
18489         fi
18490 fi
18491
18492 if test $ol_cv_lib_db = no ; then
18493         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18494 echo "configure:18495: checking for Berkeley DB link (-ldb41)" >&5
18495 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18496   echo $ac_n "(cached) $ac_c" 1>&6
18497 else
18498   
18499         ol_DB_LIB=-ldb41
18500         ol_LIBS=$LIBS
18501         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18502
18503         cat > conftest.$ac_ext <<EOF
18504 #line 18505 "configure"
18505 #include "confdefs.h"
18506
18507 #ifdef HAVE_DB_185_H
18508 # include <db_185.h>
18509 #else
18510 # include <db.h>
18511 #endif
18512
18513 #ifndef DB_VERSION_MAJOR
18514 # define DB_VERSION_MAJOR 1
18515 #endif
18516
18517 #ifndef NULL
18518 #define NULL ((void*)0)
18519 #endif
18520
18521 int main() {
18522
18523 #if DB_VERSION_MAJOR > 1
18524         {
18525                 char *version;
18526                 int major, minor, patch;
18527
18528                 version = db_version( &major, &minor, &patch );
18529
18530                 if( major != DB_VERSION_MAJOR ||
18531                         minor < DB_VERSION_MINOR )
18532                 {
18533                         printf("Berkeley DB version mismatch\n"
18534                                 "\texpected: %s\n\tgot: %s\n",
18535                                 DB_VERSION_STRING, version);
18536                         return 1;
18537                 }
18538         }
18539 #endif
18540
18541 #if DB_VERSION_MAJOR > 2
18542         db_env_create( NULL, 0 );
18543 #elif DB_VERSION_MAJOR > 1
18544         db_appexit( NULL );
18545 #else
18546         (void) dbopen( NULL, 0, 0, 0, NULL);
18547 #endif
18548
18549 ; return 0; }
18550 EOF
18551 if { (eval echo configure:18552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18552   rm -rf conftest*
18553   ol_cv_db_db41=yes
18554 else
18555   echo "configure: failed program was:" >&5
18556   cat conftest.$ac_ext >&5
18557   rm -rf conftest*
18558   ol_cv_db_db41=no
18559 fi
18560 rm -f conftest*
18561
18562         LIBS="$ol_LIBS"
18563
18564 fi
18565
18566 echo "$ac_t""$ol_cv_db_db41" 1>&6
18567
18568         if test $ol_cv_db_db41 = yes ; then
18569                 ol_cv_lib_db=-ldb41
18570         fi
18571 fi
18572
18573 if test $ol_cv_lib_db = no ; then
18574         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18575 echo "configure:18576: checking for Berkeley DB link (-ldb-41)" >&5
18576 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18577   echo $ac_n "(cached) $ac_c" 1>&6
18578 else
18579   
18580         ol_DB_LIB=-ldb-41
18581         ol_LIBS=$LIBS
18582         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18583
18584         cat > conftest.$ac_ext <<EOF
18585 #line 18586 "configure"
18586 #include "confdefs.h"
18587
18588 #ifdef HAVE_DB_185_H
18589 # include <db_185.h>
18590 #else
18591 # include <db.h>
18592 #endif
18593
18594 #ifndef DB_VERSION_MAJOR
18595 # define DB_VERSION_MAJOR 1
18596 #endif
18597
18598 #ifndef NULL
18599 #define NULL ((void*)0)
18600 #endif
18601
18602 int main() {
18603
18604 #if DB_VERSION_MAJOR > 1
18605         {
18606                 char *version;
18607                 int major, minor, patch;
18608
18609                 version = db_version( &major, &minor, &patch );
18610
18611                 if( major != DB_VERSION_MAJOR ||
18612                         minor < DB_VERSION_MINOR )
18613                 {
18614                         printf("Berkeley DB version mismatch\n"
18615                                 "\texpected: %s\n\tgot: %s\n",
18616                                 DB_VERSION_STRING, version);
18617                         return 1;
18618                 }
18619         }
18620 #endif
18621
18622 #if DB_VERSION_MAJOR > 2
18623         db_env_create( NULL, 0 );
18624 #elif DB_VERSION_MAJOR > 1
18625         db_appexit( NULL );
18626 #else
18627         (void) dbopen( NULL, 0, 0, 0, NULL);
18628 #endif
18629
18630 ; return 0; }
18631 EOF
18632 if { (eval echo configure:18633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18633   rm -rf conftest*
18634   ol_cv_db_db_41=yes
18635 else
18636   echo "configure: failed program was:" >&5
18637   cat conftest.$ac_ext >&5
18638   rm -rf conftest*
18639   ol_cv_db_db_41=no
18640 fi
18641 rm -f conftest*
18642
18643         LIBS="$ol_LIBS"
18644
18645 fi
18646
18647 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18648
18649         if test $ol_cv_db_db_41 = yes ; then
18650                 ol_cv_lib_db=-ldb-41
18651         fi
18652 fi
18653
18654 if test $ol_cv_lib_db = no ; then
18655         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18656 echo "configure:18657: checking for Berkeley DB link (-ldb-4.1)" >&5
18657 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18658   echo $ac_n "(cached) $ac_c" 1>&6
18659 else
18660   
18661         ol_DB_LIB=-ldb-4.1
18662         ol_LIBS=$LIBS
18663         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18664
18665         cat > conftest.$ac_ext <<EOF
18666 #line 18667 "configure"
18667 #include "confdefs.h"
18668
18669 #ifdef HAVE_DB_185_H
18670 # include <db_185.h>
18671 #else
18672 # include <db.h>
18673 #endif
18674
18675 #ifndef DB_VERSION_MAJOR
18676 # define DB_VERSION_MAJOR 1
18677 #endif
18678
18679 #ifndef NULL
18680 #define NULL ((void*)0)
18681 #endif
18682
18683 int main() {
18684
18685 #if DB_VERSION_MAJOR > 1
18686         {
18687                 char *version;
18688                 int major, minor, patch;
18689
18690                 version = db_version( &major, &minor, &patch );
18691
18692                 if( major != DB_VERSION_MAJOR ||
18693                         minor < DB_VERSION_MINOR )
18694                 {
18695                         printf("Berkeley DB version mismatch\n"
18696                                 "\texpected: %s\n\tgot: %s\n",
18697                                 DB_VERSION_STRING, version);
18698                         return 1;
18699                 }
18700         }
18701 #endif
18702
18703 #if DB_VERSION_MAJOR > 2
18704         db_env_create( NULL, 0 );
18705 #elif DB_VERSION_MAJOR > 1
18706         db_appexit( NULL );
18707 #else
18708         (void) dbopen( NULL, 0, 0, 0, NULL);
18709 #endif
18710
18711 ; return 0; }
18712 EOF
18713 if { (eval echo configure:18714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18714   rm -rf conftest*
18715   ol_cv_db_db_4_dot_1=yes
18716 else
18717   echo "configure: failed program was:" >&5
18718   cat conftest.$ac_ext >&5
18719   rm -rf conftest*
18720   ol_cv_db_db_4_dot_1=no
18721 fi
18722 rm -f conftest*
18723
18724         LIBS="$ol_LIBS"
18725
18726 fi
18727
18728 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18729
18730         if test $ol_cv_db_db_4_dot_1 = yes ; then
18731                 ol_cv_lib_db=-ldb-4.1
18732         fi
18733 fi
18734
18735 if test $ol_cv_lib_db = no ; then
18736         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18737 echo "configure:18738: checking for Berkeley DB link (-ldb-4-1)" >&5
18738 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18739   echo $ac_n "(cached) $ac_c" 1>&6
18740 else
18741   
18742         ol_DB_LIB=-ldb-4-1
18743         ol_LIBS=$LIBS
18744         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18745
18746         cat > conftest.$ac_ext <<EOF
18747 #line 18748 "configure"
18748 #include "confdefs.h"
18749
18750 #ifdef HAVE_DB_185_H
18751 # include <db_185.h>
18752 #else
18753 # include <db.h>
18754 #endif
18755
18756 #ifndef DB_VERSION_MAJOR
18757 # define DB_VERSION_MAJOR 1
18758 #endif
18759
18760 #ifndef NULL
18761 #define NULL ((void*)0)
18762 #endif
18763
18764 int main() {
18765
18766 #if DB_VERSION_MAJOR > 1
18767         {
18768                 char *version;
18769                 int major, minor, patch;
18770
18771                 version = db_version( &major, &minor, &patch );
18772
18773                 if( major != DB_VERSION_MAJOR ||
18774                         minor < DB_VERSION_MINOR )
18775                 {
18776                         printf("Berkeley DB version mismatch\n"
18777                                 "\texpected: %s\n\tgot: %s\n",
18778                                 DB_VERSION_STRING, version);
18779                         return 1;
18780                 }
18781         }
18782 #endif
18783
18784 #if DB_VERSION_MAJOR > 2
18785         db_env_create( NULL, 0 );
18786 #elif DB_VERSION_MAJOR > 1
18787         db_appexit( NULL );
18788 #else
18789         (void) dbopen( NULL, 0, 0, 0, NULL);
18790 #endif
18791
18792 ; return 0; }
18793 EOF
18794 if { (eval echo configure:18795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18795   rm -rf conftest*
18796   ol_cv_db_db_4_1=yes
18797 else
18798   echo "configure: failed program was:" >&5
18799   cat conftest.$ac_ext >&5
18800   rm -rf conftest*
18801   ol_cv_db_db_4_1=no
18802 fi
18803 rm -f conftest*
18804
18805         LIBS="$ol_LIBS"
18806
18807 fi
18808
18809 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18810
18811         if test $ol_cv_db_db_4_1 = yes ; then
18812                 ol_cv_lib_db=-ldb-4-1
18813         fi
18814 fi
18815
18816 if test $ol_cv_lib_db = no ; then
18817         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18818 echo "configure:18819: checking for Berkeley DB link (-ldb3)" >&5
18819 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18820   echo $ac_n "(cached) $ac_c" 1>&6
18821 else
18822   
18823         ol_DB_LIB=-ldb3
18824         ol_LIBS=$LIBS
18825         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18826
18827         cat > conftest.$ac_ext <<EOF
18828 #line 18829 "configure"
18829 #include "confdefs.h"
18830
18831 #ifdef HAVE_DB_185_H
18832 # include <db_185.h>
18833 #else
18834 # include <db.h>
18835 #endif
18836
18837 #ifndef DB_VERSION_MAJOR
18838 # define DB_VERSION_MAJOR 1
18839 #endif
18840
18841 #ifndef NULL
18842 #define NULL ((void*)0)
18843 #endif
18844
18845 int main() {
18846
18847 #if DB_VERSION_MAJOR > 1
18848         {
18849                 char *version;
18850                 int major, minor, patch;
18851
18852                 version = db_version( &major, &minor, &patch );
18853
18854                 if( major != DB_VERSION_MAJOR ||
18855                         minor < DB_VERSION_MINOR )
18856                 {
18857                         printf("Berkeley DB version mismatch\n"
18858                                 "\texpected: %s\n\tgot: %s\n",
18859                                 DB_VERSION_STRING, version);
18860                         return 1;
18861                 }
18862         }
18863 #endif
18864
18865 #if DB_VERSION_MAJOR > 2
18866         db_env_create( NULL, 0 );
18867 #elif DB_VERSION_MAJOR > 1
18868         db_appexit( NULL );
18869 #else
18870         (void) dbopen( NULL, 0, 0, 0, NULL);
18871 #endif
18872
18873 ; return 0; }
18874 EOF
18875 if { (eval echo configure:18876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18876   rm -rf conftest*
18877   ol_cv_db_db3=yes
18878 else
18879   echo "configure: failed program was:" >&5
18880   cat conftest.$ac_ext >&5
18881   rm -rf conftest*
18882   ol_cv_db_db3=no
18883 fi
18884 rm -f conftest*
18885
18886         LIBS="$ol_LIBS"
18887
18888 fi
18889
18890 echo "$ac_t""$ol_cv_db_db3" 1>&6
18891
18892         if test $ol_cv_db_db3 = yes ; then
18893                 ol_cv_lib_db=-ldb3
18894         fi
18895 fi
18896
18897 if test $ol_cv_lib_db = no ; then
18898         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18899 echo "configure:18900: checking for Berkeley DB link (-ldb-3)" >&5
18900 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18901   echo $ac_n "(cached) $ac_c" 1>&6
18902 else
18903   
18904         ol_DB_LIB=-ldb-3
18905         ol_LIBS=$LIBS
18906         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18907
18908         cat > conftest.$ac_ext <<EOF
18909 #line 18910 "configure"
18910 #include "confdefs.h"
18911
18912 #ifdef HAVE_DB_185_H
18913 # include <db_185.h>
18914 #else
18915 # include <db.h>
18916 #endif
18917
18918 #ifndef DB_VERSION_MAJOR
18919 # define DB_VERSION_MAJOR 1
18920 #endif
18921
18922 #ifndef NULL
18923 #define NULL ((void*)0)
18924 #endif
18925
18926 int main() {
18927
18928 #if DB_VERSION_MAJOR > 1
18929         {
18930                 char *version;
18931                 int major, minor, patch;
18932
18933                 version = db_version( &major, &minor, &patch );
18934
18935                 if( major != DB_VERSION_MAJOR ||
18936                         minor < DB_VERSION_MINOR )
18937                 {
18938                         printf("Berkeley DB version mismatch\n"
18939                                 "\texpected: %s\n\tgot: %s\n",
18940                                 DB_VERSION_STRING, version);
18941                         return 1;
18942                 }
18943         }
18944 #endif
18945
18946 #if DB_VERSION_MAJOR > 2
18947         db_env_create( NULL, 0 );
18948 #elif DB_VERSION_MAJOR > 1
18949         db_appexit( NULL );
18950 #else
18951         (void) dbopen( NULL, 0, 0, 0, NULL);
18952 #endif
18953
18954 ; return 0; }
18955 EOF
18956 if { (eval echo configure:18957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18957   rm -rf conftest*
18958   ol_cv_db_db_3=yes
18959 else
18960   echo "configure: failed program was:" >&5
18961   cat conftest.$ac_ext >&5
18962   rm -rf conftest*
18963   ol_cv_db_db_3=no
18964 fi
18965 rm -f conftest*
18966
18967         LIBS="$ol_LIBS"
18968
18969 fi
18970
18971 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18972
18973         if test $ol_cv_db_db_3 = yes ; then
18974                 ol_cv_lib_db=-ldb-3
18975         fi
18976 fi
18977
18978 if test $ol_cv_lib_db = no ; then
18979         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18980 echo "configure:18981: checking for Berkeley DB link (-ldb2)" >&5
18981 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18982   echo $ac_n "(cached) $ac_c" 1>&6
18983 else
18984   
18985         ol_DB_LIB=-ldb2
18986         ol_LIBS=$LIBS
18987         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18988
18989         cat > conftest.$ac_ext <<EOF
18990 #line 18991 "configure"
18991 #include "confdefs.h"
18992
18993 #ifdef HAVE_DB_185_H
18994 # include <db_185.h>
18995 #else
18996 # include <db.h>
18997 #endif
18998
18999 #ifndef DB_VERSION_MAJOR
19000 # define DB_VERSION_MAJOR 1
19001 #endif
19002
19003 #ifndef NULL
19004 #define NULL ((void*)0)
19005 #endif
19006
19007 int main() {
19008
19009 #if DB_VERSION_MAJOR > 1
19010         {
19011                 char *version;
19012                 int major, minor, patch;
19013
19014                 version = db_version( &major, &minor, &patch );
19015
19016                 if( major != DB_VERSION_MAJOR ||
19017                         minor < DB_VERSION_MINOR )
19018                 {
19019                         printf("Berkeley DB version mismatch\n"
19020                                 "\texpected: %s\n\tgot: %s\n",
19021                                 DB_VERSION_STRING, version);
19022                         return 1;
19023                 }
19024         }
19025 #endif
19026
19027 #if DB_VERSION_MAJOR > 2
19028         db_env_create( NULL, 0 );
19029 #elif DB_VERSION_MAJOR > 1
19030         db_appexit( NULL );
19031 #else
19032         (void) dbopen( NULL, 0, 0, 0, NULL);
19033 #endif
19034
19035 ; return 0; }
19036 EOF
19037 if { (eval echo configure:19038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19038   rm -rf conftest*
19039   ol_cv_db_db2=yes
19040 else
19041   echo "configure: failed program was:" >&5
19042   cat conftest.$ac_ext >&5
19043   rm -rf conftest*
19044   ol_cv_db_db2=no
19045 fi
19046 rm -f conftest*
19047
19048         LIBS="$ol_LIBS"
19049
19050 fi
19051
19052 echo "$ac_t""$ol_cv_db_db2" 1>&6
19053
19054         if test $ol_cv_db_db2 = yes ; then
19055                 ol_cv_lib_db=-ldb2
19056         fi
19057 fi
19058
19059 if test $ol_cv_lib_db = no ; then
19060         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19061 echo "configure:19062: checking for Berkeley DB link (-ldb-2)" >&5
19062 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19063   echo $ac_n "(cached) $ac_c" 1>&6
19064 else
19065   
19066         ol_DB_LIB=-ldb-2
19067         ol_LIBS=$LIBS
19068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19069
19070         cat > conftest.$ac_ext <<EOF
19071 #line 19072 "configure"
19072 #include "confdefs.h"
19073
19074 #ifdef HAVE_DB_185_H
19075 # include <db_185.h>
19076 #else
19077 # include <db.h>
19078 #endif
19079
19080 #ifndef DB_VERSION_MAJOR
19081 # define DB_VERSION_MAJOR 1
19082 #endif
19083
19084 #ifndef NULL
19085 #define NULL ((void*)0)
19086 #endif
19087
19088 int main() {
19089
19090 #if DB_VERSION_MAJOR > 1
19091         {
19092                 char *version;
19093                 int major, minor, patch;
19094
19095                 version = db_version( &major, &minor, &patch );
19096
19097                 if( major != DB_VERSION_MAJOR ||
19098                         minor < DB_VERSION_MINOR )
19099                 {
19100                         printf("Berkeley DB version mismatch\n"
19101                                 "\texpected: %s\n\tgot: %s\n",
19102                                 DB_VERSION_STRING, version);
19103                         return 1;
19104                 }
19105         }
19106 #endif
19107
19108 #if DB_VERSION_MAJOR > 2
19109         db_env_create( NULL, 0 );
19110 #elif DB_VERSION_MAJOR > 1
19111         db_appexit( NULL );
19112 #else
19113         (void) dbopen( NULL, 0, 0, 0, NULL);
19114 #endif
19115
19116 ; return 0; }
19117 EOF
19118 if { (eval echo configure:19119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19119   rm -rf conftest*
19120   ol_cv_db_db_2=yes
19121 else
19122   echo "configure: failed program was:" >&5
19123   cat conftest.$ac_ext >&5
19124   rm -rf conftest*
19125   ol_cv_db_db_2=no
19126 fi
19127 rm -f conftest*
19128
19129         LIBS="$ol_LIBS"
19130
19131 fi
19132
19133 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19134
19135         if test $ol_cv_db_db_2 = yes ; then
19136                 ol_cv_lib_db=-ldb-2
19137         fi
19138 fi
19139
19140 if test $ol_cv_lib_db = no ; then
19141         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19142 echo "configure:19143: checking for Berkeley DB link (-ldb1)" >&5
19143 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19144   echo $ac_n "(cached) $ac_c" 1>&6
19145 else
19146   
19147         ol_DB_LIB=-ldb1
19148         ol_LIBS=$LIBS
19149         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19150
19151         cat > conftest.$ac_ext <<EOF
19152 #line 19153 "configure"
19153 #include "confdefs.h"
19154
19155 #ifdef HAVE_DB_185_H
19156 # include <db_185.h>
19157 #else
19158 # include <db.h>
19159 #endif
19160
19161 #ifndef DB_VERSION_MAJOR
19162 # define DB_VERSION_MAJOR 1
19163 #endif
19164
19165 #ifndef NULL
19166 #define NULL ((void*)0)
19167 #endif
19168
19169 int main() {
19170
19171 #if DB_VERSION_MAJOR > 1
19172         {
19173                 char *version;
19174                 int major, minor, patch;
19175
19176                 version = db_version( &major, &minor, &patch );
19177
19178                 if( major != DB_VERSION_MAJOR ||
19179                         minor < DB_VERSION_MINOR )
19180                 {
19181                         printf("Berkeley DB version mismatch\n"
19182                                 "\texpected: %s\n\tgot: %s\n",
19183                                 DB_VERSION_STRING, version);
19184                         return 1;
19185                 }
19186         }
19187 #endif
19188
19189 #if DB_VERSION_MAJOR > 2
19190         db_env_create( NULL, 0 );
19191 #elif DB_VERSION_MAJOR > 1
19192         db_appexit( NULL );
19193 #else
19194         (void) dbopen( NULL, 0, 0, 0, NULL);
19195 #endif
19196
19197 ; return 0; }
19198 EOF
19199 if { (eval echo configure:19200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19200   rm -rf conftest*
19201   ol_cv_db_db1=yes
19202 else
19203   echo "configure: failed program was:" >&5
19204   cat conftest.$ac_ext >&5
19205   rm -rf conftest*
19206   ol_cv_db_db1=no
19207 fi
19208 rm -f conftest*
19209
19210         LIBS="$ol_LIBS"
19211
19212 fi
19213
19214 echo "$ac_t""$ol_cv_db_db1" 1>&6
19215
19216         if test $ol_cv_db_db1 = yes ; then
19217                 ol_cv_lib_db=-ldb1
19218         fi
19219 fi
19220
19221 if test $ol_cv_lib_db = no ; then
19222         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19223 echo "configure:19224: checking for Berkeley DB link (-ldb-1)" >&5
19224 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19225   echo $ac_n "(cached) $ac_c" 1>&6
19226 else
19227   
19228         ol_DB_LIB=-ldb-1
19229         ol_LIBS=$LIBS
19230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19231
19232         cat > conftest.$ac_ext <<EOF
19233 #line 19234 "configure"
19234 #include "confdefs.h"
19235
19236 #ifdef HAVE_DB_185_H
19237 # include <db_185.h>
19238 #else
19239 # include <db.h>
19240 #endif
19241
19242 #ifndef DB_VERSION_MAJOR
19243 # define DB_VERSION_MAJOR 1
19244 #endif
19245
19246 #ifndef NULL
19247 #define NULL ((void*)0)
19248 #endif
19249
19250 int main() {
19251
19252 #if DB_VERSION_MAJOR > 1
19253         {
19254                 char *version;
19255                 int major, minor, patch;
19256
19257                 version = db_version( &major, &minor, &patch );
19258
19259                 if( major != DB_VERSION_MAJOR ||
19260                         minor < DB_VERSION_MINOR )
19261                 {
19262                         printf("Berkeley DB version mismatch\n"
19263                                 "\texpected: %s\n\tgot: %s\n",
19264                                 DB_VERSION_STRING, version);
19265                         return 1;
19266                 }
19267         }
19268 #endif
19269
19270 #if DB_VERSION_MAJOR > 2
19271         db_env_create( NULL, 0 );
19272 #elif DB_VERSION_MAJOR > 1
19273         db_appexit( NULL );
19274 #else
19275         (void) dbopen( NULL, 0, 0, 0, NULL);
19276 #endif
19277
19278 ; return 0; }
19279 EOF
19280 if { (eval echo configure:19281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19281   rm -rf conftest*
19282   ol_cv_db_db_1=yes
19283 else
19284   echo "configure: failed program was:" >&5
19285   cat conftest.$ac_ext >&5
19286   rm -rf conftest*
19287   ol_cv_db_db_1=no
19288 fi
19289 rm -f conftest*
19290
19291         LIBS="$ol_LIBS"
19292
19293 fi
19294
19295 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19296
19297         if test $ol_cv_db_db_1 = yes ; then
19298                 ol_cv_lib_db=-ldb-1
19299         fi
19300 fi
19301
19302
19303         if test "$ol_cv_lib_db" != no ; then
19304                 ol_cv_berkeley_db=yes
19305                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19306 echo "configure:19307: checking for Berkeley DB thread support" >&5
19307 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19308   echo $ac_n "(cached) $ac_c" 1>&6
19309 else
19310   
19311         ol_LIBS="$LIBS"
19312         LIBS="$LTHREAD_LIBS $LIBS"
19313         if test $ol_cv_lib_db != yes ; then
19314                 LIBS="$ol_cv_lib_db $LIBS"
19315         fi
19316
19317         if test "$cross_compiling" = yes; then
19318   ol_cv_berkeley_db_thread=cross
19319 else
19320   cat > conftest.$ac_ext <<EOF
19321 #line 19322 "configure"
19322 #include "confdefs.h"
19323
19324 #ifdef HAVE_DB_185_H
19325         choke me;
19326 #else
19327 #include <db.h>
19328 #endif
19329 #ifndef NULL
19330 #define NULL ((void *)0)
19331 #endif
19332 main()
19333 {
19334         int rc;
19335         u_int32_t flags = DB_CREATE |
19336 #ifdef DB_PRIVATE
19337                 DB_PRIVATE |
19338 #endif
19339                 DB_THREAD;
19340
19341 #if DB_VERSION_MAJOR > 2
19342         DB_ENV *env = NULL;
19343
19344         rc = db_env_create( &env, 0 );
19345
19346         flags |= DB_INIT_MPOOL;
19347 #ifdef DB_MPOOL_PRIVATE
19348         flags |= DB_MPOOL_PRIVATE;
19349 #endif
19350
19351         if( rc ) {
19352                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19353                 return rc;
19354         }
19355
19356 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19357         rc = env->open( env, NULL, flags, 0 );
19358 #else
19359         rc = env->open( env, NULL, NULL, flags, 0 );
19360 #endif
19361
19362         if ( rc == 0 ) {
19363                 rc = env->close( env, 0 );
19364         }
19365
19366         if( rc ) {
19367                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19368                 return rc;
19369         }
19370
19371 #else
19372         DB_ENV env;
19373         memset( &env, '\0', sizeof(env) );
19374
19375         rc = db_appinit( NULL, NULL, &env, flags );
19376
19377         if( rc == 0 ) {
19378                 db_appexit( &env );
19379         }
19380
19381         unlink("__db_mpool.share");
19382         unlink("__db_lock.share");
19383 #endif
19384
19385         return rc;
19386 }
19387 EOF
19388 if { (eval echo configure:19389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19389 then
19390   ol_cv_berkeley_db_thread=yes
19391 else
19392   echo "configure: failed program was:" >&5
19393   cat conftest.$ac_ext >&5
19394   rm -fr conftest*
19395   ol_cv_berkeley_db_thread=no
19396 fi
19397 rm -fr conftest*
19398 fi
19399
19400
19401         LIBS="$ol_LIBS"
19402
19403 fi
19404
19405 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19406
19407         if test $ol_cv_berkeley_db_thread != no ; then
19408                 cat >> confdefs.h <<\EOF
19409 #define HAVE_BERKELEY_DB_THREAD 1
19410 EOF
19411
19412         fi
19413
19414         fi
19415 fi
19416
19417         fi
19418
19419         if test $ol_cv_berkeley_db != no ; then
19420                 cat >> confdefs.h <<\EOF
19421 #define HAVE_BERKELEY_DB 1
19422 EOF
19423
19424
19425                 ol_link_ldbm=berkeley
19426                 ol_with_ldbm_api=berkeley
19427
19428                 if test $ol_with_ldbm_type = hash ; then
19429                         cat >> confdefs.h <<\EOF
19430 #define LDBM_USE_DBHASH 1
19431 EOF
19432
19433                 else
19434                         cat >> confdefs.h <<\EOF
19435 #define LDBM_USE_DBBTREE 1
19436 EOF
19437
19438                 fi
19439
19440                                                 if test $ol_cv_lib_db != yes ; then
19441                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19442                 fi
19443         fi
19444 fi
19445
19446 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19447         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19448 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19449         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19450 echo "configure:19451: checking Berkeley DB version for BDB backend" >&5
19451 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19452   echo $ac_n "(cached) $ac_c" 1>&6
19453 else
19454   
19455         cat > conftest.$ac_ext <<EOF
19456 #line 19457 "configure"
19457 #include "confdefs.h"
19458
19459 #include <db.h>
19460
19461  /* this check could be improved */
19462 #ifndef DB_VERSION_MAJOR
19463 #       define DB_VERSION_MAJOR 1
19464 #endif
19465 #ifndef DB_VERSION_MINOR
19466 #       define DB_VERSION_MINOR 0
19467 #endif
19468
19469 /* require 4.2 or later */
19470 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19471         __db_version_compat
19472 #endif
19473         
19474 EOF
19475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19476   egrep "__db_version_compat" >/dev/null 2>&1; then
19477   rm -rf conftest*
19478   ol_cv_bdb_compat=yes
19479 else
19480   rm -rf conftest*
19481   ol_cv_bdb_compat=no
19482 fi
19483 rm -f conftest*
19484
19485 fi
19486
19487 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19488
19489
19490         if test $ol_cv_bdb_compat = yes ; then
19491                 ol_enable_bdb=yes
19492         elif test $ol_enable_bdb = yes ; then
19493                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19494         else
19495                 ol_enable_bdb=no
19496         fi
19497 fi
19498 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19499         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19500 fi
19501
19502 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19503         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19504         ol_with_ldbm_api=none
19505 fi
19506
19507 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19508         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19509 echo "configure:19510: checking for MDBM library" >&5
19510 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19511   echo $ac_n "(cached) $ac_c" 1>&6
19512 else
19513         ol_LIBS="$LIBS"
19514         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19515 echo "configure:19516: checking for mdbm_set_chain" >&5
19516 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19517   echo $ac_n "(cached) $ac_c" 1>&6
19518 else
19519   cat > conftest.$ac_ext <<EOF
19520 #line 19521 "configure"
19521 #include "confdefs.h"
19522 /* System header to define __stub macros and hopefully few prototypes,
19523     which can conflict with char mdbm_set_chain(); below.  */
19524 #include <assert.h>
19525 /* Override any gcc2 internal prototype to avoid an error.  */
19526 /* We use char because int might match the return type of a gcc2
19527     builtin and then its argument prototype would still apply.  */
19528 char mdbm_set_chain();
19529 char (*f)();
19530
19531 int main() {
19532
19533 /* The GNU C library defines this for functions which it implements
19534     to always fail with ENOSYS.  Some functions are actually named
19535     something starting with __ and the normal name is an alias.  */
19536 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19537 choke me
19538 #else
19539 f = mdbm_set_chain;
19540 #endif
19541
19542 ; return 0; }
19543 EOF
19544 if { (eval echo configure:19545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19545   rm -rf conftest*
19546   eval "ac_cv_func_mdbm_set_chain=yes"
19547 else
19548   echo "configure: failed program was:" >&5
19549   cat conftest.$ac_ext >&5
19550   rm -rf conftest*
19551   eval "ac_cv_func_mdbm_set_chain=no"
19552 fi
19553 rm -f conftest*
19554 fi
19555
19556 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19557   echo "$ac_t""yes" 1>&6
19558   ol_cv_lib_mdbm=yes
19559 else
19560   echo "$ac_t""no" 1>&6
19561
19562                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19563 echo "configure:19564: checking for mdbm_set_chain in -lmdbm" >&5
19564 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19566   echo $ac_n "(cached) $ac_c" 1>&6
19567 else
19568   ac_save_LIBS="$LIBS"
19569 LIBS="-lmdbm  $LIBS"
19570 cat > conftest.$ac_ext <<EOF
19571 #line 19572 "configure"
19572 #include "confdefs.h"
19573 /* Override any gcc2 internal prototype to avoid an error.  */
19574 /* We use char because int might match the return type of a gcc2
19575     builtin and then its argument prototype would still apply.  */
19576 char mdbm_set_chain();
19577
19578 int main() {
19579 mdbm_set_chain()
19580 ; return 0; }
19581 EOF
19582 if { (eval echo configure:19583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19583   rm -rf conftest*
19584   eval "ac_cv_lib_$ac_lib_var=yes"
19585 else
19586   echo "configure: failed program was:" >&5
19587   cat conftest.$ac_ext >&5
19588   rm -rf conftest*
19589   eval "ac_cv_lib_$ac_lib_var=no"
19590 fi
19591 rm -f conftest*
19592 LIBS="$ac_save_LIBS"
19593
19594 fi
19595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19596   echo "$ac_t""yes" 1>&6
19597   ol_cv_lib_mdbm=-lmdbm
19598 else
19599   echo "$ac_t""no" 1>&6
19600 ol_cv_lib_mdbm=no
19601 fi
19602
19603         
19604 fi
19605
19606         LIBS="$ol_LIBS"
19607
19608 fi
19609
19610 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19611
19612
19613  for ac_hdr in mdbm.h
19614 do
19615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19617 echo "configure:19618: checking for $ac_hdr" >&5
19618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19619   echo $ac_n "(cached) $ac_c" 1>&6
19620 else
19621   cat > conftest.$ac_ext <<EOF
19622 #line 19623 "configure"
19623 #include "confdefs.h"
19624 #include <$ac_hdr>
19625 EOF
19626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19627 { (eval echo configure:19628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19629 if test -z "$ac_err"; then
19630   rm -rf conftest*
19631   eval "ac_cv_header_$ac_safe=yes"
19632 else
19633   echo "$ac_err" >&5
19634   echo "configure: failed program was:" >&5
19635   cat conftest.$ac_ext >&5
19636   rm -rf conftest*
19637   eval "ac_cv_header_$ac_safe=no"
19638 fi
19639 rm -f conftest*
19640 fi
19641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19642   echo "$ac_t""yes" 1>&6
19643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19644   cat >> confdefs.h <<EOF
19645 #define $ac_tr_hdr 1
19646 EOF
19647  
19648 else
19649   echo "$ac_t""no" 1>&6
19650 fi
19651 done
19652
19653  echo $ac_n "checking for db""... $ac_c" 1>&6
19654 echo "configure:19655: checking for db" >&5
19655 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19656   echo $ac_n "(cached) $ac_c" 1>&6
19657 else
19658   
19659         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19660                 ol_cv_mdbm=no
19661         else
19662                 ol_cv_mdbm=yes
19663         fi
19664
19665 fi
19666
19667 echo "$ac_t""$ol_cv_mdbm" 1>&6
19668  if test $ol_cv_mdbm = yes ; then
19669         cat >> confdefs.h <<\EOF
19670 #define HAVE_MDBM 1
19671 EOF
19672
19673  fi
19674
19675
19676         if test $ol_cv_mdbm = yes ; then
19677                 ol_link_ldbm=mdbm
19678                 ol_with_ldbm_api=mdbm
19679                 if test $ol_cv_lib_mdbm != yes ; then
19680                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19681                 fi
19682         fi
19683 fi
19684
19685 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19686         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19687 echo "configure:19688: checking for GDBM library" >&5
19688 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19689   echo $ac_n "(cached) $ac_c" 1>&6
19690 else
19691         ol_LIBS="$LIBS"
19692         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19693 echo "configure:19694: checking for gdbm_open" >&5
19694 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19695   echo $ac_n "(cached) $ac_c" 1>&6
19696 else
19697   cat > conftest.$ac_ext <<EOF
19698 #line 19699 "configure"
19699 #include "confdefs.h"
19700 /* System header to define __stub macros and hopefully few prototypes,
19701     which can conflict with char gdbm_open(); below.  */
19702 #include <assert.h>
19703 /* Override any gcc2 internal prototype to avoid an error.  */
19704 /* We use char because int might match the return type of a gcc2
19705     builtin and then its argument prototype would still apply.  */
19706 char gdbm_open();
19707 char (*f)();
19708
19709 int main() {
19710
19711 /* The GNU C library defines this for functions which it implements
19712     to always fail with ENOSYS.  Some functions are actually named
19713     something starting with __ and the normal name is an alias.  */
19714 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19715 choke me
19716 #else
19717 f = gdbm_open;
19718 #endif
19719
19720 ; return 0; }
19721 EOF
19722 if { (eval echo configure:19723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19723   rm -rf conftest*
19724   eval "ac_cv_func_gdbm_open=yes"
19725 else
19726   echo "configure: failed program was:" >&5
19727   cat conftest.$ac_ext >&5
19728   rm -rf conftest*
19729   eval "ac_cv_func_gdbm_open=no"
19730 fi
19731 rm -f conftest*
19732 fi
19733
19734 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19735   echo "$ac_t""yes" 1>&6
19736   ol_cv_lib_gdbm=yes
19737 else
19738   echo "$ac_t""no" 1>&6
19739
19740                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19741 echo "configure:19742: checking for gdbm_open in -lgdbm" >&5
19742 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19743 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19744   echo $ac_n "(cached) $ac_c" 1>&6
19745 else
19746   ac_save_LIBS="$LIBS"
19747 LIBS="-lgdbm  $LIBS"
19748 cat > conftest.$ac_ext <<EOF
19749 #line 19750 "configure"
19750 #include "confdefs.h"
19751 /* Override any gcc2 internal prototype to avoid an error.  */
19752 /* We use char because int might match the return type of a gcc2
19753     builtin and then its argument prototype would still apply.  */
19754 char gdbm_open();
19755
19756 int main() {
19757 gdbm_open()
19758 ; return 0; }
19759 EOF
19760 if { (eval echo configure:19761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19761   rm -rf conftest*
19762   eval "ac_cv_lib_$ac_lib_var=yes"
19763 else
19764   echo "configure: failed program was:" >&5
19765   cat conftest.$ac_ext >&5
19766   rm -rf conftest*
19767   eval "ac_cv_lib_$ac_lib_var=no"
19768 fi
19769 rm -f conftest*
19770 LIBS="$ac_save_LIBS"
19771
19772 fi
19773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19774   echo "$ac_t""yes" 1>&6
19775   ol_cv_lib_gdbm=-lgdbm
19776 else
19777   echo "$ac_t""no" 1>&6
19778 ol_cv_lib_gdbm=no
19779 fi
19780
19781         
19782 fi
19783
19784         LIBS="$ol_LIBS"
19785
19786 fi
19787
19788 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19789
19790
19791  for ac_hdr in gdbm.h
19792 do
19793 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19794 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19795 echo "configure:19796: checking for $ac_hdr" >&5
19796 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19797   echo $ac_n "(cached) $ac_c" 1>&6
19798 else
19799   cat > conftest.$ac_ext <<EOF
19800 #line 19801 "configure"
19801 #include "confdefs.h"
19802 #include <$ac_hdr>
19803 EOF
19804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19805 { (eval echo configure:19806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19807 if test -z "$ac_err"; then
19808   rm -rf conftest*
19809   eval "ac_cv_header_$ac_safe=yes"
19810 else
19811   echo "$ac_err" >&5
19812   echo "configure: failed program was:" >&5
19813   cat conftest.$ac_ext >&5
19814   rm -rf conftest*
19815   eval "ac_cv_header_$ac_safe=no"
19816 fi
19817 rm -f conftest*
19818 fi
19819 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19820   echo "$ac_t""yes" 1>&6
19821     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19822   cat >> confdefs.h <<EOF
19823 #define $ac_tr_hdr 1
19824 EOF
19825  
19826 else
19827   echo "$ac_t""no" 1>&6
19828 fi
19829 done
19830
19831  echo $ac_n "checking for db""... $ac_c" 1>&6
19832 echo "configure:19833: checking for db" >&5
19833 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19834   echo $ac_n "(cached) $ac_c" 1>&6
19835 else
19836   
19837         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19838                 ol_cv_gdbm=no
19839         else
19840                 ol_cv_gdbm=yes
19841         fi
19842
19843 fi
19844
19845 echo "$ac_t""$ol_cv_gdbm" 1>&6
19846  if test $ol_cv_gdbm = yes ; then
19847         cat >> confdefs.h <<\EOF
19848 #define HAVE_GDBM 1
19849 EOF
19850
19851  fi
19852
19853
19854         if test $ol_cv_gdbm = yes ; then
19855                 ol_link_ldbm=gdbm
19856                 ol_with_ldbm_api=gdbm
19857
19858                 if test $ol_cv_lib_gdbm != yes ; then
19859                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19860                 fi
19861         fi
19862 fi
19863
19864 if test $ol_with_ldbm_api = ndbm ; then
19865         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19866 echo "configure:19867: checking for NDBM library" >&5
19867 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19868   echo $ac_n "(cached) $ac_c" 1>&6
19869 else
19870         ol_LIBS="$LIBS"
19871         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19872 echo "configure:19873: checking for dbm_open" >&5
19873 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19874   echo $ac_n "(cached) $ac_c" 1>&6
19875 else
19876   cat > conftest.$ac_ext <<EOF
19877 #line 19878 "configure"
19878 #include "confdefs.h"
19879 /* System header to define __stub macros and hopefully few prototypes,
19880     which can conflict with char dbm_open(); below.  */
19881 #include <assert.h>
19882 /* Override any gcc2 internal prototype to avoid an error.  */
19883 /* We use char because int might match the return type of a gcc2
19884     builtin and then its argument prototype would still apply.  */
19885 char dbm_open();
19886 char (*f)();
19887
19888 int main() {
19889
19890 /* The GNU C library defines this for functions which it implements
19891     to always fail with ENOSYS.  Some functions are actually named
19892     something starting with __ and the normal name is an alias.  */
19893 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19894 choke me
19895 #else
19896 f = dbm_open;
19897 #endif
19898
19899 ; return 0; }
19900 EOF
19901 if { (eval echo configure:19902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19902   rm -rf conftest*
19903   eval "ac_cv_func_dbm_open=yes"
19904 else
19905   echo "configure: failed program was:" >&5
19906   cat conftest.$ac_ext >&5
19907   rm -rf conftest*
19908   eval "ac_cv_func_dbm_open=no"
19909 fi
19910 rm -f conftest*
19911 fi
19912
19913 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19914   echo "$ac_t""yes" 1>&6
19915   ol_cv_lib_ndbm=yes
19916 else
19917   echo "$ac_t""no" 1>&6
19918
19919                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19920 echo "configure:19921: checking for dbm_open in -lndbm" >&5
19921 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19922 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19923   echo $ac_n "(cached) $ac_c" 1>&6
19924 else
19925   ac_save_LIBS="$LIBS"
19926 LIBS="-lndbm  $LIBS"
19927 cat > conftest.$ac_ext <<EOF
19928 #line 19929 "configure"
19929 #include "confdefs.h"
19930 /* Override any gcc2 internal prototype to avoid an error.  */
19931 /* We use char because int might match the return type of a gcc2
19932     builtin and then its argument prototype would still apply.  */
19933 char dbm_open();
19934
19935 int main() {
19936 dbm_open()
19937 ; return 0; }
19938 EOF
19939 if { (eval echo configure:19940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19940   rm -rf conftest*
19941   eval "ac_cv_lib_$ac_lib_var=yes"
19942 else
19943   echo "configure: failed program was:" >&5
19944   cat conftest.$ac_ext >&5
19945   rm -rf conftest*
19946   eval "ac_cv_lib_$ac_lib_var=no"
19947 fi
19948 rm -f conftest*
19949 LIBS="$ac_save_LIBS"
19950
19951 fi
19952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19953   echo "$ac_t""yes" 1>&6
19954   ol_cv_lib_ndbm=-lndbm
19955 else
19956   echo "$ac_t""no" 1>&6
19957
19958                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19959 echo "configure:19960: checking for dbm_open in -ldbm" >&5
19960 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19962   echo $ac_n "(cached) $ac_c" 1>&6
19963 else
19964   ac_save_LIBS="$LIBS"
19965 LIBS="-ldbm  $LIBS"
19966 cat > conftest.$ac_ext <<EOF
19967 #line 19968 "configure"
19968 #include "confdefs.h"
19969 /* Override any gcc2 internal prototype to avoid an error.  */
19970 /* We use char because int might match the return type of a gcc2
19971     builtin and then its argument prototype would still apply.  */
19972 char dbm_open();
19973
19974 int main() {
19975 dbm_open()
19976 ; return 0; }
19977 EOF
19978 if { (eval echo configure:19979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19979   rm -rf conftest*
19980   eval "ac_cv_lib_$ac_lib_var=yes"
19981 else
19982   echo "configure: failed program was:" >&5
19983   cat conftest.$ac_ext >&5
19984   rm -rf conftest*
19985   eval "ac_cv_lib_$ac_lib_var=no"
19986 fi
19987 rm -f conftest*
19988 LIBS="$ac_save_LIBS"
19989
19990 fi
19991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19992   echo "$ac_t""yes" 1>&6
19993   ol_cv_lib_ndbm=-ldbm
19994 else
19995   echo "$ac_t""no" 1>&6
19996 ol_cv_lib_ndbm=no
19997 fi
19998                 
19999 fi
20000
20001         
20002 fi
20003
20004         LIBS="$ol_LIBS"
20005
20006 fi
20007
20008 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20009
20010
20011  for ac_hdr in ndbm.h
20012 do
20013 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20014 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20015 echo "configure:20016: checking for $ac_hdr" >&5
20016 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20017   echo $ac_n "(cached) $ac_c" 1>&6
20018 else
20019   cat > conftest.$ac_ext <<EOF
20020 #line 20021 "configure"
20021 #include "confdefs.h"
20022 #include <$ac_hdr>
20023 EOF
20024 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20025 { (eval echo configure:20026: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20026 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20027 if test -z "$ac_err"; then
20028   rm -rf conftest*
20029   eval "ac_cv_header_$ac_safe=yes"
20030 else
20031   echo "$ac_err" >&5
20032   echo "configure: failed program was:" >&5
20033   cat conftest.$ac_ext >&5
20034   rm -rf conftest*
20035   eval "ac_cv_header_$ac_safe=no"
20036 fi
20037 rm -f conftest*
20038 fi
20039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20040   echo "$ac_t""yes" 1>&6
20041     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20042   cat >> confdefs.h <<EOF
20043 #define $ac_tr_hdr 1
20044 EOF
20045  
20046 else
20047   echo "$ac_t""no" 1>&6
20048 fi
20049 done
20050
20051  echo $ac_n "checking for db""... $ac_c" 1>&6
20052 echo "configure:20053: checking for db" >&5
20053 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20054   echo $ac_n "(cached) $ac_c" 1>&6
20055 else
20056   
20057         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20058                 ol_cv_ndbm=no
20059         else
20060                 ol_cv_ndbm=yes
20061         fi
20062
20063 fi
20064
20065 echo "$ac_t""$ol_cv_ndbm" 1>&6
20066  if test $ol_cv_ndbm = yes ; then
20067         cat >> confdefs.h <<\EOF
20068 #define HAVE_NDBM 1
20069 EOF
20070
20071  fi
20072
20073
20074         if test $ol_cv_ndbm = yes ; then
20075                 ol_link_ldbm=ndbm
20076                 ol_with_ldbm_api=ndbm
20077
20078                 if test $ol_cv_lib_ndbm != yes ; then
20079                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20080                 fi
20081         fi
20082 fi
20083
20084 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20085         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20086         if test $ol_enable_ldbm = yes ; then
20087                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20088         fi
20089
20090         echo "configure: warning: disabling LDBM" 1>&2
20091         ol_enable_ldbm=no
20092 fi
20093
20094
20095 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20096         BUILD_LIBS_DYNAMIC=shared
20097         cat >> confdefs.h <<\EOF
20098 #define LDAP_LIBS_DYNAMIC 1
20099 EOF
20100
20101         LTSTATIC=""
20102 else
20103         BUILD_LIBS_DYNAMIC=static
20104         LTSTATIC="-static"
20105 fi
20106
20107 if test $ol_enable_wrappers != no ; then
20108         for ac_hdr in tcpd.h
20109 do
20110 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20111 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20112 echo "configure:20113: checking for $ac_hdr" >&5
20113 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20114   echo $ac_n "(cached) $ac_c" 1>&6
20115 else
20116   cat > conftest.$ac_ext <<EOF
20117 #line 20118 "configure"
20118 #include "confdefs.h"
20119 #include <$ac_hdr>
20120 EOF
20121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20122 { (eval echo configure:20123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20124 if test -z "$ac_err"; then
20125   rm -rf conftest*
20126   eval "ac_cv_header_$ac_safe=yes"
20127 else
20128   echo "$ac_err" >&5
20129   echo "configure: failed program was:" >&5
20130   cat conftest.$ac_ext >&5
20131   rm -rf conftest*
20132   eval "ac_cv_header_$ac_safe=no"
20133 fi
20134 rm -f conftest*
20135 fi
20136 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20137   echo "$ac_t""yes" 1>&6
20138     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20139   cat >> confdefs.h <<EOF
20140 #define $ac_tr_hdr 1
20141 EOF
20142  
20143                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20144 echo "configure:20145: checking for TCP wrappers library" >&5
20145                 save_LIBS="$LIBS"
20146                 LIBS="$LIBS -lwrap"
20147                 cat > conftest.$ac_ext <<EOF
20148 #line 20149 "configure"
20149 #include "confdefs.h"
20150
20151 #include <tcpd.h>
20152 int allow_severity = 0;
20153 int deny_severity  = 0;
20154
20155 struct request_info *req;
20156                 
20157 int main() {
20158
20159 hosts_access(req)
20160                 
20161 ; return 0; }
20162 EOF
20163 if { (eval echo configure:20164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20164   rm -rf conftest*
20165   echo "$ac_t""-lwrap" 1>&6
20166                 have_wrappers=yes
20167                 LIBS="$save_LIBS"
20168 else
20169   echo "configure: failed program was:" >&5
20170   cat conftest.$ac_ext >&5
20171   rm -rf conftest*
20172   
20173                                 LIBS="$LIBS -lnsl"
20174                 cat > conftest.$ac_ext <<EOF
20175 #line 20176 "configure"
20176 #include "confdefs.h"
20177
20178 #include <tcpd.h>
20179 int allow_severity = 0;
20180 int deny_severity  = 0;
20181
20182 struct request_info *req;
20183                 
20184 int main() {
20185
20186 hosts_access(req)
20187                 
20188 ; return 0; }
20189 EOF
20190 if { (eval echo configure:20191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20191   rm -rf conftest*
20192   echo "$ac_t""-lwrap -lnsl" 1>&6
20193                 have_wrappers=yes
20194                 LIBS="$save_LIBS -lnsl"
20195 else
20196   echo "configure: failed program was:" >&5
20197   cat conftest.$ac_ext >&5
20198   rm -rf conftest*
20199   
20200                 echo "$ac_t""no" 1>&6
20201                 have_wrappers=no
20202                 LIBS=$save_LIBS
20203 fi
20204 rm -f conftest*
20205 fi
20206 rm -f conftest*
20207 else
20208   echo "$ac_t""no" 1>&6
20209 have_wrappers=no
20210 fi
20211 done
20212
20213
20214         if test $have_wrappers = yes ; then
20215                 cat >> confdefs.h <<\EOF
20216 #define HAVE_TCPD 1
20217 EOF
20218
20219                 WRAP_LIBS="-lwrap"
20220         elif test $ol_enable_wrappers = yes ; then
20221                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20222         else
20223                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20224                 WRAP_LIBS=""
20225         fi
20226 fi
20227
20228 if test $ol_enable_syslog != no ; then
20229         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20230 echo "configure:20231: checking for openlog" >&5
20231 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20232   echo $ac_n "(cached) $ac_c" 1>&6
20233 else
20234   cat > conftest.$ac_ext <<EOF
20235 #line 20236 "configure"
20236 #include "confdefs.h"
20237 /* System header to define __stub macros and hopefully few prototypes,
20238     which can conflict with char openlog(); below.  */
20239 #include <assert.h>
20240 /* Override any gcc2 internal prototype to avoid an error.  */
20241 /* We use char because int might match the return type of a gcc2
20242     builtin and then its argument prototype would still apply.  */
20243 char openlog();
20244 char (*f)();
20245
20246 int main() {
20247
20248 /* The GNU C library defines this for functions which it implements
20249     to always fail with ENOSYS.  Some functions are actually named
20250     something starting with __ and the normal name is an alias.  */
20251 #if defined (__stub_openlog) || defined (__stub___openlog)
20252 choke me
20253 #else
20254 f = openlog;
20255 #endif
20256
20257 ; return 0; }
20258 EOF
20259 if { (eval echo configure:20260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20260   rm -rf conftest*
20261   eval "ac_cv_func_openlog=yes"
20262 else
20263   echo "configure: failed program was:" >&5
20264   cat conftest.$ac_ext >&5
20265   rm -rf conftest*
20266   eval "ac_cv_func_openlog=no"
20267 fi
20268 rm -f conftest*
20269 fi
20270
20271 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20272   echo "$ac_t""yes" 1>&6
20273   :
20274 else
20275   echo "$ac_t""no" 1>&6
20276 fi
20277
20278         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20279                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20280         fi
20281         ol_enable_syslog=$ac_cv_func_openlog
20282 fi
20283
20284
20285 ol_link_sql=no
20286 if test $ol_enable_sql != no ; then
20287         for ac_hdr in sql.h sqlext.h
20288 do
20289 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20290 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20291 echo "configure:20292: checking for $ac_hdr" >&5
20292 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20293   echo $ac_n "(cached) $ac_c" 1>&6
20294 else
20295   cat > conftest.$ac_ext <<EOF
20296 #line 20297 "configure"
20297 #include "confdefs.h"
20298 #include <$ac_hdr>
20299 EOF
20300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20301 { (eval echo configure:20302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20303 if test -z "$ac_err"; then
20304   rm -rf conftest*
20305   eval "ac_cv_header_$ac_safe=yes"
20306 else
20307   echo "$ac_err" >&5
20308   echo "configure: failed program was:" >&5
20309   cat conftest.$ac_ext >&5
20310   rm -rf conftest*
20311   eval "ac_cv_header_$ac_safe=no"
20312 fi
20313 rm -f conftest*
20314 fi
20315 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20316   echo "$ac_t""yes" 1>&6
20317     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20318   cat >> confdefs.h <<EOF
20319 #define $ac_tr_hdr 1
20320 EOF
20321  
20322 else
20323   echo "$ac_t""no" 1>&6
20324 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20325         
20326 fi
20327 done
20328
20329
20330         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20331 echo "configure:20332: checking for SQLDriverConnect in -liodbc" >&5
20332 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20334   echo $ac_n "(cached) $ac_c" 1>&6
20335 else
20336   ac_save_LIBS="$LIBS"
20337 LIBS="-liodbc  $LIBS"
20338 cat > conftest.$ac_ext <<EOF
20339 #line 20340 "configure"
20340 #include "confdefs.h"
20341 /* Override any gcc2 internal prototype to avoid an error.  */
20342 /* We use char because int might match the return type of a gcc2
20343     builtin and then its argument prototype would still apply.  */
20344 char SQLDriverConnect();
20345
20346 int main() {
20347 SQLDriverConnect()
20348 ; return 0; }
20349 EOF
20350 if { (eval echo configure:20351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20351   rm -rf conftest*
20352   eval "ac_cv_lib_$ac_lib_var=yes"
20353 else
20354   echo "configure: failed program was:" >&5
20355   cat conftest.$ac_ext >&5
20356   rm -rf conftest*
20357   eval "ac_cv_lib_$ac_lib_var=no"
20358 fi
20359 rm -f conftest*
20360 LIBS="$ac_save_LIBS"
20361
20362 fi
20363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20364   echo "$ac_t""yes" 1>&6
20365   have_iodbc=yes
20366 else
20367   echo "$ac_t""no" 1>&6
20368 have_iodbc=no
20369 fi
20370
20371         if test $have_iodbc = yes ; then
20372                 ol_link_sql="-liodbc"
20373         else
20374                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20375 echo "configure:20376: checking for SQLDriverConnect in -lodbc" >&5
20376 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20378   echo $ac_n "(cached) $ac_c" 1>&6
20379 else
20380   ac_save_LIBS="$LIBS"
20381 LIBS="-lodbc  $LIBS"
20382 cat > conftest.$ac_ext <<EOF
20383 #line 20384 "configure"
20384 #include "confdefs.h"
20385 /* Override any gcc2 internal prototype to avoid an error.  */
20386 /* We use char because int might match the return type of a gcc2
20387     builtin and then its argument prototype would still apply.  */
20388 char SQLDriverConnect();
20389
20390 int main() {
20391 SQLDriverConnect()
20392 ; return 0; }
20393 EOF
20394 if { (eval echo configure:20395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20395   rm -rf conftest*
20396   eval "ac_cv_lib_$ac_lib_var=yes"
20397 else
20398   echo "configure: failed program was:" >&5
20399   cat conftest.$ac_ext >&5
20400   rm -rf conftest*
20401   eval "ac_cv_lib_$ac_lib_var=no"
20402 fi
20403 rm -f conftest*
20404 LIBS="$ac_save_LIBS"
20405
20406 fi
20407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20408   echo "$ac_t""yes" 1>&6
20409   have_odbc=yes
20410 else
20411   echo "$ac_t""no" 1>&6
20412 have_odbc=no
20413 fi
20414
20415                 if test $have_odbc = yes ; then
20416                         ol_link_sql="-lodbc"
20417                 fi
20418         fi
20419
20420         if test $ol_link_sql != no ; then
20421                 SLAPD_SQL_LIBS="$ol_link_sql"
20422
20423         elif test $ol_enable_sql != auto ; then
20424                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20425         fi
20426 fi
20427
20428 ol_link_sasl=no
20429 ol_link_spasswd=no
20430 if test $ol_with_cyrus_sasl != no ; then
20431         for ac_hdr in sasl/sasl.h sasl.h
20432 do
20433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20435 echo "configure:20436: checking for $ac_hdr" >&5
20436 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20437   echo $ac_n "(cached) $ac_c" 1>&6
20438 else
20439   cat > conftest.$ac_ext <<EOF
20440 #line 20441 "configure"
20441 #include "confdefs.h"
20442 #include <$ac_hdr>
20443 EOF
20444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20445 { (eval echo configure:20446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20447 if test -z "$ac_err"; then
20448   rm -rf conftest*
20449   eval "ac_cv_header_$ac_safe=yes"
20450 else
20451   echo "$ac_err" >&5
20452   echo "configure: failed program was:" >&5
20453   cat conftest.$ac_ext >&5
20454   rm -rf conftest*
20455   eval "ac_cv_header_$ac_safe=no"
20456 fi
20457 rm -f conftest*
20458 fi
20459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20460   echo "$ac_t""yes" 1>&6
20461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20462   cat >> confdefs.h <<EOF
20463 #define $ac_tr_hdr 1
20464 EOF
20465  
20466 else
20467   echo "$ac_t""no" 1>&6
20468 fi
20469 done
20470
20471
20472         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20473                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20474 echo "configure:20475: checking for sasl_client_init in -lsasl2" >&5
20475 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20476 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20477   echo $ac_n "(cached) $ac_c" 1>&6
20478 else
20479   ac_save_LIBS="$LIBS"
20480 LIBS="-lsasl2  $LIBS"
20481 cat > conftest.$ac_ext <<EOF
20482 #line 20483 "configure"
20483 #include "confdefs.h"
20484 /* Override any gcc2 internal prototype to avoid an error.  */
20485 /* We use char because int might match the return type of a gcc2
20486     builtin and then its argument prototype would still apply.  */
20487 char sasl_client_init();
20488
20489 int main() {
20490 sasl_client_init()
20491 ; return 0; }
20492 EOF
20493 if { (eval echo configure:20494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20494   rm -rf conftest*
20495   eval "ac_cv_lib_$ac_lib_var=yes"
20496 else
20497   echo "configure: failed program was:" >&5
20498   cat conftest.$ac_ext >&5
20499   rm -rf conftest*
20500   eval "ac_cv_lib_$ac_lib_var=no"
20501 fi
20502 rm -f conftest*
20503 LIBS="$ac_save_LIBS"
20504
20505 fi
20506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20507   echo "$ac_t""yes" 1>&6
20508   ol_link_sasl="-lsasl2"
20509 else
20510   echo "$ac_t""no" 1>&6
20511 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20512 echo "configure:20513: checking for sasl_client_init in -lsasl" >&5
20513 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20514 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20515   echo $ac_n "(cached) $ac_c" 1>&6
20516 else
20517   ac_save_LIBS="$LIBS"
20518 LIBS="-lsasl  $LIBS"
20519 cat > conftest.$ac_ext <<EOF
20520 #line 20521 "configure"
20521 #include "confdefs.h"
20522 /* Override any gcc2 internal prototype to avoid an error.  */
20523 /* We use char because int might match the return type of a gcc2
20524     builtin and then its argument prototype would still apply.  */
20525 char sasl_client_init();
20526
20527 int main() {
20528 sasl_client_init()
20529 ; return 0; }
20530 EOF
20531 if { (eval echo configure:20532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20532   rm -rf conftest*
20533   eval "ac_cv_lib_$ac_lib_var=yes"
20534 else
20535   echo "configure: failed program was:" >&5
20536   cat conftest.$ac_ext >&5
20537   rm -rf conftest*
20538   eval "ac_cv_lib_$ac_lib_var=no"
20539 fi
20540 rm -f conftest*
20541 LIBS="$ac_save_LIBS"
20542
20543 fi
20544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20545   echo "$ac_t""yes" 1>&6
20546   ol_link_sasl="-lsasl"
20547 else
20548   echo "$ac_t""no" 1>&6
20549 fi
20550
20551 fi
20552
20553         fi
20554
20555         if test $ol_link_sasl = no ; then
20556                 if test $ol_with_cyrus_sasl != auto ; then
20557                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20558                 else
20559                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20560                         echo "configure: warning: SASL authentication not supported!" 1>&2
20561                         if test $ol_link_tls = no ; then
20562                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20563                         fi
20564                 fi
20565         else
20566                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20567 echo "configure:20568: checking Cyrus SASL library version" >&5
20568 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20569   echo $ac_n "(cached) $ac_c" 1>&6
20570 else
20571   
20572         cat > conftest.$ac_ext <<EOF
20573 #line 20574 "configure"
20574 #include "confdefs.h"
20575
20576 #ifdef HAVE_SASL_SASL_H
20577 #include <sasl/sasl.h>
20578 #else
20579 #include <sasl.h>
20580 #endif
20581
20582 /* Require 2.1.15+ */
20583 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20584         char *__sasl_compat = "2.2+ or better okay (we guess)";
20585 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20586         && SASL_VERSION_STEP >=15
20587         char *__sasl_compat = "2.1.15+ or better okay";
20588 #endif
20589         
20590 EOF
20591 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20592   egrep "__sasl_compat" >/dev/null 2>&1; then
20593   rm -rf conftest*
20594   ol_cv_sasl_compat=yes
20595 else
20596   rm -rf conftest*
20597   ol_cv_sasl_compat=no
20598 fi
20599 rm -f conftest*
20600
20601 fi
20602
20603 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20604
20605                 if test $ol_cv_sasl_compat = no ; then
20606                         ol_link_sasl=no
20607                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20608                 fi
20609
20610                 cat >> confdefs.h <<\EOF
20611 #define HAVE_CYRUS_SASL 1
20612 EOF
20613
20614                 SASL_LIBS="$ol_link_sasl"
20615                 if test $ol_enable_spasswd != no ; then
20616                         ol_link_spasswd=yes
20617                 fi
20618
20619                 ac_save_LIBS="$LIBS"
20620                 LIBS="$LIBS $ol_link_sasl"
20621                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20622 echo "configure:20623: checking for sasl_version" >&5
20623 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20624   echo $ac_n "(cached) $ac_c" 1>&6
20625 else
20626   cat > conftest.$ac_ext <<EOF
20627 #line 20628 "configure"
20628 #include "confdefs.h"
20629 /* System header to define __stub macros and hopefully few prototypes,
20630     which can conflict with char sasl_version(); below.  */
20631 #include <assert.h>
20632 /* Override any gcc2 internal prototype to avoid an error.  */
20633 /* We use char because int might match the return type of a gcc2
20634     builtin and then its argument prototype would still apply.  */
20635 char sasl_version();
20636 char (*f)();
20637
20638 int main() {
20639
20640 /* The GNU C library defines this for functions which it implements
20641     to always fail with ENOSYS.  Some functions are actually named
20642     something starting with __ and the normal name is an alias.  */
20643 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20644 choke me
20645 #else
20646 f = sasl_version;
20647 #endif
20648
20649 ; return 0; }
20650 EOF
20651 if { (eval echo configure:20652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20652   rm -rf conftest*
20653   eval "ac_cv_func_sasl_version=yes"
20654 else
20655   echo "configure: failed program was:" >&5
20656   cat conftest.$ac_ext >&5
20657   rm -rf conftest*
20658   eval "ac_cv_func_sasl_version=no"
20659 fi
20660 rm -f conftest*
20661 fi
20662
20663 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20664   echo "$ac_t""yes" 1>&6
20665   cat >> confdefs.h <<\EOF
20666 #define HAVE_SASL_VERSION 1
20667 EOF
20668
20669 else
20670   echo "$ac_t""no" 1>&6
20671 fi
20672
20673                 LIBS="$ac_save_LIBS"
20674         fi
20675
20676 else
20677         echo "configure: warning: SASL authentication not supported!" 1>&2
20678         if test $ol_link_tls = no ; then
20679                 echo "configure: warning: Strong authentication not supported!" 1>&2
20680         fi
20681 fi
20682
20683 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20684         dev=no
20685         if test -r /dev/urandom ; then
20686                 dev="/dev/urandom";
20687         elif test -r /idev/urandom ; then
20688                 dev="/idev/urandom";
20689         elif test -r /dev/srandom ; then
20690                 dev="/dev/srandom";
20691         elif test -r /dev/random ; then
20692                 dev="/dev/random";
20693         elif test -r /idev/random ; then
20694                 dev="/idev/random";
20695         fi
20696
20697         if test $dev != no ; then
20698                 cat >> confdefs.h <<EOF
20699 #define URANDOM_DEVICE "$dev"
20700 EOF
20701
20702         fi
20703 fi
20704
20705 ol_link_fetch=no
20706 if test $ol_with_fetch != no ; then
20707         ol_LIBS=$LIBS
20708 LIBS="-lfetch -lcom_err $LIBS"
20709 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20710 echo "configure:20711: checking fetch(3) library" >&5
20711 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20712   echo $ac_n "(cached) $ac_c" 1>&6
20713 else
20714   
20715         cat > conftest.$ac_ext <<EOF
20716 #line 20717 "configure"
20717 #include "confdefs.h"
20718
20719 #include <sys/param.h>
20720 #include <stdio.h>
20721 #include <fetch.h>
20722 int main() {
20723 struct url *u = fetchParseURL("file:///"); 
20724 ; return 0; }
20725 EOF
20726 if { (eval echo configure:20727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20727   rm -rf conftest*
20728   ol_cv_lib_fetch=yes
20729 else
20730   echo "configure: failed program was:" >&5
20731   cat conftest.$ac_ext >&5
20732   rm -rf conftest*
20733   ol_cv_lib_fetch=no
20734 fi
20735 rm -f conftest*
20736 fi
20737
20738 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20739 LIBS=$ol_LIBS
20740 if test $ol_cv_lib_fetch != no ; then
20741         ol_link_fetch="-lfetch -lcom_err"
20742         cat >> confdefs.h <<\EOF
20743 #define HAVE_FETCH 1
20744 EOF
20745
20746 fi
20747
20748
20749         if test $ol_cv_lib_fetch != no ; then
20750                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20751                 ol_link_fetch=freebsd
20752
20753         elif test $ol_with_fetch != auto ; then
20754                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20755         fi 
20756 fi
20757
20758 if test $ol_enable_crypt != no ; then
20759         save_LIBS="$LIBS"
20760         LIBS="$TLS_LIBS $LIBS"
20761
20762         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20763 echo "configure:20764: checking for crypt" >&5
20764 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20765   echo $ac_n "(cached) $ac_c" 1>&6
20766 else
20767   cat > conftest.$ac_ext <<EOF
20768 #line 20769 "configure"
20769 #include "confdefs.h"
20770 /* System header to define __stub macros and hopefully few prototypes,
20771     which can conflict with char crypt(); below.  */
20772 #include <assert.h>
20773 /* Override any gcc2 internal prototype to avoid an error.  */
20774 /* We use char because int might match the return type of a gcc2
20775     builtin and then its argument prototype would still apply.  */
20776 char crypt();
20777 char (*f)();
20778
20779 int main() {
20780
20781 /* The GNU C library defines this for functions which it implements
20782     to always fail with ENOSYS.  Some functions are actually named
20783     something starting with __ and the normal name is an alias.  */
20784 #if defined (__stub_crypt) || defined (__stub___crypt)
20785 choke me
20786 #else
20787 f = crypt;
20788 #endif
20789
20790 ; return 0; }
20791 EOF
20792 if { (eval echo configure:20793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20793   rm -rf conftest*
20794   eval "ac_cv_func_crypt=yes"
20795 else
20796   echo "configure: failed program was:" >&5
20797   cat conftest.$ac_ext >&5
20798   rm -rf conftest*
20799   eval "ac_cv_func_crypt=no"
20800 fi
20801 rm -f conftest*
20802 fi
20803
20804 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20805   echo "$ac_t""yes" 1>&6
20806   have_crypt=yes
20807 else
20808   echo "$ac_t""no" 1>&6
20809
20810                 LIBS="$save_LIBS"
20811                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20812 echo "configure:20813: checking for crypt in -lcrypt" >&5
20813 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20814 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20815   echo $ac_n "(cached) $ac_c" 1>&6
20816 else
20817   ac_save_LIBS="$LIBS"
20818 LIBS="-lcrypt  $LIBS"
20819 cat > conftest.$ac_ext <<EOF
20820 #line 20821 "configure"
20821 #include "confdefs.h"
20822 /* Override any gcc2 internal prototype to avoid an error.  */
20823 /* We use char because int might match the return type of a gcc2
20824     builtin and then its argument prototype would still apply.  */
20825 char crypt();
20826
20827 int main() {
20828 crypt()
20829 ; return 0; }
20830 EOF
20831 if { (eval echo configure:20832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20832   rm -rf conftest*
20833   eval "ac_cv_lib_$ac_lib_var=yes"
20834 else
20835   echo "configure: failed program was:" >&5
20836   cat conftest.$ac_ext >&5
20837   rm -rf conftest*
20838   eval "ac_cv_lib_$ac_lib_var=no"
20839 fi
20840 rm -f conftest*
20841 LIBS="$ac_save_LIBS"
20842
20843 fi
20844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20845   echo "$ac_t""yes" 1>&6
20846   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20847                         have_crypt=yes
20848 else
20849   echo "$ac_t""no" 1>&6
20850 have_crypt=no
20851 fi
20852
20853 fi
20854
20855
20856         LIBS="$save_LIBS"
20857
20858         if test $have_crypt = yes ; then
20859                 cat >> confdefs.h <<\EOF
20860 #define HAVE_CRYPT 1
20861 EOF
20862
20863         else
20864                 echo "configure: warning: could not find crypt" 1>&2
20865                 if test $ol_enable_crypt = yes ; then
20866                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
20867                 fi
20868
20869                 echo "configure: warning: disabling crypt support" 1>&2
20870                 ol_enable_crypt=no
20871         fi
20872 fi
20873
20874 if test $ol_enable_proctitle != no ; then
20875         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20876 echo "configure:20877: checking for setproctitle" >&5
20877 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20878   echo $ac_n "(cached) $ac_c" 1>&6
20879 else
20880   cat > conftest.$ac_ext <<EOF
20881 #line 20882 "configure"
20882 #include "confdefs.h"
20883 /* System header to define __stub macros and hopefully few prototypes,
20884     which can conflict with char setproctitle(); below.  */
20885 #include <assert.h>
20886 /* Override any gcc2 internal prototype to avoid an error.  */
20887 /* We use char because int might match the return type of a gcc2
20888     builtin and then its argument prototype would still apply.  */
20889 char setproctitle();
20890 char (*f)();
20891
20892 int main() {
20893
20894 /* The GNU C library defines this for functions which it implements
20895     to always fail with ENOSYS.  Some functions are actually named
20896     something starting with __ and the normal name is an alias.  */
20897 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20898 choke me
20899 #else
20900 f = setproctitle;
20901 #endif
20902
20903 ; return 0; }
20904 EOF
20905 if { (eval echo configure:20906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20906   rm -rf conftest*
20907   eval "ac_cv_func_setproctitle=yes"
20908 else
20909   echo "configure: failed program was:" >&5
20910   cat conftest.$ac_ext >&5
20911   rm -rf conftest*
20912   eval "ac_cv_func_setproctitle=no"
20913 fi
20914 rm -f conftest*
20915 fi
20916
20917 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20918   echo "$ac_t""yes" 1>&6
20919   have_setproctitle=yes
20920 else
20921   echo "$ac_t""no" 1>&6
20922
20923                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20924 echo "configure:20925: checking for setproctitle in -lutil" >&5
20925 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20926 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20927   echo $ac_n "(cached) $ac_c" 1>&6
20928 else
20929   ac_save_LIBS="$LIBS"
20930 LIBS="-lutil  $LIBS"
20931 cat > conftest.$ac_ext <<EOF
20932 #line 20933 "configure"
20933 #include "confdefs.h"
20934 /* Override any gcc2 internal prototype to avoid an error.  */
20935 /* We use char because int might match the return type of a gcc2
20936     builtin and then its argument prototype would still apply.  */
20937 char setproctitle();
20938
20939 int main() {
20940 setproctitle()
20941 ; return 0; }
20942 EOF
20943 if { (eval echo configure:20944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20944   rm -rf conftest*
20945   eval "ac_cv_lib_$ac_lib_var=yes"
20946 else
20947   echo "configure: failed program was:" >&5
20948   cat conftest.$ac_ext >&5
20949   rm -rf conftest*
20950   eval "ac_cv_lib_$ac_lib_var=no"
20951 fi
20952 rm -f conftest*
20953 LIBS="$ac_save_LIBS"
20954
20955 fi
20956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20957   echo "$ac_t""yes" 1>&6
20958   have_setproctitle=yes
20959                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20960 else
20961   echo "$ac_t""no" 1>&6
20962 have_setproctitle=no
20963                         LIBOBJS="$LIBOBJS setproctitle.o"
20964                         LIBSRCS="$LIBSRCS setproctitle.c"
20965 fi
20966
20967 fi
20968
20969
20970         if test $have_setproctitle = yes ; then
20971                 cat >> confdefs.h <<\EOF
20972 #define HAVE_SETPROCTITLE 1
20973 EOF
20974
20975         fi
20976 fi
20977
20978 if test $ol_enable_slp != no ; then
20979         for ac_hdr in slp.h 
20980 do
20981 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20982 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20983 echo "configure:20984: checking for $ac_hdr" >&5
20984 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20985   echo $ac_n "(cached) $ac_c" 1>&6
20986 else
20987   cat > conftest.$ac_ext <<EOF
20988 #line 20989 "configure"
20989 #include "confdefs.h"
20990 #include <$ac_hdr>
20991 EOF
20992 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20993 { (eval echo configure:20994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20994 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20995 if test -z "$ac_err"; then
20996   rm -rf conftest*
20997   eval "ac_cv_header_$ac_safe=yes"
20998 else
20999   echo "$ac_err" >&5
21000   echo "configure: failed program was:" >&5
21001   cat conftest.$ac_ext >&5
21002   rm -rf conftest*
21003   eval "ac_cv_header_$ac_safe=no"
21004 fi
21005 rm -f conftest*
21006 fi
21007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21008   echo "$ac_t""yes" 1>&6
21009     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21010   cat >> confdefs.h <<EOF
21011 #define $ac_tr_hdr 1
21012 EOF
21013  
21014 else
21015   echo "$ac_t""no" 1>&6
21016 fi
21017 done
21018
21019
21020         if test $ac_cv_header_slp_h = yes ; then
21021                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21022 echo "configure:21023: checking for SLPOpen in -lslp" >&5
21023 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21025   echo $ac_n "(cached) $ac_c" 1>&6
21026 else
21027   ac_save_LIBS="$LIBS"
21028 LIBS="-lslp  $LIBS"
21029 cat > conftest.$ac_ext <<EOF
21030 #line 21031 "configure"
21031 #include "confdefs.h"
21032 /* Override any gcc2 internal prototype to avoid an error.  */
21033 /* We use char because int might match the return type of a gcc2
21034     builtin and then its argument prototype would still apply.  */
21035 char SLPOpen();
21036
21037 int main() {
21038 SLPOpen()
21039 ; return 0; }
21040 EOF
21041 if { (eval echo configure:21042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21042   rm -rf conftest*
21043   eval "ac_cv_lib_$ac_lib_var=yes"
21044 else
21045   echo "configure: failed program was:" >&5
21046   cat conftest.$ac_ext >&5
21047   rm -rf conftest*
21048   eval "ac_cv_lib_$ac_lib_var=no"
21049 fi
21050 rm -f conftest*
21051 LIBS="$ac_save_LIBS"
21052
21053 fi
21054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21055   echo "$ac_t""yes" 1>&6
21056   have_slp=yes
21057 else
21058   echo "$ac_t""no" 1>&6
21059 have_slp=no
21060 fi
21061
21062                 if test $have_slp = yes ; then
21063                         cat >> confdefs.h <<\EOF
21064 #define HAVE_SLP 1
21065 EOF
21066
21067                         SLAPD_SLP_LIBS=-lslp
21068                 fi
21069
21070         elif test $ol_enable_slp = yes ; then
21071                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21072         fi
21073 fi
21074
21075
21076 echo $ac_n "checking long long""... $ac_c" 1>&6
21077 echo "configure:21078: checking long long" >&5
21078 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21079   echo $ac_n "(cached) $ac_c" 1>&6
21080 else
21081   
21082         cat > conftest.$ac_ext <<EOF
21083 #line 21084 "configure"
21084 #include "confdefs.h"
21085
21086 int main() {
21087 long long x;
21088 ; return 0; }
21089 EOF
21090 if { (eval echo configure:21091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21091   rm -rf conftest*
21092   ol_cv_type_long_long=yes
21093 else
21094   echo "configure: failed program was:" >&5
21095   cat conftest.$ac_ext >&5
21096   rm -rf conftest*
21097   ol_cv_type_long_long=no
21098 fi
21099 rm -f conftest*
21100 fi
21101
21102 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21103 if test $ol_cv_type_long_long = yes; then
21104         cat >> confdefs.h <<\EOF
21105 #define HAVE_LONG_LONG 1
21106 EOF
21107
21108 fi
21109
21110 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21111 echo "configure:21112: checking for ANSI C header files" >&5
21112 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21113   echo $ac_n "(cached) $ac_c" 1>&6
21114 else
21115   cat > conftest.$ac_ext <<EOF
21116 #line 21117 "configure"
21117 #include "confdefs.h"
21118 #include <stdlib.h>
21119 #include <stdarg.h>
21120 #include <string.h>
21121 #include <float.h>
21122 EOF
21123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21124 { (eval echo configure:21125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21126 if test -z "$ac_err"; then
21127   rm -rf conftest*
21128   ac_cv_header_stdc=yes
21129 else
21130   echo "$ac_err" >&5
21131   echo "configure: failed program was:" >&5
21132   cat conftest.$ac_ext >&5
21133   rm -rf conftest*
21134   ac_cv_header_stdc=no
21135 fi
21136 rm -f conftest*
21137
21138 if test $ac_cv_header_stdc = yes; then
21139   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21140 cat > conftest.$ac_ext <<EOF
21141 #line 21142 "configure"
21142 #include "confdefs.h"
21143 #include <string.h>
21144 EOF
21145 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21146   egrep "memchr" >/dev/null 2>&1; then
21147   :
21148 else
21149   rm -rf conftest*
21150   ac_cv_header_stdc=no
21151 fi
21152 rm -f conftest*
21153
21154 fi
21155
21156 if test $ac_cv_header_stdc = yes; then
21157   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21158 cat > conftest.$ac_ext <<EOF
21159 #line 21160 "configure"
21160 #include "confdefs.h"
21161 #include <stdlib.h>
21162 EOF
21163 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21164   egrep "free" >/dev/null 2>&1; then
21165   :
21166 else
21167   rm -rf conftest*
21168   ac_cv_header_stdc=no
21169 fi
21170 rm -f conftest*
21171
21172 fi
21173
21174 if test $ac_cv_header_stdc = yes; then
21175   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21176 if test "$cross_compiling" = yes; then
21177   :
21178 else
21179   cat > conftest.$ac_ext <<EOF
21180 #line 21181 "configure"
21181 #include "confdefs.h"
21182 #include <ctype.h>
21183 #if ((' ' & 0x0FF) == 0x020)
21184 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21185 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21186 #else
21187 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21188  || ('j' <= (c) && (c) <= 'r') \
21189  || ('s' <= (c) && (c) <= 'z'))
21190 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21191 #endif
21192 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21193 int main () { int i; for (i = 0; i < 256; i++)
21194 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21195 exit (0); }
21196
21197 EOF
21198 if { (eval echo configure:21199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21199 then
21200   :
21201 else
21202   echo "configure: failed program was:" >&5
21203   cat conftest.$ac_ext >&5
21204   rm -fr conftest*
21205   ac_cv_header_stdc=no
21206 fi
21207 rm -fr conftest*
21208 fi
21209
21210 fi
21211 fi
21212
21213 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21214 if test $ac_cv_header_stdc = yes; then
21215   cat >> confdefs.h <<\EOF
21216 #define STDC_HEADERS 1
21217 EOF
21218
21219 fi
21220
21221 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21222 echo "configure:21223: checking for mode_t" >&5
21223 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21224   echo $ac_n "(cached) $ac_c" 1>&6
21225 else
21226   cat > conftest.$ac_ext <<EOF
21227 #line 21228 "configure"
21228 #include "confdefs.h"
21229 #include <sys/types.h>
21230 #if STDC_HEADERS
21231 #include <stdlib.h>
21232 #include <stddef.h>
21233 #endif
21234
21235 EOF
21236 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21237   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21238   rm -rf conftest*
21239   eval "ac_cv_type_mode_t=yes"
21240 else
21241   rm -rf conftest*
21242   eval "ac_cv_type_mode_t=no"
21243 fi
21244 rm -f conftest*
21245
21246 fi
21247 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21248   echo "$ac_t""yes" 1>&6
21249 else
21250   echo "$ac_t""no" 1>&6
21251   cat >> confdefs.h <<EOF
21252 #define mode_t int
21253 EOF
21254
21255 fi
21256
21257 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21258 echo "configure:21259: checking for off_t" >&5
21259 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21260   echo $ac_n "(cached) $ac_c" 1>&6
21261 else
21262   cat > conftest.$ac_ext <<EOF
21263 #line 21264 "configure"
21264 #include "confdefs.h"
21265 #include <sys/types.h>
21266 #if STDC_HEADERS
21267 #include <stdlib.h>
21268 #include <stddef.h>
21269 #endif
21270
21271 EOF
21272 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21273   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21274   rm -rf conftest*
21275   eval "ac_cv_type_off_t=yes"
21276 else
21277   rm -rf conftest*
21278   eval "ac_cv_type_off_t=no"
21279 fi
21280 rm -f conftest*
21281
21282 fi
21283 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21284   echo "$ac_t""yes" 1>&6
21285 else
21286   echo "$ac_t""no" 1>&6
21287   cat >> confdefs.h <<EOF
21288 #define off_t long
21289 EOF
21290
21291 fi
21292
21293 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21294 echo "configure:21295: checking for pid_t" >&5
21295 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21296   echo $ac_n "(cached) $ac_c" 1>&6
21297 else
21298   cat > conftest.$ac_ext <<EOF
21299 #line 21300 "configure"
21300 #include "confdefs.h"
21301 #include <sys/types.h>
21302 #if STDC_HEADERS
21303 #include <stdlib.h>
21304 #include <stddef.h>
21305 #endif
21306
21307 EOF
21308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21309   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21310   rm -rf conftest*
21311   eval "ac_cv_type_pid_t=yes"
21312 else
21313   rm -rf conftest*
21314   eval "ac_cv_type_pid_t=no"
21315 fi
21316 rm -f conftest*
21317
21318 fi
21319 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21320   echo "$ac_t""yes" 1>&6
21321 else
21322   echo "$ac_t""no" 1>&6
21323   cat >> confdefs.h <<EOF
21324 #define pid_t int
21325 EOF
21326
21327 fi
21328
21329 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21330 echo "configure:21331: checking for ptrdiff_t" >&5
21331 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21332   echo $ac_n "(cached) $ac_c" 1>&6
21333 else
21334   cat > conftest.$ac_ext <<EOF
21335 #line 21336 "configure"
21336 #include "confdefs.h"
21337 #include <stddef.h>
21338 int main() {
21339 ptrdiff_t p
21340 ; return 0; }
21341 EOF
21342 if { (eval echo configure:21343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21343   rm -rf conftest*
21344   am_cv_type_ptrdiff_t=yes
21345 else
21346   echo "configure: failed program was:" >&5
21347   cat conftest.$ac_ext >&5
21348   rm -rf conftest*
21349   am_cv_type_ptrdiff_t=no
21350 fi
21351 rm -f conftest*
21352 fi
21353
21354 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21355    if test $am_cv_type_ptrdiff_t = yes; then
21356      cat >> confdefs.h <<\EOF
21357 #define HAVE_PTRDIFF_T 1
21358 EOF
21359
21360    fi
21361
21362 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21363 echo "configure:21364: checking return type of signal handlers" >&5
21364 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21365   echo $ac_n "(cached) $ac_c" 1>&6
21366 else
21367   cat > conftest.$ac_ext <<EOF
21368 #line 21369 "configure"
21369 #include "confdefs.h"
21370 #include <sys/types.h>
21371 #include <signal.h>
21372 #ifdef signal
21373 #undef signal
21374 #endif
21375 #ifdef __cplusplus
21376 extern "C" void (*signal (int, void (*)(int)))(int);
21377 #else
21378 void (*signal ()) ();
21379 #endif
21380
21381 int main() {
21382 int i;
21383 ; return 0; }
21384 EOF
21385 if { (eval echo configure:21386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21386   rm -rf conftest*
21387   ac_cv_type_signal=void
21388 else
21389   echo "configure: failed program was:" >&5
21390   cat conftest.$ac_ext >&5
21391   rm -rf conftest*
21392   ac_cv_type_signal=int
21393 fi
21394 rm -f conftest*
21395 fi
21396
21397 echo "$ac_t""$ac_cv_type_signal" 1>&6
21398 cat >> confdefs.h <<EOF
21399 #define RETSIGTYPE $ac_cv_type_signal
21400 EOF
21401
21402
21403 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21404 echo "configure:21405: checking for size_t" >&5
21405 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21406   echo $ac_n "(cached) $ac_c" 1>&6
21407 else
21408   cat > conftest.$ac_ext <<EOF
21409 #line 21410 "configure"
21410 #include "confdefs.h"
21411 #include <sys/types.h>
21412 #if STDC_HEADERS
21413 #include <stdlib.h>
21414 #include <stddef.h>
21415 #endif
21416
21417 EOF
21418 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21419   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21420   rm -rf conftest*
21421   eval "ac_cv_type_size_t=yes"
21422 else
21423   rm -rf conftest*
21424   eval "ac_cv_type_size_t=no"
21425 fi
21426 rm -f conftest*
21427
21428 fi
21429 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21430   echo "$ac_t""yes" 1>&6
21431 else
21432   echo "$ac_t""no" 1>&6
21433   cat >> confdefs.h <<EOF
21434 #define size_t unsigned
21435 EOF
21436
21437 fi
21438
21439
21440 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21441 echo "configure:21442: checking for ssize_t" >&5
21442 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21443   echo $ac_n "(cached) $ac_c" 1>&6
21444 else
21445   cat > conftest.$ac_ext <<EOF
21446 #line 21447 "configure"
21447 #include "confdefs.h"
21448 #include <sys/types.h>
21449 #if STDC_HEADERS
21450 #include <stdlib.h>
21451 #include <stddef.h>
21452 #endif
21453
21454 EOF
21455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21456   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21457   rm -rf conftest*
21458   eval "ac_cv_type_ssize_t=yes"
21459 else
21460   rm -rf conftest*
21461   eval "ac_cv_type_ssize_t=no"
21462 fi
21463 rm -f conftest*
21464
21465 fi
21466 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21467   echo "$ac_t""yes" 1>&6
21468 else
21469   echo "$ac_t""no" 1>&6
21470   cat >> confdefs.h <<EOF
21471 #define ssize_t signed int
21472 EOF
21473
21474 fi
21475
21476 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21477 echo "configure:21478: checking for caddr_t" >&5
21478 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21479   echo $ac_n "(cached) $ac_c" 1>&6
21480 else
21481   cat > conftest.$ac_ext <<EOF
21482 #line 21483 "configure"
21483 #include "confdefs.h"
21484 #include <sys/types.h>
21485 #if STDC_HEADERS
21486 #include <stdlib.h>
21487 #include <stddef.h>
21488 #endif
21489
21490 EOF
21491 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21492   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21493   rm -rf conftest*
21494   eval "ac_cv_type_caddr_t=yes"
21495 else
21496   rm -rf conftest*
21497   eval "ac_cv_type_caddr_t=no"
21498 fi
21499 rm -f conftest*
21500
21501 fi
21502 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21503   echo "$ac_t""yes" 1>&6
21504 else
21505   echo "$ac_t""no" 1>&6
21506   cat >> confdefs.h <<EOF
21507 #define caddr_t char *
21508 EOF
21509
21510 fi
21511
21512
21513 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21514 echo "configure:21515: checking for socklen_t" >&5
21515 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21516   echo $ac_n "(cached) $ac_c" 1>&6
21517 else
21518   cat > conftest.$ac_ext <<EOF
21519 #line 21520 "configure"
21520 #include "confdefs.h"
21521
21522 #ifdef HAVE_SYS_TYPES_H
21523 #include <sys/types.h>
21524 #endif
21525 #ifdef HAVE_SYS_SOCKET_H
21526 #include <sys/socket.h>
21527 #endif
21528
21529 int main() {
21530 socklen_t len;
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_socklen_t=yes
21536 else
21537   echo "configure: failed program was:" >&5
21538   cat conftest.$ac_ext >&5
21539   rm -rf conftest*
21540   ol_cv_type_socklen_t=no
21541 fi
21542 rm -f conftest*
21543 fi
21544
21545 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21546   if test $ol_cv_type_socklen_t = no; then
21547     cat >> confdefs.h <<\EOF
21548 #define socklen_t int
21549 EOF
21550
21551   fi
21552  
21553 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21554 echo "configure:21555: checking for member st_blksize in aggregate type struct stat" >&5
21555 if eval "test \"\${ac_cv_c_struct_member_st_blksize+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 <sys/types.h>
21562 #include <sys/stat.h>
21563 int main() {
21564 struct stat foo; foo.st_blksize;
21565 ; return 0; }
21566 EOF
21567 if { (eval echo configure:21568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21568   rm -rf conftest*
21569   ac_cv_c_struct_member_st_blksize=yes
21570 else
21571   echo "configure: failed program was:" >&5
21572   cat conftest.$ac_ext >&5
21573   rm -rf conftest*
21574   ac_cv_c_struct_member_st_blksize=no
21575 fi
21576 rm -f conftest*
21577 fi
21578
21579 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21580 st_blksize="$ac_cv_c_struct_member_st_blksize"
21581 if test $ac_cv_c_struct_member_st_blksize = yes; then
21582   cat >> confdefs.h <<\EOF
21583 #define HAVE_ST_BLKSIZE 1
21584 EOF
21585
21586 fi
21587
21588 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21589 echo "configure:21590: checking whether time.h and sys/time.h may both be included" >&5
21590 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21591   echo $ac_n "(cached) $ac_c" 1>&6
21592 else
21593   cat > conftest.$ac_ext <<EOF
21594 #line 21595 "configure"
21595 #include "confdefs.h"
21596 #include <sys/types.h>
21597 #include <sys/time.h>
21598 #include <time.h>
21599 int main() {
21600 struct tm *tp;
21601 ; return 0; }
21602 EOF
21603 if { (eval echo configure:21604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21604   rm -rf conftest*
21605   ac_cv_header_time=yes
21606 else
21607   echo "configure: failed program was:" >&5
21608   cat conftest.$ac_ext >&5
21609   rm -rf conftest*
21610   ac_cv_header_time=no
21611 fi
21612 rm -f conftest*
21613 fi
21614
21615 echo "$ac_t""$ac_cv_header_time" 1>&6
21616 if test $ac_cv_header_time = yes; then
21617   cat >> confdefs.h <<\EOF
21618 #define TIME_WITH_SYS_TIME 1
21619 EOF
21620
21621 fi
21622
21623 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21624 echo "configure:21625: checking whether struct tm is in sys/time.h or time.h" >&5
21625 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21626   echo $ac_n "(cached) $ac_c" 1>&6
21627 else
21628   cat > conftest.$ac_ext <<EOF
21629 #line 21630 "configure"
21630 #include "confdefs.h"
21631 #include <sys/types.h>
21632 #include <time.h>
21633 int main() {
21634 struct tm *tp; tp->tm_sec;
21635 ; return 0; }
21636 EOF
21637 if { (eval echo configure:21638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21638   rm -rf conftest*
21639   ac_cv_struct_tm=time.h
21640 else
21641   echo "configure: failed program was:" >&5
21642   cat conftest.$ac_ext >&5
21643   rm -rf conftest*
21644   ac_cv_struct_tm=sys/time.h
21645 fi
21646 rm -f conftest*
21647 fi
21648
21649 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21650 if test $ac_cv_struct_tm = sys/time.h; then
21651   cat >> confdefs.h <<\EOF
21652 #define TM_IN_SYS_TIME 1
21653 EOF
21654
21655 fi
21656
21657 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21658 echo "configure:21659: checking for uid_t in sys/types.h" >&5
21659 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21660   echo $ac_n "(cached) $ac_c" 1>&6
21661 else
21662   cat > conftest.$ac_ext <<EOF
21663 #line 21664 "configure"
21664 #include "confdefs.h"
21665 #include <sys/types.h>
21666 EOF
21667 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21668   egrep "uid_t" >/dev/null 2>&1; then
21669   rm -rf conftest*
21670   ac_cv_type_uid_t=yes
21671 else
21672   rm -rf conftest*
21673   ac_cv_type_uid_t=no
21674 fi
21675 rm -f conftest*
21676
21677 fi
21678
21679 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21680 if test $ac_cv_type_uid_t = no; then
21681   cat >> confdefs.h <<\EOF
21682 #define uid_t int
21683 EOF
21684
21685   cat >> confdefs.h <<\EOF
21686 #define gid_t int
21687 EOF
21688
21689 fi
21690
21691 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21692 echo "configure:21693: checking for sig_atomic_t" >&5
21693 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21694   echo $ac_n "(cached) $ac_c" 1>&6
21695 else
21696   cat > conftest.$ac_ext <<EOF
21697 #line 21698 "configure"
21698 #include "confdefs.h"
21699 #include <signal.h>
21700 int main() {
21701 sig_atomic_t atomic;
21702 ; return 0; }
21703 EOF
21704 if { (eval echo configure:21705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21705   rm -rf conftest*
21706   ol_cv_type_sig_atomic_t=yes
21707 else
21708   echo "configure: failed program was:" >&5
21709   cat conftest.$ac_ext >&5
21710   rm -rf conftest*
21711   ol_cv_type_sig_atomic_t=no
21712 fi
21713 rm -f conftest*
21714 fi
21715
21716 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21717   if test $ol_cv_type_sig_atomic_t = no; then
21718     cat >> confdefs.h <<\EOF
21719 #define sig_atomic_t int
21720 EOF
21721
21722   fi
21723  
21724
21725
21726 # test for pw_gecos in struct passwd
21727 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21728 echo "configure:21729: checking struct passwd for pw_gecos" >&5
21729 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21730   echo $ac_n "(cached) $ac_c" 1>&6
21731 else
21732   
21733         cat > conftest.$ac_ext <<EOF
21734 #line 21735 "configure"
21735 #include "confdefs.h"
21736 #include <pwd.h>
21737 int main() {
21738
21739         struct passwd pwd;
21740         pwd.pw_gecos = pwd.pw_name;
21741
21742 ; return 0; }
21743 EOF
21744 if { (eval echo configure:21745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21745   rm -rf conftest*
21746   ol_cv_struct_passwd_pw_gecos=yes
21747 else
21748   echo "configure: failed program was:" >&5
21749   cat conftest.$ac_ext >&5
21750   rm -rf conftest*
21751   ol_cv_struct_passwd_pw_gecos=no
21752 fi
21753 rm -f conftest*
21754 fi
21755
21756 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21757 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21758         cat >> confdefs.h <<\EOF
21759 #define HAVE_PW_GECOS 1
21760 EOF
21761
21762 fi
21763
21764 # test for pw_passwd in struct passwd
21765 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21766 echo "configure:21767: checking struct passwd for pw_passwd" >&5
21767 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21768   echo $ac_n "(cached) $ac_c" 1>&6
21769 else
21770   
21771         cat > conftest.$ac_ext <<EOF
21772 #line 21773 "configure"
21773 #include "confdefs.h"
21774 #include <pwd.h>
21775 int main() {
21776
21777         struct passwd pwd;
21778         pwd.pw_passwd = pwd.pw_name;
21779
21780 ; return 0; }
21781 EOF
21782 if { (eval echo configure:21783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21783   rm -rf conftest*
21784   ol_cv_struct_passwd_pw_passwd=yes
21785 else
21786   echo "configure: failed program was:" >&5
21787   cat conftest.$ac_ext >&5
21788   rm -rf conftest*
21789   ol_cv_struct_passwd_pw_passwd=no
21790 fi
21791 rm -f conftest*
21792 fi
21793
21794 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21795 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21796         cat >> confdefs.h <<\EOF
21797 #define HAVE_PW_PASSWD 1
21798 EOF
21799
21800 fi
21801
21802
21803 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21804 echo "configure:21805: checking if toupper() requires islower()" >&5
21805 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21806   echo $ac_n "(cached) $ac_c" 1>&6
21807 else
21808   
21809         if test "$cross_compiling" = yes; then
21810   ol_cv_c_upper_lower=safe
21811 else
21812   cat > conftest.$ac_ext <<EOF
21813 #line 21814 "configure"
21814 #include "confdefs.h"
21815
21816 #include <ctype.h>
21817 main()
21818 {
21819         if ('C' == toupper('C'))
21820                 exit(0);
21821         else
21822                 exit(1);
21823 }
21824 EOF
21825 if { (eval echo configure:21826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21826 then
21827   ol_cv_c_upper_lower=no
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831   rm -fr conftest*
21832   ol_cv_c_upper_lower=yes
21833 fi
21834 rm -fr conftest*
21835 fi
21836
21837 fi
21838
21839 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21840 if test $ol_cv_c_upper_lower != no ; then
21841         cat >> confdefs.h <<\EOF
21842 #define C_UPPER_LOWER 1
21843 EOF
21844
21845 fi
21846
21847 echo $ac_n "checking for working const""... $ac_c" 1>&6
21848 echo "configure:21849: checking for working const" >&5
21849 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21850   echo $ac_n "(cached) $ac_c" 1>&6
21851 else
21852   cat > conftest.$ac_ext <<EOF
21853 #line 21854 "configure"
21854 #include "confdefs.h"
21855
21856 int main() {
21857
21858 /* Ultrix mips cc rejects this.  */
21859 typedef int charset[2]; const charset x;
21860 /* SunOS 4.1.1 cc rejects this.  */
21861 char const *const *ccp;
21862 char **p;
21863 /* NEC SVR4.0.2 mips cc rejects this.  */
21864 struct point {int x, y;};
21865 static struct point const zero = {0,0};
21866 /* AIX XL C 1.02.0.0 rejects this.
21867    It does not let you subtract one const X* pointer from another in an arm
21868    of an if-expression whose if-part is not a constant expression */
21869 const char *g = "string";
21870 ccp = &g + (g ? g-g : 0);
21871 /* HPUX 7.0 cc rejects these. */
21872 ++ccp;
21873 p = (char**) ccp;
21874 ccp = (char const *const *) p;
21875 { /* SCO 3.2v4 cc rejects this.  */
21876   char *t;
21877   char const *s = 0 ? (char *) 0 : (char const *) 0;
21878
21879   *t++ = 0;
21880 }
21881 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21882   int x[] = {25, 17};
21883   const int *foo = &x[0];
21884   ++foo;
21885 }
21886 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21887   typedef const int *iptr;
21888   iptr p = 0;
21889   ++p;
21890 }
21891 { /* AIX XL C 1.02.0.0 rejects this saying
21892      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21893   struct s { int j; const int *ap[3]; };
21894   struct s *b; b->j = 5;
21895 }
21896 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21897   const int foo = 10;
21898 }
21899
21900 ; return 0; }
21901 EOF
21902 if { (eval echo configure:21903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21903   rm -rf conftest*
21904   ac_cv_c_const=yes
21905 else
21906   echo "configure: failed program was:" >&5
21907   cat conftest.$ac_ext >&5
21908   rm -rf conftest*
21909   ac_cv_c_const=no
21910 fi
21911 rm -f conftest*
21912 fi
21913
21914 echo "$ac_t""$ac_cv_c_const" 1>&6
21915 if test $ac_cv_c_const = no; then
21916   cat >> confdefs.h <<\EOF
21917 #define const 
21918 EOF
21919
21920 fi
21921
21922 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21923 echo "configure:21924: checking if compiler understands volatile" >&5
21924 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21925   echo $ac_n "(cached) $ac_c" 1>&6
21926 else
21927   cat > conftest.$ac_ext <<EOF
21928 #line 21929 "configure"
21929 #include "confdefs.h"
21930 int x, y, z;
21931 int main() {
21932 volatile int a; int * volatile b = x ? &y : &z;
21933       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21934       *b = 0;
21935 ; return 0; }
21936 EOF
21937 if { (eval echo configure:21938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21938   rm -rf conftest*
21939   ol_cv_c_volatile=yes
21940 else
21941   echo "configure: failed program was:" >&5
21942   cat conftest.$ac_ext >&5
21943   rm -rf conftest*
21944   ol_cv_c_volatile=no
21945 fi
21946 rm -f conftest*
21947 fi
21948
21949 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21950   if test $ol_cv_c_volatile = yes; then
21951     : 
21952   else
21953     cat >> confdefs.h <<\EOF
21954 #define volatile 
21955 EOF
21956
21957   fi
21958  
21959
21960 if test $cross_compiling = yes ; then
21961         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
21962         cat >> confdefs.h <<\EOF
21963 #define CROSS_COMPILING 1
21964 EOF
21965
21966 else
21967         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21968 echo "configure:21969: checking whether byte ordering is bigendian" >&5
21969 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21970   echo $ac_n "(cached) $ac_c" 1>&6
21971 else
21972   ac_cv_c_bigendian=unknown
21973 # See if sys/param.h defines the BYTE_ORDER macro.
21974 cat > conftest.$ac_ext <<EOF
21975 #line 21976 "configure"
21976 #include "confdefs.h"
21977 #include <sys/types.h>
21978 #include <sys/param.h>
21979 int main() {
21980
21981 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21982  bogus endian macros
21983 #endif
21984 ; return 0; }
21985 EOF
21986 if { (eval echo configure:21987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21987   rm -rf conftest*
21988   # It does; now see whether it defined to BIG_ENDIAN or not.
21989 cat > conftest.$ac_ext <<EOF
21990 #line 21991 "configure"
21991 #include "confdefs.h"
21992 #include <sys/types.h>
21993 #include <sys/param.h>
21994 int main() {
21995
21996 #if BYTE_ORDER != BIG_ENDIAN
21997  not big endian
21998 #endif
21999 ; return 0; }
22000 EOF
22001 if { (eval echo configure:22002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22002   rm -rf conftest*
22003   ac_cv_c_bigendian=yes
22004 else
22005   echo "configure: failed program was:" >&5
22006   cat conftest.$ac_ext >&5
22007   rm -rf conftest*
22008   ac_cv_c_bigendian=no
22009 fi
22010 rm -f conftest*
22011 else
22012   echo "configure: failed program was:" >&5
22013   cat conftest.$ac_ext >&5
22014 fi
22015 rm -f conftest*
22016 if test $ac_cv_c_bigendian = unknown; then
22017 if test "$cross_compiling" = yes; then
22018     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22019 else
22020   cat > conftest.$ac_ext <<EOF
22021 #line 22022 "configure"
22022 #include "confdefs.h"
22023 main () {
22024   /* Are we little or big endian?  From Harbison&Steele.  */
22025   union
22026   {
22027     long l;
22028     char c[sizeof (long)];
22029   } u;
22030   u.l = 1;
22031   exit (u.c[sizeof (long) - 1] == 1);
22032 }
22033 EOF
22034 if { (eval echo configure:22035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22035 then
22036   ac_cv_c_bigendian=no
22037 else
22038   echo "configure: failed program was:" >&5
22039   cat conftest.$ac_ext >&5
22040   rm -fr conftest*
22041   ac_cv_c_bigendian=yes
22042 fi
22043 rm -fr conftest*
22044 fi
22045
22046 fi
22047 fi
22048
22049 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22050 if test $ac_cv_c_bigendian = yes; then
22051   cat >> confdefs.h <<\EOF
22052 #define WORDS_BIGENDIAN 1
22053 EOF
22054
22055 fi
22056
22057 fi
22058
22059 echo $ac_n "checking size of short""... $ac_c" 1>&6
22060 echo "configure:22061: checking size of short" >&5 
22061 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22062   echo $ac_n "(cached) $ac_c" 1>&6
22063 else
22064   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22065   cat > conftest.$ac_ext <<EOF
22066 #line 22067 "configure"
22067 #include "confdefs.h"
22068 #include "confdefs.h" 
22069 #include <sys/types.h> 
22070  
22071
22072 int main() {
22073 switch (0) case 0: case (sizeof (short) == $ac_size):;
22074 ; return 0; }
22075 EOF
22076 if { (eval echo configure:22077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22077   rm -rf conftest*
22078   ac_cv_sizeof_short=$ac_size
22079 else
22080   echo "configure: failed program was:" >&5
22081   cat conftest.$ac_ext >&5
22082 fi
22083 rm -f conftest* 
22084   if test x$ac_cv_sizeof_short != x ; then break; fi 
22085 done 
22086
22087 fi
22088  
22089 if test x$ac_cv_sizeof_short = x ; then 
22090   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22091 fi 
22092 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22093 cat >> confdefs.h <<EOF
22094 #define SIZEOF_SHORT $ac_cv_sizeof_short
22095 EOF
22096  
22097  
22098 echo $ac_n "checking size of int""... $ac_c" 1>&6
22099 echo "configure:22100: checking size of int" >&5 
22100 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22101   echo $ac_n "(cached) $ac_c" 1>&6
22102 else
22103   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22104   cat > conftest.$ac_ext <<EOF
22105 #line 22106 "configure"
22106 #include "confdefs.h"
22107 #include "confdefs.h" 
22108 #include <sys/types.h> 
22109  
22110
22111 int main() {
22112 switch (0) case 0: case (sizeof (int) == $ac_size):;
22113 ; return 0; }
22114 EOF
22115 if { (eval echo configure:22116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22116   rm -rf conftest*
22117   ac_cv_sizeof_int=$ac_size
22118 else
22119   echo "configure: failed program was:" >&5
22120   cat conftest.$ac_ext >&5
22121 fi
22122 rm -f conftest* 
22123   if test x$ac_cv_sizeof_int != x ; then break; fi 
22124 done 
22125
22126 fi
22127  
22128 if test x$ac_cv_sizeof_int = x ; then 
22129   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22130 fi 
22131 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22132 cat >> confdefs.h <<EOF
22133 #define SIZEOF_INT $ac_cv_sizeof_int
22134 EOF
22135  
22136  
22137 echo $ac_n "checking size of long""... $ac_c" 1>&6
22138 echo "configure:22139: checking size of long" >&5 
22139 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22140   echo $ac_n "(cached) $ac_c" 1>&6
22141 else
22142   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22143   cat > conftest.$ac_ext <<EOF
22144 #line 22145 "configure"
22145 #include "confdefs.h"
22146 #include "confdefs.h" 
22147 #include <sys/types.h> 
22148  
22149
22150 int main() {
22151 switch (0) case 0: case (sizeof (long) == $ac_size):;
22152 ; return 0; }
22153 EOF
22154 if { (eval echo configure:22155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22155   rm -rf conftest*
22156   ac_cv_sizeof_long=$ac_size
22157 else
22158   echo "configure: failed program was:" >&5
22159   cat conftest.$ac_ext >&5
22160 fi
22161 rm -f conftest* 
22162   if test x$ac_cv_sizeof_long != x ; then break; fi 
22163 done 
22164
22165 fi
22166  
22167 if test x$ac_cv_sizeof_long = x ; then 
22168   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22169 fi 
22170 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22171 cat >> confdefs.h <<EOF
22172 #define SIZEOF_LONG $ac_cv_sizeof_long
22173 EOF
22174  
22175
22176
22177 if test "$ac_cv_sizeof_int" -lt 4 ; then
22178         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22179
22180         cat >> confdefs.h <<\EOF
22181 #define LBER_INT_T long
22182 EOF
22183
22184 else
22185         cat >> confdefs.h <<\EOF
22186 #define LBER_INT_T int
22187 EOF
22188
22189 fi
22190
22191 cat >> confdefs.h <<\EOF
22192 #define LBER_LEN_T long
22193 EOF
22194
22195 cat >> confdefs.h <<\EOF
22196 #define LBER_SOCKET_T int
22197 EOF
22198
22199 cat >> confdefs.h <<\EOF
22200 #define LBER_TAG_T long
22201 EOF
22202
22203
22204 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22205 echo "configure:22206: checking for 8-bit clean memcmp" >&5
22206 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22207   echo $ac_n "(cached) $ac_c" 1>&6
22208 else
22209   if test "$cross_compiling" = yes; then
22210   ac_cv_func_memcmp_clean=no
22211 else
22212   cat > conftest.$ac_ext <<EOF
22213 #line 22214 "configure"
22214 #include "confdefs.h"
22215
22216 main()
22217 {
22218   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22219   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22220 }
22221
22222 EOF
22223 if { (eval echo configure:22224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22224 then
22225   ac_cv_func_memcmp_clean=yes
22226 else
22227   echo "configure: failed program was:" >&5
22228   cat conftest.$ac_ext >&5
22229   rm -fr conftest*
22230   ac_cv_func_memcmp_clean=no
22231 fi
22232 rm -fr conftest*
22233 fi
22234
22235 fi
22236
22237 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22238 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22239
22240 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22241 echo "configure:22242: checking for strftime" >&5
22242 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22243   echo $ac_n "(cached) $ac_c" 1>&6
22244 else
22245   cat > conftest.$ac_ext <<EOF
22246 #line 22247 "configure"
22247 #include "confdefs.h"
22248 /* System header to define __stub macros and hopefully few prototypes,
22249     which can conflict with char strftime(); below.  */
22250 #include <assert.h>
22251 /* Override any gcc2 internal prototype to avoid an error.  */
22252 /* We use char because int might match the return type of a gcc2
22253     builtin and then its argument prototype would still apply.  */
22254 char strftime();
22255 char (*f)();
22256
22257 int main() {
22258
22259 /* The GNU C library defines this for functions which it implements
22260     to always fail with ENOSYS.  Some functions are actually named
22261     something starting with __ and the normal name is an alias.  */
22262 #if defined (__stub_strftime) || defined (__stub___strftime)
22263 choke me
22264 #else
22265 f = strftime;
22266 #endif
22267
22268 ; return 0; }
22269 EOF
22270 if { (eval echo configure:22271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22271   rm -rf conftest*
22272   eval "ac_cv_func_strftime=yes"
22273 else
22274   echo "configure: failed program was:" >&5
22275   cat conftest.$ac_ext >&5
22276   rm -rf conftest*
22277   eval "ac_cv_func_strftime=no"
22278 fi
22279 rm -f conftest*
22280 fi
22281
22282 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22283   echo "$ac_t""yes" 1>&6
22284   cat >> confdefs.h <<\EOF
22285 #define HAVE_STRFTIME 1
22286 EOF
22287
22288 else
22289   echo "$ac_t""no" 1>&6
22290 # strftime is in -lintl on SCO UNIX.
22291 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22292 echo "configure:22293: checking for strftime in -lintl" >&5
22293 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22295   echo $ac_n "(cached) $ac_c" 1>&6
22296 else
22297   ac_save_LIBS="$LIBS"
22298 LIBS="-lintl  $LIBS"
22299 cat > conftest.$ac_ext <<EOF
22300 #line 22301 "configure"
22301 #include "confdefs.h"
22302 /* Override any gcc2 internal prototype to avoid an error.  */
22303 /* We use char because int might match the return type of a gcc2
22304     builtin and then its argument prototype would still apply.  */
22305 char strftime();
22306
22307 int main() {
22308 strftime()
22309 ; return 0; }
22310 EOF
22311 if { (eval echo configure:22312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22312   rm -rf conftest*
22313   eval "ac_cv_lib_$ac_lib_var=yes"
22314 else
22315   echo "configure: failed program was:" >&5
22316   cat conftest.$ac_ext >&5
22317   rm -rf conftest*
22318   eval "ac_cv_lib_$ac_lib_var=no"
22319 fi
22320 rm -f conftest*
22321 LIBS="$ac_save_LIBS"
22322
22323 fi
22324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22325   echo "$ac_t""yes" 1>&6
22326   cat >> confdefs.h <<\EOF
22327 #define HAVE_STRFTIME 1
22328 EOF
22329
22330 LIBS="-lintl $LIBS"
22331 else
22332   echo "$ac_t""no" 1>&6
22333 fi
22334
22335 fi
22336
22337
22338 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22339 echo "configure:22340: checking for inet_aton()" >&5
22340 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22341   echo $ac_n "(cached) $ac_c" 1>&6
22342 else
22343   cat > conftest.$ac_ext <<EOF
22344 #line 22345 "configure"
22345 #include "confdefs.h"
22346
22347 #ifdef HAVE_SYS_TYPES_H
22348 #       include <sys/types.h>
22349 #endif
22350 #ifdef HAVE_SYS_SOCKET_H
22351 #       include <sys/socket.h>
22352 #       ifdef HAVE_SYS_SELECT_H
22353 #               include <sys/select.h>
22354 #       endif
22355 #       include <netinet/in.h>
22356 #       ifdef HAVE_ARPA_INET_H
22357 #               include <arpa/inet.h>
22358 #       endif
22359 #endif
22360
22361 int main() {
22362 struct in_addr in;
22363 int rc = inet_aton( "255.255.255.255", &in );
22364 ; return 0; }
22365 EOF
22366 if { (eval echo configure:22367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22367   rm -rf conftest*
22368   ol_cv_func_inet_aton=yes
22369 else
22370   echo "configure: failed program was:" >&5
22371   cat conftest.$ac_ext >&5
22372   rm -rf conftest*
22373   ol_cv_func_inet_aton=no
22374 fi
22375 rm -f conftest*
22376 fi
22377
22378 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22379   if test $ol_cv_func_inet_aton != no; then
22380     cat >> confdefs.h <<\EOF
22381 #define HAVE_INET_ATON 1
22382 EOF
22383
22384   fi
22385  
22386
22387 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22388 echo "configure:22389: checking for _spawnlp" >&5
22389 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22390   echo $ac_n "(cached) $ac_c" 1>&6
22391 else
22392   cat > conftest.$ac_ext <<EOF
22393 #line 22394 "configure"
22394 #include "confdefs.h"
22395 /* System header to define __stub macros and hopefully few prototypes,
22396     which can conflict with char _spawnlp(); below.  */
22397 #include <assert.h>
22398 /* Override any gcc2 internal prototype to avoid an error.  */
22399 /* We use char because int might match the return type of a gcc2
22400     builtin and then its argument prototype would still apply.  */
22401 char _spawnlp();
22402 char (*f)();
22403
22404 int main() {
22405
22406 /* The GNU C library defines this for functions which it implements
22407     to always fail with ENOSYS.  Some functions are actually named
22408     something starting with __ and the normal name is an alias.  */
22409 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22410 choke me
22411 #else
22412 f = _spawnlp;
22413 #endif
22414
22415 ; return 0; }
22416 EOF
22417 if { (eval echo configure:22418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22418   rm -rf conftest*
22419   eval "ac_cv_func__spawnlp=yes"
22420 else
22421   echo "configure: failed program was:" >&5
22422   cat conftest.$ac_ext >&5
22423   rm -rf conftest*
22424   eval "ac_cv_func__spawnlp=no"
22425 fi
22426 rm -f conftest*
22427 fi
22428
22429 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22430   echo "$ac_t""yes" 1>&6
22431   cat >> confdefs.h <<\EOF
22432 #define HAVE_SPAWNLP 1
22433 EOF
22434
22435 else
22436   echo "$ac_t""no" 1>&6
22437 fi
22438
22439
22440 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22441 echo "configure:22442: checking for _snprintf" >&5
22442 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22443   echo $ac_n "(cached) $ac_c" 1>&6
22444 else
22445   cat > conftest.$ac_ext <<EOF
22446 #line 22447 "configure"
22447 #include "confdefs.h"
22448 /* System header to define __stub macros and hopefully few prototypes,
22449     which can conflict with char _snprintf(); below.  */
22450 #include <assert.h>
22451 /* Override any gcc2 internal prototype to avoid an error.  */
22452 /* We use char because int might match the return type of a gcc2
22453     builtin and then its argument prototype would still apply.  */
22454 char _snprintf();
22455 char (*f)();
22456
22457 int main() {
22458
22459 /* The GNU C library defines this for functions which it implements
22460     to always fail with ENOSYS.  Some functions are actually named
22461     something starting with __ and the normal name is an alias.  */
22462 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22463 choke me
22464 #else
22465 f = _snprintf;
22466 #endif
22467
22468 ; return 0; }
22469 EOF
22470 if { (eval echo configure:22471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22471   rm -rf conftest*
22472   eval "ac_cv_func__snprintf=yes"
22473 else
22474   echo "configure: failed program was:" >&5
22475   cat conftest.$ac_ext >&5
22476   rm -rf conftest*
22477   eval "ac_cv_func__snprintf=no"
22478 fi
22479 rm -f conftest*
22480 fi
22481
22482 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22483   echo "$ac_t""yes" 1>&6
22484   ac_cv_func_snprintf=yes
22485         cat >> confdefs.h <<\EOF
22486 #define snprintf _snprintf
22487 EOF
22488
22489
22490 else
22491   echo "$ac_t""no" 1>&6
22492 fi
22493
22494
22495 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22496 echo "configure:22497: checking for _vsnprintf" >&5
22497 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22498   echo $ac_n "(cached) $ac_c" 1>&6
22499 else
22500   cat > conftest.$ac_ext <<EOF
22501 #line 22502 "configure"
22502 #include "confdefs.h"
22503 /* System header to define __stub macros and hopefully few prototypes,
22504     which can conflict with char _vsnprintf(); below.  */
22505 #include <assert.h>
22506 /* Override any gcc2 internal prototype to avoid an error.  */
22507 /* We use char because int might match the return type of a gcc2
22508     builtin and then its argument prototype would still apply.  */
22509 char _vsnprintf();
22510 char (*f)();
22511
22512 int main() {
22513
22514 /* The GNU C library defines this for functions which it implements
22515     to always fail with ENOSYS.  Some functions are actually named
22516     something starting with __ and the normal name is an alias.  */
22517 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22518 choke me
22519 #else
22520 f = _vsnprintf;
22521 #endif
22522
22523 ; return 0; }
22524 EOF
22525 if { (eval echo configure:22526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22526   rm -rf conftest*
22527   eval "ac_cv_func__vsnprintf=yes"
22528 else
22529   echo "configure: failed program was:" >&5
22530   cat conftest.$ac_ext >&5
22531   rm -rf conftest*
22532   eval "ac_cv_func__vsnprintf=no"
22533 fi
22534 rm -f conftest*
22535 fi
22536
22537 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22538   echo "$ac_t""yes" 1>&6
22539   ac_cv_func_vsnprintf=yes
22540         cat >> confdefs.h <<\EOF
22541 #define vsnprintf _vsnprintf
22542 EOF
22543
22544
22545 else
22546   echo "$ac_t""no" 1>&6
22547 fi
22548
22549
22550 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22551 echo "configure:22552: checking for vprintf" >&5
22552 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22553   echo $ac_n "(cached) $ac_c" 1>&6
22554 else
22555   cat > conftest.$ac_ext <<EOF
22556 #line 22557 "configure"
22557 #include "confdefs.h"
22558 /* System header to define __stub macros and hopefully few prototypes,
22559     which can conflict with char vprintf(); below.  */
22560 #include <assert.h>
22561 /* Override any gcc2 internal prototype to avoid an error.  */
22562 /* We use char because int might match the return type of a gcc2
22563     builtin and then its argument prototype would still apply.  */
22564 char vprintf();
22565 char (*f)();
22566
22567 int main() {
22568
22569 /* The GNU C library defines this for functions which it implements
22570     to always fail with ENOSYS.  Some functions are actually named
22571     something starting with __ and the normal name is an alias.  */
22572 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22573 choke me
22574 #else
22575 f = vprintf;
22576 #endif
22577
22578 ; return 0; }
22579 EOF
22580 if { (eval echo configure:22581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22581   rm -rf conftest*
22582   eval "ac_cv_func_vprintf=yes"
22583 else
22584   echo "configure: failed program was:" >&5
22585   cat conftest.$ac_ext >&5
22586   rm -rf conftest*
22587   eval "ac_cv_func_vprintf=no"
22588 fi
22589 rm -f conftest*
22590 fi
22591
22592 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22593   echo "$ac_t""yes" 1>&6
22594   cat >> confdefs.h <<\EOF
22595 #define HAVE_VPRINTF 1
22596 EOF
22597
22598 else
22599   echo "$ac_t""no" 1>&6
22600 fi
22601
22602 if test "$ac_cv_func_vprintf" != yes; then
22603 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22604 echo "configure:22605: checking for _doprnt" >&5
22605 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22606   echo $ac_n "(cached) $ac_c" 1>&6
22607 else
22608   cat > conftest.$ac_ext <<EOF
22609 #line 22610 "configure"
22610 #include "confdefs.h"
22611 /* System header to define __stub macros and hopefully few prototypes,
22612     which can conflict with char _doprnt(); below.  */
22613 #include <assert.h>
22614 /* Override any gcc2 internal prototype to avoid an error.  */
22615 /* We use char because int might match the return type of a gcc2
22616     builtin and then its argument prototype would still apply.  */
22617 char _doprnt();
22618 char (*f)();
22619
22620 int main() {
22621
22622 /* The GNU C library defines this for functions which it implements
22623     to always fail with ENOSYS.  Some functions are actually named
22624     something starting with __ and the normal name is an alias.  */
22625 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22626 choke me
22627 #else
22628 f = _doprnt;
22629 #endif
22630
22631 ; return 0; }
22632 EOF
22633 if { (eval echo configure:22634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22634   rm -rf conftest*
22635   eval "ac_cv_func__doprnt=yes"
22636 else
22637   echo "configure: failed program was:" >&5
22638   cat conftest.$ac_ext >&5
22639   rm -rf conftest*
22640   eval "ac_cv_func__doprnt=no"
22641 fi
22642 rm -f conftest*
22643 fi
22644
22645 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22646   echo "$ac_t""yes" 1>&6
22647   cat >> confdefs.h <<\EOF
22648 #define HAVE_DOPRNT 1
22649 EOF
22650
22651 else
22652   echo "$ac_t""no" 1>&6
22653 fi
22654
22655 fi
22656
22657
22658 if test $ac_cv_func_vprintf = yes ; then
22659                 for ac_func in snprintf vsnprintf
22660 do
22661 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22662 echo "configure:22663: checking for $ac_func" >&5
22663 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22664   echo $ac_n "(cached) $ac_c" 1>&6
22665 else
22666   cat > conftest.$ac_ext <<EOF
22667 #line 22668 "configure"
22668 #include "confdefs.h"
22669 /* System header to define __stub macros and hopefully few prototypes,
22670     which can conflict with char $ac_func(); below.  */
22671 #include <assert.h>
22672 /* Override any gcc2 internal prototype to avoid an error.  */
22673 /* We use char because int might match the return type of a gcc2
22674     builtin and then its argument prototype would still apply.  */
22675 char $ac_func();
22676 char (*f)();
22677
22678 int main() {
22679
22680 /* The GNU C library defines this for functions which it implements
22681     to always fail with ENOSYS.  Some functions are actually named
22682     something starting with __ and the normal name is an alias.  */
22683 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22684 choke me
22685 #else
22686 f = $ac_func;
22687 #endif
22688
22689 ; return 0; }
22690 EOF
22691 if { (eval echo configure:22692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22692   rm -rf conftest*
22693   eval "ac_cv_func_$ac_func=yes"
22694 else
22695   echo "configure: failed program was:" >&5
22696   cat conftest.$ac_ext >&5
22697   rm -rf conftest*
22698   eval "ac_cv_func_$ac_func=no"
22699 fi
22700 rm -f conftest*
22701 fi
22702
22703 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22704   echo "$ac_t""yes" 1>&6
22705     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22706   cat >> confdefs.h <<EOF
22707 #define $ac_tr_func 1
22708 EOF
22709  
22710 else
22711   echo "$ac_t""no" 1>&6
22712 fi
22713 done
22714
22715 fi
22716
22717 for ac_func in \
22718         bcopy                   \
22719         closesocket             \
22720         chroot                  \
22721         endgrent                \
22722         endpwent                \
22723         fcntl                   \
22724         flock                   \
22725         fstat                   \
22726         getdtablesize   \
22727         getgrgid                \
22728         gethostname             \
22729         getpass                 \
22730         getpassphrase   \
22731         getpwuid                \
22732         getpwnam                \
22733         getspnam                \
22734         gettimeofday    \
22735         initgroups              \
22736         lockf                   \
22737         memcpy                  \
22738         memmove                 \
22739         mkstemp                 \
22740         mktemp                  \
22741         pipe                    \
22742         read                    \
22743         recv                    \
22744         recvfrom                \
22745         setpwfile               \
22746         setgid                  \
22747         setegid                 \
22748         setsid                  \
22749         setuid                  \
22750         seteuid                 \
22751         sigaction               \
22752         signal                  \
22753         sigset                  \
22754         strdup                  \
22755         strerror                \
22756         strpbrk                 \
22757         strrchr                 \
22758         strsep                  \
22759         strstr                  \
22760         strtol                  \
22761         strtoul                 \
22762         strtoq                  \
22763         strtouq                 \
22764         strtoll                 \
22765         strspn                  \
22766         sysconf                 \
22767         usleep                  \
22768         waitpid                 \
22769         wait4                   \
22770         write                   \
22771         send                    \
22772         sendmsg                 \
22773         sendto                  \
22774
22775 do
22776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22777 echo "configure:22778: checking for $ac_func" >&5
22778 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22779   echo $ac_n "(cached) $ac_c" 1>&6
22780 else
22781   cat > conftest.$ac_ext <<EOF
22782 #line 22783 "configure"
22783 #include "confdefs.h"
22784 /* System header to define __stub macros and hopefully few prototypes,
22785     which can conflict with char $ac_func(); below.  */
22786 #include <assert.h>
22787 /* Override any gcc2 internal prototype to avoid an error.  */
22788 /* We use char because int might match the return type of a gcc2
22789     builtin and then its argument prototype would still apply.  */
22790 char $ac_func();
22791 char (*f)();
22792
22793 int main() {
22794
22795 /* The GNU C library defines this for functions which it implements
22796     to always fail with ENOSYS.  Some functions are actually named
22797     something starting with __ and the normal name is an alias.  */
22798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22799 choke me
22800 #else
22801 f = $ac_func;
22802 #endif
22803
22804 ; return 0; }
22805 EOF
22806 if { (eval echo configure:22807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22807   rm -rf conftest*
22808   eval "ac_cv_func_$ac_func=yes"
22809 else
22810   echo "configure: failed program was:" >&5
22811   cat conftest.$ac_ext >&5
22812   rm -rf conftest*
22813   eval "ac_cv_func_$ac_func=no"
22814 fi
22815 rm -f conftest*
22816 fi
22817
22818 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22819   echo "$ac_t""yes" 1>&6
22820     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22821   cat >> confdefs.h <<EOF
22822 #define $ac_tr_func 1
22823 EOF
22824  
22825 else
22826   echo "$ac_t""no" 1>&6
22827 fi
22828 done
22829
22830
22831 for ac_func in getopt getpeereid
22832 do
22833 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22834 echo "configure:22835: checking for $ac_func" >&5
22835 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22836   echo $ac_n "(cached) $ac_c" 1>&6
22837 else
22838   cat > conftest.$ac_ext <<EOF
22839 #line 22840 "configure"
22840 #include "confdefs.h"
22841 /* System header to define __stub macros and hopefully few prototypes,
22842     which can conflict with char $ac_func(); below.  */
22843 #include <assert.h>
22844 /* Override any gcc2 internal prototype to avoid an error.  */
22845 /* We use char because int might match the return type of a gcc2
22846     builtin and then its argument prototype would still apply.  */
22847 char $ac_func();
22848 char (*f)();
22849
22850 int main() {
22851
22852 /* The GNU C library defines this for functions which it implements
22853     to always fail with ENOSYS.  Some functions are actually named
22854     something starting with __ and the normal name is an alias.  */
22855 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22856 choke me
22857 #else
22858 f = $ac_func;
22859 #endif
22860
22861 ; return 0; }
22862 EOF
22863 if { (eval echo configure:22864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22864   rm -rf conftest*
22865   eval "ac_cv_func_$ac_func=yes"
22866 else
22867   echo "configure: failed program was:" >&5
22868   cat conftest.$ac_ext >&5
22869   rm -rf conftest*
22870   eval "ac_cv_func_$ac_func=no"
22871 fi
22872 rm -f conftest*
22873 fi
22874
22875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22876   echo "$ac_t""yes" 1>&6
22877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22878   cat >> confdefs.h <<EOF
22879 #define $ac_tr_func 1
22880 EOF
22881  
22882 else
22883   echo "$ac_t""no" 1>&6
22884 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22885 fi
22886 done
22887
22888
22889
22890 if test "$ac_cv_func_getopt" != yes; then
22891         LIBSRCS="$LIBSRCS getopt.c"
22892 fi
22893 if test "$ac_cv_func_getpeereid" != yes; then
22894         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22895 echo "configure:22896: checking for msg_accrights in msghdr" >&5
22896 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22897   echo $ac_n "(cached) $ac_c" 1>&6
22898 else
22899   cat > conftest.$ac_ext <<EOF
22900 #line 22901 "configure"
22901 #include "confdefs.h"
22902 #include <sys/socket.h>
22903 int main() {
22904 struct msghdr m; m.msg_accrightslen=0
22905 ; return 0; }
22906 EOF
22907 if { (eval echo configure:22908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22908   rm -rf conftest*
22909   ol_cv_msghdr_msg_accrights=yes
22910 else
22911   echo "configure: failed program was:" >&5
22912   cat conftest.$ac_ext >&5
22913   rm -rf conftest*
22914   ol_cv_msghdr_msg_accrights=no
22915 fi
22916 rm -f conftest*
22917         
22918 fi
22919
22920 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22921   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22922         cat >> confdefs.h <<\EOF
22923 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22924 EOF
22925
22926   fi
22927
22928         LIBSRCS="$LIBSRCS getpeereid.c"
22929 fi
22930 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22931         if test "$ac_cv_func_snprintf" != yes; then
22932                 cat >> confdefs.h <<\EOF
22933 #define snprintf ber_pvt_snprintf
22934 EOF
22935
22936         fi
22937         if test "$ac_cv_func_vsnprintf" != yes; then
22938                 cat >> confdefs.h <<\EOF
22939 #define vsnprintf ber_pvt_vsnprintf
22940 EOF
22941
22942         fi
22943 fi
22944
22945 # Check Configuration
22946 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22947 echo "configure:22948: checking declaration of sys_errlist" >&5
22948 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22949   echo $ac_n "(cached) $ac_c" 1>&6
22950 else
22951   
22952         cat > conftest.$ac_ext <<EOF
22953 #line 22954 "configure"
22954 #include "confdefs.h"
22955
22956 #include <stdio.h>
22957 #include <sys/types.h>
22958 #include <errno.h>
22959 #ifdef WINNT
22960 #include <stdlib.h>
22961 #endif 
22962 int main() {
22963 char *c = (char *) *sys_errlist
22964 ; return 0; }
22965 EOF
22966 if { (eval echo configure:22967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22967   rm -rf conftest*
22968   ol_cv_dcl_sys_errlist=yes
22969         ol_cv_have_sys_errlist=yes
22970 else
22971   echo "configure: failed program was:" >&5
22972   cat conftest.$ac_ext >&5
22973   rm -rf conftest*
22974   ol_cv_dcl_sys_errlist=no
22975 fi
22976 rm -f conftest*
22977 fi
22978
22979 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22980 #
22981 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22982 if test $ol_cv_dcl_sys_errlist = no ; then
22983         cat >> confdefs.h <<\EOF
22984 #define DECL_SYS_ERRLIST 1
22985 EOF
22986
22987
22988         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22989 echo "configure:22990: checking existence of sys_errlist" >&5
22990 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22991   echo $ac_n "(cached) $ac_c" 1>&6
22992 else
22993   
22994                 cat > conftest.$ac_ext <<EOF
22995 #line 22996 "configure"
22996 #include "confdefs.h"
22997 #include <errno.h>
22998 int main() {
22999 char *c = (char *) *sys_errlist
23000 ; return 0; }
23001 EOF
23002 if { (eval echo configure:23003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23003   rm -rf conftest*
23004   ol_cv_have_sys_errlist=yes
23005 else
23006   echo "configure: failed program was:" >&5
23007   cat conftest.$ac_ext >&5
23008   rm -rf conftest*
23009   ol_cv_have_sys_errlist=no
23010 fi
23011 rm -f conftest*
23012 fi
23013
23014 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23015 fi
23016 if test $ol_cv_have_sys_errlist = yes ; then
23017         cat >> confdefs.h <<\EOF
23018 #define HAVE_SYS_ERRLIST 1
23019 EOF
23020
23021 fi
23022
23023
23024
23025 if test "$ol_enable_slapi" != no ; then
23026                         for ac_hdr in ltdl.h
23027 do
23028 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23029 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23030 echo "configure:23031: checking for $ac_hdr" >&5
23031 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23032   echo $ac_n "(cached) $ac_c" 1>&6
23033 else
23034   cat > conftest.$ac_ext <<EOF
23035 #line 23036 "configure"
23036 #include "confdefs.h"
23037 #include <$ac_hdr>
23038 EOF
23039 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23040 { (eval echo configure:23041: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23041 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23042 if test -z "$ac_err"; then
23043   rm -rf conftest*
23044   eval "ac_cv_header_$ac_safe=yes"
23045 else
23046   echo "$ac_err" >&5
23047   echo "configure: failed program was:" >&5
23048   cat conftest.$ac_ext >&5
23049   rm -rf conftest*
23050   eval "ac_cv_header_$ac_safe=no"
23051 fi
23052 rm -f conftest*
23053 fi
23054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23055   echo "$ac_t""yes" 1>&6
23056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23057   cat >> confdefs.h <<EOF
23058 #define $ac_tr_hdr 1
23059 EOF
23060  
23061 else
23062   echo "$ac_t""no" 1>&6
23063 fi
23064 done
23065
23066
23067         if test $ac_cv_header_ltdl_h != yes ; then
23068                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23069         fi
23070         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23071 echo "configure:23072: checking for lt_dlinit in -lltdl" >&5
23072 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23073 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23074   echo $ac_n "(cached) $ac_c" 1>&6
23075 else
23076   ac_save_LIBS="$LIBS"
23077 LIBS="-lltdl  $LIBS"
23078 cat > conftest.$ac_ext <<EOF
23079 #line 23080 "configure"
23080 #include "confdefs.h"
23081 /* Override any gcc2 internal prototype to avoid an error.  */
23082 /* We use char because int might match the return type of a gcc2
23083     builtin and then its argument prototype would still apply.  */
23084 char lt_dlinit();
23085
23086 int main() {
23087 lt_dlinit()
23088 ; return 0; }
23089 EOF
23090 if { (eval echo configure:23091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23091   rm -rf conftest*
23092   eval "ac_cv_lib_$ac_lib_var=yes"
23093 else
23094   echo "configure: failed program was:" >&5
23095   cat conftest.$ac_ext >&5
23096   rm -rf conftest*
23097   eval "ac_cv_lib_$ac_lib_var=no"
23098 fi
23099 rm -f conftest*
23100 LIBS="$ac_save_LIBS"
23101
23102 fi
23103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23104   echo "$ac_t""yes" 1>&6
23105   
23106                 SLAPI_LIBS=-lltdl
23107                 LIBSLAPI=libslapi.a
23108                 LIBSLAPITOOLS=../libslapi.a
23109                 cat >> confdefs.h <<\EOF
23110 #define HAVE_LIBLTDL 1
23111 EOF
23112
23113         
23114 else
23115   echo "$ac_t""no" 1>&6
23116 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23117 fi
23118
23119
23120         cat >> confdefs.h <<\EOF
23121 #define LDAP_SLAPI 1
23122 EOF
23123
23124 fi
23125
23126 if test "$ol_enable_debug" != no ; then
23127         cat >> confdefs.h <<\EOF
23128 #define LDAP_DEBUG 1
23129 EOF
23130
23131 fi
23132 if test "$ol_enable_syslog" = yes ; then
23133         cat >> confdefs.h <<\EOF
23134 #define LDAP_SYSLOG 1
23135 EOF
23136
23137 fi
23138 if test "$ol_link_kbind" != no ; then
23139         cat >> confdefs.h <<\EOF
23140 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23141 EOF
23142
23143 fi
23144 if test "$ol_enable_proctitle" != no ; then
23145         cat >> confdefs.h <<\EOF
23146 #define LDAP_PROCTITLE 1
23147 EOF
23148
23149 fi
23150 if test "$ol_enable_referrals" != no ; then
23151         cat >> confdefs.h <<\EOF
23152 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23153 EOF
23154
23155 fi
23156 if test "$ol_enable_local" != no; then
23157         cat >> confdefs.h <<\EOF
23158 #define LDAP_PF_LOCAL 1
23159 EOF
23160
23161 fi
23162 if test "$ol_link_ipv6" != no; then
23163         cat >> confdefs.h <<\EOF
23164 #define LDAP_PF_INET6 1
23165 EOF
23166
23167 fi
23168 if test "$ol_enable_cleartext" != no ; then
23169         cat >> confdefs.h <<\EOF
23170 #define SLAPD_CLEARTEXT 1
23171 EOF
23172
23173 fi
23174 if test "$ol_enable_crypt" != no ; then
23175         cat >> confdefs.h <<\EOF
23176 #define SLAPD_CRYPT 1
23177 EOF
23178
23179 fi
23180 if test "$ol_link_spasswd" != no ; then
23181         cat >> confdefs.h <<\EOF
23182 #define SLAPD_SPASSWD 1
23183 EOF
23184
23185 fi
23186 if test "$ol_enable_multimaster" != no ; then
23187         cat >> confdefs.h <<\EOF
23188 #define SLAPD_MULTIMASTER 1
23189 EOF
23190
23191 fi
23192 if test "$ol_enable_rlookups" != no ; then
23193         cat >> confdefs.h <<\EOF
23194 #define SLAPD_RLOOKUPS 1
23195 EOF
23196
23197 fi
23198 if test "$ol_enable_aci" != no ; then
23199         cat >> confdefs.h <<\EOF
23200 #define SLAPD_ACI_ENABLED 1
23201 EOF
23202
23203 fi
23204
23205 if test "$ol_link_modules" != no ; then
23206         cat >> confdefs.h <<\EOF
23207 #define SLAPD_MODULES 1
23208 EOF
23209
23210         BUILD_SLAPD=yes
23211         SLAPD_MODULES_LDFLAGS="-dlopen self"
23212 fi
23213
23214 cat >> confdefs.h <<\EOF
23215 #define SLAPD_MOD_STATIC 1
23216 EOF
23217
23218 cat >> confdefs.h <<\EOF
23219 #define SLAPD_MOD_DYNAMIC 2
23220 EOF
23221
23222
23223 if test "$ol_enable_bdb" != no ; then
23224         BUILD_SLAPD=yes
23225         BUILD_BDB=$ol_enable_bdb
23226         if test "$ol_enable_bdb" = mod ; then
23227                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23228                 MFLAG=SLAPD_MOD_DYNAMIC
23229         else
23230                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23231                 MFLAG=SLAPD_MOD_STATIC
23232         fi
23233         cat >> confdefs.h <<EOF
23234 #define SLAPD_BDB $MFLAG
23235 EOF
23236
23237 fi
23238
23239 if test "$ol_enable_dnssrv" != no ; then
23240         BUILD_SLAPD=yes
23241         BUILD_DNSSRV=$ol_enable_dnssrv
23242         if test "$ol_enable_dnssrv" = mod ; then
23243                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23244                 MFLAG=SLAPD_MOD_DYNAMIC
23245         else
23246                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23247                 MFLAG=SLAPD_MOD_STATIC
23248         fi
23249         cat >> confdefs.h <<EOF
23250 #define SLAPD_DNSSRV $MFLAG
23251 EOF
23252
23253 fi
23254
23255 if test "$ol_enable_hdb" != no ; then
23256         BUILD_SLAPD=yes
23257         BUILD_HDB=$ol_enable_hdb
23258         if test "$ol_enable_hdb" = mod ; then
23259                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23260                 MFLAG=SLAPD_MOD_DYNAMIC
23261         else
23262                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23263                 MFLAG=SLAPD_MOD_STATIC
23264         fi
23265         cat >> confdefs.h <<EOF
23266 #define SLAPD_HDB $MFLAG
23267 EOF
23268
23269 fi
23270
23271 if test "$ol_enable_ldap" != no ; then
23272         BUILD_SLAPD=yes
23273         BUILD_LDAP=$ol_enable_ldap
23274         if test "$ol_enable_ldap" = mod ; then
23275                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23276                 MFLAG=SLAPD_MOD_DYNAMIC
23277         else
23278                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23279                 MFLAG=SLAPD_MOD_STATIC
23280         fi
23281         cat >> confdefs.h <<EOF
23282 #define SLAPD_LDAP $MFLAG
23283 EOF
23284
23285 fi
23286
23287 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23288         BUILD_SLAPD=yes
23289         BUILD_LDBM=$ol_enable_ldbm
23290         if test "$ol_enable_ldbm" = mod ; then
23291                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23292                 MFLAG=SLAPD_MOD_DYNAMIC
23293         else
23294                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23295                 MFLAG=SLAPD_MOD_STATIC
23296         fi
23297         cat >> confdefs.h <<EOF
23298 #define SLAPD_LDBM $MFLAG
23299 EOF
23300
23301 fi
23302
23303 if test "$ol_enable_meta" != no ; then
23304         BUILD_SLAPD=yes
23305         BUILD_META=$ol_enable_meta
23306         BUILD_REWRITE=yes
23307         if test "$ol_enable_meta" = mod ; then
23308                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23309                 MFLAG=SLAPD_MOD_DYNAMIC
23310         else
23311                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23312                 MFLAG=SLAPD_MOD_STATIC
23313         fi
23314         cat >> confdefs.h <<EOF
23315 #define SLAPD_META $MFLAG
23316 EOF
23317
23318 fi
23319
23320 if test "$ol_enable_monitor" != no ; then
23321         BUILD_SLAPD=yes
23322         BUILD_MONITOR=$ol_enable_monitor
23323         if test "$ol_enable_monitor" = mod ; then
23324                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23325                 MFLAG=SLAPD_MOD_DYNAMIC
23326         else
23327                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23328                 MFLAG=SLAPD_MOD_STATIC
23329         fi
23330         cat >> confdefs.h <<EOF
23331 #define SLAPD_MONITOR $MFLAG
23332 EOF
23333
23334 fi
23335
23336 if test "$ol_enable_null" != no ; then
23337         BUILD_SLAPD=yes
23338         BUILD_NULL=$ol_enable_null
23339         if test "$ol_enable_null" = mod ; then
23340                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23341                 MFLAG=SLAPD_MOD_DYNAMIC
23342         else
23343                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23344                 MFLAG=SLAPD_MOD_STATIC
23345         fi
23346         cat >> confdefs.h <<EOF
23347 #define SLAPD_NULL $MFLAG
23348 EOF
23349
23350 fi
23351
23352 if test "$ol_enable_passwd" != no ; then
23353         BUILD_SLAPD=yes
23354         BUILD_PASSWD=$ol_enable_passwd
23355         if test "$ol_enable_passwd" = mod ; then
23356                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23357                 MFLAG=SLAPD_MOD_DYNAMIC
23358         else
23359                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23360                 MFLAG=SLAPD_MOD_STATIC
23361         fi
23362         cat >> confdefs.h <<EOF
23363 #define SLAPD_PASSWD $MFLAG
23364 EOF
23365
23366 fi
23367
23368 if test "$ol_link_perl" != no ; then
23369         BUILD_SLAPD=yes
23370         BUILD_PERL=$ol_enable_perl
23371         if test "$ol_enable_perl" = mod ; then
23372                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23373                 MFLAG=SLAPD_MOD_DYNAMIC
23374         else
23375                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23376                 MFLAG=SLAPD_MOD_STATIC
23377         fi
23378         cat >> confdefs.h <<EOF
23379 #define SLAPD_PERL $MFLAG
23380 EOF
23381
23382 fi
23383
23384 if test "$ol_enable_relay" != no ; then
23385         BUILD_SLAPD=yes
23386         BUILD_RELAY=$ol_enable_relay
23387         if test "$ol_enable_relay" = mod ; then
23388                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23389                 MFLAG=SLAPD_MOD_DYNAMIC
23390         else
23391                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23392                 MFLAG=SLAPD_MOD_STATIC
23393         fi
23394         cat >> confdefs.h <<EOF
23395 #define SLAPD_RELAY $MFLAG
23396 EOF
23397
23398 fi
23399
23400 if test "$ol_enable_shell" != no ; then
23401         if test "$ol_link_thread" != no ; then
23402                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23403         fi
23404         BUILD_SLAPD=yes
23405         BUILD_SHELL=$ol_enable_shell
23406         if test "$ol_enable_shell" = mod ; then
23407                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23408                 MFLAG=SLAPD_MOD_DYNAMIC
23409         else
23410                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23411                 MFLAG=SLAPD_MOD_STATIC
23412         fi
23413         cat >> confdefs.h <<EOF
23414 #define SLAPD_SHELL $MFLAG
23415 EOF
23416
23417 fi
23418
23419 if test "$ol_link_sql" != no ; then
23420         BUILD_SLAPD=yes
23421         BUILD_SQL=$ol_enable_sql
23422         if test "$ol_enable_sql" = mod; then
23423                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23424                 MFLAG=SLAPD_MOD_DYNAMIC
23425         else
23426                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23427                 MFLAG=SLAPD_MOD_STATIC
23428         fi
23429         cat >> confdefs.h <<EOF
23430 #define SLAPD_SQL $MFLAG
23431 EOF
23432
23433 fi
23434
23435 if test "$ol_enable_chain" != no ; then
23436         BUILD_CHAIN=$ol_enable_chain
23437         if test "$ol_enable_chain" = mod ; then
23438                 MFLAG=SLAPD_MOD_DYNAMIC
23439                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23440         else
23441                 MFLAG=SLAPD_MOD_STATIC
23442         fi
23443         cat >> confdefs.h <<EOF
23444 #define SLAPD_OVER_CHAIN $MFLAG
23445 EOF
23446
23447 fi
23448
23449 if test "$ol_enable_denyop" != no ; then
23450         BUILD_DENYOP=$ol_enable_denyop
23451         if test "$ol_enable_denyop" = mod ; then
23452                 MFLAG=SLAPD_MOD_DYNAMIC
23453                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23454         else
23455                 MFLAG=SLAPD_MOD_STATIC
23456         fi
23457         cat >> confdefs.h <<EOF
23458 #define SLAPD_OVER_DENYOP $MFLAG
23459 EOF
23460
23461 fi
23462
23463 if test "$ol_enable_dyngroup" != no ; then
23464         BUILD_DYNGROUP=$ol_enable_dyngroup
23465         if test "$ol_enable_dyngroup" = mod ; then
23466                 MFLAG=SLAPD_MOD_DYNAMIC
23467                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23468         else
23469                 MFLAG=SLAPD_MOD_STATIC
23470         fi
23471         cat >> confdefs.h <<EOF
23472 #define SLAPD_OVER_DYNGROUP $MFLAG
23473 EOF
23474
23475 fi
23476
23477 if test "$ol_enable_ppolicy" != no ; then
23478         BUILD_PPOLICY=$ol_enable_ppolicy
23479         if test "$ol_enable_ppolicy" = mod ; then
23480                 MFLAG=SLAPD_MOD_DYNAMIC
23481                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23482         else
23483                 MFLAG=SLAPD_MOD_STATIC
23484         fi
23485         cat >> confdefs.h <<EOF
23486 #define SLAPD_OVER_PPOLICY $MFLAG
23487 EOF
23488
23489 fi
23490
23491 if test "$ol_enable_proxycache" != no ; then
23492         BUILD_PROXYCACHE=$ol_enable_proxycache
23493         if test "$ol_enable_proxycache" = mod ; then
23494                 MFLAG=SLAPD_MOD_DYNAMIC
23495                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23496         else
23497                 MFLAG=SLAPD_MOD_STATIC
23498         fi
23499         cat >> confdefs.h <<EOF
23500 #define SLAPD_OVER_PROXYCACHE $MFLAG
23501 EOF
23502
23503 fi
23504
23505 if test "$ol_enable_rwm" != no ; then
23506         BUILD_REWRITE=yes
23507         BUILD_RWM=$ol_enable_rwm
23508         if test "$ol_enable_rwm" = mod ; then
23509                 MFLAG=SLAPD_MOD_DYNAMIC
23510                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23511         else
23512                 MFLAG=SLAPD_MOD_STATIC
23513         fi
23514         cat >> confdefs.h <<EOF
23515 #define SLAPD_OVER_RWM $MFLAG
23516 EOF
23517
23518 fi
23519
23520 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23521         $BUILD_SLAPD = yes ; then
23522         BUILD_SLURPD=yes
23523 fi
23524
23525 if test "$ol_enable_rewrite" != no ; then
23526         cat >> confdefs.h <<\EOF
23527 #define ENABLE_REWRITE 1
23528 EOF
23529
23530         BUILD_REWRITE=yes
23531 fi
23532
23533 if test "$ol_enable_slapi" != no ; then
23534         cat >> confdefs.h <<\EOF
23535 #define ENABLE_SLAPI 1
23536 EOF
23537
23538         BUILD_SLAPI=yes
23539         SLAPD_SLAPI_DEPEND=libslapi.a
23540 fi
23541
23542
23543
23544 if test "$ac_cv_mingw32" = yes ; then
23545         PLAT=NT
23546         SLAPD_MODULES_LDFLAGS=
23547 else
23548         PLAT=UNIX
23549 fi
23550
23551 if test -z "$SLAPD_STATIC_BACKENDS"; then
23552         SLAPD_NO_STATIC='#'
23553 else
23554         SLAPD_NO_STATIC=
23555 fi
23556
23557
23558
23559
23560
23561
23562
23563   
23564   
23565   
23566   
23567   
23568   
23569   
23570   
23571   
23572   
23573   
23574   
23575   
23576   
23577   
23578   
23579   
23580   
23581   
23582   
23583   
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622 # Check whether --with-xxinstall or --without-xxinstall was given.
23623 if test "${with_xxinstall+set}" = set; then
23624   withval="$with_xxinstall"
23625   :
23626 fi
23627
23628
23629
23630 trap '' 1 2 15
23631
23632 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23633
23634 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23635 # Let make expand exec_prefix.
23636 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23637
23638 # Any assignment to VPATH causes Sun make to only execute
23639 # the first set of double-colon rules, so remove it if not needed.
23640 # If there is a colon in the path, we need to keep it.
23641 if test "x$srcdir" = x.; then
23642   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23643 fi
23644
23645 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23646
23647 DEFS=-DHAVE_CONFIG_H
23648
23649 # Without the "./", some shells look in PATH for config.status.
23650 : ${CONFIG_STATUS=./config.status}
23651
23652 echo creating $CONFIG_STATUS
23653 rm -f $CONFIG_STATUS
23654 cat > $CONFIG_STATUS <<EOF
23655 #! /bin/sh
23656 # Generated automatically by configure.
23657 # Run this file to recreate the current configuration.
23658 # This directory was configured as follows,
23659 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23660 #
23661 # $0 $ac_configure_args
23662 #
23663 # Compiler output produced by configure, useful for debugging
23664 # configure, is in ./config.log if it exists.
23665
23666 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23667 for ac_option
23668 do
23669   case "\$ac_option" in
23670   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23671     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23672     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23673   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23674     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23675     exit 0 ;;
23676   -help | --help | --hel | --he | --h)
23677     echo "\$ac_cs_usage"; exit 0 ;;
23678   *) echo "\$ac_cs_usage"; exit 1 ;;
23679   esac
23680 done
23681
23682 ac_given_srcdir=$srcdir
23683 ac_given_INSTALL="$INSTALL"
23684
23685 trap 'rm -fr `echo "\
23686 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23687 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23688 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23689 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23690 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23691 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23692 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23693 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23694 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23695 include/Makefile:build/top.mk:include/Makefile.in \
23696 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23697 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23698 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23699 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23700 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23701 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23702 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23703 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23704 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23705 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23706 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23707 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23708 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23709 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23710 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23711 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23712 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23713 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23714 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23715 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
23716 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23717 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23718 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23719 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23720 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23721 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23722 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23723 tests/run \
23724 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23725  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23726 EOF
23727 cat >> $CONFIG_STATUS <<EOF
23728
23729 # Protect against being on the right side of a sed subst in config.status.
23730 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23731  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23732 $ac_vpsub
23733 $extrasub
23734 s%@SHELL@%$SHELL%g
23735 s%@CFLAGS@%$CFLAGS%g
23736 s%@CPPFLAGS@%$CPPFLAGS%g
23737 s%@CXXFLAGS@%$CXXFLAGS%g
23738 s%@FFLAGS@%$FFLAGS%g
23739 s%@DEFS@%$DEFS%g
23740 s%@LDFLAGS@%$LDFLAGS%g
23741 s%@LIBS@%$LIBS%g
23742 s%@exec_prefix@%$exec_prefix%g
23743 s%@prefix@%$prefix%g
23744 s%@program_transform_name@%$program_transform_name%g
23745 s%@bindir@%$bindir%g
23746 s%@sbindir@%$sbindir%g
23747 s%@libexecdir@%$libexecdir%g
23748 s%@datadir@%$datadir%g
23749 s%@sysconfdir@%$sysconfdir%g
23750 s%@sharedstatedir@%$sharedstatedir%g
23751 s%@localstatedir@%$localstatedir%g
23752 s%@libdir@%$libdir%g
23753 s%@includedir@%$includedir%g
23754 s%@oldincludedir@%$oldincludedir%g
23755 s%@infodir@%$infodir%g
23756 s%@mandir@%$mandir%g
23757 s%@host@%$host%g
23758 s%@host_alias@%$host_alias%g
23759 s%@host_cpu@%$host_cpu%g
23760 s%@host_vendor@%$host_vendor%g
23761 s%@host_os@%$host_os%g
23762 s%@target@%$target%g
23763 s%@target_alias@%$target_alias%g
23764 s%@target_cpu@%$target_cpu%g
23765 s%@target_vendor@%$target_vendor%g
23766 s%@target_os@%$target_os%g
23767 s%@build@%$build%g
23768 s%@build_alias@%$build_alias%g
23769 s%@build_cpu@%$build_cpu%g
23770 s%@build_vendor@%$build_vendor%g
23771 s%@build_os@%$build_os%g
23772 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23773 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23774 s%@INSTALL_DATA@%$INSTALL_DATA%g
23775 s%@PACKAGE@%$PACKAGE%g
23776 s%@VERSION@%$VERSION%g
23777 s%@ACLOCAL@%$ACLOCAL%g
23778 s%@AUTOCONF@%$AUTOCONF%g
23779 s%@AUTOMAKE@%$AUTOMAKE%g
23780 s%@AUTOHEADER@%$AUTOHEADER%g
23781 s%@MAKEINFO@%$MAKEINFO%g
23782 s%@install_sh@%$install_sh%g
23783 s%@AMTAR@%$AMTAR%g
23784 s%@AWK@%$AWK%g
23785 s%@AMTARFLAGS@%$AMTARFLAGS%g
23786 s%@SET_MAKE@%$SET_MAKE%g
23787 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
23788 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23789 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23790 s%@top_builddir@%$top_builddir%g
23791 s%@ldap_subdir@%$ldap_subdir%g
23792 s%@CC@%$CC%g
23793 s%@AR@%$AR%g
23794 s%@LN_S@%$LN_S%g
23795 s%@OBJEXT@%$OBJEXT%g
23796 s%@EXEEXT@%$EXEEXT%g
23797 s%@ECHO@%$ECHO%g
23798 s%@RANLIB@%$RANLIB%g
23799 s%@STRIP@%$STRIP%g
23800 s%@DLLTOOL@%$DLLTOOL%g
23801 s%@AS@%$AS%g
23802 s%@OBJDUMP@%$OBJDUMP%g
23803 s%@CPP@%$CPP%g
23804 s%@LIBTOOL@%$LIBTOOL%g
23805 s%@LN_H@%$LN_H%g
23806 s%@PERLBIN@%$PERLBIN%g
23807 s%@OL_MKDEP@%$OL_MKDEP%g
23808 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23809 s%@LTSTATIC@%$LTSTATIC%g
23810 s%@LIBOBJS@%$LIBOBJS%g
23811 s%@LIBSRCS@%$LIBSRCS%g
23812 s%@PLAT@%$PLAT%g
23813 s%@WITH_TLS@%$WITH_TLS%g
23814 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23815 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23816 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23817 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23818 s%@BUILD_BDB@%$BUILD_BDB%g
23819 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23820 s%@BUILD_HDB@%$BUILD_HDB%g
23821 s%@BUILD_LDAP@%$BUILD_LDAP%g
23822 s%@BUILD_LDBM@%$BUILD_LDBM%g
23823 s%@BUILD_META@%$BUILD_META%g
23824 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23825 s%@BUILD_NULL@%$BUILD_NULL%g
23826 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23827 s%@BUILD_RELAY@%$BUILD_RELAY%g
23828 s%@BUILD_PERL@%$BUILD_PERL%g
23829 s%@BUILD_SHELL@%$BUILD_SHELL%g
23830 s%@BUILD_SQL@%$BUILD_SQL%g
23831 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
23832 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
23833 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
23834 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
23835 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
23836 s%@BUILD_RWM@%$BUILD_RWM%g
23837 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23838 s%@LDAP_LIBS@%$LDAP_LIBS%g
23839 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23840 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23841 s%@LDBM_LIBS@%$LDBM_LIBS%g
23842 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23843 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23844 s%@WRAP_LIBS@%$WRAP_LIBS%g
23845 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23846 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23847 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23848 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23849 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23850 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
23851 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23852 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23853 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23854 s%@KRB4_LIBS@%$KRB4_LIBS%g
23855 s%@KRB5_LIBS@%$KRB5_LIBS%g
23856 s%@SASL_LIBS@%$SASL_LIBS%g
23857 s%@TLS_LIBS@%$TLS_LIBS%g
23858 s%@MODULES_LIBS@%$MODULES_LIBS%g
23859 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23860 s%@LIBSLAPI@%$LIBSLAPI%g
23861 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23862 s%@AUTH_LIBS@%$AUTH_LIBS%g
23863 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23864 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23865 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23866 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23867
23868 CEOF
23869 EOF
23870
23871 cat >> $CONFIG_STATUS <<\EOF
23872
23873 # Split the substitutions into bite-sized pieces for seds with
23874 # small command number limits, like on Digital OSF/1 and HP-UX.
23875 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23876 ac_file=1 # Number of current file.
23877 ac_beg=1 # First line for current file.
23878 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23879 ac_more_lines=:
23880 ac_sed_cmds=""
23881 while $ac_more_lines; do
23882   if test $ac_beg -gt 1; then
23883     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23884   else
23885     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23886   fi
23887   if test ! -s conftest.s$ac_file; then
23888     ac_more_lines=false
23889     rm -f conftest.s$ac_file
23890   else
23891     if test -z "$ac_sed_cmds"; then
23892       ac_sed_cmds="sed -f conftest.s$ac_file"
23893     else
23894       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23895     fi
23896     ac_file=`expr $ac_file + 1`
23897     ac_beg=$ac_end
23898     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23899   fi
23900 done
23901 if test -z "$ac_sed_cmds"; then
23902   ac_sed_cmds=cat
23903 fi
23904 EOF
23905
23906 cat >> $CONFIG_STATUS <<EOF
23907
23908 CONFIG_FILES=\${CONFIG_FILES-"\
23909 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23910 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23911 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23912 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23913 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23914 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23915 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23916 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23917 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23918 include/Makefile:build/top.mk:include/Makefile.in \
23919 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23920 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23921 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23922 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23923 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23924 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23925 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23926 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23927 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23928 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23929 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23930 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23931 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23932 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23933 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23934 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23935 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23936 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23937 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23938 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
23939 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23940 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23941 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23942 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23943 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23944 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23945 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23946 tests/run \
23947 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23948 "}
23949 EOF
23950 cat >> $CONFIG_STATUS <<\EOF
23951 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23952   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23953   case "$ac_file" in
23954   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23955        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23956   *) ac_file_in="${ac_file}.in" ;;
23957   esac
23958
23959   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23960
23961   # Remove last slash and all that follows it.  Not all systems have dirname.
23962   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23963   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23964     # The file is in a subdirectory.
23965     test ! -d "$ac_dir" && mkdir "$ac_dir"
23966     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23967     # A "../" for each directory in $ac_dir_suffix.
23968     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23969   else
23970     ac_dir_suffix= ac_dots=
23971   fi
23972
23973   case "$ac_given_srcdir" in
23974   .)  srcdir=.
23975       if test -z "$ac_dots"; then top_srcdir=.
23976       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23977   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23978   *) # Relative path.
23979     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23980     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23981   esac
23982
23983   case "$ac_given_INSTALL" in
23984   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23985   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23986   esac
23987
23988   echo creating "$ac_file"
23989   rm -f "$ac_file"
23990   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23991   case "$ac_file" in
23992   *[Mm]akefile*) ac_comsub="1i\\
23993 # $configure_input" ;;
23994   *) ac_comsub= ;;
23995   esac
23996
23997   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23998   sed -e "$ac_comsub
23999 s%@configure_input@%$configure_input%g
24000 s%@srcdir@%$srcdir%g
24001 s%@top_srcdir@%$top_srcdir%g
24002 s%@INSTALL@%$INSTALL%g
24003 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24004 fi; done
24005 rm -f conftest.s*
24006
24007 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24008 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24009 #
24010 # ac_d sets the value in "#define NAME VALUE" lines.
24011 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24012 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24013 ac_dC='\3'
24014 ac_dD='%g'
24015 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24016 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24017 ac_uB='\([      ]\)%\1#\2define\3'
24018 ac_uC=' '
24019 ac_uD='\4%g'
24020 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24021 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24022 ac_eB='$%\1#\2define\3'
24023 ac_eC=' '
24024 ac_eD='%g'
24025
24026 if test "${CONFIG_HEADERS+set}" != set; then
24027 EOF
24028 cat >> $CONFIG_STATUS <<EOF
24029   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24030 EOF
24031 cat >> $CONFIG_STATUS <<\EOF
24032 fi
24033 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24034   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24035   case "$ac_file" in
24036   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24037        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24038   *) ac_file_in="${ac_file}.in" ;;
24039   esac
24040
24041   echo creating $ac_file
24042
24043   rm -f conftest.frag conftest.in conftest.out
24044   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24045   cat $ac_file_inputs > conftest.in
24046
24047 EOF
24048
24049 # Transform confdefs.h into a sed script conftest.vals that substitutes
24050 # the proper values into config.h.in to produce config.h.  And first:
24051 # Protect against being on the right side of a sed subst in config.status.
24052 # Protect against being in an unquoted here document in config.status.
24053 rm -f conftest.vals
24054 cat > conftest.hdr <<\EOF
24055 s/[\\&%]/\\&/g
24056 s%[\\$`]%\\&%g
24057 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24058 s%ac_d%ac_u%gp
24059 s%ac_u%ac_e%gp
24060 EOF
24061 sed -n -f conftest.hdr confdefs.h > conftest.vals
24062 rm -f conftest.hdr
24063
24064 # This sed command replaces #undef with comments.  This is necessary, for
24065 # example, in the case of _POSIX_SOURCE, which is predefined and required
24066 # on some systems where configure will not decide to define it.
24067 cat >> conftest.vals <<\EOF
24068 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24069 EOF
24070
24071 # Break up conftest.vals because some shells have a limit on
24072 # the size of here documents, and old seds have small limits too.
24073
24074 rm -f conftest.tail
24075 while :
24076 do
24077   ac_lines=`grep -c . conftest.vals`
24078   # grep -c gives empty output for an empty file on some AIX systems.
24079   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24080   # Write a limited-size here document to conftest.frag.
24081   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24082   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24083   echo 'CEOF
24084   sed -f conftest.frag conftest.in > conftest.out
24085   rm -f conftest.in
24086   mv conftest.out conftest.in
24087 ' >> $CONFIG_STATUS
24088   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24089   rm -f conftest.vals
24090   mv conftest.tail conftest.vals
24091 done
24092 rm -f conftest.vals
24093
24094 cat >> $CONFIG_STATUS <<\EOF
24095   rm -f conftest.frag conftest.h
24096   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24097   cat conftest.in >> conftest.h
24098   rm -f conftest.in
24099   if cmp -s $ac_file conftest.h 2>/dev/null; then
24100     echo "$ac_file is unchanged"
24101     rm -f conftest.h
24102   else
24103     # Remove last slash and all that follows it.  Not all systems have dirname.
24104       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24105       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24106       # The file is in a subdirectory.
24107       test ! -d "$ac_dir" && mkdir "$ac_dir"
24108     fi
24109     rm -f $ac_file
24110     mv conftest.h $ac_file
24111   fi
24112 fi; done
24113
24114 EOF
24115 cat >> $CONFIG_STATUS <<EOF
24116
24117 EOF
24118 cat >> $CONFIG_STATUS <<\EOF
24119
24120 chmod +x tests/run
24121 date > stamp-h
24122 echo Please run \"make depend\" to build dependencies
24123
24124 exit 0
24125 EOF
24126 chmod +x $CONFIG_STATUS
24127 rm -fr confdefs* $ac_clean_files
24128 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24129