]> git.sur5r.net Git - openldap/blob - configure
ldap_url_parse_ext(): Kill duplicate init + pointless free(NULL) of lud_filter.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.543 2004/06/19 08:00:25 ando 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
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-backends     enable all available backends no|yes|mod [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
99 ac_help="$ac_help
100       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
101 ac_help="$ac_help
102       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
103 ac_help="$ac_help
104     --enable-meta         enable metadirectory backend no|yes|mod [no]"
105 ac_help="$ac_help
106     --enable-monitor      enable monitor backend no|yes|mod [yes]"
107 ac_help="$ac_help
108     --enable-null         enable null backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-relay        enable relay backend no|yes|mod [yes]"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-sql          enable sql backend no|yes|mod [no]"
119 ac_help="$ac_help
120
121 SLAPD Overlay Options:"
122 ac_help="$ac_help
123     --enable-overlays     enable all available overlays no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-chain        LDAP Chain Response no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
142 ac_help="$ac_help
143
144 SLURPD (Replication Daemon) Options:"
145 ac_help="$ac_help
146   --enable-slurpd         enable building slurpd [auto]"
147 ac_help="$ac_help
148
149 Library Generation & Linking Options"
150 ac_help="$ac_help
151   --enable-static[=PKGS]  build static libraries [default=yes]"
152 ac_help="$ac_help
153   --enable-shared[=PKGS]  build shared libraries [default=yes]"
154 ac_help="$ac_help
155   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
156 ac_help="$ac_help
157   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
158
159 # Find the correct PATH separator.  Usually this is `:', but
160 # DJGPP uses `;' like DOS.
161 if test "X${PATH_SEPARATOR+set}" != Xset; then
162   UNAME=${UNAME-`uname 2>/dev/null`}
163   case X$UNAME in
164     *-DOS) lt_cv_sys_path_separator=';' ;;
165     *)     lt_cv_sys_path_separator=':' ;;
166   esac
167   PATH_SEPARATOR=$lt_cv_sys_path_separator
168 fi
169
170
171 # Check that we are running under the correct shell.
172 SHELL=${CONFIG_SHELL-/bin/sh}
173
174 case X$ECHO in
175 X*--fallback-echo)
176   # Remove one level of quotation (which was required for Make).
177   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
178   ;;
179 esac
180
181 echo=${ECHO-echo}
182 if test "X$1" = X--no-reexec; then
183   # Discard the --no-reexec flag, and continue.
184   shift
185 elif test "X$1" = X--fallback-echo; then
186   # Avoid inline document here, it may be left over
187   :
188 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
189   # Yippee, $echo works!
190   :
191 else
192   # Restart under the correct shell.
193   exec $SHELL "$0" --no-reexec ${1+"$@"}
194 fi
195
196 if test "X$1" = X--fallback-echo; then
197   # used as fallback echo
198   shift
199   cat <<EOF
200
201 EOF
202   exit 0
203 fi
204
205 # The HP-UX ksh and POSIX shell print the target directory to stdout
206 # if CDPATH is set.
207 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
208
209 if test -z "$ECHO"; then
210 if test "X${echo_test_string+set}" != Xset; then
211 # find a string as large as possible, as long as the shell can cope with it
212   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
213     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
214     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
215        echo_test_string="`eval $cmd`" &&
216        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
217     then
218       break
219     fi
220   done
221 fi
222
223 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
224    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
225    test "X$echo_testing_string" = "X$echo_test_string"; then
226   :
227 else
228   # The Solaris, AIX, and Digital Unix default echo programs unquote
229   # backslashes.  This makes it impossible to quote backslashes using
230   #   echo "$something" | sed 's/\\/\\\\/g'
231   #
232   # So, first we look for a working echo in the user's PATH.
233
234   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
235   for dir in $PATH /usr/ucb; do
236     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
237        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
238        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
239        test "X$echo_testing_string" = "X$echo_test_string"; then
240       echo="$dir/echo"
241       break
242     fi
243   done
244   IFS="$save_ifs"
245
246   if test "X$echo" = Xecho; then
247     # We didn't find a better echo, so look for alternatives.
248     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
249        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
250        test "X$echo_testing_string" = "X$echo_test_string"; then
251       # This shell has a builtin print -r that does the trick.
252       echo='print -r'
253     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
254          test "X$CONFIG_SHELL" != X/bin/ksh; then
255       # If we have ksh, try running configure again with it.
256       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
257       export ORIGINAL_CONFIG_SHELL
258       CONFIG_SHELL=/bin/ksh
259       export CONFIG_SHELL
260       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
261     else
262       # Try using printf.
263       echo='printf %s\n'
264       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
265          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
266          test "X$echo_testing_string" = "X$echo_test_string"; then
267         # Cool, printf works
268         :
269       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
270            test "X$echo_testing_string" = 'X\t' &&
271            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
272            test "X$echo_testing_string" = "X$echo_test_string"; then
273         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
274         export CONFIG_SHELL
275         SHELL="$CONFIG_SHELL"
276         export SHELL
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
279            test "X$echo_testing_string" = 'X\t' &&
280            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
281            test "X$echo_testing_string" = "X$echo_test_string"; then
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       else
284         # maybe with a smaller string...
285         prev=:
286
287         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
288           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
289           then
290             break
291           fi
292           prev="$cmd"
293         done
294
295         if test "$prev" != 'sed 50q "$0"'; then
296           echo_test_string=`eval $prev`
297           export echo_test_string
298           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
299         else
300           # Oops.  We lost completely, so just stick with echo.
301           echo=echo
302         fi
303       fi
304     fi
305   fi
306 fi
307 fi
308
309 # Copy echo and quote the copy suitably for passing to libtool from
310 # the Makefile, instead of quoting the original, which is used later.
311 ECHO=$echo
312 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
313    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
314 fi
315
316
317 ac_help="$ac_help
318   --disable-libtool-lock  avoid locking (might break parallel builds)"
319 ac_help="$ac_help
320   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
321 ac_help="$ac_help
322
323 See INSTALL file for further details."
324
325 # Initialize some variables set by options.
326 # The variables have the same names as the options, with
327 # dashes changed to underlines.
328 build=NONE
329 cache_file=./config.cache
330 exec_prefix=NONE
331 host=NONE
332 no_create=
333 nonopt=NONE
334 no_recursion=
335 prefix=NONE
336 program_prefix=NONE
337 program_suffix=NONE
338 program_transform_name=s,x,x,
339 silent=
340 site=
341 srcdir=
342 target=NONE
343 verbose=
344 x_includes=NONE
345 x_libraries=NONE
346 bindir='${exec_prefix}/bin'
347 sbindir='${exec_prefix}/sbin'
348 libexecdir='${exec_prefix}/libexec'
349 datadir='${prefix}/share'
350 sysconfdir='${prefix}/etc'
351 sharedstatedir='${prefix}/com'
352 localstatedir='${prefix}/var'
353 libdir='${exec_prefix}/lib'
354 includedir='${prefix}/include'
355 oldincludedir='/usr/include'
356 infodir='${prefix}/info'
357 mandir='${prefix}/man'
358
359 # Initialize some other variables.
360 subdirs=
361 MFLAGS= MAKEFLAGS=
362 SHELL=${CONFIG_SHELL-/bin/sh}
363 # Maximum number of lines to put in a shell here document.
364 ac_max_here_lines=12
365
366 ac_prev=
367 for ac_option
368 do
369
370   # If the previous option needs an argument, assign it.
371   if test -n "$ac_prev"; then
372     eval "$ac_prev=\$ac_option"
373     ac_prev=
374     continue
375   fi
376
377   case "$ac_option" in
378   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
379   *) ac_optarg= ;;
380   esac
381
382   # Accept the important Cygnus configure options, so we can diagnose typos.
383
384   case "$ac_option" in
385
386   -bindir | --bindir | --bindi | --bind | --bin | --bi)
387     ac_prev=bindir ;;
388   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
389     bindir="$ac_optarg" ;;
390
391   -build | --build | --buil | --bui | --bu)
392     ac_prev=build ;;
393   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
394     build="$ac_optarg" ;;
395
396   -cache-file | --cache-file | --cache-fil | --cache-fi \
397   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
398     ac_prev=cache_file ;;
399   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
400   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
401     cache_file="$ac_optarg" ;;
402
403   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
404     ac_prev=datadir ;;
405   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
406   | --da=*)
407     datadir="$ac_optarg" ;;
408
409   -disable-* | --disable-*)
410     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
411     # Reject names that are not valid shell variable names.
412     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
413       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
414     fi
415     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
416     eval "enable_${ac_feature}=no" ;;
417
418   -enable-* | --enable-*)
419     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
420     # Reject names that are not valid shell variable names.
421     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
422       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
423     fi
424     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
425     case "$ac_option" in
426       *=*) ;;
427       *) ac_optarg=yes ;;
428     esac
429     eval "enable_${ac_feature}='$ac_optarg'" ;;
430
431   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
432   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
433   | --exec | --exe | --ex)
434     ac_prev=exec_prefix ;;
435   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
436   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
437   | --exec=* | --exe=* | --ex=*)
438     exec_prefix="$ac_optarg" ;;
439
440   -gas | --gas | --ga | --g)
441     # Obsolete; use --with-gas.
442     with_gas=yes ;;
443
444   -help | --help | --hel | --he)
445     # Omit some internal or obsolete options to make the list less imposing.
446     # This message is too long to be a string in the A/UX 3.1 sh.
447     cat << EOF
448 Usage: configure [options] [host]
449 Options: [defaults in brackets after descriptions]
450 Configuration:
451   --cache-file=FILE       cache test results in FILE
452   --help                  print this message
453   --no-create             do not create output files
454   --quiet, --silent       do not print \`checking...' messages
455   --version               print the version of autoconf that created configure
456 Directory and file names:
457   --prefix=PREFIX         install architecture-independent files in PREFIX
458                           [$ac_default_prefix]
459   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
460                           [same as prefix]
461   --bindir=DIR            user executables in DIR [EPREFIX/bin]
462   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
463   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
464   --datadir=DIR           read-only architecture-independent data in DIR
465                           [PREFIX/share]
466   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
467   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
468                           [PREFIX/com]
469   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
470   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
471   --includedir=DIR        C header files in DIR [PREFIX/include]
472   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
473   --infodir=DIR           info documentation in DIR [PREFIX/info]
474   --mandir=DIR            man documentation in DIR [PREFIX/man]
475   --srcdir=DIR            find the sources in DIR [configure dir or ..]
476   --program-prefix=PREFIX prepend PREFIX to installed program names
477   --program-suffix=SUFFIX append SUFFIX to installed program names
478   --program-transform-name=PROGRAM
479                           run sed PROGRAM on installed program names
480 EOF
481     cat << EOF
482 Host type:
483   --build=BUILD           configure for building on BUILD [BUILD=HOST]
484   --host=HOST             configure for HOST [guessed]
485   --target=TARGET         configure for TARGET [TARGET=HOST]
486 Features and packages:
487   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
488   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
489   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
490   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
491   --x-includes=DIR        X include files are in DIR
492   --x-libraries=DIR       X library files are in DIR
493 EOF
494     if test -n "$ac_help"; then
495       echo "--enable and --with options recognized:$ac_help"
496     fi
497     exit 0 ;;
498
499   -host | --host | --hos | --ho)
500     ac_prev=host ;;
501   -host=* | --host=* | --hos=* | --ho=*)
502     host="$ac_optarg" ;;
503
504   -includedir | --includedir | --includedi | --included | --include \
505   | --includ | --inclu | --incl | --inc)
506     ac_prev=includedir ;;
507   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
508   | --includ=* | --inclu=* | --incl=* | --inc=*)
509     includedir="$ac_optarg" ;;
510
511   -infodir | --infodir | --infodi | --infod | --info | --inf)
512     ac_prev=infodir ;;
513   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
514     infodir="$ac_optarg" ;;
515
516   -libdir | --libdir | --libdi | --libd)
517     ac_prev=libdir ;;
518   -libdir=* | --libdir=* | --libdi=* | --libd=*)
519     libdir="$ac_optarg" ;;
520
521   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
522   | --libexe | --libex | --libe)
523     ac_prev=libexecdir ;;
524   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
525   | --libexe=* | --libex=* | --libe=*)
526     libexecdir="$ac_optarg" ;;
527
528   -localstatedir | --localstatedir | --localstatedi | --localstated \
529   | --localstate | --localstat | --localsta | --localst \
530   | --locals | --local | --loca | --loc | --lo)
531     ac_prev=localstatedir ;;
532   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
533   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
534   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
535     localstatedir="$ac_optarg" ;;
536
537   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
538     ac_prev=mandir ;;
539   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
540     mandir="$ac_optarg" ;;
541
542   -nfp | --nfp | --nf)
543     # Obsolete; use --without-fp.
544     with_fp=no ;;
545
546   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547   | --no-cr | --no-c)
548     no_create=yes ;;
549
550   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
551   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
552     no_recursion=yes ;;
553
554   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
555   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
556   | --oldin | --oldi | --old | --ol | --o)
557     ac_prev=oldincludedir ;;
558   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
559   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
560   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
561     oldincludedir="$ac_optarg" ;;
562
563   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
564     ac_prev=prefix ;;
565   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
566     prefix="$ac_optarg" ;;
567
568   -program-prefix | --program-prefix | --program-prefi | --program-pref \
569   | --program-pre | --program-pr | --program-p)
570     ac_prev=program_prefix ;;
571   -program-prefix=* | --program-prefix=* | --program-prefi=* \
572   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
573     program_prefix="$ac_optarg" ;;
574
575   -program-suffix | --program-suffix | --program-suffi | --program-suff \
576   | --program-suf | --program-su | --program-s)
577     ac_prev=program_suffix ;;
578   -program-suffix=* | --program-suffix=* | --program-suffi=* \
579   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
580     program_suffix="$ac_optarg" ;;
581
582   -program-transform-name | --program-transform-name \
583   | --program-transform-nam | --program-transform-na \
584   | --program-transform-n | --program-transform- \
585   | --program-transform | --program-transfor \
586   | --program-transfo | --program-transf \
587   | --program-trans | --program-tran \
588   | --progr-tra | --program-tr | --program-t)
589     ac_prev=program_transform_name ;;
590   -program-transform-name=* | --program-transform-name=* \
591   | --program-transform-nam=* | --program-transform-na=* \
592   | --program-transform-n=* | --program-transform-=* \
593   | --program-transform=* | --program-transfor=* \
594   | --program-transfo=* | --program-transf=* \
595   | --program-trans=* | --program-tran=* \
596   | --progr-tra=* | --program-tr=* | --program-t=*)
597     program_transform_name="$ac_optarg" ;;
598
599   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
600   | -silent | --silent | --silen | --sile | --sil)
601     silent=yes ;;
602
603   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
604     ac_prev=sbindir ;;
605   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
606   | --sbi=* | --sb=*)
607     sbindir="$ac_optarg" ;;
608
609   -sharedstatedir | --sharedstatedir | --sharedstatedi \
610   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
611   | --sharedst | --shareds | --shared | --share | --shar \
612   | --sha | --sh)
613     ac_prev=sharedstatedir ;;
614   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
615   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
616   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
617   | --sha=* | --sh=*)
618     sharedstatedir="$ac_optarg" ;;
619
620   -site | --site | --sit)
621     ac_prev=site ;;
622   -site=* | --site=* | --sit=*)
623     site="$ac_optarg" ;;
624
625   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
626     ac_prev=srcdir ;;
627   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
628     srcdir="$ac_optarg" ;;
629
630   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
631   | --syscon | --sysco | --sysc | --sys | --sy)
632     ac_prev=sysconfdir ;;
633   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
634   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
635     sysconfdir="$ac_optarg" ;;
636
637   -target | --target | --targe | --targ | --tar | --ta | --t)
638     ac_prev=target ;;
639   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
640     target="$ac_optarg" ;;
641
642   -v | -verbose | --verbose | --verbos | --verbo | --verb)
643     verbose=yes ;;
644
645   -version | --version | --versio | --versi | --vers)
646     echo "configure generated by autoconf version 2.13.1"
647     exit 0 ;;
648
649   -with-* | --with-*)
650     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
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     case "$ac_option" in
657       *=*) ;;
658       *) ac_optarg=yes ;;
659     esac
660     eval "with_${ac_package}='$ac_optarg'" ;;
661
662   -without-* | --without-*)
663     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
664     # Reject names that are not valid shell variable names.
665     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
666       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
667     fi
668     ac_package=`echo $ac_package| sed 's/-/_/g'`
669     eval "with_${ac_package}=no" ;;
670
671   --x)
672     # Obsolete; use --with-x.
673     with_x=yes ;;
674
675   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
676   | --x-incl | --x-inc | --x-in | --x-i)
677     ac_prev=x_includes ;;
678   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
679   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
680     x_includes="$ac_optarg" ;;
681
682   -x-libraries | --x-libraries | --x-librarie | --x-librari \
683   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
684     ac_prev=x_libraries ;;
685   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
686   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
687     x_libraries="$ac_optarg" ;;
688
689   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
690     ;;
691
692   *)
693     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
694       echo "configure: warning: $ac_option: invalid host type" 1>&2
695     fi
696     if test "x$nonopt" != xNONE; then
697       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
698     fi
699     nonopt="$ac_option"
700     ;;
701
702   esac
703 done
704
705 if test -n "$ac_prev"; then
706   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
707 fi
708
709 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
710
711 # File descriptor usage:
712 # 0 standard input
713 # 1 file creation
714 # 2 errors and warnings
715 # 3 some systems may open it to /dev/tty
716 # 4 used on the Kubota Titan
717 # 6 checking for... messages and results
718 # 5 compiler messages saved in config.log
719 if test "$silent" = yes; then
720   exec 6>/dev/null
721 else
722   exec 6>&1
723 fi
724 exec 5>./config.log
725
726 echo "\
727 This file contains any messages produced by compilers while
728 running configure, to aid debugging if configure makes a mistake.
729 " 1>&5
730
731 # Strip out --no-create and --no-recursion so they do not pile up.
732 # Also quote any args containing shell metacharacters.
733 ac_configure_args=
734 for ac_arg
735 do
736   case "$ac_arg" in
737   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
738   | --no-cr | --no-c) ;;
739   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
740   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
741   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
742   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
743   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
744   esac
745 done
746
747 # NLS nuisances.
748 # Only set these to C if already set.  These must not be set unconditionally
749 # because not all systems understand e.g. LANG=C (notably SCO).
750 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
751 # Non-C LC_CTYPE values break the ctype check.
752 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
753 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
754 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
755 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
756
757 # confdefs.h avoids OS command line length limits that DEFS can exceed.
758 rm -rf conftest* confdefs.h
759 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
760 echo > confdefs.h
761
762 # A filename unique to this package, relative to the directory that
763 # configure is in, which we can look for to find out if srcdir is correct.
764 ac_unique_file=build/version.sh
765
766 # Find the source files, if location was not specified.
767 if test -z "$srcdir"; then
768   ac_srcdir_defaulted=yes
769   # Try the directory containing this script, then its parent.
770   ac_prog=$0
771   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
772   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
773   srcdir=$ac_confdir
774   if test ! -r $srcdir/$ac_unique_file; then
775     srcdir=..
776   fi
777 else
778   ac_srcdir_defaulted=no
779 fi
780 if test ! -r $srcdir/$ac_unique_file; then
781   if test "$ac_srcdir_defaulted" = yes; then
782     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
783   else
784     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
785   fi
786 fi
787 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
788
789 # Prefer explicitly selected file to automatically selected ones.
790 if test -z "$CONFIG_SITE"; then
791   if test "x$prefix" != xNONE; then
792     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
793   else
794     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
795   fi
796 fi
797 for ac_site_file in $CONFIG_SITE; do
798   if test -r "$ac_site_file"; then
799     echo "loading site script $ac_site_file"
800     . "$ac_site_file"
801   fi
802 done
803
804
805 ac_ext=c
806 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
807 ac_cpp='$CPP $CPPFLAGS'
808 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
809 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
810 cross_compiling=$ac_cv_prog_cc_cross
811
812 ac_exeext=
813 ac_objext=o
814 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
815   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
816   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
817     ac_n= ac_c='
818 ' ac_t='        '
819   else
820     ac_n=-n ac_c= ac_t=
821   fi
822 else
823   ac_n= ac_c='\c' ac_t=
824 fi
825
826
827 # set unset (borrowed from autoconf 2.49c)
828 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
829   ol_unset=unset
830 else
831   ol_unset=false
832 fi
833 # unset CDPATH
834 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
835
836 ac_aux_dir=
837 for ac_dir in build $srcdir/build; do
838   if test -f $ac_dir/install-sh; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/install-sh -c"
841     break
842   elif test -f $ac_dir/install.sh; then
843     ac_aux_dir=$ac_dir
844     ac_install_sh="$ac_aux_dir/install.sh -c"
845     break
846   elif test -f $ac_dir/shtool; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/shtool install -c"
849     break
850   fi
851 done
852 if test -z "$ac_aux_dir"; then
853   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
854 fi
855 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
856 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
857 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
858
859 eval `$ac_aux_dir/version.sh`
860 if test -z "$OL_STRING"; then
861         { echo "configure: error: could not determine version" 1>&2; exit 1; }
862 fi
863
864 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
865         ac_cv_shtool="$ac_aux_dir/shtool"
866 else
867         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
868 fi
869
870 SHTOOL="$ac_cv_shtool"
871
872 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
873 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
874
875 OPENLDAP_CVS=""
876 if test -d $ac_aux_dir/CVS; then
877         OPENLDAP_CVS="(from CVS sources) "
878 fi
879
880 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
881
882
883 echo $ac_n "checking host system type""... $ac_c" 1>&6
884 echo "configure:885: checking host system type" >&5
885 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
886
887 # Make sure we can run config.sub.
888   if $ac_config_sub sun4 >/dev/null 2>&1; then :
889     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
890   fi
891
892   ac_cv_host_alias=$host
893   case "$ac_cv_host_alias" in
894   NONE)
895     case $nonopt in
896     NONE)
897       if ac_cv_host_alias=`$ac_config_guess`; then :
898       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
899       fi ;;
900     *) ac_cv_host_alias=$nonopt ;;
901     esac ;;
902   esac
903
904   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
905   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
906   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
907   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
908 else
909   echo $ac_n "(cached) $ac_c" 1>&6
910 fi
911
912 echo "$ac_t""$ac_cv_host" 1>&6
913
914 host=$ac_cv_host
915 host_alias=$ac_cv_host_alias
916 host_cpu=$ac_cv_host_cpu
917 host_vendor=$ac_cv_host_vendor
918 host_os=$ac_cv_host_os
919
920
921
922
923
924 echo $ac_n "checking target system type""... $ac_c" 1>&6
925 echo "configure:926: checking target system type" >&5
926 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
927
928 # Make sure we can run config.sub.
929   if $ac_config_sub sun4 >/dev/null 2>&1; then :
930     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
931   fi
932
933   ac_cv_target_alias=$target
934   case "$ac_cv_target_alias" in
935   NONE)
936     case $nonopt in
937     NONE)
938       ac_cv_target_alias=$host_alias ;;
939
940     *) ac_cv_target_alias=$nonopt ;;
941     esac ;;
942   esac
943
944   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
945   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
946   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
947   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
948 else
949   echo $ac_n "(cached) $ac_c" 1>&6
950 fi
951
952 echo "$ac_t""$ac_cv_target" 1>&6
953
954 target=$ac_cv_target
955 target_alias=$ac_cv_target_alias
956 target_cpu=$ac_cv_target_cpu
957 target_vendor=$ac_cv_target_vendor
958 target_os=$ac_cv_target_os
959
960
961
962
963
964 echo $ac_n "checking build system type""... $ac_c" 1>&6
965 echo "configure:966: checking build system type" >&5
966 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
967
968 # Make sure we can run config.sub.
969   if $ac_config_sub sun4 >/dev/null 2>&1; then :
970     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
971   fi
972
973   ac_cv_build_alias=$build
974   case "$ac_cv_build_alias" in
975   NONE)
976     case $nonopt in
977     NONE)
978       ac_cv_build_alias=$host_alias ;;
979
980     *) ac_cv_build_alias=$nonopt ;;
981     esac ;;
982   esac
983
984   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
985   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 else
989   echo $ac_n "(cached) $ac_c" 1>&6
990 fi
991
992 echo "$ac_t""$ac_cv_build" 1>&6
993
994 build=$ac_cv_build
995 build_alias=$ac_cv_build_alias
996 build_cpu=$ac_cv_build_cpu
997 build_vendor=$ac_cv_build_vendor
998 build_os=$ac_cv_build_os
999
1000
1001
1002
1003
1004 # Do some error checking and defaulting for the host and target type.
1005 # The inputs are:
1006 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1007 #
1008 # The rules are:
1009 # 1. You are not allowed to specify --host, --target, and nonopt at the
1010 #    same time.
1011 # 2. Host defaults to nonopt.
1012 # 3. If nonopt is not specified, then host defaults to the current host,
1013 #    as determined by config.guess.
1014 # 4. Target and build default to nonopt.
1015 # 5. If nonopt is not specified, then target and build default to host.
1016
1017 # The aliases save the names the user supplied, while $host etc.
1018 # will get canonicalized.
1019 case $host---$target---$nonopt in
1020 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1021 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1022 esac
1023
1024 test "$host_alias" != "$target_alias" &&
1025   test "$program_prefix$program_suffix$program_transform_name" = \
1026     NONENONEs,x,x, &&
1027   program_prefix=${target_alias}-
1028
1029
1030 # Find a good install program.  We prefer a C program (faster),
1031 # so one script is as good as another.  But avoid the broken or
1032 # incompatible versions:
1033 # SysV /etc/install, /usr/sbin/install
1034 # SunOS /usr/etc/install
1035 # IRIX /sbin/install
1036 # AIX /bin/install
1037 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1038 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1039 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1040 # ./install, which can be erroneously created by make from ./install.sh.
1041 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1042 echo "configure:1043: checking for a BSD compatible install" >&5
1043 if test -z "$INSTALL"; then
1044 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1048   for ac_dir in $PATH; do
1049     # Account for people who put trailing slashes in PATH elements.
1050     case "$ac_dir/" in
1051     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1052     *)
1053       # OSF1 and SCO ODT 3.0 have their own names for install.
1054       # Don't use installbsd from OSF since it installs stuff as root
1055       # by default.
1056       for ac_prog in ginstall scoinst install; do
1057         if test -f $ac_dir/$ac_prog; then
1058           if test $ac_prog = install &&
1059             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # AIX install.  It has an incompatible calling convention.
1061             :
1062           elif test $ac_prog = install &&
1063             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # program-specific install script used by HP pwplus--don't use.
1065             :
1066           else
1067             ac_cv_path_install="$ac_dir/$ac_prog -c"
1068             break 2
1069           fi
1070         fi
1071       done
1072       ;;
1073     esac
1074   done
1075   IFS="$ac_save_IFS"
1076
1077 fi
1078   if test "${ac_cv_path_install+set}" = set; then
1079     INSTALL="$ac_cv_path_install"
1080   else
1081     # As a last resort, use the slow shell script.  We don't cache a
1082     # path for INSTALL within a source directory, because that will
1083     # break other packages using the cache if that directory is
1084     # removed, or if the path is relative.
1085     INSTALL="$ac_install_sh"
1086   fi
1087 fi
1088 echo "$ac_t""$INSTALL" 1>&6
1089
1090 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1091 # It thinks the first close brace ends the variable substitution.
1092 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1093
1094 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1095
1096 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1097
1098 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1099 echo "configure:1100: checking whether build environment is sane" >&5
1100 # Just in case
1101 sleep 1
1102 echo timestamp > conftestfile
1103 # Do `set' in a subshell so we don't clobber the current shell's
1104 # arguments.  Must try -L first in case configure is actually a
1105 # symlink; some systems play weird games with the mod time of symlinks
1106 # (eg FreeBSD returns the mod time of the symlink's containing
1107 # directory).
1108 if (
1109    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1110    if test "$*" = "X"; then
1111       # -L didn't work.
1112       set X `ls -t $srcdir/configure conftestfile`
1113    fi
1114    if test "$*" != "X $srcdir/configure conftestfile" \
1115       && test "$*" != "X conftestfile $srcdir/configure"; then
1116
1117       # If neither matched, then we have a broken ls.  This can happen
1118       # if, for instance, CONFIG_SHELL is bash and it inherits a
1119       # broken ls alias from the environment.  This has actually
1120       # happened.  Such a system could not be considered "sane".
1121       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1122 alias in your environment" 1>&2; exit 1; }
1123    fi
1124
1125    test "$2" = conftestfile
1126    )
1127 then
1128    # Ok.
1129    :
1130 else
1131    { echo "configure: error: newly created file is older than distributed files!
1132 Check your system clock" 1>&2; exit 1; }
1133 fi
1134 rm -f conftest*
1135 echo "$ac_t""yes" 1>&6
1136 if test "$program_transform_name" = s,x,x,; then
1137   program_transform_name=
1138 else
1139   # Double any \ or $.  echo might interpret backslashes.
1140   cat <<\EOF_SED > conftestsed
1141 s,\\,\\\\,g; s,\$,$$,g
1142 EOF_SED
1143   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1144   rm -f conftestsed
1145 fi
1146 test "$program_prefix" != NONE &&
1147   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1148 # Use a double $ so make ignores it.
1149 test "$program_suffix" != NONE &&
1150   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1151
1152 # sed with no file args requires a program.
1153 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1154
1155 for ac_prog in mawk gawk nawk awk
1156 do
1157 # Extract the first word of "$ac_prog", so it can be a program name with args.
1158 set dummy $ac_prog; ac_word=$2
1159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160 echo "configure:1161: checking for $ac_word" >&5
1161 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1162   echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164   if test -n "$AWK"; then
1165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1166 else
1167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1168   ac_dummy="$PATH"
1169   for ac_dir in $ac_dummy; do
1170     test -z "$ac_dir" && ac_dir=.
1171     if test -f $ac_dir/$ac_word; then
1172       ac_cv_prog_AWK="$ac_prog"
1173       break
1174     fi
1175   done
1176   IFS="$ac_save_ifs"
1177 fi
1178 fi
1179 AWK="$ac_cv_prog_AWK"
1180 if test -n "$AWK"; then
1181   echo "$ac_t""$AWK" 1>&6
1182 else
1183   echo "$ac_t""no" 1>&6
1184 fi
1185
1186 test -n "$AWK" && break
1187 done
1188
1189 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether ${MAKE-make} sets \${MAKE}" >&5
1191 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1192 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1193   echo $ac_n "(cached) $ac_c" 1>&6
1194 else
1195   cat > conftestmake <<\EOF
1196 all:
1197         @echo 'ac_maketemp="${MAKE}"'
1198 EOF
1199 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1200 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1201 if test -n "$ac_maketemp"; then
1202   eval ac_cv_prog_make_${ac_make}_set=yes
1203 else
1204   eval ac_cv_prog_make_${ac_make}_set=no
1205 fi
1206 rm -f conftestmake
1207 fi
1208 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1209   echo "$ac_t""yes" 1>&6
1210   SET_MAKE=
1211 else
1212   echo "$ac_t""no" 1>&6
1213   SET_MAKE="MAKE=${MAKE-make}"
1214 fi
1215
1216
1217
1218 PACKAGE=$OL_PACKAGE
1219
1220 VERSION=$OL_VERSION
1221
1222 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1223   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1224 fi
1225
1226
1227
1228 missing_dir=`cd $ac_aux_dir && pwd`
1229 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1230 echo "configure:1231: checking for working aclocal" >&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 (aclocal --version) < /dev/null > /dev/null 2>&1; then
1235    ACLOCAL=aclocal
1236    echo "$ac_t""found" 1>&6
1237 else
1238    ACLOCAL="$missing_dir/missing aclocal"
1239    echo "$ac_t""missing" 1>&6
1240 fi
1241
1242 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working autoconf" >&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 (autoconf --version) < /dev/null > /dev/null 2>&1; then
1248    AUTOCONF=autoconf
1249    echo "$ac_t""found" 1>&6
1250 else
1251    AUTOCONF="$missing_dir/missing autoconf"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working automake" >&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 (automake --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOMAKE=automake
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOMAKE="$missing_dir/missing automake"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working autoheader" >&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 (autoheader --version) < /dev/null > /dev/null 2>&1; then
1274    AUTOHEADER=autoheader
1275    echo "$ac_t""found" 1>&6
1276 else
1277    AUTOHEADER="$missing_dir/missing autoheader"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1282 echo "configure:1283: checking for working makeinfo" >&5
1283 # Run test in a subshell; some versions of sh will print an error if
1284 # an executable is not found, even if stderr is redirected.
1285 # Redirect stdin to placate older versions of autoconf.  Sigh.
1286 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1287    MAKEINFO=makeinfo
1288    echo "$ac_t""found" 1>&6
1289 else
1290    MAKEINFO="$missing_dir/missing makeinfo"
1291    echo "$ac_t""missing" 1>&6
1292 fi
1293
1294 install_sh="$missing_dir/install-sh"
1295 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1296
1297 for ac_prog in gnutar gtar tar
1298 do
1299 # Extract the first word of "$ac_prog", so it can be a program name with args.
1300 set dummy $ac_prog; ac_word=$2
1301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1302 echo "configure:1303: checking for $ac_word" >&5
1303 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1304   echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306   if test -n "$AMTAR"; then
1307   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1308 else
1309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1310   ac_dummy="$PATH"
1311   for ac_dir in $ac_dummy; do
1312     test -z "$ac_dir" && ac_dir=.
1313     if test -f $ac_dir/$ac_word; then
1314       ac_cv_prog_AMTAR="$ac_prog"
1315       break
1316     fi
1317   done
1318   IFS="$ac_save_ifs"
1319 fi
1320 fi
1321 AMTAR="$ac_cv_prog_AMTAR"
1322 if test -n "$AMTAR"; then
1323   echo "$ac_t""$AMTAR" 1>&6
1324 else
1325   echo "$ac_t""no" 1>&6
1326 fi
1327
1328 test -n "$AMTAR" && break
1329 done
1330
1331
1332 AMTARFLAGS=
1333 if test -n "$AMTAR"; then
1334   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1335         AMTARFLAGS=o
1336   fi
1337 fi
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_PACKAGE "$PACKAGE"
1341 EOF
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_VERSION "$VERSION"
1345 EOF
1346
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION $OL_API_INC
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1362 EOF
1363
1364
1365 OPENLDAP_LIBRELEASE=$OL_API_LIB_RELEASE
1366
1367 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1368
1369 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1370
1371
1372
1373 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1374 echo "configure:1375: checking configure arguments" >&5
1375
1376
1377 top_builddir=`pwd`
1378
1379 ldap_subdir="/openldap"
1380
1381 # Check whether --with-subdir or --without-subdir was given.
1382 if test "${with_subdir+set}" = set; then
1383   withval="$with_subdir"
1384   case "$withval" in
1385         no) ldap_subdir=""
1386                 ;;
1387         yes)
1388                 ;;
1389         /*|\\*)
1390                 ldap_subdir="$withval"
1391                 ;;
1392         *)
1393                 ldap_subdir="/$withval"
1394                 ;;
1395 esac
1396
1397 fi
1398
1399
1400 # OpenLDAP --enable-debug
1401         # Check whether --enable-debug or --disable-debug was given.
1402 if test "${enable_debug+set}" = set; then
1403   enableval="$enable_debug"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no ; do
1407                 if test "$enableval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1413         fi
1414         ol_enable_debug="$ol_arg"
1415
1416 else
1417         ol_enable_debug="yes"
1418 fi
1419 # end --enable-debug
1420 # OpenLDAP --enable-dynamic
1421         # Check whether --enable-dynamic or --disable-dynamic was given.
1422 if test "${enable_dynamic+set}" = set; then
1423   enableval="$enable_dynamic"
1424   
1425         ol_arg=invalid
1426         for ol_val in auto yes no ; do
1427                 if test "$enableval" = "$ol_val" ; then
1428                         ol_arg="$ol_val"
1429                 fi
1430         done
1431         if test "$ol_arg" = "invalid" ; then
1432                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1433         fi
1434         ol_enable_dynamic="$ol_arg"
1435
1436 else
1437         ol_enable_dynamic="no"
1438 fi
1439 # end --enable-dynamic
1440 # OpenLDAP --enable-syslog
1441         # Check whether --enable-syslog or --disable-syslog was given.
1442 if test "${enable_syslog+set}" = set; then
1443   enableval="$enable_syslog"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1453         fi
1454         ol_enable_syslog="$ol_arg"
1455
1456 else
1457         ol_enable_syslog="auto"
1458 fi
1459 # end --enable-syslog
1460 # OpenLDAP --enable-proctitle
1461         # Check whether --enable-proctitle or --disable-proctitle was given.
1462 if test "${enable_proctitle+set}" = set; then
1463   enableval="$enable_proctitle"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1473         fi
1474         ol_enable_proctitle="$ol_arg"
1475
1476 else
1477         ol_enable_proctitle="yes"
1478 fi
1479 # end --enable-proctitle
1480 ol_enable_referrals=${ol_enable_referrals-no}
1481 ol_enable_kbind=${ol_enable_kbind-no}
1482 # OpenLDAP --enable-ipv6
1483         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1484 if test "${enable_ipv6+set}" = set; then
1485   enableval="$enable_ipv6"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no ; do
1489                 if test "$enableval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1495         fi
1496         ol_enable_ipv6="$ol_arg"
1497
1498 else
1499         ol_enable_ipv6="auto"
1500 fi
1501 # end --enable-ipv6
1502 # OpenLDAP --enable-local
1503         # Check whether --enable-local or --disable-local was given.
1504 if test "${enable_local+set}" = set; then
1505   enableval="$enable_local"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1515         fi
1516         ol_enable_local="$ol_arg"
1517
1518 else
1519         ol_enable_local="auto"
1520 fi
1521 # end --enable-local
1522
1523
1524 # OpenLDAP --with-cyrus_sasl
1525         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1526 if test "${with_cyrus_sasl+set}" = set; then
1527   withval="$with_cyrus_sasl"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto yes no  ; do
1531                 if test "$withval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1537         fi
1538         ol_with_cyrus_sasl="$ol_arg"
1539
1540 else
1541         ol_with_cyrus_sasl="auto"
1542 fi
1543 # end --with-cyrus_sasl
1544
1545 # OpenLDAP --with-fetch
1546         # Check whether --with-fetch or --without-fetch was given.
1547 if test "${with_fetch+set}" = set; then
1548   withval="$with_fetch"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1558         fi
1559         ol_with_fetch="$ol_arg"
1560
1561 else
1562         ol_with_fetch="auto"
1563 fi
1564 # end --with-fetch
1565
1566 ol_with_kerberos=${ol_with_kerberos-auto}
1567 # OpenLDAP --with-threads
1568         # Check whether --with-threads or --without-threads was given.
1569 if test "${with_threads+set}" = set; then
1570   withval="$with_threads"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1574                 if test "$withval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1580         fi
1581         ol_with_threads="$ol_arg"
1582
1583 else
1584         ol_with_threads="auto"
1585 fi
1586 # end --with-threads
1587
1588 # OpenLDAP --with-tls
1589         # Check whether --with-tls or --without-tls was given.
1590 if test "${with_tls+set}" = set; then
1591   withval="$with_tls"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto ssleay openssl yes no  ; do
1595                 if test "$withval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1601         fi
1602         ol_with_tls="$ol_arg"
1603
1604 else
1605         ol_with_tls="auto"
1606 fi
1607 # end --with-tls
1608
1609 # OpenLDAP --with-yielding_select
1610         # Check whether --with-yielding_select or --without-yielding_select was given.
1611 if test "${with_yielding_select+set}" = set; then
1612   withval="$with_yielding_select"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no manual  ; do
1616                 if test "$withval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1622         fi
1623         ol_with_yielding_select="$ol_arg"
1624
1625 else
1626         ol_with_yielding_select="auto"
1627 fi
1628 # end --with-yielding_select
1629
1630
1631
1632 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1633 if test "${with_xxslapdoptions+set}" = set; then
1634   withval="$with_xxslapdoptions"
1635   :
1636 fi
1637
1638 # OpenLDAP --enable-slapd
1639         # Check whether --enable-slapd or --disable-slapd was given.
1640 if test "${enable_slapd+set}" = set; then
1641   enableval="$enable_slapd"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_slapd="$ol_arg"
1653
1654 else
1655         ol_enable_slapd="yes"
1656 fi
1657 # end --enable-slapd
1658 # OpenLDAP --enable-aci
1659         # Check whether --enable-aci or --disable-aci was given.
1660 if test "${enable_aci+set}" = set; then
1661   enableval="$enable_aci"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1671         fi
1672         ol_enable_aci="$ol_arg"
1673
1674 else
1675         ol_enable_aci="no"
1676 fi
1677 # end --enable-aci
1678 # OpenLDAP --enable-cleartext
1679         # Check whether --enable-cleartext or --disable-cleartext was given.
1680 if test "${enable_cleartext+set}" = set; then
1681   enableval="$enable_cleartext"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1691         fi
1692         ol_enable_cleartext="$ol_arg"
1693
1694 else
1695         ol_enable_cleartext="yes"
1696 fi
1697 # end --enable-cleartext
1698 # OpenLDAP --enable-crypt
1699         # Check whether --enable-crypt or --disable-crypt was given.
1700 if test "${enable_crypt+set}" = set; then
1701   enableval="$enable_crypt"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1711         fi
1712         ol_enable_crypt="$ol_arg"
1713
1714 else
1715         ol_enable_crypt="no"
1716 fi
1717 # end --enable-crypt
1718 # OpenLDAP --enable-lmpasswd
1719         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1720 if test "${enable_lmpasswd+set}" = set; then
1721   enableval="$enable_lmpasswd"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1731         fi
1732         ol_enable_lmpasswd="$ol_arg"
1733
1734 else
1735         ol_enable_lmpasswd="no"
1736 fi
1737 # end --enable-lmpasswd
1738 # OpenLDAP --enable-spasswd
1739         # Check whether --enable-spasswd or --disable-spasswd was given.
1740 if test "${enable_spasswd+set}" = set; then
1741   enableval="$enable_spasswd"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1751         fi
1752         ol_enable_spasswd="$ol_arg"
1753
1754 else
1755         ol_enable_spasswd="no"
1756 fi
1757 # end --enable-spasswd
1758 # OpenLDAP --enable-modules
1759         # Check whether --enable-modules or --disable-modules was given.
1760 if test "${enable_modules+set}" = set; then
1761   enableval="$enable_modules"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1771         fi
1772         ol_enable_modules="$ol_arg"
1773
1774 else
1775         ol_enable_modules="no"
1776 fi
1777 # end --enable-modules
1778 ol_enable_multimaster=${ol_enable_multimaster-no}
1779 # OpenLDAP --enable-rewrite
1780         # Check whether --enable-rewrite or --disable-rewrite was given.
1781 if test "${enable_rewrite+set}" = set; then
1782   enableval="$enable_rewrite"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1792         fi
1793         ol_enable_rewrite="$ol_arg"
1794
1795 else
1796         ol_enable_rewrite="auto"
1797 fi
1798 # end --enable-rewrite
1799 # OpenLDAP --enable-rlookups
1800         # Check whether --enable-rlookups or --disable-rlookups was given.
1801 if test "${enable_rlookups+set}" = set; then
1802   enableval="$enable_rlookups"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1812         fi
1813         ol_enable_rlookups="$ol_arg"
1814
1815 else
1816         ol_enable_rlookups="no"
1817 fi
1818 # end --enable-rlookups
1819 # OpenLDAP --enable-slapi
1820         # Check whether --enable-slapi or --disable-slapi was given.
1821 if test "${enable_slapi+set}" = set; then
1822   enableval="$enable_slapi"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1832         fi
1833         ol_enable_slapi="$ol_arg"
1834
1835 else
1836         ol_enable_slapi="no"
1837 fi
1838 # end --enable-slapi
1839 # OpenLDAP --enable-slp
1840         # Check whether --enable-slp or --disable-slp was given.
1841 if test "${enable_slp+set}" = set; then
1842   enableval="$enable_slp"
1843   
1844         ol_arg=invalid
1845         for ol_val in auto yes no ; do
1846                 if test "$enableval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1852         fi
1853         ol_enable_slp="$ol_arg"
1854
1855 else
1856         ol_enable_slp="no"
1857 fi
1858 # end --enable-slp
1859 # OpenLDAP --enable-wrappers
1860         # Check whether --enable-wrappers or --disable-wrappers was given.
1861 if test "${enable_wrappers+set}" = set; then
1862   enableval="$enable_wrappers"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1872         fi
1873         ol_enable_wrappers="$ol_arg"
1874
1875 else
1876         ol_enable_wrappers="no"
1877 fi
1878 # end --enable-wrappers
1879
1880 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1881         passwd perl relay shell sql"
1882
1883 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1884 if test "${with_xxslapbackends+set}" = set; then
1885   withval="$with_xxslapbackends"
1886   :
1887 fi
1888
1889
1890 # OpenLDAP --enable-backends
1891         # Check whether --enable-backends or --disable-backends was given.
1892 if test "${enable_backends+set}" = set; then
1893   enableval="$enable_backends"
1894   
1895         ol_arg=invalid
1896         for ol_val in no yes mod ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1903         fi
1904         ol_enable_backends="$ol_arg"
1905
1906 else
1907         ol_enable_backends="no"
1908 fi
1909 # end --enable-backends
1910 # OpenLDAP --enable-bdb
1911         # Check whether --enable-bdb or --disable-bdb was given.
1912 if test "${enable_bdb+set}" = set; then
1913   enableval="$enable_bdb"
1914   
1915         ol_arg=invalid
1916         for ol_val in no yes mod ; do
1917                 if test "$enableval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1923         fi
1924         ol_enable_bdb="$ol_arg"
1925
1926 else
1927         ol_enable_bdb="yes"
1928 fi
1929 # end --enable-bdb
1930 # OpenLDAP --enable-dnssrv
1931         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1932 if test "${enable_dnssrv+set}" = set; then
1933   enableval="$enable_dnssrv"
1934   
1935         ol_arg=invalid
1936         for ol_val in no yes mod ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1943         fi
1944         ol_enable_dnssrv="$ol_arg"
1945
1946 else
1947         ol_enable_dnssrv="no"
1948 fi
1949 # end --enable-dnssrv
1950 # OpenLDAP --enable-hdb
1951         # Check whether --enable-hdb or --disable-hdb was given.
1952 if test "${enable_hdb+set}" = set; then
1953   enableval="$enable_hdb"
1954   
1955         ol_arg=invalid
1956         for ol_val in no yes mod ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1963         fi
1964         ol_enable_hdb="$ol_arg"
1965
1966 else
1967         ol_enable_hdb="no"
1968 fi
1969 # end --enable-hdb
1970 # OpenLDAP --enable-ldap
1971         # Check whether --enable-ldap or --disable-ldap was given.
1972 if test "${enable_ldap+set}" = set; then
1973   enableval="$enable_ldap"
1974   
1975         ol_arg=invalid
1976         for ol_val in no yes mod ; do
1977                 if test "$enableval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1983         fi
1984         ol_enable_ldap="$ol_arg"
1985
1986 else
1987         ol_enable_ldap="no"
1988 fi
1989 # end --enable-ldap
1990 # OpenLDAP --enable-ldbm
1991         # Check whether --enable-ldbm or --disable-ldbm was given.
1992 if test "${enable_ldbm+set}" = set; then
1993   enableval="$enable_ldbm"
1994   
1995         ol_arg=invalid
1996         for ol_val in no yes mod ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2003         fi
2004         ol_enable_ldbm="$ol_arg"
2005
2006 else
2007         ol_enable_ldbm="no"
2008 fi
2009 # end --enable-ldbm
2010 # OpenLDAP --with-ldbm_api
2011         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2012 if test "${with_ldbm_api+set}" = set; then
2013   withval="$with_ldbm_api"
2014   
2015         ol_arg=invalid
2016         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_api="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_api="auto"
2028 fi
2029 # end --with-ldbm_api
2030
2031 # OpenLDAP --with-ldbm_type
2032         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2033 if test "${with_ldbm_type+set}" = set; then
2034   withval="$with_ldbm_type"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto btree hash ; do
2038                 if test "$withval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2044         fi
2045         ol_with_ldbm_type="$ol_arg"
2046
2047 else
2048         ol_with_ldbm_type="auto"
2049 fi
2050 # end --with-ldbm_type
2051
2052 # OpenLDAP --enable-meta
2053         # Check whether --enable-meta or --disable-meta was given.
2054 if test "${enable_meta+set}" = set; then
2055   enableval="$enable_meta"
2056   
2057         ol_arg=invalid
2058         for ol_val in no yes mod ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2065         fi
2066         ol_enable_meta="$ol_arg"
2067
2068 else
2069         ol_enable_meta="no"
2070 fi
2071 # end --enable-meta
2072 # OpenLDAP --enable-monitor
2073         # Check whether --enable-monitor or --disable-monitor was given.
2074 if test "${enable_monitor+set}" = set; then
2075   enableval="$enable_monitor"
2076   
2077         ol_arg=invalid
2078         for ol_val in no yes mod ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2085         fi
2086         ol_enable_monitor="$ol_arg"
2087
2088 else
2089         ol_enable_monitor="yes"
2090 fi
2091 # end --enable-monitor
2092 # OpenLDAP --enable-null
2093         # Check whether --enable-null or --disable-null was given.
2094 if test "${enable_null+set}" = set; then
2095   enableval="$enable_null"
2096   
2097         ol_arg=invalid
2098         for ol_val in no yes mod ; do
2099                 if test "$enableval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2105         fi
2106         ol_enable_null="$ol_arg"
2107
2108 else
2109         ol_enable_null="no"
2110 fi
2111 # end --enable-null
2112 # OpenLDAP --enable-passwd
2113         # Check whether --enable-passwd or --disable-passwd was given.
2114 if test "${enable_passwd+set}" = set; then
2115   enableval="$enable_passwd"
2116   
2117         ol_arg=invalid
2118         for ol_val in no yes mod ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2125         fi
2126         ol_enable_passwd="$ol_arg"
2127
2128 else
2129         ol_enable_passwd="no"
2130 fi
2131 # end --enable-passwd
2132 # OpenLDAP --enable-perl
2133         # Check whether --enable-perl or --disable-perl was given.
2134 if test "${enable_perl+set}" = set; then
2135   enableval="$enable_perl"
2136   
2137         ol_arg=invalid
2138         for ol_val in no yes mod ; do
2139                 if test "$enableval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2145         fi
2146         ol_enable_perl="$ol_arg"
2147
2148 else
2149         ol_enable_perl="no"
2150 fi
2151 # end --enable-perl
2152 # OpenLDAP --enable-relay
2153         # Check whether --enable-relay or --disable-relay was given.
2154 if test "${enable_relay+set}" = set; then
2155   enableval="$enable_relay"
2156   
2157         ol_arg=invalid
2158         for ol_val in no yes mod ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2165         fi
2166         ol_enable_relay="$ol_arg"
2167
2168 else
2169         ol_enable_relay="yes"
2170 fi
2171 # end --enable-relay
2172 # OpenLDAP --enable-shell
2173         # Check whether --enable-shell or --disable-shell was given.
2174 if test "${enable_shell+set}" = set; then
2175   enableval="$enable_shell"
2176   
2177         ol_arg=invalid
2178         for ol_val in no yes mod ; do
2179                 if test "$enableval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2185         fi
2186         ol_enable_shell="$ol_arg"
2187
2188 else
2189         ol_enable_shell="no"
2190 fi
2191 # end --enable-shell
2192 # OpenLDAP --enable-sql
2193         # Check whether --enable-sql or --disable-sql was given.
2194 if test "${enable_sql+set}" = set; then
2195   enableval="$enable_sql"
2196   
2197         ol_arg=invalid
2198         for ol_val in no yes mod ; do
2199                 if test "$enableval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2205         fi
2206         ol_enable_sql="$ol_arg"
2207
2208 else
2209         ol_enable_sql="no"
2210 fi
2211 # end --enable-sql
2212
2213 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2214         refint unique"
2215
2216 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2217 if test "${with_xxslapoverlays+set}" = set; then
2218   withval="$with_xxslapoverlays"
2219   :
2220 fi
2221
2222
2223 # OpenLDAP --enable-overlays
2224         # Check whether --enable-overlays or --disable-overlays was given.
2225 if test "${enable_overlays+set}" = set; then
2226   enableval="$enable_overlays"
2227   
2228         ol_arg=invalid
2229         for ol_val in no yes mod ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2236         fi
2237         ol_enable_overlays="$ol_arg"
2238
2239 else
2240         ol_enable_overlays="no"
2241 fi
2242 # end --enable-overlays
2243 # OpenLDAP --enable-chain
2244         # Check whether --enable-chain or --disable-chain was given.
2245 if test "${enable_chain+set}" = set; then
2246   enableval="$enable_chain"
2247   
2248         ol_arg=invalid
2249         for ol_val in no yes mod ; do
2250                 if test "$enableval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2256         fi
2257         ol_enable_chain="$ol_arg"
2258
2259 else
2260         ol_enable_chain="no"
2261 fi
2262 # end --enable-chain
2263
2264 # OpenLDAP --enable-denyop
2265         # Check whether --enable-denyop or --disable-denyop was given.
2266 if test "${enable_denyop+set}" = set; then
2267   enableval="$enable_denyop"
2268   
2269         ol_arg=invalid
2270         for ol_val in no yes mod ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2277         fi
2278         ol_enable_denyop="$ol_arg"
2279
2280 else
2281         ol_enable_denyop="no"
2282 fi
2283 # end --enable-denyop
2284
2285 # OpenLDAP --enable-dyngroup
2286         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2287 if test "${enable_dyngroup+set}" = set; then
2288   enableval="$enable_dyngroup"
2289   
2290         ol_arg=invalid
2291         for ol_val in no yes mod ; do
2292                 if test "$enableval" = "$ol_val" ; then
2293                         ol_arg="$ol_val"
2294                 fi
2295         done
2296         if test "$ol_arg" = "invalid" ; then
2297                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2298         fi
2299         ol_enable_dyngroup="$ol_arg"
2300
2301 else
2302         ol_enable_dyngroup="no"
2303 fi
2304 # end --enable-dyngroup
2305
2306 # OpenLDAP --enable-lastmod
2307         # Check whether --enable-lastmod or --disable-lastmod was given.
2308 if test "${enable_lastmod+set}" = set; then
2309   enableval="$enable_lastmod"
2310   
2311         ol_arg=invalid
2312         for ol_val in no yes mod ; do
2313                 if test "$enableval" = "$ol_val" ; then
2314                         ol_arg="$ol_val"
2315                 fi
2316         done
2317         if test "$ol_arg" = "invalid" ; then
2318                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2319         fi
2320         ol_enable_lastmod="$ol_arg"
2321
2322 else
2323         ol_enable_lastmod="no"
2324 fi
2325 # end --enable-lastmod
2326
2327 # OpenLDAP --enable-ppolicy
2328         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2329 if test "${enable_ppolicy+set}" = set; then
2330   enableval="$enable_ppolicy"
2331   
2332         ol_arg=invalid
2333         for ol_val in no yes mod ; do
2334                 if test "$enableval" = "$ol_val" ; then
2335                         ol_arg="$ol_val"
2336                 fi
2337         done
2338         if test "$ol_arg" = "invalid" ; then
2339                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2340         fi
2341         ol_enable_ppolicy="$ol_arg"
2342
2343 else
2344         ol_enable_ppolicy="no"
2345 fi
2346 # end --enable-ppolicy
2347
2348 # OpenLDAP --enable-proxycache
2349         # Check whether --enable-proxycache or --disable-proxycache was given.
2350 if test "${enable_proxycache+set}" = set; then
2351   enableval="$enable_proxycache"
2352   
2353         ol_arg=invalid
2354         for ol_val in no yes mod ; do
2355                 if test "$enableval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2361         fi
2362         ol_enable_proxycache="$ol_arg"
2363
2364 else
2365         ol_enable_proxycache="no"
2366 fi
2367 # end --enable-proxycache
2368
2369 # OpenLDAP --enable-refint
2370         # Check whether --enable-refint or --disable-refint was given.
2371 if test "${enable_refint+set}" = set; then
2372   enableval="$enable_refint"
2373   
2374         ol_arg=invalid
2375         for ol_val in no yes mod ; do
2376                 if test "$enableval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2382         fi
2383         ol_enable_refint="$ol_arg"
2384
2385 else
2386         ol_enable_refint="no"
2387 fi
2388 # end --enable-refint
2389
2390 # OpenLDAP --enable-rwm
2391         # Check whether --enable-rwm or --disable-rwm was given.
2392 if test "${enable_rwm+set}" = set; then
2393   enableval="$enable_rwm"
2394   
2395         ol_arg=invalid
2396         for ol_val in no yes mod ; do
2397                 if test "$enableval" = "$ol_val" ; then
2398                         ol_arg="$ol_val"
2399                 fi
2400         done
2401         if test "$ol_arg" = "invalid" ; then
2402                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2403         fi
2404         ol_enable_rwm="$ol_arg"
2405
2406 else
2407         ol_enable_rwm="no"
2408 fi
2409 # end --enable-rwm
2410
2411 # OpenLDAP --enable-unique
2412         # Check whether --enable-unique or --disable-unique was given.
2413 if test "${enable_unique+set}" = set; then
2414   enableval="$enable_unique"
2415   
2416         ol_arg=invalid
2417         for ol_val in no yes mod ; do
2418                 if test "$enableval" = "$ol_val" ; then
2419                         ol_arg="$ol_val"
2420                 fi
2421         done
2422         if test "$ol_arg" = "invalid" ; then
2423                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2424         fi
2425         ol_enable_unique="$ol_arg"
2426
2427 else
2428         ol_enable_unique="no"
2429 fi
2430 # end --enable-unique
2431
2432
2433
2434 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2435 if test "${with_xxslurpdoptions+set}" = set; then
2436   withval="$with_xxslurpdoptions"
2437   :
2438 fi
2439
2440 # OpenLDAP --enable-slurpd
2441         # Check whether --enable-slurpd or --disable-slurpd was given.
2442 if test "${enable_slurpd+set}" = set; then
2443   enableval="$enable_slurpd"
2444   
2445         ol_arg=invalid
2446         for ol_val in auto yes no ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2453         fi
2454         ol_enable_slurpd="$ol_arg"
2455
2456 else
2457         ol_enable_slurpd="auto"
2458 fi
2459 # end --enable-slurpd
2460
2461 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2462 if test "${with_xxliboptions+set}" = set; then
2463   withval="$with_xxliboptions"
2464   :
2465 fi
2466
2467 # Check whether --enable-static or --disable-static was given.
2468 if test "${enable_static+set}" = set; then
2469   enableval="$enable_static"
2470   p=${PACKAGE-default}
2471 case $enableval in
2472 yes) enable_static=yes ;;
2473 no) enable_static=no ;;
2474 *)
2475   enable_static=no
2476   # Look at the argument we got.  We use all the common list separators.
2477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2478   for pkg in $enableval; do
2479     if test "X$pkg" = "X$p"; then
2480       enable_static=yes
2481     fi
2482   done
2483   IFS="$ac_save_ifs"
2484   ;;
2485 esac
2486 else
2487   enable_static=yes
2488 fi
2489
2490 # Check whether --enable-shared or --disable-shared was given.
2491 if test "${enable_shared+set}" = set; then
2492   enableval="$enable_shared"
2493   p=${PACKAGE-default}
2494 case $enableval in
2495 yes) enable_shared=yes ;;
2496 no) enable_shared=no ;;
2497 *)
2498   enable_shared=no
2499   # Look at the argument we got.  We use all the common list separators.
2500   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2501   for pkg in $enableval; do
2502     if test "X$pkg" = "X$p"; then
2503       enable_shared=yes
2504     fi
2505   done
2506   IFS="$ac_save_ifs"
2507   ;;
2508 esac
2509 else
2510   enable_shared=yes
2511 fi
2512
2513
2514
2515 # Activate any backends that were not explicitly enabled.
2516 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2517 if test $ol_enable_backends != no ; then
2518         for i in $Backends; do
2519                 eval "ol_tmp=\$ol_enable_$i"
2520                 if test $ol_tmp = no ; then
2521                         eval "ol_enable_$i=$ol_enable_backends"
2522                 fi
2523         done
2524 fi
2525 # Activate the overlays
2526 if test $ol_enable_overlays != no ; then
2527         for i in $Overlays; do
2528                 eval "ol_tmp=\$ol_enable_$i"
2529                 if test $ol_tmp = no ; then
2530                         eval "ol_enable_$i=$ol_enable_overlays"
2531                 fi
2532         done
2533 fi
2534
2535 # validate options
2536 if test $ol_enable_slapd = no ; then
2537                 if test $ol_enable_slapi = yes ; then
2538                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2539         fi
2540         if test $ol_enable_backends != no ; then
2541                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2542         fi
2543         for i in $Backends; do
2544                 eval "ol_tmp=\$ol_enable_$i"
2545                 if test $ol_tmp != no ; then
2546                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2547                         eval "ol_enable_$i=no"
2548                 fi
2549         done
2550         if test $ol_enable_modules = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2552         fi
2553         if test $ol_enable_multimaster = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2555         fi
2556         if test $ol_enable_wrappers = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2558         fi
2559         if test $ol_enable_rlookups = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2561         fi
2562         if test $ol_enable_aci = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2564         fi
2565         if test $ol_with_ldbm_api != auto ; then
2566                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2567         fi
2568         if test $ol_with_ldbm_type != auto ; then
2569                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2570         fi
2571         if test $ol_enable_slurpd = yes ; then
2572                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2573         fi
2574         if test $ol_enable_rewrite = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2576         fi
2577                 if test $ol_enable_overlays != no ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2579         fi
2580         for i in $Overlays; do
2581                 eval "ol_tmp=\$ol_enable_$i"
2582                 if test $ol_tmp != no ; then
2583                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2584                         eval "ol_enable_$i=no"
2585                 fi
2586         done
2587
2588         # force settings to no
2589         ol_enable_slapi=no
2590
2591         ol_enable_backends=no
2592         ol_enable_overlays=no
2593         ol_enable_modules=no
2594         ol_enable_multimaster=no
2595         ol_enable_rlookups=no
2596         ol_enable_aci=no
2597         ol_enable_wrappers=no
2598
2599         ol_with_ldbm_api=no
2600         ol_with_ldbm_type=no
2601
2602         ol_enable_slurpd=no
2603
2604         ol_enable_rewrite=no
2605
2606 elif test $ol_enable_ldbm = no ; then
2607         
2608         if test $ol_with_ldbm_api != auto ; then
2609                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2610         fi
2611
2612         if test $ol_with_ldbm_type != auto ; then
2613                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2614         fi
2615
2616         if test $ol_enable_modules != yes -a \
2617                 $ol_enable_bdb = no -a \
2618                 $ol_enable_dnssrv = no -a \
2619                 $ol_enable_hdb = no -a \
2620                 $ol_enable_ldap = no -a \
2621                 $ol_enable_meta = no -a \
2622                 $ol_enable_monitor = no -a \
2623                 $ol_enable_null = no -a \
2624                 $ol_enable_passwd = no -a \
2625                 $ol_enable_perl = no -a \
2626                 $ol_enable_relay = no -a \
2627                 $ol_enable_shell = no -a \
2628                 $ol_enable_sql = no ; then
2629
2630                 if test $ol_enable_slapd = yes ; then
2631                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2632                 else
2633                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2634                         ol_enable_slapd=no
2635                 fi
2636         fi
2637
2638         ol_with_ldbm_api=no
2639         ol_with_ldbm_type=no
2640
2641         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2642                 ol_with_ldbm_api=berkeley
2643         fi
2644
2645 else
2646                 if test $ol_with_ldbm_api = gdbm -a \
2647                 $ol_with_ldbm_type = btree ; then
2648                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2649         fi
2650         if test $ol_with_ldbm_api = mdbm -a \
2651                 $ol_with_ldbm_type = btree ; then
2652                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2653         fi
2654         if test $ol_with_ldbm_api = ndbm -a \
2655                 $ol_with_ldbm_type = btree ; then
2656                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2657         fi
2658
2659         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2660                 if test $ol_with_ldbm_api = auto ; then
2661                         ol_with_ldbm_api=berkeley
2662                 elif test $ol_with_ldbm_api != berkeley ; then
2663                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2664                 fi
2665         fi
2666 fi
2667
2668 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2669         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2670 fi
2671
2672 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2673         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2674 fi
2675
2676 if test $ol_enable_slurpd = yes ; then
2677                 if test $ol_with_threads = no ; then
2678                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2679         fi
2680 fi
2681
2682 if test $ol_enable_lmpasswd = yes ; then
2683         if test $ol_with_tls = no ; then
2684                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2685         fi
2686 fi
2687
2688 if test $ol_enable_kbind = yes ; then
2689         if test $ol_with_kerberos = no ; then
2690                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2691         elif test $ol_with_kerberos = auto ; then
2692                 ol_with_kerberos=yes
2693         fi
2694
2695 elif test $ol_enable_kbind = no ; then
2696         if test $ol_with_kerberos = auto ; then
2697                 ol_with_kerberos=no
2698         elif test $ol_with_kerberos != no ; then
2699                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2700                 ol_with_kerberos=no
2701         fi
2702 fi
2703
2704 if test $ol_enable_spasswd = yes ; then
2705         if test $ol_with_cyrus_sasl = no ; then
2706                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2707         fi
2708         ol_with_cyrus_sasl=yes
2709 fi
2710
2711 echo "$ac_t""done" 1>&6
2712
2713 LDAP_LIBS=
2714 LDBM_LIBS=
2715 LTHREAD_LIBS=
2716 LUTIL_LIBS=
2717
2718 SLAPD_LIBS=
2719 SLURPD_LIBS=
2720
2721 BUILD_SLAPD=no
2722 BUILD_SLURPD=no
2723
2724 BUILD_THREAD=no
2725
2726 BUILD_SLAPI=no
2727 SLAPD_SLAPI_DEPEND=
2728
2729 BUILD_BDB=no
2730 BUILD_DNSSRV=no
2731 BUILD_HDB=no
2732 BUILD_LDAP=no
2733 BUILD_LDBM=no
2734 BUILD_META=no
2735 BUILD_MONITOR=no
2736 BUILD_NULL=no
2737 BUILD_PASSWD=no
2738 BUILD_PERL=no
2739 BUILD_RELAY=no
2740 BUILD_SHELL=no
2741 BUILD_SQL=no
2742
2743 BUILD_CHAIN=no
2744 BUILD_DENYOP=no
2745 BUILD_DYNGROUP=no
2746 BUILD_LASTMOD=no
2747 BUILD_PPOLICY=no
2748 BUILD_PROXYCACHE=no
2749 BUILD_REFINT=no
2750 BUILD_RWM=no
2751 BUILD_UNIQUE=no
2752
2753 SLAPD_DYNAMIC_OVERLAYS=
2754
2755 SLAPD_MODULES_LDFLAGS=
2756 SLAPD_MODULES_CPPFLAGS=
2757
2758 SLAPD_STATIC_BACKENDS=
2759 SLAPD_DYNAMIC_BACKENDS=
2760
2761 SLAPD_PERL_LDFLAGS=
2762 MOD_PERL_LDFLAGS=
2763 PERL_CPPFLAGS=
2764
2765 SLAPD_SQL_LDFLAGS=
2766 SLAPD_SQL_LIBS=
2767 SLAPD_SQL_INCLUDES=
2768
2769 KRB4_LIBS=
2770 KRB5_LIBS=
2771 SASL_LIBS=
2772 TLS_LIBS=
2773 MODULES_LIBS=
2774 SLAPI_LIBS=
2775 LIBSLAPI=
2776 LIBSLAPITOOLS=
2777 AUTH_LIBS=
2778
2779 SLAPD_SLP_LIBS=
2780
2781
2782 # Find a good install program.  We prefer a C program (faster),
2783 # so one script is as good as another.  But avoid the broken or
2784 # incompatible versions:
2785 # SysV /etc/install, /usr/sbin/install
2786 # SunOS /usr/etc/install
2787 # IRIX /sbin/install
2788 # AIX /bin/install
2789 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2790 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2791 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2792 # ./install, which can be erroneously created by make from ./install.sh.
2793 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2794 echo "configure:2795: checking for a BSD compatible install" >&5
2795 if test -z "$INSTALL"; then
2796 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2797   echo $ac_n "(cached) $ac_c" 1>&6
2798 else
2799     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2800   for ac_dir in $PATH; do
2801     # Account for people who put trailing slashes in PATH elements.
2802     case "$ac_dir/" in
2803     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2804     *)
2805       # OSF1 and SCO ODT 3.0 have their own names for install.
2806       # Don't use installbsd from OSF since it installs stuff as root
2807       # by default.
2808       for ac_prog in ginstall scoinst install; do
2809         if test -f $ac_dir/$ac_prog; then
2810           if test $ac_prog = install &&
2811             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2812             # AIX install.  It has an incompatible calling convention.
2813             :
2814           elif test $ac_prog = install &&
2815             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2816             # program-specific install script used by HP pwplus--don't use.
2817             :
2818           else
2819             ac_cv_path_install="$ac_dir/$ac_prog -c"
2820             break 2
2821           fi
2822         fi
2823       done
2824       ;;
2825     esac
2826   done
2827   IFS="$ac_save_IFS"
2828
2829 fi
2830   if test "${ac_cv_path_install+set}" = set; then
2831     INSTALL="$ac_cv_path_install"
2832   else
2833     # As a last resort, use the slow shell script.  We don't cache a
2834     # path for INSTALL within a source directory, because that will
2835     # break other packages using the cache if that directory is
2836     # removed, or if the path is relative.
2837     INSTALL="$ac_install_sh"
2838   fi
2839 fi
2840 echo "$ac_t""$INSTALL" 1>&6
2841
2842 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2843 # It thinks the first close brace ends the variable substitution.
2844 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2845
2846 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2847
2848 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2849
2850
2851 cat >> confdefs.h <<\EOF
2852 #define HAVE_MKVERSION 1
2853 EOF
2854
2855
2856
2857
2858 ol_aix_threads=no
2859 case "$target" in
2860 *-*-aix*)       if test -z "$CC" ; then
2861                 case "$ol_with_threads" in
2862                 auto | yes |  posix) ol_aix_threads=yes ;;
2863                 esac
2864         fi
2865 ;;
2866 esac
2867
2868 if test $ol_aix_threads = yes ; then
2869         if test -z "${CC}" ; then
2870                 for ac_prog in cc_r xlc_r cc
2871 do
2872 # Extract the first word of "$ac_prog", so it can be a program name with args.
2873 set dummy $ac_prog; ac_word=$2
2874 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2875 echo "configure:2876: checking for $ac_word" >&5
2876 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2877   echo $ac_n "(cached) $ac_c" 1>&6
2878 else
2879   if test -n "$CC"; then
2880   ac_cv_prog_CC="$CC" # Let the user override the test.
2881 else
2882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2883   ac_dummy="$PATH"
2884   for ac_dir in $ac_dummy; do
2885     test -z "$ac_dir" && ac_dir=.
2886     if test -f $ac_dir/$ac_word; then
2887       ac_cv_prog_CC="$ac_prog"
2888       break
2889     fi
2890   done
2891   IFS="$ac_save_ifs"
2892 fi
2893 fi
2894 CC="$ac_cv_prog_CC"
2895 if test -n "$CC"; then
2896   echo "$ac_t""$CC" 1>&6
2897 else
2898   echo "$ac_t""no" 1>&6
2899 fi
2900
2901 test -n "$CC" && break
2902 done
2903
2904
2905                 if test "$CC" = cc ; then
2906                                                 if test $ol_with_threads != auto ; then
2907                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2908                         else
2909                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2910                         fi
2911                         ol_with_threads=no
2912                 fi
2913         fi
2914
2915         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2916                 ol_with_threads=posix
2917                 ol_cv_pthread_create=yes
2918         fi
2919 fi
2920
2921 if test -z "${CC}"; then
2922         for ac_prog in cc gcc
2923 do
2924 # Extract the first word of "$ac_prog", so it can be a program name with args.
2925 set dummy $ac_prog; ac_word=$2
2926 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2927 echo "configure:2928: checking for $ac_word" >&5
2928 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2929   echo $ac_n "(cached) $ac_c" 1>&6
2930 else
2931   if test -n "$CC"; then
2932   ac_cv_prog_CC="$CC" # Let the user override the test.
2933 else
2934   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2935   ac_dummy="$PATH"
2936   for ac_dir in $ac_dummy; do
2937     test -z "$ac_dir" && ac_dir=.
2938     if test -f $ac_dir/$ac_word; then
2939       ac_cv_prog_CC="$ac_prog"
2940       break
2941     fi
2942   done
2943   IFS="$ac_save_ifs"
2944 fi
2945 fi
2946 CC="$ac_cv_prog_CC"
2947 if test -n "$CC"; then
2948   echo "$ac_t""$CC" 1>&6
2949 else
2950   echo "$ac_t""no" 1>&6
2951 fi
2952
2953 test -n "$CC" && break
2954 done
2955 test -n "$CC" || CC="missing"
2956
2957
2958         if test "${CC}" = "missing" ; then
2959                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2960         fi
2961 fi
2962
2963 if test -z "${AR}"; then
2964         for ac_prog in ar gar
2965 do
2966 # Extract the first word of "$ac_prog", so it can be a program name with args.
2967 set dummy $ac_prog; ac_word=$2
2968 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2969 echo "configure:2970: checking for $ac_word" >&5
2970 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2971   echo $ac_n "(cached) $ac_c" 1>&6
2972 else
2973   if test -n "$AR"; then
2974   ac_cv_prog_AR="$AR" # Let the user override the test.
2975 else
2976   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2977   ac_dummy="$PATH"
2978   for ac_dir in $ac_dummy; do
2979     test -z "$ac_dir" && ac_dir=.
2980     if test -f $ac_dir/$ac_word; then
2981       ac_cv_prog_AR="$ac_prog"
2982       break
2983     fi
2984   done
2985   IFS="$ac_save_ifs"
2986 fi
2987 fi
2988 AR="$ac_cv_prog_AR"
2989 if test -n "$AR"; then
2990   echo "$ac_t""$AR" 1>&6
2991 else
2992   echo "$ac_t""no" 1>&6
2993 fi
2994
2995 test -n "$AR" && break
2996 done
2997 test -n "$AR" || AR="missing"
2998
2999
3000         if test "${AR}" = "missing" ; then
3001                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3002         fi
3003 fi
3004
3005
3006
3007 # Find the correct PATH separator.  Usually this is `:', but
3008 # DJGPP uses `;' like DOS.
3009 if test "X${PATH_SEPARATOR+set}" != Xset; then
3010   UNAME=${UNAME-`uname 2>/dev/null`}
3011   case X$UNAME in
3012     *-DOS) lt_cv_sys_path_separator=';' ;;
3013     *)     lt_cv_sys_path_separator=':' ;;
3014   esac
3015   PATH_SEPARATOR=$lt_cv_sys_path_separator
3016 fi
3017
3018 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3019 echo "configure:3020: checking for Cygwin environment" >&5
3020 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3021   echo $ac_n "(cached) $ac_c" 1>&6
3022 else
3023   cat > conftest.$ac_ext <<EOF
3024 #line 3025 "configure"
3025 #include "confdefs.h"
3026
3027 int main() {
3028
3029 #ifndef __CYGWIN__
3030 #define __CYGWIN__ __CYGWIN32__
3031 #endif
3032 return __CYGWIN__;
3033 ; return 0; }
3034 EOF
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036   rm -rf conftest*
3037   ac_cv_cygwin=yes
3038 else
3039   echo "configure: failed program was:" >&5
3040   cat conftest.$ac_ext >&5
3041   rm -rf conftest*
3042   ac_cv_cygwin=no
3043 fi
3044 rm -f conftest*
3045 fi
3046
3047 echo "$ac_t""$ac_cv_cygwin" 1>&6
3048 CYGWIN=
3049 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3050 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3051 echo "configure:3052: checking for mingw32 environment" >&5
3052 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3053   echo $ac_n "(cached) $ac_c" 1>&6
3054 else
3055   cat > conftest.$ac_ext <<EOF
3056 #line 3057 "configure"
3057 #include "confdefs.h"
3058
3059 int main() {
3060 return __MINGW32__;
3061 ; return 0; }
3062 EOF
3063 if { (eval echo configure:3064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3064   rm -rf conftest*
3065   ac_cv_mingw32=yes
3066 else
3067   echo "configure: failed program was:" >&5
3068   cat conftest.$ac_ext >&5
3069   rm -rf conftest*
3070   ac_cv_mingw32=no
3071 fi
3072 rm -f conftest*
3073 fi
3074
3075 echo "$ac_t""$ac_cv_mingw32" 1>&6
3076 MINGW32=
3077 test "$ac_cv_mingw32" = yes && MINGW32=yes
3078 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3079 echo "configure:3080: checking for EMX OS/2 environment" >&5
3080 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3081   echo $ac_n "(cached) $ac_c" 1>&6
3082 else
3083   cat > conftest.$ac_ext <<EOF
3084 #line 3085 "configure"
3085 #include "confdefs.h"
3086
3087 int main() {
3088 return __EMX__;
3089 ; return 0; }
3090 EOF
3091 if { (eval echo configure:3092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3092   rm -rf conftest*
3093   ac_cv_emxos2=yes
3094 else
3095   echo "configure: failed program was:" >&5
3096   cat conftest.$ac_ext >&5
3097   rm -rf conftest*
3098   ac_cv_emxos2=no
3099 fi
3100 rm -f conftest*
3101 fi
3102
3103 echo "$ac_t""$ac_cv_emxos2" 1>&6
3104 EMXOS2=
3105 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3106 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3107 echo "configure:3108: checking how to run the C preprocessor" >&5
3108 # On Suns, sometimes $CPP names a directory.
3109 if test -n "$CPP" && test -d "$CPP"; then
3110   CPP=
3111 fi
3112 if test -z "$CPP"; then
3113 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3114   echo $ac_n "(cached) $ac_c" 1>&6
3115 else
3116     # This must be in double quotes, not single quotes, because CPP may get
3117   # substituted into the Makefile and "${CC-cc}" will confuse make.
3118   CPP="${CC-cc} -E"
3119   # On the NeXT, cc -E runs the code through the compiler's parser,
3120   # not just through cpp.
3121   cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <assert.h>
3125 Syntax Error
3126 EOF
3127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3128 { (eval echo configure:3129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3130 if test -z "$ac_err"; then
3131   :
3132 else
3133   echo "$ac_err" >&5
3134   echo "configure: failed program was:" >&5
3135   cat conftest.$ac_ext >&5
3136   rm -rf conftest*
3137   CPP="${CC-cc} -E -traditional-cpp"
3138   cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141 #include <assert.h>
3142 Syntax Error
3143 EOF
3144 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3145 { (eval echo configure:3146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3146 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3147 if test -z "$ac_err"; then
3148   :
3149 else
3150   echo "$ac_err" >&5
3151   echo "configure: failed program was:" >&5
3152   cat conftest.$ac_ext >&5
3153   rm -rf conftest*
3154   CPP="${CC-cc} -nologo -E"
3155   cat > conftest.$ac_ext <<EOF
3156 #line 3157 "configure"
3157 #include "confdefs.h"
3158 #include <assert.h>
3159 Syntax Error
3160 EOF
3161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3162 { (eval echo configure:3163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3164 if test -z "$ac_err"; then
3165   :
3166 else
3167   echo "$ac_err" >&5
3168   echo "configure: failed program was:" >&5
3169   cat conftest.$ac_ext >&5
3170   rm -rf conftest*
3171   CPP=/lib/cpp
3172 fi
3173 rm -f conftest*
3174 fi
3175 rm -f conftest*
3176 fi
3177 rm -f conftest*
3178   ac_cv_prog_CPP="$CPP"
3179 fi
3180   CPP="$ac_cv_prog_CPP"
3181 else
3182   ac_cv_prog_CPP="$CPP"
3183 fi
3184 echo "$ac_t""$CPP" 1>&6
3185
3186 # Check whether --enable-fast-install or --disable-fast-install was given.
3187 if test "${enable_fast_install+set}" = set; then
3188   enableval="$enable_fast_install"
3189   p=${PACKAGE-default}
3190 case $enableval in
3191 yes) enable_fast_install=yes ;;
3192 no) enable_fast_install=no ;;
3193 *)
3194   enable_fast_install=no
3195   # Look at the argument we got.  We use all the common list separators.
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3197   for pkg in $enableval; do
3198     if test "X$pkg" = "X$p"; then
3199       enable_fast_install=yes
3200     fi
3201   done
3202   IFS="$ac_save_ifs"
3203   ;;
3204 esac
3205 else
3206   enable_fast_install=yes
3207 fi
3208
3209 # Extract the first word of "gcc", so it can be a program name with args.
3210 set dummy gcc; ac_word=$2
3211 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3212 echo "configure:3213: checking for $ac_word" >&5
3213 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3214   echo $ac_n "(cached) $ac_c" 1>&6
3215 else
3216   if test -n "$CC"; then
3217   ac_cv_prog_CC="$CC" # Let the user override the test.
3218 else
3219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3220   ac_dummy="$PATH"
3221   for ac_dir in $ac_dummy; do
3222     test -z "$ac_dir" && ac_dir=.
3223     if test -f $ac_dir/$ac_word; then
3224       ac_cv_prog_CC="gcc"
3225       break
3226     fi
3227   done
3228   IFS="$ac_save_ifs"
3229 fi
3230 fi
3231 CC="$ac_cv_prog_CC"
3232 if test -n "$CC"; then
3233   echo "$ac_t""$CC" 1>&6
3234 else
3235   echo "$ac_t""no" 1>&6
3236 fi
3237
3238 if test -z "$CC"; then
3239   # Extract the first word of "cc", so it can be a program name with args.
3240 set dummy cc; ac_word=$2
3241 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3242 echo "configure:3243: checking for $ac_word" >&5
3243 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   if test -n "$CC"; then
3247   ac_cv_prog_CC="$CC" # Let the user override the test.
3248 else
3249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3250   ac_prog_rejected=no
3251   ac_dummy="$PATH"
3252   for ac_dir in $ac_dummy; do
3253     test -z "$ac_dir" && ac_dir=.
3254     if test -f $ac_dir/$ac_word; then
3255       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3256         ac_prog_rejected=yes
3257         continue
3258       fi
3259       ac_cv_prog_CC="cc"
3260       break
3261     fi
3262   done
3263   IFS="$ac_save_ifs"
3264 if test $ac_prog_rejected = yes; then
3265   # We found a bogon in the path, so make sure we never use it.
3266   set dummy $ac_cv_prog_CC
3267   shift
3268   if test $# -gt 0; then
3269     # We chose a different compiler from the bogus one.
3270     # However, it has the same basename, so the bogon will be chosen
3271     # first if we set CC to just the basename; use the full file name.
3272     shift
3273     set dummy "$ac_dir/$ac_word" "$@"
3274     shift
3275     ac_cv_prog_CC="$@"
3276   fi
3277 fi
3278 fi
3279 fi
3280 CC="$ac_cv_prog_CC"
3281 if test -n "$CC"; then
3282   echo "$ac_t""$CC" 1>&6
3283 else
3284   echo "$ac_t""no" 1>&6
3285 fi
3286
3287   if test -z "$CC"; then
3288     case "`uname -s`" in
3289     *win32* | *WIN32* | *CYGWIN*)
3290       # Extract the first word of "cl", so it can be a program name with args.
3291 set dummy cl; ac_word=$2
3292 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3293 echo "configure:3294: checking for $ac_word" >&5
3294 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3295   echo $ac_n "(cached) $ac_c" 1>&6
3296 else
3297   if test -n "$CC"; then
3298   ac_cv_prog_CC="$CC" # Let the user override the test.
3299 else
3300   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3301   ac_dummy="$PATH"
3302   for ac_dir in $ac_dummy; do
3303     test -z "$ac_dir" && ac_dir=.
3304     if test -f $ac_dir/$ac_word; then
3305       ac_cv_prog_CC="cl"
3306       break
3307     fi
3308   done
3309   IFS="$ac_save_ifs"
3310 fi
3311 fi
3312 CC="$ac_cv_prog_CC"
3313 if test -n "$CC"; then
3314   echo "$ac_t""$CC" 1>&6
3315 else
3316   echo "$ac_t""no" 1>&6
3317 fi
3318  ;;
3319     esac
3320   fi
3321   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3322 fi
3323
3324 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3325 echo "configure:3326: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3326
3327 ac_ext=c
3328 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3329 ac_cpp='$CPP $CPPFLAGS'
3330 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3331 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3332 cross_compiling=$ac_cv_prog_cc_cross
3333
3334 cat > conftest.$ac_ext << EOF
3335
3336 #line 3337 "configure"
3337 #include "confdefs.h"
3338
3339 main(){return(0);}
3340 EOF
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3342   ac_cv_prog_cc_works=yes
3343   # If we can't run a trivial program, we are probably using a cross compiler.
3344   if (./conftest; exit) 2>/dev/null; then
3345     ac_cv_prog_cc_cross=no
3346   else
3347     ac_cv_prog_cc_cross=yes
3348   fi
3349 else
3350   echo "configure: failed program was:" >&5
3351   cat conftest.$ac_ext >&5
3352   ac_cv_prog_cc_works=no
3353 fi
3354 rm -fr conftest*
3355 ac_ext=c
3356 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3357 ac_cpp='$CPP $CPPFLAGS'
3358 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3359 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3360 cross_compiling=$ac_cv_prog_cc_cross
3361
3362 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3363 if test $ac_cv_prog_cc_works = no; then
3364   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3365 fi
3366 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3367 echo "configure:3368: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3368 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3369 cross_compiling=$ac_cv_prog_cc_cross
3370
3371 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3372 echo "configure:3373: checking whether we are using GNU C" >&5
3373 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3374   echo $ac_n "(cached) $ac_c" 1>&6
3375 else
3376   cat > conftest.c <<EOF
3377 #ifdef __GNUC__
3378   yes;
3379 #endif
3380 EOF
3381 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3382   ac_cv_prog_gcc=yes
3383 else
3384   ac_cv_prog_gcc=no
3385 fi
3386 fi
3387
3388 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3389
3390 if test $ac_cv_prog_gcc = yes; then
3391   GCC=yes
3392 else
3393   GCC=
3394 fi
3395
3396 ac_test_CFLAGS="${CFLAGS+set}"
3397 ac_save_CFLAGS="$CFLAGS"
3398 CFLAGS=
3399 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3400 echo "configure:3401: checking whether ${CC-cc} accepts -g" >&5
3401 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   echo 'void f(){}' > conftest.c
3405 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3406   ac_cv_prog_cc_g=yes
3407 else
3408   ac_cv_prog_cc_g=no
3409 fi
3410 rm -f conftest*
3411
3412 fi
3413
3414 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3415 if test "$ac_test_CFLAGS" = set; then
3416   CFLAGS="$ac_save_CFLAGS"
3417 elif test $ac_cv_prog_cc_g = yes; then
3418   if test "$GCC" = yes; then
3419     CFLAGS="-g -O2"
3420   else
3421     CFLAGS="-g"
3422   fi
3423 else
3424   if test "$GCC" = yes; then
3425     CFLAGS="-O2"
3426   else
3427     CFLAGS=
3428   fi
3429 fi
3430
3431 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3432 if test "${with_gnu_ld+set}" = set; then
3433   withval="$with_gnu_ld"
3434   test "$withval" = no || with_gnu_ld=yes
3435 else
3436   with_gnu_ld=no
3437 fi
3438
3439 ac_prog=ld
3440 if test "$GCC" = yes; then
3441   # Check if gcc -print-prog-name=ld gives a path.
3442   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3443 echo "configure:3444: checking for ld used by GCC" >&5
3444   case $host in
3445   *-*-mingw*)
3446     # gcc leaves a trailing carriage return which upsets mingw
3447     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3448   *)
3449     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3450   esac
3451   case $ac_prog in
3452     # Accept absolute paths.
3453     [\\/]* | [A-Za-z]:[\\/]*)
3454       re_direlt='/[^/][^/]*/\.\./'
3455       # Canonicalize the path of ld
3456       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3457       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3458         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3459       done
3460       test -z "$LD" && LD="$ac_prog"
3461       ;;
3462   "")
3463     # If it fails, then pretend we aren't using GCC.
3464     ac_prog=ld
3465     ;;
3466   *)
3467     # If it is relative, then search for the first ld in PATH.
3468     with_gnu_ld=unknown
3469     ;;
3470   esac
3471 elif test "$with_gnu_ld" = yes; then
3472   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3473 echo "configure:3474: checking for GNU ld" >&5
3474 else
3475   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3476 echo "configure:3477: checking for non-GNU ld" >&5
3477 fi
3478 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   if test -z "$LD"; then
3482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3483   for ac_dir in $PATH; do
3484     test -z "$ac_dir" && ac_dir=.
3485     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3486       lt_cv_path_LD="$ac_dir/$ac_prog"
3487       # Check to see if the program is GNU ld.  I'd rather use --version,
3488       # but apparently some GNU ld's only accept -v.
3489       # Break only if it was the GNU/non-GNU ld that we prefer.
3490       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3491         test "$with_gnu_ld" != no && break
3492       else
3493         test "$with_gnu_ld" != yes && break
3494       fi
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498 else
3499   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3500 fi
3501 fi
3502
3503 LD="$lt_cv_path_LD"
3504 if test -n "$LD"; then
3505   echo "$ac_t""$LD" 1>&6
3506 else
3507   echo "$ac_t""no" 1>&6
3508 fi
3509 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3510 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3511 echo "configure:3512: checking if the linker ($LD) is GNU ld" >&5
3512 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3516 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3517   lt_cv_prog_gnu_ld=yes
3518 else
3519   lt_cv_prog_gnu_ld=no
3520 fi
3521 fi
3522
3523 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3524 with_gnu_ld=$lt_cv_prog_gnu_ld
3525
3526
3527 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3528 echo "configure:3529: checking for $LD option to reload object files" >&5
3529 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3530   echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532   lt_cv_ld_reload_flag='-r'
3533 fi
3534
3535 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3536 reload_flag=$lt_cv_ld_reload_flag
3537 test -n "$reload_flag" && reload_flag=" $reload_flag"
3538
3539 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3540 echo "configure:3541: checking for BSD-compatible nm" >&5
3541 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3542   echo $ac_n "(cached) $ac_c" 1>&6
3543 else
3544   if test -n "$NM"; then
3545   # Let the user override the test.
3546   lt_cv_path_NM="$NM"
3547 else
3548   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3549   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3550     test -z "$ac_dir" && ac_dir=.
3551     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3552     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3553       # Check to see if the nm accepts a BSD-compat flag.
3554       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3555       #   nm: unknown option "B" ignored
3556       # Tru64's nm complains that /dev/null is an invalid object file
3557       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3558         lt_cv_path_NM="$tmp_nm -B"
3559         break
3560       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3561         lt_cv_path_NM="$tmp_nm -p"
3562         break
3563       else
3564         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3565         continue # so that we can try to find one that supports BSD flags
3566       fi
3567     fi
3568   done
3569   IFS="$ac_save_ifs"
3570   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3571 fi
3572 fi
3573
3574 NM="$lt_cv_path_NM"
3575 echo "$ac_t""$NM" 1>&6
3576
3577 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3578 echo "configure:3579: checking for a sed that does not truncate output" >&5
3579 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3580   echo $ac_n "(cached) $ac_c" 1>&6
3581 else
3582   # Loop through the user's path and test for sed and gsed.
3583 # Then use that list of sed's as ones to test for truncation.
3584 as_executable_p="test -f"
3585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3586 for as_dir in $PATH
3587 do
3588   IFS=$as_save_IFS
3589   test -z "$as_dir" && as_dir=.
3590   for ac_prog in sed gsed; do
3591     for ac_exec_ext in '' $ac_executable_extensions; do
3592       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3593         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3594       fi
3595     done
3596   done
3597 done
3598
3599   # Create a temporary directory, and hook for its removal unless debugging.
3600 $debug ||
3601 {
3602   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3603   trap '{ (exit 1); exit 1; }' 1 2 13 15
3604 }
3605
3606 # Create a (secure) tmp directory for tmp files.
3607 : ${TMPDIR=/tmp}
3608 {
3609   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3610   test -n "$tmp" && test -d "$tmp"
3611 }  ||
3612 {
3613   tmp=$TMPDIR/sed$$-$RANDOM
3614   (umask 077 && mkdir $tmp)
3615 } ||
3616 {
3617    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3618    { (exit 1); exit 1; }
3619 }
3620   _max=0
3621   _count=0
3622   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3623   # along with /bin/sed that truncates output.
3624   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3625     test ! -f ${_sed} && break
3626     cat /dev/null > "$tmp/sed.in"
3627     _count=0
3628     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3629     # Check for GNU sed and select it if it is found.
3630     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3631       lt_cv_path_SED=${_sed}
3632       break
3633     fi
3634     while true; do
3635       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3636       mv "$tmp/sed.tmp" "$tmp/sed.in"
3637       cp "$tmp/sed.in" "$tmp/sed.nl"
3638       echo >>"$tmp/sed.nl"
3639       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3640       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3641       # 40000 chars as input seems more than enough
3642       test $_count -gt 10 && break
3643       _count=`expr $_count + 1`
3644       if test $_count -gt $_max; then
3645         _max=$_count
3646         lt_cv_path_SED=$_sed
3647       fi
3648     done
3649   done
3650   rm -rf "$tmp"
3651
3652 fi
3653
3654 if test "X$SED" != "X"; then
3655   lt_cv_path_SED=$SED
3656 else
3657   SED=$lt_cv_path_SED
3658 fi
3659 echo "$ac_t""$SED" 1>&6
3660
3661 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3662 echo "configure:3663: checking whether ln -s works" >&5
3663 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3664   echo $ac_n "(cached) $ac_c" 1>&6
3665 else
3666   rm -f conftestdata
3667 if ln -s X conftestdata 2>/dev/null
3668 then
3669   rm -f conftestdata
3670   ac_cv_prog_LN_S="ln -s"
3671 else
3672   ac_cv_prog_LN_S=ln
3673 fi
3674 fi
3675 LN_S="$ac_cv_prog_LN_S"
3676 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3677   echo "$ac_t""yes" 1>&6
3678 else
3679   echo "$ac_t""no" 1>&6
3680 fi
3681
3682 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3683 echo "configure:3684: checking how to recognise dependent libraries" >&5
3684 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   lt_cv_file_magic_cmd='$MAGIC_CMD'
3688 lt_cv_file_magic_test_file=
3689 lt_cv_deplibs_check_method='unknown'
3690 # Need to set the preceding variable on all platforms that support
3691 # interlibrary dependencies.
3692 # 'none' -- dependencies not supported.
3693 # `unknown' -- same as none, but documents that we really don't know.
3694 # 'pass_all' -- all dependencies passed with no checks.
3695 # 'test_compile' -- check by making test program.
3696 # 'file_magic [[regex]]' -- check by looking for files in library path
3697 # which responds to the $file_magic_cmd with a given egrep regex.
3698 # If you have `file' or equivalent on your system and you're not sure
3699 # whether `pass_all' will *always* work, you probably want this one.
3700
3701 case $host_os in
3702 aix4* | aix5*)
3703   lt_cv_deplibs_check_method=pass_all
3704   ;;
3705
3706 beos*)
3707   lt_cv_deplibs_check_method=pass_all
3708   ;;
3709
3710 bsdi4*)
3711   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3712   lt_cv_file_magic_cmd='/usr/bin/file -L'
3713   lt_cv_file_magic_test_file=/shlib/libc.so
3714   ;;
3715
3716 cygwin* | mingw* | pw32*)
3717   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3718   lt_cv_file_magic_cmd='$OBJDUMP -f'
3719   ;;
3720
3721 darwin* | rhapsody*)
3722   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3723   lt_cv_file_magic_cmd='/usr/bin/file -L'
3724   case "$host_os" in
3725   rhapsody* | darwin1.[012])
3726     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3727     ;;
3728   *) # Darwin 1.3 on
3729     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3730     ;;
3731   esac
3732   ;;
3733
3734 freebsd*)
3735   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3736     case $host_cpu in
3737     i*86 )
3738       # Not sure whether the presence of OpenBSD here was a mistake.
3739       # Let's accept both of them until this is cleared up.
3740       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3741       lt_cv_file_magic_cmd=/usr/bin/file
3742       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3743       ;;
3744     esac
3745   else
3746     lt_cv_deplibs_check_method=pass_all
3747   fi
3748   ;;
3749
3750 gnu*)
3751   lt_cv_deplibs_check_method=pass_all
3752   ;;
3753
3754 hpux10.20*|hpux11*)
3755   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3756   lt_cv_file_magic_cmd=/usr/bin/file
3757   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3758   ;;
3759
3760 irix5* | irix6* | nonstopux*)
3761   case $host_os in
3762   irix5* | nonstopux*)
3763     # this will be overridden with pass_all, but let us keep it just in case
3764     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3765     ;;
3766   *)
3767     case $LD in
3768     *-32|*"-32 ") libmagic=32-bit;;
3769     *-n32|*"-n32 ") libmagic=N32;;
3770     *-64|*"-64 ") libmagic=64-bit;;
3771     *) libmagic=never-match;;
3772     esac
3773     # this will be overridden with pass_all, but let us keep it just in case
3774     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3775     ;;
3776   esac
3777   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3778   lt_cv_deplibs_check_method=pass_all
3779   ;;
3780
3781 # This must be Linux ELF.
3782 linux-gnu*)
3783   case $host_cpu in
3784   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3785     lt_cv_deplibs_check_method=pass_all ;;
3786   *)
3787     # glibc up to 2.1.1 does not perform some relocations on ARM
3788     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3789   esac
3790   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3791   ;;
3792
3793 netbsd*)
3794   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3795     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3796   else
3797     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3798   fi
3799   ;;
3800
3801 newos6*)
3802   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3803   lt_cv_file_magic_cmd=/usr/bin/file
3804   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3805   ;;
3806
3807 openbsd*)
3808   lt_cv_file_magic_cmd=/usr/bin/file
3809   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3810   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3811     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3812   else
3813     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3814   fi
3815   ;;
3816
3817 openedition*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 osf3* | osf4* | osf5*)
3822   # this will be overridden with pass_all, but let us keep it just in case
3823   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3824   lt_cv_file_magic_test_file=/shlib/libc.so
3825   lt_cv_deplibs_check_method=pass_all
3826   ;;
3827
3828 sco3.2v5*)
3829   lt_cv_deplibs_check_method=pass_all
3830   ;;
3831
3832 solaris*)
3833   lt_cv_deplibs_check_method=pass_all
3834   lt_cv_file_magic_test_file=/lib/libc.so
3835   ;;
3836
3837 sysv5uw[78]* | sysv4*uw2*)
3838   lt_cv_deplibs_check_method=pass_all
3839   ;;
3840
3841 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3842   case $host_vendor in
3843   motorola)
3844     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]'
3845     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3846     ;;
3847   ncr)
3848     lt_cv_deplibs_check_method=pass_all
3849     ;;
3850   sequent)
3851     lt_cv_file_magic_cmd='/bin/file'
3852     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3853     ;;
3854   sni)
3855     lt_cv_file_magic_cmd='/bin/file'
3856     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3857     lt_cv_file_magic_test_file=/lib/libc.so
3858     ;;
3859   siemens)
3860     lt_cv_deplibs_check_method=pass_all
3861     ;;
3862   esac
3863   ;;
3864 esac
3865
3866 fi
3867
3868 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3869 file_magic_cmd=$lt_cv_file_magic_cmd
3870 deplibs_check_method=$lt_cv_deplibs_check_method
3871
3872 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3873 echo "configure:3874: checking for object suffix" >&5
3874 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   rm -f conftest*
3878 echo 'int i = 1;' > conftest.$ac_ext
3879 if { (eval echo configure:3880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3880   for ac_file in conftest.*; do
3881     case $ac_file in
3882     *.c) ;;
3883     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3884     esac
3885   done
3886 else
3887   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3888 fi
3889 rm -f conftest*
3890 fi
3891
3892 echo "$ac_t""$ac_cv_objext" 1>&6
3893 OBJEXT=$ac_cv_objext
3894 ac_objext=$ac_cv_objext
3895
3896
3897
3898
3899 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3900 echo "configure:3901: checking for executable suffix" >&5
3901 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3902   echo $ac_n "(cached) $ac_c" 1>&6
3903 else
3904   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3905   ac_cv_exeext=.exe
3906 else
3907   rm -f conftest*
3908   echo 'int main () { return 0; }' > conftest.$ac_ext
3909   ac_cv_exeext=
3910   if { (eval echo configure:3911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3911     for file in conftest.*; do
3912       case $file in
3913       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3914       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3915       esac
3916     done
3917   else
3918     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3919   fi
3920   rm -f conftest*
3921   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3922 fi
3923 fi
3924
3925 EXEEXT=""
3926 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3927 echo "$ac_t""${ac_cv_exeext}" 1>&6
3928 ac_exeext=$EXEEXT
3929
3930 if test $host != $build; then
3931   ac_tool_prefix=${host_alias}-
3932 else
3933   ac_tool_prefix=
3934 fi
3935
3936
3937
3938
3939 # Check for command to grab the raw symbol name followed by C symbol from nm.
3940 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3941 echo "configure:3942: checking command to parse $NM output" >&5
3942 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3943   echo $ac_n "(cached) $ac_c" 1>&6
3944 else
3945   
3946 # These are sane defaults that work on at least a few old systems.
3947 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3948
3949 # Character class describing NM global symbol codes.
3950 symcode='[BCDEGRST]'
3951
3952 # Regexp to match symbols that can be accessed directly from C.
3953 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3954
3955 # Transform the above into a raw symbol and a C symbol.
3956 symxfrm='\1 \2\3 \3'
3957
3958 # Transform an extracted symbol line into a proper C declaration
3959 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3960
3961 # Transform an extracted symbol line into symbol name and symbol address
3962 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'"
3963
3964 # Define system-specific variables.
3965 case $host_os in
3966 aix*)
3967   symcode='[BCDT]'
3968   ;;
3969 cygwin* | mingw* | pw32*)
3970   symcode='[ABCDGISTW]'
3971   ;;
3972 hpux*) # Its linker distinguishes data from code symbols
3973   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3974   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'"
3975   ;;
3976 irix* | nonstopux*)
3977   symcode='[BCDEGRST]'
3978   ;;
3979 osf*)
3980   symcode='[BCDEGQRST]'
3981   ;;
3982 solaris* | sysv5*)
3983   symcode='[BDT]'
3984   ;;
3985 sysv4)
3986   symcode='[DFNSTU]'
3987   ;;
3988 esac
3989
3990 # Handle CRLF in mingw tool chain
3991 opt_cr=
3992 case $host_os in
3993 mingw*)
3994   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3995   ;;
3996 esac
3997
3998 # If we're using GNU nm, then use its standard symbol codes.
3999 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4000   symcode='[ABCDGISTW]'
4001 fi
4002
4003 # Try without a prefix undercore, then with it.
4004 for ac_symprfx in "" "_"; do
4005
4006   # Write the raw and C identifiers.
4007 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4008
4009   # Check to see that the pipe works correctly.
4010   pipe_works=no
4011   rm -f conftest*
4012   cat > conftest.$ac_ext <<EOF
4013 #ifdef __cplusplus
4014 extern "C" {
4015 #endif
4016 char nm_test_var;
4017 void nm_test_func(){}
4018 #ifdef __cplusplus
4019 }
4020 #endif
4021 int main(){nm_test_var='a';nm_test_func();return(0);}
4022 EOF
4023
4024   if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4025     # Now try to grab the symbols.
4026     nlist=conftest.nm
4027     if { (eval echo configure:4028: \"$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
4028       # Try sorting and uniquifying the output.
4029       if sort "$nlist" | uniq > "$nlist"T; then
4030         mv -f "$nlist"T "$nlist"
4031       else
4032         rm -f "$nlist"T
4033       fi
4034
4035       # Make sure that we snagged all the symbols we need.
4036       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4037         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4038           cat <<EOF > conftest.$ac_ext
4039 #ifdef __cplusplus
4040 extern "C" {
4041 #endif
4042
4043 EOF
4044           # Now generate the symbol file.
4045           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4046
4047           cat <<EOF >> conftest.$ac_ext
4048 #if defined (__STDC__) && __STDC__
4049 # define lt_ptr void *
4050 #else
4051 # define lt_ptr char *
4052 # define const
4053 #endif
4054
4055 /* The mapping between symbol names and symbols. */
4056 const struct {
4057   const char *name;
4058   lt_ptr address;
4059 }
4060 lt_preloaded_symbols[] =
4061 {
4062 EOF
4063           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4064           cat <<\EOF >> conftest.$ac_ext
4065   {0, (lt_ptr) 0}
4066 };
4067
4068 #ifdef __cplusplus
4069 }
4070 #endif
4071 EOF
4072           # Now try linking the two files.
4073           mv conftest.$ac_objext conftstm.$ac_objext
4074           save_LIBS="$LIBS"
4075           save_CFLAGS="$CFLAGS"
4076           LIBS="conftstm.$ac_objext"
4077           CFLAGS="$CFLAGS$no_builtin_flag"
4078           if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4079             pipe_works=yes
4080           fi
4081           LIBS="$save_LIBS"
4082           CFLAGS="$save_CFLAGS"
4083         else
4084           echo "cannot find nm_test_func in $nlist" >&5
4085         fi
4086       else
4087         echo "cannot find nm_test_var in $nlist" >&5
4088       fi
4089     else
4090       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4091     fi
4092   else
4093     echo "$progname: failed program was:" >&5
4094     cat conftest.$ac_ext >&5
4095   fi
4096   rm -f conftest* conftst*
4097
4098   # Do not use the global_symbol_pipe unless it works.
4099   if test "$pipe_works" = yes; then
4100     break
4101   else
4102     lt_cv_sys_global_symbol_pipe=
4103   fi
4104 done
4105
4106 fi
4107
4108 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4109 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4110   global_symbol_to_cdecl=
4111   global_symbol_to_c_name_address=
4112 else
4113   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4114   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4115 fi
4116 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4117 then
4118   echo "$ac_t""failed" 1>&6
4119 else
4120   echo "$ac_t""ok" 1>&6
4121 fi
4122
4123 for ac_hdr in dlfcn.h
4124 do
4125 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4126 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4127 echo "configure:4128: checking for $ac_hdr" >&5
4128 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4129   echo $ac_n "(cached) $ac_c" 1>&6
4130 else
4131   cat > conftest.$ac_ext <<EOF
4132 #line 4133 "configure"
4133 #include "confdefs.h"
4134 #include <$ac_hdr>
4135 EOF
4136 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4137 { (eval echo configure:4138: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4138 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4139 if test -z "$ac_err"; then
4140   rm -rf conftest*
4141   eval "ac_cv_header_$ac_safe=yes"
4142 else
4143   echo "$ac_err" >&5
4144   echo "configure: failed program was:" >&5
4145   cat conftest.$ac_ext >&5
4146   rm -rf conftest*
4147   eval "ac_cv_header_$ac_safe=no"
4148 fi
4149 rm -f conftest*
4150 fi
4151 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4152   echo "$ac_t""yes" 1>&6
4153     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4154   cat >> confdefs.h <<EOF
4155 #define $ac_tr_hdr 1
4156 EOF
4157  
4158 else
4159   echo "$ac_t""no" 1>&6
4160 fi
4161 done
4162
4163
4164
4165
4166
4167
4168 # Only perform the check for file, if the check method requires it
4169 case $deplibs_check_method in
4170 file_magic*)
4171   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4172     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4173 echo "configure:4174: checking for ${ac_tool_prefix}file" >&5
4174 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   case $MAGIC_CMD in
4178   /*)
4179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4180   ;;
4181   ?:/*)
4182   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4183   ;;
4184   *)
4185   ac_save_MAGIC_CMD="$MAGIC_CMD"
4186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4187   ac_dummy="/usr/bin:$PATH"
4188   for ac_dir in $ac_dummy; do
4189     test -z "$ac_dir" && ac_dir=.
4190     if test -f $ac_dir/${ac_tool_prefix}file; then
4191       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4192       if test -n "$file_magic_test_file"; then
4193         case $deplibs_check_method in
4194         "file_magic "*)
4195           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4196           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4197           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4198             egrep "$file_magic_regex" > /dev/null; then
4199             :
4200           else
4201             cat <<EOF 1>&2
4202
4203 *** Warning: the command libtool uses to detect shared libraries,
4204 *** $file_magic_cmd, produces output that libtool cannot recognize.
4205 *** The result is that libtool may fail to recognize shared libraries
4206 *** as such.  This will affect the creation of libtool libraries that
4207 *** depend on shared libraries, but programs linked with such libtool
4208 *** libraries will work regardless of this problem.  Nevertheless, you
4209 *** may want to report the problem to your system manager and/or to
4210 *** bug-libtool@gnu.org
4211
4212 EOF
4213           fi ;;
4214         esac
4215       fi
4216       break
4217     fi
4218   done
4219   IFS="$ac_save_ifs"
4220   MAGIC_CMD="$ac_save_MAGIC_CMD"
4221   ;;
4222 esac
4223 fi
4224
4225 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4226 if test -n "$MAGIC_CMD"; then
4227   echo "$ac_t""$MAGIC_CMD" 1>&6
4228 else
4229   echo "$ac_t""no" 1>&6
4230 fi
4231
4232 if test -z "$lt_cv_path_MAGIC_CMD"; then
4233   if test -n "$ac_tool_prefix"; then
4234     echo $ac_n "checking for file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294   else
4295     MAGIC_CMD=:
4296   fi
4297 fi
4298
4299   fi
4300   ;;
4301 esac
4302
4303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_word" >&5
4307 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   if test -n "$RANLIB"; then
4311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4312 else
4313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4314   ac_dummy="$PATH"
4315   for ac_dir in $ac_dummy; do
4316     test -z "$ac_dir" && ac_dir=.
4317     if test -f $ac_dir/$ac_word; then
4318       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4319       break
4320     fi
4321   done
4322   IFS="$ac_save_ifs"
4323 fi
4324 fi
4325 RANLIB="$ac_cv_prog_RANLIB"
4326 if test -n "$RANLIB"; then
4327   echo "$ac_t""$RANLIB" 1>&6
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331
4332
4333 if test -z "$ac_cv_prog_RANLIB"; then
4334 if test -n "$ac_tool_prefix"; then
4335   # Extract the first word of "ranlib", so it can be a program name with args.
4336 set dummy ranlib; ac_word=$2
4337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4338 echo "configure:4339: checking for $ac_word" >&5
4339 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4340   echo $ac_n "(cached) $ac_c" 1>&6
4341 else
4342   if test -n "$RANLIB"; then
4343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4344 else
4345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4346   ac_dummy="$PATH"
4347   for ac_dir in $ac_dummy; do
4348     test -z "$ac_dir" && ac_dir=.
4349     if test -f $ac_dir/$ac_word; then
4350       ac_cv_prog_RANLIB="ranlib"
4351       break
4352     fi
4353   done
4354   IFS="$ac_save_ifs"
4355   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4356 fi
4357 fi
4358 RANLIB="$ac_cv_prog_RANLIB"
4359 if test -n "$RANLIB"; then
4360   echo "$ac_t""$RANLIB" 1>&6
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365 else
4366   RANLIB=":"
4367 fi
4368 fi
4369
4370 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4371 set dummy ${ac_tool_prefix}strip; ac_word=$2
4372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_word" >&5
4374 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   if test -n "$STRIP"; then
4378   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4379 else
4380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4381   ac_dummy="$PATH"
4382   for ac_dir in $ac_dummy; do
4383     test -z "$ac_dir" && ac_dir=.
4384     if test -f $ac_dir/$ac_word; then
4385       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4386       break
4387     fi
4388   done
4389   IFS="$ac_save_ifs"
4390 fi
4391 fi
4392 STRIP="$ac_cv_prog_STRIP"
4393 if test -n "$STRIP"; then
4394   echo "$ac_t""$STRIP" 1>&6
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399
4400 if test -z "$ac_cv_prog_STRIP"; then
4401 if test -n "$ac_tool_prefix"; then
4402   # Extract the first word of "strip", so it can be a program name with args.
4403 set dummy strip; ac_word=$2
4404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4405 echo "configure:4406: checking for $ac_word" >&5
4406 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   if test -n "$STRIP"; then
4410   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4411 else
4412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4413   ac_dummy="$PATH"
4414   for ac_dir in $ac_dummy; do
4415     test -z "$ac_dir" && ac_dir=.
4416     if test -f $ac_dir/$ac_word; then
4417       ac_cv_prog_STRIP="strip"
4418       break
4419     fi
4420   done
4421   IFS="$ac_save_ifs"
4422   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4423 fi
4424 fi
4425 STRIP="$ac_cv_prog_STRIP"
4426 if test -n "$STRIP"; then
4427   echo "$ac_t""$STRIP" 1>&6
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431
4432 else
4433   STRIP=":"
4434 fi
4435 fi
4436
4437
4438 enable_dlopen=yes
4439 enable_win32_dll=yes
4440
4441 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4442 if test "${enable_libtool_lock+set}" = set; then
4443   enableval="$enable_libtool_lock"
4444   :
4445 fi
4446
4447 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4448
4449 # Some flags need to be propagated to the compiler or linker for good
4450 # libtool support.
4451 case $host in
4452 *-*-irix6*)
4453   # Find out which ABI we are using.
4454   echo '#line 4455 "configure"' > conftest.$ac_ext
4455   if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456     case `/usr/bin/file conftest.$ac_objext` in
4457     *32-bit*)
4458       LD="${LD-ld} -32"
4459       ;;
4460     *N32*)
4461       LD="${LD-ld} -n32"
4462       ;;
4463     *64-bit*)
4464       LD="${LD-ld} -64"
4465       ;;
4466     esac
4467   fi
4468   rm -rf conftest*
4469   ;;
4470
4471 *-*-sco3.2v5*)
4472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4473   SAVE_CFLAGS="$CFLAGS"
4474   CFLAGS="$CFLAGS -belf"
4475   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4476 echo "configure:4477: checking whether the C compiler needs -belf" >&5
4477 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   
4481      ac_ext=c
4482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4483 ac_cpp='$CPP $CPPFLAGS'
4484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4486 cross_compiling=$ac_cv_prog_cc_cross
4487
4488      cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491
4492 int main() {
4493
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497   rm -rf conftest*
4498   lt_cv_cc_needs_belf=yes
4499 else
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   lt_cv_cc_needs_belf=no
4504 fi
4505 rm -f conftest*
4506      ac_ext=c
4507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4508 ac_cpp='$CPP $CPPFLAGS'
4509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4511 cross_compiling=$ac_cv_prog_cc_cross
4512
4513 fi
4514
4515 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4518     CFLAGS="$SAVE_CFLAGS"
4519   fi
4520   ;;
4521
4522 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4523   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$DLLTOOL"; then
4531   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 DLLTOOL="$ac_cv_prog_DLLTOOL"
4546 if test -n "$DLLTOOL"; then
4547   echo "$ac_t""$DLLTOOL" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_DLLTOOL"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "dlltool", so it can be a program name with args.
4556 set dummy dlltool; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$DLLTOOL"; then
4563   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_DLLTOOL="dlltool"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4576 fi
4577 fi
4578 DLLTOOL="$ac_cv_prog_DLLTOOL"
4579 if test -n "$DLLTOOL"; then
4580   echo "$ac_t""$DLLTOOL" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   DLLTOOL="false"
4587 fi
4588 fi
4589
4590   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4591 set dummy ${ac_tool_prefix}as; ac_word=$2
4592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_word" >&5
4594 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   if test -n "$AS"; then
4598   ac_cv_prog_AS="$AS" # Let the user override the test.
4599 else
4600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4601   ac_dummy="$PATH"
4602   for ac_dir in $ac_dummy; do
4603     test -z "$ac_dir" && ac_dir=.
4604     if test -f $ac_dir/$ac_word; then
4605       ac_cv_prog_AS="${ac_tool_prefix}as"
4606       break
4607     fi
4608   done
4609   IFS="$ac_save_ifs"
4610 fi
4611 fi
4612 AS="$ac_cv_prog_AS"
4613 if test -n "$AS"; then
4614   echo "$ac_t""$AS" 1>&6
4615 else
4616   echo "$ac_t""no" 1>&6
4617 fi
4618
4619
4620 if test -z "$ac_cv_prog_AS"; then
4621 if test -n "$ac_tool_prefix"; then
4622   # Extract the first word of "as", so it can be a program name with args.
4623 set dummy as; ac_word=$2
4624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_word" >&5
4626 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   if test -n "$AS"; then
4630   ac_cv_prog_AS="$AS" # Let the user override the test.
4631 else
4632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4633   ac_dummy="$PATH"
4634   for ac_dir in $ac_dummy; do
4635     test -z "$ac_dir" && ac_dir=.
4636     if test -f $ac_dir/$ac_word; then
4637       ac_cv_prog_AS="as"
4638       break
4639     fi
4640   done
4641   IFS="$ac_save_ifs"
4642   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4643 fi
4644 fi
4645 AS="$ac_cv_prog_AS"
4646 if test -n "$AS"; then
4647   echo "$ac_t""$AS" 1>&6
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651
4652 else
4653   AS="false"
4654 fi
4655 fi
4656
4657   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4658 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_word" >&5
4661 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   if test -n "$OBJDUMP"; then
4665   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4666 else
4667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4668   ac_dummy="$PATH"
4669   for ac_dir in $ac_dummy; do
4670     test -z "$ac_dir" && ac_dir=.
4671     if test -f $ac_dir/$ac_word; then
4672       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4673       break
4674     fi
4675   done
4676   IFS="$ac_save_ifs"
4677 fi
4678 fi
4679 OBJDUMP="$ac_cv_prog_OBJDUMP"
4680 if test -n "$OBJDUMP"; then
4681   echo "$ac_t""$OBJDUMP" 1>&6
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686
4687 if test -z "$ac_cv_prog_OBJDUMP"; then
4688 if test -n "$ac_tool_prefix"; then
4689   # Extract the first word of "objdump", so it can be a program name with args.
4690 set dummy objdump; ac_word=$2
4691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4692 echo "configure:4693: checking for $ac_word" >&5
4693 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4694   echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696   if test -n "$OBJDUMP"; then
4697   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4698 else
4699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4700   ac_dummy="$PATH"
4701   for ac_dir in $ac_dummy; do
4702     test -z "$ac_dir" && ac_dir=.
4703     if test -f $ac_dir/$ac_word; then
4704       ac_cv_prog_OBJDUMP="objdump"
4705       break
4706     fi
4707   done
4708   IFS="$ac_save_ifs"
4709   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4710 fi
4711 fi
4712 OBJDUMP="$ac_cv_prog_OBJDUMP"
4713 if test -n "$OBJDUMP"; then
4714   echo "$ac_t""$OBJDUMP" 1>&6
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718
4719 else
4720   OBJDUMP="false"
4721 fi
4722 fi
4723
4724
4725   # recent cygwin and mingw systems supply a stub DllMain which the user
4726   # can override, but on older systems we have to supply one
4727   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4728 echo "configure:4729: checking if libtool should supply DllMain function" >&5
4729 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4738       DllMain (0, 0, 0);
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   lt_cv_need_dllmain=no
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   lt_cv_need_dllmain=yes
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4754
4755   case $host/$CC in
4756   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4757     # old mingw systems require "-dll" to link a DLL, while more recent ones
4758     # require "-mdll"
4759     SAVE_CFLAGS="$CFLAGS"
4760     CFLAGS="$CFLAGS -mdll"
4761     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4762 echo "configure:4763: checking how to link DLLs" >&5
4763 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769
4770 int main() {
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   lt_cv_cc_dll_switch=-mdll
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   lt_cv_cc_dll_switch=-dll
4782 fi
4783 rm -f conftest*
4784 fi
4785
4786 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4787     CFLAGS="$SAVE_CFLAGS" ;;
4788   *-*-cygwin* | *-*-pw32*)
4789     # cygwin systems need to pass --dll to the linker, and not link
4790     # crt.o which will require a WinMain@16 definition.
4791     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4792   esac
4793   ;;
4794   
4795 esac
4796
4797 # Sed substitution that helps us do robust quoting.  It backslashifies
4798 # metacharacters that are still active within double-quoted strings.
4799 Xsed='sed -e s/^X//'
4800 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4801
4802 # Same as above, but do not quote variable references.
4803 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4804
4805 # Sed substitution to delay expansion of an escaped shell variable in a
4806 # double_quote_subst'ed string.
4807 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4808
4809 # Constants:
4810 rm="rm -f"
4811
4812 # Global variables:
4813 default_ofile=libtool
4814 can_build_shared=yes
4815
4816 # All known linkers require a `.a' archive for static linking (except M$VC,
4817 # which needs '.lib').
4818 libext=a
4819 ltmain="$ac_aux_dir/ltmain.sh"
4820 ofile="$default_ofile"
4821 with_gnu_ld="$lt_cv_prog_gnu_ld"
4822 need_locks="$enable_libtool_lock"
4823
4824 old_CC="$CC"
4825 old_CFLAGS="$CFLAGS"
4826
4827 # Set sane defaults for various variables
4828 test -z "$AR" && AR=ar
4829 test -z "$AR_FLAGS" && AR_FLAGS=cru
4830 test -z "$AS" && AS=as
4831 test -z "$CC" && CC=cc
4832 test -z "$DLLTOOL" && DLLTOOL=dlltool
4833 test -z "$LD" && LD=ld
4834 test -z "$LN_S" && LN_S="ln -s"
4835 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4836 test -z "$NM" && NM=nm
4837 test -z "$OBJDUMP" && OBJDUMP=objdump
4838 test -z "$RANLIB" && RANLIB=:
4839 test -z "$STRIP" && STRIP=:
4840 test -z "$ac_objext" && ac_objext=o
4841
4842 if test x"$host" != x"$build"; then
4843   ac_tool_prefix=${host_alias}-
4844 else
4845   ac_tool_prefix=
4846 fi
4847
4848 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4849 case $host_os in
4850 linux-gnu*) ;;
4851 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4852 esac
4853
4854 case $host_os in
4855 aix3*)
4856   # AIX sometimes has problems with the GCC collect2 program.  For some
4857   # reason, if we set the COLLECT_NAMES environment variable, the problems
4858   # vanish in a puff of smoke.
4859   if test "X${COLLECT_NAMES+set}" != Xset; then
4860     COLLECT_NAMES=
4861     export COLLECT_NAMES
4862   fi
4863   ;;
4864 esac
4865
4866 # Determine commands to create old-style static archives.
4867 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4868 old_postinstall_cmds='chmod 644 $oldlib'
4869 old_postuninstall_cmds=
4870
4871 if test -n "$RANLIB"; then
4872   case $host_os in
4873   openbsd*)
4874     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4875     ;;
4876   *)
4877     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4878     ;;
4879   esac
4880   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4881 fi
4882
4883 # Allow CC to be a program name with arguments.
4884 set dummy $CC
4885 compiler="$2"
4886
4887 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4888 echo "configure:4889: checking for objdir" >&5
4889 rm -f .libs 2>/dev/null
4890 mkdir .libs 2>/dev/null
4891 if test -d .libs; then
4892   objdir=.libs
4893 else
4894   # MS-DOS does not allow filenames that begin with a dot.
4895   objdir=_libs
4896 fi
4897 rmdir .libs 2>/dev/null
4898 echo "$ac_t""$objdir" 1>&6
4899
4900
4901 # Check whether --with-pic or --without-pic was given.
4902 if test "${with_pic+set}" = set; then
4903   withval="$with_pic"
4904   pic_mode="$withval"
4905 else
4906   pic_mode=default
4907 fi
4908
4909 test -z "$pic_mode" && pic_mode=default
4910
4911 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4912 # in isolation, and that seeing it set (from the cache) indicates that
4913 # the associated values are set (in the cache) correctly too.
4914 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4915 echo "configure:4916: checking for $compiler option to produce PIC" >&5
4916 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919    lt_cv_prog_cc_pic=
4920   lt_cv_prog_cc_shlib=
4921   lt_cv_prog_cc_wl=
4922   lt_cv_prog_cc_static=
4923   lt_cv_prog_cc_no_builtin=
4924   lt_cv_prog_cc_can_build_shared=$can_build_shared
4925
4926   if test "$GCC" = yes; then
4927     lt_cv_prog_cc_wl='-Wl,'
4928     lt_cv_prog_cc_static='-static'
4929
4930     case $host_os in
4931     aix*)
4932       # Below there is a dirty hack to force normal static linking with -ldl
4933       # The problem is because libdl dynamically linked with both libc and
4934       # libC (AIX C++ library), which obviously doesn't included in libraries
4935       # list by gcc. This cause undefined symbols with -static flags.
4936       # This hack allows C programs to be linked with "-static -ldl", but
4937       # not sure about C++ programs.
4938       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4939       ;;
4940     amigaos*)
4941       # FIXME: we need at least 68020 code to build shared libraries, but
4942       # adding the `-m68020' flag to GCC prevents building anything better,
4943       # like `-m68040'.
4944       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4945       ;;
4946     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4947       # PIC is the default for these OSes.
4948       ;;
4949     darwin* | rhapsody*)
4950       # PIC is the default on this platform
4951       # Common symbols not allowed in MH_DYLIB files
4952       lt_cv_prog_cc_pic='-fno-common'
4953       ;;
4954     cygwin* | mingw* | pw32* | os2*)
4955       # This hack is so that the source file can tell whether it is being
4956       # built for inclusion in a dll (and should export symbols for example).
4957       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4958       ;;
4959     sysv4*MP*)
4960       if test -d /usr/nec; then
4961          lt_cv_prog_cc_pic=-Kconform_pic
4962       fi
4963       ;;
4964     *)
4965       lt_cv_prog_cc_pic='-fPIC'
4966       ;;
4967     esac
4968   else
4969     # PORTME Check for PIC flags for the system compiler.
4970     case $host_os in
4971     aix3* | aix4* | aix5*)
4972       lt_cv_prog_cc_wl='-Wl,'
4973       # All AIX code is PIC.
4974       if test "$host_cpu" = ia64; then
4975         # AIX 5 now supports IA64 processor
4976         lt_cv_prog_cc_static='-Bstatic'
4977       else
4978         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4979       fi
4980       ;;
4981
4982     hpux9* | hpux10* | hpux11*)
4983       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4984       lt_cv_prog_cc_wl='-Wl,'
4985       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4986       lt_cv_prog_cc_pic='+Z'
4987       ;;
4988
4989     irix5* | irix6* | nonstopux*)
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static='-non_shared'
4992       # PIC (with -KPIC) is the default.
4993       ;;
4994
4995     cygwin* | mingw* | pw32* | os2*)
4996       # This hack is so that the source file can tell whether it is being
4997       # built for inclusion in a dll (and should export symbols for example).
4998       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4999       ;;
5000
5001     newsos6)
5002       lt_cv_prog_cc_pic='-KPIC'
5003       lt_cv_prog_cc_static='-Bstatic'
5004       ;;
5005     
5006     openedition)
5007       # XPLINK code is PIC by default
5008       ;;
5009
5010     osf3* | osf4* | osf5*)
5011       # All OSF/1 code is PIC.
5012       lt_cv_prog_cc_wl='-Wl,'
5013       lt_cv_prog_cc_static='-non_shared'
5014       ;;
5015
5016     sco3.2v5*)
5017       lt_cv_prog_cc_pic='-Kpic'
5018       lt_cv_prog_cc_static='-dn'
5019       lt_cv_prog_cc_shlib='-belf'
5020       ;;
5021
5022     solaris*)
5023       lt_cv_prog_cc_pic='-KPIC'
5024       lt_cv_prog_cc_static='-Bstatic'
5025       lt_cv_prog_cc_wl='-Wl,'
5026       ;;
5027
5028     sunos4*)
5029       lt_cv_prog_cc_pic='-PIC'
5030       lt_cv_prog_cc_static='-Bstatic'
5031       lt_cv_prog_cc_wl='-Qoption ld '
5032       ;;
5033
5034     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5035       lt_cv_prog_cc_pic='-KPIC'
5036       lt_cv_prog_cc_static='-Bstatic'
5037       lt_cv_prog_cc_wl='-Wl,'
5038       ;;
5039
5040     uts4*)
5041       lt_cv_prog_cc_pic='-pic'
5042       lt_cv_prog_cc_static='-Bstatic'
5043       ;;
5044
5045     sysv4*MP*)
5046       if test -d /usr/nec ;then
5047         lt_cv_prog_cc_pic='-Kconform_pic'
5048         lt_cv_prog_cc_static='-Bstatic'
5049       fi
5050       ;;
5051
5052     *)
5053       lt_cv_prog_cc_can_build_shared=no
5054       ;;
5055     esac
5056   fi
5057
5058 fi
5059
5060 if test -z "$lt_cv_prog_cc_pic"; then
5061   echo "$ac_t""none" 1>&6
5062 else
5063   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5064
5065   # Check to make sure the pic_flag actually works.
5066   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5067 echo "configure:5068: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5068   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071       save_CFLAGS="$CFLAGS"
5072     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5073     cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5082   rm -rf conftest*
5083         case $host_os in
5084       hpux9* | hpux10* | hpux11*)
5085         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5086         # they create non-PIC objects.  So, if there were any warnings, we
5087         # assume that PIC is not supported.
5088         if test -s conftest.err; then
5089           lt_cv_prog_cc_pic_works=no
5090         else
5091           lt_cv_prog_cc_pic_works=yes
5092         fi
5093         ;;
5094       *)
5095         lt_cv_prog_cc_pic_works=yes
5096         ;;
5097       esac
5098     
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103         lt_cv_prog_cc_pic_works=no
5104     
5105 fi
5106 rm -f conftest*
5107     CFLAGS="$save_CFLAGS"
5108   
5109 fi
5110
5111
5112   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5113     lt_cv_prog_cc_pic=
5114     lt_cv_prog_cc_can_build_shared=no
5115   else
5116     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5117   fi
5118
5119   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5120 fi
5121
5122 # Check for any special shared library compilation flags.
5123 if test -n "$lt_cv_prog_cc_shlib"; then
5124   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5125   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5126   else
5127    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5128     lt_cv_prog_cc_can_build_shared=no
5129   fi
5130 fi
5131
5132 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5133 echo "configure:5134: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5134 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137     lt_cv_prog_cc_static_works=no
5138   save_LDFLAGS="$LDFLAGS"
5139   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5140   cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   lt_cv_prog_cc_static_works=yes
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154 fi
5155 rm -f conftest*
5156   LDFLAGS="$save_LDFLAGS"
5157
5158 fi
5159
5160
5161 # Belt *and* braces to stop my trousers falling down:
5162 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5163 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5164
5165 pic_flag="$lt_cv_prog_cc_pic"
5166 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5167 wl="$lt_cv_prog_cc_wl"
5168 link_static_flag="$lt_cv_prog_cc_static"
5169 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5170 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5171
5172
5173 # Check to see if options -o and -c are simultaneously supported by compiler
5174 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5175 echo "configure:5176: checking if $compiler supports -c -o file.$ac_objext" >&5
5176 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5177   echo $ac_n "(cached) $ac_c" 1>&6
5178 else
5179   
5180 $rm -r conftest 2>/dev/null
5181 mkdir conftest
5182 cd conftest
5183 echo "int some_variable = 0;" > conftest.$ac_ext
5184 mkdir out
5185 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5186 # that will create temporary files in the current directory regardless of
5187 # the output directory.  Thus, making CWD read-only will cause this test
5188 # to fail, enabling locking or at least warning the user not to do parallel
5189 # builds.
5190 chmod -w .
5191 save_CFLAGS="$CFLAGS"
5192 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5193 compiler_c_o=no
5194 if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5195   # The compiler can only warn and ignore the option if not recognized
5196   # So say no if there are warnings
5197   if test -s out/conftest.err; then
5198     lt_cv_compiler_c_o=no
5199   else
5200     lt_cv_compiler_c_o=yes
5201   fi
5202 else
5203   # Append any errors to the config.log.
5204   cat out/conftest.err 1>&5
5205   lt_cv_compiler_c_o=no
5206 fi
5207 CFLAGS="$save_CFLAGS"
5208 chmod u+w .
5209 $rm conftest* out/*
5210 rmdir out
5211 cd ..
5212 rmdir conftest
5213 $rm -r conftest 2>/dev/null
5214
5215 fi
5216
5217 compiler_c_o=$lt_cv_compiler_c_o
5218 echo "$ac_t""$compiler_c_o" 1>&6
5219
5220 if test x"$compiler_c_o" = x"yes"; then
5221   # Check to see if we can write to a .lo
5222   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -c -o file.lo" >&5
5224   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228   lt_cv_compiler_o_lo=no
5229   save_CFLAGS="$CFLAGS"
5230   CFLAGS="$CFLAGS -c -o conftest.lo"
5231   save_objext="$ac_objext"
5232   ac_objext=lo
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238 int some_variable = 0;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243       # The compiler can only warn and ignore the option if not recognized
5244     # So say no if there are warnings
5245     if test -s conftest.err; then
5246       lt_cv_compiler_o_lo=no
5247     else
5248       lt_cv_compiler_o_lo=yes
5249     fi
5250   
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254 fi
5255 rm -f conftest*
5256   ac_objext="$save_objext"
5257   CFLAGS="$save_CFLAGS"
5258   
5259 fi
5260
5261   compiler_o_lo=$lt_cv_compiler_o_lo
5262   echo "$ac_t""$compiler_o_lo" 1>&6
5263 else
5264   compiler_o_lo=no
5265 fi
5266
5267 # Check to see if we can do hard links to lock some files if needed
5268 hard_links="nottested"
5269 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5270   # do not overwrite the value of need_locks provided by the user
5271   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5272 echo "configure:5273: checking if we can lock with hard links" >&5
5273   hard_links=yes
5274   $rm conftest*
5275   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5276   touch conftest.a
5277   ln conftest.a conftest.b 2>&5 || hard_links=no
5278   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5279   echo "$ac_t""$hard_links" 1>&6
5280   if test "$hard_links" = no; then
5281     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5282     need_locks=warn
5283   fi
5284 else
5285   need_locks=no
5286 fi
5287
5288 if test "$GCC" = yes; then
5289   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5290   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5291 echo "configure:5292: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5292   echo "int some_variable = 0;" > conftest.$ac_ext
5293   save_CFLAGS="$CFLAGS"
5294   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5295   compiler_rtti_exceptions=no
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       compiler_rtti_exceptions=no
5310     else
5311       compiler_rtti_exceptions=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   CFLAGS="$save_CFLAGS"
5320   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5321
5322   if test "$compiler_rtti_exceptions" = "yes"; then
5323     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5324   else
5325     no_builtin_flag=' -fno-builtin'
5326   fi
5327 fi
5328
5329 # See if the linker supports building shared libraries.
5330 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5331 echo "configure:5332: checking whether the linker ($LD) supports shared libraries" >&5
5332
5333 allow_undefined_flag=
5334 no_undefined_flag=
5335 need_lib_prefix=unknown
5336 need_version=unknown
5337 # when you set need_version to no, make sure it does not cause -set_version
5338 # flags to be left without arguments
5339 archive_cmds=
5340 archive_expsym_cmds=
5341 old_archive_from_new_cmds=
5342 old_archive_from_expsyms_cmds=
5343 export_dynamic_flag_spec=
5344 whole_archive_flag_spec=
5345 thread_safe_flag_spec=
5346 hardcode_into_libs=no
5347 hardcode_libdir_flag_spec=
5348 hardcode_libdir_separator=
5349 hardcode_direct=no
5350 hardcode_minus_L=no
5351 hardcode_shlibpath_var=unsupported
5352 runpath_var=
5353 link_all_deplibs=unknown
5354 always_export_symbols=no
5355 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5356 # include_expsyms should be a list of space-separated symbols to be *always*
5357 # included in the symbol list
5358 include_expsyms=
5359 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5360 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5361 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5362 # as well as any symbol that contains `d'.
5363 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5364 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5365 # platforms (ab)use it in PIC code, but their linkers get confused if
5366 # the symbol is explicitly referenced.  Since portable code cannot
5367 # rely on this symbol name, it's probably fine to never include it in
5368 # preloaded symbol tables.
5369 extract_expsyms_cmds=
5370
5371 case $host_os in
5372 cygwin* | mingw* | pw32*)
5373   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5374   # When not using gcc, we currently assume that we are using
5375   # Microsoft Visual C++.
5376   if test "$GCC" != yes; then
5377     with_gnu_ld=no
5378   fi
5379   ;;
5380 openbsd*)
5381   with_gnu_ld=no
5382   ;;
5383 esac
5384
5385 ld_shlibs=yes
5386 if test "$with_gnu_ld" = yes; then
5387   # If archive_cmds runs LD, not CC, wlarc should be empty
5388   wlarc='${wl}'
5389
5390   # See if GNU ld supports shared libraries.
5391   case $host_os in
5392   aix3* | aix4* | aix5*)
5393     # On AIX, the GNU linker is very broken
5394     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5395     ld_shlibs=no
5396     cat <<EOF 1>&2
5397
5398 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5399 *** to be unable to reliably create shared libraries on AIX.
5400 *** Therefore, libtool is disabling shared libraries support.  If you
5401 *** really care for shared libraries, you may want to modify your PATH
5402 *** so that a non-GNU linker is found, and then restart.
5403
5404 EOF
5405     ;;
5406
5407   amigaos*)
5408     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)'
5409     hardcode_libdir_flag_spec='-L$libdir'
5410     hardcode_minus_L=yes
5411
5412     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5413     # that the semantics of dynamic libraries on AmigaOS, at least up
5414     # to version 4, is to share data among multiple programs linked
5415     # with the same dynamic library.  Since this doesn't match the
5416     # behavior of shared libraries on other platforms, we can use
5417     # them.
5418     ld_shlibs=no
5419     ;;
5420
5421   beos*)
5422     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5423       allow_undefined_flag=unsupported
5424       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5425       # support --undefined.  This deserves some investigation.  FIXME
5426       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5427     else
5428       ld_shlibs=no
5429     fi
5430     ;;
5431
5432   cygwin* | mingw* | pw32*)
5433     # hardcode_libdir_flag_spec is actually meaningless, as there is
5434     # no search path for DLLs.
5435     hardcode_libdir_flag_spec='-L$libdir'
5436     allow_undefined_flag=unsupported
5437     always_export_symbols=yes
5438
5439     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5440       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5441       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5442       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5443       else $CC -o impgen impgen.c ; fi)~
5444       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5445
5446     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5447
5448     # cygwin and mingw dlls have different entry points and sets of symbols
5449     # to exclude.
5450     # FIXME: what about values for MSVC?
5451     dll_entry=__cygwin_dll_entry@12
5452     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5453     case $host_os in
5454     mingw*)
5455       # mingw values
5456       dll_entry=_DllMainCRTStartup@12
5457       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5458       ;;
5459     esac
5460
5461     # mingw and cygwin differ, and it's simplest to just exclude the union
5462     # of the two symbol sets.
5463     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5464
5465     # recent cygwin and mingw systems supply a stub DllMain which the user
5466     # can override, but on older systems we have to supply one (in ltdll.c)
5467     if test "x$lt_cv_need_dllmain" = "xyes"; then
5468       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5469       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~
5470         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5471     else
5472       ltdll_obj=
5473       ltdll_cmds=
5474     fi
5475
5476     # Extract the symbol export list from an `--export-all' def file,
5477     # then regenerate the def file from the symbol export list, so that
5478     # the compiled dll only exports the symbol export list.
5479     # Be careful not to strip the DATA tag left be newer dlltools.
5480     export_symbols_cmds="$ltdll_cmds"'
5481       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5482       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5483
5484     # If the export-symbols file already is a .def file (1st line
5485     # is EXPORTS), use it as is.
5486     # If DATA tags from a recent dlltool are present, honour them!
5487     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5488         cp $export_symbols $output_objdir/$soname-def;
5489       else
5490         echo EXPORTS > $output_objdir/$soname-def;
5491         _lt_hint=1;
5492         cat $export_symbols | while read symbol; do
5493          set dummy \$symbol;
5494          case \$# in
5495            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5496            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5497            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5498          esac;
5499          _lt_hint=`expr 1 + \$_lt_hint`;
5500         done;
5501       fi~
5502       '"$ltdll_cmds"'
5503       $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~
5504       $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~
5505       $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~
5506       $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~
5507       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5508     ;;
5509
5510   netbsd*)
5511     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5512       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5513       wlarc=
5514     else
5515       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5516       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5517     fi
5518     ;;
5519
5520   solaris* | sysv5*)
5521     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5522       ld_shlibs=no
5523       cat <<EOF 1>&2
5524
5525 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5526 *** create shared libraries on Solaris systems.  Therefore, libtool
5527 *** is disabling shared libraries support.  We urge you to upgrade GNU
5528 *** binutils to release 2.9.1 or newer.  Another option is to modify
5529 *** your PATH or compiler configuration so that the native linker is
5530 *** used, and then restart.
5531
5532 EOF
5533     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5534       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5535       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5536     else
5537       ld_shlibs=no
5538     fi
5539     ;;
5540
5541   sunos4*)
5542     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5543     wlarc=
5544     hardcode_direct=yes
5545     hardcode_shlibpath_var=no
5546     ;;
5547
5548   *)
5549     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5550       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5551       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5552     else
5553       ld_shlibs=no
5554     fi
5555     ;;
5556   esac
5557
5558   if test "$ld_shlibs" = yes; then
5559     runpath_var=LD_RUN_PATH
5560     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5561     export_dynamic_flag_spec='${wl}--export-dynamic'
5562     case $host_os in
5563     cygwin* | mingw* | pw32*)
5564       # dlltool doesn't understand --whole-archive et. al.
5565       whole_archive_flag_spec=
5566       ;;
5567     *)
5568       # ancient GNU ld didn't support --whole-archive et. al.
5569       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5570         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5571       else
5572         whole_archive_flag_spec=
5573       fi
5574       ;;
5575     esac
5576   fi
5577 else
5578   # PORTME fill in a description of your system's linker (not GNU ld)
5579   case $host_os in
5580   aix3*)
5581     allow_undefined_flag=unsupported
5582     always_export_symbols=yes
5583     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'
5584     # Note: this linker hardcodes the directories in LIBPATH if there
5585     # are no directories specified by -L.
5586     hardcode_minus_L=yes
5587     if test "$GCC" = yes && test -z "$link_static_flag"; then
5588       # Neither direct hardcoding nor static linking is supported with a
5589       # broken collect2.
5590       hardcode_direct=unsupported
5591     fi
5592     ;;
5593
5594   aix4* | aix5*)
5595     if test "$host_cpu" = ia64; then
5596       # On IA64, the linker does run time linking by default, so we don't
5597       # have to do anything special.
5598       aix_use_runtimelinking=no
5599       exp_sym_flag='-Bexport'
5600       no_entry_flag=""
5601     else
5602       aix_use_runtimelinking=no
5603
5604       # Test if we are trying to use run time linking or normal
5605       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5606       # need to do runtime linking.
5607       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5608         for ld_flag in $LDFLAGS; do
5609           case $ld_flag in
5610           *-brtl*)
5611             aix_use_runtimelinking=yes
5612             break
5613           ;;
5614           esac
5615         done
5616       esac
5617
5618       exp_sym_flag='-bexport'
5619       no_entry_flag='-bnoentry'
5620     fi
5621
5622     # When large executables or shared objects are built, AIX ld can
5623     # have problems creating the table of contents.  If linking a library
5624     # or program results in "error TOC overflow" add -mminimal-toc to
5625     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5626     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5627
5628     hardcode_direct=yes
5629     archive_cmds=''
5630     hardcode_libdir_separator=':'
5631     if test "$GCC" = yes; then
5632       case $host_os in aix4.[012]|aix4.[012].*)
5633         collect2name=`${CC} -print-prog-name=collect2`
5634         if test -f "$collect2name" && \
5635           strings "$collect2name" | grep resolve_lib_name >/dev/null
5636         then
5637           # We have reworked collect2
5638           hardcode_direct=yes
5639         else
5640           # We have old collect2
5641           hardcode_direct=unsupported
5642           # It fails to find uninstalled libraries when the uninstalled
5643           # path is not listed in the libpath.  Setting hardcode_minus_L
5644           # to unsupported forces relinking
5645           hardcode_minus_L=yes
5646           hardcode_libdir_flag_spec='-L$libdir'
5647           hardcode_libdir_separator=
5648         fi
5649       esac
5650
5651       shared_flag='-shared'
5652     else
5653       # not using gcc
5654       if test "$host_cpu" = ia64; then
5655         shared_flag='${wl}-G'
5656       else
5657         if test "$aix_use_runtimelinking" = yes; then
5658           shared_flag='${wl}-G'
5659         else
5660           shared_flag='${wl}-bM:SRE'
5661         fi
5662       fi
5663     fi
5664
5665     # It seems that -bexpall can do strange things, so it is better to
5666     # generate a list of symbols to export.
5667     always_export_symbols=yes
5668     if test "$aix_use_runtimelinking" = yes; then
5669       # Warning - without using the other runtime loading flags (-brtl),
5670       # -berok will link without error, but may produce a broken library.
5671       allow_undefined_flag='-berok'
5672       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5673       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"
5674     else
5675       if test "$host_cpu" = ia64; then
5676         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5677         allow_undefined_flag="-z nodefs"
5678         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"
5679       else
5680         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5681         # Warning - without using the other run time loading flags,
5682         # -berok will link without error, but may produce a broken library.
5683         allow_undefined_flag='${wl}-berok'
5684         # This is a bit strange, but is similar to how AIX traditionally builds
5685         # it's shared libraries.
5686         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'
5687       fi
5688     fi
5689     ;;
5690
5691   amigaos*)
5692     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)'
5693     hardcode_libdir_flag_spec='-L$libdir'
5694     hardcode_minus_L=yes
5695     # see comment about different semantics on the GNU ld section
5696     ld_shlibs=no
5697     ;;
5698
5699   cygwin* | mingw* | pw32*)
5700     # When not using gcc, we currently assume that we are using
5701     # Microsoft Visual C++.
5702     # hardcode_libdir_flag_spec is actually meaningless, as there is
5703     # no search path for DLLs.
5704     hardcode_libdir_flag_spec=' '
5705     allow_undefined_flag=unsupported
5706     # Tell ltmain to make .lib files, not .a files.
5707     libext=lib
5708     # FIXME: Setting linknames here is a bad hack.
5709     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5710     # The linker will automatically build a .lib file if we build a DLL.
5711     old_archive_from_new_cmds='true'
5712     # FIXME: Should let the user specify the lib program.
5713     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5714     fix_srcfile_path='`cygpath -w "$srcfile"`'
5715     ;;
5716
5717   darwin* | rhapsody*)
5718     case "$host_os" in
5719     rhapsody* | darwin1.[012])
5720       allow_undefined_flag='-undefined suppress'
5721       ;;
5722     *) # Darwin 1.3 on
5723       allow_undefined_flag='-flat_namespace -undefined suppress'
5724       ;;
5725     esac
5726     # FIXME: Relying on posixy $() will cause problems for
5727     #        cross-compilation, but unfortunately the echo tests do not
5728     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5729     #        `"' quotes if we put them in here... so don't!
5730     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)'
5731     # We need to add '_' to the symbols in $export_symbols first
5732     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5733     hardcode_direct=yes
5734     hardcode_shlibpath_var=no
5735     whole_archive_flag_spec='-all_load $convenience'
5736     ;;
5737
5738   freebsd1*)
5739     ld_shlibs=no
5740     ;;
5741
5742   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5743   # support.  Future versions do this automatically, but an explicit c++rt0.o
5744   # does not break anything, and helps significantly (at the cost of a little
5745   # extra space).
5746   freebsd2.2*)
5747     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5748     hardcode_libdir_flag_spec='-R$libdir'
5749     hardcode_direct=yes
5750     hardcode_shlibpath_var=no
5751     ;;
5752
5753   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5754   freebsd2*)
5755     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5756     hardcode_direct=yes
5757     hardcode_minus_L=yes
5758     hardcode_shlibpath_var=no
5759     ;;
5760
5761   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5762   freebsd*)
5763     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5764     hardcode_libdir_flag_spec='-R$libdir'
5765     hardcode_direct=yes
5766     hardcode_shlibpath_var=no
5767     ;;
5768
5769   hpux9* | hpux10* | hpux11*)
5770     case $host_os in
5771     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' ;;
5772     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5773     esac
5774     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5775     hardcode_libdir_separator=:
5776     hardcode_direct=yes
5777     hardcode_minus_L=yes # Not in the search PATH, but as the default
5778                          # location of the library.
5779     export_dynamic_flag_spec='${wl}-E'
5780     ;;
5781
5782   irix5* | irix6* | nonstopux*)
5783     if test "$GCC" = yes; then
5784       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'
5785       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5786     else
5787       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'
5788       hardcode_libdir_flag_spec='-rpath $libdir'
5789     fi
5790     hardcode_libdir_separator=:
5791     link_all_deplibs=yes
5792     ;;
5793
5794   netbsd*)
5795     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5796       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5797     else
5798       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5799     fi
5800     hardcode_libdir_flag_spec='-R$libdir'
5801     hardcode_direct=yes
5802     hardcode_shlibpath_var=no
5803     ;;
5804
5805   newsos6)
5806     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5807     hardcode_direct=yes
5808     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5809     hardcode_libdir_separator=:
5810     hardcode_shlibpath_var=no
5811     ;;
5812
5813   openbsd*)
5814     hardcode_direct=yes
5815     hardcode_shlibpath_var=no
5816     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5817       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5818       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5819       export_dynamic_flag_spec='${wl}-E'
5820     else
5821       case "$host_os" in
5822       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5823         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5824         hardcode_libdir_flag_spec='-R$libdir'
5825         ;;
5826       *)
5827         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5828         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5829         ;;
5830       esac
5831     fi
5832     ;;
5833
5834   openedition*)
5835     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5836         cp \$linknames \$output_objdir && linknames=''"
5837     export_dynamic_flag_spec="-Wl,DLL"
5838     ;;
5839
5840   os2*)
5841     hardcode_libdir_flag_spec='-L$libdir'
5842     hardcode_minus_L=yes
5843     allow_undefined_flag=unsupported
5844     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'
5845     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5846     ;;
5847
5848   osf3*)
5849     if test "$GCC" = yes; then
5850       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5851       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'
5852     else
5853       allow_undefined_flag=' -expect_unresolved \*'
5854       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'
5855     fi
5856     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5857     hardcode_libdir_separator=:
5858     ;;
5859
5860   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5861     if test "$GCC" = yes; then
5862       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5863       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'
5864       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5865     else
5866       allow_undefined_flag=' -expect_unresolved \*'
5867       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'
5868       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5869       $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'
5870
5871       #Both c and cxx compiler support -rpath directly
5872       hardcode_libdir_flag_spec='-rpath $libdir'
5873     fi
5874     hardcode_libdir_separator=:
5875     ;;
5876
5877   sco3.2v5*)
5878     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5879     hardcode_shlibpath_var=no
5880     runpath_var=LD_RUN_PATH
5881     hardcode_runpath_var=yes
5882     export_dynamic_flag_spec='${wl}-Bexport'
5883     ;;
5884
5885   solaris*)
5886     # gcc --version < 3.0 without binutils cannot create self contained
5887     # shared libraries reliably, requiring libgcc.a to resolve some of
5888     # the object symbols generated in some cases.  Libraries that use
5889     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5890     # a copy of libgcc.a into every shared library to guarantee resolving
5891     # such symbols causes other problems:  According to Tim Van Holder
5892     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5893     # (to the application) exception stack for one thing.
5894     no_undefined_flag=' -z defs'
5895     if test "$GCC" = yes; then
5896       case `$CC --version 2>/dev/null` in
5897       [12].*)
5898         cat <<EOF 1>&2
5899
5900 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5901 *** create self contained shared libraries on Solaris systems, without
5902 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5903 *** -no-undefined support, which will at least allow you to build shared
5904 *** libraries.  However, you may find that when you link such libraries
5905 *** into an application without using GCC, you have to manually add
5906 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5907 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5908 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5909
5910 EOF
5911         no_undefined_flag=
5912         ;;
5913       esac
5914     fi
5915     # $CC -shared without GNU ld will not create a library from C++
5916     # object files and a static libstdc++, better avoid it by now
5917     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5919                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5920     hardcode_libdir_flag_spec='-R$libdir'
5921     hardcode_shlibpath_var=no
5922     case $host_os in
5923     solaris2.[0-5] | solaris2.[0-5].*) ;;
5924     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5925       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5926     esac
5927     link_all_deplibs=yes
5928     ;;
5929
5930   sunos4*)
5931     if test "x$host_vendor" = xsequent; then
5932       # Use $CC to link under sequent, because it throws in some extra .o
5933       # files that make .init and .fini sections work.
5934       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5935     else
5936       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5937     fi
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_direct=yes
5940     hardcode_minus_L=yes
5941     hardcode_shlibpath_var=no
5942     ;;
5943
5944   sysv4)
5945     case $host_vendor in
5946       sni)
5947         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5948         hardcode_direct=yes # is this really true???
5949         ;;
5950       siemens)
5951         ## LD is ld it makes a PLAMLIB
5952         ## CC just makes a GrossModule.
5953         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5954         reload_cmds='$CC -r -o $output$reload_objs'
5955         hardcode_direct=no
5956         ;;
5957       motorola)
5958         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5959         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5960         ;;
5961     esac
5962     runpath_var='LD_RUN_PATH'
5963     hardcode_shlibpath_var=no
5964     ;;
5965
5966   sysv4.3*)
5967     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968     hardcode_shlibpath_var=no
5969     export_dynamic_flag_spec='-Bexport'
5970     ;;
5971
5972   sysv5*)
5973     no_undefined_flag=' -z text'
5974     # $CC -shared without GNU ld will not create a library from C++
5975     # object files and a static libstdc++, better avoid it by now
5976     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5977     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5978                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5979     hardcode_libdir_flag_spec=
5980     hardcode_shlibpath_var=no
5981     runpath_var='LD_RUN_PATH'
5982     ;;
5983
5984   uts4*)
5985     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986     hardcode_libdir_flag_spec='-L$libdir'
5987     hardcode_shlibpath_var=no
5988     ;;
5989
5990   dgux*)
5991     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5992     hardcode_libdir_flag_spec='-L$libdir'
5993     hardcode_shlibpath_var=no
5994     ;;
5995
5996   sysv4*MP*)
5997     if test -d /usr/nec; then
5998       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999       hardcode_shlibpath_var=no
6000       runpath_var=LD_RUN_PATH
6001       hardcode_runpath_var=yes
6002       ld_shlibs=yes
6003     fi
6004     ;;
6005
6006   sysv4.2uw2*)
6007     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6008     hardcode_direct=yes
6009     hardcode_minus_L=no
6010     hardcode_shlibpath_var=no
6011     hardcode_runpath_var=yes
6012     runpath_var=LD_RUN_PATH
6013     ;;
6014
6015   sysv5uw7* | unixware7*)
6016     no_undefined_flag='${wl}-z ${wl}text'
6017     if test "$GCC" = yes; then
6018       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6019     else
6020       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6021     fi
6022     runpath_var='LD_RUN_PATH'
6023     hardcode_shlibpath_var=no
6024     ;;
6025
6026   *)
6027     ld_shlibs=no
6028     ;;
6029   esac
6030 fi
6031 echo "$ac_t""$ld_shlibs" 1>&6
6032 test "$ld_shlibs" = no && can_build_shared=no
6033
6034 # Check hardcoding attributes.
6035 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6036 echo "configure:6037: checking how to hardcode library paths into programs" >&5
6037 hardcode_action=
6038 if test -n "$hardcode_libdir_flag_spec" || \
6039    test -n "$runpath_var"; then
6040
6041   # We can hardcode non-existant directories.
6042   if test "$hardcode_direct" != no &&
6043      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6044      # have to relink, otherwise we might link with an installed library
6045      # when we should be linking with a yet-to-be-installed one
6046      ## test "$hardcode_shlibpath_var" != no &&
6047      test "$hardcode_minus_L" != no; then
6048     # Linking always hardcodes the temporary library directory.
6049     hardcode_action=relink
6050   else
6051     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6052     hardcode_action=immediate
6053   fi
6054 else
6055   # We cannot hardcode anything, or else we can only hardcode existing
6056   # directories.
6057   hardcode_action=unsupported
6058 fi
6059 echo "$ac_t""$hardcode_action" 1>&6
6060
6061 striplib=
6062 old_striplib=
6063 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6064 echo "configure:6065: checking whether stripping libraries is possible" >&5
6065 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6066   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6067   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6068   echo "$ac_t""yes" 1>&6
6069 else
6070   echo "$ac_t""no" 1>&6
6071 fi
6072
6073 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6074 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6075
6076 # PORTME Fill in your ld.so characteristics
6077 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6078 echo "configure:6079: checking dynamic linker characteristics" >&5
6079 library_names_spec=
6080 libname_spec='lib$name'
6081 soname_spec=
6082 postinstall_cmds=
6083 postuninstall_cmds=
6084 finish_cmds=
6085 finish_eval=
6086 shlibpath_var=
6087 shlibpath_overrides_runpath=unknown
6088 version_type=none
6089 dynamic_linker="$host_os ld.so"
6090 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6091 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6092
6093 case $host_os in
6094 aix3*)
6095   version_type=linux
6096   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6097   shlibpath_var=LIBPATH
6098
6099   # AIX has no versioning support, so we append a major version to the name.
6100   soname_spec='${libname}${release}.so$major'
6101   ;;
6102
6103 aix4* | aix5*)
6104   version_type=linux
6105   need_lib_prefix=no
6106   need_version=no
6107   hardcode_into_libs=yes
6108   if test "$host_cpu" = ia64; then
6109     # AIX 5 supports IA64
6110     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6111     shlibpath_var=LD_LIBRARY_PATH
6112   else
6113     # With GCC up to 2.95.x, collect2 would create an import file
6114     # for dependence libraries.  The import file would start with
6115     # the line `#! .'.  This would cause the generated library to
6116     # depend on `.', always an invalid library.  This was fixed in
6117     # development snapshots of GCC prior to 3.0.
6118     case $host_os in
6119       aix4 | aix4.[01] | aix4.[01].*)
6120         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6121              echo ' yes '
6122              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6123           :
6124         else
6125           can_build_shared=no
6126         fi
6127         ;;
6128     esac
6129     # AIX (on Power*) has no versioning support, so currently we can
6130     # not hardcode correct soname into executable. Probably we can
6131     # add versioning support to collect2, so additional links can
6132     # be useful in future.
6133     if test "$aix_use_runtimelinking" = yes; then
6134       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6135       # instead of lib<name>.a to let people know that these are not
6136       # typical AIX shared libraries.
6137       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6138     else
6139       # We preserve .a as extension for shared libraries through AIX4.2
6140       # and later when we are not doing run time linking.
6141       library_names_spec='${libname}${release}.a $libname.a'
6142       soname_spec='${libname}${release}.so$major'
6143     fi
6144     shlibpath_var=LIBPATH
6145   fi
6146   hardcode_into_libs=yes
6147   ;;
6148
6149 amigaos*)
6150   library_names_spec='$libname.ixlibrary $libname.a'
6151   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6152   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'
6153   ;;
6154
6155 beos*)
6156   library_names_spec='${libname}.so'
6157   dynamic_linker="$host_os ld.so"
6158   shlibpath_var=LIBRARY_PATH
6159   ;;
6160
6161 bsdi4*)
6162   version_type=linux
6163   need_version=no
6164   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6165   soname_spec='${libname}${release}.so$major'
6166   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6167   shlibpath_var=LD_LIBRARY_PATH
6168   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6169   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6170   export_dynamic_flag_spec=-rdynamic
6171   # the default ld.so.conf also contains /usr/contrib/lib and
6172   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6173   # libtool to hard-code these into programs
6174   ;;
6175
6176 cygwin* | mingw* | pw32*)
6177   version_type=windows
6178   need_version=no
6179   need_lib_prefix=no
6180   case $GCC,$host_os in
6181   yes,cygwin*)
6182     library_names_spec='$libname.dll.a'
6183     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6184     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6185       dldir=$destdir/`dirname \$dlpath`~
6186       test -d \$dldir || mkdir -p \$dldir~
6187       $install_prog .libs/$dlname \$dldir/$dlname'
6188     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6189       dlpath=$dir/\$dldll~
6190        $rm \$dlpath'
6191     ;;
6192   yes,mingw*)
6193     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6194     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6195     ;;
6196   yes,pw32*)
6197     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6198     ;;
6199   *)
6200     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6201     ;;
6202   esac
6203   dynamic_linker='Win32 ld.exe'
6204   # FIXME: first we should search . and the directory the executable is in
6205   shlibpath_var=PATH
6206   ;;
6207
6208 darwin* | rhapsody*)
6209   dynamic_linker="$host_os dyld"
6210   version_type=darwin
6211   need_lib_prefix=no
6212   need_version=no
6213   # FIXME: Relying on posixy $() will cause problems for
6214   #        cross-compilation, but unfortunately the echo tests do not
6215   #        yet detect zsh echo's removal of \ escapes.
6216   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)'
6217   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6218   shlibpath_overrides_runpath=yes
6219   shlibpath_var=DYLD_LIBRARY_PATH
6220   ;;
6221
6222 freebsd1*)
6223   dynamic_linker=no
6224   ;;
6225
6226 freebsd*)
6227   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6228   version_type=freebsd-$objformat
6229   case $version_type in
6230     freebsd-elf*)
6231       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6232       need_version=no
6233       need_lib_prefix=no
6234       ;;
6235     freebsd-*)
6236       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6237       need_version=yes
6238       ;;
6239   esac
6240   shlibpath_var=LD_LIBRARY_PATH
6241   case $host_os in
6242   freebsd2*)
6243     shlibpath_overrides_runpath=yes
6244     ;;
6245   *)
6246     shlibpath_overrides_runpath=no
6247     hardcode_into_libs=yes
6248     ;;
6249   esac
6250   ;;
6251
6252 gnu*)
6253   version_type=linux
6254   need_lib_prefix=no
6255   need_version=no
6256   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6257   soname_spec='${libname}${release}.so$major'
6258   shlibpath_var=LD_LIBRARY_PATH
6259   hardcode_into_libs=yes
6260   ;;
6261
6262 hpux9* | hpux10* | hpux11*)
6263   # Give a soname corresponding to the major version so that dld.sl refuses to
6264   # link against other versions.
6265   dynamic_linker="$host_os dld.sl"
6266   version_type=sunos
6267   need_lib_prefix=no
6268   need_version=no
6269   shlibpath_var=SHLIB_PATH
6270   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6271   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6272   soname_spec='${libname}${release}.sl$major'
6273   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6274   postinstall_cmds='chmod 555 $lib'
6275   ;;
6276
6277 irix5* | irix6* | nonstopux*)
6278   case $host_os in
6279     nonstopux*) version_type=nonstopux ;;
6280     *)          version_type=irix ;;
6281   esac
6282   need_lib_prefix=no
6283   need_version=no
6284   soname_spec='${libname}${release}.so$major'
6285   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6286   case $host_os in
6287   irix5* | nonstopux*)
6288     libsuff= shlibsuff=
6289     ;;
6290   *)
6291     case $LD in # libtool.m4 will add one of these switches to LD
6292     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6293     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6294     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6295     *) libsuff= shlibsuff= libmagic=never-match;;
6296     esac
6297     ;;
6298   esac
6299   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6300   shlibpath_overrides_runpath=no
6301   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6302   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6303   ;;
6304
6305 # No shared lib support for Linux oldld, aout, or coff.
6306 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6307   dynamic_linker=no
6308   ;;
6309
6310 # This must be Linux ELF.
6311 linux-gnu*)
6312   version_type=linux
6313   need_lib_prefix=no
6314   need_version=no
6315   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6316   soname_spec='${libname}${release}.so$major'
6317   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6318   shlibpath_var=LD_LIBRARY_PATH
6319   shlibpath_overrides_runpath=no
6320   # This implies no fast_install, which is unacceptable.
6321   # Some rework will be needed to allow for fast_install
6322   # before this can be enabled.
6323   hardcode_into_libs=yes
6324
6325   # We used to test for /lib/ld.so.1 and disable shared libraries on
6326   # powerpc, because MkLinux only supported shared libraries with the
6327   # GNU dynamic linker.  Since this was broken with cross compilers,
6328   # most powerpc-linux boxes support dynamic linking these days and
6329   # people can always --disable-shared, the test was removed, and we
6330   # assume the GNU/Linux dynamic linker is in use.
6331   dynamic_linker='GNU/Linux ld.so'
6332   ;;
6333
6334 netbsd*)
6335   version_type=sunos
6336   need_lib_prefix=no
6337   need_version=no
6338   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6339     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6340     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6341     dynamic_linker='NetBSD (a.out) ld.so'
6342   else
6343     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6344     soname_spec='${libname}${release}.so$major'
6345     dynamic_linker='NetBSD ld.elf_so'
6346   fi
6347   shlibpath_var=LD_LIBRARY_PATH
6348   shlibpath_overrides_runpath=yes
6349   hardcode_into_libs=yes
6350   ;;
6351
6352 newsos6)
6353   version_type=linux
6354   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   shlibpath_overrides_runpath=yes
6357   ;;
6358
6359 openbsd*)
6360   version_type=sunos
6361   need_lib_prefix=no
6362   need_version=no
6363   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6364     case "$host_os" in
6365     openbsd2.[89] | openbsd2.[89].*)
6366       shlibpath_overrides_runpath=no
6367       ;;
6368     *)
6369       shlibpath_overrides_runpath=yes
6370       ;;
6371     esac
6372   else
6373     shlibpath_overrides_runpath=yes
6374   fi
6375   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6376   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6377   shlibpath_var=LD_LIBRARY_PATH
6378   ;;
6379
6380 openedition*)
6381   need_lib_prefix=no
6382   need_version=no
6383   shlibpath_overrides_runpath=yes
6384   shlibpath_var=LIBPATH
6385   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6386   # the library's exports are in libname.x; this is the file that must
6387   # actually be linked with to use a DLL.
6388   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6389   ;;
6390
6391 os2*)
6392   libname_spec='$name'
6393   need_lib_prefix=no
6394   library_names_spec='$libname.dll $libname.a'
6395   dynamic_linker='OS/2 ld.exe'
6396   shlibpath_var=LIBPATH
6397   ;;
6398
6399 osf3* | osf4* | osf5*)
6400   version_type=osf
6401   need_version=no
6402   soname_spec='${libname}${release}.so$major'
6403   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6404   shlibpath_var=LD_LIBRARY_PATH
6405   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6406   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6407   hardcode_into_libs=yes
6408   ;;
6409
6410 sco3.2v5*)
6411   version_type=osf
6412   soname_spec='${libname}${release}.so$major'
6413   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6414   shlibpath_var=LD_LIBRARY_PATH
6415   ;;
6416
6417 solaris*)
6418   version_type=linux
6419   need_lib_prefix=no
6420   need_version=no
6421   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6422   soname_spec='${libname}${release}.so$major'
6423   shlibpath_var=LD_LIBRARY_PATH
6424   shlibpath_overrides_runpath=yes
6425   hardcode_into_libs=yes
6426   # ldd complains unless libraries are executable
6427   postinstall_cmds='chmod +x $lib'
6428   ;;
6429
6430 sunos4*)
6431   version_type=sunos
6432   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6433   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6434   shlibpath_var=LD_LIBRARY_PATH
6435   shlibpath_overrides_runpath=yes
6436   if test "$with_gnu_ld" = yes; then
6437     need_lib_prefix=no
6438   fi
6439   need_version=yes
6440   ;;
6441
6442 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6443   version_type=linux
6444   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6445   soname_spec='${libname}${release}.so$major'
6446   shlibpath_var=LD_LIBRARY_PATH
6447   case $host_vendor in
6448     sni)
6449       shlibpath_overrides_runpath=no
6450       need_lib_prefix=no
6451       export_dynamic_flag_spec='${wl}-Blargedynsym'
6452       runpath_var=LD_RUN_PATH
6453       ;;
6454     siemens)
6455       need_lib_prefix=no
6456       ;;
6457     motorola)
6458       need_lib_prefix=no
6459       need_version=no
6460       shlibpath_overrides_runpath=no
6461       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6462       ;;
6463   esac
6464   ;;
6465
6466 uts4*)
6467   version_type=linux
6468   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6469   soname_spec='${libname}${release}.so$major'
6470   shlibpath_var=LD_LIBRARY_PATH
6471   ;;
6472
6473 dgux*)
6474   version_type=linux
6475   need_lib_prefix=no
6476   need_version=no
6477   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6478   soname_spec='${libname}${release}.so$major'
6479   shlibpath_var=LD_LIBRARY_PATH
6480   ;;
6481
6482 sysv4*MP*)
6483   if test -d /usr/nec ;then
6484     version_type=linux
6485     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6486     soname_spec='$libname.so.$major'
6487     shlibpath_var=LD_LIBRARY_PATH
6488   fi
6489   ;;
6490
6491 *)
6492   dynamic_linker=no
6493   ;;
6494 esac
6495 echo "$ac_t""$dynamic_linker" 1>&6
6496 test "$dynamic_linker" = no && can_build_shared=no
6497
6498 # Report the final consequences.
6499 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6500 echo "configure:6501: checking if libtool supports shared libraries" >&5
6501 echo "$ac_t""$can_build_shared" 1>&6
6502
6503 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6504 echo "configure:6505: checking whether to build shared libraries" >&5
6505 test "$can_build_shared" = "no" && enable_shared=no
6506
6507 # On AIX, shared libraries and static libraries use the same namespace, and
6508 # are all built from PIC.
6509 case "$host_os" in
6510 aix3*)
6511   test "$enable_shared" = yes && enable_static=no
6512   if test -n "$RANLIB"; then
6513     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6514     postinstall_cmds='$RANLIB $lib'
6515   fi
6516   ;;
6517
6518 aix4*)
6519   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6520     test "$enable_shared" = yes && enable_static=no
6521   fi
6522   ;;
6523 esac
6524 echo "$ac_t""$enable_shared" 1>&6
6525
6526 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6527 echo "configure:6528: checking whether to build static libraries" >&5
6528 # Make sure either enable_shared or enable_static is yes.
6529 test "$enable_shared" = yes || enable_static=yes
6530 echo "$ac_t""$enable_static" 1>&6
6531
6532 if test "$hardcode_action" = relink; then
6533   # Fast installation is not supported
6534   enable_fast_install=no
6535 elif test "$shlibpath_overrides_runpath" = yes ||
6536      test "$enable_shared" = no; then
6537   # Fast installation is not necessary
6538   enable_fast_install=needless
6539 fi
6540
6541 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6542 if test "$GCC" = yes; then
6543   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6544 fi
6545
6546 if test "x$enable_dlopen" != xyes; then
6547   enable_dlopen=unknown
6548   enable_dlopen_self=unknown
6549   enable_dlopen_self_static=unknown
6550 else
6551   lt_cv_dlopen=no
6552   lt_cv_dlopen_libs=
6553
6554   case $host_os in
6555   beos*)
6556     lt_cv_dlopen="load_add_on"
6557     lt_cv_dlopen_libs=
6558     lt_cv_dlopen_self=yes
6559     ;;
6560
6561   cygwin* | mingw* | pw32*)
6562     lt_cv_dlopen="LoadLibrary"
6563     lt_cv_dlopen_libs=
6564    ;;
6565
6566   *)
6567     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6568 echo "configure:6569: checking for dllload" >&5
6569 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6570   echo $ac_n "(cached) $ac_c" 1>&6
6571 else
6572   cat > conftest.$ac_ext <<EOF
6573 #line 6574 "configure"
6574 #include "confdefs.h"
6575 /* System header to define __stub macros and hopefully few prototypes,
6576     which can conflict with char dllload(); below.  */
6577 #include <assert.h>
6578 /* Override any gcc2 internal prototype to avoid an error.  */
6579 /* We use char because int might match the return type of a gcc2
6580     builtin and then its argument prototype would still apply.  */
6581 char dllload();
6582 char (*f)();
6583
6584 int main() {
6585
6586 /* The GNU C library defines this for functions which it implements
6587     to always fail with ENOSYS.  Some functions are actually named
6588     something starting with __ and the normal name is an alias.  */
6589 #if defined (__stub_dllload) || defined (__stub___dllload)
6590 choke me
6591 #else
6592 f = dllload;
6593 #endif
6594
6595 ; return 0; }
6596 EOF
6597 if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6598   rm -rf conftest*
6599   eval "ac_cv_func_dllload=yes"
6600 else
6601   echo "configure: failed program was:" >&5
6602   cat conftest.$ac_ext >&5
6603   rm -rf conftest*
6604   eval "ac_cv_func_dllload=no"
6605 fi
6606 rm -f conftest*
6607 fi
6608
6609 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6610   echo "$ac_t""yes" 1>&6
6611   lt_cv_dlopen="dllload"
6612 else
6613   echo "$ac_t""no" 1>&6
6614 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6615 echo "configure:6616: checking for shl_load" >&5
6616 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6617   echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619   cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* System header to define __stub macros and hopefully few prototypes,
6623     which can conflict with char shl_load(); below.  */
6624 #include <assert.h>
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 /* We use char because int might match the return type of a gcc2
6627     builtin and then its argument prototype would still apply.  */
6628 char shl_load();
6629 char (*f)();
6630
6631 int main() {
6632
6633 /* The GNU C library defines this for functions which it implements
6634     to always fail with ENOSYS.  Some functions are actually named
6635     something starting with __ and the normal name is an alias.  */
6636 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6637 choke me
6638 #else
6639 f = shl_load;
6640 #endif
6641
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_func_shl_load=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_func_shl_load=no"
6652 fi
6653 rm -f conftest*
6654 fi
6655
6656 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6657   echo "$ac_t""yes" 1>&6
6658   lt_cv_dlopen="shl_load"
6659 else
6660   echo "$ac_t""no" 1>&6
6661 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6662 echo "configure:6663: checking for shl_load in -ldld" >&5
6663 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   ac_save_LIBS="$LIBS"
6668 LIBS="-ldld  $LIBS"
6669 cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char shl_load();
6676
6677 int main() {
6678 shl_load()
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=no"
6689 fi
6690 rm -f conftest*
6691 LIBS="$ac_save_LIBS"
6692
6693 fi
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6697 else
6698   echo "$ac_t""no" 1>&6
6699 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6700 echo "configure:6701: checking for dlopen" >&5
6701 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char dlopen(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char dlopen();
6714 char (*f)();
6715
6716 int main() {
6717
6718 /* The GNU C library defines this for functions which it implements
6719     to always fail with ENOSYS.  Some functions are actually named
6720     something starting with __ and the normal name is an alias.  */
6721 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6722 choke me
6723 #else
6724 f = dlopen;
6725 #endif
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   eval "ac_cv_func_dlopen=yes"
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_func_dlopen=no"
6737 fi
6738 rm -f conftest*
6739 fi
6740
6741 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743   lt_cv_dlopen="dlopen"
6744 else
6745   echo "$ac_t""no" 1>&6
6746 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6747 echo "configure:6748: checking for dlopen in -ldl" >&5
6748 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6750   echo $ac_n "(cached) $ac_c" 1>&6
6751 else
6752   ac_save_LIBS="$LIBS"
6753 LIBS="-ldl  $LIBS"
6754 cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757 /* Override any gcc2 internal prototype to avoid an error.  */
6758 /* We use char because int might match the return type of a gcc2
6759     builtin and then its argument prototype would still apply.  */
6760 char dlopen();
6761
6762 int main() {
6763 dlopen()
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=no"
6774 fi
6775 rm -f conftest*
6776 LIBS="$ac_save_LIBS"
6777
6778 fi
6779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6780   echo "$ac_t""yes" 1>&6
6781   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6782 else
6783   echo "$ac_t""no" 1>&6
6784 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6785 echo "configure:6786: checking for dlopen in -lsvld" >&5
6786 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   ac_save_LIBS="$LIBS"
6791 LIBS="-lsvld  $LIBS"
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 /* Override any gcc2 internal prototype to avoid an error.  */
6796 /* We use char because int might match the return type of a gcc2
6797     builtin and then its argument prototype would still apply.  */
6798 char dlopen();
6799
6800 int main() {
6801 dlopen()
6802 ; return 0; }
6803 EOF
6804 if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=yes"
6807 else
6808   echo "configure: failed program was:" >&5
6809   cat conftest.$ac_ext >&5
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=no"
6812 fi
6813 rm -f conftest*
6814 LIBS="$ac_save_LIBS"
6815
6816 fi
6817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6818   echo "$ac_t""yes" 1>&6
6819   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6820 else
6821   echo "$ac_t""no" 1>&6
6822 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6823 echo "configure:6824: checking for dld_link in -ldld" >&5
6824 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   ac_save_LIBS="$LIBS"
6829 LIBS="-ldld  $LIBS"
6830 cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 /* Override any gcc2 internal prototype to avoid an error.  */
6834 /* We use char because int might match the return type of a gcc2
6835     builtin and then its argument prototype would still apply.  */
6836 char dld_link();
6837
6838 int main() {
6839 dld_link()
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_lib_$ac_lib_var=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=no"
6850 fi
6851 rm -f conftest*
6852 LIBS="$ac_save_LIBS"
6853
6854 fi
6855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6856   echo "$ac_t""yes" 1>&6
6857   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861
6862               
6863 fi
6864
6865             
6866 fi
6867
6868           
6869 fi
6870
6871         
6872 fi
6873
6874       
6875 fi
6876
6877     
6878 fi
6879
6880     ;;
6881   esac
6882
6883   if test "x$lt_cv_dlopen" != xno; then
6884     enable_dlopen=yes
6885   else
6886     enable_dlopen=no
6887   fi
6888
6889   case $lt_cv_dlopen in
6890   dlopen)
6891     save_CPPFLAGS="$CPPFLAGS"
6892         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6893
6894     save_LDFLAGS="$LDFLAGS"
6895     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6896
6897     save_LIBS="$LIBS"
6898     LIBS="$lt_cv_dlopen_libs $LIBS"
6899
6900     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6901 echo "configure:6902: checking whether a program can dlopen itself" >&5
6902 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6903   echo $ac_n "(cached) $ac_c" 1>&6
6904 else
6905           if test "$cross_compiling" = yes; then :
6906   lt_cv_dlopen_self=cross
6907 else
6908     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6909   lt_status=$lt_dlunknown
6910   cat > conftest.$ac_ext <<EOF
6911 #line 6912 "configure"
6912 #include "confdefs.h"
6913
6914 #if HAVE_DLFCN_H
6915 #include <dlfcn.h>
6916 #endif
6917
6918 #include <stdio.h>
6919
6920 #ifdef RTLD_GLOBAL
6921 #  define LT_DLGLOBAL           RTLD_GLOBAL
6922 #else
6923 #  ifdef DL_GLOBAL
6924 #    define LT_DLGLOBAL         DL_GLOBAL
6925 #  else
6926 #    define LT_DLGLOBAL         0
6927 #  endif
6928 #endif
6929
6930 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6931    find out it does not work in some platform. */
6932 #ifndef LT_DLLAZY_OR_NOW
6933 #  ifdef RTLD_LAZY
6934 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6935 #  else
6936 #    ifdef DL_LAZY
6937 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6938 #    else
6939 #      ifdef RTLD_NOW
6940 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6941 #      else
6942 #        ifdef DL_NOW
6943 #          define LT_DLLAZY_OR_NOW      DL_NOW
6944 #        else
6945 #          define LT_DLLAZY_OR_NOW      0
6946 #        endif
6947 #      endif
6948 #    endif
6949 #  endif
6950 #endif
6951
6952 #ifdef __cplusplus
6953 extern "C" void exit (int);
6954 #endif
6955
6956 void fnord() { int i=42;}
6957 int main ()
6958 {
6959   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6960   int status = $lt_dlunknown;
6961
6962   if (self)
6963     {
6964       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6965       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6966       /* dlclose (self); */
6967     }
6968
6969     exit (status);
6970 }
6971 EOF
6972   if { (eval echo configure:6973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6973     (./conftest; exit; ) 2>/dev/null
6974     lt_status=$?
6975     case x$lt_status in
6976       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6977       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6978       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6979     esac
6980   else :
6981     # compilation failed
6982     lt_cv_dlopen_self=no
6983   fi
6984 fi
6985 rm -fr conftest*
6986
6987     
6988 fi
6989
6990 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6991
6992     if test "x$lt_cv_dlopen_self" = xyes; then
6993       LDFLAGS="$LDFLAGS $link_static_flag"
6994       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6995 echo "configure:6996: checking whether a statically linked program can dlopen itself" >&5
6996 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6997   echo $ac_n "(cached) $ac_c" 1>&6
6998 else
6999           if test "$cross_compiling" = yes; then :
7000   lt_cv_dlopen_self_static=cross
7001 else
7002     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7003   lt_status=$lt_dlunknown
7004   cat > conftest.$ac_ext <<EOF
7005 #line 7006 "configure"
7006 #include "confdefs.h"
7007
7008 #if HAVE_DLFCN_H
7009 #include <dlfcn.h>
7010 #endif
7011
7012 #include <stdio.h>
7013
7014 #ifdef RTLD_GLOBAL
7015 #  define LT_DLGLOBAL           RTLD_GLOBAL
7016 #else
7017 #  ifdef DL_GLOBAL
7018 #    define LT_DLGLOBAL         DL_GLOBAL
7019 #  else
7020 #    define LT_DLGLOBAL         0
7021 #  endif
7022 #endif
7023
7024 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7025    find out it does not work in some platform. */
7026 #ifndef LT_DLLAZY_OR_NOW
7027 #  ifdef RTLD_LAZY
7028 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7029 #  else
7030 #    ifdef DL_LAZY
7031 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7032 #    else
7033 #      ifdef RTLD_NOW
7034 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7035 #      else
7036 #        ifdef DL_NOW
7037 #          define LT_DLLAZY_OR_NOW      DL_NOW
7038 #        else
7039 #          define LT_DLLAZY_OR_NOW      0
7040 #        endif
7041 #      endif
7042 #    endif
7043 #  endif
7044 #endif
7045
7046 #ifdef __cplusplus
7047 extern "C" void exit (int);
7048 #endif
7049
7050 void fnord() { int i=42;}
7051 int main ()
7052 {
7053   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7054   int status = $lt_dlunknown;
7055
7056   if (self)
7057     {
7058       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7059       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7060       /* dlclose (self); */
7061     }
7062
7063     exit (status);
7064 }
7065 EOF
7066   if { (eval echo configure:7067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7067     (./conftest; exit; ) 2>/dev/null
7068     lt_status=$?
7069     case x$lt_status in
7070       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7071       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7072       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7073     esac
7074   else :
7075     # compilation failed
7076     lt_cv_dlopen_self_static=no
7077   fi
7078 fi
7079 rm -fr conftest*
7080
7081       
7082 fi
7083
7084 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7085     fi
7086
7087     CPPFLAGS="$save_CPPFLAGS"
7088     LDFLAGS="$save_LDFLAGS"
7089     LIBS="$save_LIBS"
7090     ;;
7091   esac
7092
7093   case $lt_cv_dlopen_self in
7094   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7095   *) enable_dlopen_self=unknown ;;
7096   esac
7097
7098   case $lt_cv_dlopen_self_static in
7099   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7100   *) enable_dlopen_self_static=unknown ;;
7101   esac
7102 fi
7103
7104
7105 if test "$enable_shared" = yes && test "$GCC" = yes; then
7106   case $archive_cmds in
7107   *'~'*)
7108     # FIXME: we may have to deal with multi-command sequences.
7109     ;;
7110   '$CC '*)
7111     # Test whether the compiler implicitly links with -lc since on some
7112     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7113     # to ld, don't add -lc before -lgcc.
7114     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7115 echo "configure:7116: checking whether -lc should be explicitly linked in" >&5
7116     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7117   echo $ac_n "(cached) $ac_c" 1>&6
7118 else
7119   $rm conftest*
7120     echo 'static int dummy;' > conftest.$ac_ext
7121
7122     if { (eval echo configure:7123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7123       soname=conftest
7124       lib=conftest
7125       libobjs=conftest.$ac_objext
7126       deplibs=
7127       wl=$lt_cv_prog_cc_wl
7128       compiler_flags=-v
7129       linker_flags=-v
7130       verstring=
7131       output_objdir=.
7132       libname=conftest
7133       save_allow_undefined_flag=$allow_undefined_flag
7134       allow_undefined_flag=
7135       if { (eval echo configure:7136: \"$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; }
7136       then
7137         lt_cv_archive_cmds_need_lc=no
7138       else
7139         lt_cv_archive_cmds_need_lc=yes
7140       fi
7141       allow_undefined_flag=$save_allow_undefined_flag
7142     else
7143       cat conftest.err 1>&5
7144     fi
7145 fi
7146
7147     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7148     ;;
7149   esac
7150 fi
7151 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7152
7153 # The second clause should only fire when bootstrapping the
7154 # libtool distribution, otherwise you forgot to ship ltmain.sh
7155 # with your package, and you will get complaints that there are
7156 # no rules to generate ltmain.sh.
7157 if test -f "$ltmain"; then
7158   :
7159 else
7160   # If there is no Makefile yet, we rely on a make rule to execute
7161   # `config.status --recheck' to rerun these tests and create the
7162   # libtool script then.
7163   test -f Makefile && make "$ltmain"
7164 fi
7165
7166 if test -f "$ltmain"; then
7167   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7168   $rm -f "${ofile}T"
7169
7170   echo creating $ofile
7171
7172   # Now quote all the things that may contain metacharacters while being
7173   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7174   # variables and quote the copies for generation of the libtool script.
7175   for var in echo old_CC old_CFLAGS SED \
7176     AR AR_FLAGS CC LD LN_S NM SHELL \
7177     reload_flag reload_cmds wl \
7178     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7179     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7180     library_names_spec soname_spec \
7181     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7182     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7183     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7184     old_striplib striplib file_magic_cmd export_symbols_cmds \
7185     deplibs_check_method allow_undefined_flag no_undefined_flag \
7186     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7187     global_symbol_to_c_name_address \
7188     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7189     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7190     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7191
7192     case $var in
7193     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7194     old_postinstall_cmds | old_postuninstall_cmds | \
7195     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7196     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7197     postinstall_cmds | postuninstall_cmds | \
7198     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7199       # Double-quote double-evaled strings.
7200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7201       ;;
7202     *)
7203       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7204       ;;
7205     esac
7206   done
7207
7208   cat <<__EOF__ > "${ofile}T"
7209 #! $SHELL
7210
7211 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7212 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7213 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7214 #
7215 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7216 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7217 #
7218 # This program is free software; you can redistribute it and/or modify
7219 # it under the terms of the GNU General Public License as published by
7220 # the Free Software Foundation; either version 2 of the License, or
7221 # (at your option) any later version.
7222 #
7223 # This program is distributed in the hope that it will be useful, but
7224 # WITHOUT ANY WARRANTY; without even the implied warranty of
7225 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7226 # General Public License for more details.
7227 #
7228 # You should have received a copy of the GNU General Public License
7229 # along with this program; if not, write to the Free Software
7230 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7231 #
7232 # As a special exception to the GNU General Public License, if you
7233 # distribute this file as part of a program that contains a
7234 # configuration script generated by Autoconf, you may include it under
7235 # the same distribution terms that you use for the rest of that program.
7236
7237 # A sed that does not truncate output.
7238 SED=$lt_SED
7239
7240 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7241 Xsed="${SED} -e s/^X//"
7242
7243 # The HP-UX ksh and POSIX shell print the target directory to stdout
7244 # if CDPATH is set.
7245 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7246
7247 # ### BEGIN LIBTOOL CONFIG
7248
7249 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7250
7251 # Shell to use when invoking shell scripts.
7252 SHELL=$lt_SHELL
7253
7254 # Whether or not to build shared libraries.
7255 build_libtool_libs=$enable_shared
7256
7257 # Whether or not to build static libraries.
7258 build_old_libs=$enable_static
7259
7260 # Whether or not to add -lc for building shared libraries.
7261 build_libtool_need_lc=$need_lc
7262
7263 # Whether or not to optimize for fast installation.
7264 fast_install=$enable_fast_install
7265
7266 # The host system.
7267 host_alias=$host_alias
7268 host=$host
7269
7270 # An echo program that does not interpret backslashes.
7271 echo=$lt_echo
7272
7273 # The archiver.
7274 AR=$lt_AR
7275 AR_FLAGS=$lt_AR_FLAGS
7276
7277 # The default C compiler.
7278 CC=$lt_CC
7279
7280 # Is the compiler the GNU C compiler?
7281 with_gcc=$GCC
7282
7283 # The linker used to build libraries.
7284 LD=$lt_LD
7285
7286 # Whether we need hard or soft links.
7287 LN_S=$lt_LN_S
7288
7289 # A BSD-compatible nm program.
7290 NM=$lt_NM
7291
7292 # A symbol stripping program
7293 STRIP=$STRIP
7294
7295 # Used to examine libraries when file_magic_cmd begins "file"
7296 MAGIC_CMD=$MAGIC_CMD
7297
7298 # Used on cygwin: DLL creation program.
7299 DLLTOOL="$DLLTOOL"
7300
7301 # Used on cygwin: object dumper.
7302 OBJDUMP="$OBJDUMP"
7303
7304 # Used on cygwin: assembler.
7305 AS="$AS"
7306
7307 # The name of the directory that contains temporary libtool files.
7308 objdir=$objdir
7309
7310 # How to create reloadable object files.
7311 reload_flag=$lt_reload_flag
7312 reload_cmds=$lt_reload_cmds
7313
7314 # How to pass a linker flag through the compiler.
7315 wl=$lt_wl
7316
7317 # Object file suffix (normally "o").
7318 objext="$ac_objext"
7319
7320 # Old archive suffix (normally "a").
7321 libext="$libext"
7322
7323 # Executable file suffix (normally "").
7324 exeext="$exeext"
7325
7326 # Additional compiler flags for building library objects.
7327 pic_flag=$lt_pic_flag
7328 pic_mode=$pic_mode
7329
7330 # Does compiler simultaneously support -c and -o options?
7331 compiler_c_o=$lt_compiler_c_o
7332
7333 # Can we write directly to a .lo ?
7334 compiler_o_lo=$lt_compiler_o_lo
7335
7336 # Must we lock files when doing compilation ?
7337 need_locks=$lt_need_locks
7338
7339 # Do we need the lib prefix for modules?
7340 need_lib_prefix=$need_lib_prefix
7341
7342 # Do we need a version for libraries?
7343 need_version=$need_version
7344
7345 # Whether dlopen is supported.
7346 dlopen_support=$enable_dlopen
7347
7348 # Whether dlopen of programs is supported.
7349 dlopen_self=$enable_dlopen_self
7350
7351 # Whether dlopen of statically linked programs is supported.
7352 dlopen_self_static=$enable_dlopen_self_static
7353
7354 # Compiler flag to prevent dynamic linking.
7355 link_static_flag=$lt_link_static_flag
7356
7357 # Compiler flag to turn off builtin functions.
7358 no_builtin_flag=$lt_no_builtin_flag
7359
7360 # Compiler flag to allow reflexive dlopens.
7361 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7362
7363 # Compiler flag to generate shared objects directly from archives.
7364 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7365
7366 # Compiler flag to generate thread-safe objects.
7367 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7368
7369 # Library versioning type.
7370 version_type=$version_type
7371
7372 # Format of library name prefix.
7373 libname_spec=$lt_libname_spec
7374
7375 # List of archive names.  First name is the real one, the rest are links.
7376 # The last name is the one that the linker finds with -lNAME.
7377 library_names_spec=$lt_library_names_spec
7378
7379 # The coded name of the library, if different from the real name.
7380 soname_spec=$lt_soname_spec
7381
7382 # Commands used to build and install an old-style archive.
7383 RANLIB=$lt_RANLIB
7384 old_archive_cmds=$lt_old_archive_cmds
7385 old_postinstall_cmds=$lt_old_postinstall_cmds
7386 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7387
7388 # Create an old-style archive from a shared archive.
7389 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7390
7391 # Create a temporary old-style archive to link instead of a shared archive.
7392 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7393
7394 # Commands used to build and install a shared archive.
7395 archive_cmds=$lt_archive_cmds
7396 archive_expsym_cmds=$lt_archive_expsym_cmds
7397 postinstall_cmds=$lt_postinstall_cmds
7398 postuninstall_cmds=$lt_postuninstall_cmds
7399
7400 # Commands to strip libraries.
7401 old_striplib=$lt_old_striplib
7402 striplib=$lt_striplib
7403
7404 # Method to check whether dependent libraries are shared objects.
7405 deplibs_check_method=$lt_deplibs_check_method
7406
7407 # Command to use when deplibs_check_method == file_magic.
7408 file_magic_cmd=$lt_file_magic_cmd
7409
7410 # Flag that allows shared libraries with undefined symbols to be built.
7411 allow_undefined_flag=$lt_allow_undefined_flag
7412
7413 # Flag that forces no undefined symbols.
7414 no_undefined_flag=$lt_no_undefined_flag
7415
7416 # Commands used to finish a libtool library installation in a directory.
7417 finish_cmds=$lt_finish_cmds
7418
7419 # Same as above, but a single script fragment to be evaled but not shown.
7420 finish_eval=$lt_finish_eval
7421
7422 # Take the output of nm and produce a listing of raw symbols and C names.
7423 global_symbol_pipe=$lt_global_symbol_pipe
7424
7425 # Transform the output of nm in a proper C declaration
7426 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7427
7428 # Transform the output of nm in a C name address pair
7429 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7430
7431 # This is the shared library runtime path variable.
7432 runpath_var=$runpath_var
7433
7434 # This is the shared library path variable.
7435 shlibpath_var=$shlibpath_var
7436
7437 # Is shlibpath searched before the hard-coded library search path?
7438 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7439
7440 # How to hardcode a shared library path into an executable.
7441 hardcode_action=$hardcode_action
7442
7443 # Whether we should hardcode library paths into libraries.
7444 hardcode_into_libs=$hardcode_into_libs
7445
7446 # Flag to hardcode \$libdir into a binary during linking.
7447 # This must work even if \$libdir does not exist.
7448 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7449
7450 # Whether we need a single -rpath flag with a separated argument.
7451 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7452
7453 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7454 # resulting binary.
7455 hardcode_direct=$hardcode_direct
7456
7457 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7458 # resulting binary.
7459 hardcode_minus_L=$hardcode_minus_L
7460
7461 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7462 # the resulting binary.
7463 hardcode_shlibpath_var=$hardcode_shlibpath_var
7464
7465 # Variables whose values should be saved in libtool wrapper scripts and
7466 # restored at relink time.
7467 variables_saved_for_relink="$variables_saved_for_relink"
7468
7469 # Whether libtool must link a program against all its dependency libraries.
7470 link_all_deplibs=$link_all_deplibs
7471
7472 # Compile-time system search path for libraries
7473 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7474
7475 # Run-time system search path for libraries
7476 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7477
7478 # Fix the shell variable \$srcfile for the compiler.
7479 fix_srcfile_path="$fix_srcfile_path"
7480
7481 # Set to yes if exported symbols are required.
7482 always_export_symbols=$always_export_symbols
7483
7484 # The commands to list exported symbols.
7485 export_symbols_cmds=$lt_export_symbols_cmds
7486
7487 # The commands to extract the exported symbol list from a shared archive.
7488 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7489
7490 # Symbols that should not be listed in the preloaded symbols.
7491 exclude_expsyms=$lt_exclude_expsyms
7492
7493 # Symbols that must always be exported.
7494 include_expsyms=$lt_include_expsyms
7495
7496 # ### END LIBTOOL CONFIG
7497
7498 __EOF__
7499
7500   case $host_os in
7501   aix3*)
7502     cat <<\EOF >> "${ofile}T"
7503
7504 # AIX sometimes has problems with the GCC collect2 program.  For some
7505 # reason, if we set the COLLECT_NAMES environment variable, the problems
7506 # vanish in a puff of smoke.
7507 if test "X${COLLECT_NAMES+set}" != Xset; then
7508   COLLECT_NAMES=
7509   export COLLECT_NAMES
7510 fi
7511 EOF
7512     ;;
7513   esac
7514
7515   case $host_os in
7516   cygwin* | mingw* | pw32* | os2*)
7517     cat <<'EOF' >> "${ofile}T"
7518       # This is a source program that is used to create dlls on Windows
7519       # Don't remove nor modify the starting and closing comments
7520 # /* ltdll.c starts here */
7521 # #define WIN32_LEAN_AND_MEAN
7522 # #include <windows.h>
7523 # #undef WIN32_LEAN_AND_MEAN
7524 # #include <stdio.h>
7525 #
7526 # #ifndef __CYGWIN__
7527 # #  ifdef __CYGWIN32__
7528 # #    define __CYGWIN__ __CYGWIN32__
7529 # #  endif
7530 # #endif
7531 #
7532 # #ifdef __cplusplus
7533 # extern "C" {
7534 # #endif
7535 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7536 # #ifdef __cplusplus
7537 # }
7538 # #endif
7539 #
7540 # #ifdef __CYGWIN__
7541 # #include <cygwin/cygwin_dll.h>
7542 # DECLARE_CYGWIN_DLL( DllMain );
7543 # #endif
7544 # HINSTANCE __hDllInstance_base;
7545 #
7546 # BOOL APIENTRY
7547 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7548 # {
7549 #   __hDllInstance_base = hInst;
7550 #   return TRUE;
7551 # }
7552 # /* ltdll.c ends here */
7553         # This is a source program that is used to create import libraries
7554         # on Windows for dlls which lack them. Don't remove nor modify the
7555         # starting and closing comments
7556 # /* impgen.c starts here */
7557 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7558 #
7559 #  This file is part of GNU libtool.
7560 #
7561 #  This program is free software; you can redistribute it and/or modify
7562 #  it under the terms of the GNU General Public License as published by
7563 #  the Free Software Foundation; either version 2 of the License, or
7564 #  (at your option) any later version.
7565 #
7566 #  This program is distributed in the hope that it will be useful,
7567 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7568 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7569 #  GNU General Public License for more details.
7570 #
7571 #  You should have received a copy of the GNU General Public License
7572 #  along with this program; if not, write to the Free Software
7573 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7574 #  */
7575 #
7576 # #include <stdio.h>            /* for printf() */
7577 # #include <unistd.h>           /* for open(), lseek(), read() */
7578 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7579 # #include <string.h>           /* for strdup() */
7580 #
7581 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7582 # #ifndef O_BINARY
7583 # #define O_BINARY 0
7584 # #endif
7585 #
7586 # static unsigned int
7587 # pe_get16 (fd, offset)
7588 #      int fd;
7589 #      int offset;
7590 # {
7591 #   unsigned char b[2];
7592 #   lseek (fd, offset, SEEK_SET);
7593 #   read (fd, b, 2);
7594 #   return b[0] + (b[1]<<8);
7595 # }
7596 #
7597 # static unsigned int
7598 # pe_get32 (fd, offset)
7599 #     int fd;
7600 #     int offset;
7601 # {
7602 #   unsigned char b[4];
7603 #   lseek (fd, offset, SEEK_SET);
7604 #   read (fd, b, 4);
7605 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7606 # }
7607 #
7608 # static unsigned int
7609 # pe_as32 (ptr)
7610 #      void *ptr;
7611 # {
7612 #   unsigned char *b = ptr;
7613 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7614 # }
7615 #
7616 # int
7617 # main (argc, argv)
7618 #     int argc;
7619 #     char *argv[];
7620 # {
7621 #     int dll;
7622 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7623 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7624 #     unsigned long name_rvas, nexp;
7625 #     unsigned char *expdata, *erva;
7626 #     char *filename, *dll_name;
7627 #
7628 #     filename = argv[1];
7629 #
7630 #     dll = open(filename, O_RDONLY|O_BINARY);
7631 #     if (dll < 1)
7632 #       return 1;
7633 #
7634 #     dll_name = filename;
7635 #
7636 #     for (i=0; filename[i]; i++)
7637 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7638 #           dll_name = filename + i +1;
7639 #
7640 #     pe_header_offset = pe_get32 (dll, 0x3c);
7641 #     opthdr_ofs = pe_header_offset + 4 + 20;
7642 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7643 #
7644 #     if (num_entries < 1) /* no exports */
7645 #       return 1;
7646 #
7647 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7648 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7649 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7650 #     secptr = (pe_header_offset + 4 + 20 +
7651 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7652 #
7653 #     expptr = 0;
7654 #     for (i = 0; i < nsections; i++)
7655 #     {
7656 #       char sname[8];
7657 #       unsigned long secptr1 = secptr + 40 * i;
7658 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7659 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7660 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7661 #       lseek(dll, secptr1, SEEK_SET);
7662 #       read(dll, sname, 8);
7663 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7664 #       {
7665 #           expptr = fptr + (export_rva - vaddr);
7666 #           if (export_rva + export_size > vaddr + vsize)
7667 #               export_size = vsize - (export_rva - vaddr);
7668 #           break;
7669 #       }
7670 #     }
7671 #
7672 #     expdata = (unsigned char*)malloc(export_size);
7673 #     lseek (dll, expptr, SEEK_SET);
7674 #     read (dll, expdata, export_size);
7675 #     erva = expdata - export_rva;
7676 #
7677 #     nexp = pe_as32 (expdata+24);
7678 #     name_rvas = pe_as32 (expdata+32);
7679 #
7680 #     printf ("EXPORTS\n");
7681 #     for (i = 0; i<nexp; i++)
7682 #     {
7683 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7684 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7685 #     }
7686 #
7687 #     return 0;
7688 # }
7689 # /* impgen.c ends here */
7690
7691 EOF
7692     ;;
7693   esac
7694
7695   # We use sed instead of cat because bash on DJGPP gets confused if
7696   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7697   # text mode, it properly converts lines to CR/LF.  This bash problem
7698   # is reportedly fixed, but why not run on old versions too?
7699   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7700
7701   mv -f "${ofile}T" "$ofile" || \
7702     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7703   chmod +x "$ofile"
7704 fi
7705
7706
7707
7708
7709
7710 # This can be used to rebuild libtool when needed
7711 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7712
7713 # Always use our own libtool.
7714 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7715
7716 # Prevent multiple expansion
7717
7718
7719
7720 # test for ln hardlink support
7721 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7722 echo "configure:7723: checking whether ln works" >&5
7723 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7724   echo $ac_n "(cached) $ac_c" 1>&6
7725 else
7726   rm -f conftest.src conftest.dst
7727 echo "conftest" > conftest.src
7728 if ln conftest.src conftest.dst 2>/dev/null
7729 then
7730   ol_cv_prog_LN_H="ln"
7731 else
7732   ol_cv_prog_LN_H="cp"
7733 fi
7734 rm -f conftest.src conftest.dst
7735
7736 fi
7737 LN_H="$ol_cv_prog_LN_H"
7738 if test "$ol_cv_prog_LN_H" = "ln"; then
7739         echo "$ac_t""yes" 1>&6
7740 else
7741         echo "$ac_t""no" 1>&6
7742 fi
7743
7744 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7745 echo "configure:7746: checking whether ln -s works" >&5
7746 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7747   echo $ac_n "(cached) $ac_c" 1>&6
7748 else
7749   rm -f conftestdata
7750 if ln -s X conftestdata 2>/dev/null
7751 then
7752   rm -f conftestdata
7753   ac_cv_prog_LN_S="ln -s"
7754 else
7755   ac_cv_prog_LN_S=ln
7756 fi
7757 fi
7758 LN_S="$ac_cv_prog_LN_S"
7759 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7760   echo "$ac_t""yes" 1>&6
7761 else
7762   echo "$ac_t""no" 1>&6
7763 fi
7764
7765
7766 ol_link_perl=no
7767 if test $ol_enable_perl != no ; then
7768         # Extract the first word of "perl", so it can be a program name with args.
7769 set dummy perl; ac_word=$2
7770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7771 echo "configure:7772: checking for $ac_word" >&5
7772 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7773   echo $ac_n "(cached) $ac_c" 1>&6
7774 else
7775   case "$PERLBIN" in
7776   /*)
7777   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7778   ;;
7779   ?:/*)
7780   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7781   ;;
7782   *)
7783   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7784   ac_dummy="$PATH"
7785   for ac_dir in $ac_dummy; do 
7786     test -z "$ac_dir" && ac_dir=.
7787     if test -f $ac_dir/$ac_word; then
7788       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7789       break
7790     fi
7791   done
7792   IFS="$ac_save_ifs"
7793   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7794   ;;
7795 esac
7796 fi
7797 PERLBIN="$ac_cv_path_PERLBIN"
7798 if test -n "$PERLBIN"; then
7799   echo "$ac_t""$PERLBIN" 1>&6
7800 else
7801   echo "$ac_t""no" 1>&6
7802 fi
7803
7804
7805         if test "no$PERLBIN" = "no" ; then
7806                 if test $ol_enable_perl = yes ; then
7807                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7808                 fi
7809
7810         else
7811                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7812                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7813
7814                 if test x"$ol_enable_perl" = "xyes" ; then
7815                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7816                 else
7817                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7818                 fi
7819                                 ol_link_perl=yes
7820         fi
7821 fi
7822
7823 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7824 echo "configure:7825: checking how to run the C preprocessor" >&5
7825 # On Suns, sometimes $CPP names a directory.
7826 if test -n "$CPP" && test -d "$CPP"; then
7827   CPP=
7828 fi
7829 if test -z "$CPP"; then
7830 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7831   echo $ac_n "(cached) $ac_c" 1>&6
7832 else
7833     # This must be in double quotes, not single quotes, because CPP may get
7834   # substituted into the Makefile and "${CC-cc}" will confuse make.
7835   CPP="${CC-cc} -E"
7836   # On the NeXT, cc -E runs the code through the compiler's parser,
7837   # not just through cpp.
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <assert.h>
7842 Syntax Error
7843 EOF
7844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7845 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7847 if test -z "$ac_err"; then
7848   :
7849 else
7850   echo "$ac_err" >&5
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   CPP="${CC-cc} -E -traditional-cpp"
7855   cat > conftest.$ac_ext <<EOF
7856 #line 7857 "configure"
7857 #include "confdefs.h"
7858 #include <assert.h>
7859 Syntax Error
7860 EOF
7861 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7862 { (eval echo configure:7863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7863 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7864 if test -z "$ac_err"; then
7865   :
7866 else
7867   echo "$ac_err" >&5
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   CPP="${CC-cc} -nologo -E"
7872   cat > conftest.$ac_ext <<EOF
7873 #line 7874 "configure"
7874 #include "confdefs.h"
7875 #include <assert.h>
7876 Syntax Error
7877 EOF
7878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7879 { (eval echo configure:7880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7881 if test -z "$ac_err"; then
7882   :
7883 else
7884   echo "$ac_err" >&5
7885   echo "configure: failed program was:" >&5
7886   cat conftest.$ac_ext >&5
7887   rm -rf conftest*
7888   CPP=/lib/cpp
7889 fi
7890 rm -f conftest*
7891 fi
7892 rm -f conftest*
7893 fi
7894 rm -f conftest*
7895   ac_cv_prog_CPP="$CPP"
7896 fi
7897   CPP="$ac_cv_prog_CPP"
7898 else
7899   ac_cv_prog_CPP="$CPP"
7900 fi
7901 echo "$ac_t""$CPP" 1>&6
7902
7903
7904
7905 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7906 echo "configure:7907: checking for Cygwin environment" >&5
7907 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7908   echo $ac_n "(cached) $ac_c" 1>&6
7909 else
7910   cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913
7914 int main() {
7915
7916 #ifndef __CYGWIN__
7917 #define __CYGWIN__ __CYGWIN32__
7918 #endif
7919 return __CYGWIN__;
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7923   rm -rf conftest*
7924   ac_cv_cygwin=yes
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   ac_cv_cygwin=no
7930 fi
7931 rm -f conftest*
7932 fi
7933
7934 echo "$ac_t""$ac_cv_cygwin" 1>&6
7935 CYGWIN=
7936 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7937 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7938 echo "configure:7939: checking for mingw32 environment" >&5
7939 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7940   echo $ac_n "(cached) $ac_c" 1>&6
7941 else
7942   cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945
7946 int main() {
7947 return __MINGW32__;
7948 ; return 0; }
7949 EOF
7950 if { (eval echo configure:7951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7951   rm -rf conftest*
7952   ac_cv_mingw32=yes
7953 else
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   ac_cv_mingw32=no
7958 fi
7959 rm -f conftest*
7960 fi
7961
7962 echo "$ac_t""$ac_cv_mingw32" 1>&6
7963 MINGW32=
7964 test "$ac_cv_mingw32" = yes && MINGW32=yes
7965
7966
7967
7968 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7969 echo "configure:7970: checking for executable suffix" >&5
7970 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7971   echo $ac_n "(cached) $ac_c" 1>&6
7972 else
7973   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7974   ac_cv_exeext=.exe
7975 else
7976   rm -f conftest*
7977   echo 'int main () { return 0; }' > conftest.$ac_ext
7978   ac_cv_exeext=
7979   if { (eval echo configure:7980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7980     for file in conftest.*; do
7981       case $file in
7982       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7983       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7984       esac
7985     done
7986   else
7987     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7988   fi
7989   rm -f conftest*
7990   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7991 fi
7992 fi
7993
7994 EXEEXT=""
7995 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7996 echo "$ac_t""${ac_cv_exeext}" 1>&6
7997 ac_exeext=$EXEEXT
7998
7999 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8000 echo "configure:8001: checking for object suffix" >&5
8001 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   rm -f conftest*
8005 echo 'int i = 1;' > conftest.$ac_ext
8006 if { (eval echo configure:8007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8007   for ac_file in conftest.*; do
8008     case $ac_file in
8009     *.c) ;;
8010     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8011     esac
8012   done
8013 else
8014   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8015 fi
8016 rm -f conftest*
8017 fi
8018
8019 echo "$ac_t""$ac_cv_objext" 1>&6
8020 OBJEXT=$ac_cv_objext
8021 ac_objext=$ac_cv_objext
8022
8023
8024 cat >> confdefs.h <<EOF
8025 #define EXEEXT "${EXEEXT}"
8026 EOF
8027
8028
8029 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8030 echo "configure:8031: checking for be_app in -lbe" >&5
8031 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   ac_save_LIBS="$LIBS"
8036 LIBS="-lbe -lroot -lnet $LIBS"
8037 cat > conftest.$ac_ext <<EOF
8038 #line 8039 "configure"
8039 #include "confdefs.h"
8040 /* Override any gcc2 internal prototype to avoid an error.  */
8041 /* We use char because int might match the return type of a gcc2
8042     builtin and then its argument prototype would still apply.  */
8043 char be_app();
8044
8045 int main() {
8046 be_app()
8047 ; return 0; }
8048 EOF
8049 if { (eval echo configure:8050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8050   rm -rf conftest*
8051   eval "ac_cv_lib_$ac_lib_var=yes"
8052 else
8053   echo "configure: failed program was:" >&5
8054   cat conftest.$ac_ext >&5
8055   rm -rf conftest*
8056   eval "ac_cv_lib_$ac_lib_var=no"
8057 fi
8058 rm -f conftest*
8059 LIBS="$ac_save_LIBS"
8060
8061 fi
8062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8063   echo "$ac_t""yes" 1>&6
8064   LIBS="$LIBS -lbe -lroot -lnet"
8065 else
8066   echo "$ac_t""no" 1>&6
8067 :
8068 fi
8069
8070
8071
8072
8073
8074 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8075 echo "configure:8076: checking for ${CC-cc} option to accept ANSI C" >&5
8076 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8077   echo $ac_n "(cached) $ac_c" 1>&6
8078 else
8079   am_cv_prog_cc_stdc=no
8080 ac_save_CC="$CC"
8081 # Don't try gcc -ansi; that turns off useful extensions and
8082 # breaks some systems' header files.
8083 # AIX                   -qlanglvl=ansi
8084 # Ultrix and OSF/1      -std1
8085 # HP-UX 10.20 and later -Ae
8086 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8087 # SVR4                  -Xc -D__EXTENSIONS__
8088 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8089 do
8090   CC="$ac_save_CC $ac_arg"
8091   cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094 #include <stdarg.h>
8095 #include <stdio.h>
8096 #include <sys/types.h>
8097 #include <sys/stat.h>
8098 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8099 struct buf { int x; };
8100 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8101 static char *e (p, i)
8102      char **p;
8103      int i;
8104 {
8105   return p[i];
8106 }
8107 static char *f (char * (*g) (char **, int), char **p, ...)
8108 {
8109   char *s;
8110   va_list v;
8111   va_start (v,p);
8112   s = g (p, va_arg (v,int));
8113   va_end (v);
8114   return s;
8115 }
8116 int test (int i, double x);
8117 struct s1 {int (*f) (int a);};
8118 struct s2 {int (*f) (double a);};
8119 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8120 int argc;
8121 char **argv;
8122
8123 int main() {
8124
8125 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8126
8127 ; return 0; }
8128 EOF
8129 if { (eval echo configure:8130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8130   rm -rf conftest*
8131   am_cv_prog_cc_stdc="$ac_arg"; break
8132 else
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135 fi
8136 rm -f conftest*
8137 done
8138 CC="$ac_save_CC"
8139
8140 fi
8141
8142 if test -z "$am_cv_prog_cc_stdc"; then
8143   echo "$ac_t""none needed" 1>&6
8144 else
8145   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8146 fi
8147 case "x$am_cv_prog_cc_stdc" in
8148   x|xno) ;;
8149   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8150 esac
8151
8152 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8153         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8154 fi
8155
8156 # test for make depend flag
8157 OL_MKDEP=
8158 OL_MKDEP_FLAGS=
8159 if test -z "${MKDEP}"; then
8160         OL_MKDEP="${CC-cc}"
8161         if test -z "${MKDEP_FLAGS}"; then
8162                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8163 echo "configure:8164: checking for ${OL_MKDEP} depend flag" >&5
8164 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8165   echo $ac_n "(cached) $ac_c" 1>&6
8166 else
8167   
8168                         ol_cv_mkdep=no
8169                         for flag in "-M" "-xM"; do
8170                                 cat > conftest.c <<EOF
8171  noCode;
8172 EOF
8173                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8174                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8175                                 then
8176                                         if test ! -f conftest."${ac_object}" ; then
8177                                                 ol_cv_mkdep=$flag
8178                                                 OL_MKDEP_FLAGS="$flag"
8179                                                 break
8180                                         fi
8181                                 fi
8182                         done
8183                         rm -f conftest*
8184                 
8185 fi
8186
8187 echo "$ac_t""$ol_cv_mkdep" 1>&6
8188         else
8189                 cc_cv_mkdep=yes
8190                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8191         fi
8192 else
8193         cc_cv_mkdep=yes
8194         OL_MKDEP="${MKDEP}"
8195         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8196 fi
8197
8198
8199
8200 if test "${ol_cv_mkdep}" = no ; then
8201         # this will soon become an error
8202         echo "configure: warning: do not know how to generate dependencies" 1>&2
8203 fi
8204
8205 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8206 echo "configure:8207: checking for afopen in -ls" >&5
8207 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8209   echo $ac_n "(cached) $ac_c" 1>&6
8210 else
8211   ac_save_LIBS="$LIBS"
8212 LIBS="-ls  $LIBS"
8213 cat > conftest.$ac_ext <<EOF
8214 #line 8215 "configure"
8215 #include "confdefs.h"
8216 /* Override any gcc2 internal prototype to avoid an error.  */
8217 /* We use char because int might match the return type of a gcc2
8218     builtin and then its argument prototype would still apply.  */
8219 char afopen();
8220
8221 int main() {
8222 afopen()
8223 ; return 0; }
8224 EOF
8225 if { (eval echo configure:8226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8226   rm -rf conftest*
8227   eval "ac_cv_lib_$ac_lib_var=yes"
8228 else
8229   echo "configure: failed program was:" >&5
8230   cat conftest.$ac_ext >&5
8231   rm -rf conftest*
8232   eval "ac_cv_lib_$ac_lib_var=no"
8233 fi
8234 rm -f conftest*
8235 LIBS="$ac_save_LIBS"
8236
8237 fi
8238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8239   echo "$ac_t""yes" 1>&6
8240   
8241         AUTH_LIBS=-ls
8242         cat >> confdefs.h <<\EOF
8243 #define HAVE_AIX_SECURITY 1
8244 EOF
8245
8246
8247 else
8248   echo "$ac_t""no" 1>&6
8249 fi
8250
8251
8252 case "$target" in
8253 *-ibm-openedition)
8254         ac_cv_func_getopt=no
8255         cat >> confdefs.h <<\EOF
8256 #define BOTH_STRINGS_H 1
8257 EOF
8258
8259         ;;
8260 esac
8261
8262 ol_link_modules=no
8263 if test $ol_enable_modules != no ; then
8264         for ac_hdr in ltdl.h
8265 do
8266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8268 echo "configure:8269: checking for $ac_hdr" >&5
8269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8270   echo $ac_n "(cached) $ac_c" 1>&6
8271 else
8272   cat > conftest.$ac_ext <<EOF
8273 #line 8274 "configure"
8274 #include "confdefs.h"
8275 #include <$ac_hdr>
8276 EOF
8277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8278 { (eval echo configure:8279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8280 if test -z "$ac_err"; then
8281   rm -rf conftest*
8282   eval "ac_cv_header_$ac_safe=yes"
8283 else
8284   echo "$ac_err" >&5
8285   echo "configure: failed program was:" >&5
8286   cat conftest.$ac_ext >&5
8287   rm -rf conftest*
8288   eval "ac_cv_header_$ac_safe=no"
8289 fi
8290 rm -f conftest*
8291 fi
8292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8293   echo "$ac_t""yes" 1>&6
8294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8295   cat >> confdefs.h <<EOF
8296 #define $ac_tr_hdr 1
8297 EOF
8298  
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302 done
8303
8304
8305         if test $ac_cv_header_ltdl_h = no ; then
8306                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8307         fi
8308
8309         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8310 echo "configure:8311: checking for lt_dlinit in -lltdl" >&5
8311 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8312 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8313   echo $ac_n "(cached) $ac_c" 1>&6
8314 else
8315   ac_save_LIBS="$LIBS"
8316 LIBS="-lltdl  $LIBS"
8317 cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320 /* Override any gcc2 internal prototype to avoid an error.  */
8321 /* We use char because int might match the return type of a gcc2
8322     builtin and then its argument prototype would still apply.  */
8323 char lt_dlinit();
8324
8325 int main() {
8326 lt_dlinit()
8327 ; return 0; }
8328 EOF
8329 if { (eval echo configure:8330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8330   rm -rf conftest*
8331   eval "ac_cv_lib_$ac_lib_var=yes"
8332 else
8333   echo "configure: failed program was:" >&5
8334   cat conftest.$ac_ext >&5
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=no"
8337 fi
8338 rm -f conftest*
8339 LIBS="$ac_save_LIBS"
8340
8341 fi
8342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8343   echo "$ac_t""yes" 1>&6
8344   
8345                 MODULES_LIBS=-lltdl
8346                 cat >> confdefs.h <<\EOF
8347 #define HAVE_LIBLTDL 1
8348 EOF
8349
8350         
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354
8355
8356         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8357                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8358         fi
8359         ol_link_modules=yes
8360
8361 else
8362         for i in $Backends; do
8363                 eval "ol_tmp=\$ol_enable_$i"
8364                 if test $ol_tmp = mod ; then
8365                         echo "configure: warning: building static $i backend" 1>&2
8366                         eval "ol_enable_$i=yes"
8367                 fi
8368         done
8369         for i in $Overlays; do
8370                 eval "ol_tmp=\$ol_enable_$i"
8371                 if test $ol_tmp = mod ; then
8372                         echo "configure: warning: building static $i overlay" 1>&2
8373                         eval "ol_enable_$i=yes"
8374                 fi
8375         done
8376 fi
8377
8378 # test for EBCDIC
8379 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8380 echo "configure:8381: checking for EBCDIC" >&5
8381 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8382   echo $ac_n "(cached) $ac_c" 1>&6
8383 else
8384   
8385         cat > conftest.$ac_ext <<EOF
8386 #line 8387 "configure"
8387 #include "confdefs.h"
8388
8389 #if !('M' == 0xd4)
8390 #include <__ASCII__/generate_error.h>
8391 #endif
8392
8393 EOF
8394 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8395 { (eval echo configure:8396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8396 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8397 if test -z "$ac_err"; then
8398   rm -rf conftest*
8399   ol_cv_cpp_ebcdic=yes
8400 else
8401   echo "$ac_err" >&5
8402   echo "configure: failed program was:" >&5
8403   cat conftest.$ac_ext >&5
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=no
8406 fi
8407 rm -f conftest*
8408 fi
8409
8410 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8411 if test $ol_cv_cpp_ebcdic = yes ; then
8412         cat >> confdefs.h <<\EOF
8413 #define HAVE_EBCDIC 1
8414 EOF
8415
8416 fi
8417
8418 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8419 echo "configure:8420: checking for ANSI C header files" >&5
8420 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <stdlib.h>
8427 #include <stdarg.h>
8428 #include <string.h>
8429 #include <float.h>
8430 EOF
8431 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8432 { (eval echo configure:8433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8433 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8434 if test -z "$ac_err"; then
8435   rm -rf conftest*
8436   ol_cv_header_stdc=yes
8437 else
8438   echo "$ac_err" >&5
8439   echo "configure: failed program was:" >&5
8440   cat conftest.$ac_ext >&5
8441   rm -rf conftest*
8442   ol_cv_header_stdc=no
8443 fi
8444 rm -f conftest*
8445
8446 if test $ol_cv_header_stdc = yes; then
8447   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8448 cat > conftest.$ac_ext <<EOF
8449 #line 8450 "configure"
8450 #include "confdefs.h"
8451 #include <string.h>
8452 EOF
8453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8454   egrep "memchr" >/dev/null 2>&1; then
8455   :
8456 else
8457   rm -rf conftest*
8458   ol_cv_header_stdc=no
8459 fi
8460 rm -f conftest*
8461
8462 fi
8463
8464 if test $ol_cv_header_stdc = yes; then
8465   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8466 cat > conftest.$ac_ext <<EOF
8467 #line 8468 "configure"
8468 #include "confdefs.h"
8469 #include <stdlib.h>
8470 EOF
8471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8472   egrep "free" >/dev/null 2>&1; then
8473   :
8474 else
8475   rm -rf conftest*
8476   ol_cv_header_stdc=no
8477 fi
8478 rm -f conftest*
8479
8480 fi
8481
8482 if test $ol_cv_header_stdc = yes; then
8483   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8484 if test "$cross_compiling" = yes; then
8485   :
8486 else
8487   cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <ctype.h>
8491 #ifndef HAVE_EBCDIC
8492 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8493 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8494 #else
8495 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8496                 || ('j' <= (c) && (c) <= 'r') \
8497                 || ('s' <= (c) && (c) <= 'z'))
8498 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8499 #endif
8500 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8501 int main () { int i; for (i = 0; i < 256; i++)
8502 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8503 exit (0); }
8504
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8507 then
8508   :
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -fr conftest*
8513   ol_cv_header_stdc=no
8514 fi
8515 rm -fr conftest*
8516 fi
8517
8518 fi
8519 fi
8520
8521 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8522 if test $ol_cv_header_stdc = yes; then
8523   cat >> confdefs.h <<\EOF
8524 #define STDC_HEADERS 1
8525 EOF
8526
8527 fi
8528 ac_cv_header_stdc=disable
8529
8530
8531 if test $ol_cv_header_stdc != yes; then
8532         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8533 fi
8534
8535 ac_header_dirent=no
8536 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8537 do
8538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8539 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8540 echo "configure:8541: checking for $ac_hdr that defines DIR" >&5
8541 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8542   echo $ac_n "(cached) $ac_c" 1>&6
8543 else
8544   cat > conftest.$ac_ext <<EOF
8545 #line 8546 "configure"
8546 #include "confdefs.h"
8547 #include <sys/types.h>
8548 #include <$ac_hdr>
8549 int main() {
8550 DIR *dirp = 0;
8551 ; return 0; }
8552 EOF
8553 if { (eval echo configure:8554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8554   rm -rf conftest*
8555   eval "ac_cv_header_dirent_$ac_safe=yes"
8556 else
8557   echo "configure: failed program was:" >&5
8558   cat conftest.$ac_ext >&5
8559   rm -rf conftest*
8560   eval "ac_cv_header_dirent_$ac_safe=no"
8561 fi
8562 rm -f conftest*
8563 fi
8564 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8565   echo "$ac_t""yes" 1>&6
8566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8567   cat >> confdefs.h <<EOF
8568 #define $ac_tr_hdr 1
8569 EOF
8570  ac_header_dirent=$ac_hdr; break
8571 else
8572   echo "$ac_t""no" 1>&6
8573 fi
8574 done
8575 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8576 if test $ac_header_dirent = dirent.h; then
8577 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8578 echo "configure:8579: checking for opendir in -ldir" >&5
8579 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8580 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8581   echo $ac_n "(cached) $ac_c" 1>&6
8582 else
8583   ac_save_LIBS="$LIBS"
8584 LIBS="-ldir  $LIBS"
8585 cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 /* Override any gcc2 internal prototype to avoid an error.  */
8589 /* We use char because int might match the return type of a gcc2
8590     builtin and then its argument prototype would still apply.  */
8591 char opendir();
8592
8593 int main() {
8594 opendir()
8595 ; return 0; }
8596 EOF
8597 if { (eval echo configure:8598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8598   rm -rf conftest*
8599   eval "ac_cv_lib_$ac_lib_var=yes"
8600 else
8601   echo "configure: failed program was:" >&5
8602   cat conftest.$ac_ext >&5
8603   rm -rf conftest*
8604   eval "ac_cv_lib_$ac_lib_var=no"
8605 fi
8606 rm -f conftest*
8607 LIBS="$ac_save_LIBS"
8608
8609 fi
8610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612   LIBS="$LIBS -ldir"
8613 else
8614   echo "$ac_t""no" 1>&6
8615 fi
8616
8617 else
8618 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8619 echo "configure:8620: checking for opendir in -lx" >&5
8620 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8621 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8622   echo $ac_n "(cached) $ac_c" 1>&6
8623 else
8624   ac_save_LIBS="$LIBS"
8625 LIBS="-lx  $LIBS"
8626 cat > conftest.$ac_ext <<EOF
8627 #line 8628 "configure"
8628 #include "confdefs.h"
8629 /* Override any gcc2 internal prototype to avoid an error.  */
8630 /* We use char because int might match the return type of a gcc2
8631     builtin and then its argument prototype would still apply.  */
8632 char opendir();
8633
8634 int main() {
8635 opendir()
8636 ; return 0; }
8637 EOF
8638 if { (eval echo configure:8639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8639   rm -rf conftest*
8640   eval "ac_cv_lib_$ac_lib_var=yes"
8641 else
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_lib_$ac_lib_var=no"
8646 fi
8647 rm -f conftest*
8648 LIBS="$ac_save_LIBS"
8649
8650 fi
8651 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8652   echo "$ac_t""yes" 1>&6
8653   LIBS="$LIBS -lx"
8654 else
8655   echo "$ac_t""no" 1>&6
8656 fi
8657
8658 fi
8659
8660 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8661 echo "configure:8662: checking for sys/wait.h that is POSIX.1 compatible" >&5
8662 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8663   echo $ac_n "(cached) $ac_c" 1>&6
8664 else
8665   cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 #include <sys/types.h>
8669 #include <sys/wait.h>
8670 #ifndef WEXITSTATUS
8671 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8672 #endif
8673 #ifndef WIFEXITED
8674 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8675 #endif
8676 int main() {
8677 int s;
8678 wait (&s);
8679 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8683   rm -rf conftest*
8684   ac_cv_header_sys_wait_h=yes
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   ac_cv_header_sys_wait_h=no
8690 fi
8691 rm -f conftest*
8692 fi
8693
8694 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8695 if test $ac_cv_header_sys_wait_h = yes; then
8696   cat >> confdefs.h <<\EOF
8697 #define HAVE_SYS_WAIT_H 1
8698 EOF
8699
8700 fi
8701
8702 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8703 echo "configure:8704: checking POSIX termios" >&5
8704 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8705   echo $ac_n "(cached) $ac_c" 1>&6
8706 else
8707   cat > conftest.$ac_ext <<EOF
8708 #line 8709 "configure"
8709 #include "confdefs.h"
8710 #include <sys/types.h>
8711 #include <unistd.h>
8712 #include <termios.h>
8713 int main() {
8714 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8715    tcgetattr(0, 0);
8716 ; return 0; }
8717 EOF
8718 if { (eval echo configure:8719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8719   rm -rf conftest*
8720   am_cv_sys_posix_termios=yes
8721 else
8722   echo "configure: failed program was:" >&5
8723   cat conftest.$ac_ext >&5
8724   rm -rf conftest*
8725   am_cv_sys_posix_termios=no
8726 fi
8727 rm -f conftest*
8728 fi
8729
8730 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8731
8732
8733  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8734 echo "configure:8735: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8735 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8736   echo $ac_n "(cached) $ac_c" 1>&6
8737 else
8738   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8739
8740   gwinsz_in_termios_h=no
8741   if test $am_cv_sys_posix_termios = yes; then
8742     cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <sys/types.h>
8746 #     include <termios.h>
8747 #     ifdef TIOCGWINSZ
8748         yes
8749 #     endif
8750     
8751 EOF
8752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8753   egrep "yes" >/dev/null 2>&1; then
8754   rm -rf conftest*
8755   gwinsz_in_termios_h=yes
8756 fi
8757 rm -f conftest*
8758
8759   fi
8760
8761   if test $gwinsz_in_termios_h = no; then
8762     cat > conftest.$ac_ext <<EOF
8763 #line 8764 "configure"
8764 #include "confdefs.h"
8765 #include <sys/types.h>
8766 #     include <sys/ioctl.h>
8767 #     ifdef TIOCGWINSZ
8768         yes
8769 #     endif
8770     
8771 EOF
8772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8773   egrep "yes" >/dev/null 2>&1; then
8774   rm -rf conftest*
8775   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8776 fi
8777 rm -f conftest*
8778
8779   fi
8780   
8781 fi
8782
8783 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8784   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8785     cat >> confdefs.h <<\EOF
8786 #define GWINSZ_IN_SYS_IOCTL 1
8787 EOF
8788
8789   fi
8790
8791 if test $am_cv_sys_posix_termios = yes ; then
8792         cat >> confdefs.h <<\EOF
8793 #define HAVE_POSIX_TERMIOS 1
8794 EOF
8795
8796 fi
8797
8798 for ac_hdr in \
8799         arpa/inet.h             \
8800         arpa/nameser.h  \
8801         assert.h                \
8802         bits/types.h    \
8803         conio.h                 \
8804         crypt.h                 \
8805         direct.h                \
8806         errno.h                 \
8807         fcntl.h                 \
8808         filio.h                 \
8809         getopt.h                \
8810         grp.h                   \
8811         io.h                    \
8812         libutil.h               \
8813         limits.h                \
8814         locale.h                \
8815         netinet/tcp.h   \
8816         malloc.h                \
8817         memory.h                \
8818         psap.h                  \
8819         pwd.h                   \
8820         process.h               \
8821         resolv.h                \
8822         sgtty.h                 \
8823         shadow.h                \
8824         stddef.h                \
8825         string.h                \
8826         strings.h               \
8827         sysexits.h              \
8828         sys/file.h              \
8829         sys/filio.h             \
8830         sys/errno.h             \
8831         sys/ioctl.h             \
8832         sys/param.h             \
8833         sys/resource.h  \
8834         sys/select.h    \
8835         sys/socket.h    \
8836         sys/stat.h              \
8837         sys/syslog.h    \
8838         sys/time.h              \
8839         sys/types.h             \
8840         sys/ucred.h             \
8841         sys/uio.h               \
8842         syslog.h                \
8843         termios.h               \
8844         unistd.h                \
8845         winsock.h               \
8846         winsock2.h              \
8847
8848 do
8849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8851 echo "configure:8852: checking for $ac_hdr" >&5
8852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 #include <$ac_hdr>
8859 EOF
8860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8861 { (eval echo configure:8862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8863 if test -z "$ac_err"; then
8864   rm -rf conftest*
8865   eval "ac_cv_header_$ac_safe=yes"
8866 else
8867   echo "$ac_err" >&5
8868   echo "configure: failed program was:" >&5
8869   cat conftest.$ac_ext >&5
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=no"
8872 fi
8873 rm -f conftest*
8874 fi
8875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8876   echo "$ac_t""yes" 1>&6
8877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8878   cat >> confdefs.h <<EOF
8879 #define $ac_tr_hdr 1
8880 EOF
8881  
8882 else
8883   echo "$ac_t""no" 1>&6
8884 fi
8885 done
8886
8887
8888
8889
8890 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8891 echo "configure:8892: checking for sigset in -lV3" >&5
8892 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8893 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8894   echo $ac_n "(cached) $ac_c" 1>&6
8895 else
8896   ac_save_LIBS="$LIBS"
8897 LIBS="-lV3  $LIBS"
8898 cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* Override any gcc2 internal prototype to avoid an error.  */
8902 /* We use char because int might match the return type of a gcc2
8903     builtin and then its argument prototype would still apply.  */
8904 char sigset();
8905
8906 int main() {
8907 sigset()
8908 ; return 0; }
8909 EOF
8910 if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8911   rm -rf conftest*
8912   eval "ac_cv_lib_$ac_lib_var=yes"
8913 else
8914   echo "configure: failed program was:" >&5
8915   cat conftest.$ac_ext >&5
8916   rm -rf conftest*
8917   eval "ac_cv_lib_$ac_lib_var=no"
8918 fi
8919 rm -f conftest*
8920 LIBS="$ac_save_LIBS"
8921
8922 fi
8923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8924   echo "$ac_t""yes" 1>&6
8925     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8926     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8927   cat >> confdefs.h <<EOF
8928 #define $ac_tr_lib 1
8929 EOF
8930
8931   LIBS="-lV3 $LIBS"
8932
8933 else
8934   echo "$ac_t""no" 1>&6
8935 fi
8936
8937
8938 if test "$ac_cv_header_winsock_h" = yes; then
8939 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8940 echo "configure:8941: checking for winsock" >&5
8941 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   save_LIBS="$LIBS"
8945 for curlib in ws2_32 wsock32; do
8946         LIBS="$LIBS -l$curlib"
8947         cat > conftest.$ac_ext <<EOF
8948 #line 8949 "configure"
8949 #include "confdefs.h"
8950 #include <winsock.h>
8951                         
8952 int main() {
8953
8954                         socket(0,0,0);
8955                         select(0,NULL,NULL,NULL,NULL);
8956                         closesocket(0);
8957                         gethostname(NULL,0);
8958                         
8959 ; return 0; }
8960 EOF
8961 if { (eval echo configure:8962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8962   rm -rf conftest*
8963   ol_cv_winsock=yes
8964 else
8965   echo "configure: failed program was:" >&5
8966   cat conftest.$ac_ext >&5
8967   rm -rf conftest*
8968   ol_cv_winsock=no
8969 fi
8970 rm -f conftest*
8971
8972         if test $ol_cv_winsock = yes; then
8973                 cat >> confdefs.h <<\EOF
8974 #define HAVE_WINSOCK 1
8975 EOF
8976
8977                 ac_cv_func_socket=yes
8978                 ac_cv_func_select=yes
8979                 ac_cv_func_closesocket=yes
8980                 ac_cv_func_gethostname=yes
8981                 if test $curlib = ws2_32; then
8982                         ol_cv_winsock=winsock2
8983                         cat >> confdefs.h <<\EOF
8984 #define HAVE_WINSOCK2 1
8985 EOF
8986
8987                 fi
8988                 break
8989         fi
8990         LIBS="$save_LIBS"
8991 done
8992 fi
8993
8994 echo "$ac_t""$ol_cv_winsock" 1>&6
8995 fi
8996
8997
8998 echo $ac_n "checking for socket""... $ac_c" 1>&6
8999 echo "configure:9000: checking for socket" >&5
9000 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   cat > conftest.$ac_ext <<EOF
9004 #line 9005 "configure"
9005 #include "confdefs.h"
9006 /* System header to define __stub macros and hopefully few prototypes,
9007     which can conflict with char socket(); below.  */
9008 #include <assert.h>
9009 /* Override any gcc2 internal prototype to avoid an error.  */
9010 /* We use char because int might match the return type of a gcc2
9011     builtin and then its argument prototype would still apply.  */
9012 char socket();
9013 char (*f)();
9014
9015 int main() {
9016
9017 /* The GNU C library defines this for functions which it implements
9018     to always fail with ENOSYS.  Some functions are actually named
9019     something starting with __ and the normal name is an alias.  */
9020 #if defined (__stub_socket) || defined (__stub___socket)
9021 choke me
9022 #else
9023 f = socket;
9024 #endif
9025
9026 ; return 0; }
9027 EOF
9028 if { (eval echo configure:9029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9029   rm -rf conftest*
9030   eval "ac_cv_func_socket=yes"
9031 else
9032   echo "configure: failed program was:" >&5
9033   cat conftest.$ac_ext >&5
9034   rm -rf conftest*
9035   eval "ac_cv_func_socket=no"
9036 fi
9037 rm -f conftest*
9038 fi
9039
9040 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042   :
9043 else
9044   echo "$ac_t""no" 1>&6
9045         
9046         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9047 echo "configure:9048: checking for main in -lsocket" >&5
9048 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9050   echo $ac_n "(cached) $ac_c" 1>&6
9051 else
9052   ac_save_LIBS="$LIBS"
9053 LIBS="-lsocket  $LIBS"
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057
9058 int main() {
9059 main()
9060 ; return 0; }
9061 EOF
9062 if { (eval echo configure:9063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9063   rm -rf conftest*
9064   eval "ac_cv_lib_$ac_lib_var=yes"
9065 else
9066   echo "configure: failed program was:" >&5
9067   cat conftest.$ac_ext >&5
9068   rm -rf conftest*
9069   eval "ac_cv_lib_$ac_lib_var=no"
9070 fi
9071 rm -f conftest*
9072 LIBS="$ac_save_LIBS"
9073
9074 fi
9075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9076   echo "$ac_t""yes" 1>&6
9077     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9078     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9079   cat >> confdefs.h <<EOF
9080 #define $ac_tr_lib 1
9081 EOF
9082
9083   LIBS="-lsocket $LIBS"
9084
9085 else
9086   echo "$ac_t""no" 1>&6
9087 fi
9088
9089         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9090 echo "configure:9091: checking for main in -lnet" >&5
9091 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9092 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9093   echo $ac_n "(cached) $ac_c" 1>&6
9094 else
9095   ac_save_LIBS="$LIBS"
9096 LIBS="-lnet  $LIBS"
9097 cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100
9101 int main() {
9102 main()
9103 ; return 0; }
9104 EOF
9105 if { (eval echo configure:9106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9106   rm -rf conftest*
9107   eval "ac_cv_lib_$ac_lib_var=yes"
9108 else
9109   echo "configure: failed program was:" >&5
9110   cat conftest.$ac_ext >&5
9111   rm -rf conftest*
9112   eval "ac_cv_lib_$ac_lib_var=no"
9113 fi
9114 rm -f conftest*
9115 LIBS="$ac_save_LIBS"
9116
9117 fi
9118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9119   echo "$ac_t""yes" 1>&6
9120     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9121     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9122   cat >> confdefs.h <<EOF
9123 #define $ac_tr_lib 1
9124 EOF
9125
9126   LIBS="-lnet $LIBS"
9127
9128 else
9129   echo "$ac_t""no" 1>&6
9130 fi
9131
9132         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9133 echo "configure:9134: checking for main in -lnsl_s" >&5
9134 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9135 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9136   echo $ac_n "(cached) $ac_c" 1>&6
9137 else
9138   ac_save_LIBS="$LIBS"
9139 LIBS="-lnsl_s  $LIBS"
9140 cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143
9144 int main() {
9145 main()
9146 ; return 0; }
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9149   rm -rf conftest*
9150   eval "ac_cv_lib_$ac_lib_var=yes"
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   eval "ac_cv_lib_$ac_lib_var=no"
9156 fi
9157 rm -f conftest*
9158 LIBS="$ac_save_LIBS"
9159
9160 fi
9161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9162   echo "$ac_t""yes" 1>&6
9163     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9165   cat >> confdefs.h <<EOF
9166 #define $ac_tr_lib 1
9167 EOF
9168
9169   LIBS="-lnsl_s $LIBS"
9170
9171 else
9172   echo "$ac_t""no" 1>&6
9173 fi
9174
9175         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9176 echo "configure:9177: checking for main in -lnsl" >&5
9177 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9179   echo $ac_n "(cached) $ac_c" 1>&6
9180 else
9181   ac_save_LIBS="$LIBS"
9182 LIBS="-lnsl  $LIBS"
9183 cat > conftest.$ac_ext <<EOF
9184 #line 9185 "configure"
9185 #include "confdefs.h"
9186
9187 int main() {
9188 main()
9189 ; return 0; }
9190 EOF
9191 if { (eval echo configure:9192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9192   rm -rf conftest*
9193   eval "ac_cv_lib_$ac_lib_var=yes"
9194 else
9195   echo "configure: failed program was:" >&5
9196   cat conftest.$ac_ext >&5
9197   rm -rf conftest*
9198   eval "ac_cv_lib_$ac_lib_var=no"
9199 fi
9200 rm -f conftest*
9201 LIBS="$ac_save_LIBS"
9202
9203 fi
9204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9207     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9208   cat >> confdefs.h <<EOF
9209 #define $ac_tr_lib 1
9210 EOF
9211
9212   LIBS="-lnsl $LIBS"
9213
9214 else
9215   echo "$ac_t""no" 1>&6
9216 fi
9217
9218         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9219 echo "configure:9220: checking for socket in -linet" >&5
9220 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9221 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9222   echo $ac_n "(cached) $ac_c" 1>&6
9223 else
9224   ac_save_LIBS="$LIBS"
9225 LIBS="-linet  $LIBS"
9226 cat > conftest.$ac_ext <<EOF
9227 #line 9228 "configure"
9228 #include "confdefs.h"
9229 /* Override any gcc2 internal prototype to avoid an error.  */
9230 /* We use char because int might match the return type of a gcc2
9231     builtin and then its argument prototype would still apply.  */
9232 char socket();
9233
9234 int main() {
9235 socket()
9236 ; return 0; }
9237 EOF
9238 if { (eval echo configure:9239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9239   rm -rf conftest*
9240   eval "ac_cv_lib_$ac_lib_var=yes"
9241 else
9242   echo "configure: failed program was:" >&5
9243   cat conftest.$ac_ext >&5
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=no"
9246 fi
9247 rm -f conftest*
9248 LIBS="$ac_save_LIBS"
9249
9250 fi
9251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9252   echo "$ac_t""yes" 1>&6
9253     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9255   cat >> confdefs.h <<EOF
9256 #define $ac_tr_lib 1
9257 EOF
9258
9259   LIBS="-linet $LIBS"
9260
9261 else
9262   echo "$ac_t""no" 1>&6
9263 fi
9264
9265         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9266 echo "configure:9267: checking for main in -lgen" >&5
9267 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9268 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9269   echo $ac_n "(cached) $ac_c" 1>&6
9270 else
9271   ac_save_LIBS="$LIBS"
9272 LIBS="-lgen  $LIBS"
9273 cat > conftest.$ac_ext <<EOF
9274 #line 9275 "configure"
9275 #include "confdefs.h"
9276
9277 int main() {
9278 main()
9279 ; return 0; }
9280 EOF
9281 if { (eval echo configure:9282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9282   rm -rf conftest*
9283   eval "ac_cv_lib_$ac_lib_var=yes"
9284 else
9285   echo "configure: failed program was:" >&5
9286   cat conftest.$ac_ext >&5
9287   rm -rf conftest*
9288   eval "ac_cv_lib_$ac_lib_var=no"
9289 fi
9290 rm -f conftest*
9291 LIBS="$ac_save_LIBS"
9292
9293 fi
9294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9295   echo "$ac_t""yes" 1>&6
9296     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9297     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9298   cat >> confdefs.h <<EOF
9299 #define $ac_tr_lib 1
9300 EOF
9301
9302   LIBS="-lgen $LIBS"
9303
9304 else
9305   echo "$ac_t""no" 1>&6
9306 fi
9307
9308
9309 fi
9310
9311
9312 echo $ac_n "checking for select""... $ac_c" 1>&6
9313 echo "configure:9314: checking for select" >&5
9314 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9315   echo $ac_n "(cached) $ac_c" 1>&6
9316 else
9317   cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 /* System header to define __stub macros and hopefully few prototypes,
9321     which can conflict with char select(); below.  */
9322 #include <assert.h>
9323 /* Override any gcc2 internal prototype to avoid an error.  */
9324 /* We use char because int might match the return type of a gcc2
9325     builtin and then its argument prototype would still apply.  */
9326 char select();
9327 char (*f)();
9328
9329 int main() {
9330
9331 /* The GNU C library defines this for functions which it implements
9332     to always fail with ENOSYS.  Some functions are actually named
9333     something starting with __ and the normal name is an alias.  */
9334 #if defined (__stub_select) || defined (__stub___select)
9335 choke me
9336 #else
9337 f = select;
9338 #endif
9339
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_func_select=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_func_select=no"
9350 fi
9351 rm -f conftest*
9352 fi
9353
9354 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9355   echo "$ac_t""yes" 1>&6
9356   :
9357 else
9358   echo "$ac_t""no" 1>&6
9359 { echo "configure: error: select() required." 1>&2; exit 1; }
9360 fi
9361
9362
9363 if test "${ac_cv_header_winsock_h}" != yes; then
9364                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9365 echo "configure:9366: checking types of arguments for select()" >&5
9366  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9367   echo $ac_n "(cached) $ac_c" 1>&6
9368 else
9369    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9376      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9377       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9378        cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381 #ifdef HAVE_SYS_TYPES_H
9382 #include <sys/types.h>
9383 #endif
9384 #ifdef HAVE_SYS_TIME_H
9385 #include <sys/time.h>
9386 #endif
9387 #ifdef HAVE_SYS_SELECT_H
9388 #include <sys/select.h>
9389 #endif
9390 #ifdef HAVE_SYS_SOCKET_H
9391 #include <sys/socket.h>
9392 #endif
9393 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);
9394 int main() {
9395
9396 ; return 0; }
9397 EOF
9398 if { (eval echo configure:9399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9399   rm -rf conftest*
9400           ac_not_found=no ; break 3
9401 else
9402   echo "configure: failed program was:" >&5
9403   cat conftest.$ac_ext >&5
9404   rm -rf conftest*
9405   ac_not_found=yes
9406 fi
9407 rm -f conftest*
9408       done
9409      done
9410     done
9411    
9412 fi
9413   
9414 fi
9415  
9416 fi
9417  if test "$ac_not_found" = yes; then
9418   ac_cv_func_select_arg1=int 
9419   ac_cv_func_select_arg234='int *' 
9420   ac_cv_func_select_arg5='struct timeval *'
9421  fi
9422  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9423  cat >> confdefs.h <<EOF
9424 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9425 EOF
9426
9427  cat >> confdefs.h <<EOF
9428 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9429 EOF
9430
9431  cat >> confdefs.h <<EOF
9432 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9433 EOF
9434
9435
9436 fi
9437
9438
9439 # strerror checks
9440 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9441 echo "configure:9442: checking declaration of sys_errlist" >&5
9442 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9443   echo $ac_n "(cached) $ac_c" 1>&6
9444 else
9445   
9446         cat > conftest.$ac_ext <<EOF
9447 #line 9448 "configure"
9448 #include "confdefs.h"
9449
9450 #include <stdio.h>
9451 #include <sys/types.h>
9452 #include <errno.h>
9453 #ifdef WINNT
9454 #include <stdlib.h>
9455 #endif 
9456 int main() {
9457 char *c = (char *) *sys_errlist
9458 ; return 0; }
9459 EOF
9460 if { (eval echo configure:9461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9461   rm -rf conftest*
9462   ol_cv_dcl_sys_errlist=yes
9463         ol_cv_have_sys_errlist=yes
9464 else
9465   echo "configure: failed program was:" >&5
9466   cat conftest.$ac_ext >&5
9467   rm -rf conftest*
9468   ol_cv_dcl_sys_errlist=no
9469 fi
9470 rm -f conftest*
9471 fi
9472
9473 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9474 #
9475 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9476 if test $ol_cv_dcl_sys_errlist = no ; then
9477         cat >> confdefs.h <<\EOF
9478 #define DECL_SYS_ERRLIST 1
9479 EOF
9480
9481
9482         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9483 echo "configure:9484: checking existence of sys_errlist" >&5
9484 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9485   echo $ac_n "(cached) $ac_c" 1>&6
9486 else
9487   
9488                 cat > conftest.$ac_ext <<EOF
9489 #line 9490 "configure"
9490 #include "confdefs.h"
9491 #include <errno.h>
9492 int main() {
9493 char *c = (char *) *sys_errlist
9494 ; return 0; }
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9497   rm -rf conftest*
9498   ol_cv_have_sys_errlist=yes
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   ol_cv_have_sys_errlist=no
9504 fi
9505 rm -f conftest*
9506 fi
9507
9508 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9509 fi
9510 if test $ol_cv_have_sys_errlist = yes ; then
9511         cat >> confdefs.h <<\EOF
9512 #define HAVE_SYS_ERRLIST 1
9513 EOF
9514
9515 fi
9516  for ac_func in strerror strerror_r
9517 do
9518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9519 echo "configure:9520: checking for $ac_func" >&5
9520 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9521   echo $ac_n "(cached) $ac_c" 1>&6
9522 else
9523   cat > conftest.$ac_ext <<EOF
9524 #line 9525 "configure"
9525 #include "confdefs.h"
9526 /* System header to define __stub macros and hopefully few prototypes,
9527     which can conflict with char $ac_func(); below.  */
9528 #include <assert.h>
9529 /* Override any gcc2 internal prototype to avoid an error.  */
9530 /* We use char because int might match the return type of a gcc2
9531     builtin and then its argument prototype would still apply.  */
9532 char $ac_func();
9533 char (*f)();
9534
9535 int main() {
9536
9537 /* The GNU C library defines this for functions which it implements
9538     to always fail with ENOSYS.  Some functions are actually named
9539     something starting with __ and the normal name is an alias.  */
9540 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9541 choke me
9542 #else
9543 f = $ac_func;
9544 #endif
9545
9546 ; return 0; }
9547 EOF
9548 if { (eval echo configure:9549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9549   rm -rf conftest*
9550   eval "ac_cv_func_$ac_func=yes"
9551 else
9552   echo "configure: failed program was:" >&5
9553   cat conftest.$ac_ext >&5
9554   rm -rf conftest*
9555   eval "ac_cv_func_$ac_func=no"
9556 fi
9557 rm -f conftest*
9558 fi
9559
9560 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9561   echo "$ac_t""yes" 1>&6
9562     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9563   cat >> confdefs.h <<EOF
9564 #define $ac_tr_func 1
9565 EOF
9566  
9567 else
9568   echo "$ac_t""no" 1>&6
9569 fi
9570 done
9571
9572 ol_cv_func_strerror_r=no
9573 if test "${ac_cv_func_strerror_r}" = yes ; then
9574         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9575 echo "configure:9576: checking non-posix strerror_r" >&5
9576 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9577   echo $ac_n "(cached) $ac_c" 1>&6
9578 else
9579   
9580         cat > conftest.$ac_ext <<EOF
9581 #line 9582 "configure"
9582 #include "confdefs.h"
9583 #include <string.h>
9584 EOF
9585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9586   egrep "strerror_r" >/dev/null 2>&1; then
9587   rm -rf conftest*
9588   ol_decl_strerror_r=yes
9589 else
9590   rm -rf conftest*
9591   ol_decl_strerror_r=no
9592 fi
9593 rm -f conftest*
9594
9595         if test $ol_decl_strerror_r = yes ; then
9596                 cat > conftest.$ac_ext <<EOF
9597 #line 9598 "configure"
9598 #include "confdefs.h"
9599 #include <string.h>
9600 int main() {
9601    /* from autoconf 2.59 */
9602                                 char buf[100];
9603                                 char x = *strerror_r (0, buf, sizeof buf);
9604                                 char *p = strerror_r (0, buf, sizeof buf);
9605                         
9606 ; return 0; }
9607 EOF
9608 if { (eval echo configure:9609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9609   rm -rf conftest*
9610   ol_cv_nonposix_strerror_r=yes
9611 else
9612   echo "configure: failed program was:" >&5
9613   cat conftest.$ac_ext >&5
9614   rm -rf conftest*
9615   ol_cv_nonposix_strerror_r=no
9616 fi
9617 rm -f conftest*
9618         else
9619                 if test "$cross_compiling" = yes; then
9620     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9621 else
9622   cat > conftest.$ac_ext <<EOF
9623 #line 9624 "configure"
9624 #include "confdefs.h"
9625
9626                         main() {
9627                                 char buf[100];
9628                                 buf[0] = 0;
9629                                 strerror_r( 1, buf, sizeof buf );
9630                                 exit( buf[0] == 0 );
9631                         }
9632                         
9633 EOF
9634 if { (eval echo configure:9635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9635 then
9636   ol_cv_nonposix_strerror_r=yes
9637 else
9638   echo "configure: failed program was:" >&5
9639   cat conftest.$ac_ext >&5
9640   rm -fr conftest*
9641   ol_cv_nonposix_strerror=no
9642 fi
9643 rm -fr conftest*
9644 fi
9645
9646         fi
9647         
9648 fi
9649
9650 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9651 if test $ol_cv_nonposix_strerror_r = yes ; then
9652         cat >> confdefs.h <<\EOF
9653 #define HAVE_NONPOSIX_STRERROR_R 1
9654 EOF
9655
9656 fi
9657
9658 elif test "${ac_cv_func_strerror}" = no ; then
9659         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9660 echo "configure:9661: checking declaration of sys_errlist" >&5
9661 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9662   echo $ac_n "(cached) $ac_c" 1>&6
9663 else
9664   
9665         cat > conftest.$ac_ext <<EOF
9666 #line 9667 "configure"
9667 #include "confdefs.h"
9668
9669 #include <stdio.h>
9670 #include <sys/types.h>
9671 #include <errno.h>
9672 #ifdef WINNT
9673 #include <stdlib.h>
9674 #endif 
9675 int main() {
9676 char *c = (char *) *sys_errlist
9677 ; return 0; }
9678 EOF
9679 if { (eval echo configure:9680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9680   rm -rf conftest*
9681   ol_cv_dcl_sys_errlist=yes
9682         ol_cv_have_sys_errlist=yes
9683 else
9684   echo "configure: failed program was:" >&5
9685   cat conftest.$ac_ext >&5
9686   rm -rf conftest*
9687   ol_cv_dcl_sys_errlist=no
9688 fi
9689 rm -f conftest*
9690 fi
9691
9692 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9693 #
9694 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9695 if test $ol_cv_dcl_sys_errlist = no ; then
9696         cat >> confdefs.h <<\EOF
9697 #define DECL_SYS_ERRLIST 1
9698 EOF
9699
9700
9701         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9702 echo "configure:9703: checking existence of sys_errlist" >&5
9703 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   
9707                 cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 #include <errno.h>
9711 int main() {
9712 char *c = (char *) *sys_errlist
9713 ; return 0; }
9714 EOF
9715 if { (eval echo configure:9716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9716   rm -rf conftest*
9717   ol_cv_have_sys_errlist=yes
9718 else
9719   echo "configure: failed program was:" >&5
9720   cat conftest.$ac_ext >&5
9721   rm -rf conftest*
9722   ol_cv_have_sys_errlist=no
9723 fi
9724 rm -f conftest*
9725 fi
9726
9727 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9728 fi
9729 if test $ol_cv_have_sys_errlist = yes ; then
9730         cat >> confdefs.h <<\EOF
9731 #define HAVE_SYS_ERRLIST 1
9732 EOF
9733
9734 fi
9735
9736 fi
9737
9738
9739 for ac_hdr in regex.h 
9740 do
9741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9743 echo "configure:9744: checking for $ac_hdr" >&5
9744 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9745   echo $ac_n "(cached) $ac_c" 1>&6
9746 else
9747   cat > conftest.$ac_ext <<EOF
9748 #line 9749 "configure"
9749 #include "confdefs.h"
9750 #include <$ac_hdr>
9751 EOF
9752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9753 { (eval echo configure:9754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9755 if test -z "$ac_err"; then
9756   rm -rf conftest*
9757   eval "ac_cv_header_$ac_safe=yes"
9758 else
9759   echo "$ac_err" >&5
9760   echo "configure: failed program was:" >&5
9761   cat conftest.$ac_ext >&5
9762   rm -rf conftest*
9763   eval "ac_cv_header_$ac_safe=no"
9764 fi
9765 rm -f conftest*
9766 fi
9767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9768   echo "$ac_t""yes" 1>&6
9769     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9770   cat >> confdefs.h <<EOF
9771 #define $ac_tr_hdr 1
9772 EOF
9773  
9774 else
9775   echo "$ac_t""no" 1>&6
9776 fi
9777 done
9778
9779 if test "$ac_cv_header_regex_h" != yes ; then
9780         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9781 fi
9782
9783 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9784 echo "configure:9785: checking for library containing regfree" >&5
9785 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9786   echo $ac_n "(cached) $ac_c" 1>&6
9787 else
9788   ac_func_search_save_LIBS="$LIBS"
9789 ac_cv_search_regfree="no"
9790 cat > conftest.$ac_ext <<EOF
9791 #line 9792 "configure"
9792 #include "confdefs.h"
9793 /* Override any gcc2 internal prototype to avoid an error.  */
9794 /* We use char because int might match the return type of a gcc2
9795     builtin and then its argument prototype would still apply.  */
9796 char regfree();
9797
9798 int main() {
9799 regfree()
9800 ; return 0; }
9801 EOF
9802 if { (eval echo configure:9803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9803   rm -rf conftest*
9804   ac_cv_search_regfree="none required"
9805 else
9806   echo "configure: failed program was:" >&5
9807   cat conftest.$ac_ext >&5
9808 fi
9809 rm -f conftest*
9810 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9811 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9812 cat > conftest.$ac_ext <<EOF
9813 #line 9814 "configure"
9814 #include "confdefs.h"
9815 /* Override any gcc2 internal prototype to avoid an error.  */
9816 /* We use char because int might match the return type of a gcc2
9817     builtin and then its argument prototype would still apply.  */
9818 char regfree();
9819
9820 int main() {
9821 regfree()
9822 ; return 0; }
9823 EOF
9824 if { (eval echo configure:9825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9825   rm -rf conftest*
9826   ac_cv_search_regfree="-l$ac_lib"
9827 break
9828 else
9829   echo "configure: failed program was:" >&5
9830   cat conftest.$ac_ext >&5
9831 fi
9832 rm -f conftest*
9833 done
9834 LIBS="$ac_func_search_save_LIBS"
9835 fi
9836
9837 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9838 if test "$ac_cv_search_regfree" != "no"; then
9839   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9840   :
9841 else :
9842   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9843 fi
9844
9845
9846 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9847 echo "configure:9848: checking for compatible POSIX regex" >&5
9848 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9849   echo $ac_n "(cached) $ac_c" 1>&6
9850 else
9851   
9852         if test "$cross_compiling" = yes; then
9853   ol_cv_c_posix_regex=cross
9854 else
9855   cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858
9859 #include <sys/types.h>
9860 #include <regex.h>
9861 static char *pattern, *string;
9862 main()
9863 {
9864         int rc;
9865         regex_t re;
9866
9867         pattern = "^A";
9868
9869         if(regcomp(&re, pattern, 0)) {
9870                 return -1;
9871         }
9872         
9873         string = "ALL MATCH";
9874         
9875         rc = regexec(&re, string, 0, (void*)0, 0);
9876
9877         regfree(&re);
9878
9879         return rc;
9880 }
9881 EOF
9882 if { (eval echo configure:9883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9883 then
9884   ol_cv_c_posix_regex=yes
9885 else
9886   echo "configure: failed program was:" >&5
9887   cat conftest.$ac_ext >&5
9888   rm -fr conftest*
9889   ol_cv_c_posix_regex=no
9890 fi
9891 rm -fr conftest*
9892 fi
9893
9894 fi
9895
9896 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9897
9898 if test "$ol_cv_c_posix_regex" = no ; then
9899         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9900 fi
9901
9902
9903 have_uuid=no
9904 for ac_hdr in sys/uuid.h
9905 do
9906 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9907 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9908 echo "configure:9909: checking for $ac_hdr" >&5
9909 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9910   echo $ac_n "(cached) $ac_c" 1>&6
9911 else
9912   cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915 #include <$ac_hdr>
9916 EOF
9917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9918 { (eval echo configure:9919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9920 if test -z "$ac_err"; then
9921   rm -rf conftest*
9922   eval "ac_cv_header_$ac_safe=yes"
9923 else
9924   echo "$ac_err" >&5
9925   echo "configure: failed program was:" >&5
9926   cat conftest.$ac_ext >&5
9927   rm -rf conftest*
9928   eval "ac_cv_header_$ac_safe=no"
9929 fi
9930 rm -f conftest*
9931 fi
9932 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9933   echo "$ac_t""yes" 1>&6
9934     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9935   cat >> confdefs.h <<EOF
9936 #define $ac_tr_hdr 1
9937 EOF
9938  
9939 else
9940   echo "$ac_t""no" 1>&6
9941 fi
9942 done
9943
9944 if test $ac_cv_header_sys_uuid_h = yes ; then
9945         save_LIBS="$LIBS"
9946         
9947 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9948 echo "configure:9949: checking for library containing uuid_to_str" >&5
9949 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   ac_func_search_save_LIBS="$LIBS"
9953 ac_cv_search_uuid_to_str="no"
9954 cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* Override any gcc2 internal prototype to avoid an error.  */
9958 /* We use char because int might match the return type of a gcc2
9959     builtin and then its argument prototype would still apply.  */
9960 char uuid_to_str();
9961
9962 int main() {
9963 uuid_to_str()
9964 ; return 0; }
9965 EOF
9966 if { (eval echo configure:9967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9967   rm -rf conftest*
9968   ac_cv_search_uuid_to_str="none required"
9969 else
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972 fi
9973 rm -f conftest*
9974 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9975 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9976 cat > conftest.$ac_ext <<EOF
9977 #line 9978 "configure"
9978 #include "confdefs.h"
9979 /* Override any gcc2 internal prototype to avoid an error.  */
9980 /* We use char because int might match the return type of a gcc2
9981     builtin and then its argument prototype would still apply.  */
9982 char uuid_to_str();
9983
9984 int main() {
9985 uuid_to_str()
9986 ; return 0; }
9987 EOF
9988 if { (eval echo configure:9989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9989   rm -rf conftest*
9990   ac_cv_search_uuid_to_str="-l$ac_lib"
9991 break
9992 else
9993   echo "configure: failed program was:" >&5
9994   cat conftest.$ac_ext >&5
9995 fi
9996 rm -f conftest*
9997 done
9998 LIBS="$ac_func_search_save_LIBS"
9999 fi
10000
10001 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
10002 if test "$ac_cv_search_uuid_to_str" != "no"; then
10003   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
10004   have_uuid=yes
10005 else :
10006   :
10007 fi
10008         LIBS="$save_LIBS"
10009
10010         if test have_uuid = yes ; then
10011                 cat >> confdefs.h <<\EOF
10012 #define HAVE_UUID_TO_STR 1
10013 EOF
10014
10015
10016                 test "$ac_cv_search_uuid_to_str" = "none required" || \
10017                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
10018         fi
10019 fi
10020
10021 if test $have_uuid = no ; then
10022         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
10023 echo "configure:10024: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
10024         save_LIBS="$LIBS"
10025         LIBS="$LIBS -lrpcrt4"
10026         cat > conftest.$ac_ext <<EOF
10027 #line 10028 "configure"
10028 #include "confdefs.h"
10029
10030                 int __stdcall UuidCreate(void *);
10031                 int __stdcall UuidToStringA(void *,void **);
10032                 
10033 int main() {
10034
10035                 UuidCreate(0);
10036                 UuidToStringA(0,0);
10037                 
10038 ; return 0; }
10039 EOF
10040 if { (eval echo configure:10041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10041   rm -rf conftest*
10042   need_rpcrt=yes
10043 else
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   need_rpcrt=no
10048 fi
10049 rm -f conftest*
10050         if test $need_rpcrt = yes; then
10051                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
10052         fi
10053         LIBS="$save_LIBS"
10054         echo "$ac_t""$need_rpcrt" 1>&6
10055 fi
10056
10057 ol_link_dnssrv=no
10058 echo $ac_n "checking for res_query""... $ac_c" 1>&6
10059 echo "configure:10060: checking for res_query" >&5
10060 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
10061   echo $ac_n "(cached) $ac_c" 1>&6
10062 else
10063   cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066 /* System header to define __stub macros and hopefully few prototypes,
10067     which can conflict with char res_query(); below.  */
10068 #include <assert.h>
10069 /* Override any gcc2 internal prototype to avoid an error.  */
10070 /* We use char because int might match the return type of a gcc2
10071     builtin and then its argument prototype would still apply.  */
10072 char res_query();
10073 char (*f)();
10074
10075 int main() {
10076
10077 /* The GNU C library defines this for functions which it implements
10078     to always fail with ENOSYS.  Some functions are actually named
10079     something starting with __ and the normal name is an alias.  */
10080 #if defined (__stub_res_query) || defined (__stub___res_query)
10081 choke me
10082 #else
10083 f = res_query;
10084 #endif
10085
10086 ; return 0; }
10087 EOF
10088 if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10089   rm -rf conftest*
10090   eval "ac_cv_func_res_query=yes"
10091 else
10092   echo "configure: failed program was:" >&5
10093   cat conftest.$ac_ext >&5
10094   rm -rf conftest*
10095   eval "ac_cv_func_res_query=no"
10096 fi
10097 rm -f conftest*
10098 fi
10099
10100 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10101   echo "$ac_t""yes" 1>&6
10102   :
10103 else
10104   echo "$ac_t""no" 1>&6
10105 fi
10106
10107 if test $ac_cv_func_res_query = no ; then 
10108         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10109 echo "configure:10110: checking for __res_query" >&5
10110 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 /* System header to define __stub macros and hopefully few prototypes,
10117     which can conflict with char __res_query(); below.  */
10118 #include <assert.h>
10119 /* Override any gcc2 internal prototype to avoid an error.  */
10120 /* We use char because int might match the return type of a gcc2
10121     builtin and then its argument prototype would still apply.  */
10122 char __res_query();
10123 char (*f)();
10124
10125 int main() {
10126
10127 /* The GNU C library defines this for functions which it implements
10128     to always fail with ENOSYS.  Some functions are actually named
10129     something starting with __ and the normal name is an alias.  */
10130 #if defined (__stub___res_query) || defined (__stub_____res_query)
10131 choke me
10132 #else
10133 f = __res_query;
10134 #endif
10135
10136 ; return 0; }
10137 EOF
10138 if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10139   rm -rf conftest*
10140   eval "ac_cv_func___res_query=yes"
10141 else
10142   echo "configure: failed program was:" >&5
10143   cat conftest.$ac_ext >&5
10144   rm -rf conftest*
10145   eval "ac_cv_func___res_query=no"
10146 fi
10147 rm -f conftest*
10148 fi
10149
10150 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10151   echo "$ac_t""yes" 1>&6
10152   :
10153 else
10154   echo "$ac_t""no" 1>&6
10155 fi
10156
10157         ac_cv_func_res_query=$ac_cv_func___res_query
10158 fi
10159
10160 if test $ac_cv_func_res_query = no ; then 
10161         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10162 echo "configure:10163: checking for res_query in -lbind" >&5
10163 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10165   echo $ac_n "(cached) $ac_c" 1>&6
10166 else
10167   ac_save_LIBS="$LIBS"
10168 LIBS="-lbind  $LIBS"
10169 cat > conftest.$ac_ext <<EOF
10170 #line 10171 "configure"
10171 #include "confdefs.h"
10172 /* Override any gcc2 internal prototype to avoid an error.  */
10173 /* We use char because int might match the return type of a gcc2
10174     builtin and then its argument prototype would still apply.  */
10175 char res_query();
10176
10177 int main() {
10178 res_query()
10179 ; return 0; }
10180 EOF
10181 if { (eval echo configure:10182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10182   rm -rf conftest*
10183   eval "ac_cv_lib_$ac_lib_var=yes"
10184 else
10185   echo "configure: failed program was:" >&5
10186   cat conftest.$ac_ext >&5
10187   rm -rf conftest*
10188   eval "ac_cv_lib_$ac_lib_var=no"
10189 fi
10190 rm -f conftest*
10191 LIBS="$ac_save_LIBS"
10192
10193 fi
10194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10195   echo "$ac_t""yes" 1>&6
10196     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10197     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10198   cat >> confdefs.h <<EOF
10199 #define $ac_tr_lib 1
10200 EOF
10201
10202   LIBS="-lbind $LIBS"
10203
10204 else
10205   echo "$ac_t""no" 1>&6
10206 fi
10207
10208         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10209 fi
10210
10211 if test $ac_cv_func_res_query = no ; then 
10212         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10213 echo "configure:10214: checking for __res_query in -lbind" >&5
10214 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10215 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   ac_save_LIBS="$LIBS"
10219 LIBS="-lbind  $LIBS"
10220 cat > conftest.$ac_ext <<EOF
10221 #line 10222 "configure"
10222 #include "confdefs.h"
10223 /* Override any gcc2 internal prototype to avoid an error.  */
10224 /* We use char because int might match the return type of a gcc2
10225     builtin and then its argument prototype would still apply.  */
10226 char __res_query();
10227
10228 int main() {
10229 __res_query()
10230 ; return 0; }
10231 EOF
10232 if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10233   rm -rf conftest*
10234   eval "ac_cv_lib_$ac_lib_var=yes"
10235 else
10236   echo "configure: failed program was:" >&5
10237   cat conftest.$ac_ext >&5
10238   rm -rf conftest*
10239   eval "ac_cv_lib_$ac_lib_var=no"
10240 fi
10241 rm -f conftest*
10242 LIBS="$ac_save_LIBS"
10243
10244 fi
10245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10246   echo "$ac_t""yes" 1>&6
10247     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10248     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10249   cat >> confdefs.h <<EOF
10250 #define $ac_tr_lib 1
10251 EOF
10252
10253   LIBS="-lbind $LIBS"
10254
10255 else
10256   echo "$ac_t""no" 1>&6
10257 fi
10258
10259         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10260 fi
10261
10262 if test $ac_cv_func_res_query = no ; then 
10263         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10264 echo "configure:10265: checking for res_query in -lresolv" >&5
10265 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10266 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10267   echo $ac_n "(cached) $ac_c" 1>&6
10268 else
10269   ac_save_LIBS="$LIBS"
10270 LIBS="-lresolv  $LIBS"
10271 cat > conftest.$ac_ext <<EOF
10272 #line 10273 "configure"
10273 #include "confdefs.h"
10274 /* Override any gcc2 internal prototype to avoid an error.  */
10275 /* We use char because int might match the return type of a gcc2
10276     builtin and then its argument prototype would still apply.  */
10277 char res_query();
10278
10279 int main() {
10280 res_query()
10281 ; return 0; }
10282 EOF
10283 if { (eval echo configure:10284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10284   rm -rf conftest*
10285   eval "ac_cv_lib_$ac_lib_var=yes"
10286 else
10287   echo "configure: failed program was:" >&5
10288   cat conftest.$ac_ext >&5
10289   rm -rf conftest*
10290   eval "ac_cv_lib_$ac_lib_var=no"
10291 fi
10292 rm -f conftest*
10293 LIBS="$ac_save_LIBS"
10294
10295 fi
10296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10297   echo "$ac_t""yes" 1>&6
10298     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10299     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10300   cat >> confdefs.h <<EOF
10301 #define $ac_tr_lib 1
10302 EOF
10303
10304   LIBS="-lresolv $LIBS"
10305
10306 else
10307   echo "$ac_t""no" 1>&6
10308 fi
10309
10310         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10311 fi
10312
10313 if test $ac_cv_func_res_query = no ; then 
10314         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10315 echo "configure:10316: checking for __res_query in -lresolv" >&5
10316 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10318   echo $ac_n "(cached) $ac_c" 1>&6
10319 else
10320   ac_save_LIBS="$LIBS"
10321 LIBS="-lresolv  $LIBS"
10322 cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 /* Override any gcc2 internal prototype to avoid an error.  */
10326 /* We use char because int might match the return type of a gcc2
10327     builtin and then its argument prototype would still apply.  */
10328 char __res_query();
10329
10330 int main() {
10331 __res_query()
10332 ; return 0; }
10333 EOF
10334 if { (eval echo configure:10335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10335   rm -rf conftest*
10336   eval "ac_cv_lib_$ac_lib_var=yes"
10337 else
10338   echo "configure: failed program was:" >&5
10339   cat conftest.$ac_ext >&5
10340   rm -rf conftest*
10341   eval "ac_cv_lib_$ac_lib_var=no"
10342 fi
10343 rm -f conftest*
10344 LIBS="$ac_save_LIBS"
10345
10346 fi
10347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10348   echo "$ac_t""yes" 1>&6
10349     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10351   cat >> confdefs.h <<EOF
10352 #define $ac_tr_lib 1
10353 EOF
10354
10355   LIBS="-lresolv $LIBS"
10356
10357 else
10358   echo "$ac_t""no" 1>&6
10359 fi
10360
10361         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10362 fi
10363
10364 if test $ac_cv_func_res_query = no ; then 
10365         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10366 echo "configure:10367: checking for _res_9_query in -lresolv" >&5
10367 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10368 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10369   echo $ac_n "(cached) $ac_c" 1>&6
10370 else
10371   ac_save_LIBS="$LIBS"
10372 LIBS="-lresolv  $LIBS"
10373 cat > conftest.$ac_ext <<EOF
10374 #line 10375 "configure"
10375 #include "confdefs.h"
10376 /* Override any gcc2 internal prototype to avoid an error.  */
10377 /* We use char because int might match the return type of a gcc2
10378     builtin and then its argument prototype would still apply.  */
10379 char _res_9_query();
10380
10381 int main() {
10382 _res_9_query()
10383 ; return 0; }
10384 EOF
10385 if { (eval echo configure:10386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10386   rm -rf conftest*
10387   eval "ac_cv_lib_$ac_lib_var=yes"
10388 else
10389   echo "configure: failed program was:" >&5
10390   cat conftest.$ac_ext >&5
10391   rm -rf conftest*
10392   eval "ac_cv_lib_$ac_lib_var=no"
10393 fi
10394 rm -f conftest*
10395 LIBS="$ac_save_LIBS"
10396
10397 fi
10398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10399   echo "$ac_t""yes" 1>&6
10400     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10401     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10402   cat >> confdefs.h <<EOF
10403 #define $ac_tr_lib 1
10404 EOF
10405
10406   LIBS="-lresolv $LIBS"
10407
10408 else
10409   echo "$ac_t""no" 1>&6
10410 fi
10411
10412         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10413 fi
10414
10415 if test "$ac_cv_func_res_query" = yes ; then
10416         cat >> confdefs.h <<\EOF
10417 #define HAVE_RES_QUERY 1
10418 EOF
10419
10420
10421         if test $ol_enable_dnssrv != no ; then
10422                 ol_link_dnssrv=yes
10423         fi
10424 fi
10425
10426 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10427         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10428 fi
10429
10430 for ac_func in hstrerror 
10431 do
10432 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10433 echo "configure:10434: checking for $ac_func" >&5
10434 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10435   echo $ac_n "(cached) $ac_c" 1>&6
10436 else
10437   cat > conftest.$ac_ext <<EOF
10438 #line 10439 "configure"
10439 #include "confdefs.h"
10440 /* System header to define __stub macros and hopefully few prototypes,
10441     which can conflict with char $ac_func(); below.  */
10442 #include <assert.h>
10443 /* Override any gcc2 internal prototype to avoid an error.  */
10444 /* We use char because int might match the return type of a gcc2
10445     builtin and then its argument prototype would still apply.  */
10446 char $ac_func();
10447 char (*f)();
10448
10449 int main() {
10450
10451 /* The GNU C library defines this for functions which it implements
10452     to always fail with ENOSYS.  Some functions are actually named
10453     something starting with __ and the normal name is an alias.  */
10454 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10455 choke me
10456 #else
10457 f = $ac_func;
10458 #endif
10459
10460 ; return 0; }
10461 EOF
10462 if { (eval echo configure:10463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10463   rm -rf conftest*
10464   eval "ac_cv_func_$ac_func=yes"
10465 else
10466   echo "configure: failed program was:" >&5
10467   cat conftest.$ac_ext >&5
10468   rm -rf conftest*
10469   eval "ac_cv_func_$ac_func=no"
10470 fi
10471 rm -f conftest*
10472 fi
10473
10474 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10475   echo "$ac_t""yes" 1>&6
10476     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10477   cat >> confdefs.h <<EOF
10478 #define $ac_tr_func 1
10479 EOF
10480  
10481 else
10482   echo "$ac_t""no" 1>&6
10483 fi
10484 done
10485
10486
10487 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10488 do
10489 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10490 echo "configure:10491: checking for $ac_func" >&5
10491 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10492   echo $ac_n "(cached) $ac_c" 1>&6
10493 else
10494   cat > conftest.$ac_ext <<EOF
10495 #line 10496 "configure"
10496 #include "confdefs.h"
10497 /* System header to define __stub macros and hopefully few prototypes,
10498     which can conflict with char $ac_func(); below.  */
10499 #include <assert.h>
10500 /* Override any gcc2 internal prototype to avoid an error.  */
10501 /* We use char because int might match the return type of a gcc2
10502     builtin and then its argument prototype would still apply.  */
10503 char $ac_func();
10504 char (*f)();
10505
10506 int main() {
10507
10508 /* The GNU C library defines this for functions which it implements
10509     to always fail with ENOSYS.  Some functions are actually named
10510     something starting with __ and the normal name is an alias.  */
10511 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10512 choke me
10513 #else
10514 f = $ac_func;
10515 #endif
10516
10517 ; return 0; }
10518 EOF
10519 if { (eval echo configure:10520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10520   rm -rf conftest*
10521   eval "ac_cv_func_$ac_func=yes"
10522 else
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   eval "ac_cv_func_$ac_func=no"
10527 fi
10528 rm -f conftest*
10529 fi
10530
10531 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10534   cat >> confdefs.h <<EOF
10535 #define $ac_tr_func 1
10536 EOF
10537  
10538 else
10539   echo "$ac_t""no" 1>&6
10540 fi
10541 done
10542
10543
10544 ol_link_ipv6=no
10545 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10546         if test $ol_enable_ipv6 = yes ; then
10547                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10548         fi
10549 elif test $ol_enable_ipv6 != no ; then
10550         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10551 echo "configure:10552: checking INET6_ADDRSTRLEN" >&5
10552 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10553   echo $ac_n "(cached) $ac_c" 1>&6
10554 else
10555   
10556                 cat > conftest.$ac_ext <<EOF
10557 #line 10558 "configure"
10558 #include "confdefs.h"
10559
10560 #                       include <netinet/in.h>
10561 #                       ifdef INET6_ADDRSTRLEN
10562                                 __has_inet6_addrstrlen__;
10563 #                       endif
10564                 
10565 EOF
10566 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10567   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10568   rm -rf conftest*
10569   ol_cv_inet6_addrstrlen=yes
10570 else
10571   rm -rf conftest*
10572   ol_cv_inet6_addrstrlen=no
10573 fi
10574 rm -f conftest*
10575
10576 fi
10577
10578 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10579
10580
10581         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10582 echo "configure:10583: checking struct sockaddr_storage" >&5
10583 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10584   echo $ac_n "(cached) $ac_c" 1>&6
10585 else
10586   
10587                 cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590
10591 #include <sys/types.h>
10592 #include <sys/socket.h>
10593
10594 int main() {
10595
10596                         struct sockaddr_storage ss;
10597
10598 ; return 0; }
10599 EOF
10600 if { (eval echo configure:10601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10601   rm -rf conftest*
10602   ol_cv_struct_sockaddr_storage=yes
10603 else
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   ol_cv_struct_sockaddr_storage=no
10608 fi
10609 rm -f conftest*
10610 fi
10611
10612 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10613
10614         if test $ol_cv_inet6_addrstrlen = yes \
10615                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10616                 ol_link_ipv6=yes
10617         elif test $ol_enable_ipv6 = yes \
10618                         -a $ol_cv_inet6_addrstrlen = no ; then
10619                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10620         elif test $ol_enable_ipv6 = yes \
10621                         -a $ol_cv_struct_sockaddr_storage = no ; then
10622                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10623         fi
10624 fi
10625
10626 if test $ol_enable_local != no ; then
10627         for ac_hdr in sys/un.h 
10628 do
10629 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10630 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10631 echo "configure:10632: checking for $ac_hdr" >&5
10632 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10633   echo $ac_n "(cached) $ac_c" 1>&6
10634 else
10635   cat > conftest.$ac_ext <<EOF
10636 #line 10637 "configure"
10637 #include "confdefs.h"
10638 #include <$ac_hdr>
10639 EOF
10640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10641 { (eval echo configure:10642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10643 if test -z "$ac_err"; then
10644   rm -rf conftest*
10645   eval "ac_cv_header_$ac_safe=yes"
10646 else
10647   echo "$ac_err" >&5
10648   echo "configure: failed program was:" >&5
10649   cat conftest.$ac_ext >&5
10650   rm -rf conftest*
10651   eval "ac_cv_header_$ac_safe=no"
10652 fi
10653 rm -f conftest*
10654 fi
10655 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10656   echo "$ac_t""yes" 1>&6
10657     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10658   cat >> confdefs.h <<EOF
10659 #define $ac_tr_hdr 1
10660 EOF
10661  
10662 else
10663   echo "$ac_t""no" 1>&6
10664 fi
10665 done
10666
10667
10668         if test $ol_enable_local = auto ; then
10669                 ol_enable_local=$ac_cv_header_sys_un_h
10670         elif test $ac_cv_header_sys_un_h = no ; then
10671                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10672         fi
10673 fi
10674
10675 ol_link_kbind=no
10676 ol_link_krb5=no
10677 ol_link_krb4=no
10678
10679 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10680         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10681         -o $ol_with_kerberos = k425 ; then
10682
10683         for ac_hdr in krb5.h
10684 do
10685 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10686 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10687 echo "configure:10688: checking for $ac_hdr" >&5
10688 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10689   echo $ac_n "(cached) $ac_c" 1>&6
10690 else
10691   cat > conftest.$ac_ext <<EOF
10692 #line 10693 "configure"
10693 #include "confdefs.h"
10694 #include <$ac_hdr>
10695 EOF
10696 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10697 { (eval echo configure:10698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10698 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10699 if test -z "$ac_err"; then
10700   rm -rf conftest*
10701   eval "ac_cv_header_$ac_safe=yes"
10702 else
10703   echo "$ac_err" >&5
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -rf conftest*
10707   eval "ac_cv_header_$ac_safe=no"
10708 fi
10709 rm -f conftest*
10710 fi
10711 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10712   echo "$ac_t""yes" 1>&6
10713     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10714   cat >> confdefs.h <<EOF
10715 #define $ac_tr_hdr 1
10716 EOF
10717  
10718 else
10719   echo "$ac_t""no" 1>&6
10720 fi
10721 done
10722
10723
10724         if test $ac_cv_header_krb5_h = yes ; then
10725                                 for ac_hdr in heim_err.h
10726 do
10727 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10728 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10729 echo "configure:10730: checking for $ac_hdr" >&5
10730 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10731   echo $ac_n "(cached) $ac_c" 1>&6
10732 else
10733   cat > conftest.$ac_ext <<EOF
10734 #line 10735 "configure"
10735 #include "confdefs.h"
10736 #include <$ac_hdr>
10737 EOF
10738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10739 { (eval echo configure:10740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10741 if test -z "$ac_err"; then
10742   rm -rf conftest*
10743   eval "ac_cv_header_$ac_safe=yes"
10744 else
10745   echo "$ac_err" >&5
10746   echo "configure: failed program was:" >&5
10747   cat conftest.$ac_ext >&5
10748   rm -rf conftest*
10749   eval "ac_cv_header_$ac_safe=no"
10750 fi
10751 rm -f conftest*
10752 fi
10753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10754   echo "$ac_t""yes" 1>&6
10755     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10756   cat >> confdefs.h <<EOF
10757 #define $ac_tr_hdr 1
10758 EOF
10759  
10760 else
10761   echo "$ac_t""no" 1>&6
10762 fi
10763 done
10764
10765                 if test $ac_cv_header_heim_err_h = yes ; then
10766                         krb5_impl=heimdal
10767                 else
10768                         krb5_impl=mit
10769                 fi
10770
10771                 if test $krb5_impl = mit; then
10772                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10773 echo "configure:10774: checking for main in -lk5crypto" >&5
10774 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10775 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10776   echo $ac_n "(cached) $ac_c" 1>&6
10777 else
10778   ac_save_LIBS="$LIBS"
10779 LIBS="-lk5crypto  $LIBS"
10780 cat > conftest.$ac_ext <<EOF
10781 #line 10782 "configure"
10782 #include "confdefs.h"
10783
10784 int main() {
10785 main()
10786 ; return 0; }
10787 EOF
10788 if { (eval echo configure:10789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10789   rm -rf conftest*
10790   eval "ac_cv_lib_$ac_lib_var=yes"
10791 else
10792   echo "configure: failed program was:" >&5
10793   cat conftest.$ac_ext >&5
10794   rm -rf conftest*
10795   eval "ac_cv_lib_$ac_lib_var=no"
10796 fi
10797 rm -f conftest*
10798 LIBS="$ac_save_LIBS"
10799
10800 fi
10801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10802   echo "$ac_t""yes" 1>&6
10803   krb5crypto=k5crypto
10804 else
10805   echo "$ac_t""no" 1>&6
10806 krb5crypto=crypto
10807 fi
10808
10809
10810                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10811 echo "configure:10812: checking for main in -lkrb5" >&5
10812 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10813 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   ac_save_LIBS="$LIBS"
10817 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10818 cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821
10822 int main() {
10823 main()
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_krb5=yes
10842                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10843 else
10844   echo "$ac_t""no" 1>&6
10845 have_krb5=no
10846 fi
10847
10848
10849                 elif test $krb5_impl = heimdal; then
10850                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10851 echo "configure:10852: checking for main in -ldes" >&5
10852 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10853 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10854   echo $ac_n "(cached) $ac_c" 1>&6
10855 else
10856   ac_save_LIBS="$LIBS"
10857 LIBS="-ldes  $LIBS"
10858 cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861
10862 int main() {
10863 main()
10864 ; return 0; }
10865 EOF
10866 if { (eval echo configure:10867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10867   rm -rf conftest*
10868   eval "ac_cv_lib_$ac_lib_var=yes"
10869 else
10870   echo "configure: failed program was:" >&5
10871   cat conftest.$ac_ext >&5
10872   rm -rf conftest*
10873   eval "ac_cv_lib_$ac_lib_var=no"
10874 fi
10875 rm -f conftest*
10876 LIBS="$ac_save_LIBS"
10877
10878 fi
10879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10880   echo "$ac_t""yes" 1>&6
10881   krb5crypto=des
10882 else
10883   echo "$ac_t""no" 1>&6
10884 krb5crypto=crypto
10885 fi
10886
10887
10888                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10889 echo "configure:10890: checking for main in -lkrb5" >&5
10890 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10892   echo $ac_n "(cached) $ac_c" 1>&6
10893 else
10894   ac_save_LIBS="$LIBS"
10895 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10896 cat > conftest.$ac_ext <<EOF
10897 #line 10898 "configure"
10898 #include "confdefs.h"
10899
10900 int main() {
10901 main()
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_lib_$ac_lib_var=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_lib_$ac_lib_var=no"
10912 fi
10913 rm -f conftest*
10914 LIBS="$ac_save_LIBS"
10915
10916 fi
10917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10918   echo "$ac_t""yes" 1>&6
10919   have_krb5=yes
10920                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10921 else
10922   echo "$ac_t""no" 1>&6
10923 have_krb5=no
10924 fi
10925
10926
10927                         cat >> confdefs.h <<\EOF
10928 #define HAVE_HEIMDAL_KERBEROS 1
10929 EOF
10930
10931
10932                 else
10933                         have_krb5=no
10934                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10935                 fi
10936
10937                 if test $have_krb5 = yes ; then
10938                         ol_link_krb5=yes
10939
10940                         cat >> confdefs.h <<\EOF
10941 #define HAVE_KRB5 1
10942 EOF
10943
10944
10945                         if test $ol_with_kerberos = k5only ; then
10946                                 ol_with_kerberos=found
10947                         fi
10948
10949                 elif test $ol_with_kerberos != auto ; then
10950                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10951                 fi
10952
10953         fi
10954 fi
10955
10956 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10957         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10958
10959         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10960 do
10961 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10962 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10963 echo "configure:10964: checking for $ac_hdr" >&5
10964 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10965   echo $ac_n "(cached) $ac_c" 1>&6
10966 else
10967   cat > conftest.$ac_ext <<EOF
10968 #line 10969 "configure"
10969 #include "confdefs.h"
10970 #include <$ac_hdr>
10971 EOF
10972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10973 { (eval echo configure:10974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10975 if test -z "$ac_err"; then
10976   rm -rf conftest*
10977   eval "ac_cv_header_$ac_safe=yes"
10978 else
10979   echo "$ac_err" >&5
10980   echo "configure: failed program was:" >&5
10981   cat conftest.$ac_ext >&5
10982   rm -rf conftest*
10983   eval "ac_cv_header_$ac_safe=no"
10984 fi
10985 rm -f conftest*
10986 fi
10987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10988   echo "$ac_t""yes" 1>&6
10989     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10990   cat >> confdefs.h <<EOF
10991 #define $ac_tr_hdr 1
10992 EOF
10993  
10994 else
10995   echo "$ac_t""no" 1>&6
10996 fi
10997 done
10998
10999
11000         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
11001                 if test $krb5_impl = mit; then
11002                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11003 echo "configure:11004: checking for main in -lkrb4" >&5
11004 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11006   echo $ac_n "(cached) $ac_c" 1>&6
11007 else
11008   ac_save_LIBS="$LIBS"
11009 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
11010 cat > conftest.$ac_ext <<EOF
11011 #line 11012 "configure"
11012 #include "confdefs.h"
11013
11014 int main() {
11015 main()
11016 ; return 0; }
11017 EOF
11018 if { (eval echo configure:11019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11019   rm -rf conftest*
11020   eval "ac_cv_lib_$ac_lib_var=yes"
11021 else
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024   rm -rf conftest*
11025   eval "ac_cv_lib_$ac_lib_var=no"
11026 fi
11027 rm -f conftest*
11028 LIBS="$ac_save_LIBS"
11029
11030 fi
11031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11032   echo "$ac_t""yes" 1>&6
11033   have_k425=yes
11034                                 KRB4_LIBS="-lkrb4 -ldes425"
11035 else
11036   echo "$ac_t""no" 1>&6
11037 have_k425=no
11038 fi
11039
11040
11041                 elif test $krb5_impl = heimdal; then
11042                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
11043 echo "configure:11044: checking for main in -lkrb4" >&5
11044 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
11045 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11046   echo $ac_n "(cached) $ac_c" 1>&6
11047 else
11048   ac_save_LIBS="$LIBS"
11049 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
11050 cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053
11054 int main() {
11055 main()
11056 ; return 0; }
11057 EOF
11058 if { (eval echo configure:11059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11059   rm -rf conftest*
11060   eval "ac_cv_lib_$ac_lib_var=yes"
11061 else
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   eval "ac_cv_lib_$ac_lib_var=no"
11066 fi
11067 rm -f conftest*
11068 LIBS="$ac_save_LIBS"
11069
11070 fi
11071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11072   echo "$ac_t""yes" 1>&6
11073   have_k425=yes
11074                                 KRB4_LIBS="-lkrb4"
11075 else
11076   echo "$ac_t""no" 1>&6
11077 have_k425=no
11078 fi
11079
11080
11081                 else
11082                         have_425=no
11083                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
11084                 fi
11085
11086                 if test $have_k425 = yes ; then
11087                         ol_with_kerberos=found
11088                         ol_link_krb4=yes
11089
11090                         cat >> confdefs.h <<\EOF
11091 #define HAVE_KRB425 1
11092 EOF
11093
11094                         cat >> confdefs.h <<\EOF
11095 #define HAVE_KRB4 1
11096 EOF
11097
11098
11099                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
11100 echo "configure:11101: checking for des_debug in Kerberos libraries" >&5
11101 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
11102   echo $ac_n "(cached) $ac_c" 1>&6
11103 else
11104   
11105                                                                 save_LIBS="$LIBS"
11106                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
11107                                 cat > conftest.$ac_ext <<EOF
11108 #line 11109 "configure"
11109 #include "confdefs.h"
11110
11111 #include <kerberosIV/krb.h>
11112 #include <kerberosIV/des.h>
11113 extern int des_debug;
11114
11115 int main() {
11116
11117 des_debug = 1;
11118
11119 ; return 0; }
11120 EOF
11121 if { (eval echo configure:11122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11122   rm -rf conftest*
11123   ol_cv_var_des_debug=yes
11124 else
11125   echo "configure: failed program was:" >&5
11126   cat conftest.$ac_ext >&5
11127   rm -rf conftest*
11128   ol_cv_var_des_debug=no
11129 fi
11130 rm -f conftest*
11131                                                                 LIBS="$save_LIBS"
11132                         
11133 fi
11134
11135 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11136
11137                         if test $ol_cv_var_des_debug = yes ; then
11138                                 cat >> confdefs.h <<\EOF
11139 #define HAVE_DES_DEBUG 1
11140 EOF
11141
11142                         fi
11143
11144                         LIBS="$save_LIBS"
11145                 fi
11146         fi
11147 fi
11148
11149 if test $ol_link_krb5 = yes ; then
11150         ol_with_kerberos=found
11151 fi
11152
11153 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11154         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11155
11156         for ac_hdr in krb.h des.h krb-archaeology.h 
11157 do
11158 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11159 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11160 echo "configure:11161: checking for $ac_hdr" >&5
11161 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11162   echo $ac_n "(cached) $ac_c" 1>&6
11163 else
11164   cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 #include <$ac_hdr>
11168 EOF
11169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11170 { (eval echo configure:11171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11172 if test -z "$ac_err"; then
11173   rm -rf conftest*
11174   eval "ac_cv_header_$ac_safe=yes"
11175 else
11176   echo "$ac_err" >&5
11177   echo "configure: failed program was:" >&5
11178   cat conftest.$ac_ext >&5
11179   rm -rf conftest*
11180   eval "ac_cv_header_$ac_safe=no"
11181 fi
11182 rm -f conftest*
11183 fi
11184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11185   echo "$ac_t""yes" 1>&6
11186     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11187   cat >> confdefs.h <<EOF
11188 #define $ac_tr_hdr 1
11189 EOF
11190  
11191 else
11192   echo "$ac_t""no" 1>&6
11193 fi
11194 done
11195
11196
11197         if test $ac_cv_header_krb_h = yes ; then
11198                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11199 echo "configure:11200: checking for main in -lkrb" >&5
11200 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11202   echo $ac_n "(cached) $ac_c" 1>&6
11203 else
11204   ac_save_LIBS="$LIBS"
11205 LIBS="-lkrb -ldes $LIBS"
11206 cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209
11210 int main() {
11211 main()
11212 ; return 0; }
11213 EOF
11214 if { (eval echo configure:11215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11215   rm -rf conftest*
11216   eval "ac_cv_lib_$ac_lib_var=yes"
11217 else
11218   echo "configure: failed program was:" >&5
11219   cat conftest.$ac_ext >&5
11220   rm -rf conftest*
11221   eval "ac_cv_lib_$ac_lib_var=no"
11222 fi
11223 rm -f conftest*
11224 LIBS="$ac_save_LIBS"
11225
11226 fi
11227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11228   echo "$ac_t""yes" 1>&6
11229   have_k4=yes
11230 else
11231   echo "$ac_t""no" 1>&6
11232 have_k4=no
11233 fi
11234
11235
11236                 if test $have_k4 = yes ; then
11237                         ol_with_kerberos=found
11238                         ol_link_krb4=yes
11239
11240                         cat >> confdefs.h <<\EOF
11241 #define HAVE_KRB4 1
11242 EOF
11243
11244
11245                         KRB4_LIBS="-lkrb -ldes"
11246
11247                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11248                                 cat >> confdefs.h <<\EOF
11249 #define HAVE_KTH_KERBEROS 1
11250 EOF
11251
11252                         fi
11253                 fi
11254         fi
11255 fi
11256
11257 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11258         ol_link_kbind=yes
11259
11260 elif test $ol_enable_kbind = yes ; then
11261         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11262 fi
11263
11264 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11265         cat >> confdefs.h <<\EOF
11266 #define HAVE_KERBEROS 1
11267 EOF
11268
11269
11270 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11271         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11272 fi
11273
11274 ol_link_tls=no
11275 if test $ol_with_tls != no ; then
11276         for ac_hdr in openssl/ssl.h ssl.h
11277 do
11278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11280 echo "configure:11281: checking for $ac_hdr" >&5
11281 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11282   echo $ac_n "(cached) $ac_c" 1>&6
11283 else
11284   cat > conftest.$ac_ext <<EOF
11285 #line 11286 "configure"
11286 #include "confdefs.h"
11287 #include <$ac_hdr>
11288 EOF
11289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11290 { (eval echo configure:11291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11292 if test -z "$ac_err"; then
11293   rm -rf conftest*
11294   eval "ac_cv_header_$ac_safe=yes"
11295 else
11296   echo "$ac_err" >&5
11297   echo "configure: failed program was:" >&5
11298   cat conftest.$ac_ext >&5
11299   rm -rf conftest*
11300   eval "ac_cv_header_$ac_safe=no"
11301 fi
11302 rm -f conftest*
11303 fi
11304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11305   echo "$ac_t""yes" 1>&6
11306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11307   cat >> confdefs.h <<EOF
11308 #define $ac_tr_hdr 1
11309 EOF
11310  
11311 else
11312   echo "$ac_t""no" 1>&6
11313 fi
11314 done
11315
11316         
11317         if test $ac_cv_header_openssl_ssl_h = yes \
11318                 -o $ac_cv_header_ssl_h = yes ; then
11319                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11320 echo "configure:11321: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11321 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11322 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11323   echo $ac_n "(cached) $ac_c" 1>&6
11324 else
11325   ac_save_LIBS="$LIBS"
11326 LIBS="-lssl -lcrypto $LIBS"
11327 cat > conftest.$ac_ext <<EOF
11328 #line 11329 "configure"
11329 #include "confdefs.h"
11330 /* Override any gcc2 internal prototype to avoid an error.  */
11331 /* We use char because int might match the return type of a gcc2
11332     builtin and then its argument prototype would still apply.  */
11333 char SSLeay_add_ssl_algorithms();
11334
11335 int main() {
11336 SSLeay_add_ssl_algorithms()
11337 ; return 0; }
11338 EOF
11339 if { (eval echo configure:11340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11340   rm -rf conftest*
11341   eval "ac_cv_lib_$ac_lib_var=yes"
11342 else
11343   echo "configure: failed program was:" >&5
11344   cat conftest.$ac_ext >&5
11345   rm -rf conftest*
11346   eval "ac_cv_lib_$ac_lib_var=no"
11347 fi
11348 rm -f conftest*
11349 LIBS="$ac_save_LIBS"
11350
11351 fi
11352 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11353   echo "$ac_t""yes" 1>&6
11354   have_ssleay=yes
11355                         need_rsaref=no
11356 else
11357   echo "$ac_t""no" 1>&6
11358 have_ssleay=no
11359 fi
11360
11361                         
11362                 if test $have_ssleay = no ; then
11363                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11364 echo "configure:11365: checking for SSL_library_init in -lssl" >&5
11365 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11366 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11367   echo $ac_n "(cached) $ac_c" 1>&6
11368 else
11369   ac_save_LIBS="$LIBS"
11370 LIBS="-lssl -lcrypto $LIBS"
11371 cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 /* Override any gcc2 internal prototype to avoid an error.  */
11375 /* We use char because int might match the return type of a gcc2
11376     builtin and then its argument prototype would still apply.  */
11377 char SSL_library_init();
11378
11379 int main() {
11380 SSL_library_init()
11381 ; return 0; }
11382 EOF
11383 if { (eval echo configure:11384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11384   rm -rf conftest*
11385   eval "ac_cv_lib_$ac_lib_var=yes"
11386 else
11387   echo "configure: failed program was:" >&5
11388   cat conftest.$ac_ext >&5
11389   rm -rf conftest*
11390   eval "ac_cv_lib_$ac_lib_var=no"
11391 fi
11392 rm -f conftest*
11393 LIBS="$ac_save_LIBS"
11394
11395 fi
11396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11397   echo "$ac_t""yes" 1>&6
11398   have_ssleay=yes
11399                                 need_rsaref=no
11400 else
11401   echo "$ac_t""no" 1>&6
11402 have_ssleay=no
11403 fi
11404
11405                 fi
11406
11407                 if test $have_ssleay = no ; then
11408                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11409 echo "configure:11410: checking for ssl3_accept in -lssl" >&5
11410 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11412   echo $ac_n "(cached) $ac_c" 1>&6
11413 else
11414   ac_save_LIBS="$LIBS"
11415 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11416 cat > conftest.$ac_ext <<EOF
11417 #line 11418 "configure"
11418 #include "confdefs.h"
11419 /* Override any gcc2 internal prototype to avoid an error.  */
11420 /* We use char because int might match the return type of a gcc2
11421     builtin and then its argument prototype would still apply.  */
11422 char ssl3_accept();
11423
11424 int main() {
11425 ssl3_accept()
11426 ; return 0; }
11427 EOF
11428 if { (eval echo configure:11429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11429   rm -rf conftest*
11430   eval "ac_cv_lib_$ac_lib_var=yes"
11431 else
11432   echo "configure: failed program was:" >&5
11433   cat conftest.$ac_ext >&5
11434   rm -rf conftest*
11435   eval "ac_cv_lib_$ac_lib_var=no"
11436 fi
11437 rm -f conftest*
11438 LIBS="$ac_save_LIBS"
11439
11440 fi
11441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11442   echo "$ac_t""yes" 1>&6
11443   have_ssleay=yes
11444                                 need_rsaref=yes
11445 else
11446   echo "$ac_t""no" 1>&6
11447 have_ssleay=no
11448 fi
11449
11450                 fi
11451
11452                 if test $have_ssleay = yes ; then
11453                         ol_with_tls=found
11454                         ol_link_tls=yes
11455
11456                         cat >> confdefs.h <<\EOF
11457 #define HAVE_SSLEAY 1
11458 EOF
11459
11460
11461                         if test $need_rsaref = yes; then
11462                                 cat >> confdefs.h <<\EOF
11463 #define HAVE_RSAREF 1
11464 EOF
11465
11466
11467                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11468                         else
11469                                 TLS_LIBS="-lssl -lcrypto"
11470                         fi
11471                 fi
11472         fi
11473
11474 else
11475         echo "configure: warning: TLS data protection not supported!" 1>&2
11476 fi
11477
11478 WITH_TLS=no
11479 if test $ol_link_tls = yes ; then
11480         cat >> confdefs.h <<\EOF
11481 #define HAVE_TLS 1
11482 EOF
11483
11484         WITH_TLS=yes
11485
11486 elif test $ol_with_tls = auto ; then
11487         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11488         echo "configure: warning: TLS data protection not supported!" 1>&2
11489
11490 elif test $ol_with_tls != no ; then
11491         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11492 fi
11493
11494 if test $ol_enable_lmpasswd != no; then
11495         if test $ol_link_tls != yes ; then
11496                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11497         fi
11498
11499         cat >> confdefs.h <<\EOF
11500 #define SLAPD_LMHASH 1
11501 EOF
11502
11503 fi
11504
11505 ol_link_threads=no
11506
11507 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11508         -o $ol_with_threads = nt ; then
11509
11510         
11511         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11512 echo "configure:11513: checking for _beginthread" >&5
11513 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11514   echo $ac_n "(cached) $ac_c" 1>&6
11515 else
11516   cat > conftest.$ac_ext <<EOF
11517 #line 11518 "configure"
11518 #include "confdefs.h"
11519 /* System header to define __stub macros and hopefully few prototypes,
11520     which can conflict with char _beginthread(); below.  */
11521 #include <assert.h>
11522 /* Override any gcc2 internal prototype to avoid an error.  */
11523 /* We use char because int might match the return type of a gcc2
11524     builtin and then its argument prototype would still apply.  */
11525 char _beginthread();
11526 char (*f)();
11527
11528 int main() {
11529
11530 /* The GNU C library defines this for functions which it implements
11531     to always fail with ENOSYS.  Some functions are actually named
11532     something starting with __ and the normal name is an alias.  */
11533 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11534 choke me
11535 #else
11536 f = _beginthread;
11537 #endif
11538
11539 ; return 0; }
11540 EOF
11541 if { (eval echo configure:11542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11542   rm -rf conftest*
11543   eval "ac_cv_func__beginthread=yes"
11544 else
11545   echo "configure: failed program was:" >&5
11546   cat conftest.$ac_ext >&5
11547   rm -rf conftest*
11548   eval "ac_cv_func__beginthread=no"
11549 fi
11550 rm -f conftest*
11551 fi
11552
11553 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11554   echo "$ac_t""yes" 1>&6
11555   :
11556 else
11557   echo "$ac_t""no" 1>&6
11558 fi
11559
11560
11561         if test $ac_cv_func__beginthread = yes ; then
11562                 cat >> confdefs.h <<\EOF
11563 #define HAVE_NT_THREADS 1
11564 EOF
11565
11566                 ol_cv_nt_threads=yes
11567         fi
11568
11569
11570         if test "$ol_cv_nt_threads" = yes ; then
11571                 ol_link_threads=nt
11572                 ol_with_threads=found
11573                 ol_with_yielding_select=yes
11574
11575                 cat >> confdefs.h <<\EOF
11576 #define HAVE_NT_SERVICE_MANAGER 1
11577 EOF
11578
11579                 cat >> confdefs.h <<\EOF
11580 #define HAVE_NT_EVENT_LOG 1
11581 EOF
11582
11583         fi
11584
11585         if test $ol_with_threads = nt ; then
11586                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11587         fi
11588 fi
11589
11590 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11591         -o $ol_with_threads = posix ; then
11592
11593         for ac_hdr in pthread.h
11594 do
11595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11597 echo "configure:11598: checking for $ac_hdr" >&5
11598 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11599   echo $ac_n "(cached) $ac_c" 1>&6
11600 else
11601   cat > conftest.$ac_ext <<EOF
11602 #line 11603 "configure"
11603 #include "confdefs.h"
11604 #include <$ac_hdr>
11605 EOF
11606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11607 { (eval echo configure:11608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11609 if test -z "$ac_err"; then
11610   rm -rf conftest*
11611   eval "ac_cv_header_$ac_safe=yes"
11612 else
11613   echo "$ac_err" >&5
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   eval "ac_cv_header_$ac_safe=no"
11618 fi
11619 rm -f conftest*
11620 fi
11621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11622   echo "$ac_t""yes" 1>&6
11623     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11624   cat >> confdefs.h <<EOF
11625 #define $ac_tr_hdr 1
11626 EOF
11627  
11628 else
11629   echo "$ac_t""no" 1>&6
11630 fi
11631 done
11632
11633
11634         if test $ac_cv_header_pthread_h = yes ; then
11635                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11636 echo "configure:11637: checking POSIX thread version" >&5
11637 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11638   echo $ac_n "(cached) $ac_c" 1>&6
11639 else
11640   
11641         cat > conftest.$ac_ext <<EOF
11642 #line 11643 "configure"
11643 #include "confdefs.h"
11644
11645 #               include <pthread.h>
11646         
11647 int main() {
11648
11649                 int i = PTHREAD_CREATE_JOINABLE;
11650         
11651 ; return 0; }
11652 EOF
11653 if { (eval echo configure:11654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11654   rm -rf conftest*
11655   
11656         cat > conftest.$ac_ext <<EOF
11657 #line 11658 "configure"
11658 #include "confdefs.h"
11659 #include <pthread.h>
11660 EOF
11661 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11662   egrep "pthread_detach" >/dev/null 2>&1; then
11663   rm -rf conftest*
11664   ol_cv_pthread_version=10
11665 else
11666   rm -rf conftest*
11667   ol_cv_pthread_version=8
11668 fi
11669 rm -f conftest*
11670
11671 else
11672   echo "configure: failed program was:" >&5
11673   cat conftest.$ac_ext >&5
11674   rm -rf conftest*
11675   
11676         cat > conftest.$ac_ext <<EOF
11677 #line 11678 "configure"
11678 #include "confdefs.h"
11679
11680 #               include <pthread.h>
11681 #               ifdef PTHREAD_CREATE_UNDETACHED
11682                 draft7
11683 #               endif
11684         
11685 EOF
11686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11687   egrep "draft7" >/dev/null 2>&1; then
11688   rm -rf conftest*
11689   ol_cv_pthread_version=7
11690 else
11691   rm -rf conftest*
11692   
11693         cat > conftest.$ac_ext <<EOF
11694 #line 11695 "configure"
11695 #include "confdefs.h"
11696 #include <pthread.h>
11697 EOF
11698 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11699   egrep "pthread_attr_init" >/dev/null 2>&1; then
11700   rm -rf conftest*
11701   ol_cv_pthread_version=6
11702 else
11703   rm -rf conftest*
11704   
11705         cat > conftest.$ac_ext <<EOF
11706 #line 11707 "configure"
11707 #include "confdefs.h"
11708
11709 #               include <pthread.h>
11710 #ifdef          PTHREAD_MUTEX_INITIALIZER
11711                 draft5
11712 #endif
11713         
11714 EOF
11715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11716   egrep "draft5" >/dev/null 2>&1; then
11717   rm -rf conftest*
11718   ol_cv_pthread_version=5
11719 else
11720   rm -rf conftest*
11721   ol_cv_pthread_version=4
11722 fi
11723 rm -f conftest*
11724  
11725 fi
11726 rm -f conftest*
11727  
11728 fi
11729 rm -f conftest*
11730  
11731 fi
11732 rm -f conftest*
11733
11734 fi
11735
11736 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11737
11738
11739                 if test $ol_cv_pthread_version != 0 ; then
11740                         cat >> confdefs.h <<EOF
11741 #define HAVE_PTHREADS $ol_cv_pthread_version
11742 EOF
11743
11744                 else
11745                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11746                 fi
11747
11748                 # consider threads found
11749                 ol_with_threads=found
11750
11751                 
11752         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11753 echo "configure:11754: checking for LinuxThreads pthread.h" >&5
11754 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11755   echo $ac_n "(cached) $ac_c" 1>&6
11756 else
11757   cat > conftest.$ac_ext <<EOF
11758 #line 11759 "configure"
11759 #include "confdefs.h"
11760 #include <pthread.h>
11761 EOF
11762 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11763   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11764   rm -rf conftest*
11765   ol_cv_header_linux_threads=yes
11766 else
11767   rm -rf conftest*
11768   ol_cv_header_linux_threads=no
11769 fi
11770 rm -f conftest*
11771
11772                 
11773 fi
11774
11775 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11776         if test $ol_cv_header_linux_threads = yes; then
11777                 cat >> confdefs.h <<\EOF
11778 #define HAVE_LINUX_THREADS 1
11779 EOF
11780
11781         fi
11782
11783                 
11784         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11785 echo "configure:11786: checking for GNU Pth pthread.h" >&5
11786 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11787   echo $ac_n "(cached) $ac_c" 1>&6
11788 else
11789   cat > conftest.$ac_ext <<EOF
11790 #line 11791 "configure"
11791 #include "confdefs.h"
11792 #include <pthread.h>
11793 #ifdef _POSIX_THREAD_IS_GNU_PTH
11794         __gnu_pth__;
11795 #endif
11796
11797 EOF
11798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11799   egrep "__gnu_pth__" >/dev/null 2>&1; then
11800   rm -rf conftest*
11801   ol_cv_header_gnu_pth_pthread_h=yes
11802 else
11803   rm -rf conftest*
11804   ol_cv_header_gnu_pth_pthread_h=no
11805 fi
11806 rm -f conftest*
11807
11808                 
11809 fi
11810
11811 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11812
11813
11814                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11815                         for ac_hdr in sched.h
11816 do
11817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11819 echo "configure:11820: checking for $ac_hdr" >&5
11820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11821   echo $ac_n "(cached) $ac_c" 1>&6
11822 else
11823   cat > conftest.$ac_ext <<EOF
11824 #line 11825 "configure"
11825 #include "confdefs.h"
11826 #include <$ac_hdr>
11827 EOF
11828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11829 { (eval echo configure:11830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11831 if test -z "$ac_err"; then
11832   rm -rf conftest*
11833   eval "ac_cv_header_$ac_safe=yes"
11834 else
11835   echo "$ac_err" >&5
11836   echo "configure: failed program was:" >&5
11837   cat conftest.$ac_ext >&5
11838   rm -rf conftest*
11839   eval "ac_cv_header_$ac_safe=no"
11840 fi
11841 rm -f conftest*
11842 fi
11843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11844   echo "$ac_t""yes" 1>&6
11845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11846   cat >> confdefs.h <<EOF
11847 #define $ac_tr_hdr 1
11848 EOF
11849  
11850 else
11851   echo "$ac_t""no" 1>&6
11852 fi
11853 done
11854
11855                 fi
11856
11857                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11858                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11859 echo "configure:11860: checking for pthread_create in default libraries" >&5
11860 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11861   echo $ac_n "(cached) $ac_c" 1>&6
11862 else
11863   
11864                 if test "$cross_compiling" = yes; then
11865   cat > conftest.$ac_ext <<EOF
11866 #line 11867 "configure"
11867 #include "confdefs.h"
11868 /* pthread test headers */
11869 #include <pthread.h>
11870 #if HAVE_PTHREADS < 7
11871 #include <errno.h>
11872 #endif
11873 #ifndef NULL
11874 #define NULL (void*)0
11875 #endif
11876
11877 static void *task(p)
11878         void *p;
11879 {
11880         return (void *) (p == NULL);
11881 }
11882
11883 int main() {
11884
11885         /* pthread test function */
11886 #ifndef PTHREAD_CREATE_DETACHED
11887 #define PTHREAD_CREATE_DETACHED 1
11888 #endif
11889         pthread_t t;
11890         int status;
11891         int detach = PTHREAD_CREATE_DETACHED;
11892
11893 #if HAVE_PTHREADS > 4
11894         /* Final pthreads */
11895         pthread_attr_t attr;
11896
11897         status = pthread_attr_init(&attr);
11898         if( status ) return status;
11899
11900 #if HAVE_PTHREADS < 7
11901         status = pthread_attr_setdetachstate(&attr, &detach);
11902         if( status < 0 ) status = errno;
11903 #else
11904         status = pthread_attr_setdetachstate(&attr, detach);
11905 #endif
11906         if( status ) return status;
11907         status = pthread_create( &t, &attr, task, NULL );
11908 #if HAVE_PTHREADS < 7
11909         if( status < 0 ) status = errno;
11910 #endif
11911         if( status ) return status;
11912 #else
11913         /* Draft 4 pthreads */
11914         status = pthread_create( &t, pthread_attr_default, task, NULL );
11915         if( status ) return errno;
11916
11917         /* give thread a chance to complete */
11918         /* it should remain joinable and hence detachable */
11919         sleep( 1 );
11920
11921         status = pthread_detach( &t );
11922         if( status ) return errno;
11923 #endif
11924
11925 #ifdef HAVE_LINUX_THREADS
11926         pthread_kill_other_threads_np();
11927 #endif
11928
11929         return 0;
11930
11931 ; return 0; }
11932 EOF
11933 if { (eval echo configure:11934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11934   rm -rf conftest*
11935   ol_cv_pthread_create=yes
11936 else
11937   echo "configure: failed program was:" >&5
11938   cat conftest.$ac_ext >&5
11939   rm -rf conftest*
11940   ol_cv_pthread_create=no
11941 fi
11942 rm -f conftest*
11943 else
11944   cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947 /* pthread test headers */
11948 #include <pthread.h>
11949 #if HAVE_PTHREADS < 7
11950 #include <errno.h>
11951 #endif
11952 #ifndef NULL
11953 #define NULL (void*)0
11954 #endif
11955
11956 static void *task(p)
11957         void *p;
11958 {
11959         return (void *) (p == NULL);
11960 }
11961
11962
11963 int main(argc, argv)
11964         int argc;
11965         char **argv;
11966 {
11967
11968         /* pthread test function */
11969 #ifndef PTHREAD_CREATE_DETACHED
11970 #define PTHREAD_CREATE_DETACHED 1
11971 #endif
11972         pthread_t t;
11973         int status;
11974         int detach = PTHREAD_CREATE_DETACHED;
11975
11976 #if HAVE_PTHREADS > 4
11977         /* Final pthreads */
11978         pthread_attr_t attr;
11979
11980         status = pthread_attr_init(&attr);
11981         if( status ) return status;
11982
11983 #if HAVE_PTHREADS < 7
11984         status = pthread_attr_setdetachstate(&attr, &detach);
11985         if( status < 0 ) status = errno;
11986 #else
11987         status = pthread_attr_setdetachstate(&attr, detach);
11988 #endif
11989         if( status ) return status;
11990         status = pthread_create( &t, &attr, task, NULL );
11991 #if HAVE_PTHREADS < 7
11992         if( status < 0 ) status = errno;
11993 #endif
11994         if( status ) return status;
11995 #else
11996         /* Draft 4 pthreads */
11997         status = pthread_create( &t, pthread_attr_default, task, NULL );
11998         if( status ) return errno;
11999
12000         /* give thread a chance to complete */
12001         /* it should remain joinable and hence detachable */
12002         sleep( 1 );
12003
12004         status = pthread_detach( &t );
12005         if( status ) return errno;
12006 #endif
12007
12008 #ifdef HAVE_LINUX_THREADS
12009         pthread_kill_other_threads_np();
12010 #endif
12011
12012         return 0;
12013
12014 }
12015
12016 EOF
12017 if { (eval echo configure:12018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12018 then
12019   ol_cv_pthread_create=yes
12020 else
12021   echo "configure: failed program was:" >&5
12022   cat conftest.$ac_ext >&5
12023   rm -fr conftest*
12024   ol_cv_pthread_create=no
12025 fi
12026 rm -fr conftest*
12027 fi
12028
12029 fi
12030
12031 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12032
12033                 if test $ol_cv_pthread_create != no ; then
12034                         ol_link_threads=posix
12035                         ol_link_pthreads=""
12036                 fi
12037                 
12038                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12039 if test "$ol_link_threads" = no ; then
12040         # try -kthread
12041         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12042 echo "configure:12043: checking for pthread link with -kthread" >&5
12043 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12044   echo $ac_n "(cached) $ac_c" 1>&6
12045 else
12046   
12047                 # save the flags
12048                 ol_LIBS="$LIBS"
12049                 LIBS="-kthread $LIBS"
12050
12051                 if test "$cross_compiling" = yes; then
12052   cat > conftest.$ac_ext <<EOF
12053 #line 12054 "configure"
12054 #include "confdefs.h"
12055 /* pthread test headers */
12056 #include <pthread.h>
12057 #if HAVE_PTHREADS < 7
12058 #include <errno.h>
12059 #endif
12060 #ifndef NULL
12061 #define NULL (void*)0
12062 #endif
12063
12064 static void *task(p)
12065         void *p;
12066 {
12067         return (void *) (p == NULL);
12068 }
12069
12070 int main() {
12071
12072         /* pthread test function */
12073 #ifndef PTHREAD_CREATE_DETACHED
12074 #define PTHREAD_CREATE_DETACHED 1
12075 #endif
12076         pthread_t t;
12077         int status;
12078         int detach = PTHREAD_CREATE_DETACHED;
12079
12080 #if HAVE_PTHREADS > 4
12081         /* Final pthreads */
12082         pthread_attr_t attr;
12083
12084         status = pthread_attr_init(&attr);
12085         if( status ) return status;
12086
12087 #if HAVE_PTHREADS < 7
12088         status = pthread_attr_setdetachstate(&attr, &detach);
12089         if( status < 0 ) status = errno;
12090 #else
12091         status = pthread_attr_setdetachstate(&attr, detach);
12092 #endif
12093         if( status ) return status;
12094         status = pthread_create( &t, &attr, task, NULL );
12095 #if HAVE_PTHREADS < 7
12096         if( status < 0 ) status = errno;
12097 #endif
12098         if( status ) return status;
12099 #else
12100         /* Draft 4 pthreads */
12101         status = pthread_create( &t, pthread_attr_default, task, NULL );
12102         if( status ) return errno;
12103
12104         /* give thread a chance to complete */
12105         /* it should remain joinable and hence detachable */
12106         sleep( 1 );
12107
12108         status = pthread_detach( &t );
12109         if( status ) return errno;
12110 #endif
12111
12112 #ifdef HAVE_LINUX_THREADS
12113         pthread_kill_other_threads_np();
12114 #endif
12115
12116         return 0;
12117
12118 ; return 0; }
12119 EOF
12120 if { (eval echo configure:12121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12121   rm -rf conftest*
12122   ol_cv_pthread_kthread=yes
12123 else
12124   echo "configure: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   rm -rf conftest*
12127   ol_cv_pthread_kthread=no
12128 fi
12129 rm -f conftest*
12130 else
12131   cat > conftest.$ac_ext <<EOF
12132 #line 12133 "configure"
12133 #include "confdefs.h"
12134 /* pthread test headers */
12135 #include <pthread.h>
12136 #if HAVE_PTHREADS < 7
12137 #include <errno.h>
12138 #endif
12139 #ifndef NULL
12140 #define NULL (void*)0
12141 #endif
12142
12143 static void *task(p)
12144         void *p;
12145 {
12146         return (void *) (p == NULL);
12147 }
12148
12149
12150 int main(argc, argv)
12151         int argc;
12152         char **argv;
12153 {
12154
12155         /* pthread test function */
12156 #ifndef PTHREAD_CREATE_DETACHED
12157 #define PTHREAD_CREATE_DETACHED 1
12158 #endif
12159         pthread_t t;
12160         int status;
12161         int detach = PTHREAD_CREATE_DETACHED;
12162
12163 #if HAVE_PTHREADS > 4
12164         /* Final pthreads */
12165         pthread_attr_t attr;
12166
12167         status = pthread_attr_init(&attr);
12168         if( status ) return status;
12169
12170 #if HAVE_PTHREADS < 7
12171         status = pthread_attr_setdetachstate(&attr, &detach);
12172         if( status < 0 ) status = errno;
12173 #else
12174         status = pthread_attr_setdetachstate(&attr, detach);
12175 #endif
12176         if( status ) return status;
12177         status = pthread_create( &t, &attr, task, NULL );
12178 #if HAVE_PTHREADS < 7
12179         if( status < 0 ) status = errno;
12180 #endif
12181         if( status ) return status;
12182 #else
12183         /* Draft 4 pthreads */
12184         status = pthread_create( &t, pthread_attr_default, task, NULL );
12185         if( status ) return errno;
12186
12187         /* give thread a chance to complete */
12188         /* it should remain joinable and hence detachable */
12189         sleep( 1 );
12190
12191         status = pthread_detach( &t );
12192         if( status ) return errno;
12193 #endif
12194
12195 #ifdef HAVE_LINUX_THREADS
12196         pthread_kill_other_threads_np();
12197 #endif
12198
12199         return 0;
12200
12201 }
12202
12203 EOF
12204 if { (eval echo configure:12205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12205 then
12206   ol_cv_pthread_kthread=yes
12207 else
12208   echo "configure: failed program was:" >&5
12209   cat conftest.$ac_ext >&5
12210   rm -fr conftest*
12211   ol_cv_pthread_kthread=no
12212 fi
12213 rm -fr conftest*
12214 fi
12215
12216
12217                 # restore the LIBS
12218                 LIBS="$ol_LIBS"
12219         
12220 fi
12221
12222 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12223
12224         if test $ol_cv_pthread_kthread = yes ; then
12225                 ol_link_pthreads="-kthread"
12226                 ol_link_threads=posix
12227         fi
12228 fi
12229
12230                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12231 if test "$ol_link_threads" = no ; then
12232         # try -pthread
12233         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12234 echo "configure:12235: checking for pthread link with -pthread" >&5
12235 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12236   echo $ac_n "(cached) $ac_c" 1>&6
12237 else
12238   
12239                 # save the flags
12240                 ol_LIBS="$LIBS"
12241                 LIBS="-pthread $LIBS"
12242
12243                 if test "$cross_compiling" = yes; then
12244   cat > conftest.$ac_ext <<EOF
12245 #line 12246 "configure"
12246 #include "confdefs.h"
12247 /* pthread test headers */
12248 #include <pthread.h>
12249 #if HAVE_PTHREADS < 7
12250 #include <errno.h>
12251 #endif
12252 #ifndef NULL
12253 #define NULL (void*)0
12254 #endif
12255
12256 static void *task(p)
12257         void *p;
12258 {
12259         return (void *) (p == NULL);
12260 }
12261
12262 int main() {
12263
12264         /* pthread test function */
12265 #ifndef PTHREAD_CREATE_DETACHED
12266 #define PTHREAD_CREATE_DETACHED 1
12267 #endif
12268         pthread_t t;
12269         int status;
12270         int detach = PTHREAD_CREATE_DETACHED;
12271
12272 #if HAVE_PTHREADS > 4
12273         /* Final pthreads */
12274         pthread_attr_t attr;
12275
12276         status = pthread_attr_init(&attr);
12277         if( status ) return status;
12278
12279 #if HAVE_PTHREADS < 7
12280         status = pthread_attr_setdetachstate(&attr, &detach);
12281         if( status < 0 ) status = errno;
12282 #else
12283         status = pthread_attr_setdetachstate(&attr, detach);
12284 #endif
12285         if( status ) return status;
12286         status = pthread_create( &t, &attr, task, NULL );
12287 #if HAVE_PTHREADS < 7
12288         if( status < 0 ) status = errno;
12289 #endif
12290         if( status ) return status;
12291 #else
12292         /* Draft 4 pthreads */
12293         status = pthread_create( &t, pthread_attr_default, task, NULL );
12294         if( status ) return errno;
12295
12296         /* give thread a chance to complete */
12297         /* it should remain joinable and hence detachable */
12298         sleep( 1 );
12299
12300         status = pthread_detach( &t );
12301         if( status ) return errno;
12302 #endif
12303
12304 #ifdef HAVE_LINUX_THREADS
12305         pthread_kill_other_threads_np();
12306 #endif
12307
12308         return 0;
12309
12310 ; return 0; }
12311 EOF
12312 if { (eval echo configure:12313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12313   rm -rf conftest*
12314   ol_cv_pthread_pthread=yes
12315 else
12316   echo "configure: failed program was:" >&5
12317   cat conftest.$ac_ext >&5
12318   rm -rf conftest*
12319   ol_cv_pthread_pthread=no
12320 fi
12321 rm -f conftest*
12322 else
12323   cat > conftest.$ac_ext <<EOF
12324 #line 12325 "configure"
12325 #include "confdefs.h"
12326 /* pthread test headers */
12327 #include <pthread.h>
12328 #if HAVE_PTHREADS < 7
12329 #include <errno.h>
12330 #endif
12331 #ifndef NULL
12332 #define NULL (void*)0
12333 #endif
12334
12335 static void *task(p)
12336         void *p;
12337 {
12338         return (void *) (p == NULL);
12339 }
12340
12341
12342 int main(argc, argv)
12343         int argc;
12344         char **argv;
12345 {
12346
12347         /* pthread test function */
12348 #ifndef PTHREAD_CREATE_DETACHED
12349 #define PTHREAD_CREATE_DETACHED 1
12350 #endif
12351         pthread_t t;
12352         int status;
12353         int detach = PTHREAD_CREATE_DETACHED;
12354
12355 #if HAVE_PTHREADS > 4
12356         /* Final pthreads */
12357         pthread_attr_t attr;
12358
12359         status = pthread_attr_init(&attr);
12360         if( status ) return status;
12361
12362 #if HAVE_PTHREADS < 7
12363         status = pthread_attr_setdetachstate(&attr, &detach);
12364         if( status < 0 ) status = errno;
12365 #else
12366         status = pthread_attr_setdetachstate(&attr, detach);
12367 #endif
12368         if( status ) return status;
12369         status = pthread_create( &t, &attr, task, NULL );
12370 #if HAVE_PTHREADS < 7
12371         if( status < 0 ) status = errno;
12372 #endif
12373         if( status ) return status;
12374 #else
12375         /* Draft 4 pthreads */
12376         status = pthread_create( &t, pthread_attr_default, task, NULL );
12377         if( status ) return errno;
12378
12379         /* give thread a chance to complete */
12380         /* it should remain joinable and hence detachable */
12381         sleep( 1 );
12382
12383         status = pthread_detach( &t );
12384         if( status ) return errno;
12385 #endif
12386
12387 #ifdef HAVE_LINUX_THREADS
12388         pthread_kill_other_threads_np();
12389 #endif
12390
12391         return 0;
12392
12393 }
12394
12395 EOF
12396 if { (eval echo configure:12397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12397 then
12398   ol_cv_pthread_pthread=yes
12399 else
12400   echo "configure: failed program was:" >&5
12401   cat conftest.$ac_ext >&5
12402   rm -fr conftest*
12403   ol_cv_pthread_pthread=no
12404 fi
12405 rm -fr conftest*
12406 fi
12407
12408
12409                 # restore the LIBS
12410                 LIBS="$ol_LIBS"
12411         
12412 fi
12413
12414 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12415
12416         if test $ol_cv_pthread_pthread = yes ; then
12417                 ol_link_pthreads="-pthread"
12418                 ol_link_threads=posix
12419         fi
12420 fi
12421
12422                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12423 if test "$ol_link_threads" = no ; then
12424         # try -pthreads
12425         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12426 echo "configure:12427: checking for pthread link with -pthreads" >&5
12427 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12428   echo $ac_n "(cached) $ac_c" 1>&6
12429 else
12430   
12431                 # save the flags
12432                 ol_LIBS="$LIBS"
12433                 LIBS="-pthreads $LIBS"
12434
12435                 if test "$cross_compiling" = yes; then
12436   cat > conftest.$ac_ext <<EOF
12437 #line 12438 "configure"
12438 #include "confdefs.h"
12439 /* pthread test headers */
12440 #include <pthread.h>
12441 #if HAVE_PTHREADS < 7
12442 #include <errno.h>
12443 #endif
12444 #ifndef NULL
12445 #define NULL (void*)0
12446 #endif
12447
12448 static void *task(p)
12449         void *p;
12450 {
12451         return (void *) (p == NULL);
12452 }
12453
12454 int main() {
12455
12456         /* pthread test function */
12457 #ifndef PTHREAD_CREATE_DETACHED
12458 #define PTHREAD_CREATE_DETACHED 1
12459 #endif
12460         pthread_t t;
12461         int status;
12462         int detach = PTHREAD_CREATE_DETACHED;
12463
12464 #if HAVE_PTHREADS > 4
12465         /* Final pthreads */
12466         pthread_attr_t attr;
12467
12468         status = pthread_attr_init(&attr);
12469         if( status ) return status;
12470
12471 #if HAVE_PTHREADS < 7
12472         status = pthread_attr_setdetachstate(&attr, &detach);
12473         if( status < 0 ) status = errno;
12474 #else
12475         status = pthread_attr_setdetachstate(&attr, detach);
12476 #endif
12477         if( status ) return status;
12478         status = pthread_create( &t, &attr, task, NULL );
12479 #if HAVE_PTHREADS < 7
12480         if( status < 0 ) status = errno;
12481 #endif
12482         if( status ) return status;
12483 #else
12484         /* Draft 4 pthreads */
12485         status = pthread_create( &t, pthread_attr_default, task, NULL );
12486         if( status ) return errno;
12487
12488         /* give thread a chance to complete */
12489         /* it should remain joinable and hence detachable */
12490         sleep( 1 );
12491
12492         status = pthread_detach( &t );
12493         if( status ) return errno;
12494 #endif
12495
12496 #ifdef HAVE_LINUX_THREADS
12497         pthread_kill_other_threads_np();
12498 #endif
12499
12500         return 0;
12501
12502 ; return 0; }
12503 EOF
12504 if { (eval echo configure:12505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12505   rm -rf conftest*
12506   ol_cv_pthread_pthreads=yes
12507 else
12508   echo "configure: failed program was:" >&5
12509   cat conftest.$ac_ext >&5
12510   rm -rf conftest*
12511   ol_cv_pthread_pthreads=no
12512 fi
12513 rm -f conftest*
12514 else
12515   cat > conftest.$ac_ext <<EOF
12516 #line 12517 "configure"
12517 #include "confdefs.h"
12518 /* pthread test headers */
12519 #include <pthread.h>
12520 #if HAVE_PTHREADS < 7
12521 #include <errno.h>
12522 #endif
12523 #ifndef NULL
12524 #define NULL (void*)0
12525 #endif
12526
12527 static void *task(p)
12528         void *p;
12529 {
12530         return (void *) (p == NULL);
12531 }
12532
12533
12534 int main(argc, argv)
12535         int argc;
12536         char **argv;
12537 {
12538
12539         /* pthread test function */
12540 #ifndef PTHREAD_CREATE_DETACHED
12541 #define PTHREAD_CREATE_DETACHED 1
12542 #endif
12543         pthread_t t;
12544         int status;
12545         int detach = PTHREAD_CREATE_DETACHED;
12546
12547 #if HAVE_PTHREADS > 4
12548         /* Final pthreads */
12549         pthread_attr_t attr;
12550
12551         status = pthread_attr_init(&attr);
12552         if( status ) return status;
12553
12554 #if HAVE_PTHREADS < 7
12555         status = pthread_attr_setdetachstate(&attr, &detach);
12556         if( status < 0 ) status = errno;
12557 #else
12558         status = pthread_attr_setdetachstate(&attr, detach);
12559 #endif
12560         if( status ) return status;
12561         status = pthread_create( &t, &attr, task, NULL );
12562 #if HAVE_PTHREADS < 7
12563         if( status < 0 ) status = errno;
12564 #endif
12565         if( status ) return status;
12566 #else
12567         /* Draft 4 pthreads */
12568         status = pthread_create( &t, pthread_attr_default, task, NULL );
12569         if( status ) return errno;
12570
12571         /* give thread a chance to complete */
12572         /* it should remain joinable and hence detachable */
12573         sleep( 1 );
12574
12575         status = pthread_detach( &t );
12576         if( status ) return errno;
12577 #endif
12578
12579 #ifdef HAVE_LINUX_THREADS
12580         pthread_kill_other_threads_np();
12581 #endif
12582
12583         return 0;
12584
12585 }
12586
12587 EOF
12588 if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12589 then
12590   ol_cv_pthread_pthreads=yes
12591 else
12592   echo "configure: failed program was:" >&5
12593   cat conftest.$ac_ext >&5
12594   rm -fr conftest*
12595   ol_cv_pthread_pthreads=no
12596 fi
12597 rm -fr conftest*
12598 fi
12599
12600
12601                 # restore the LIBS
12602                 LIBS="$ol_LIBS"
12603         
12604 fi
12605
12606 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12607
12608         if test $ol_cv_pthread_pthreads = yes ; then
12609                 ol_link_pthreads="-pthreads"
12610                 ol_link_threads=posix
12611         fi
12612 fi
12613
12614                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12615 if test "$ol_link_threads" = no ; then
12616         # try -mthreads
12617         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12618 echo "configure:12619: checking for pthread link with -mthreads" >&5
12619 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12620   echo $ac_n "(cached) $ac_c" 1>&6
12621 else
12622   
12623                 # save the flags
12624                 ol_LIBS="$LIBS"
12625                 LIBS="-mthreads $LIBS"
12626
12627                 if test "$cross_compiling" = yes; then
12628   cat > conftest.$ac_ext <<EOF
12629 #line 12630 "configure"
12630 #include "confdefs.h"
12631 /* pthread test headers */
12632 #include <pthread.h>
12633 #if HAVE_PTHREADS < 7
12634 #include <errno.h>
12635 #endif
12636 #ifndef NULL
12637 #define NULL (void*)0
12638 #endif
12639
12640 static void *task(p)
12641         void *p;
12642 {
12643         return (void *) (p == NULL);
12644 }
12645
12646 int main() {
12647
12648         /* pthread test function */
12649 #ifndef PTHREAD_CREATE_DETACHED
12650 #define PTHREAD_CREATE_DETACHED 1
12651 #endif
12652         pthread_t t;
12653         int status;
12654         int detach = PTHREAD_CREATE_DETACHED;
12655
12656 #if HAVE_PTHREADS > 4
12657         /* Final pthreads */
12658         pthread_attr_t attr;
12659
12660         status = pthread_attr_init(&attr);
12661         if( status ) return status;
12662
12663 #if HAVE_PTHREADS < 7
12664         status = pthread_attr_setdetachstate(&attr, &detach);
12665         if( status < 0 ) status = errno;
12666 #else
12667         status = pthread_attr_setdetachstate(&attr, detach);
12668 #endif
12669         if( status ) return status;
12670         status = pthread_create( &t, &attr, task, NULL );
12671 #if HAVE_PTHREADS < 7
12672         if( status < 0 ) status = errno;
12673 #endif
12674         if( status ) return status;
12675 #else
12676         /* Draft 4 pthreads */
12677         status = pthread_create( &t, pthread_attr_default, task, NULL );
12678         if( status ) return errno;
12679
12680         /* give thread a chance to complete */
12681         /* it should remain joinable and hence detachable */
12682         sleep( 1 );
12683
12684         status = pthread_detach( &t );
12685         if( status ) return errno;
12686 #endif
12687
12688 #ifdef HAVE_LINUX_THREADS
12689         pthread_kill_other_threads_np();
12690 #endif
12691
12692         return 0;
12693
12694 ; return 0; }
12695 EOF
12696 if { (eval echo configure:12697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12697   rm -rf conftest*
12698   ol_cv_pthread_mthreads=yes
12699 else
12700   echo "configure: failed program was:" >&5
12701   cat conftest.$ac_ext >&5
12702   rm -rf conftest*
12703   ol_cv_pthread_mthreads=no
12704 fi
12705 rm -f conftest*
12706 else
12707   cat > conftest.$ac_ext <<EOF
12708 #line 12709 "configure"
12709 #include "confdefs.h"
12710 /* pthread test headers */
12711 #include <pthread.h>
12712 #if HAVE_PTHREADS < 7
12713 #include <errno.h>
12714 #endif
12715 #ifndef NULL
12716 #define NULL (void*)0
12717 #endif
12718
12719 static void *task(p)
12720         void *p;
12721 {
12722         return (void *) (p == NULL);
12723 }
12724
12725
12726 int main(argc, argv)
12727         int argc;
12728         char **argv;
12729 {
12730
12731         /* pthread test function */
12732 #ifndef PTHREAD_CREATE_DETACHED
12733 #define PTHREAD_CREATE_DETACHED 1
12734 #endif
12735         pthread_t t;
12736         int status;
12737         int detach = PTHREAD_CREATE_DETACHED;
12738
12739 #if HAVE_PTHREADS > 4
12740         /* Final pthreads */
12741         pthread_attr_t attr;
12742
12743         status = pthread_attr_init(&attr);
12744         if( status ) return status;
12745
12746 #if HAVE_PTHREADS < 7
12747         status = pthread_attr_setdetachstate(&attr, &detach);
12748         if( status < 0 ) status = errno;
12749 #else
12750         status = pthread_attr_setdetachstate(&attr, detach);
12751 #endif
12752         if( status ) return status;
12753         status = pthread_create( &t, &attr, task, NULL );
12754 #if HAVE_PTHREADS < 7
12755         if( status < 0 ) status = errno;
12756 #endif
12757         if( status ) return status;
12758 #else
12759         /* Draft 4 pthreads */
12760         status = pthread_create( &t, pthread_attr_default, task, NULL );
12761         if( status ) return errno;
12762
12763         /* give thread a chance to complete */
12764         /* it should remain joinable and hence detachable */
12765         sleep( 1 );
12766
12767         status = pthread_detach( &t );
12768         if( status ) return errno;
12769 #endif
12770
12771 #ifdef HAVE_LINUX_THREADS
12772         pthread_kill_other_threads_np();
12773 #endif
12774
12775         return 0;
12776
12777 }
12778
12779 EOF
12780 if { (eval echo configure:12781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12781 then
12782   ol_cv_pthread_mthreads=yes
12783 else
12784   echo "configure: failed program was:" >&5
12785   cat conftest.$ac_ext >&5
12786   rm -fr conftest*
12787   ol_cv_pthread_mthreads=no
12788 fi
12789 rm -fr conftest*
12790 fi
12791
12792
12793                 # restore the LIBS
12794                 LIBS="$ol_LIBS"
12795         
12796 fi
12797
12798 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12799
12800         if test $ol_cv_pthread_mthreads = yes ; then
12801                 ol_link_pthreads="-mthreads"
12802                 ol_link_threads=posix
12803         fi
12804 fi
12805
12806                 # Pthread try link: -thread (ol_cv_pthread_thread)
12807 if test "$ol_link_threads" = no ; then
12808         # try -thread
12809         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12810 echo "configure:12811: checking for pthread link with -thread" >&5
12811 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12812   echo $ac_n "(cached) $ac_c" 1>&6
12813 else
12814   
12815                 # save the flags
12816                 ol_LIBS="$LIBS"
12817                 LIBS="-thread $LIBS"
12818
12819                 if test "$cross_compiling" = yes; then
12820   cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 /* pthread test headers */
12824 #include <pthread.h>
12825 #if HAVE_PTHREADS < 7
12826 #include <errno.h>
12827 #endif
12828 #ifndef NULL
12829 #define NULL (void*)0
12830 #endif
12831
12832 static void *task(p)
12833         void *p;
12834 {
12835         return (void *) (p == NULL);
12836 }
12837
12838 int main() {
12839
12840         /* pthread test function */
12841 #ifndef PTHREAD_CREATE_DETACHED
12842 #define PTHREAD_CREATE_DETACHED 1
12843 #endif
12844         pthread_t t;
12845         int status;
12846         int detach = PTHREAD_CREATE_DETACHED;
12847
12848 #if HAVE_PTHREADS > 4
12849         /* Final pthreads */
12850         pthread_attr_t attr;
12851
12852         status = pthread_attr_init(&attr);
12853         if( status ) return status;
12854
12855 #if HAVE_PTHREADS < 7
12856         status = pthread_attr_setdetachstate(&attr, &detach);
12857         if( status < 0 ) status = errno;
12858 #else
12859         status = pthread_attr_setdetachstate(&attr, detach);
12860 #endif
12861         if( status ) return status;
12862         status = pthread_create( &t, &attr, task, NULL );
12863 #if HAVE_PTHREADS < 7
12864         if( status < 0 ) status = errno;
12865 #endif
12866         if( status ) return status;
12867 #else
12868         /* Draft 4 pthreads */
12869         status = pthread_create( &t, pthread_attr_default, task, NULL );
12870         if( status ) return errno;
12871
12872         /* give thread a chance to complete */
12873         /* it should remain joinable and hence detachable */
12874         sleep( 1 );
12875
12876         status = pthread_detach( &t );
12877         if( status ) return errno;
12878 #endif
12879
12880 #ifdef HAVE_LINUX_THREADS
12881         pthread_kill_other_threads_np();
12882 #endif
12883
12884         return 0;
12885
12886 ; return 0; }
12887 EOF
12888 if { (eval echo configure:12889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12889   rm -rf conftest*
12890   ol_cv_pthread_thread=yes
12891 else
12892   echo "configure: failed program was:" >&5
12893   cat conftest.$ac_ext >&5
12894   rm -rf conftest*
12895   ol_cv_pthread_thread=no
12896 fi
12897 rm -f conftest*
12898 else
12899   cat > conftest.$ac_ext <<EOF
12900 #line 12901 "configure"
12901 #include "confdefs.h"
12902 /* pthread test headers */
12903 #include <pthread.h>
12904 #if HAVE_PTHREADS < 7
12905 #include <errno.h>
12906 #endif
12907 #ifndef NULL
12908 #define NULL (void*)0
12909 #endif
12910
12911 static void *task(p)
12912         void *p;
12913 {
12914         return (void *) (p == NULL);
12915 }
12916
12917
12918 int main(argc, argv)
12919         int argc;
12920         char **argv;
12921 {
12922
12923         /* pthread test function */
12924 #ifndef PTHREAD_CREATE_DETACHED
12925 #define PTHREAD_CREATE_DETACHED 1
12926 #endif
12927         pthread_t t;
12928         int status;
12929         int detach = PTHREAD_CREATE_DETACHED;
12930
12931 #if HAVE_PTHREADS > 4
12932         /* Final pthreads */
12933         pthread_attr_t attr;
12934
12935         status = pthread_attr_init(&attr);
12936         if( status ) return status;
12937
12938 #if HAVE_PTHREADS < 7
12939         status = pthread_attr_setdetachstate(&attr, &detach);
12940         if( status < 0 ) status = errno;
12941 #else
12942         status = pthread_attr_setdetachstate(&attr, detach);
12943 #endif
12944         if( status ) return status;
12945         status = pthread_create( &t, &attr, task, NULL );
12946 #if HAVE_PTHREADS < 7
12947         if( status < 0 ) status = errno;
12948 #endif
12949         if( status ) return status;
12950 #else
12951         /* Draft 4 pthreads */
12952         status = pthread_create( &t, pthread_attr_default, task, NULL );
12953         if( status ) return errno;
12954
12955         /* give thread a chance to complete */
12956         /* it should remain joinable and hence detachable */
12957         sleep( 1 );
12958
12959         status = pthread_detach( &t );
12960         if( status ) return errno;
12961 #endif
12962
12963 #ifdef HAVE_LINUX_THREADS
12964         pthread_kill_other_threads_np();
12965 #endif
12966
12967         return 0;
12968
12969 }
12970
12971 EOF
12972 if { (eval echo configure:12973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12973 then
12974   ol_cv_pthread_thread=yes
12975 else
12976   echo "configure: failed program was:" >&5
12977   cat conftest.$ac_ext >&5
12978   rm -fr conftest*
12979   ol_cv_pthread_thread=no
12980 fi
12981 rm -fr conftest*
12982 fi
12983
12984
12985                 # restore the LIBS
12986                 LIBS="$ol_LIBS"
12987         
12988 fi
12989
12990 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12991
12992         if test $ol_cv_pthread_thread = yes ; then
12993                 ol_link_pthreads="-thread"
12994                 ol_link_threads=posix
12995         fi
12996 fi
12997
12998
12999                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13000 if test "$ol_link_threads" = no ; then
13001         # try -lpthread -lmach -lexc -lc_r
13002         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13003 echo "configure:13004: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13004 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13005   echo $ac_n "(cached) $ac_c" 1>&6
13006 else
13007   
13008                 # save the flags
13009                 ol_LIBS="$LIBS"
13010                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13011
13012                 if test "$cross_compiling" = yes; then
13013   cat > conftest.$ac_ext <<EOF
13014 #line 13015 "configure"
13015 #include "confdefs.h"
13016 /* pthread test headers */
13017 #include <pthread.h>
13018 #if HAVE_PTHREADS < 7
13019 #include <errno.h>
13020 #endif
13021 #ifndef NULL
13022 #define NULL (void*)0
13023 #endif
13024
13025 static void *task(p)
13026         void *p;
13027 {
13028         return (void *) (p == NULL);
13029 }
13030
13031 int main() {
13032
13033         /* pthread test function */
13034 #ifndef PTHREAD_CREATE_DETACHED
13035 #define PTHREAD_CREATE_DETACHED 1
13036 #endif
13037         pthread_t t;
13038         int status;
13039         int detach = PTHREAD_CREATE_DETACHED;
13040
13041 #if HAVE_PTHREADS > 4
13042         /* Final pthreads */
13043         pthread_attr_t attr;
13044
13045         status = pthread_attr_init(&attr);
13046         if( status ) return status;
13047
13048 #if HAVE_PTHREADS < 7
13049         status = pthread_attr_setdetachstate(&attr, &detach);
13050         if( status < 0 ) status = errno;
13051 #else
13052         status = pthread_attr_setdetachstate(&attr, detach);
13053 #endif
13054         if( status ) return status;
13055         status = pthread_create( &t, &attr, task, NULL );
13056 #if HAVE_PTHREADS < 7
13057         if( status < 0 ) status = errno;
13058 #endif
13059         if( status ) return status;
13060 #else
13061         /* Draft 4 pthreads */
13062         status = pthread_create( &t, pthread_attr_default, task, NULL );
13063         if( status ) return errno;
13064
13065         /* give thread a chance to complete */
13066         /* it should remain joinable and hence detachable */
13067         sleep( 1 );
13068
13069         status = pthread_detach( &t );
13070         if( status ) return errno;
13071 #endif
13072
13073 #ifdef HAVE_LINUX_THREADS
13074         pthread_kill_other_threads_np();
13075 #endif
13076
13077         return 0;
13078
13079 ; return 0; }
13080 EOF
13081 if { (eval echo configure:13082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13082   rm -rf conftest*
13083   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13084 else
13085   echo "configure: failed program was:" >&5
13086   cat conftest.$ac_ext >&5
13087   rm -rf conftest*
13088   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13089 fi
13090 rm -f conftest*
13091 else
13092   cat > conftest.$ac_ext <<EOF
13093 #line 13094 "configure"
13094 #include "confdefs.h"
13095 /* pthread test headers */
13096 #include <pthread.h>
13097 #if HAVE_PTHREADS < 7
13098 #include <errno.h>
13099 #endif
13100 #ifndef NULL
13101 #define NULL (void*)0
13102 #endif
13103
13104 static void *task(p)
13105         void *p;
13106 {
13107         return (void *) (p == NULL);
13108 }
13109
13110
13111 int main(argc, argv)
13112         int argc;
13113         char **argv;
13114 {
13115
13116         /* pthread test function */
13117 #ifndef PTHREAD_CREATE_DETACHED
13118 #define PTHREAD_CREATE_DETACHED 1
13119 #endif
13120         pthread_t t;
13121         int status;
13122         int detach = PTHREAD_CREATE_DETACHED;
13123
13124 #if HAVE_PTHREADS > 4
13125         /* Final pthreads */
13126         pthread_attr_t attr;
13127
13128         status = pthread_attr_init(&attr);
13129         if( status ) return status;
13130
13131 #if HAVE_PTHREADS < 7
13132         status = pthread_attr_setdetachstate(&attr, &detach);
13133         if( status < 0 ) status = errno;
13134 #else
13135         status = pthread_attr_setdetachstate(&attr, detach);
13136 #endif
13137         if( status ) return status;
13138         status = pthread_create( &t, &attr, task, NULL );
13139 #if HAVE_PTHREADS < 7
13140         if( status < 0 ) status = errno;
13141 #endif
13142         if( status ) return status;
13143 #else
13144         /* Draft 4 pthreads */
13145         status = pthread_create( &t, pthread_attr_default, task, NULL );
13146         if( status ) return errno;
13147
13148         /* give thread a chance to complete */
13149         /* it should remain joinable and hence detachable */
13150         sleep( 1 );
13151
13152         status = pthread_detach( &t );
13153         if( status ) return errno;
13154 #endif
13155
13156 #ifdef HAVE_LINUX_THREADS
13157         pthread_kill_other_threads_np();
13158 #endif
13159
13160         return 0;
13161
13162 }
13163
13164 EOF
13165 if { (eval echo configure:13166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13166 then
13167   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13168 else
13169   echo "configure: failed program was:" >&5
13170   cat conftest.$ac_ext >&5
13171   rm -fr conftest*
13172   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13173 fi
13174 rm -fr conftest*
13175 fi
13176
13177
13178                 # restore the LIBS
13179                 LIBS="$ol_LIBS"
13180         
13181 fi
13182
13183 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13184
13185         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13186                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13187                 ol_link_threads=posix
13188         fi
13189 fi
13190
13191                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13192 if test "$ol_link_threads" = no ; then
13193         # try -lpthread -lmach -lexc
13194         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13195 echo "configure:13196: checking for pthread link with -lpthread -lmach -lexc" >&5
13196 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13197   echo $ac_n "(cached) $ac_c" 1>&6
13198 else
13199   
13200                 # save the flags
13201                 ol_LIBS="$LIBS"
13202                 LIBS="-lpthread -lmach -lexc $LIBS"
13203
13204                 if test "$cross_compiling" = yes; then
13205   cat > conftest.$ac_ext <<EOF
13206 #line 13207 "configure"
13207 #include "confdefs.h"
13208 /* pthread test headers */
13209 #include <pthread.h>
13210 #if HAVE_PTHREADS < 7
13211 #include <errno.h>
13212 #endif
13213 #ifndef NULL
13214 #define NULL (void*)0
13215 #endif
13216
13217 static void *task(p)
13218         void *p;
13219 {
13220         return (void *) (p == NULL);
13221 }
13222
13223 int main() {
13224
13225         /* pthread test function */
13226 #ifndef PTHREAD_CREATE_DETACHED
13227 #define PTHREAD_CREATE_DETACHED 1
13228 #endif
13229         pthread_t t;
13230         int status;
13231         int detach = PTHREAD_CREATE_DETACHED;
13232
13233 #if HAVE_PTHREADS > 4
13234         /* Final pthreads */
13235         pthread_attr_t attr;
13236
13237         status = pthread_attr_init(&attr);
13238         if( status ) return status;
13239
13240 #if HAVE_PTHREADS < 7
13241         status = pthread_attr_setdetachstate(&attr, &detach);
13242         if( status < 0 ) status = errno;
13243 #else
13244         status = pthread_attr_setdetachstate(&attr, detach);
13245 #endif
13246         if( status ) return status;
13247         status = pthread_create( &t, &attr, task, NULL );
13248 #if HAVE_PTHREADS < 7
13249         if( status < 0 ) status = errno;
13250 #endif
13251         if( status ) return status;
13252 #else
13253         /* Draft 4 pthreads */
13254         status = pthread_create( &t, pthread_attr_default, task, NULL );
13255         if( status ) return errno;
13256
13257         /* give thread a chance to complete */
13258         /* it should remain joinable and hence detachable */
13259         sleep( 1 );
13260
13261         status = pthread_detach( &t );
13262         if( status ) return errno;
13263 #endif
13264
13265 #ifdef HAVE_LINUX_THREADS
13266         pthread_kill_other_threads_np();
13267 #endif
13268
13269         return 0;
13270
13271 ; return 0; }
13272 EOF
13273 if { (eval echo configure:13274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13274   rm -rf conftest*
13275   ol_cv_pthread_lpthread_lmach_lexc=yes
13276 else
13277   echo "configure: failed program was:" >&5
13278   cat conftest.$ac_ext >&5
13279   rm -rf conftest*
13280   ol_cv_pthread_lpthread_lmach_lexc=no
13281 fi
13282 rm -f conftest*
13283 else
13284   cat > conftest.$ac_ext <<EOF
13285 #line 13286 "configure"
13286 #include "confdefs.h"
13287 /* pthread test headers */
13288 #include <pthread.h>
13289 #if HAVE_PTHREADS < 7
13290 #include <errno.h>
13291 #endif
13292 #ifndef NULL
13293 #define NULL (void*)0
13294 #endif
13295
13296 static void *task(p)
13297         void *p;
13298 {
13299         return (void *) (p == NULL);
13300 }
13301
13302
13303 int main(argc, argv)
13304         int argc;
13305         char **argv;
13306 {
13307
13308         /* pthread test function */
13309 #ifndef PTHREAD_CREATE_DETACHED
13310 #define PTHREAD_CREATE_DETACHED 1
13311 #endif
13312         pthread_t t;
13313         int status;
13314         int detach = PTHREAD_CREATE_DETACHED;
13315
13316 #if HAVE_PTHREADS > 4
13317         /* Final pthreads */
13318         pthread_attr_t attr;
13319
13320         status = pthread_attr_init(&attr);
13321         if( status ) return status;
13322
13323 #if HAVE_PTHREADS < 7
13324         status = pthread_attr_setdetachstate(&attr, &detach);
13325         if( status < 0 ) status = errno;
13326 #else
13327         status = pthread_attr_setdetachstate(&attr, detach);
13328 #endif
13329         if( status ) return status;
13330         status = pthread_create( &t, &attr, task, NULL );
13331 #if HAVE_PTHREADS < 7
13332         if( status < 0 ) status = errno;
13333 #endif
13334         if( status ) return status;
13335 #else
13336         /* Draft 4 pthreads */
13337         status = pthread_create( &t, pthread_attr_default, task, NULL );
13338         if( status ) return errno;
13339
13340         /* give thread a chance to complete */
13341         /* it should remain joinable and hence detachable */
13342         sleep( 1 );
13343
13344         status = pthread_detach( &t );
13345         if( status ) return errno;
13346 #endif
13347
13348 #ifdef HAVE_LINUX_THREADS
13349         pthread_kill_other_threads_np();
13350 #endif
13351
13352         return 0;
13353
13354 }
13355
13356 EOF
13357 if { (eval echo configure:13358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13358 then
13359   ol_cv_pthread_lpthread_lmach_lexc=yes
13360 else
13361   echo "configure: failed program was:" >&5
13362   cat conftest.$ac_ext >&5
13363   rm -fr conftest*
13364   ol_cv_pthread_lpthread_lmach_lexc=no
13365 fi
13366 rm -fr conftest*
13367 fi
13368
13369
13370                 # restore the LIBS
13371                 LIBS="$ol_LIBS"
13372         
13373 fi
13374
13375 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13376
13377         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13378                 ol_link_pthreads="-lpthread -lmach -lexc"
13379                 ol_link_threads=posix
13380         fi
13381 fi
13382
13383
13384                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13385 if test "$ol_link_threads" = no ; then
13386         # try -lpthread -Wl,-woff,85
13387         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13388 echo "configure:13389: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13389 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13390   echo $ac_n "(cached) $ac_c" 1>&6
13391 else
13392   
13393                 # save the flags
13394                 ol_LIBS="$LIBS"
13395                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13396
13397                 if test "$cross_compiling" = yes; then
13398   cat > conftest.$ac_ext <<EOF
13399 #line 13400 "configure"
13400 #include "confdefs.h"
13401 /* pthread test headers */
13402 #include <pthread.h>
13403 #if HAVE_PTHREADS < 7
13404 #include <errno.h>
13405 #endif
13406 #ifndef NULL
13407 #define NULL (void*)0
13408 #endif
13409
13410 static void *task(p)
13411         void *p;
13412 {
13413         return (void *) (p == NULL);
13414 }
13415
13416 int main() {
13417
13418         /* pthread test function */
13419 #ifndef PTHREAD_CREATE_DETACHED
13420 #define PTHREAD_CREATE_DETACHED 1
13421 #endif
13422         pthread_t t;
13423         int status;
13424         int detach = PTHREAD_CREATE_DETACHED;
13425
13426 #if HAVE_PTHREADS > 4
13427         /* Final pthreads */
13428         pthread_attr_t attr;
13429
13430         status = pthread_attr_init(&attr);
13431         if( status ) return status;
13432
13433 #if HAVE_PTHREADS < 7
13434         status = pthread_attr_setdetachstate(&attr, &detach);
13435         if( status < 0 ) status = errno;
13436 #else
13437         status = pthread_attr_setdetachstate(&attr, detach);
13438 #endif
13439         if( status ) return status;
13440         status = pthread_create( &t, &attr, task, NULL );
13441 #if HAVE_PTHREADS < 7
13442         if( status < 0 ) status = errno;
13443 #endif
13444         if( status ) return status;
13445 #else
13446         /* Draft 4 pthreads */
13447         status = pthread_create( &t, pthread_attr_default, task, NULL );
13448         if( status ) return errno;
13449
13450         /* give thread a chance to complete */
13451         /* it should remain joinable and hence detachable */
13452         sleep( 1 );
13453
13454         status = pthread_detach( &t );
13455         if( status ) return errno;
13456 #endif
13457
13458 #ifdef HAVE_LINUX_THREADS
13459         pthread_kill_other_threads_np();
13460 #endif
13461
13462         return 0;
13463
13464 ; return 0; }
13465 EOF
13466 if { (eval echo configure:13467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13467   rm -rf conftest*
13468   ol_cv_pthread_lib_lpthread_woff=yes
13469 else
13470   echo "configure: failed program was:" >&5
13471   cat conftest.$ac_ext >&5
13472   rm -rf conftest*
13473   ol_cv_pthread_lib_lpthread_woff=no
13474 fi
13475 rm -f conftest*
13476 else
13477   cat > conftest.$ac_ext <<EOF
13478 #line 13479 "configure"
13479 #include "confdefs.h"
13480 /* pthread test headers */
13481 #include <pthread.h>
13482 #if HAVE_PTHREADS < 7
13483 #include <errno.h>
13484 #endif
13485 #ifndef NULL
13486 #define NULL (void*)0
13487 #endif
13488
13489 static void *task(p)
13490         void *p;
13491 {
13492         return (void *) (p == NULL);
13493 }
13494
13495
13496 int main(argc, argv)
13497         int argc;
13498         char **argv;
13499 {
13500
13501         /* pthread test function */
13502 #ifndef PTHREAD_CREATE_DETACHED
13503 #define PTHREAD_CREATE_DETACHED 1
13504 #endif
13505         pthread_t t;
13506         int status;
13507         int detach = PTHREAD_CREATE_DETACHED;
13508
13509 #if HAVE_PTHREADS > 4
13510         /* Final pthreads */
13511         pthread_attr_t attr;
13512
13513         status = pthread_attr_init(&attr);
13514         if( status ) return status;
13515
13516 #if HAVE_PTHREADS < 7
13517         status = pthread_attr_setdetachstate(&attr, &detach);
13518         if( status < 0 ) status = errno;
13519 #else
13520         status = pthread_attr_setdetachstate(&attr, detach);
13521 #endif
13522         if( status ) return status;
13523         status = pthread_create( &t, &attr, task, NULL );
13524 #if HAVE_PTHREADS < 7
13525         if( status < 0 ) status = errno;
13526 #endif
13527         if( status ) return status;
13528 #else
13529         /* Draft 4 pthreads */
13530         status = pthread_create( &t, pthread_attr_default, task, NULL );
13531         if( status ) return errno;
13532
13533         /* give thread a chance to complete */
13534         /* it should remain joinable and hence detachable */
13535         sleep( 1 );
13536
13537         status = pthread_detach( &t );
13538         if( status ) return errno;
13539 #endif
13540
13541 #ifdef HAVE_LINUX_THREADS
13542         pthread_kill_other_threads_np();
13543 #endif
13544
13545         return 0;
13546
13547 }
13548
13549 EOF
13550 if { (eval echo configure:13551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13551 then
13552   ol_cv_pthread_lib_lpthread_woff=yes
13553 else
13554   echo "configure: failed program was:" >&5
13555   cat conftest.$ac_ext >&5
13556   rm -fr conftest*
13557   ol_cv_pthread_lib_lpthread_woff=no
13558 fi
13559 rm -fr conftest*
13560 fi
13561
13562
13563                 # restore the LIBS
13564                 LIBS="$ol_LIBS"
13565         
13566 fi
13567
13568 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13569
13570         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13571                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13572                 ol_link_threads=posix
13573         fi
13574 fi
13575
13576
13577                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13578 if test "$ol_link_threads" = no ; then
13579         # try -lpthread
13580         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13581 echo "configure:13582: checking for pthread link with -lpthread" >&5
13582 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13583   echo $ac_n "(cached) $ac_c" 1>&6
13584 else
13585   
13586                 # save the flags
13587                 ol_LIBS="$LIBS"
13588                 LIBS="-lpthread $LIBS"
13589
13590                 if test "$cross_compiling" = yes; then
13591   cat > conftest.$ac_ext <<EOF
13592 #line 13593 "configure"
13593 #include "confdefs.h"
13594 /* pthread test headers */
13595 #include <pthread.h>
13596 #if HAVE_PTHREADS < 7
13597 #include <errno.h>
13598 #endif
13599 #ifndef NULL
13600 #define NULL (void*)0
13601 #endif
13602
13603 static void *task(p)
13604         void *p;
13605 {
13606         return (void *) (p == NULL);
13607 }
13608
13609 int main() {
13610
13611         /* pthread test function */
13612 #ifndef PTHREAD_CREATE_DETACHED
13613 #define PTHREAD_CREATE_DETACHED 1
13614 #endif
13615         pthread_t t;
13616         int status;
13617         int detach = PTHREAD_CREATE_DETACHED;
13618
13619 #if HAVE_PTHREADS > 4
13620         /* Final pthreads */
13621         pthread_attr_t attr;
13622
13623         status = pthread_attr_init(&attr);
13624         if( status ) return status;
13625
13626 #if HAVE_PTHREADS < 7
13627         status = pthread_attr_setdetachstate(&attr, &detach);
13628         if( status < 0 ) status = errno;
13629 #else
13630         status = pthread_attr_setdetachstate(&attr, detach);
13631 #endif
13632         if( status ) return status;
13633         status = pthread_create( &t, &attr, task, NULL );
13634 #if HAVE_PTHREADS < 7
13635         if( status < 0 ) status = errno;
13636 #endif
13637         if( status ) return status;
13638 #else
13639         /* Draft 4 pthreads */
13640         status = pthread_create( &t, pthread_attr_default, task, NULL );
13641         if( status ) return errno;
13642
13643         /* give thread a chance to complete */
13644         /* it should remain joinable and hence detachable */
13645         sleep( 1 );
13646
13647         status = pthread_detach( &t );
13648         if( status ) return errno;
13649 #endif
13650
13651 #ifdef HAVE_LINUX_THREADS
13652         pthread_kill_other_threads_np();
13653 #endif
13654
13655         return 0;
13656
13657 ; return 0; }
13658 EOF
13659 if { (eval echo configure:13660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13660   rm -rf conftest*
13661   ol_cv_pthread_lpthread=yes
13662 else
13663   echo "configure: failed program was:" >&5
13664   cat conftest.$ac_ext >&5
13665   rm -rf conftest*
13666   ol_cv_pthread_lpthread=no
13667 fi
13668 rm -f conftest*
13669 else
13670   cat > conftest.$ac_ext <<EOF
13671 #line 13672 "configure"
13672 #include "confdefs.h"
13673 /* pthread test headers */
13674 #include <pthread.h>
13675 #if HAVE_PTHREADS < 7
13676 #include <errno.h>
13677 #endif
13678 #ifndef NULL
13679 #define NULL (void*)0
13680 #endif
13681
13682 static void *task(p)
13683         void *p;
13684 {
13685         return (void *) (p == NULL);
13686 }
13687
13688
13689 int main(argc, argv)
13690         int argc;
13691         char **argv;
13692 {
13693
13694         /* pthread test function */
13695 #ifndef PTHREAD_CREATE_DETACHED
13696 #define PTHREAD_CREATE_DETACHED 1
13697 #endif
13698         pthread_t t;
13699         int status;
13700         int detach = PTHREAD_CREATE_DETACHED;
13701
13702 #if HAVE_PTHREADS > 4
13703         /* Final pthreads */
13704         pthread_attr_t attr;
13705
13706         status = pthread_attr_init(&attr);
13707         if( status ) return status;
13708
13709 #if HAVE_PTHREADS < 7
13710         status = pthread_attr_setdetachstate(&attr, &detach);
13711         if( status < 0 ) status = errno;
13712 #else
13713         status = pthread_attr_setdetachstate(&attr, detach);
13714 #endif
13715         if( status ) return status;
13716         status = pthread_create( &t, &attr, task, NULL );
13717 #if HAVE_PTHREADS < 7
13718         if( status < 0 ) status = errno;
13719 #endif
13720         if( status ) return status;
13721 #else
13722         /* Draft 4 pthreads */
13723         status = pthread_create( &t, pthread_attr_default, task, NULL );
13724         if( status ) return errno;
13725
13726         /* give thread a chance to complete */
13727         /* it should remain joinable and hence detachable */
13728         sleep( 1 );
13729
13730         status = pthread_detach( &t );
13731         if( status ) return errno;
13732 #endif
13733
13734 #ifdef HAVE_LINUX_THREADS
13735         pthread_kill_other_threads_np();
13736 #endif
13737
13738         return 0;
13739
13740 }
13741
13742 EOF
13743 if { (eval echo configure:13744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13744 then
13745   ol_cv_pthread_lpthread=yes
13746 else
13747   echo "configure: failed program was:" >&5
13748   cat conftest.$ac_ext >&5
13749   rm -fr conftest*
13750   ol_cv_pthread_lpthread=no
13751 fi
13752 rm -fr conftest*
13753 fi
13754
13755
13756                 # restore the LIBS
13757                 LIBS="$ol_LIBS"
13758         
13759 fi
13760
13761 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13762
13763         if test $ol_cv_pthread_lpthread = yes ; then
13764                 ol_link_pthreads="-lpthread"
13765                 ol_link_threads=posix
13766         fi
13767 fi
13768
13769                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13770 if test "$ol_link_threads" = no ; then
13771         # try -lc_r
13772         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13773 echo "configure:13774: checking for pthread link with -lc_r" >&5
13774 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13775   echo $ac_n "(cached) $ac_c" 1>&6
13776 else
13777   
13778                 # save the flags
13779                 ol_LIBS="$LIBS"
13780                 LIBS="-lc_r $LIBS"
13781
13782                 if test "$cross_compiling" = yes; then
13783   cat > conftest.$ac_ext <<EOF
13784 #line 13785 "configure"
13785 #include "confdefs.h"
13786 /* pthread test headers */
13787 #include <pthread.h>
13788 #if HAVE_PTHREADS < 7
13789 #include <errno.h>
13790 #endif
13791 #ifndef NULL
13792 #define NULL (void*)0
13793 #endif
13794
13795 static void *task(p)
13796         void *p;
13797 {
13798         return (void *) (p == NULL);
13799 }
13800
13801 int main() {
13802
13803         /* pthread test function */
13804 #ifndef PTHREAD_CREATE_DETACHED
13805 #define PTHREAD_CREATE_DETACHED 1
13806 #endif
13807         pthread_t t;
13808         int status;
13809         int detach = PTHREAD_CREATE_DETACHED;
13810
13811 #if HAVE_PTHREADS > 4
13812         /* Final pthreads */
13813         pthread_attr_t attr;
13814
13815         status = pthread_attr_init(&attr);
13816         if( status ) return status;
13817
13818 #if HAVE_PTHREADS < 7
13819         status = pthread_attr_setdetachstate(&attr, &detach);
13820         if( status < 0 ) status = errno;
13821 #else
13822         status = pthread_attr_setdetachstate(&attr, detach);
13823 #endif
13824         if( status ) return status;
13825         status = pthread_create( &t, &attr, task, NULL );
13826 #if HAVE_PTHREADS < 7
13827         if( status < 0 ) status = errno;
13828 #endif
13829         if( status ) return status;
13830 #else
13831         /* Draft 4 pthreads */
13832         status = pthread_create( &t, pthread_attr_default, task, NULL );
13833         if( status ) return errno;
13834
13835         /* give thread a chance to complete */
13836         /* it should remain joinable and hence detachable */
13837         sleep( 1 );
13838
13839         status = pthread_detach( &t );
13840         if( status ) return errno;
13841 #endif
13842
13843 #ifdef HAVE_LINUX_THREADS
13844         pthread_kill_other_threads_np();
13845 #endif
13846
13847         return 0;
13848
13849 ; return 0; }
13850 EOF
13851 if { (eval echo configure:13852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13852   rm -rf conftest*
13853   ol_cv_pthread_lc_r=yes
13854 else
13855   echo "configure: failed program was:" >&5
13856   cat conftest.$ac_ext >&5
13857   rm -rf conftest*
13858   ol_cv_pthread_lc_r=no
13859 fi
13860 rm -f conftest*
13861 else
13862   cat > conftest.$ac_ext <<EOF
13863 #line 13864 "configure"
13864 #include "confdefs.h"
13865 /* pthread test headers */
13866 #include <pthread.h>
13867 #if HAVE_PTHREADS < 7
13868 #include <errno.h>
13869 #endif
13870 #ifndef NULL
13871 #define NULL (void*)0
13872 #endif
13873
13874 static void *task(p)
13875         void *p;
13876 {
13877         return (void *) (p == NULL);
13878 }
13879
13880
13881 int main(argc, argv)
13882         int argc;
13883         char **argv;
13884 {
13885
13886         /* pthread test function */
13887 #ifndef PTHREAD_CREATE_DETACHED
13888 #define PTHREAD_CREATE_DETACHED 1
13889 #endif
13890         pthread_t t;
13891         int status;
13892         int detach = PTHREAD_CREATE_DETACHED;
13893
13894 #if HAVE_PTHREADS > 4
13895         /* Final pthreads */
13896         pthread_attr_t attr;
13897
13898         status = pthread_attr_init(&attr);
13899         if( status ) return status;
13900
13901 #if HAVE_PTHREADS < 7
13902         status = pthread_attr_setdetachstate(&attr, &detach);
13903         if( status < 0 ) status = errno;
13904 #else
13905         status = pthread_attr_setdetachstate(&attr, detach);
13906 #endif
13907         if( status ) return status;
13908         status = pthread_create( &t, &attr, task, NULL );
13909 #if HAVE_PTHREADS < 7
13910         if( status < 0 ) status = errno;
13911 #endif
13912         if( status ) return status;
13913 #else
13914         /* Draft 4 pthreads */
13915         status = pthread_create( &t, pthread_attr_default, task, NULL );
13916         if( status ) return errno;
13917
13918         /* give thread a chance to complete */
13919         /* it should remain joinable and hence detachable */
13920         sleep( 1 );
13921
13922         status = pthread_detach( &t );
13923         if( status ) return errno;
13924 #endif
13925
13926 #ifdef HAVE_LINUX_THREADS
13927         pthread_kill_other_threads_np();
13928 #endif
13929
13930         return 0;
13931
13932 }
13933
13934 EOF
13935 if { (eval echo configure:13936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13936 then
13937   ol_cv_pthread_lc_r=yes
13938 else
13939   echo "configure: failed program was:" >&5
13940   cat conftest.$ac_ext >&5
13941   rm -fr conftest*
13942   ol_cv_pthread_lc_r=no
13943 fi
13944 rm -fr conftest*
13945 fi
13946
13947
13948                 # restore the LIBS
13949                 LIBS="$ol_LIBS"
13950         
13951 fi
13952
13953 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13954
13955         if test $ol_cv_pthread_lc_r = yes ; then
13956                 ol_link_pthreads="-lc_r"
13957                 ol_link_threads=posix
13958         fi
13959 fi
13960
13961
13962                 # Pthread try link: -threads (ol_cv_pthread_threads)
13963 if test "$ol_link_threads" = no ; then
13964         # try -threads
13965         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13966 echo "configure:13967: checking for pthread link with -threads" >&5
13967 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13968   echo $ac_n "(cached) $ac_c" 1>&6
13969 else
13970   
13971                 # save the flags
13972                 ol_LIBS="$LIBS"
13973                 LIBS="-threads $LIBS"
13974
13975                 if test "$cross_compiling" = yes; then
13976   cat > conftest.$ac_ext <<EOF
13977 #line 13978 "configure"
13978 #include "confdefs.h"
13979 /* pthread test headers */
13980 #include <pthread.h>
13981 #if HAVE_PTHREADS < 7
13982 #include <errno.h>
13983 #endif
13984 #ifndef NULL
13985 #define NULL (void*)0
13986 #endif
13987
13988 static void *task(p)
13989         void *p;
13990 {
13991         return (void *) (p == NULL);
13992 }
13993
13994 int main() {
13995
13996         /* pthread test function */
13997 #ifndef PTHREAD_CREATE_DETACHED
13998 #define PTHREAD_CREATE_DETACHED 1
13999 #endif
14000         pthread_t t;
14001         int status;
14002         int detach = PTHREAD_CREATE_DETACHED;
14003
14004 #if HAVE_PTHREADS > 4
14005         /* Final pthreads */
14006         pthread_attr_t attr;
14007
14008         status = pthread_attr_init(&attr);
14009         if( status ) return status;
14010
14011 #if HAVE_PTHREADS < 7
14012         status = pthread_attr_setdetachstate(&attr, &detach);
14013         if( status < 0 ) status = errno;
14014 #else
14015         status = pthread_attr_setdetachstate(&attr, detach);
14016 #endif
14017         if( status ) return status;
14018         status = pthread_create( &t, &attr, task, NULL );
14019 #if HAVE_PTHREADS < 7
14020         if( status < 0 ) status = errno;
14021 #endif
14022         if( status ) return status;
14023 #else
14024         /* Draft 4 pthreads */
14025         status = pthread_create( &t, pthread_attr_default, task, NULL );
14026         if( status ) return errno;
14027
14028         /* give thread a chance to complete */
14029         /* it should remain joinable and hence detachable */
14030         sleep( 1 );
14031
14032         status = pthread_detach( &t );
14033         if( status ) return errno;
14034 #endif
14035
14036 #ifdef HAVE_LINUX_THREADS
14037         pthread_kill_other_threads_np();
14038 #endif
14039
14040         return 0;
14041
14042 ; return 0; }
14043 EOF
14044 if { (eval echo configure:14045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14045   rm -rf conftest*
14046   ol_cv_pthread_threads=yes
14047 else
14048   echo "configure: failed program was:" >&5
14049   cat conftest.$ac_ext >&5
14050   rm -rf conftest*
14051   ol_cv_pthread_threads=no
14052 fi
14053 rm -f conftest*
14054 else
14055   cat > conftest.$ac_ext <<EOF
14056 #line 14057 "configure"
14057 #include "confdefs.h"
14058 /* pthread test headers */
14059 #include <pthread.h>
14060 #if HAVE_PTHREADS < 7
14061 #include <errno.h>
14062 #endif
14063 #ifndef NULL
14064 #define NULL (void*)0
14065 #endif
14066
14067 static void *task(p)
14068         void *p;
14069 {
14070         return (void *) (p == NULL);
14071 }
14072
14073
14074 int main(argc, argv)
14075         int argc;
14076         char **argv;
14077 {
14078
14079         /* pthread test function */
14080 #ifndef PTHREAD_CREATE_DETACHED
14081 #define PTHREAD_CREATE_DETACHED 1
14082 #endif
14083         pthread_t t;
14084         int status;
14085         int detach = PTHREAD_CREATE_DETACHED;
14086
14087 #if HAVE_PTHREADS > 4
14088         /* Final pthreads */
14089         pthread_attr_t attr;
14090
14091         status = pthread_attr_init(&attr);
14092         if( status ) return status;
14093
14094 #if HAVE_PTHREADS < 7
14095         status = pthread_attr_setdetachstate(&attr, &detach);
14096         if( status < 0 ) status = errno;
14097 #else
14098         status = pthread_attr_setdetachstate(&attr, detach);
14099 #endif
14100         if( status ) return status;
14101         status = pthread_create( &t, &attr, task, NULL );
14102 #if HAVE_PTHREADS < 7
14103         if( status < 0 ) status = errno;
14104 #endif
14105         if( status ) return status;
14106 #else
14107         /* Draft 4 pthreads */
14108         status = pthread_create( &t, pthread_attr_default, task, NULL );
14109         if( status ) return errno;
14110
14111         /* give thread a chance to complete */
14112         /* it should remain joinable and hence detachable */
14113         sleep( 1 );
14114
14115         status = pthread_detach( &t );
14116         if( status ) return errno;
14117 #endif
14118
14119 #ifdef HAVE_LINUX_THREADS
14120         pthread_kill_other_threads_np();
14121 #endif
14122
14123         return 0;
14124
14125 }
14126
14127 EOF
14128 if { (eval echo configure:14129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14129 then
14130   ol_cv_pthread_threads=yes
14131 else
14132   echo "configure: failed program was:" >&5
14133   cat conftest.$ac_ext >&5
14134   rm -fr conftest*
14135   ol_cv_pthread_threads=no
14136 fi
14137 rm -fr conftest*
14138 fi
14139
14140
14141                 # restore the LIBS
14142                 LIBS="$ol_LIBS"
14143         
14144 fi
14145
14146 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14147
14148         if test $ol_cv_pthread_threads = yes ; then
14149                 ol_link_pthreads="-threads"
14150                 ol_link_threads=posix
14151         fi
14152 fi
14153
14154
14155                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14156 if test "$ol_link_threads" = no ; then
14157         # try -lpthreads -lmach -lexc -lc_r
14158         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14159 echo "configure:14160: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14160 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14161   echo $ac_n "(cached) $ac_c" 1>&6
14162 else
14163   
14164                 # save the flags
14165                 ol_LIBS="$LIBS"
14166                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14167
14168                 if test "$cross_compiling" = yes; then
14169   cat > conftest.$ac_ext <<EOF
14170 #line 14171 "configure"
14171 #include "confdefs.h"
14172 /* pthread test headers */
14173 #include <pthread.h>
14174 #if HAVE_PTHREADS < 7
14175 #include <errno.h>
14176 #endif
14177 #ifndef NULL
14178 #define NULL (void*)0
14179 #endif
14180
14181 static void *task(p)
14182         void *p;
14183 {
14184         return (void *) (p == NULL);
14185 }
14186
14187 int main() {
14188
14189         /* pthread test function */
14190 #ifndef PTHREAD_CREATE_DETACHED
14191 #define PTHREAD_CREATE_DETACHED 1
14192 #endif
14193         pthread_t t;
14194         int status;
14195         int detach = PTHREAD_CREATE_DETACHED;
14196
14197 #if HAVE_PTHREADS > 4
14198         /* Final pthreads */
14199         pthread_attr_t attr;
14200
14201         status = pthread_attr_init(&attr);
14202         if( status ) return status;
14203
14204 #if HAVE_PTHREADS < 7
14205         status = pthread_attr_setdetachstate(&attr, &detach);
14206         if( status < 0 ) status = errno;
14207 #else
14208         status = pthread_attr_setdetachstate(&attr, detach);
14209 #endif
14210         if( status ) return status;
14211         status = pthread_create( &t, &attr, task, NULL );
14212 #if HAVE_PTHREADS < 7
14213         if( status < 0 ) status = errno;
14214 #endif
14215         if( status ) return status;
14216 #else
14217         /* Draft 4 pthreads */
14218         status = pthread_create( &t, pthread_attr_default, task, NULL );
14219         if( status ) return errno;
14220
14221         /* give thread a chance to complete */
14222         /* it should remain joinable and hence detachable */
14223         sleep( 1 );
14224
14225         status = pthread_detach( &t );
14226         if( status ) return errno;
14227 #endif
14228
14229 #ifdef HAVE_LINUX_THREADS
14230         pthread_kill_other_threads_np();
14231 #endif
14232
14233         return 0;
14234
14235 ; return 0; }
14236 EOF
14237 if { (eval echo configure:14238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14238   rm -rf conftest*
14239   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14240 else
14241   echo "configure: failed program was:" >&5
14242   cat conftest.$ac_ext >&5
14243   rm -rf conftest*
14244   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14245 fi
14246 rm -f conftest*
14247 else
14248   cat > conftest.$ac_ext <<EOF
14249 #line 14250 "configure"
14250 #include "confdefs.h"
14251 /* pthread test headers */
14252 #include <pthread.h>
14253 #if HAVE_PTHREADS < 7
14254 #include <errno.h>
14255 #endif
14256 #ifndef NULL
14257 #define NULL (void*)0
14258 #endif
14259
14260 static void *task(p)
14261         void *p;
14262 {
14263         return (void *) (p == NULL);
14264 }
14265
14266
14267 int main(argc, argv)
14268         int argc;
14269         char **argv;
14270 {
14271
14272         /* pthread test function */
14273 #ifndef PTHREAD_CREATE_DETACHED
14274 #define PTHREAD_CREATE_DETACHED 1
14275 #endif
14276         pthread_t t;
14277         int status;
14278         int detach = PTHREAD_CREATE_DETACHED;
14279
14280 #if HAVE_PTHREADS > 4
14281         /* Final pthreads */
14282         pthread_attr_t attr;
14283
14284         status = pthread_attr_init(&attr);
14285         if( status ) return status;
14286
14287 #if HAVE_PTHREADS < 7
14288         status = pthread_attr_setdetachstate(&attr, &detach);
14289         if( status < 0 ) status = errno;
14290 #else
14291         status = pthread_attr_setdetachstate(&attr, detach);
14292 #endif
14293         if( status ) return status;
14294         status = pthread_create( &t, &attr, task, NULL );
14295 #if HAVE_PTHREADS < 7
14296         if( status < 0 ) status = errno;
14297 #endif
14298         if( status ) return status;
14299 #else
14300         /* Draft 4 pthreads */
14301         status = pthread_create( &t, pthread_attr_default, task, NULL );
14302         if( status ) return errno;
14303
14304         /* give thread a chance to complete */
14305         /* it should remain joinable and hence detachable */
14306         sleep( 1 );
14307
14308         status = pthread_detach( &t );
14309         if( status ) return errno;
14310 #endif
14311
14312 #ifdef HAVE_LINUX_THREADS
14313         pthread_kill_other_threads_np();
14314 #endif
14315
14316         return 0;
14317
14318 }
14319
14320 EOF
14321 if { (eval echo configure:14322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14322 then
14323   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14324 else
14325   echo "configure: failed program was:" >&5
14326   cat conftest.$ac_ext >&5
14327   rm -fr conftest*
14328   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14329 fi
14330 rm -fr conftest*
14331 fi
14332
14333
14334                 # restore the LIBS
14335                 LIBS="$ol_LIBS"
14336         
14337 fi
14338
14339 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14340
14341         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14342                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14343                 ol_link_threads=posix
14344         fi
14345 fi
14346
14347                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14348 if test "$ol_link_threads" = no ; then
14349         # try -lpthreads -lmach -lexc
14350         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14351 echo "configure:14352: checking for pthread link with -lpthreads -lmach -lexc" >&5
14352 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14353   echo $ac_n "(cached) $ac_c" 1>&6
14354 else
14355   
14356                 # save the flags
14357                 ol_LIBS="$LIBS"
14358                 LIBS="-lpthreads -lmach -lexc $LIBS"
14359
14360                 if test "$cross_compiling" = yes; then
14361   cat > conftest.$ac_ext <<EOF
14362 #line 14363 "configure"
14363 #include "confdefs.h"
14364 /* pthread test headers */
14365 #include <pthread.h>
14366 #if HAVE_PTHREADS < 7
14367 #include <errno.h>
14368 #endif
14369 #ifndef NULL
14370 #define NULL (void*)0
14371 #endif
14372
14373 static void *task(p)
14374         void *p;
14375 {
14376         return (void *) (p == NULL);
14377 }
14378
14379 int main() {
14380
14381         /* pthread test function */
14382 #ifndef PTHREAD_CREATE_DETACHED
14383 #define PTHREAD_CREATE_DETACHED 1
14384 #endif
14385         pthread_t t;
14386         int status;
14387         int detach = PTHREAD_CREATE_DETACHED;
14388
14389 #if HAVE_PTHREADS > 4
14390         /* Final pthreads */
14391         pthread_attr_t attr;
14392
14393         status = pthread_attr_init(&attr);
14394         if( status ) return status;
14395
14396 #if HAVE_PTHREADS < 7
14397         status = pthread_attr_setdetachstate(&attr, &detach);
14398         if( status < 0 ) status = errno;
14399 #else
14400         status = pthread_attr_setdetachstate(&attr, detach);
14401 #endif
14402         if( status ) return status;
14403         status = pthread_create( &t, &attr, task, NULL );
14404 #if HAVE_PTHREADS < 7
14405         if( status < 0 ) status = errno;
14406 #endif
14407         if( status ) return status;
14408 #else
14409         /* Draft 4 pthreads */
14410         status = pthread_create( &t, pthread_attr_default, task, NULL );
14411         if( status ) return errno;
14412
14413         /* give thread a chance to complete */
14414         /* it should remain joinable and hence detachable */
14415         sleep( 1 );
14416
14417         status = pthread_detach( &t );
14418         if( status ) return errno;
14419 #endif
14420
14421 #ifdef HAVE_LINUX_THREADS
14422         pthread_kill_other_threads_np();
14423 #endif
14424
14425         return 0;
14426
14427 ; return 0; }
14428 EOF
14429 if { (eval echo configure:14430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14430   rm -rf conftest*
14431   ol_cv_pthread_lpthreads_lmach_lexc=yes
14432 else
14433   echo "configure: failed program was:" >&5
14434   cat conftest.$ac_ext >&5
14435   rm -rf conftest*
14436   ol_cv_pthread_lpthreads_lmach_lexc=no
14437 fi
14438 rm -f conftest*
14439 else
14440   cat > conftest.$ac_ext <<EOF
14441 #line 14442 "configure"
14442 #include "confdefs.h"
14443 /* pthread test headers */
14444 #include <pthread.h>
14445 #if HAVE_PTHREADS < 7
14446 #include <errno.h>
14447 #endif
14448 #ifndef NULL
14449 #define NULL (void*)0
14450 #endif
14451
14452 static void *task(p)
14453         void *p;
14454 {
14455         return (void *) (p == NULL);
14456 }
14457
14458
14459 int main(argc, argv)
14460         int argc;
14461         char **argv;
14462 {
14463
14464         /* pthread test function */
14465 #ifndef PTHREAD_CREATE_DETACHED
14466 #define PTHREAD_CREATE_DETACHED 1
14467 #endif
14468         pthread_t t;
14469         int status;
14470         int detach = PTHREAD_CREATE_DETACHED;
14471
14472 #if HAVE_PTHREADS > 4
14473         /* Final pthreads */
14474         pthread_attr_t attr;
14475
14476         status = pthread_attr_init(&attr);
14477         if( status ) return status;
14478
14479 #if HAVE_PTHREADS < 7
14480         status = pthread_attr_setdetachstate(&attr, &detach);
14481         if( status < 0 ) status = errno;
14482 #else
14483         status = pthread_attr_setdetachstate(&attr, detach);
14484 #endif
14485         if( status ) return status;
14486         status = pthread_create( &t, &attr, task, NULL );
14487 #if HAVE_PTHREADS < 7
14488         if( status < 0 ) status = errno;
14489 #endif
14490         if( status ) return status;
14491 #else
14492         /* Draft 4 pthreads */
14493         status = pthread_create( &t, pthread_attr_default, task, NULL );
14494         if( status ) return errno;
14495
14496         /* give thread a chance to complete */
14497         /* it should remain joinable and hence detachable */
14498         sleep( 1 );
14499
14500         status = pthread_detach( &t );
14501         if( status ) return errno;
14502 #endif
14503
14504 #ifdef HAVE_LINUX_THREADS
14505         pthread_kill_other_threads_np();
14506 #endif
14507
14508         return 0;
14509
14510 }
14511
14512 EOF
14513 if { (eval echo configure:14514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14514 then
14515   ol_cv_pthread_lpthreads_lmach_lexc=yes
14516 else
14517   echo "configure: failed program was:" >&5
14518   cat conftest.$ac_ext >&5
14519   rm -fr conftest*
14520   ol_cv_pthread_lpthreads_lmach_lexc=no
14521 fi
14522 rm -fr conftest*
14523 fi
14524
14525
14526                 # restore the LIBS
14527                 LIBS="$ol_LIBS"
14528         
14529 fi
14530
14531 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14532
14533         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14534                 ol_link_pthreads="-lpthreads -lmach -lexc"
14535                 ol_link_threads=posix
14536         fi
14537 fi
14538
14539                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14540 if test "$ol_link_threads" = no ; then
14541         # try -lpthreads -lexc
14542         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14543 echo "configure:14544: checking for pthread link with -lpthreads -lexc" >&5
14544 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14545   echo $ac_n "(cached) $ac_c" 1>&6
14546 else
14547   
14548                 # save the flags
14549                 ol_LIBS="$LIBS"
14550                 LIBS="-lpthreads -lexc $LIBS"
14551
14552                 if test "$cross_compiling" = yes; then
14553   cat > conftest.$ac_ext <<EOF
14554 #line 14555 "configure"
14555 #include "confdefs.h"
14556 /* pthread test headers */
14557 #include <pthread.h>
14558 #if HAVE_PTHREADS < 7
14559 #include <errno.h>
14560 #endif
14561 #ifndef NULL
14562 #define NULL (void*)0
14563 #endif
14564
14565 static void *task(p)
14566         void *p;
14567 {
14568         return (void *) (p == NULL);
14569 }
14570
14571 int main() {
14572
14573         /* pthread test function */
14574 #ifndef PTHREAD_CREATE_DETACHED
14575 #define PTHREAD_CREATE_DETACHED 1
14576 #endif
14577         pthread_t t;
14578         int status;
14579         int detach = PTHREAD_CREATE_DETACHED;
14580
14581 #if HAVE_PTHREADS > 4
14582         /* Final pthreads */
14583         pthread_attr_t attr;
14584
14585         status = pthread_attr_init(&attr);
14586         if( status ) return status;
14587
14588 #if HAVE_PTHREADS < 7
14589         status = pthread_attr_setdetachstate(&attr, &detach);
14590         if( status < 0 ) status = errno;
14591 #else
14592         status = pthread_attr_setdetachstate(&attr, detach);
14593 #endif
14594         if( status ) return status;
14595         status = pthread_create( &t, &attr, task, NULL );
14596 #if HAVE_PTHREADS < 7
14597         if( status < 0 ) status = errno;
14598 #endif
14599         if( status ) return status;
14600 #else
14601         /* Draft 4 pthreads */
14602         status = pthread_create( &t, pthread_attr_default, task, NULL );
14603         if( status ) return errno;
14604
14605         /* give thread a chance to complete */
14606         /* it should remain joinable and hence detachable */
14607         sleep( 1 );
14608
14609         status = pthread_detach( &t );
14610         if( status ) return errno;
14611 #endif
14612
14613 #ifdef HAVE_LINUX_THREADS
14614         pthread_kill_other_threads_np();
14615 #endif
14616
14617         return 0;
14618
14619 ; return 0; }
14620 EOF
14621 if { (eval echo configure:14622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14622   rm -rf conftest*
14623   ol_cv_pthread_lpthreads_lexc=yes
14624 else
14625   echo "configure: failed program was:" >&5
14626   cat conftest.$ac_ext >&5
14627   rm -rf conftest*
14628   ol_cv_pthread_lpthreads_lexc=no
14629 fi
14630 rm -f conftest*
14631 else
14632   cat > conftest.$ac_ext <<EOF
14633 #line 14634 "configure"
14634 #include "confdefs.h"
14635 /* pthread test headers */
14636 #include <pthread.h>
14637 #if HAVE_PTHREADS < 7
14638 #include <errno.h>
14639 #endif
14640 #ifndef NULL
14641 #define NULL (void*)0
14642 #endif
14643
14644 static void *task(p)
14645         void *p;
14646 {
14647         return (void *) (p == NULL);
14648 }
14649
14650
14651 int main(argc, argv)
14652         int argc;
14653         char **argv;
14654 {
14655
14656         /* pthread test function */
14657 #ifndef PTHREAD_CREATE_DETACHED
14658 #define PTHREAD_CREATE_DETACHED 1
14659 #endif
14660         pthread_t t;
14661         int status;
14662         int detach = PTHREAD_CREATE_DETACHED;
14663
14664 #if HAVE_PTHREADS > 4
14665         /* Final pthreads */
14666         pthread_attr_t attr;
14667
14668         status = pthread_attr_init(&attr);
14669         if( status ) return status;
14670
14671 #if HAVE_PTHREADS < 7
14672         status = pthread_attr_setdetachstate(&attr, &detach);
14673         if( status < 0 ) status = errno;
14674 #else
14675         status = pthread_attr_setdetachstate(&attr, detach);
14676 #endif
14677         if( status ) return status;
14678         status = pthread_create( &t, &attr, task, NULL );
14679 #if HAVE_PTHREADS < 7
14680         if( status < 0 ) status = errno;
14681 #endif
14682         if( status ) return status;
14683 #else
14684         /* Draft 4 pthreads */
14685         status = pthread_create( &t, pthread_attr_default, task, NULL );
14686         if( status ) return errno;
14687
14688         /* give thread a chance to complete */
14689         /* it should remain joinable and hence detachable */
14690         sleep( 1 );
14691
14692         status = pthread_detach( &t );
14693         if( status ) return errno;
14694 #endif
14695
14696 #ifdef HAVE_LINUX_THREADS
14697         pthread_kill_other_threads_np();
14698 #endif
14699
14700         return 0;
14701
14702 }
14703
14704 EOF
14705 if { (eval echo configure:14706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14706 then
14707   ol_cv_pthread_lpthreads_lexc=yes
14708 else
14709   echo "configure: failed program was:" >&5
14710   cat conftest.$ac_ext >&5
14711   rm -fr conftest*
14712   ol_cv_pthread_lpthreads_lexc=no
14713 fi
14714 rm -fr conftest*
14715 fi
14716
14717
14718                 # restore the LIBS
14719                 LIBS="$ol_LIBS"
14720         
14721 fi
14722
14723 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14724
14725         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14726                 ol_link_pthreads="-lpthreads -lexc"
14727                 ol_link_threads=posix
14728         fi
14729 fi
14730
14731
14732                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14733 if test "$ol_link_threads" = no ; then
14734         # try -lpthreads
14735         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14736 echo "configure:14737: checking for pthread link with -lpthreads" >&5
14737 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14738   echo $ac_n "(cached) $ac_c" 1>&6
14739 else
14740   
14741                 # save the flags
14742                 ol_LIBS="$LIBS"
14743                 LIBS="-lpthreads $LIBS"
14744
14745                 if test "$cross_compiling" = yes; then
14746   cat > conftest.$ac_ext <<EOF
14747 #line 14748 "configure"
14748 #include "confdefs.h"
14749 /* pthread test headers */
14750 #include <pthread.h>
14751 #if HAVE_PTHREADS < 7
14752 #include <errno.h>
14753 #endif
14754 #ifndef NULL
14755 #define NULL (void*)0
14756 #endif
14757
14758 static void *task(p)
14759         void *p;
14760 {
14761         return (void *) (p == NULL);
14762 }
14763
14764 int main() {
14765
14766         /* pthread test function */
14767 #ifndef PTHREAD_CREATE_DETACHED
14768 #define PTHREAD_CREATE_DETACHED 1
14769 #endif
14770         pthread_t t;
14771         int status;
14772         int detach = PTHREAD_CREATE_DETACHED;
14773
14774 #if HAVE_PTHREADS > 4
14775         /* Final pthreads */
14776         pthread_attr_t attr;
14777
14778         status = pthread_attr_init(&attr);
14779         if( status ) return status;
14780
14781 #if HAVE_PTHREADS < 7
14782         status = pthread_attr_setdetachstate(&attr, &detach);
14783         if( status < 0 ) status = errno;
14784 #else
14785         status = pthread_attr_setdetachstate(&attr, detach);
14786 #endif
14787         if( status ) return status;
14788         status = pthread_create( &t, &attr, task, NULL );
14789 #if HAVE_PTHREADS < 7
14790         if( status < 0 ) status = errno;
14791 #endif
14792         if( status ) return status;
14793 #else
14794         /* Draft 4 pthreads */
14795         status = pthread_create( &t, pthread_attr_default, task, NULL );
14796         if( status ) return errno;
14797
14798         /* give thread a chance to complete */
14799         /* it should remain joinable and hence detachable */
14800         sleep( 1 );
14801
14802         status = pthread_detach( &t );
14803         if( status ) return errno;
14804 #endif
14805
14806 #ifdef HAVE_LINUX_THREADS
14807         pthread_kill_other_threads_np();
14808 #endif
14809
14810         return 0;
14811
14812 ; return 0; }
14813 EOF
14814 if { (eval echo configure:14815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14815   rm -rf conftest*
14816   ol_cv_pthread_lib_lpthreads=yes
14817 else
14818   echo "configure: failed program was:" >&5
14819   cat conftest.$ac_ext >&5
14820   rm -rf conftest*
14821   ol_cv_pthread_lib_lpthreads=no
14822 fi
14823 rm -f conftest*
14824 else
14825   cat > conftest.$ac_ext <<EOF
14826 #line 14827 "configure"
14827 #include "confdefs.h"
14828 /* pthread test headers */
14829 #include <pthread.h>
14830 #if HAVE_PTHREADS < 7
14831 #include <errno.h>
14832 #endif
14833 #ifndef NULL
14834 #define NULL (void*)0
14835 #endif
14836
14837 static void *task(p)
14838         void *p;
14839 {
14840         return (void *) (p == NULL);
14841 }
14842
14843
14844 int main(argc, argv)
14845         int argc;
14846         char **argv;
14847 {
14848
14849         /* pthread test function */
14850 #ifndef PTHREAD_CREATE_DETACHED
14851 #define PTHREAD_CREATE_DETACHED 1
14852 #endif
14853         pthread_t t;
14854         int status;
14855         int detach = PTHREAD_CREATE_DETACHED;
14856
14857 #if HAVE_PTHREADS > 4
14858         /* Final pthreads */
14859         pthread_attr_t attr;
14860
14861         status = pthread_attr_init(&attr);
14862         if( status ) return status;
14863
14864 #if HAVE_PTHREADS < 7
14865         status = pthread_attr_setdetachstate(&attr, &detach);
14866         if( status < 0 ) status = errno;
14867 #else
14868         status = pthread_attr_setdetachstate(&attr, detach);
14869 #endif
14870         if( status ) return status;
14871         status = pthread_create( &t, &attr, task, NULL );
14872 #if HAVE_PTHREADS < 7
14873         if( status < 0 ) status = errno;
14874 #endif
14875         if( status ) return status;
14876 #else
14877         /* Draft 4 pthreads */
14878         status = pthread_create( &t, pthread_attr_default, task, NULL );
14879         if( status ) return errno;
14880
14881         /* give thread a chance to complete */
14882         /* it should remain joinable and hence detachable */
14883         sleep( 1 );
14884
14885         status = pthread_detach( &t );
14886         if( status ) return errno;
14887 #endif
14888
14889 #ifdef HAVE_LINUX_THREADS
14890         pthread_kill_other_threads_np();
14891 #endif
14892
14893         return 0;
14894
14895 }
14896
14897 EOF
14898 if { (eval echo configure:14899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14899 then
14900   ol_cv_pthread_lib_lpthreads=yes
14901 else
14902   echo "configure: failed program was:" >&5
14903   cat conftest.$ac_ext >&5
14904   rm -fr conftest*
14905   ol_cv_pthread_lib_lpthreads=no
14906 fi
14907 rm -fr conftest*
14908 fi
14909
14910
14911                 # restore the LIBS
14912                 LIBS="$ol_LIBS"
14913         
14914 fi
14915
14916 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14917
14918         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14919                 ol_link_pthreads="-lpthreads"
14920                 ol_link_threads=posix
14921         fi
14922 fi
14923
14924
14925                 if test $ol_link_threads != no ; then
14926                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14927
14928                                                 save_CPPFLAGS="$CPPFLAGS"
14929                         save_LIBS="$LIBS"
14930                         LIBS="$LTHREAD_LIBS $LIBS"
14931
14932                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14933 do
14934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14935 echo "configure:14936: checking for $ac_func" >&5
14936 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14937   echo $ac_n "(cached) $ac_c" 1>&6
14938 else
14939   cat > conftest.$ac_ext <<EOF
14940 #line 14941 "configure"
14941 #include "confdefs.h"
14942 /* System header to define __stub macros and hopefully few prototypes,
14943     which can conflict with char $ac_func(); below.  */
14944 #include <assert.h>
14945 /* Override any gcc2 internal prototype to avoid an error.  */
14946 /* We use char because int might match the return type of a gcc2
14947     builtin and then its argument prototype would still apply.  */
14948 char $ac_func();
14949 char (*f)();
14950
14951 int main() {
14952
14953 /* The GNU C library defines this for functions which it implements
14954     to always fail with ENOSYS.  Some functions are actually named
14955     something starting with __ and the normal name is an alias.  */
14956 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14957 choke me
14958 #else
14959 f = $ac_func;
14960 #endif
14961
14962 ; return 0; }
14963 EOF
14964 if { (eval echo configure:14965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14965   rm -rf conftest*
14966   eval "ac_cv_func_$ac_func=yes"
14967 else
14968   echo "configure: failed program was:" >&5
14969   cat conftest.$ac_ext >&5
14970   rm -rf conftest*
14971   eval "ac_cv_func_$ac_func=no"
14972 fi
14973 rm -f conftest*
14974 fi
14975
14976 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14977   echo "$ac_t""yes" 1>&6
14978     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14979   cat >> confdefs.h <<EOF
14980 #define $ac_tr_func 1
14981 EOF
14982  
14983 else
14984   echo "$ac_t""no" 1>&6
14985 fi
14986 done
14987
14988
14989                         if test $ac_cv_func_sched_yield = no -a \
14990                                 $ac_cv_func_pthread_yield = no -a \
14991                                 $ac_cv_func_thr_yield = no ; then
14992                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14993 echo "configure:14994: checking for sched_yield in -lrt" >&5
14994 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14995 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14996   echo $ac_n "(cached) $ac_c" 1>&6
14997 else
14998   ac_save_LIBS="$LIBS"
14999 LIBS="-lrt  $LIBS"
15000 cat > conftest.$ac_ext <<EOF
15001 #line 15002 "configure"
15002 #include "confdefs.h"
15003 /* Override any gcc2 internal prototype to avoid an error.  */
15004 /* We use char because int might match the return type of a gcc2
15005     builtin and then its argument prototype would still apply.  */
15006 char sched_yield();
15007
15008 int main() {
15009 sched_yield()
15010 ; return 0; }
15011 EOF
15012 if { (eval echo configure:15013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15013   rm -rf conftest*
15014   eval "ac_cv_lib_$ac_lib_var=yes"
15015 else
15016   echo "configure: failed program was:" >&5
15017   cat conftest.$ac_ext >&5
15018   rm -rf conftest*
15019   eval "ac_cv_lib_$ac_lib_var=no"
15020 fi
15021 rm -f conftest*
15022 LIBS="$ac_save_LIBS"
15023
15024 fi
15025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15026   echo "$ac_t""yes" 1>&6
15027   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15028                                         cat >> confdefs.h <<\EOF
15029 #define HAVE_SCHED_YIELD 1
15030 EOF
15031
15032                                         ac_cv_func_sched_yield=yes
15033 else
15034   echo "$ac_t""no" 1>&6
15035 ac_cv_func_sched_yield=no
15036 fi
15037
15038                         fi
15039                         if test $ac_cv_func_sched_yield = no -a \
15040                                 $ac_cv_func_pthread_yield = no -a \
15041                                 "$ac_cv_func_thr_yield" = no ; then
15042                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15043                         fi
15044
15045                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15046 do
15047 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15048 echo "configure:15049: checking for $ac_func" >&5
15049 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15050   echo $ac_n "(cached) $ac_c" 1>&6
15051 else
15052   cat > conftest.$ac_ext <<EOF
15053 #line 15054 "configure"
15054 #include "confdefs.h"
15055 /* System header to define __stub macros and hopefully few prototypes,
15056     which can conflict with char $ac_func(); below.  */
15057 #include <assert.h>
15058 /* Override any gcc2 internal prototype to avoid an error.  */
15059 /* We use char because int might match the return type of a gcc2
15060     builtin and then its argument prototype would still apply.  */
15061 char $ac_func();
15062 char (*f)();
15063
15064 int main() {
15065
15066 /* The GNU C library defines this for functions which it implements
15067     to always fail with ENOSYS.  Some functions are actually named
15068     something starting with __ and the normal name is an alias.  */
15069 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15070 choke me
15071 #else
15072 f = $ac_func;
15073 #endif
15074
15075 ; return 0; }
15076 EOF
15077 if { (eval echo configure:15078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15078   rm -rf conftest*
15079   eval "ac_cv_func_$ac_func=yes"
15080 else
15081   echo "configure: failed program was:" >&5
15082   cat conftest.$ac_ext >&5
15083   rm -rf conftest*
15084   eval "ac_cv_func_$ac_func=no"
15085 fi
15086 rm -f conftest*
15087 fi
15088
15089 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15090   echo "$ac_t""yes" 1>&6
15091     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15092   cat >> confdefs.h <<EOF
15093 #define $ac_tr_func 1
15094 EOF
15095  
15096 else
15097   echo "$ac_t""no" 1>&6
15098 fi
15099 done
15100
15101
15102                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15103 echo "configure:15104: checking for pthread_detach with <pthread.h>" >&5
15104 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15105   echo $ac_n "(cached) $ac_c" 1>&6
15106 else
15107   
15108                                                                 cat > conftest.$ac_ext <<EOF
15109 #line 15110 "configure"
15110 #include "confdefs.h"
15111
15112 #include <pthread.h>
15113 #ifndef NULL
15114 #define NULL (void*)0
15115 #endif
15116
15117 int main() {
15118 pthread_detach(NULL);
15119 ; return 0; }
15120 EOF
15121 if { (eval echo configure:15122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15122   rm -rf conftest*
15123   ol_cv_func_pthread_detach=yes
15124 else
15125   echo "configure: failed program was:" >&5
15126   cat conftest.$ac_ext >&5
15127   rm -rf conftest*
15128   ol_cv_func_pthread_detach=no
15129 fi
15130 rm -f conftest*
15131                         
15132 fi
15133
15134 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15135
15136                         if test $ol_cv_func_pthread_detach = no ; then
15137                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15138                         fi
15139
15140                         cat >> confdefs.h <<\EOF
15141 #define HAVE_PTHREAD_DETACH 1
15142 EOF
15143
15144
15145                                                 for ac_func in \
15146                                 pthread_setconcurrency \
15147                                 pthread_getconcurrency \
15148                                 thr_setconcurrency \
15149                                 thr_getconcurrency \
15150                         
15151 do
15152 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15153 echo "configure:15154: checking for $ac_func" >&5
15154 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15155   echo $ac_n "(cached) $ac_c" 1>&6
15156 else
15157   cat > conftest.$ac_ext <<EOF
15158 #line 15159 "configure"
15159 #include "confdefs.h"
15160 /* System header to define __stub macros and hopefully few prototypes,
15161     which can conflict with char $ac_func(); below.  */
15162 #include <assert.h>
15163 /* Override any gcc2 internal prototype to avoid an error.  */
15164 /* We use char because int might match the return type of a gcc2
15165     builtin and then its argument prototype would still apply.  */
15166 char $ac_func();
15167 char (*f)();
15168
15169 int main() {
15170
15171 /* The GNU C library defines this for functions which it implements
15172     to always fail with ENOSYS.  Some functions are actually named
15173     something starting with __ and the normal name is an alias.  */
15174 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15175 choke me
15176 #else
15177 f = $ac_func;
15178 #endif
15179
15180 ; return 0; }
15181 EOF
15182 if { (eval echo configure:15183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15183   rm -rf conftest*
15184   eval "ac_cv_func_$ac_func=yes"
15185 else
15186   echo "configure: failed program was:" >&5
15187   cat conftest.$ac_ext >&5
15188   rm -rf conftest*
15189   eval "ac_cv_func_$ac_func=no"
15190 fi
15191 rm -f conftest*
15192 fi
15193
15194 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15195   echo "$ac_t""yes" 1>&6
15196     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15197   cat >> confdefs.h <<EOF
15198 #define $ac_tr_func 1
15199 EOF
15200  
15201 else
15202   echo "$ac_t""no" 1>&6
15203 fi
15204 done
15205
15206
15207                         
15208         for ac_func in pthread_kill_other_threads_np
15209 do
15210 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15211 echo "configure:15212: checking for $ac_func" >&5
15212 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15213   echo $ac_n "(cached) $ac_c" 1>&6
15214 else
15215   cat > conftest.$ac_ext <<EOF
15216 #line 15217 "configure"
15217 #include "confdefs.h"
15218 /* System header to define __stub macros and hopefully few prototypes,
15219     which can conflict with char $ac_func(); below.  */
15220 #include <assert.h>
15221 /* Override any gcc2 internal prototype to avoid an error.  */
15222 /* We use char because int might match the return type of a gcc2
15223     builtin and then its argument prototype would still apply.  */
15224 char $ac_func();
15225 char (*f)();
15226
15227 int main() {
15228
15229 /* The GNU C library defines this for functions which it implements
15230     to always fail with ENOSYS.  Some functions are actually named
15231     something starting with __ and the normal name is an alias.  */
15232 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15233 choke me
15234 #else
15235 f = $ac_func;
15236 #endif
15237
15238 ; return 0; }
15239 EOF
15240 if { (eval echo configure:15241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15241   rm -rf conftest*
15242   eval "ac_cv_func_$ac_func=yes"
15243 else
15244   echo "configure: failed program was:" >&5
15245   cat conftest.$ac_ext >&5
15246   rm -rf conftest*
15247   eval "ac_cv_func_$ac_func=no"
15248 fi
15249 rm -f conftest*
15250 fi
15251
15252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15253   echo "$ac_t""yes" 1>&6
15254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15255   cat >> confdefs.h <<EOF
15256 #define $ac_tr_func 1
15257 EOF
15258  
15259 else
15260   echo "$ac_t""no" 1>&6
15261 fi
15262 done
15263
15264         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15265 echo "configure:15266: checking for LinuxThreads implementation" >&5
15266 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15267   echo $ac_n "(cached) $ac_c" 1>&6
15268 else
15269   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15270 fi
15271
15272 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15273
15274                         
15275         
15276         
15277         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15278 echo "configure:15279: checking for LinuxThreads consistency" >&5
15279 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15280   echo $ac_n "(cached) $ac_c" 1>&6
15281 else
15282   
15283                 if test $ol_cv_header_linux_threads = yes -a \
15284                         $ol_cv_sys_linux_threads = yes; then
15285                         ol_cv_linux_threads=yes
15286                 elif test $ol_cv_header_linux_threads = no -a \
15287                         $ol_cv_sys_linux_threads = no; then
15288                         ol_cv_linux_threads=no
15289                 else
15290                         ol_cv_linux_threads=error
15291                 fi
15292         
15293 fi
15294
15295 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15296
15297
15298                         if test $ol_cv_linux_threads = error; then
15299                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15300                         fi
15301
15302                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15303 echo "configure:15304: checking if pthread_create() works" >&5
15304 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15305   echo $ac_n "(cached) $ac_c" 1>&6
15306 else
15307   
15308                         if test "$cross_compiling" = yes; then
15309                                 ol_cv_pthread_create_works=yes
15310 else
15311   cat > conftest.$ac_ext <<EOF
15312 #line 15313 "configure"
15313 #include "confdefs.h"
15314 /* pthread test headers */
15315 #include <pthread.h>
15316 #if HAVE_PTHREADS < 7
15317 #include <errno.h>
15318 #endif
15319 #ifndef NULL
15320 #define NULL (void*)0
15321 #endif
15322
15323 static void *task(p)
15324         void *p;
15325 {
15326         return (void *) (p == NULL);
15327 }
15328
15329
15330 int main(argc, argv)
15331         int argc;
15332         char **argv;
15333 {
15334
15335         /* pthread test function */
15336 #ifndef PTHREAD_CREATE_DETACHED
15337 #define PTHREAD_CREATE_DETACHED 1
15338 #endif
15339         pthread_t t;
15340         int status;
15341         int detach = PTHREAD_CREATE_DETACHED;
15342
15343 #if HAVE_PTHREADS > 4
15344         /* Final pthreads */
15345         pthread_attr_t attr;
15346
15347         status = pthread_attr_init(&attr);
15348         if( status ) return status;
15349
15350 #if HAVE_PTHREADS < 7
15351         status = pthread_attr_setdetachstate(&attr, &detach);
15352         if( status < 0 ) status = errno;
15353 #else
15354         status = pthread_attr_setdetachstate(&attr, detach);
15355 #endif
15356         if( status ) return status;
15357         status = pthread_create( &t, &attr, task, NULL );
15358 #if HAVE_PTHREADS < 7
15359         if( status < 0 ) status = errno;
15360 #endif
15361         if( status ) return status;
15362 #else
15363         /* Draft 4 pthreads */
15364         status = pthread_create( &t, pthread_attr_default, task, NULL );
15365         if( status ) return errno;
15366
15367         /* give thread a chance to complete */
15368         /* it should remain joinable and hence detachable */
15369         sleep( 1 );
15370
15371         status = pthread_detach( &t );
15372         if( status ) return errno;
15373 #endif
15374
15375 #ifdef HAVE_LINUX_THREADS
15376         pthread_kill_other_threads_np();
15377 #endif
15378
15379         return 0;
15380
15381 }
15382
15383 EOF
15384 if { (eval echo configure:15385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15385 then
15386   ol_cv_pthread_create_works=yes
15387 else
15388   echo "configure: failed program was:" >&5
15389   cat conftest.$ac_ext >&5
15390   rm -fr conftest*
15391   ol_cv_pthread_create_works=no
15392 fi
15393 rm -fr conftest*
15394 fi
15395
15396 fi
15397
15398 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15399
15400                         if test $ol_cv_pthread_create_works = no ; then
15401                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15402                         fi
15403
15404                                                 if test $ol_with_yielding_select = auto ; then
15405                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15406 echo "configure:15407: checking if select yields when using pthreads" >&5
15407 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15408   echo $ac_n "(cached) $ac_c" 1>&6
15409 else
15410   
15411                                 if test "$cross_compiling" = yes; then
15412   ol_cv_pthread_select_yields=cross
15413 else
15414   cat > conftest.$ac_ext <<EOF
15415 #line 15416 "configure"
15416 #include "confdefs.h"
15417
15418 #include <sys/types.h>
15419 #include <sys/time.h>
15420 #include <unistd.h>
15421 #include <pthread.h>
15422 #ifndef NULL
15423 #define NULL (void*) 0
15424 #endif
15425
15426 static int fildes[2];
15427
15428 static void *task(p)
15429         void *p;
15430 {
15431         int i;
15432         struct timeval tv;
15433
15434         fd_set rfds;
15435
15436         tv.tv_sec=10;
15437         tv.tv_usec=0;
15438
15439         FD_ZERO(&rfds);
15440         FD_SET(fildes[0], &rfds);
15441
15442         /* we're not interested in any fds */
15443         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15444
15445         if(i < 0) {
15446                 perror("select");
15447                 exit(10);
15448         }
15449
15450         exit(0); /* if we exit here, the select blocked the whole process */
15451 }
15452
15453 int main(argc, argv)
15454         int argc;
15455         char **argv;
15456 {
15457         pthread_t t;
15458
15459         /* create a pipe to select */
15460         if(pipe(&fildes[0])) {
15461                 perror("select");
15462                 exit(1);
15463         }
15464
15465 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15466         (void) pthread_setconcurrency(2);
15467 #else
15468 #ifdef HAVE_THR_SETCONCURRENCY
15469         /* Set Solaris LWP concurrency to 2 */
15470         thr_setconcurrency(2);
15471 #endif
15472 #endif
15473
15474 #if HAVE_PTHREADS < 6
15475         pthread_create(&t, pthread_attr_default, task, NULL);
15476 #else
15477         pthread_create(&t, NULL, task, NULL);
15478 #endif
15479
15480         /* make sure task runs first */
15481 #if HAVE_THR_YIELD
15482         thr_yield();
15483 #elif defined( HAVE_SCHED_YIELD )
15484         sched_yield();
15485 #elif defined( HAVE_PTHREAD_YIELD )
15486         pthread_yield();
15487 #endif
15488
15489         exit(2);
15490 }
15491 EOF
15492 if { (eval echo configure:15493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15493 then
15494   ol_cv_pthread_select_yields=no
15495 else
15496   echo "configure: failed program was:" >&5
15497   cat conftest.$ac_ext >&5
15498   rm -fr conftest*
15499   ol_cv_pthread_select_yields=yes
15500 fi
15501 rm -fr conftest*
15502 fi
15503
15504 fi
15505
15506 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15507
15508                                 if test $ol_cv_pthread_select_yields = cross ; then
15509                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15510                                 fi
15511
15512                                 if test $ol_cv_pthread_select_yields = yes ; then
15513                                         ol_with_yielding_select=yes
15514                                 fi
15515                         fi
15516
15517                                                 CPPFLAGS="$save_CPPFLAGS"
15518                         LIBS="$save_LIBS"
15519                 else
15520                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15521                 fi
15522         fi
15523
15524         if test $ol_with_threads = posix ; then
15525                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15526         fi
15527 fi
15528
15529 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15530         -o $ol_with_threads = mach ; then
15531
15532                 for ac_hdr in mach/cthreads.h cthreads.h
15533 do
15534 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15535 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15536 echo "configure:15537: checking for $ac_hdr" >&5
15537 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15538   echo $ac_n "(cached) $ac_c" 1>&6
15539 else
15540   cat > conftest.$ac_ext <<EOF
15541 #line 15542 "configure"
15542 #include "confdefs.h"
15543 #include <$ac_hdr>
15544 EOF
15545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15546 { (eval echo configure:15547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15548 if test -z "$ac_err"; then
15549   rm -rf conftest*
15550   eval "ac_cv_header_$ac_safe=yes"
15551 else
15552   echo "$ac_err" >&5
15553   echo "configure: failed program was:" >&5
15554   cat conftest.$ac_ext >&5
15555   rm -rf conftest*
15556   eval "ac_cv_header_$ac_safe=no"
15557 fi
15558 rm -f conftest*
15559 fi
15560 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15561   echo "$ac_t""yes" 1>&6
15562     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15563   cat >> confdefs.h <<EOF
15564 #define $ac_tr_hdr 1
15565 EOF
15566  
15567 else
15568   echo "$ac_t""no" 1>&6
15569 fi
15570 done
15571
15572         if test $ac_cv_header_mach_cthreads_h = yes ; then
15573                 ol_with_threads=found
15574
15575                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15576 echo "configure:15577: checking for cthread_fork" >&5
15577 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15578   echo $ac_n "(cached) $ac_c" 1>&6
15579 else
15580   cat > conftest.$ac_ext <<EOF
15581 #line 15582 "configure"
15582 #include "confdefs.h"
15583 /* System header to define __stub macros and hopefully few prototypes,
15584     which can conflict with char cthread_fork(); below.  */
15585 #include <assert.h>
15586 /* Override any gcc2 internal prototype to avoid an error.  */
15587 /* We use char because int might match the return type of a gcc2
15588     builtin and then its argument prototype would still apply.  */
15589 char cthread_fork();
15590 char (*f)();
15591
15592 int main() {
15593
15594 /* The GNU C library defines this for functions which it implements
15595     to always fail with ENOSYS.  Some functions are actually named
15596     something starting with __ and the normal name is an alias.  */
15597 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15598 choke me
15599 #else
15600 f = cthread_fork;
15601 #endif
15602
15603 ; return 0; }
15604 EOF
15605 if { (eval echo configure:15606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15606   rm -rf conftest*
15607   eval "ac_cv_func_cthread_fork=yes"
15608 else
15609   echo "configure: failed program was:" >&5
15610   cat conftest.$ac_ext >&5
15611   rm -rf conftest*
15612   eval "ac_cv_func_cthread_fork=no"
15613 fi
15614 rm -f conftest*
15615 fi
15616
15617 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15618   echo "$ac_t""yes" 1>&6
15619   ol_link_threads=yes
15620 else
15621   echo "$ac_t""no" 1>&6
15622 fi
15623
15624
15625                 if test $ol_link_threads = no ; then
15626                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15627 echo "configure:15628: checking for cthread_fork with -all_load" >&5
15628 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15629   echo $ac_n "(cached) $ac_c" 1>&6
15630 else
15631   
15632                                                                 save_LIBS="$LIBS"
15633                                 LIBS="-all_load $LIBS"
15634                                 cat > conftest.$ac_ext <<EOF
15635 #line 15636 "configure"
15636 #include "confdefs.h"
15637 #include <mach/cthreads.h>
15638 int main() {
15639
15640                                         cthread_fork((void *)0, (void *)0);
15641                                         
15642 ; return 0; }
15643 EOF
15644 if { (eval echo configure:15645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15645   rm -rf conftest*
15646   ol_cv_cthread_all_load=yes
15647 else
15648   echo "configure: failed program was:" >&5
15649   cat conftest.$ac_ext >&5
15650   rm -rf conftest*
15651   ol_cv_cthread_all_load=no
15652 fi
15653 rm -f conftest*
15654                                                                 LIBS="$save_LIBS"
15655                         
15656 fi
15657
15658 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15659
15660                         if test $ol_cv_cthread_all_load = yes ; then
15661                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15662                                 ol_link_threads=mach
15663                                 ol_with_threads=found
15664                         fi
15665                 fi
15666
15667         elif test $ac_cv_header_cthreads_h = yes ; then
15668                                 
15669                 ol_with_threads=found
15670  
15671                                 save_LIBS="$LIBS"
15672                 LIBS="$LIBS -lthreads"
15673                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15674 echo "configure:15675: checking for cthread_fork" >&5
15675 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15676   echo $ac_n "(cached) $ac_c" 1>&6
15677 else
15678   cat > conftest.$ac_ext <<EOF
15679 #line 15680 "configure"
15680 #include "confdefs.h"
15681 /* System header to define __stub macros and hopefully few prototypes,
15682     which can conflict with char cthread_fork(); below.  */
15683 #include <assert.h>
15684 /* Override any gcc2 internal prototype to avoid an error.  */
15685 /* We use char because int might match the return type of a gcc2
15686     builtin and then its argument prototype would still apply.  */
15687 char cthread_fork();
15688 char (*f)();
15689
15690 int main() {
15691
15692 /* The GNU C library defines this for functions which it implements
15693     to always fail with ENOSYS.  Some functions are actually named
15694     something starting with __ and the normal name is an alias.  */
15695 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15696 choke me
15697 #else
15698 f = cthread_fork;
15699 #endif
15700
15701 ; return 0; }
15702 EOF
15703 if { (eval echo configure:15704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15704   rm -rf conftest*
15705   eval "ac_cv_func_cthread_fork=yes"
15706 else
15707   echo "configure: failed program was:" >&5
15708   cat conftest.$ac_ext >&5
15709   rm -rf conftest*
15710   eval "ac_cv_func_cthread_fork=no"
15711 fi
15712 rm -f conftest*
15713 fi
15714
15715 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15716   echo "$ac_t""yes" 1>&6
15717   ol_link_threads=yes
15718 else
15719   echo "$ac_t""no" 1>&6
15720 fi
15721
15722                 LIBS="$save_LIBS"
15723
15724                 if test $ol_link_threads = yes ; then
15725                         LTHREAD_LIBS="-lthreads"
15726                         ol_link_threads=mach
15727                         ol_with_threads=found
15728                 else
15729                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15730                 fi
15731
15732         elif test $ol_with_threads = mach ; then
15733                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15734         fi
15735
15736         if test $ol_link_threads = mach ; then
15737                 cat >> confdefs.h <<\EOF
15738 #define HAVE_MACH_CTHREADS 1
15739 EOF
15740
15741         elif test $ol_with_threads = found ; then
15742                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15743         fi
15744 fi
15745
15746 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15747         -o $ol_with_threads = pth ; then
15748
15749         for ac_hdr in pth.h
15750 do
15751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15753 echo "configure:15754: checking for $ac_hdr" >&5
15754 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15755   echo $ac_n "(cached) $ac_c" 1>&6
15756 else
15757   cat > conftest.$ac_ext <<EOF
15758 #line 15759 "configure"
15759 #include "confdefs.h"
15760 #include <$ac_hdr>
15761 EOF
15762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15763 { (eval echo configure:15764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15765 if test -z "$ac_err"; then
15766   rm -rf conftest*
15767   eval "ac_cv_header_$ac_safe=yes"
15768 else
15769   echo "$ac_err" >&5
15770   echo "configure: failed program was:" >&5
15771   cat conftest.$ac_ext >&5
15772   rm -rf conftest*
15773   eval "ac_cv_header_$ac_safe=no"
15774 fi
15775 rm -f conftest*
15776 fi
15777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15778   echo "$ac_t""yes" 1>&6
15779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15780   cat >> confdefs.h <<EOF
15781 #define $ac_tr_hdr 1
15782 EOF
15783  
15784 else
15785   echo "$ac_t""no" 1>&6
15786 fi
15787 done
15788
15789
15790         if test $ac_cv_header_pth_h = yes ; then
15791                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15792 echo "configure:15793: checking for pth_version in -lpth" >&5
15793 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15795   echo $ac_n "(cached) $ac_c" 1>&6
15796 else
15797   ac_save_LIBS="$LIBS"
15798 LIBS="-lpth  $LIBS"
15799 cat > conftest.$ac_ext <<EOF
15800 #line 15801 "configure"
15801 #include "confdefs.h"
15802 /* Override any gcc2 internal prototype to avoid an error.  */
15803 /* We use char because int might match the return type of a gcc2
15804     builtin and then its argument prototype would still apply.  */
15805 char pth_version();
15806
15807 int main() {
15808 pth_version()
15809 ; return 0; }
15810 EOF
15811 if { (eval echo configure:15812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15812   rm -rf conftest*
15813   eval "ac_cv_lib_$ac_lib_var=yes"
15814 else
15815   echo "configure: failed program was:" >&5
15816   cat conftest.$ac_ext >&5
15817   rm -rf conftest*
15818   eval "ac_cv_lib_$ac_lib_var=no"
15819 fi
15820 rm -f conftest*
15821 LIBS="$ac_save_LIBS"
15822
15823 fi
15824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15825   echo "$ac_t""yes" 1>&6
15826   have_pth=yes
15827 else
15828   echo "$ac_t""no" 1>&6
15829 have_pth=no
15830 fi
15831
15832
15833                 if test $have_pth = yes ; then
15834                         cat >> confdefs.h <<\EOF
15835 #define HAVE_GNU_PTH 1
15836 EOF
15837
15838                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15839                         ol_link_threads=pth
15840                         ol_with_threads=found
15841
15842                         if test $ol_with_yielding_select = auto ; then
15843                                 ol_with_yielding_select=yes
15844                         fi
15845                 fi
15846         fi
15847 fi
15848
15849 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15850         -o $ol_with_threads = lwp ; then
15851
15852                 for ac_hdr in thread.h synch.h
15853 do
15854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15856 echo "configure:15857: checking for $ac_hdr" >&5
15857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15858   echo $ac_n "(cached) $ac_c" 1>&6
15859 else
15860   cat > conftest.$ac_ext <<EOF
15861 #line 15862 "configure"
15862 #include "confdefs.h"
15863 #include <$ac_hdr>
15864 EOF
15865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15866 { (eval echo configure:15867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15868 if test -z "$ac_err"; then
15869   rm -rf conftest*
15870   eval "ac_cv_header_$ac_safe=yes"
15871 else
15872   echo "$ac_err" >&5
15873   echo "configure: failed program was:" >&5
15874   cat conftest.$ac_ext >&5
15875   rm -rf conftest*
15876   eval "ac_cv_header_$ac_safe=no"
15877 fi
15878 rm -f conftest*
15879 fi
15880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15883   cat >> confdefs.h <<EOF
15884 #define $ac_tr_hdr 1
15885 EOF
15886  
15887 else
15888   echo "$ac_t""no" 1>&6
15889 fi
15890 done
15891
15892         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15893                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15894 echo "configure:15895: checking for thr_create in -lthread" >&5
15895 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15897   echo $ac_n "(cached) $ac_c" 1>&6
15898 else
15899   ac_save_LIBS="$LIBS"
15900 LIBS="-lthread  $LIBS"
15901 cat > conftest.$ac_ext <<EOF
15902 #line 15903 "configure"
15903 #include "confdefs.h"
15904 /* Override any gcc2 internal prototype to avoid an error.  */
15905 /* We use char because int might match the return type of a gcc2
15906     builtin and then its argument prototype would still apply.  */
15907 char thr_create();
15908
15909 int main() {
15910 thr_create()
15911 ; return 0; }
15912 EOF
15913 if { (eval echo configure:15914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15914   rm -rf conftest*
15915   eval "ac_cv_lib_$ac_lib_var=yes"
15916 else
15917   echo "configure: failed program was:" >&5
15918   cat conftest.$ac_ext >&5
15919   rm -rf conftest*
15920   eval "ac_cv_lib_$ac_lib_var=no"
15921 fi
15922 rm -f conftest*
15923 LIBS="$ac_save_LIBS"
15924
15925 fi
15926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15927   echo "$ac_t""yes" 1>&6
15928   have_thr=yes
15929 else
15930   echo "$ac_t""no" 1>&6
15931 have_thr=no
15932 fi
15933
15934
15935                 if test $have_thr = yes ; then
15936                         cat >> confdefs.h <<\EOF
15937 #define HAVE_THR 1
15938 EOF
15939
15940                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15941                         ol_link_threads=thr
15942
15943                         if test $ol_with_yielding_select = auto ; then
15944                                 ol_with_yielding_select=yes
15945                         fi
15946
15947                                                 for ac_func in \
15948                                 thr_setconcurrency \
15949                                 thr_getconcurrency \
15950                         
15951 do
15952 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15953 echo "configure:15954: checking for $ac_func" >&5
15954 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15955   echo $ac_n "(cached) $ac_c" 1>&6
15956 else
15957   cat > conftest.$ac_ext <<EOF
15958 #line 15959 "configure"
15959 #include "confdefs.h"
15960 /* System header to define __stub macros and hopefully few prototypes,
15961     which can conflict with char $ac_func(); below.  */
15962 #include <assert.h>
15963 /* Override any gcc2 internal prototype to avoid an error.  */
15964 /* We use char because int might match the return type of a gcc2
15965     builtin and then its argument prototype would still apply.  */
15966 char $ac_func();
15967 char (*f)();
15968
15969 int main() {
15970
15971 /* The GNU C library defines this for functions which it implements
15972     to always fail with ENOSYS.  Some functions are actually named
15973     something starting with __ and the normal name is an alias.  */
15974 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15975 choke me
15976 #else
15977 f = $ac_func;
15978 #endif
15979
15980 ; return 0; }
15981 EOF
15982 if { (eval echo configure:15983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15983   rm -rf conftest*
15984   eval "ac_cv_func_$ac_func=yes"
15985 else
15986   echo "configure: failed program was:" >&5
15987   cat conftest.$ac_ext >&5
15988   rm -rf conftest*
15989   eval "ac_cv_func_$ac_func=no"
15990 fi
15991 rm -f conftest*
15992 fi
15993
15994 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15995   echo "$ac_t""yes" 1>&6
15996     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15997   cat >> confdefs.h <<EOF
15998 #define $ac_tr_func 1
15999 EOF
16000  
16001 else
16002   echo "$ac_t""no" 1>&6
16003 fi
16004 done
16005
16006                 fi
16007         fi
16008
16009                 for ac_hdr in lwp/lwp.h
16010 do
16011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16013 echo "configure:16014: checking for $ac_hdr" >&5
16014 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16015   echo $ac_n "(cached) $ac_c" 1>&6
16016 else
16017   cat > conftest.$ac_ext <<EOF
16018 #line 16019 "configure"
16019 #include "confdefs.h"
16020 #include <$ac_hdr>
16021 EOF
16022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16023 { (eval echo configure:16024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16025 if test -z "$ac_err"; then
16026   rm -rf conftest*
16027   eval "ac_cv_header_$ac_safe=yes"
16028 else
16029   echo "$ac_err" >&5
16030   echo "configure: failed program was:" >&5
16031   cat conftest.$ac_ext >&5
16032   rm -rf conftest*
16033   eval "ac_cv_header_$ac_safe=no"
16034 fi
16035 rm -f conftest*
16036 fi
16037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16038   echo "$ac_t""yes" 1>&6
16039     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16040   cat >> confdefs.h <<EOF
16041 #define $ac_tr_hdr 1
16042 EOF
16043  
16044 else
16045   echo "$ac_t""no" 1>&6
16046 fi
16047 done
16048
16049         if test $ac_cv_header_lwp_lwp_h = yes ; then
16050                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16051 echo "configure:16052: checking for lwp_create in -llwp" >&5
16052 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16054   echo $ac_n "(cached) $ac_c" 1>&6
16055 else
16056   ac_save_LIBS="$LIBS"
16057 LIBS="-llwp  $LIBS"
16058 cat > conftest.$ac_ext <<EOF
16059 #line 16060 "configure"
16060 #include "confdefs.h"
16061 /* Override any gcc2 internal prototype to avoid an error.  */
16062 /* We use char because int might match the return type of a gcc2
16063     builtin and then its argument prototype would still apply.  */
16064 char lwp_create();
16065
16066 int main() {
16067 lwp_create()
16068 ; return 0; }
16069 EOF
16070 if { (eval echo configure:16071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16071   rm -rf conftest*
16072   eval "ac_cv_lib_$ac_lib_var=yes"
16073 else
16074   echo "configure: failed program was:" >&5
16075   cat conftest.$ac_ext >&5
16076   rm -rf conftest*
16077   eval "ac_cv_lib_$ac_lib_var=no"
16078 fi
16079 rm -f conftest*
16080 LIBS="$ac_save_LIBS"
16081
16082 fi
16083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16084   echo "$ac_t""yes" 1>&6
16085   have_lwp=yes
16086 else
16087   echo "$ac_t""no" 1>&6
16088 have_lwp=no
16089 fi
16090
16091
16092                 if test $have_lwp = yes ; then
16093                         cat >> confdefs.h <<\EOF
16094 #define HAVE_LWP 1
16095 EOF
16096
16097                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16098                         ol_link_threads=lwp
16099
16100                         if test $ol_with_yielding_select = auto ; then
16101                                 ol_with_yielding_select=no
16102                         fi
16103                 fi
16104         fi
16105 fi
16106
16107 if test $ol_with_yielding_select = yes ; then
16108         cat >> confdefs.h <<\EOF
16109 #define HAVE_YIELDING_SELECT 1
16110 EOF
16111
16112 fi
16113
16114 if test $ol_with_threads = manual ; then
16115                 ol_link_threads=yes
16116
16117         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16118
16119         for ac_hdr in pthread.h sched.h
16120 do
16121 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16122 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16123 echo "configure:16124: checking for $ac_hdr" >&5
16124 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16125   echo $ac_n "(cached) $ac_c" 1>&6
16126 else
16127   cat > conftest.$ac_ext <<EOF
16128 #line 16129 "configure"
16129 #include "confdefs.h"
16130 #include <$ac_hdr>
16131 EOF
16132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16133 { (eval echo configure:16134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16135 if test -z "$ac_err"; then
16136   rm -rf conftest*
16137   eval "ac_cv_header_$ac_safe=yes"
16138 else
16139   echo "$ac_err" >&5
16140   echo "configure: failed program was:" >&5
16141   cat conftest.$ac_ext >&5
16142   rm -rf conftest*
16143   eval "ac_cv_header_$ac_safe=no"
16144 fi
16145 rm -f conftest*
16146 fi
16147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16148   echo "$ac_t""yes" 1>&6
16149     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16150   cat >> confdefs.h <<EOF
16151 #define $ac_tr_hdr 1
16152 EOF
16153  
16154 else
16155   echo "$ac_t""no" 1>&6
16156 fi
16157 done
16158
16159         for ac_func in sched_yield pthread_yield
16160 do
16161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16162 echo "configure:16163: checking for $ac_func" >&5
16163 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16164   echo $ac_n "(cached) $ac_c" 1>&6
16165 else
16166   cat > conftest.$ac_ext <<EOF
16167 #line 16168 "configure"
16168 #include "confdefs.h"
16169 /* System header to define __stub macros and hopefully few prototypes,
16170     which can conflict with char $ac_func(); below.  */
16171 #include <assert.h>
16172 /* Override any gcc2 internal prototype to avoid an error.  */
16173 /* We use char because int might match the return type of a gcc2
16174     builtin and then its argument prototype would still apply.  */
16175 char $ac_func();
16176 char (*f)();
16177
16178 int main() {
16179
16180 /* The GNU C library defines this for functions which it implements
16181     to always fail with ENOSYS.  Some functions are actually named
16182     something starting with __ and the normal name is an alias.  */
16183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16184 choke me
16185 #else
16186 f = $ac_func;
16187 #endif
16188
16189 ; return 0; }
16190 EOF
16191 if { (eval echo configure:16192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16192   rm -rf conftest*
16193   eval "ac_cv_func_$ac_func=yes"
16194 else
16195   echo "configure: failed program was:" >&5
16196   cat conftest.$ac_ext >&5
16197   rm -rf conftest*
16198   eval "ac_cv_func_$ac_func=no"
16199 fi
16200 rm -f conftest*
16201 fi
16202
16203 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16204   echo "$ac_t""yes" 1>&6
16205     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16206   cat >> confdefs.h <<EOF
16207 #define $ac_tr_func 1
16208 EOF
16209  
16210 else
16211   echo "$ac_t""no" 1>&6
16212 fi
16213 done
16214
16215         
16216         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16217 echo "configure:16218: checking for LinuxThreads pthread.h" >&5
16218 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16219   echo $ac_n "(cached) $ac_c" 1>&6
16220 else
16221   cat > conftest.$ac_ext <<EOF
16222 #line 16223 "configure"
16223 #include "confdefs.h"
16224 #include <pthread.h>
16225 EOF
16226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16227   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16228   rm -rf conftest*
16229   ol_cv_header_linux_threads=yes
16230 else
16231   rm -rf conftest*
16232   ol_cv_header_linux_threads=no
16233 fi
16234 rm -f conftest*
16235
16236                 
16237 fi
16238
16239 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16240         if test $ol_cv_header_linux_threads = yes; then
16241                 cat >> confdefs.h <<\EOF
16242 #define HAVE_LINUX_THREADS 1
16243 EOF
16244
16245         fi
16246
16247
16248         for ac_hdr in mach/cthreads.h
16249 do
16250 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16251 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16252 echo "configure:16253: checking for $ac_hdr" >&5
16253 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16254   echo $ac_n "(cached) $ac_c" 1>&6
16255 else
16256   cat > conftest.$ac_ext <<EOF
16257 #line 16258 "configure"
16258 #include "confdefs.h"
16259 #include <$ac_hdr>
16260 EOF
16261 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16262 { (eval echo configure:16263: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16263 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16264 if test -z "$ac_err"; then
16265   rm -rf conftest*
16266   eval "ac_cv_header_$ac_safe=yes"
16267 else
16268   echo "$ac_err" >&5
16269   echo "configure: failed program was:" >&5
16270   cat conftest.$ac_ext >&5
16271   rm -rf conftest*
16272   eval "ac_cv_header_$ac_safe=no"
16273 fi
16274 rm -f conftest*
16275 fi
16276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16277   echo "$ac_t""yes" 1>&6
16278     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16279   cat >> confdefs.h <<EOF
16280 #define $ac_tr_hdr 1
16281 EOF
16282  
16283 else
16284   echo "$ac_t""no" 1>&6
16285 fi
16286 done
16287
16288         for ac_hdr in lwp/lwp.h
16289 do
16290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16292 echo "configure:16293: checking for $ac_hdr" >&5
16293 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16294   echo $ac_n "(cached) $ac_c" 1>&6
16295 else
16296   cat > conftest.$ac_ext <<EOF
16297 #line 16298 "configure"
16298 #include "confdefs.h"
16299 #include <$ac_hdr>
16300 EOF
16301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16302 { (eval echo configure:16303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16304 if test -z "$ac_err"; then
16305   rm -rf conftest*
16306   eval "ac_cv_header_$ac_safe=yes"
16307 else
16308   echo "$ac_err" >&5
16309   echo "configure: failed program was:" >&5
16310   cat conftest.$ac_ext >&5
16311   rm -rf conftest*
16312   eval "ac_cv_header_$ac_safe=no"
16313 fi
16314 rm -f conftest*
16315 fi
16316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16317   echo "$ac_t""yes" 1>&6
16318     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16319   cat >> confdefs.h <<EOF
16320 #define $ac_tr_hdr 1
16321 EOF
16322  
16323 else
16324   echo "$ac_t""no" 1>&6
16325 fi
16326 done
16327
16328         for ac_hdr in thread.h synch.h
16329 do
16330 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16331 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16332 echo "configure:16333: checking for $ac_hdr" >&5
16333 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16334   echo $ac_n "(cached) $ac_c" 1>&6
16335 else
16336   cat > conftest.$ac_ext <<EOF
16337 #line 16338 "configure"
16338 #include "confdefs.h"
16339 #include <$ac_hdr>
16340 EOF
16341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16342 { (eval echo configure:16343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16344 if test -z "$ac_err"; then
16345   rm -rf conftest*
16346   eval "ac_cv_header_$ac_safe=yes"
16347 else
16348   echo "$ac_err" >&5
16349   echo "configure: failed program was:" >&5
16350   cat conftest.$ac_ext >&5
16351   rm -rf conftest*
16352   eval "ac_cv_header_$ac_safe=no"
16353 fi
16354 rm -f conftest*
16355 fi
16356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16357   echo "$ac_t""yes" 1>&6
16358     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16359   cat >> confdefs.h <<EOF
16360 #define $ac_tr_hdr 1
16361 EOF
16362  
16363 else
16364   echo "$ac_t""no" 1>&6
16365 fi
16366 done
16367
16368 fi
16369
16370 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16371                         cat >> confdefs.h <<\EOF
16372 #define REENTRANT 1
16373 EOF
16374
16375         cat >> confdefs.h <<\EOF
16376 #define _REENTRANT 1
16377 EOF
16378
16379         cat >> confdefs.h <<\EOF
16380 #define THREAD_SAFE 1
16381 EOF
16382
16383         cat >> confdefs.h <<\EOF
16384 #define _THREAD_SAFE 1
16385 EOF
16386
16387         cat >> confdefs.h <<\EOF
16388 #define THREADSAFE 1
16389 EOF
16390
16391         cat >> confdefs.h <<\EOF
16392 #define _THREADSAFE 1
16393 EOF
16394
16395         cat >> confdefs.h <<\EOF
16396 #define _SGI_MP_SOURCE 1
16397 EOF
16398
16399
16400                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16401 echo "configure:16402: checking for thread specific errno" >&5
16402 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16403   echo $ac_n "(cached) $ac_c" 1>&6
16404 else
16405   
16406                 cat > conftest.$ac_ext <<EOF
16407 #line 16408 "configure"
16408 #include "confdefs.h"
16409 #include <errno.h>
16410 int main() {
16411 errno = 0;
16412 ; return 0; }
16413 EOF
16414 if { (eval echo configure:16415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16415   rm -rf conftest*
16416   ol_cv_errno_thread_specific=yes
16417 else
16418   echo "configure: failed program was:" >&5
16419   cat conftest.$ac_ext >&5
16420   rm -rf conftest*
16421   ol_cv_errno_thread_specific=no
16422 fi
16423 rm -f conftest*
16424         
16425 fi
16426
16427 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16428
16429                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16430 echo "configure:16431: checking for thread specific h_errno" >&5
16431 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16432   echo $ac_n "(cached) $ac_c" 1>&6
16433 else
16434   
16435                 cat > conftest.$ac_ext <<EOF
16436 #line 16437 "configure"
16437 #include "confdefs.h"
16438 #include <netdb.h>
16439 int main() {
16440 h_errno = 0;
16441 ; return 0; }
16442 EOF
16443 if { (eval echo configure:16444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16444   rm -rf conftest*
16445   ol_cv_h_errno_thread_specific=yes
16446 else
16447   echo "configure: failed program was:" >&5
16448   cat conftest.$ac_ext >&5
16449   rm -rf conftest*
16450   ol_cv_h_errno_thread_specific=no
16451 fi
16452 rm -f conftest*
16453         
16454 fi
16455
16456 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16457
16458         if test $ol_cv_errno_thread_specific != yes \
16459                 -o $ol_cv_h_errno_thread_specific != yes ; then
16460                 LIBS="$LTHREAD_LIBS $LIBS"
16461                 LTHREAD_LIBS=""
16462         fi
16463
16464 fi  
16465
16466 if test $ol_link_threads = no ; then
16467         if test $ol_with_threads = yes ; then
16468                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16469         fi
16470
16471         if test $ol_with_threads = auto ; then
16472                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16473                 ol_with_threads=no
16474         fi
16475
16476         cat >> confdefs.h <<\EOF
16477 #define NO_THREADS 1
16478 EOF
16479
16480         LTHREAD_LIBS=""
16481 fi
16482
16483 if test $ol_link_threads != no ; then
16484         cat >> confdefs.h <<\EOF
16485 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16486 EOF
16487
16488 fi
16489
16490 for ac_func in \
16491         ctime_r                 \
16492         gethostbyname_r gethostbyaddr_r \
16493
16494 do
16495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16496 echo "configure:16497: checking for $ac_func" >&5
16497 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16498   echo $ac_n "(cached) $ac_c" 1>&6
16499 else
16500   cat > conftest.$ac_ext <<EOF
16501 #line 16502 "configure"
16502 #include "confdefs.h"
16503 /* System header to define __stub macros and hopefully few prototypes,
16504     which can conflict with char $ac_func(); below.  */
16505 #include <assert.h>
16506 /* Override any gcc2 internal prototype to avoid an error.  */
16507 /* We use char because int might match the return type of a gcc2
16508     builtin and then its argument prototype would still apply.  */
16509 char $ac_func();
16510 char (*f)();
16511
16512 int main() {
16513
16514 /* The GNU C library defines this for functions which it implements
16515     to always fail with ENOSYS.  Some functions are actually named
16516     something starting with __ and the normal name is an alias.  */
16517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16518 choke me
16519 #else
16520 f = $ac_func;
16521 #endif
16522
16523 ; return 0; }
16524 EOF
16525 if { (eval echo configure:16526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16526   rm -rf conftest*
16527   eval "ac_cv_func_$ac_func=yes"
16528 else
16529   echo "configure: failed program was:" >&5
16530   cat conftest.$ac_ext >&5
16531   rm -rf conftest*
16532   eval "ac_cv_func_$ac_func=no"
16533 fi
16534 rm -f conftest*
16535 fi
16536
16537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16538   echo "$ac_t""yes" 1>&6
16539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16540   cat >> confdefs.h <<EOF
16541 #define $ac_tr_func 1
16542 EOF
16543  
16544 else
16545   echo "$ac_t""no" 1>&6
16546 fi
16547 done
16548
16549
16550 if test "$ac_cv_func_ctime_r" = no ; then
16551         ol_cv_func_ctime_r_nargs=0
16552 else
16553         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16554 echo "configure:16555: checking number of arguments of ctime_r" >&5
16555 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16556   echo $ac_n "(cached) $ac_c" 1>&6
16557 else
16558   cat > conftest.$ac_ext <<EOF
16559 #line 16560 "configure"
16560 #include "confdefs.h"
16561 #include <time.h>
16562 int main() {
16563 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16564 ; return 0; }
16565 EOF
16566 if { (eval echo configure:16567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16567   rm -rf conftest*
16568   ol_cv_func_ctime_r_nargs3=yes
16569 else
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   ol_cv_func_ctime_r_nargs3=no
16574 fi
16575 rm -f conftest*
16576
16577         cat > conftest.$ac_ext <<EOF
16578 #line 16579 "configure"
16579 #include "confdefs.h"
16580 #include <time.h>
16581 int main() {
16582 time_t ti; char *buffer; ctime_r(&ti,buffer);
16583 ; return 0; }
16584 EOF
16585 if { (eval echo configure:16586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16586   rm -rf conftest*
16587   ol_cv_func_ctime_r_nargs2=yes
16588 else
16589   echo "configure: failed program was:" >&5
16590   cat conftest.$ac_ext >&5
16591   rm -rf conftest*
16592   ol_cv_func_ctime_r_nargs2=no
16593 fi
16594 rm -f conftest*
16595
16596         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16597                 $ol_cv_func_ctime_r_nargs2 = no ; then
16598
16599                 ol_cv_func_ctime_r_nargs=3
16600
16601         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16602                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16603
16604                 ol_cv_func_ctime_r_nargs=2
16605
16606         else
16607                 ol_cv_func_ctime_r_nargs=0
16608         fi
16609   
16610 fi
16611
16612 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16613
16614   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16615         cat >> confdefs.h <<EOF
16616 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16617 EOF
16618
16619   fi
16620
16621 fi
16622
16623 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16624         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16625 echo "configure:16626: checking number of arguments of gethostbyname_r" >&5
16626 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16627   echo $ac_n "(cached) $ac_c" 1>&6
16628 else
16629   cat > conftest.$ac_ext <<EOF
16630 #line 16631 "configure"
16631 #include "confdefs.h"
16632 #include <sys/types.h>
16633 #include <sys/socket.h>
16634 #include <netinet/in.h>
16635 #include <netdb.h>
16636 #define BUFSIZE (sizeof(struct hostent)+10)
16637 int main() {
16638 struct hostent hent; char buffer[BUFSIZE];
16639                 int bufsize=BUFSIZE;int h_errno;
16640                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16641                         buffer, bufsize, &h_errno);
16642 ; return 0; }
16643 EOF
16644 if { (eval echo configure:16645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16645   rm -rf conftest*
16646   ol_cv_func_gethostbyname_r_nargs5=yes
16647 else
16648   echo "configure: failed program was:" >&5
16649   cat conftest.$ac_ext >&5
16650   rm -rf conftest*
16651   ol_cv_func_gethostbyname_r_nargs5=no
16652 fi
16653 rm -f conftest*
16654
16655         cat > conftest.$ac_ext <<EOF
16656 #line 16657 "configure"
16657 #include "confdefs.h"
16658 #include <sys/types.h>
16659 #include <sys/socket.h>
16660 #include <netinet/in.h>
16661 #include <netdb.h>
16662 #define BUFSIZE (sizeof(struct hostent)+10)
16663 int main() {
16664 struct hostent hent;struct hostent *rhent;
16665                 char buffer[BUFSIZE];
16666                 int bufsize=BUFSIZE;int h_errno;
16667                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16668                         &rhent, &h_errno);
16669 ; return 0; }
16670 EOF
16671 if { (eval echo configure:16672: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16672   rm -rf conftest*
16673   ol_cv_func_gethostbyname_r_nargs6=yes
16674 else
16675   echo "configure: failed program was:" >&5
16676   cat conftest.$ac_ext >&5
16677   rm -rf conftest*
16678   ol_cv_func_gethostbyname_r_nargs6=no
16679 fi
16680 rm -f conftest*
16681
16682         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16683                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16684
16685                 ol_cv_func_gethostbyname_r_nargs=5
16686
16687         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16688                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16689
16690                 ol_cv_func_gethostbyname_r_nargs=6
16691
16692         else
16693                 ol_cv_func_gethostbyname_r_nargs=0
16694         fi
16695   
16696 fi
16697
16698 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16699   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16700         cat >> confdefs.h <<EOF
16701 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16702 EOF
16703
16704   fi
16705
16706 else
16707         ol_cv_func_gethostbyname_r_nargs=0
16708 fi
16709  
16710 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16711         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16712 echo "configure:16713: checking number of arguments of gethostbyaddr_r" >&5
16713 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16714   echo $ac_n "(cached) $ac_c" 1>&6
16715 else
16716   cat > conftest.$ac_ext <<EOF
16717 #line 16718 "configure"
16718 #include "confdefs.h"
16719 #include <sys/types.h>
16720 #include <sys/socket.h>
16721 #include <netinet/in.h>
16722 #include <netdb.h>
16723 #define BUFSIZE (sizeof(struct hostent)+10)
16724 int main() {
16725 struct hostent hent; char buffer[BUFSIZE]; 
16726             struct in_addr add;
16727             size_t alen=sizeof(struct in_addr);
16728             int bufsize=BUFSIZE;int h_errno;
16729                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16730                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16731 ; return 0; }
16732 EOF
16733 if { (eval echo configure:16734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16734   rm -rf conftest*
16735   ol_cv_func_gethostbyaddr_r_nargs7=yes
16736 else
16737   echo "configure: failed program was:" >&5
16738   cat conftest.$ac_ext >&5
16739   rm -rf conftest*
16740   ol_cv_func_gethostbyaddr_r_nargs7=no
16741 fi
16742 rm -f conftest*
16743
16744         cat > conftest.$ac_ext <<EOF
16745 #line 16746 "configure"
16746 #include "confdefs.h"
16747 #include <sys/types.h>
16748 #include <sys/socket.h>
16749 #include <netinet/in.h>
16750 #include <netdb.h>
16751 #define BUFSIZE (sizeof(struct hostent)+10)
16752 int main() {
16753 struct hostent hent;
16754                 struct hostent *rhent; char buffer[BUFSIZE]; 
16755                 struct in_addr add;
16756                 size_t alen=sizeof(struct in_addr);
16757                 int bufsize=BUFSIZE;int h_errno;
16758                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16759                         alen, AF_INET, &hent, buffer, bufsize, 
16760                         &rhent, &h_errno);
16761 ; return 0; }
16762 EOF
16763 if { (eval echo configure:16764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16764   rm -rf conftest*
16765   ol_cv_func_gethostbyaddr_r_nargs8=yes
16766 else
16767   echo "configure: failed program was:" >&5
16768   cat conftest.$ac_ext >&5
16769   rm -rf conftest*
16770   ol_cv_func_gethostbyaddr_r_nargs8=no
16771 fi
16772 rm -f conftest*
16773
16774         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16775                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16776
16777                 ol_cv_func_gethostbyaddr_r_nargs=7
16778
16779         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16780                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16781
16782                 ol_cv_func_gethostbyaddr_r_nargs=8
16783
16784         else
16785                 ol_cv_func_gethostbyaddr_r_nargs=0
16786         fi
16787   
16788 fi
16789
16790 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16791   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16792     cat >> confdefs.h <<EOF
16793 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16794 EOF
16795
16796   fi
16797
16798 else
16799         ol_cv_func_gethostbyaddr_r_nargs=0
16800 fi
16801
16802 ol_link_ldbm=no 
16803
16804 if test $ol_with_ldbm_api = auto \
16805         -o $ol_with_ldbm_api = berkeley \
16806         -o $ol_with_ldbm_api = bcompat ; then
16807
16808         if test $ol_with_ldbm_api = bcompat; then \
16809                 for ac_hdr in db_185.h db.h
16810 do
16811 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16812 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16813 echo "configure:16814: checking for $ac_hdr" >&5
16814 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16815   echo $ac_n "(cached) $ac_c" 1>&6
16816 else
16817   cat > conftest.$ac_ext <<EOF
16818 #line 16819 "configure"
16819 #include "confdefs.h"
16820 #include <$ac_hdr>
16821 EOF
16822 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16823 { (eval echo configure:16824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16824 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16825 if test -z "$ac_err"; then
16826   rm -rf conftest*
16827   eval "ac_cv_header_$ac_safe=yes"
16828 else
16829   echo "$ac_err" >&5
16830   echo "configure: failed program was:" >&5
16831   cat conftest.$ac_ext >&5
16832   rm -rf conftest*
16833   eval "ac_cv_header_$ac_safe=no"
16834 fi
16835 rm -f conftest*
16836 fi
16837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16838   echo "$ac_t""yes" 1>&6
16839     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16840   cat >> confdefs.h <<EOF
16841 #define $ac_tr_hdr 1
16842 EOF
16843  
16844 else
16845   echo "$ac_t""no" 1>&6
16846 fi
16847 done
16848
16849 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16850         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16851 echo "configure:16852: checking if Berkeley DB header compatibility" >&5
16852 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16853   echo $ac_n "(cached) $ac_c" 1>&6
16854 else
16855   
16856                 cat > conftest.$ac_ext <<EOF
16857 #line 16858 "configure"
16858 #include "confdefs.h"
16859
16860 #if HAVE_DB_185_H
16861 #       include <db_185.h>
16862 #else
16863 #       include <db.h>
16864 #endif
16865
16866  /* this check could be improved */
16867 #ifndef DB_VERSION_MAJOR
16868 #       define DB_VERSION_MAJOR 1
16869 #endif
16870
16871 #if DB_VERSION_MAJOR == 1 
16872         __db_version_1
16873 #endif
16874
16875 EOF
16876 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16877   egrep "__db_version_1" >/dev/null 2>&1; then
16878   rm -rf conftest*
16879   ol_cv_header_db1=yes
16880 else
16881   rm -rf conftest*
16882   ol_cv_header_db1=no
16883 fi
16884 rm -f conftest*
16885
16886 fi
16887
16888 echo "$ac_t""$ol_cv_header_db1" 1>&6
16889
16890         if test $ol_cv_header_db1 = yes ; then
16891                 ol_cv_lib_db=no
16892 if test $ol_cv_lib_db = no ; then
16893         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16894 echo "configure:16895: checking for Berkeley DB link (default)" >&5
16895 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16896   echo $ac_n "(cached) $ac_c" 1>&6
16897 else
16898   
16899         ol_DB_LIB=
16900         ol_LIBS=$LIBS
16901         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16902
16903         cat > conftest.$ac_ext <<EOF
16904 #line 16905 "configure"
16905 #include "confdefs.h"
16906
16907 #ifdef HAVE_DB_185_H
16908 # include <db_185.h>
16909 #else
16910 # include <db.h>
16911 #endif
16912
16913 #ifndef DB_VERSION_MAJOR
16914 # define DB_VERSION_MAJOR 1
16915 #endif
16916
16917 #ifndef NULL
16918 #define NULL ((void*)0)
16919 #endif
16920
16921 int main() {
16922
16923 #if DB_VERSION_MAJOR > 1
16924         {
16925                 char *version;
16926                 int major, minor, patch;
16927
16928                 version = db_version( &major, &minor, &patch );
16929
16930                 if( major != DB_VERSION_MAJOR ||
16931                         minor < DB_VERSION_MINOR )
16932                 {
16933                         printf("Berkeley DB version mismatch\n"
16934                                 "\texpected: %s\n\tgot: %s\n",
16935                                 DB_VERSION_STRING, version);
16936                         return 1;
16937                 }
16938         }
16939 #endif
16940
16941 #if DB_VERSION_MAJOR > 2
16942         db_env_create( NULL, 0 );
16943 #elif DB_VERSION_MAJOR > 1
16944         db_appexit( NULL );
16945 #else
16946         (void) dbopen( NULL, 0, 0, 0, NULL);
16947 #endif
16948
16949 ; return 0; }
16950 EOF
16951 if { (eval echo configure:16952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16952   rm -rf conftest*
16953   ol_cv_db_none=yes
16954 else
16955   echo "configure: failed program was:" >&5
16956   cat conftest.$ac_ext >&5
16957   rm -rf conftest*
16958   ol_cv_db_none=no
16959 fi
16960 rm -f conftest*
16961
16962         LIBS="$ol_LIBS"
16963
16964 fi
16965
16966 echo "$ac_t""$ol_cv_db_none" 1>&6
16967
16968         if test $ol_cv_db_none = yes ; then
16969                 ol_cv_lib_db=yes
16970         fi
16971 fi
16972
16973 if test $ol_cv_lib_db = no ; then
16974         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16975 echo "configure:16976: checking for Berkeley DB link (-ldb42)" >&5
16976 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16977   echo $ac_n "(cached) $ac_c" 1>&6
16978 else
16979   
16980         ol_DB_LIB=-ldb42
16981         ol_LIBS=$LIBS
16982         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16983
16984         cat > conftest.$ac_ext <<EOF
16985 #line 16986 "configure"
16986 #include "confdefs.h"
16987
16988 #ifdef HAVE_DB_185_H
16989 # include <db_185.h>
16990 #else
16991 # include <db.h>
16992 #endif
16993
16994 #ifndef DB_VERSION_MAJOR
16995 # define DB_VERSION_MAJOR 1
16996 #endif
16997
16998 #ifndef NULL
16999 #define NULL ((void*)0)
17000 #endif
17001
17002 int main() {
17003
17004 #if DB_VERSION_MAJOR > 1
17005         {
17006                 char *version;
17007                 int major, minor, patch;
17008
17009                 version = db_version( &major, &minor, &patch );
17010
17011                 if( major != DB_VERSION_MAJOR ||
17012                         minor < DB_VERSION_MINOR )
17013                 {
17014                         printf("Berkeley DB version mismatch\n"
17015                                 "\texpected: %s\n\tgot: %s\n",
17016                                 DB_VERSION_STRING, version);
17017                         return 1;
17018                 }
17019         }
17020 #endif
17021
17022 #if DB_VERSION_MAJOR > 2
17023         db_env_create( NULL, 0 );
17024 #elif DB_VERSION_MAJOR > 1
17025         db_appexit( NULL );
17026 #else
17027         (void) dbopen( NULL, 0, 0, 0, NULL);
17028 #endif
17029
17030 ; return 0; }
17031 EOF
17032 if { (eval echo configure:17033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17033   rm -rf conftest*
17034   ol_cv_db_db42=yes
17035 else
17036   echo "configure: failed program was:" >&5
17037   cat conftest.$ac_ext >&5
17038   rm -rf conftest*
17039   ol_cv_db_db42=no
17040 fi
17041 rm -f conftest*
17042
17043         LIBS="$ol_LIBS"
17044
17045 fi
17046
17047 echo "$ac_t""$ol_cv_db_db42" 1>&6
17048
17049         if test $ol_cv_db_db42 = yes ; then
17050                 ol_cv_lib_db=-ldb42
17051         fi
17052 fi
17053
17054 if test $ol_cv_lib_db = no ; then
17055         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17056 echo "configure:17057: checking for Berkeley DB link (-ldb-42)" >&5
17057 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17058   echo $ac_n "(cached) $ac_c" 1>&6
17059 else
17060   
17061         ol_DB_LIB=-ldb-42
17062         ol_LIBS=$LIBS
17063         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17064
17065         cat > conftest.$ac_ext <<EOF
17066 #line 17067 "configure"
17067 #include "confdefs.h"
17068
17069 #ifdef HAVE_DB_185_H
17070 # include <db_185.h>
17071 #else
17072 # include <db.h>
17073 #endif
17074
17075 #ifndef DB_VERSION_MAJOR
17076 # define DB_VERSION_MAJOR 1
17077 #endif
17078
17079 #ifndef NULL
17080 #define NULL ((void*)0)
17081 #endif
17082
17083 int main() {
17084
17085 #if DB_VERSION_MAJOR > 1
17086         {
17087                 char *version;
17088                 int major, minor, patch;
17089
17090                 version = db_version( &major, &minor, &patch );
17091
17092                 if( major != DB_VERSION_MAJOR ||
17093                         minor < DB_VERSION_MINOR )
17094                 {
17095                         printf("Berkeley DB version mismatch\n"
17096                                 "\texpected: %s\n\tgot: %s\n",
17097                                 DB_VERSION_STRING, version);
17098                         return 1;
17099                 }
17100         }
17101 #endif
17102
17103 #if DB_VERSION_MAJOR > 2
17104         db_env_create( NULL, 0 );
17105 #elif DB_VERSION_MAJOR > 1
17106         db_appexit( NULL );
17107 #else
17108         (void) dbopen( NULL, 0, 0, 0, NULL);
17109 #endif
17110
17111 ; return 0; }
17112 EOF
17113 if { (eval echo configure:17114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17114   rm -rf conftest*
17115   ol_cv_db_db_42=yes
17116 else
17117   echo "configure: failed program was:" >&5
17118   cat conftest.$ac_ext >&5
17119   rm -rf conftest*
17120   ol_cv_db_db_42=no
17121 fi
17122 rm -f conftest*
17123
17124         LIBS="$ol_LIBS"
17125
17126 fi
17127
17128 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17129
17130         if test $ol_cv_db_db_42 = yes ; then
17131                 ol_cv_lib_db=-ldb-42
17132         fi
17133 fi
17134
17135 if test $ol_cv_lib_db = no ; then
17136         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17137 echo "configure:17138: checking for Berkeley DB link (-ldb-4.2)" >&5
17138 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17139   echo $ac_n "(cached) $ac_c" 1>&6
17140 else
17141   
17142         ol_DB_LIB=-ldb-4.2
17143         ol_LIBS=$LIBS
17144         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17145
17146         cat > conftest.$ac_ext <<EOF
17147 #line 17148 "configure"
17148 #include "confdefs.h"
17149
17150 #ifdef HAVE_DB_185_H
17151 # include <db_185.h>
17152 #else
17153 # include <db.h>
17154 #endif
17155
17156 #ifndef DB_VERSION_MAJOR
17157 # define DB_VERSION_MAJOR 1
17158 #endif
17159
17160 #ifndef NULL
17161 #define NULL ((void*)0)
17162 #endif
17163
17164 int main() {
17165
17166 #if DB_VERSION_MAJOR > 1
17167         {
17168                 char *version;
17169                 int major, minor, patch;
17170
17171                 version = db_version( &major, &minor, &patch );
17172
17173                 if( major != DB_VERSION_MAJOR ||
17174                         minor < DB_VERSION_MINOR )
17175                 {
17176                         printf("Berkeley DB version mismatch\n"
17177                                 "\texpected: %s\n\tgot: %s\n",
17178                                 DB_VERSION_STRING, version);
17179                         return 1;
17180                 }
17181         }
17182 #endif
17183
17184 #if DB_VERSION_MAJOR > 2
17185         db_env_create( NULL, 0 );
17186 #elif DB_VERSION_MAJOR > 1
17187         db_appexit( NULL );
17188 #else
17189         (void) dbopen( NULL, 0, 0, 0, NULL);
17190 #endif
17191
17192 ; return 0; }
17193 EOF
17194 if { (eval echo configure:17195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17195   rm -rf conftest*
17196   ol_cv_db_db_4_dot_2=yes
17197 else
17198   echo "configure: failed program was:" >&5
17199   cat conftest.$ac_ext >&5
17200   rm -rf conftest*
17201   ol_cv_db_db_4_dot_2=no
17202 fi
17203 rm -f conftest*
17204
17205         LIBS="$ol_LIBS"
17206
17207 fi
17208
17209 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17210
17211         if test $ol_cv_db_db_4_dot_2 = yes ; then
17212                 ol_cv_lib_db=-ldb-4.2
17213         fi
17214 fi
17215
17216 if test $ol_cv_lib_db = no ; then
17217         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17218 echo "configure:17219: checking for Berkeley DB link (-ldb-4-2)" >&5
17219 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17220   echo $ac_n "(cached) $ac_c" 1>&6
17221 else
17222   
17223         ol_DB_LIB=-ldb-4-2
17224         ol_LIBS=$LIBS
17225         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17226
17227         cat > conftest.$ac_ext <<EOF
17228 #line 17229 "configure"
17229 #include "confdefs.h"
17230
17231 #ifdef HAVE_DB_185_H
17232 # include <db_185.h>
17233 #else
17234 # include <db.h>
17235 #endif
17236
17237 #ifndef DB_VERSION_MAJOR
17238 # define DB_VERSION_MAJOR 1
17239 #endif
17240
17241 #ifndef NULL
17242 #define NULL ((void*)0)
17243 #endif
17244
17245 int main() {
17246
17247 #if DB_VERSION_MAJOR > 1
17248         {
17249                 char *version;
17250                 int major, minor, patch;
17251
17252                 version = db_version( &major, &minor, &patch );
17253
17254                 if( major != DB_VERSION_MAJOR ||
17255                         minor < DB_VERSION_MINOR )
17256                 {
17257                         printf("Berkeley DB version mismatch\n"
17258                                 "\texpected: %s\n\tgot: %s\n",
17259                                 DB_VERSION_STRING, version);
17260                         return 1;
17261                 }
17262         }
17263 #endif
17264
17265 #if DB_VERSION_MAJOR > 2
17266         db_env_create( NULL, 0 );
17267 #elif DB_VERSION_MAJOR > 1
17268         db_appexit( NULL );
17269 #else
17270         (void) dbopen( NULL, 0, 0, 0, NULL);
17271 #endif
17272
17273 ; return 0; }
17274 EOF
17275 if { (eval echo configure:17276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17276   rm -rf conftest*
17277   ol_cv_db_db_4_2=yes
17278 else
17279   echo "configure: failed program was:" >&5
17280   cat conftest.$ac_ext >&5
17281   rm -rf conftest*
17282   ol_cv_db_db_4_2=no
17283 fi
17284 rm -f conftest*
17285
17286         LIBS="$ol_LIBS"
17287
17288 fi
17289
17290 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17291
17292         if test $ol_cv_db_db_4_2 = yes ; then
17293                 ol_cv_lib_db=-ldb-4-2
17294         fi
17295 fi
17296
17297 if test $ol_cv_lib_db = no ; then
17298         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17299 echo "configure:17300: checking for Berkeley DB link (-ldb-4)" >&5
17300 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17301   echo $ac_n "(cached) $ac_c" 1>&6
17302 else
17303   
17304         ol_DB_LIB=-ldb-4
17305         ol_LIBS=$LIBS
17306         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17307
17308         cat > conftest.$ac_ext <<EOF
17309 #line 17310 "configure"
17310 #include "confdefs.h"
17311
17312 #ifdef HAVE_DB_185_H
17313 # include <db_185.h>
17314 #else
17315 # include <db.h>
17316 #endif
17317
17318 #ifndef DB_VERSION_MAJOR
17319 # define DB_VERSION_MAJOR 1
17320 #endif
17321
17322 #ifndef NULL
17323 #define NULL ((void*)0)
17324 #endif
17325
17326 int main() {
17327
17328 #if DB_VERSION_MAJOR > 1
17329         {
17330                 char *version;
17331                 int major, minor, patch;
17332
17333                 version = db_version( &major, &minor, &patch );
17334
17335                 if( major != DB_VERSION_MAJOR ||
17336                         minor < DB_VERSION_MINOR )
17337                 {
17338                         printf("Berkeley DB version mismatch\n"
17339                                 "\texpected: %s\n\tgot: %s\n",
17340                                 DB_VERSION_STRING, version);
17341                         return 1;
17342                 }
17343         }
17344 #endif
17345
17346 #if DB_VERSION_MAJOR > 2
17347         db_env_create( NULL, 0 );
17348 #elif DB_VERSION_MAJOR > 1
17349         db_appexit( NULL );
17350 #else
17351         (void) dbopen( NULL, 0, 0, 0, NULL);
17352 #endif
17353
17354 ; return 0; }
17355 EOF
17356 if { (eval echo configure:17357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17357   rm -rf conftest*
17358   ol_cv_db_db_4=yes
17359 else
17360   echo "configure: failed program was:" >&5
17361   cat conftest.$ac_ext >&5
17362   rm -rf conftest*
17363   ol_cv_db_db_4=no
17364 fi
17365 rm -f conftest*
17366
17367         LIBS="$ol_LIBS"
17368
17369 fi
17370
17371 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17372
17373         if test $ol_cv_db_db_4 = yes ; then
17374                 ol_cv_lib_db=-ldb-4
17375         fi
17376 fi
17377
17378 if test $ol_cv_lib_db = no ; then
17379         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17380 echo "configure:17381: checking for Berkeley DB link (-ldb4)" >&5
17381 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17382   echo $ac_n "(cached) $ac_c" 1>&6
17383 else
17384   
17385         ol_DB_LIB=-ldb4
17386         ol_LIBS=$LIBS
17387         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17388
17389         cat > conftest.$ac_ext <<EOF
17390 #line 17391 "configure"
17391 #include "confdefs.h"
17392
17393 #ifdef HAVE_DB_185_H
17394 # include <db_185.h>
17395 #else
17396 # include <db.h>
17397 #endif
17398
17399 #ifndef DB_VERSION_MAJOR
17400 # define DB_VERSION_MAJOR 1
17401 #endif
17402
17403 #ifndef NULL
17404 #define NULL ((void*)0)
17405 #endif
17406
17407 int main() {
17408
17409 #if DB_VERSION_MAJOR > 1
17410         {
17411                 char *version;
17412                 int major, minor, patch;
17413
17414                 version = db_version( &major, &minor, &patch );
17415
17416                 if( major != DB_VERSION_MAJOR ||
17417                         minor < DB_VERSION_MINOR )
17418                 {
17419                         printf("Berkeley DB version mismatch\n"
17420                                 "\texpected: %s\n\tgot: %s\n",
17421                                 DB_VERSION_STRING, version);
17422                         return 1;
17423                 }
17424         }
17425 #endif
17426
17427 #if DB_VERSION_MAJOR > 2
17428         db_env_create( NULL, 0 );
17429 #elif DB_VERSION_MAJOR > 1
17430         db_appexit( NULL );
17431 #else
17432         (void) dbopen( NULL, 0, 0, 0, NULL);
17433 #endif
17434
17435 ; return 0; }
17436 EOF
17437 if { (eval echo configure:17438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17438   rm -rf conftest*
17439   ol_cv_db_db4=yes
17440 else
17441   echo "configure: failed program was:" >&5
17442   cat conftest.$ac_ext >&5
17443   rm -rf conftest*
17444   ol_cv_db_db4=no
17445 fi
17446 rm -f conftest*
17447
17448         LIBS="$ol_LIBS"
17449
17450 fi
17451
17452 echo "$ac_t""$ol_cv_db_db4" 1>&6
17453
17454         if test $ol_cv_db_db4 = yes ; then
17455                 ol_cv_lib_db=-ldb4
17456         fi
17457 fi
17458
17459 if test $ol_cv_lib_db = no ; then
17460         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17461 echo "configure:17462: checking for Berkeley DB link (-ldb)" >&5
17462 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17463   echo $ac_n "(cached) $ac_c" 1>&6
17464 else
17465   
17466         ol_DB_LIB=-ldb
17467         ol_LIBS=$LIBS
17468         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17469
17470         cat > conftest.$ac_ext <<EOF
17471 #line 17472 "configure"
17472 #include "confdefs.h"
17473
17474 #ifdef HAVE_DB_185_H
17475 # include <db_185.h>
17476 #else
17477 # include <db.h>
17478 #endif
17479
17480 #ifndef DB_VERSION_MAJOR
17481 # define DB_VERSION_MAJOR 1
17482 #endif
17483
17484 #ifndef NULL
17485 #define NULL ((void*)0)
17486 #endif
17487
17488 int main() {
17489
17490 #if DB_VERSION_MAJOR > 1
17491         {
17492                 char *version;
17493                 int major, minor, patch;
17494
17495                 version = db_version( &major, &minor, &patch );
17496
17497                 if( major != DB_VERSION_MAJOR ||
17498                         minor < DB_VERSION_MINOR )
17499                 {
17500                         printf("Berkeley DB version mismatch\n"
17501                                 "\texpected: %s\n\tgot: %s\n",
17502                                 DB_VERSION_STRING, version);
17503                         return 1;
17504                 }
17505         }
17506 #endif
17507
17508 #if DB_VERSION_MAJOR > 2
17509         db_env_create( NULL, 0 );
17510 #elif DB_VERSION_MAJOR > 1
17511         db_appexit( NULL );
17512 #else
17513         (void) dbopen( NULL, 0, 0, 0, NULL);
17514 #endif
17515
17516 ; return 0; }
17517 EOF
17518 if { (eval echo configure:17519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17519   rm -rf conftest*
17520   ol_cv_db_db=yes
17521 else
17522   echo "configure: failed program was:" >&5
17523   cat conftest.$ac_ext >&5
17524   rm -rf conftest*
17525   ol_cv_db_db=no
17526 fi
17527 rm -f conftest*
17528
17529         LIBS="$ol_LIBS"
17530
17531 fi
17532
17533 echo "$ac_t""$ol_cv_db_db" 1>&6
17534
17535         if test $ol_cv_db_db = yes ; then
17536                 ol_cv_lib_db=-ldb
17537         fi
17538 fi
17539
17540 if test $ol_cv_lib_db = no ; then
17541         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17542 echo "configure:17543: checking for Berkeley DB link (-ldb41)" >&5
17543 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17544   echo $ac_n "(cached) $ac_c" 1>&6
17545 else
17546   
17547         ol_DB_LIB=-ldb41
17548         ol_LIBS=$LIBS
17549         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17550
17551         cat > conftest.$ac_ext <<EOF
17552 #line 17553 "configure"
17553 #include "confdefs.h"
17554
17555 #ifdef HAVE_DB_185_H
17556 # include <db_185.h>
17557 #else
17558 # include <db.h>
17559 #endif
17560
17561 #ifndef DB_VERSION_MAJOR
17562 # define DB_VERSION_MAJOR 1
17563 #endif
17564
17565 #ifndef NULL
17566 #define NULL ((void*)0)
17567 #endif
17568
17569 int main() {
17570
17571 #if DB_VERSION_MAJOR > 1
17572         {
17573                 char *version;
17574                 int major, minor, patch;
17575
17576                 version = db_version( &major, &minor, &patch );
17577
17578                 if( major != DB_VERSION_MAJOR ||
17579                         minor < DB_VERSION_MINOR )
17580                 {
17581                         printf("Berkeley DB version mismatch\n"
17582                                 "\texpected: %s\n\tgot: %s\n",
17583                                 DB_VERSION_STRING, version);
17584                         return 1;
17585                 }
17586         }
17587 #endif
17588
17589 #if DB_VERSION_MAJOR > 2
17590         db_env_create( NULL, 0 );
17591 #elif DB_VERSION_MAJOR > 1
17592         db_appexit( NULL );
17593 #else
17594         (void) dbopen( NULL, 0, 0, 0, NULL);
17595 #endif
17596
17597 ; return 0; }
17598 EOF
17599 if { (eval echo configure:17600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17600   rm -rf conftest*
17601   ol_cv_db_db41=yes
17602 else
17603   echo "configure: failed program was:" >&5
17604   cat conftest.$ac_ext >&5
17605   rm -rf conftest*
17606   ol_cv_db_db41=no
17607 fi
17608 rm -f conftest*
17609
17610         LIBS="$ol_LIBS"
17611
17612 fi
17613
17614 echo "$ac_t""$ol_cv_db_db41" 1>&6
17615
17616         if test $ol_cv_db_db41 = yes ; then
17617                 ol_cv_lib_db=-ldb41
17618         fi
17619 fi
17620
17621 if test $ol_cv_lib_db = no ; then
17622         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17623 echo "configure:17624: checking for Berkeley DB link (-ldb-41)" >&5
17624 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17625   echo $ac_n "(cached) $ac_c" 1>&6
17626 else
17627   
17628         ol_DB_LIB=-ldb-41
17629         ol_LIBS=$LIBS
17630         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17631
17632         cat > conftest.$ac_ext <<EOF
17633 #line 17634 "configure"
17634 #include "confdefs.h"
17635
17636 #ifdef HAVE_DB_185_H
17637 # include <db_185.h>
17638 #else
17639 # include <db.h>
17640 #endif
17641
17642 #ifndef DB_VERSION_MAJOR
17643 # define DB_VERSION_MAJOR 1
17644 #endif
17645
17646 #ifndef NULL
17647 #define NULL ((void*)0)
17648 #endif
17649
17650 int main() {
17651
17652 #if DB_VERSION_MAJOR > 1
17653         {
17654                 char *version;
17655                 int major, minor, patch;
17656
17657                 version = db_version( &major, &minor, &patch );
17658
17659                 if( major != DB_VERSION_MAJOR ||
17660                         minor < DB_VERSION_MINOR )
17661                 {
17662                         printf("Berkeley DB version mismatch\n"
17663                                 "\texpected: %s\n\tgot: %s\n",
17664                                 DB_VERSION_STRING, version);
17665                         return 1;
17666                 }
17667         }
17668 #endif
17669
17670 #if DB_VERSION_MAJOR > 2
17671         db_env_create( NULL, 0 );
17672 #elif DB_VERSION_MAJOR > 1
17673         db_appexit( NULL );
17674 #else
17675         (void) dbopen( NULL, 0, 0, 0, NULL);
17676 #endif
17677
17678 ; return 0; }
17679 EOF
17680 if { (eval echo configure:17681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17681   rm -rf conftest*
17682   ol_cv_db_db_41=yes
17683 else
17684   echo "configure: failed program was:" >&5
17685   cat conftest.$ac_ext >&5
17686   rm -rf conftest*
17687   ol_cv_db_db_41=no
17688 fi
17689 rm -f conftest*
17690
17691         LIBS="$ol_LIBS"
17692
17693 fi
17694
17695 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17696
17697         if test $ol_cv_db_db_41 = yes ; then
17698                 ol_cv_lib_db=-ldb-41
17699         fi
17700 fi
17701
17702 if test $ol_cv_lib_db = no ; then
17703         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17704 echo "configure:17705: checking for Berkeley DB link (-ldb-4.1)" >&5
17705 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17706   echo $ac_n "(cached) $ac_c" 1>&6
17707 else
17708   
17709         ol_DB_LIB=-ldb-4.1
17710         ol_LIBS=$LIBS
17711         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17712
17713         cat > conftest.$ac_ext <<EOF
17714 #line 17715 "configure"
17715 #include "confdefs.h"
17716
17717 #ifdef HAVE_DB_185_H
17718 # include <db_185.h>
17719 #else
17720 # include <db.h>
17721 #endif
17722
17723 #ifndef DB_VERSION_MAJOR
17724 # define DB_VERSION_MAJOR 1
17725 #endif
17726
17727 #ifndef NULL
17728 #define NULL ((void*)0)
17729 #endif
17730
17731 int main() {
17732
17733 #if DB_VERSION_MAJOR > 1
17734         {
17735                 char *version;
17736                 int major, minor, patch;
17737
17738                 version = db_version( &major, &minor, &patch );
17739
17740                 if( major != DB_VERSION_MAJOR ||
17741                         minor < DB_VERSION_MINOR )
17742                 {
17743                         printf("Berkeley DB version mismatch\n"
17744                                 "\texpected: %s\n\tgot: %s\n",
17745                                 DB_VERSION_STRING, version);
17746                         return 1;
17747                 }
17748         }
17749 #endif
17750
17751 #if DB_VERSION_MAJOR > 2
17752         db_env_create( NULL, 0 );
17753 #elif DB_VERSION_MAJOR > 1
17754         db_appexit( NULL );
17755 #else
17756         (void) dbopen( NULL, 0, 0, 0, NULL);
17757 #endif
17758
17759 ; return 0; }
17760 EOF
17761 if { (eval echo configure:17762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17762   rm -rf conftest*
17763   ol_cv_db_db_4_dot_1=yes
17764 else
17765   echo "configure: failed program was:" >&5
17766   cat conftest.$ac_ext >&5
17767   rm -rf conftest*
17768   ol_cv_db_db_4_dot_1=no
17769 fi
17770 rm -f conftest*
17771
17772         LIBS="$ol_LIBS"
17773
17774 fi
17775
17776 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17777
17778         if test $ol_cv_db_db_4_dot_1 = yes ; then
17779                 ol_cv_lib_db=-ldb-4.1
17780         fi
17781 fi
17782
17783 if test $ol_cv_lib_db = no ; then
17784         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17785 echo "configure:17786: checking for Berkeley DB link (-ldb-4-1)" >&5
17786 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17787   echo $ac_n "(cached) $ac_c" 1>&6
17788 else
17789   
17790         ol_DB_LIB=-ldb-4-1
17791         ol_LIBS=$LIBS
17792         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17793
17794         cat > conftest.$ac_ext <<EOF
17795 #line 17796 "configure"
17796 #include "confdefs.h"
17797
17798 #ifdef HAVE_DB_185_H
17799 # include <db_185.h>
17800 #else
17801 # include <db.h>
17802 #endif
17803
17804 #ifndef DB_VERSION_MAJOR
17805 # define DB_VERSION_MAJOR 1
17806 #endif
17807
17808 #ifndef NULL
17809 #define NULL ((void*)0)
17810 #endif
17811
17812 int main() {
17813
17814 #if DB_VERSION_MAJOR > 1
17815         {
17816                 char *version;
17817                 int major, minor, patch;
17818
17819                 version = db_version( &major, &minor, &patch );
17820
17821                 if( major != DB_VERSION_MAJOR ||
17822                         minor < DB_VERSION_MINOR )
17823                 {
17824                         printf("Berkeley DB version mismatch\n"
17825                                 "\texpected: %s\n\tgot: %s\n",
17826                                 DB_VERSION_STRING, version);
17827                         return 1;
17828                 }
17829         }
17830 #endif
17831
17832 #if DB_VERSION_MAJOR > 2
17833         db_env_create( NULL, 0 );
17834 #elif DB_VERSION_MAJOR > 1
17835         db_appexit( NULL );
17836 #else
17837         (void) dbopen( NULL, 0, 0, 0, NULL);
17838 #endif
17839
17840 ; return 0; }
17841 EOF
17842 if { (eval echo configure:17843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17843   rm -rf conftest*
17844   ol_cv_db_db_4_1=yes
17845 else
17846   echo "configure: failed program was:" >&5
17847   cat conftest.$ac_ext >&5
17848   rm -rf conftest*
17849   ol_cv_db_db_4_1=no
17850 fi
17851 rm -f conftest*
17852
17853         LIBS="$ol_LIBS"
17854
17855 fi
17856
17857 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17858
17859         if test $ol_cv_db_db_4_1 = yes ; then
17860                 ol_cv_lib_db=-ldb-4-1
17861         fi
17862 fi
17863
17864 if test $ol_cv_lib_db = no ; then
17865         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17866 echo "configure:17867: checking for Berkeley DB link (-ldb3)" >&5
17867 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17868   echo $ac_n "(cached) $ac_c" 1>&6
17869 else
17870   
17871         ol_DB_LIB=-ldb3
17872         ol_LIBS=$LIBS
17873         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17874
17875         cat > conftest.$ac_ext <<EOF
17876 #line 17877 "configure"
17877 #include "confdefs.h"
17878
17879 #ifdef HAVE_DB_185_H
17880 # include <db_185.h>
17881 #else
17882 # include <db.h>
17883 #endif
17884
17885 #ifndef DB_VERSION_MAJOR
17886 # define DB_VERSION_MAJOR 1
17887 #endif
17888
17889 #ifndef NULL
17890 #define NULL ((void*)0)
17891 #endif
17892
17893 int main() {
17894
17895 #if DB_VERSION_MAJOR > 1
17896         {
17897                 char *version;
17898                 int major, minor, patch;
17899
17900                 version = db_version( &major, &minor, &patch );
17901
17902                 if( major != DB_VERSION_MAJOR ||
17903                         minor < DB_VERSION_MINOR )
17904                 {
17905                         printf("Berkeley DB version mismatch\n"
17906                                 "\texpected: %s\n\tgot: %s\n",
17907                                 DB_VERSION_STRING, version);
17908                         return 1;
17909                 }
17910         }
17911 #endif
17912
17913 #if DB_VERSION_MAJOR > 2
17914         db_env_create( NULL, 0 );
17915 #elif DB_VERSION_MAJOR > 1
17916         db_appexit( NULL );
17917 #else
17918         (void) dbopen( NULL, 0, 0, 0, NULL);
17919 #endif
17920
17921 ; return 0; }
17922 EOF
17923 if { (eval echo configure:17924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17924   rm -rf conftest*
17925   ol_cv_db_db3=yes
17926 else
17927   echo "configure: failed program was:" >&5
17928   cat conftest.$ac_ext >&5
17929   rm -rf conftest*
17930   ol_cv_db_db3=no
17931 fi
17932 rm -f conftest*
17933
17934         LIBS="$ol_LIBS"
17935
17936 fi
17937
17938 echo "$ac_t""$ol_cv_db_db3" 1>&6
17939
17940         if test $ol_cv_db_db3 = yes ; then
17941                 ol_cv_lib_db=-ldb3
17942         fi
17943 fi
17944
17945 if test $ol_cv_lib_db = no ; then
17946         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17947 echo "configure:17948: checking for Berkeley DB link (-ldb-3)" >&5
17948 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17949   echo $ac_n "(cached) $ac_c" 1>&6
17950 else
17951   
17952         ol_DB_LIB=-ldb-3
17953         ol_LIBS=$LIBS
17954         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17955
17956         cat > conftest.$ac_ext <<EOF
17957 #line 17958 "configure"
17958 #include "confdefs.h"
17959
17960 #ifdef HAVE_DB_185_H
17961 # include <db_185.h>
17962 #else
17963 # include <db.h>
17964 #endif
17965
17966 #ifndef DB_VERSION_MAJOR
17967 # define DB_VERSION_MAJOR 1
17968 #endif
17969
17970 #ifndef NULL
17971 #define NULL ((void*)0)
17972 #endif
17973
17974 int main() {
17975
17976 #if DB_VERSION_MAJOR > 1
17977         {
17978                 char *version;
17979                 int major, minor, patch;
17980
17981                 version = db_version( &major, &minor, &patch );
17982
17983                 if( major != DB_VERSION_MAJOR ||
17984                         minor < DB_VERSION_MINOR )
17985                 {
17986                         printf("Berkeley DB version mismatch\n"
17987                                 "\texpected: %s\n\tgot: %s\n",
17988                                 DB_VERSION_STRING, version);
17989                         return 1;
17990                 }
17991         }
17992 #endif
17993
17994 #if DB_VERSION_MAJOR > 2
17995         db_env_create( NULL, 0 );
17996 #elif DB_VERSION_MAJOR > 1
17997         db_appexit( NULL );
17998 #else
17999         (void) dbopen( NULL, 0, 0, 0, NULL);
18000 #endif
18001
18002 ; return 0; }
18003 EOF
18004 if { (eval echo configure:18005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18005   rm -rf conftest*
18006   ol_cv_db_db_3=yes
18007 else
18008   echo "configure: failed program was:" >&5
18009   cat conftest.$ac_ext >&5
18010   rm -rf conftest*
18011   ol_cv_db_db_3=no
18012 fi
18013 rm -f conftest*
18014
18015         LIBS="$ol_LIBS"
18016
18017 fi
18018
18019 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18020
18021         if test $ol_cv_db_db_3 = yes ; then
18022                 ol_cv_lib_db=-ldb-3
18023         fi
18024 fi
18025
18026 if test $ol_cv_lib_db = no ; then
18027         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18028 echo "configure:18029: checking for Berkeley DB link (-ldb2)" >&5
18029 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18030   echo $ac_n "(cached) $ac_c" 1>&6
18031 else
18032   
18033         ol_DB_LIB=-ldb2
18034         ol_LIBS=$LIBS
18035         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18036
18037         cat > conftest.$ac_ext <<EOF
18038 #line 18039 "configure"
18039 #include "confdefs.h"
18040
18041 #ifdef HAVE_DB_185_H
18042 # include <db_185.h>
18043 #else
18044 # include <db.h>
18045 #endif
18046
18047 #ifndef DB_VERSION_MAJOR
18048 # define DB_VERSION_MAJOR 1
18049 #endif
18050
18051 #ifndef NULL
18052 #define NULL ((void*)0)
18053 #endif
18054
18055 int main() {
18056
18057 #if DB_VERSION_MAJOR > 1
18058         {
18059                 char *version;
18060                 int major, minor, patch;
18061
18062                 version = db_version( &major, &minor, &patch );
18063
18064                 if( major != DB_VERSION_MAJOR ||
18065                         minor < DB_VERSION_MINOR )
18066                 {
18067                         printf("Berkeley DB version mismatch\n"
18068                                 "\texpected: %s\n\tgot: %s\n",
18069                                 DB_VERSION_STRING, version);
18070                         return 1;
18071                 }
18072         }
18073 #endif
18074
18075 #if DB_VERSION_MAJOR > 2
18076         db_env_create( NULL, 0 );
18077 #elif DB_VERSION_MAJOR > 1
18078         db_appexit( NULL );
18079 #else
18080         (void) dbopen( NULL, 0, 0, 0, NULL);
18081 #endif
18082
18083 ; return 0; }
18084 EOF
18085 if { (eval echo configure:18086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18086   rm -rf conftest*
18087   ol_cv_db_db2=yes
18088 else
18089   echo "configure: failed program was:" >&5
18090   cat conftest.$ac_ext >&5
18091   rm -rf conftest*
18092   ol_cv_db_db2=no
18093 fi
18094 rm -f conftest*
18095
18096         LIBS="$ol_LIBS"
18097
18098 fi
18099
18100 echo "$ac_t""$ol_cv_db_db2" 1>&6
18101
18102         if test $ol_cv_db_db2 = yes ; then
18103                 ol_cv_lib_db=-ldb2
18104         fi
18105 fi
18106
18107 if test $ol_cv_lib_db = no ; then
18108         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18109 echo "configure:18110: checking for Berkeley DB link (-ldb-2)" >&5
18110 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18111   echo $ac_n "(cached) $ac_c" 1>&6
18112 else
18113   
18114         ol_DB_LIB=-ldb-2
18115         ol_LIBS=$LIBS
18116         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18117
18118         cat > conftest.$ac_ext <<EOF
18119 #line 18120 "configure"
18120 #include "confdefs.h"
18121
18122 #ifdef HAVE_DB_185_H
18123 # include <db_185.h>
18124 #else
18125 # include <db.h>
18126 #endif
18127
18128 #ifndef DB_VERSION_MAJOR
18129 # define DB_VERSION_MAJOR 1
18130 #endif
18131
18132 #ifndef NULL
18133 #define NULL ((void*)0)
18134 #endif
18135
18136 int main() {
18137
18138 #if DB_VERSION_MAJOR > 1
18139         {
18140                 char *version;
18141                 int major, minor, patch;
18142
18143                 version = db_version( &major, &minor, &patch );
18144
18145                 if( major != DB_VERSION_MAJOR ||
18146                         minor < DB_VERSION_MINOR )
18147                 {
18148                         printf("Berkeley DB version mismatch\n"
18149                                 "\texpected: %s\n\tgot: %s\n",
18150                                 DB_VERSION_STRING, version);
18151                         return 1;
18152                 }
18153         }
18154 #endif
18155
18156 #if DB_VERSION_MAJOR > 2
18157         db_env_create( NULL, 0 );
18158 #elif DB_VERSION_MAJOR > 1
18159         db_appexit( NULL );
18160 #else
18161         (void) dbopen( NULL, 0, 0, 0, NULL);
18162 #endif
18163
18164 ; return 0; }
18165 EOF
18166 if { (eval echo configure:18167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18167   rm -rf conftest*
18168   ol_cv_db_db_2=yes
18169 else
18170   echo "configure: failed program was:" >&5
18171   cat conftest.$ac_ext >&5
18172   rm -rf conftest*
18173   ol_cv_db_db_2=no
18174 fi
18175 rm -f conftest*
18176
18177         LIBS="$ol_LIBS"
18178
18179 fi
18180
18181 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18182
18183         if test $ol_cv_db_db_2 = yes ; then
18184                 ol_cv_lib_db=-ldb-2
18185         fi
18186 fi
18187
18188 if test $ol_cv_lib_db = no ; then
18189         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18190 echo "configure:18191: checking for Berkeley DB link (-ldb1)" >&5
18191 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18192   echo $ac_n "(cached) $ac_c" 1>&6
18193 else
18194   
18195         ol_DB_LIB=-ldb1
18196         ol_LIBS=$LIBS
18197         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18198
18199         cat > conftest.$ac_ext <<EOF
18200 #line 18201 "configure"
18201 #include "confdefs.h"
18202
18203 #ifdef HAVE_DB_185_H
18204 # include <db_185.h>
18205 #else
18206 # include <db.h>
18207 #endif
18208
18209 #ifndef DB_VERSION_MAJOR
18210 # define DB_VERSION_MAJOR 1
18211 #endif
18212
18213 #ifndef NULL
18214 #define NULL ((void*)0)
18215 #endif
18216
18217 int main() {
18218
18219 #if DB_VERSION_MAJOR > 1
18220         {
18221                 char *version;
18222                 int major, minor, patch;
18223
18224                 version = db_version( &major, &minor, &patch );
18225
18226                 if( major != DB_VERSION_MAJOR ||
18227                         minor < DB_VERSION_MINOR )
18228                 {
18229                         printf("Berkeley DB version mismatch\n"
18230                                 "\texpected: %s\n\tgot: %s\n",
18231                                 DB_VERSION_STRING, version);
18232                         return 1;
18233                 }
18234         }
18235 #endif
18236
18237 #if DB_VERSION_MAJOR > 2
18238         db_env_create( NULL, 0 );
18239 #elif DB_VERSION_MAJOR > 1
18240         db_appexit( NULL );
18241 #else
18242         (void) dbopen( NULL, 0, 0, 0, NULL);
18243 #endif
18244
18245 ; return 0; }
18246 EOF
18247 if { (eval echo configure:18248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18248   rm -rf conftest*
18249   ol_cv_db_db1=yes
18250 else
18251   echo "configure: failed program was:" >&5
18252   cat conftest.$ac_ext >&5
18253   rm -rf conftest*
18254   ol_cv_db_db1=no
18255 fi
18256 rm -f conftest*
18257
18258         LIBS="$ol_LIBS"
18259
18260 fi
18261
18262 echo "$ac_t""$ol_cv_db_db1" 1>&6
18263
18264         if test $ol_cv_db_db1 = yes ; then
18265                 ol_cv_lib_db=-ldb1
18266         fi
18267 fi
18268
18269 if test $ol_cv_lib_db = no ; then
18270         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18271 echo "configure:18272: checking for Berkeley DB link (-ldb-1)" >&5
18272 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18273   echo $ac_n "(cached) $ac_c" 1>&6
18274 else
18275   
18276         ol_DB_LIB=-ldb-1
18277         ol_LIBS=$LIBS
18278         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18279
18280         cat > conftest.$ac_ext <<EOF
18281 #line 18282 "configure"
18282 #include "confdefs.h"
18283
18284 #ifdef HAVE_DB_185_H
18285 # include <db_185.h>
18286 #else
18287 # include <db.h>
18288 #endif
18289
18290 #ifndef DB_VERSION_MAJOR
18291 # define DB_VERSION_MAJOR 1
18292 #endif
18293
18294 #ifndef NULL
18295 #define NULL ((void*)0)
18296 #endif
18297
18298 int main() {
18299
18300 #if DB_VERSION_MAJOR > 1
18301         {
18302                 char *version;
18303                 int major, minor, patch;
18304
18305                 version = db_version( &major, &minor, &patch );
18306
18307                 if( major != DB_VERSION_MAJOR ||
18308                         minor < DB_VERSION_MINOR )
18309                 {
18310                         printf("Berkeley DB version mismatch\n"
18311                                 "\texpected: %s\n\tgot: %s\n",
18312                                 DB_VERSION_STRING, version);
18313                         return 1;
18314                 }
18315         }
18316 #endif
18317
18318 #if DB_VERSION_MAJOR > 2
18319         db_env_create( NULL, 0 );
18320 #elif DB_VERSION_MAJOR > 1
18321         db_appexit( NULL );
18322 #else
18323         (void) dbopen( NULL, 0, 0, 0, NULL);
18324 #endif
18325
18326 ; return 0; }
18327 EOF
18328 if { (eval echo configure:18329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18329   rm -rf conftest*
18330   ol_cv_db_db_1=yes
18331 else
18332   echo "configure: failed program was:" >&5
18333   cat conftest.$ac_ext >&5
18334   rm -rf conftest*
18335   ol_cv_db_db_1=no
18336 fi
18337 rm -f conftest*
18338
18339         LIBS="$ol_LIBS"
18340
18341 fi
18342
18343 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18344
18345         if test $ol_cv_db_db_1 = yes ; then
18346                 ol_cv_lib_db=-ldb-1
18347         fi
18348 fi
18349
18350
18351                 if test "$ol_cv_lib_db" != no ; then
18352                         ol_cv_berkeley_db=yes
18353                 fi
18354         fi
18355 fi
18356
18357         else
18358                 ol_cv_berkeley_db=no
18359 for ac_hdr in db.h
18360 do
18361 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18362 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18363 echo "configure:18364: checking for $ac_hdr" >&5
18364 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18365   echo $ac_n "(cached) $ac_c" 1>&6
18366 else
18367   cat > conftest.$ac_ext <<EOF
18368 #line 18369 "configure"
18369 #include "confdefs.h"
18370 #include <$ac_hdr>
18371 EOF
18372 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18373 { (eval echo configure:18374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18374 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18375 if test -z "$ac_err"; then
18376   rm -rf conftest*
18377   eval "ac_cv_header_$ac_safe=yes"
18378 else
18379   echo "$ac_err" >&5
18380   echo "configure: failed program was:" >&5
18381   cat conftest.$ac_ext >&5
18382   rm -rf conftest*
18383   eval "ac_cv_header_$ac_safe=no"
18384 fi
18385 rm -f conftest*
18386 fi
18387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18388   echo "$ac_t""yes" 1>&6
18389     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18390   cat >> confdefs.h <<EOF
18391 #define $ac_tr_hdr 1
18392 EOF
18393  
18394 else
18395   echo "$ac_t""no" 1>&6
18396 fi
18397 done
18398
18399 if test $ac_cv_header_db_h = yes; then
18400         ol_cv_lib_db=no
18401 if test $ol_cv_lib_db = no ; then
18402         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18403 echo "configure:18404: checking for Berkeley DB link (default)" >&5
18404 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18405   echo $ac_n "(cached) $ac_c" 1>&6
18406 else
18407   
18408         ol_DB_LIB=
18409         ol_LIBS=$LIBS
18410         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18411
18412         cat > conftest.$ac_ext <<EOF
18413 #line 18414 "configure"
18414 #include "confdefs.h"
18415
18416 #ifdef HAVE_DB_185_H
18417 # include <db_185.h>
18418 #else
18419 # include <db.h>
18420 #endif
18421
18422 #ifndef DB_VERSION_MAJOR
18423 # define DB_VERSION_MAJOR 1
18424 #endif
18425
18426 #ifndef NULL
18427 #define NULL ((void*)0)
18428 #endif
18429
18430 int main() {
18431
18432 #if DB_VERSION_MAJOR > 1
18433         {
18434                 char *version;
18435                 int major, minor, patch;
18436
18437                 version = db_version( &major, &minor, &patch );
18438
18439                 if( major != DB_VERSION_MAJOR ||
18440                         minor < DB_VERSION_MINOR )
18441                 {
18442                         printf("Berkeley DB version mismatch\n"
18443                                 "\texpected: %s\n\tgot: %s\n",
18444                                 DB_VERSION_STRING, version);
18445                         return 1;
18446                 }
18447         }
18448 #endif
18449
18450 #if DB_VERSION_MAJOR > 2
18451         db_env_create( NULL, 0 );
18452 #elif DB_VERSION_MAJOR > 1
18453         db_appexit( NULL );
18454 #else
18455         (void) dbopen( NULL, 0, 0, 0, NULL);
18456 #endif
18457
18458 ; return 0; }
18459 EOF
18460 if { (eval echo configure:18461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18461   rm -rf conftest*
18462   ol_cv_db_none=yes
18463 else
18464   echo "configure: failed program was:" >&5
18465   cat conftest.$ac_ext >&5
18466   rm -rf conftest*
18467   ol_cv_db_none=no
18468 fi
18469 rm -f conftest*
18470
18471         LIBS="$ol_LIBS"
18472
18473 fi
18474
18475 echo "$ac_t""$ol_cv_db_none" 1>&6
18476
18477         if test $ol_cv_db_none = yes ; then
18478                 ol_cv_lib_db=yes
18479         fi
18480 fi
18481
18482 if test $ol_cv_lib_db = no ; then
18483         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18484 echo "configure:18485: checking for Berkeley DB link (-ldb42)" >&5
18485 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18486   echo $ac_n "(cached) $ac_c" 1>&6
18487 else
18488   
18489         ol_DB_LIB=-ldb42
18490         ol_LIBS=$LIBS
18491         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18492
18493         cat > conftest.$ac_ext <<EOF
18494 #line 18495 "configure"
18495 #include "confdefs.h"
18496
18497 #ifdef HAVE_DB_185_H
18498 # include <db_185.h>
18499 #else
18500 # include <db.h>
18501 #endif
18502
18503 #ifndef DB_VERSION_MAJOR
18504 # define DB_VERSION_MAJOR 1
18505 #endif
18506
18507 #ifndef NULL
18508 #define NULL ((void*)0)
18509 #endif
18510
18511 int main() {
18512
18513 #if DB_VERSION_MAJOR > 1
18514         {
18515                 char *version;
18516                 int major, minor, patch;
18517
18518                 version = db_version( &major, &minor, &patch );
18519
18520                 if( major != DB_VERSION_MAJOR ||
18521                         minor < DB_VERSION_MINOR )
18522                 {
18523                         printf("Berkeley DB version mismatch\n"
18524                                 "\texpected: %s\n\tgot: %s\n",
18525                                 DB_VERSION_STRING, version);
18526                         return 1;
18527                 }
18528         }
18529 #endif
18530
18531 #if DB_VERSION_MAJOR > 2
18532         db_env_create( NULL, 0 );
18533 #elif DB_VERSION_MAJOR > 1
18534         db_appexit( NULL );
18535 #else
18536         (void) dbopen( NULL, 0, 0, 0, NULL);
18537 #endif
18538
18539 ; return 0; }
18540 EOF
18541 if { (eval echo configure:18542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18542   rm -rf conftest*
18543   ol_cv_db_db42=yes
18544 else
18545   echo "configure: failed program was:" >&5
18546   cat conftest.$ac_ext >&5
18547   rm -rf conftest*
18548   ol_cv_db_db42=no
18549 fi
18550 rm -f conftest*
18551
18552         LIBS="$ol_LIBS"
18553
18554 fi
18555
18556 echo "$ac_t""$ol_cv_db_db42" 1>&6
18557
18558         if test $ol_cv_db_db42 = yes ; then
18559                 ol_cv_lib_db=-ldb42
18560         fi
18561 fi
18562
18563 if test $ol_cv_lib_db = no ; then
18564         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18565 echo "configure:18566: checking for Berkeley DB link (-ldb-42)" >&5
18566 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18567   echo $ac_n "(cached) $ac_c" 1>&6
18568 else
18569   
18570         ol_DB_LIB=-ldb-42
18571         ol_LIBS=$LIBS
18572         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18573
18574         cat > conftest.$ac_ext <<EOF
18575 #line 18576 "configure"
18576 #include "confdefs.h"
18577
18578 #ifdef HAVE_DB_185_H
18579 # include <db_185.h>
18580 #else
18581 # include <db.h>
18582 #endif
18583
18584 #ifndef DB_VERSION_MAJOR
18585 # define DB_VERSION_MAJOR 1
18586 #endif
18587
18588 #ifndef NULL
18589 #define NULL ((void*)0)
18590 #endif
18591
18592 int main() {
18593
18594 #if DB_VERSION_MAJOR > 1
18595         {
18596                 char *version;
18597                 int major, minor, patch;
18598
18599                 version = db_version( &major, &minor, &patch );
18600
18601                 if( major != DB_VERSION_MAJOR ||
18602                         minor < DB_VERSION_MINOR )
18603                 {
18604                         printf("Berkeley DB version mismatch\n"
18605                                 "\texpected: %s\n\tgot: %s\n",
18606                                 DB_VERSION_STRING, version);
18607                         return 1;
18608                 }
18609         }
18610 #endif
18611
18612 #if DB_VERSION_MAJOR > 2
18613         db_env_create( NULL, 0 );
18614 #elif DB_VERSION_MAJOR > 1
18615         db_appexit( NULL );
18616 #else
18617         (void) dbopen( NULL, 0, 0, 0, NULL);
18618 #endif
18619
18620 ; return 0; }
18621 EOF
18622 if { (eval echo configure:18623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18623   rm -rf conftest*
18624   ol_cv_db_db_42=yes
18625 else
18626   echo "configure: failed program was:" >&5
18627   cat conftest.$ac_ext >&5
18628   rm -rf conftest*
18629   ol_cv_db_db_42=no
18630 fi
18631 rm -f conftest*
18632
18633         LIBS="$ol_LIBS"
18634
18635 fi
18636
18637 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18638
18639         if test $ol_cv_db_db_42 = yes ; then
18640                 ol_cv_lib_db=-ldb-42
18641         fi
18642 fi
18643
18644 if test $ol_cv_lib_db = no ; then
18645         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18646 echo "configure:18647: checking for Berkeley DB link (-ldb-4.2)" >&5
18647 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18648   echo $ac_n "(cached) $ac_c" 1>&6
18649 else
18650   
18651         ol_DB_LIB=-ldb-4.2
18652         ol_LIBS=$LIBS
18653         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18654
18655         cat > conftest.$ac_ext <<EOF
18656 #line 18657 "configure"
18657 #include "confdefs.h"
18658
18659 #ifdef HAVE_DB_185_H
18660 # include <db_185.h>
18661 #else
18662 # include <db.h>
18663 #endif
18664
18665 #ifndef DB_VERSION_MAJOR
18666 # define DB_VERSION_MAJOR 1
18667 #endif
18668
18669 #ifndef NULL
18670 #define NULL ((void*)0)
18671 #endif
18672
18673 int main() {
18674
18675 #if DB_VERSION_MAJOR > 1
18676         {
18677                 char *version;
18678                 int major, minor, patch;
18679
18680                 version = db_version( &major, &minor, &patch );
18681
18682                 if( major != DB_VERSION_MAJOR ||
18683                         minor < DB_VERSION_MINOR )
18684                 {
18685                         printf("Berkeley DB version mismatch\n"
18686                                 "\texpected: %s\n\tgot: %s\n",
18687                                 DB_VERSION_STRING, version);
18688                         return 1;
18689                 }
18690         }
18691 #endif
18692
18693 #if DB_VERSION_MAJOR > 2
18694         db_env_create( NULL, 0 );
18695 #elif DB_VERSION_MAJOR > 1
18696         db_appexit( NULL );
18697 #else
18698         (void) dbopen( NULL, 0, 0, 0, NULL);
18699 #endif
18700
18701 ; return 0; }
18702 EOF
18703 if { (eval echo configure:18704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18704   rm -rf conftest*
18705   ol_cv_db_db_4_dot_2=yes
18706 else
18707   echo "configure: failed program was:" >&5
18708   cat conftest.$ac_ext >&5
18709   rm -rf conftest*
18710   ol_cv_db_db_4_dot_2=no
18711 fi
18712 rm -f conftest*
18713
18714         LIBS="$ol_LIBS"
18715
18716 fi
18717
18718 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18719
18720         if test $ol_cv_db_db_4_dot_2 = yes ; then
18721                 ol_cv_lib_db=-ldb-4.2
18722         fi
18723 fi
18724
18725 if test $ol_cv_lib_db = no ; then
18726         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18727 echo "configure:18728: checking for Berkeley DB link (-ldb-4-2)" >&5
18728 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18729   echo $ac_n "(cached) $ac_c" 1>&6
18730 else
18731   
18732         ol_DB_LIB=-ldb-4-2
18733         ol_LIBS=$LIBS
18734         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18735
18736         cat > conftest.$ac_ext <<EOF
18737 #line 18738 "configure"
18738 #include "confdefs.h"
18739
18740 #ifdef HAVE_DB_185_H
18741 # include <db_185.h>
18742 #else
18743 # include <db.h>
18744 #endif
18745
18746 #ifndef DB_VERSION_MAJOR
18747 # define DB_VERSION_MAJOR 1
18748 #endif
18749
18750 #ifndef NULL
18751 #define NULL ((void*)0)
18752 #endif
18753
18754 int main() {
18755
18756 #if DB_VERSION_MAJOR > 1
18757         {
18758                 char *version;
18759                 int major, minor, patch;
18760
18761                 version = db_version( &major, &minor, &patch );
18762
18763                 if( major != DB_VERSION_MAJOR ||
18764                         minor < DB_VERSION_MINOR )
18765                 {
18766                         printf("Berkeley DB version mismatch\n"
18767                                 "\texpected: %s\n\tgot: %s\n",
18768                                 DB_VERSION_STRING, version);
18769                         return 1;
18770                 }
18771         }
18772 #endif
18773
18774 #if DB_VERSION_MAJOR > 2
18775         db_env_create( NULL, 0 );
18776 #elif DB_VERSION_MAJOR > 1
18777         db_appexit( NULL );
18778 #else
18779         (void) dbopen( NULL, 0, 0, 0, NULL);
18780 #endif
18781
18782 ; return 0; }
18783 EOF
18784 if { (eval echo configure:18785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18785   rm -rf conftest*
18786   ol_cv_db_db_4_2=yes
18787 else
18788   echo "configure: failed program was:" >&5
18789   cat conftest.$ac_ext >&5
18790   rm -rf conftest*
18791   ol_cv_db_db_4_2=no
18792 fi
18793 rm -f conftest*
18794
18795         LIBS="$ol_LIBS"
18796
18797 fi
18798
18799 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18800
18801         if test $ol_cv_db_db_4_2 = yes ; then
18802                 ol_cv_lib_db=-ldb-4-2
18803         fi
18804 fi
18805
18806 if test $ol_cv_lib_db = no ; then
18807         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18808 echo "configure:18809: checking for Berkeley DB link (-ldb-4)" >&5
18809 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18810   echo $ac_n "(cached) $ac_c" 1>&6
18811 else
18812   
18813         ol_DB_LIB=-ldb-4
18814         ol_LIBS=$LIBS
18815         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18816
18817         cat > conftest.$ac_ext <<EOF
18818 #line 18819 "configure"
18819 #include "confdefs.h"
18820
18821 #ifdef HAVE_DB_185_H
18822 # include <db_185.h>
18823 #else
18824 # include <db.h>
18825 #endif
18826
18827 #ifndef DB_VERSION_MAJOR
18828 # define DB_VERSION_MAJOR 1
18829 #endif
18830
18831 #ifndef NULL
18832 #define NULL ((void*)0)
18833 #endif
18834
18835 int main() {
18836
18837 #if DB_VERSION_MAJOR > 1
18838         {
18839                 char *version;
18840                 int major, minor, patch;
18841
18842                 version = db_version( &major, &minor, &patch );
18843
18844                 if( major != DB_VERSION_MAJOR ||
18845                         minor < DB_VERSION_MINOR )
18846                 {
18847                         printf("Berkeley DB version mismatch\n"
18848                                 "\texpected: %s\n\tgot: %s\n",
18849                                 DB_VERSION_STRING, version);
18850                         return 1;
18851                 }
18852         }
18853 #endif
18854
18855 #if DB_VERSION_MAJOR > 2
18856         db_env_create( NULL, 0 );
18857 #elif DB_VERSION_MAJOR > 1
18858         db_appexit( NULL );
18859 #else
18860         (void) dbopen( NULL, 0, 0, 0, NULL);
18861 #endif
18862
18863 ; return 0; }
18864 EOF
18865 if { (eval echo configure:18866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18866   rm -rf conftest*
18867   ol_cv_db_db_4=yes
18868 else
18869   echo "configure: failed program was:" >&5
18870   cat conftest.$ac_ext >&5
18871   rm -rf conftest*
18872   ol_cv_db_db_4=no
18873 fi
18874 rm -f conftest*
18875
18876         LIBS="$ol_LIBS"
18877
18878 fi
18879
18880 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18881
18882         if test $ol_cv_db_db_4 = yes ; then
18883                 ol_cv_lib_db=-ldb-4
18884         fi
18885 fi
18886
18887 if test $ol_cv_lib_db = no ; then
18888         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18889 echo "configure:18890: checking for Berkeley DB link (-ldb4)" >&5
18890 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18891   echo $ac_n "(cached) $ac_c" 1>&6
18892 else
18893   
18894         ol_DB_LIB=-ldb4
18895         ol_LIBS=$LIBS
18896         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18897
18898         cat > conftest.$ac_ext <<EOF
18899 #line 18900 "configure"
18900 #include "confdefs.h"
18901
18902 #ifdef HAVE_DB_185_H
18903 # include <db_185.h>
18904 #else
18905 # include <db.h>
18906 #endif
18907
18908 #ifndef DB_VERSION_MAJOR
18909 # define DB_VERSION_MAJOR 1
18910 #endif
18911
18912 #ifndef NULL
18913 #define NULL ((void*)0)
18914 #endif
18915
18916 int main() {
18917
18918 #if DB_VERSION_MAJOR > 1
18919         {
18920                 char *version;
18921                 int major, minor, patch;
18922
18923                 version = db_version( &major, &minor, &patch );
18924
18925                 if( major != DB_VERSION_MAJOR ||
18926                         minor < DB_VERSION_MINOR )
18927                 {
18928                         printf("Berkeley DB version mismatch\n"
18929                                 "\texpected: %s\n\tgot: %s\n",
18930                                 DB_VERSION_STRING, version);
18931                         return 1;
18932                 }
18933         }
18934 #endif
18935
18936 #if DB_VERSION_MAJOR > 2
18937         db_env_create( NULL, 0 );
18938 #elif DB_VERSION_MAJOR > 1
18939         db_appexit( NULL );
18940 #else
18941         (void) dbopen( NULL, 0, 0, 0, NULL);
18942 #endif
18943
18944 ; return 0; }
18945 EOF
18946 if { (eval echo configure:18947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18947   rm -rf conftest*
18948   ol_cv_db_db4=yes
18949 else
18950   echo "configure: failed program was:" >&5
18951   cat conftest.$ac_ext >&5
18952   rm -rf conftest*
18953   ol_cv_db_db4=no
18954 fi
18955 rm -f conftest*
18956
18957         LIBS="$ol_LIBS"
18958
18959 fi
18960
18961 echo "$ac_t""$ol_cv_db_db4" 1>&6
18962
18963         if test $ol_cv_db_db4 = yes ; then
18964                 ol_cv_lib_db=-ldb4
18965         fi
18966 fi
18967
18968 if test $ol_cv_lib_db = no ; then
18969         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18970 echo "configure:18971: checking for Berkeley DB link (-ldb)" >&5
18971 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18972   echo $ac_n "(cached) $ac_c" 1>&6
18973 else
18974   
18975         ol_DB_LIB=-ldb
18976         ol_LIBS=$LIBS
18977         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18978
18979         cat > conftest.$ac_ext <<EOF
18980 #line 18981 "configure"
18981 #include "confdefs.h"
18982
18983 #ifdef HAVE_DB_185_H
18984 # include <db_185.h>
18985 #else
18986 # include <db.h>
18987 #endif
18988
18989 #ifndef DB_VERSION_MAJOR
18990 # define DB_VERSION_MAJOR 1
18991 #endif
18992
18993 #ifndef NULL
18994 #define NULL ((void*)0)
18995 #endif
18996
18997 int main() {
18998
18999 #if DB_VERSION_MAJOR > 1
19000         {
19001                 char *version;
19002                 int major, minor, patch;
19003
19004                 version = db_version( &major, &minor, &patch );
19005
19006                 if( major != DB_VERSION_MAJOR ||
19007                         minor < DB_VERSION_MINOR )
19008                 {
19009                         printf("Berkeley DB version mismatch\n"
19010                                 "\texpected: %s\n\tgot: %s\n",
19011                                 DB_VERSION_STRING, version);
19012                         return 1;
19013                 }
19014         }
19015 #endif
19016
19017 #if DB_VERSION_MAJOR > 2
19018         db_env_create( NULL, 0 );
19019 #elif DB_VERSION_MAJOR > 1
19020         db_appexit( NULL );
19021 #else
19022         (void) dbopen( NULL, 0, 0, 0, NULL);
19023 #endif
19024
19025 ; return 0; }
19026 EOF
19027 if { (eval echo configure:19028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19028   rm -rf conftest*
19029   ol_cv_db_db=yes
19030 else
19031   echo "configure: failed program was:" >&5
19032   cat conftest.$ac_ext >&5
19033   rm -rf conftest*
19034   ol_cv_db_db=no
19035 fi
19036 rm -f conftest*
19037
19038         LIBS="$ol_LIBS"
19039
19040 fi
19041
19042 echo "$ac_t""$ol_cv_db_db" 1>&6
19043
19044         if test $ol_cv_db_db = yes ; then
19045                 ol_cv_lib_db=-ldb
19046         fi
19047 fi
19048
19049 if test $ol_cv_lib_db = no ; then
19050         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
19051 echo "configure:19052: checking for Berkeley DB link (-ldb41)" >&5
19052 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
19053   echo $ac_n "(cached) $ac_c" 1>&6
19054 else
19055   
19056         ol_DB_LIB=-ldb41
19057         ol_LIBS=$LIBS
19058         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19059
19060         cat > conftest.$ac_ext <<EOF
19061 #line 19062 "configure"
19062 #include "confdefs.h"
19063
19064 #ifdef HAVE_DB_185_H
19065 # include <db_185.h>
19066 #else
19067 # include <db.h>
19068 #endif
19069
19070 #ifndef DB_VERSION_MAJOR
19071 # define DB_VERSION_MAJOR 1
19072 #endif
19073
19074 #ifndef NULL
19075 #define NULL ((void*)0)
19076 #endif
19077
19078 int main() {
19079
19080 #if DB_VERSION_MAJOR > 1
19081         {
19082                 char *version;
19083                 int major, minor, patch;
19084
19085                 version = db_version( &major, &minor, &patch );
19086
19087                 if( major != DB_VERSION_MAJOR ||
19088                         minor < DB_VERSION_MINOR )
19089                 {
19090                         printf("Berkeley DB version mismatch\n"
19091                                 "\texpected: %s\n\tgot: %s\n",
19092                                 DB_VERSION_STRING, version);
19093                         return 1;
19094                 }
19095         }
19096 #endif
19097
19098 #if DB_VERSION_MAJOR > 2
19099         db_env_create( NULL, 0 );
19100 #elif DB_VERSION_MAJOR > 1
19101         db_appexit( NULL );
19102 #else
19103         (void) dbopen( NULL, 0, 0, 0, NULL);
19104 #endif
19105
19106 ; return 0; }
19107 EOF
19108 if { (eval echo configure:19109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19109   rm -rf conftest*
19110   ol_cv_db_db41=yes
19111 else
19112   echo "configure: failed program was:" >&5
19113   cat conftest.$ac_ext >&5
19114   rm -rf conftest*
19115   ol_cv_db_db41=no
19116 fi
19117 rm -f conftest*
19118
19119         LIBS="$ol_LIBS"
19120
19121 fi
19122
19123 echo "$ac_t""$ol_cv_db_db41" 1>&6
19124
19125         if test $ol_cv_db_db41 = yes ; then
19126                 ol_cv_lib_db=-ldb41
19127         fi
19128 fi
19129
19130 if test $ol_cv_lib_db = no ; then
19131         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19132 echo "configure:19133: checking for Berkeley DB link (-ldb-41)" >&5
19133 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19134   echo $ac_n "(cached) $ac_c" 1>&6
19135 else
19136   
19137         ol_DB_LIB=-ldb-41
19138         ol_LIBS=$LIBS
19139         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19140
19141         cat > conftest.$ac_ext <<EOF
19142 #line 19143 "configure"
19143 #include "confdefs.h"
19144
19145 #ifdef HAVE_DB_185_H
19146 # include <db_185.h>
19147 #else
19148 # include <db.h>
19149 #endif
19150
19151 #ifndef DB_VERSION_MAJOR
19152 # define DB_VERSION_MAJOR 1
19153 #endif
19154
19155 #ifndef NULL
19156 #define NULL ((void*)0)
19157 #endif
19158
19159 int main() {
19160
19161 #if DB_VERSION_MAJOR > 1
19162         {
19163                 char *version;
19164                 int major, minor, patch;
19165
19166                 version = db_version( &major, &minor, &patch );
19167
19168                 if( major != DB_VERSION_MAJOR ||
19169                         minor < DB_VERSION_MINOR )
19170                 {
19171                         printf("Berkeley DB version mismatch\n"
19172                                 "\texpected: %s\n\tgot: %s\n",
19173                                 DB_VERSION_STRING, version);
19174                         return 1;
19175                 }
19176         }
19177 #endif
19178
19179 #if DB_VERSION_MAJOR > 2
19180         db_env_create( NULL, 0 );
19181 #elif DB_VERSION_MAJOR > 1
19182         db_appexit( NULL );
19183 #else
19184         (void) dbopen( NULL, 0, 0, 0, NULL);
19185 #endif
19186
19187 ; return 0; }
19188 EOF
19189 if { (eval echo configure:19190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19190   rm -rf conftest*
19191   ol_cv_db_db_41=yes
19192 else
19193   echo "configure: failed program was:" >&5
19194   cat conftest.$ac_ext >&5
19195   rm -rf conftest*
19196   ol_cv_db_db_41=no
19197 fi
19198 rm -f conftest*
19199
19200         LIBS="$ol_LIBS"
19201
19202 fi
19203
19204 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19205
19206         if test $ol_cv_db_db_41 = yes ; then
19207                 ol_cv_lib_db=-ldb-41
19208         fi
19209 fi
19210
19211 if test $ol_cv_lib_db = no ; then
19212         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19213 echo "configure:19214: checking for Berkeley DB link (-ldb-4.1)" >&5
19214 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19215   echo $ac_n "(cached) $ac_c" 1>&6
19216 else
19217   
19218         ol_DB_LIB=-ldb-4.1
19219         ol_LIBS=$LIBS
19220         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19221
19222         cat > conftest.$ac_ext <<EOF
19223 #line 19224 "configure"
19224 #include "confdefs.h"
19225
19226 #ifdef HAVE_DB_185_H
19227 # include <db_185.h>
19228 #else
19229 # include <db.h>
19230 #endif
19231
19232 #ifndef DB_VERSION_MAJOR
19233 # define DB_VERSION_MAJOR 1
19234 #endif
19235
19236 #ifndef NULL
19237 #define NULL ((void*)0)
19238 #endif
19239
19240 int main() {
19241
19242 #if DB_VERSION_MAJOR > 1
19243         {
19244                 char *version;
19245                 int major, minor, patch;
19246
19247                 version = db_version( &major, &minor, &patch );
19248
19249                 if( major != DB_VERSION_MAJOR ||
19250                         minor < DB_VERSION_MINOR )
19251                 {
19252                         printf("Berkeley DB version mismatch\n"
19253                                 "\texpected: %s\n\tgot: %s\n",
19254                                 DB_VERSION_STRING, version);
19255                         return 1;
19256                 }
19257         }
19258 #endif
19259
19260 #if DB_VERSION_MAJOR > 2
19261         db_env_create( NULL, 0 );
19262 #elif DB_VERSION_MAJOR > 1
19263         db_appexit( NULL );
19264 #else
19265         (void) dbopen( NULL, 0, 0, 0, NULL);
19266 #endif
19267
19268 ; return 0; }
19269 EOF
19270 if { (eval echo configure:19271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19271   rm -rf conftest*
19272   ol_cv_db_db_4_dot_1=yes
19273 else
19274   echo "configure: failed program was:" >&5
19275   cat conftest.$ac_ext >&5
19276   rm -rf conftest*
19277   ol_cv_db_db_4_dot_1=no
19278 fi
19279 rm -f conftest*
19280
19281         LIBS="$ol_LIBS"
19282
19283 fi
19284
19285 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19286
19287         if test $ol_cv_db_db_4_dot_1 = yes ; then
19288                 ol_cv_lib_db=-ldb-4.1
19289         fi
19290 fi
19291
19292 if test $ol_cv_lib_db = no ; then
19293         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19294 echo "configure:19295: checking for Berkeley DB link (-ldb-4-1)" >&5
19295 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19296   echo $ac_n "(cached) $ac_c" 1>&6
19297 else
19298   
19299         ol_DB_LIB=-ldb-4-1
19300         ol_LIBS=$LIBS
19301         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19302
19303         cat > conftest.$ac_ext <<EOF
19304 #line 19305 "configure"
19305 #include "confdefs.h"
19306
19307 #ifdef HAVE_DB_185_H
19308 # include <db_185.h>
19309 #else
19310 # include <db.h>
19311 #endif
19312
19313 #ifndef DB_VERSION_MAJOR
19314 # define DB_VERSION_MAJOR 1
19315 #endif
19316
19317 #ifndef NULL
19318 #define NULL ((void*)0)
19319 #endif
19320
19321 int main() {
19322
19323 #if DB_VERSION_MAJOR > 1
19324         {
19325                 char *version;
19326                 int major, minor, patch;
19327
19328                 version = db_version( &major, &minor, &patch );
19329
19330                 if( major != DB_VERSION_MAJOR ||
19331                         minor < DB_VERSION_MINOR )
19332                 {
19333                         printf("Berkeley DB version mismatch\n"
19334                                 "\texpected: %s\n\tgot: %s\n",
19335                                 DB_VERSION_STRING, version);
19336                         return 1;
19337                 }
19338         }
19339 #endif
19340
19341 #if DB_VERSION_MAJOR > 2
19342         db_env_create( NULL, 0 );
19343 #elif DB_VERSION_MAJOR > 1
19344         db_appexit( NULL );
19345 #else
19346         (void) dbopen( NULL, 0, 0, 0, NULL);
19347 #endif
19348
19349 ; return 0; }
19350 EOF
19351 if { (eval echo configure:19352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19352   rm -rf conftest*
19353   ol_cv_db_db_4_1=yes
19354 else
19355   echo "configure: failed program was:" >&5
19356   cat conftest.$ac_ext >&5
19357   rm -rf conftest*
19358   ol_cv_db_db_4_1=no
19359 fi
19360 rm -f conftest*
19361
19362         LIBS="$ol_LIBS"
19363
19364 fi
19365
19366 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19367
19368         if test $ol_cv_db_db_4_1 = yes ; then
19369                 ol_cv_lib_db=-ldb-4-1
19370         fi
19371 fi
19372
19373 if test $ol_cv_lib_db = no ; then
19374         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19375 echo "configure:19376: checking for Berkeley DB link (-ldb3)" >&5
19376 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19377   echo $ac_n "(cached) $ac_c" 1>&6
19378 else
19379   
19380         ol_DB_LIB=-ldb3
19381         ol_LIBS=$LIBS
19382         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19383
19384         cat > conftest.$ac_ext <<EOF
19385 #line 19386 "configure"
19386 #include "confdefs.h"
19387
19388 #ifdef HAVE_DB_185_H
19389 # include <db_185.h>
19390 #else
19391 # include <db.h>
19392 #endif
19393
19394 #ifndef DB_VERSION_MAJOR
19395 # define DB_VERSION_MAJOR 1
19396 #endif
19397
19398 #ifndef NULL
19399 #define NULL ((void*)0)
19400 #endif
19401
19402 int main() {
19403
19404 #if DB_VERSION_MAJOR > 1
19405         {
19406                 char *version;
19407                 int major, minor, patch;
19408
19409                 version = db_version( &major, &minor, &patch );
19410
19411                 if( major != DB_VERSION_MAJOR ||
19412                         minor < DB_VERSION_MINOR )
19413                 {
19414                         printf("Berkeley DB version mismatch\n"
19415                                 "\texpected: %s\n\tgot: %s\n",
19416                                 DB_VERSION_STRING, version);
19417                         return 1;
19418                 }
19419         }
19420 #endif
19421
19422 #if DB_VERSION_MAJOR > 2
19423         db_env_create( NULL, 0 );
19424 #elif DB_VERSION_MAJOR > 1
19425         db_appexit( NULL );
19426 #else
19427         (void) dbopen( NULL, 0, 0, 0, NULL);
19428 #endif
19429
19430 ; return 0; }
19431 EOF
19432 if { (eval echo configure:19433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19433   rm -rf conftest*
19434   ol_cv_db_db3=yes
19435 else
19436   echo "configure: failed program was:" >&5
19437   cat conftest.$ac_ext >&5
19438   rm -rf conftest*
19439   ol_cv_db_db3=no
19440 fi
19441 rm -f conftest*
19442
19443         LIBS="$ol_LIBS"
19444
19445 fi
19446
19447 echo "$ac_t""$ol_cv_db_db3" 1>&6
19448
19449         if test $ol_cv_db_db3 = yes ; then
19450                 ol_cv_lib_db=-ldb3
19451         fi
19452 fi
19453
19454 if test $ol_cv_lib_db = no ; then
19455         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19456 echo "configure:19457: checking for Berkeley DB link (-ldb-3)" >&5
19457 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19458   echo $ac_n "(cached) $ac_c" 1>&6
19459 else
19460   
19461         ol_DB_LIB=-ldb-3
19462         ol_LIBS=$LIBS
19463         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19464
19465         cat > conftest.$ac_ext <<EOF
19466 #line 19467 "configure"
19467 #include "confdefs.h"
19468
19469 #ifdef HAVE_DB_185_H
19470 # include <db_185.h>
19471 #else
19472 # include <db.h>
19473 #endif
19474
19475 #ifndef DB_VERSION_MAJOR
19476 # define DB_VERSION_MAJOR 1
19477 #endif
19478
19479 #ifndef NULL
19480 #define NULL ((void*)0)
19481 #endif
19482
19483 int main() {
19484
19485 #if DB_VERSION_MAJOR > 1
19486         {
19487                 char *version;
19488                 int major, minor, patch;
19489
19490                 version = db_version( &major, &minor, &patch );
19491
19492                 if( major != DB_VERSION_MAJOR ||
19493                         minor < DB_VERSION_MINOR )
19494                 {
19495                         printf("Berkeley DB version mismatch\n"
19496                                 "\texpected: %s\n\tgot: %s\n",
19497                                 DB_VERSION_STRING, version);
19498                         return 1;
19499                 }
19500         }
19501 #endif
19502
19503 #if DB_VERSION_MAJOR > 2
19504         db_env_create( NULL, 0 );
19505 #elif DB_VERSION_MAJOR > 1
19506         db_appexit( NULL );
19507 #else
19508         (void) dbopen( NULL, 0, 0, 0, NULL);
19509 #endif
19510
19511 ; return 0; }
19512 EOF
19513 if { (eval echo configure:19514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19514   rm -rf conftest*
19515   ol_cv_db_db_3=yes
19516 else
19517   echo "configure: failed program was:" >&5
19518   cat conftest.$ac_ext >&5
19519   rm -rf conftest*
19520   ol_cv_db_db_3=no
19521 fi
19522 rm -f conftest*
19523
19524         LIBS="$ol_LIBS"
19525
19526 fi
19527
19528 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19529
19530         if test $ol_cv_db_db_3 = yes ; then
19531                 ol_cv_lib_db=-ldb-3
19532         fi
19533 fi
19534
19535 if test $ol_cv_lib_db = no ; then
19536         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19537 echo "configure:19538: checking for Berkeley DB link (-ldb2)" >&5
19538 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19539   echo $ac_n "(cached) $ac_c" 1>&6
19540 else
19541   
19542         ol_DB_LIB=-ldb2
19543         ol_LIBS=$LIBS
19544         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19545
19546         cat > conftest.$ac_ext <<EOF
19547 #line 19548 "configure"
19548 #include "confdefs.h"
19549
19550 #ifdef HAVE_DB_185_H
19551 # include <db_185.h>
19552 #else
19553 # include <db.h>
19554 #endif
19555
19556 #ifndef DB_VERSION_MAJOR
19557 # define DB_VERSION_MAJOR 1
19558 #endif
19559
19560 #ifndef NULL
19561 #define NULL ((void*)0)
19562 #endif
19563
19564 int main() {
19565
19566 #if DB_VERSION_MAJOR > 1
19567         {
19568                 char *version;
19569                 int major, minor, patch;
19570
19571                 version = db_version( &major, &minor, &patch );
19572
19573                 if( major != DB_VERSION_MAJOR ||
19574                         minor < DB_VERSION_MINOR )
19575                 {
19576                         printf("Berkeley DB version mismatch\n"
19577                                 "\texpected: %s\n\tgot: %s\n",
19578                                 DB_VERSION_STRING, version);
19579                         return 1;
19580                 }
19581         }
19582 #endif
19583
19584 #if DB_VERSION_MAJOR > 2
19585         db_env_create( NULL, 0 );
19586 #elif DB_VERSION_MAJOR > 1
19587         db_appexit( NULL );
19588 #else
19589         (void) dbopen( NULL, 0, 0, 0, NULL);
19590 #endif
19591
19592 ; return 0; }
19593 EOF
19594 if { (eval echo configure:19595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19595   rm -rf conftest*
19596   ol_cv_db_db2=yes
19597 else
19598   echo "configure: failed program was:" >&5
19599   cat conftest.$ac_ext >&5
19600   rm -rf conftest*
19601   ol_cv_db_db2=no
19602 fi
19603 rm -f conftest*
19604
19605         LIBS="$ol_LIBS"
19606
19607 fi
19608
19609 echo "$ac_t""$ol_cv_db_db2" 1>&6
19610
19611         if test $ol_cv_db_db2 = yes ; then
19612                 ol_cv_lib_db=-ldb2
19613         fi
19614 fi
19615
19616 if test $ol_cv_lib_db = no ; then
19617         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19618 echo "configure:19619: checking for Berkeley DB link (-ldb-2)" >&5
19619 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19620   echo $ac_n "(cached) $ac_c" 1>&6
19621 else
19622   
19623         ol_DB_LIB=-ldb-2
19624         ol_LIBS=$LIBS
19625         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19626
19627         cat > conftest.$ac_ext <<EOF
19628 #line 19629 "configure"
19629 #include "confdefs.h"
19630
19631 #ifdef HAVE_DB_185_H
19632 # include <db_185.h>
19633 #else
19634 # include <db.h>
19635 #endif
19636
19637 #ifndef DB_VERSION_MAJOR
19638 # define DB_VERSION_MAJOR 1
19639 #endif
19640
19641 #ifndef NULL
19642 #define NULL ((void*)0)
19643 #endif
19644
19645 int main() {
19646
19647 #if DB_VERSION_MAJOR > 1
19648         {
19649                 char *version;
19650                 int major, minor, patch;
19651
19652                 version = db_version( &major, &minor, &patch );
19653
19654                 if( major != DB_VERSION_MAJOR ||
19655                         minor < DB_VERSION_MINOR )
19656                 {
19657                         printf("Berkeley DB version mismatch\n"
19658                                 "\texpected: %s\n\tgot: %s\n",
19659                                 DB_VERSION_STRING, version);
19660                         return 1;
19661                 }
19662         }
19663 #endif
19664
19665 #if DB_VERSION_MAJOR > 2
19666         db_env_create( NULL, 0 );
19667 #elif DB_VERSION_MAJOR > 1
19668         db_appexit( NULL );
19669 #else
19670         (void) dbopen( NULL, 0, 0, 0, NULL);
19671 #endif
19672
19673 ; return 0; }
19674 EOF
19675 if { (eval echo configure:19676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19676   rm -rf conftest*
19677   ol_cv_db_db_2=yes
19678 else
19679   echo "configure: failed program was:" >&5
19680   cat conftest.$ac_ext >&5
19681   rm -rf conftest*
19682   ol_cv_db_db_2=no
19683 fi
19684 rm -f conftest*
19685
19686         LIBS="$ol_LIBS"
19687
19688 fi
19689
19690 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19691
19692         if test $ol_cv_db_db_2 = yes ; then
19693                 ol_cv_lib_db=-ldb-2
19694         fi
19695 fi
19696
19697 if test $ol_cv_lib_db = no ; then
19698         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19699 echo "configure:19700: checking for Berkeley DB link (-ldb1)" >&5
19700 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19701   echo $ac_n "(cached) $ac_c" 1>&6
19702 else
19703   
19704         ol_DB_LIB=-ldb1
19705         ol_LIBS=$LIBS
19706         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19707
19708         cat > conftest.$ac_ext <<EOF
19709 #line 19710 "configure"
19710 #include "confdefs.h"
19711
19712 #ifdef HAVE_DB_185_H
19713 # include <db_185.h>
19714 #else
19715 # include <db.h>
19716 #endif
19717
19718 #ifndef DB_VERSION_MAJOR
19719 # define DB_VERSION_MAJOR 1
19720 #endif
19721
19722 #ifndef NULL
19723 #define NULL ((void*)0)
19724 #endif
19725
19726 int main() {
19727
19728 #if DB_VERSION_MAJOR > 1
19729         {
19730                 char *version;
19731                 int major, minor, patch;
19732
19733                 version = db_version( &major, &minor, &patch );
19734
19735                 if( major != DB_VERSION_MAJOR ||
19736                         minor < DB_VERSION_MINOR )
19737                 {
19738                         printf("Berkeley DB version mismatch\n"
19739                                 "\texpected: %s\n\tgot: %s\n",
19740                                 DB_VERSION_STRING, version);
19741                         return 1;
19742                 }
19743         }
19744 #endif
19745
19746 #if DB_VERSION_MAJOR > 2
19747         db_env_create( NULL, 0 );
19748 #elif DB_VERSION_MAJOR > 1
19749         db_appexit( NULL );
19750 #else
19751         (void) dbopen( NULL, 0, 0, 0, NULL);
19752 #endif
19753
19754 ; return 0; }
19755 EOF
19756 if { (eval echo configure:19757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19757   rm -rf conftest*
19758   ol_cv_db_db1=yes
19759 else
19760   echo "configure: failed program was:" >&5
19761   cat conftest.$ac_ext >&5
19762   rm -rf conftest*
19763   ol_cv_db_db1=no
19764 fi
19765 rm -f conftest*
19766
19767         LIBS="$ol_LIBS"
19768
19769 fi
19770
19771 echo "$ac_t""$ol_cv_db_db1" 1>&6
19772
19773         if test $ol_cv_db_db1 = yes ; then
19774                 ol_cv_lib_db=-ldb1
19775         fi
19776 fi
19777
19778 if test $ol_cv_lib_db = no ; then
19779         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19780 echo "configure:19781: checking for Berkeley DB link (-ldb-1)" >&5
19781 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19782   echo $ac_n "(cached) $ac_c" 1>&6
19783 else
19784   
19785         ol_DB_LIB=-ldb-1
19786         ol_LIBS=$LIBS
19787         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19788
19789         cat > conftest.$ac_ext <<EOF
19790 #line 19791 "configure"
19791 #include "confdefs.h"
19792
19793 #ifdef HAVE_DB_185_H
19794 # include <db_185.h>
19795 #else
19796 # include <db.h>
19797 #endif
19798
19799 #ifndef DB_VERSION_MAJOR
19800 # define DB_VERSION_MAJOR 1
19801 #endif
19802
19803 #ifndef NULL
19804 #define NULL ((void*)0)
19805 #endif
19806
19807 int main() {
19808
19809 #if DB_VERSION_MAJOR > 1
19810         {
19811                 char *version;
19812                 int major, minor, patch;
19813
19814                 version = db_version( &major, &minor, &patch );
19815
19816                 if( major != DB_VERSION_MAJOR ||
19817                         minor < DB_VERSION_MINOR )
19818                 {
19819                         printf("Berkeley DB version mismatch\n"
19820                                 "\texpected: %s\n\tgot: %s\n",
19821                                 DB_VERSION_STRING, version);
19822                         return 1;
19823                 }
19824         }
19825 #endif
19826
19827 #if DB_VERSION_MAJOR > 2
19828         db_env_create( NULL, 0 );
19829 #elif DB_VERSION_MAJOR > 1
19830         db_appexit( NULL );
19831 #else
19832         (void) dbopen( NULL, 0, 0, 0, NULL);
19833 #endif
19834
19835 ; return 0; }
19836 EOF
19837 if { (eval echo configure:19838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19838   rm -rf conftest*
19839   ol_cv_db_db_1=yes
19840 else
19841   echo "configure: failed program was:" >&5
19842   cat conftest.$ac_ext >&5
19843   rm -rf conftest*
19844   ol_cv_db_db_1=no
19845 fi
19846 rm -f conftest*
19847
19848         LIBS="$ol_LIBS"
19849
19850 fi
19851
19852 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19853
19854         if test $ol_cv_db_db_1 = yes ; then
19855                 ol_cv_lib_db=-ldb-1
19856         fi
19857 fi
19858
19859
19860         if test "$ol_cv_lib_db" != no ; then
19861                 ol_cv_berkeley_db=yes
19862                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19863 echo "configure:19864: checking for Berkeley DB version match" >&5
19864 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19865   echo $ac_n "(cached) $ac_c" 1>&6
19866 else
19867   
19868         ol_LIBS="$LIBS"
19869         LIBS="$LTHREAD_LIBS $LIBS"
19870         if test $ol_cv_lib_db != yes ; then
19871                 LIBS="$ol_cv_lib_db $LIBS"
19872         fi
19873
19874         if test "$cross_compiling" = yes; then
19875   ol_cv_berkeley_db_version=cross
19876 else
19877   cat > conftest.$ac_ext <<EOF
19878 #line 19879 "configure"
19879 #include "confdefs.h"
19880
19881 #ifdef HAVE_DB_185_H
19882         choke me;
19883 #else
19884 #include <db.h>
19885 #endif
19886 #ifndef DB_VERSION_MAJOR
19887 # define DB_VERSION_MAJOR 1
19888 #endif
19889 #ifndef NULL
19890 #define NULL ((void *)0)
19891 #endif
19892 main()
19893 {
19894 #if DB_VERSION_MAJOR > 1
19895         char *version;
19896         int major, minor, patch;
19897
19898         version = db_version( &major, &minor, &patch );
19899
19900         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19901                 printf("Berkeley DB version mismatch\n"
19902                         "\texpected: %s\n\tgot: %s\n",
19903                         DB_VERSION_STRING, version);
19904                 return 1;
19905         }
19906 #endif
19907
19908         return 0;
19909 }
19910 EOF
19911 if { (eval echo configure:19912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19912 then
19913   ol_cv_berkeley_db_version=yes
19914 else
19915   echo "configure: failed program was:" >&5
19916   cat conftest.$ac_ext >&5
19917   rm -fr conftest*
19918   ol_cv_berkeley_db_version=no
19919 fi
19920 rm -fr conftest*
19921 fi
19922
19923
19924         LIBS="$ol_LIBS"
19925
19926 fi
19927
19928 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19929
19930         if test $ol_cv_berkeley_db_version = no ; then
19931                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19932         fi
19933
19934                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19935 echo "configure:19936: checking for Berkeley DB thread support" >&5
19936 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19937   echo $ac_n "(cached) $ac_c" 1>&6
19938 else
19939   
19940         ol_LIBS="$LIBS"
19941         LIBS="$LTHREAD_LIBS $LIBS"
19942         if test $ol_cv_lib_db != yes ; then
19943                 LIBS="$ol_cv_lib_db $LIBS"
19944         fi
19945
19946         if test "$cross_compiling" = yes; then
19947   ol_cv_berkeley_db_thread=cross
19948 else
19949   cat > conftest.$ac_ext <<EOF
19950 #line 19951 "configure"
19951 #include "confdefs.h"
19952
19953 #ifdef HAVE_DB_185_H
19954         choke me;
19955 #else
19956 #include <db.h>
19957 #endif
19958 #ifndef NULL
19959 #define NULL ((void *)0)
19960 #endif
19961 main()
19962 {
19963         int rc;
19964         u_int32_t flags = DB_CREATE |
19965 #ifdef DB_PRIVATE
19966                 DB_PRIVATE |
19967 #endif
19968                 DB_THREAD;
19969
19970 #if DB_VERSION_MAJOR > 2
19971         DB_ENV *env = NULL;
19972
19973         rc = db_env_create( &env, 0 );
19974
19975         flags |= DB_INIT_MPOOL;
19976 #ifdef DB_MPOOL_PRIVATE
19977         flags |= DB_MPOOL_PRIVATE;
19978 #endif
19979
19980         if( rc ) {
19981                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19982                 return rc;
19983         }
19984
19985 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19986         rc = env->open( env, NULL, flags, 0 );
19987 #else
19988         rc = env->open( env, NULL, NULL, flags, 0 );
19989 #endif
19990
19991         if ( rc == 0 ) {
19992                 rc = env->close( env, 0 );
19993         }
19994
19995         if( rc ) {
19996                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19997                 return rc;
19998         }
19999
20000 #else
20001         DB_ENV env;
20002         memset( &env, '\0', sizeof(env) );
20003
20004         rc = db_appinit( NULL, NULL, &env, flags );
20005
20006         if( rc == 0 ) {
20007                 db_appexit( &env );
20008         }
20009
20010         unlink("__db_mpool.share");
20011         unlink("__db_lock.share");
20012 #endif
20013
20014         return rc;
20015 }
20016 EOF
20017 if { (eval echo configure:20018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20018 then
20019   ol_cv_berkeley_db_thread=yes
20020 else
20021   echo "configure: failed program was:" >&5
20022   cat conftest.$ac_ext >&5
20023   rm -fr conftest*
20024   ol_cv_berkeley_db_thread=no
20025 fi
20026 rm -fr conftest*
20027 fi
20028
20029
20030         LIBS="$ol_LIBS"
20031
20032 fi
20033
20034 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
20035
20036         if test $ol_cv_berkeley_db_thread != no ; then
20037                 cat >> confdefs.h <<\EOF
20038 #define HAVE_BERKELEY_DB_THREAD 1
20039 EOF
20040
20041         fi
20042
20043         fi
20044 fi
20045
20046         fi
20047
20048         if test $ol_cv_berkeley_db != no ; then
20049                 cat >> confdefs.h <<\EOF
20050 #define HAVE_BERKELEY_DB 1
20051 EOF
20052
20053
20054                 ol_link_ldbm=berkeley
20055                 ol_with_ldbm_api=berkeley
20056
20057                 if test $ol_with_ldbm_type = hash ; then
20058                         cat >> confdefs.h <<\EOF
20059 #define LDBM_USE_DBHASH 1
20060 EOF
20061
20062                 else
20063                         cat >> confdefs.h <<\EOF
20064 #define LDBM_USE_DBBTREE 1
20065 EOF
20066
20067                 fi
20068
20069                                                 if test $ol_cv_lib_db != yes ; then
20070                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
20071                 fi
20072         fi
20073 fi
20074
20075 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
20076         if test $ol_link_ldbm != berkeley ; then
20077                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
20078         else
20079                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
20080 echo "configure:20081: checking Berkeley DB version for BDB backend" >&5
20081 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
20082   echo $ac_n "(cached) $ac_c" 1>&6
20083 else
20084   
20085         cat > conftest.$ac_ext <<EOF
20086 #line 20087 "configure"
20087 #include "confdefs.h"
20088
20089 #include <db.h>
20090
20091  /* this check could be improved */
20092 #ifndef DB_VERSION_MAJOR
20093 #       define DB_VERSION_MAJOR 1
20094 #endif
20095 #ifndef DB_VERSION_MINOR
20096 #       define DB_VERSION_MINOR 0
20097 #endif
20098
20099 /* require 4.2 or later */
20100 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
20101         __db_version_compat
20102 #endif
20103         
20104 EOF
20105 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20106   egrep "__db_version_compat" >/dev/null 2>&1; then
20107   rm -rf conftest*
20108   ol_cv_bdb_compat=yes
20109 else
20110   rm -rf conftest*
20111   ol_cv_bdb_compat=no
20112 fi
20113 rm -f conftest*
20114
20115 fi
20116
20117 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20118
20119
20120                 if test $ol_cv_bdb_compat != yes ; then
20121                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20122                 fi
20123         fi
20124 fi
20125
20126 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20127         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20128         ol_with_ldbm_api=none
20129 fi
20130
20131 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20132         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20133 echo "configure:20134: checking for MDBM library" >&5
20134 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20135   echo $ac_n "(cached) $ac_c" 1>&6
20136 else
20137         ol_LIBS="$LIBS"
20138         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20139 echo "configure:20140: checking for mdbm_set_chain" >&5
20140 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20141   echo $ac_n "(cached) $ac_c" 1>&6
20142 else
20143   cat > conftest.$ac_ext <<EOF
20144 #line 20145 "configure"
20145 #include "confdefs.h"
20146 /* System header to define __stub macros and hopefully few prototypes,
20147     which can conflict with char mdbm_set_chain(); below.  */
20148 #include <assert.h>
20149 /* Override any gcc2 internal prototype to avoid an error.  */
20150 /* We use char because int might match the return type of a gcc2
20151     builtin and then its argument prototype would still apply.  */
20152 char mdbm_set_chain();
20153 char (*f)();
20154
20155 int main() {
20156
20157 /* The GNU C library defines this for functions which it implements
20158     to always fail with ENOSYS.  Some functions are actually named
20159     something starting with __ and the normal name is an alias.  */
20160 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20161 choke me
20162 #else
20163 f = mdbm_set_chain;
20164 #endif
20165
20166 ; return 0; }
20167 EOF
20168 if { (eval echo configure:20169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20169   rm -rf conftest*
20170   eval "ac_cv_func_mdbm_set_chain=yes"
20171 else
20172   echo "configure: failed program was:" >&5
20173   cat conftest.$ac_ext >&5
20174   rm -rf conftest*
20175   eval "ac_cv_func_mdbm_set_chain=no"
20176 fi
20177 rm -f conftest*
20178 fi
20179
20180 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20181   echo "$ac_t""yes" 1>&6
20182   ol_cv_lib_mdbm=yes
20183 else
20184   echo "$ac_t""no" 1>&6
20185
20186                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20187 echo "configure:20188: checking for mdbm_set_chain in -lmdbm" >&5
20188 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20190   echo $ac_n "(cached) $ac_c" 1>&6
20191 else
20192   ac_save_LIBS="$LIBS"
20193 LIBS="-lmdbm  $LIBS"
20194 cat > conftest.$ac_ext <<EOF
20195 #line 20196 "configure"
20196 #include "confdefs.h"
20197 /* Override any gcc2 internal prototype to avoid an error.  */
20198 /* We use char because int might match the return type of a gcc2
20199     builtin and then its argument prototype would still apply.  */
20200 char mdbm_set_chain();
20201
20202 int main() {
20203 mdbm_set_chain()
20204 ; return 0; }
20205 EOF
20206 if { (eval echo configure:20207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20207   rm -rf conftest*
20208   eval "ac_cv_lib_$ac_lib_var=yes"
20209 else
20210   echo "configure: failed program was:" >&5
20211   cat conftest.$ac_ext >&5
20212   rm -rf conftest*
20213   eval "ac_cv_lib_$ac_lib_var=no"
20214 fi
20215 rm -f conftest*
20216 LIBS="$ac_save_LIBS"
20217
20218 fi
20219 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20220   echo "$ac_t""yes" 1>&6
20221   ol_cv_lib_mdbm=-lmdbm
20222 else
20223   echo "$ac_t""no" 1>&6
20224 ol_cv_lib_mdbm=no
20225 fi
20226
20227         
20228 fi
20229
20230         LIBS="$ol_LIBS"
20231
20232 fi
20233
20234 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20235
20236
20237  for ac_hdr in mdbm.h
20238 do
20239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20241 echo "configure:20242: checking for $ac_hdr" >&5
20242 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20243   echo $ac_n "(cached) $ac_c" 1>&6
20244 else
20245   cat > conftest.$ac_ext <<EOF
20246 #line 20247 "configure"
20247 #include "confdefs.h"
20248 #include <$ac_hdr>
20249 EOF
20250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20251 { (eval echo configure:20252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20253 if test -z "$ac_err"; then
20254   rm -rf conftest*
20255   eval "ac_cv_header_$ac_safe=yes"
20256 else
20257   echo "$ac_err" >&5
20258   echo "configure: failed program was:" >&5
20259   cat conftest.$ac_ext >&5
20260   rm -rf conftest*
20261   eval "ac_cv_header_$ac_safe=no"
20262 fi
20263 rm -f conftest*
20264 fi
20265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20266   echo "$ac_t""yes" 1>&6
20267     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20268   cat >> confdefs.h <<EOF
20269 #define $ac_tr_hdr 1
20270 EOF
20271  
20272 else
20273   echo "$ac_t""no" 1>&6
20274 fi
20275 done
20276
20277  echo $ac_n "checking for db""... $ac_c" 1>&6
20278 echo "configure:20279: checking for db" >&5
20279 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20280   echo $ac_n "(cached) $ac_c" 1>&6
20281 else
20282   
20283         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20284                 ol_cv_mdbm=no
20285         else
20286                 ol_cv_mdbm=yes
20287         fi
20288
20289 fi
20290
20291 echo "$ac_t""$ol_cv_mdbm" 1>&6
20292  if test $ol_cv_mdbm = yes ; then
20293         cat >> confdefs.h <<\EOF
20294 #define HAVE_MDBM 1
20295 EOF
20296
20297  fi
20298
20299
20300         if test $ol_cv_mdbm = yes ; then
20301                 ol_link_ldbm=mdbm
20302                 ol_with_ldbm_api=mdbm
20303                 if test $ol_cv_lib_mdbm != yes ; then
20304                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20305                 fi
20306         fi
20307 fi
20308
20309 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20310         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20311 echo "configure:20312: checking for GDBM library" >&5
20312 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315         ol_LIBS="$LIBS"
20316         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20317 echo "configure:20318: checking for gdbm_open" >&5
20318 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20319   echo $ac_n "(cached) $ac_c" 1>&6
20320 else
20321   cat > conftest.$ac_ext <<EOF
20322 #line 20323 "configure"
20323 #include "confdefs.h"
20324 /* System header to define __stub macros and hopefully few prototypes,
20325     which can conflict with char gdbm_open(); below.  */
20326 #include <assert.h>
20327 /* Override any gcc2 internal prototype to avoid an error.  */
20328 /* We use char because int might match the return type of a gcc2
20329     builtin and then its argument prototype would still apply.  */
20330 char gdbm_open();
20331 char (*f)();
20332
20333 int main() {
20334
20335 /* The GNU C library defines this for functions which it implements
20336     to always fail with ENOSYS.  Some functions are actually named
20337     something starting with __ and the normal name is an alias.  */
20338 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20339 choke me
20340 #else
20341 f = gdbm_open;
20342 #endif
20343
20344 ; return 0; }
20345 EOF
20346 if { (eval echo configure:20347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20347   rm -rf conftest*
20348   eval "ac_cv_func_gdbm_open=yes"
20349 else
20350   echo "configure: failed program was:" >&5
20351   cat conftest.$ac_ext >&5
20352   rm -rf conftest*
20353   eval "ac_cv_func_gdbm_open=no"
20354 fi
20355 rm -f conftest*
20356 fi
20357
20358 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20359   echo "$ac_t""yes" 1>&6
20360   ol_cv_lib_gdbm=yes
20361 else
20362   echo "$ac_t""no" 1>&6
20363
20364                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20365 echo "configure:20366: checking for gdbm_open in -lgdbm" >&5
20366 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20367 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20368   echo $ac_n "(cached) $ac_c" 1>&6
20369 else
20370   ac_save_LIBS="$LIBS"
20371 LIBS="-lgdbm  $LIBS"
20372 cat > conftest.$ac_ext <<EOF
20373 #line 20374 "configure"
20374 #include "confdefs.h"
20375 /* Override any gcc2 internal prototype to avoid an error.  */
20376 /* We use char because int might match the return type of a gcc2
20377     builtin and then its argument prototype would still apply.  */
20378 char gdbm_open();
20379
20380 int main() {
20381 gdbm_open()
20382 ; return 0; }
20383 EOF
20384 if { (eval echo configure:20385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20385   rm -rf conftest*
20386   eval "ac_cv_lib_$ac_lib_var=yes"
20387 else
20388   echo "configure: failed program was:" >&5
20389   cat conftest.$ac_ext >&5
20390   rm -rf conftest*
20391   eval "ac_cv_lib_$ac_lib_var=no"
20392 fi
20393 rm -f conftest*
20394 LIBS="$ac_save_LIBS"
20395
20396 fi
20397 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20398   echo "$ac_t""yes" 1>&6
20399   ol_cv_lib_gdbm=-lgdbm
20400 else
20401   echo "$ac_t""no" 1>&6
20402 ol_cv_lib_gdbm=no
20403 fi
20404
20405         
20406 fi
20407
20408         LIBS="$ol_LIBS"
20409
20410 fi
20411
20412 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20413
20414
20415  for ac_hdr in gdbm.h
20416 do
20417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20419 echo "configure:20420: checking for $ac_hdr" >&5
20420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20421   echo $ac_n "(cached) $ac_c" 1>&6
20422 else
20423   cat > conftest.$ac_ext <<EOF
20424 #line 20425 "configure"
20425 #include "confdefs.h"
20426 #include <$ac_hdr>
20427 EOF
20428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20429 { (eval echo configure:20430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20431 if test -z "$ac_err"; then
20432   rm -rf conftest*
20433   eval "ac_cv_header_$ac_safe=yes"
20434 else
20435   echo "$ac_err" >&5
20436   echo "configure: failed program was:" >&5
20437   cat conftest.$ac_ext >&5
20438   rm -rf conftest*
20439   eval "ac_cv_header_$ac_safe=no"
20440 fi
20441 rm -f conftest*
20442 fi
20443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20444   echo "$ac_t""yes" 1>&6
20445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20446   cat >> confdefs.h <<EOF
20447 #define $ac_tr_hdr 1
20448 EOF
20449  
20450 else
20451   echo "$ac_t""no" 1>&6
20452 fi
20453 done
20454
20455  echo $ac_n "checking for db""... $ac_c" 1>&6
20456 echo "configure:20457: checking for db" >&5
20457 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20458   echo $ac_n "(cached) $ac_c" 1>&6
20459 else
20460   
20461         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20462                 ol_cv_gdbm=no
20463         else
20464                 ol_cv_gdbm=yes
20465         fi
20466
20467 fi
20468
20469 echo "$ac_t""$ol_cv_gdbm" 1>&6
20470  if test $ol_cv_gdbm = yes ; then
20471         cat >> confdefs.h <<\EOF
20472 #define HAVE_GDBM 1
20473 EOF
20474
20475  fi
20476
20477
20478         if test $ol_cv_gdbm = yes ; then
20479                 ol_link_ldbm=gdbm
20480                 ol_with_ldbm_api=gdbm
20481
20482                 if test $ol_cv_lib_gdbm != yes ; then
20483                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20484                 fi
20485         fi
20486 fi
20487
20488 if test $ol_with_ldbm_api = ndbm ; then
20489         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20490 echo "configure:20491: checking for NDBM library" >&5
20491 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20492   echo $ac_n "(cached) $ac_c" 1>&6
20493 else
20494         ol_LIBS="$LIBS"
20495         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20496 echo "configure:20497: checking for dbm_open" >&5
20497 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20498   echo $ac_n "(cached) $ac_c" 1>&6
20499 else
20500   cat > conftest.$ac_ext <<EOF
20501 #line 20502 "configure"
20502 #include "confdefs.h"
20503 /* System header to define __stub macros and hopefully few prototypes,
20504     which can conflict with char dbm_open(); below.  */
20505 #include <assert.h>
20506 /* Override any gcc2 internal prototype to avoid an error.  */
20507 /* We use char because int might match the return type of a gcc2
20508     builtin and then its argument prototype would still apply.  */
20509 char dbm_open();
20510 char (*f)();
20511
20512 int main() {
20513
20514 /* The GNU C library defines this for functions which it implements
20515     to always fail with ENOSYS.  Some functions are actually named
20516     something starting with __ and the normal name is an alias.  */
20517 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20518 choke me
20519 #else
20520 f = dbm_open;
20521 #endif
20522
20523 ; return 0; }
20524 EOF
20525 if { (eval echo configure:20526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20526   rm -rf conftest*
20527   eval "ac_cv_func_dbm_open=yes"
20528 else
20529   echo "configure: failed program was:" >&5
20530   cat conftest.$ac_ext >&5
20531   rm -rf conftest*
20532   eval "ac_cv_func_dbm_open=no"
20533 fi
20534 rm -f conftest*
20535 fi
20536
20537 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20538   echo "$ac_t""yes" 1>&6
20539   ol_cv_lib_ndbm=yes
20540 else
20541   echo "$ac_t""no" 1>&6
20542
20543                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20544 echo "configure:20545: checking for dbm_open in -lndbm" >&5
20545 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20546 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20547   echo $ac_n "(cached) $ac_c" 1>&6
20548 else
20549   ac_save_LIBS="$LIBS"
20550 LIBS="-lndbm  $LIBS"
20551 cat > conftest.$ac_ext <<EOF
20552 #line 20553 "configure"
20553 #include "confdefs.h"
20554 /* Override any gcc2 internal prototype to avoid an error.  */
20555 /* We use char because int might match the return type of a gcc2
20556     builtin and then its argument prototype would still apply.  */
20557 char dbm_open();
20558
20559 int main() {
20560 dbm_open()
20561 ; return 0; }
20562 EOF
20563 if { (eval echo configure:20564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20564   rm -rf conftest*
20565   eval "ac_cv_lib_$ac_lib_var=yes"
20566 else
20567   echo "configure: failed program was:" >&5
20568   cat conftest.$ac_ext >&5
20569   rm -rf conftest*
20570   eval "ac_cv_lib_$ac_lib_var=no"
20571 fi
20572 rm -f conftest*
20573 LIBS="$ac_save_LIBS"
20574
20575 fi
20576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20577   echo "$ac_t""yes" 1>&6
20578   ol_cv_lib_ndbm=-lndbm
20579 else
20580   echo "$ac_t""no" 1>&6
20581
20582                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20583 echo "configure:20584: checking for dbm_open in -ldbm" >&5
20584 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20585 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20586   echo $ac_n "(cached) $ac_c" 1>&6
20587 else
20588   ac_save_LIBS="$LIBS"
20589 LIBS="-ldbm  $LIBS"
20590 cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593 /* Override any gcc2 internal prototype to avoid an error.  */
20594 /* We use char because int might match the return type of a gcc2
20595     builtin and then its argument prototype would still apply.  */
20596 char dbm_open();
20597
20598 int main() {
20599 dbm_open()
20600 ; return 0; }
20601 EOF
20602 if { (eval echo configure:20603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20603   rm -rf conftest*
20604   eval "ac_cv_lib_$ac_lib_var=yes"
20605 else
20606   echo "configure: failed program was:" >&5
20607   cat conftest.$ac_ext >&5
20608   rm -rf conftest*
20609   eval "ac_cv_lib_$ac_lib_var=no"
20610 fi
20611 rm -f conftest*
20612 LIBS="$ac_save_LIBS"
20613
20614 fi
20615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20616   echo "$ac_t""yes" 1>&6
20617   ol_cv_lib_ndbm=-ldbm
20618 else
20619   echo "$ac_t""no" 1>&6
20620 ol_cv_lib_ndbm=no
20621 fi
20622                 
20623 fi
20624
20625         
20626 fi
20627
20628         LIBS="$ol_LIBS"
20629
20630 fi
20631
20632 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20633
20634
20635  for ac_hdr in ndbm.h
20636 do
20637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20639 echo "configure:20640: checking for $ac_hdr" >&5
20640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20641   echo $ac_n "(cached) $ac_c" 1>&6
20642 else
20643   cat > conftest.$ac_ext <<EOF
20644 #line 20645 "configure"
20645 #include "confdefs.h"
20646 #include <$ac_hdr>
20647 EOF
20648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20649 { (eval echo configure:20650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20651 if test -z "$ac_err"; then
20652   rm -rf conftest*
20653   eval "ac_cv_header_$ac_safe=yes"
20654 else
20655   echo "$ac_err" >&5
20656   echo "configure: failed program was:" >&5
20657   cat conftest.$ac_ext >&5
20658   rm -rf conftest*
20659   eval "ac_cv_header_$ac_safe=no"
20660 fi
20661 rm -f conftest*
20662 fi
20663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20664   echo "$ac_t""yes" 1>&6
20665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20666   cat >> confdefs.h <<EOF
20667 #define $ac_tr_hdr 1
20668 EOF
20669  
20670 else
20671   echo "$ac_t""no" 1>&6
20672 fi
20673 done
20674
20675  echo $ac_n "checking for db""... $ac_c" 1>&6
20676 echo "configure:20677: checking for db" >&5
20677 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20678   echo $ac_n "(cached) $ac_c" 1>&6
20679 else
20680   
20681         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20682                 ol_cv_ndbm=no
20683         else
20684                 ol_cv_ndbm=yes
20685         fi
20686
20687 fi
20688
20689 echo "$ac_t""$ol_cv_ndbm" 1>&6
20690  if test $ol_cv_ndbm = yes ; then
20691         cat >> confdefs.h <<\EOF
20692 #define HAVE_NDBM 1
20693 EOF
20694
20695  fi
20696
20697
20698         if test $ol_cv_ndbm = yes ; then
20699                 ol_link_ldbm=ndbm
20700                 ol_with_ldbm_api=ndbm
20701
20702                 if test $ol_cv_lib_ndbm != yes ; then
20703                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20704                 fi
20705         fi
20706 fi
20707
20708 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20709         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20710 fi
20711
20712 if test $ol_enable_bdb = yes -o \
20713         $ol_enable_hdb = yes -o \
20714         $ol_enable_ldbm = yes ; then
20715         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20716 fi
20717
20718
20719 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20720         BUILD_LIBS_DYNAMIC=shared
20721         cat >> confdefs.h <<\EOF
20722 #define LDAP_LIBS_DYNAMIC 1
20723 EOF
20724
20725         LTSTATIC=""
20726 else
20727         BUILD_LIBS_DYNAMIC=static
20728         LTSTATIC="-static"
20729 fi
20730
20731 if test $ol_enable_wrappers != no ; then
20732         for ac_hdr in tcpd.h
20733 do
20734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20736 echo "configure:20737: checking for $ac_hdr" >&5
20737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20738   echo $ac_n "(cached) $ac_c" 1>&6
20739 else
20740   cat > conftest.$ac_ext <<EOF
20741 #line 20742 "configure"
20742 #include "confdefs.h"
20743 #include <$ac_hdr>
20744 EOF
20745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20746 { (eval echo configure:20747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20748 if test -z "$ac_err"; then
20749   rm -rf conftest*
20750   eval "ac_cv_header_$ac_safe=yes"
20751 else
20752   echo "$ac_err" >&5
20753   echo "configure: failed program was:" >&5
20754   cat conftest.$ac_ext >&5
20755   rm -rf conftest*
20756   eval "ac_cv_header_$ac_safe=no"
20757 fi
20758 rm -f conftest*
20759 fi
20760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20761   echo "$ac_t""yes" 1>&6
20762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20763   cat >> confdefs.h <<EOF
20764 #define $ac_tr_hdr 1
20765 EOF
20766  
20767                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20768 echo "configure:20769: checking for TCP wrappers library" >&5
20769                 save_LIBS="$LIBS"
20770                 LIBS="$LIBS -lwrap"
20771                 cat > conftest.$ac_ext <<EOF
20772 #line 20773 "configure"
20773 #include "confdefs.h"
20774
20775 #include <tcpd.h>
20776 int allow_severity = 0;
20777 int deny_severity  = 0;
20778
20779 struct request_info *req;
20780                 
20781 int main() {
20782
20783 hosts_access(req)
20784                 
20785 ; return 0; }
20786 EOF
20787 if { (eval echo configure:20788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20788   rm -rf conftest*
20789   echo "$ac_t""-lwrap" 1>&6
20790                 have_wrappers=yes
20791                 LIBS="$save_LIBS"
20792 else
20793   echo "configure: failed program was:" >&5
20794   cat conftest.$ac_ext >&5
20795   rm -rf conftest*
20796   
20797                                 LIBS="$LIBS -lnsl"
20798                 cat > conftest.$ac_ext <<EOF
20799 #line 20800 "configure"
20800 #include "confdefs.h"
20801
20802 #include <tcpd.h>
20803 int allow_severity = 0;
20804 int deny_severity  = 0;
20805
20806 struct request_info *req;
20807                 
20808 int main() {
20809
20810 hosts_access(req)
20811                 
20812 ; return 0; }
20813 EOF
20814 if { (eval echo configure:20815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20815   rm -rf conftest*
20816   echo "$ac_t""-lwrap -lnsl" 1>&6
20817                 have_wrappers=yes
20818                 LIBS="$save_LIBS -lnsl"
20819 else
20820   echo "configure: failed program was:" >&5
20821   cat conftest.$ac_ext >&5
20822   rm -rf conftest*
20823   
20824                 echo "$ac_t""no" 1>&6
20825                 have_wrappers=no
20826                 LIBS=$save_LIBS
20827 fi
20828 rm -f conftest*
20829 fi
20830 rm -f conftest*
20831 else
20832   echo "$ac_t""no" 1>&6
20833 have_wrappers=no
20834 fi
20835 done
20836
20837
20838         if test $have_wrappers = yes ; then
20839                 cat >> confdefs.h <<\EOF
20840 #define HAVE_TCPD 1
20841 EOF
20842
20843                 WRAP_LIBS="-lwrap"
20844         elif test $ol_enable_wrappers = yes ; then
20845                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20846         else
20847                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20848                 WRAP_LIBS=""
20849         fi
20850 fi
20851
20852 if test $ol_enable_syslog != no ; then
20853         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20854 echo "configure:20855: checking for openlog" >&5
20855 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20856   echo $ac_n "(cached) $ac_c" 1>&6
20857 else
20858   cat > conftest.$ac_ext <<EOF
20859 #line 20860 "configure"
20860 #include "confdefs.h"
20861 /* System header to define __stub macros and hopefully few prototypes,
20862     which can conflict with char openlog(); below.  */
20863 #include <assert.h>
20864 /* Override any gcc2 internal prototype to avoid an error.  */
20865 /* We use char because int might match the return type of a gcc2
20866     builtin and then its argument prototype would still apply.  */
20867 char openlog();
20868 char (*f)();
20869
20870 int main() {
20871
20872 /* The GNU C library defines this for functions which it implements
20873     to always fail with ENOSYS.  Some functions are actually named
20874     something starting with __ and the normal name is an alias.  */
20875 #if defined (__stub_openlog) || defined (__stub___openlog)
20876 choke me
20877 #else
20878 f = openlog;
20879 #endif
20880
20881 ; return 0; }
20882 EOF
20883 if { (eval echo configure:20884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20884   rm -rf conftest*
20885   eval "ac_cv_func_openlog=yes"
20886 else
20887   echo "configure: failed program was:" >&5
20888   cat conftest.$ac_ext >&5
20889   rm -rf conftest*
20890   eval "ac_cv_func_openlog=no"
20891 fi
20892 rm -f conftest*
20893 fi
20894
20895 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20896   echo "$ac_t""yes" 1>&6
20897   :
20898 else
20899   echo "$ac_t""no" 1>&6
20900 fi
20901
20902         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20903                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20904         fi
20905         ol_enable_syslog=$ac_cv_func_openlog
20906 fi
20907
20908
20909 ol_link_sql=no
20910 if test $ol_enable_sql != no ; then
20911         for ac_hdr in sql.h sqlext.h
20912 do
20913 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20914 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20915 echo "configure:20916: checking for $ac_hdr" >&5
20916 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20917   echo $ac_n "(cached) $ac_c" 1>&6
20918 else
20919   cat > conftest.$ac_ext <<EOF
20920 #line 20921 "configure"
20921 #include "confdefs.h"
20922 #include <$ac_hdr>
20923 EOF
20924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20925 { (eval echo configure:20926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20927 if test -z "$ac_err"; then
20928   rm -rf conftest*
20929   eval "ac_cv_header_$ac_safe=yes"
20930 else
20931   echo "$ac_err" >&5
20932   echo "configure: failed program was:" >&5
20933   cat conftest.$ac_ext >&5
20934   rm -rf conftest*
20935   eval "ac_cv_header_$ac_safe=no"
20936 fi
20937 rm -f conftest*
20938 fi
20939 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20940   echo "$ac_t""yes" 1>&6
20941     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20942   cat >> confdefs.h <<EOF
20943 #define $ac_tr_hdr 1
20944 EOF
20945  
20946 else
20947   echo "$ac_t""no" 1>&6
20948 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20949         
20950 fi
20951 done
20952
20953
20954         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20955 echo "configure:20956: checking for SQLDriverConnect in -liodbc" >&5
20956 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20957 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20958   echo $ac_n "(cached) $ac_c" 1>&6
20959 else
20960   ac_save_LIBS="$LIBS"
20961 LIBS="-liodbc  $LIBS"
20962 cat > conftest.$ac_ext <<EOF
20963 #line 20964 "configure"
20964 #include "confdefs.h"
20965 /* Override any gcc2 internal prototype to avoid an error.  */
20966 /* We use char because int might match the return type of a gcc2
20967     builtin and then its argument prototype would still apply.  */
20968 char SQLDriverConnect();
20969
20970 int main() {
20971 SQLDriverConnect()
20972 ; return 0; }
20973 EOF
20974 if { (eval echo configure:20975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20975   rm -rf conftest*
20976   eval "ac_cv_lib_$ac_lib_var=yes"
20977 else
20978   echo "configure: failed program was:" >&5
20979   cat conftest.$ac_ext >&5
20980   rm -rf conftest*
20981   eval "ac_cv_lib_$ac_lib_var=no"
20982 fi
20983 rm -f conftest*
20984 LIBS="$ac_save_LIBS"
20985
20986 fi
20987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20988   echo "$ac_t""yes" 1>&6
20989   have_iodbc=yes
20990 else
20991   echo "$ac_t""no" 1>&6
20992 have_iodbc=no
20993 fi
20994
20995         if test $have_iodbc = yes ; then
20996                 ol_link_sql="-liodbc"
20997         else
20998                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20999 echo "configure:21000: checking for SQLDriverConnect in -lodbc" >&5
21000 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
21001 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21002   echo $ac_n "(cached) $ac_c" 1>&6
21003 else
21004   ac_save_LIBS="$LIBS"
21005 LIBS="-lodbc  $LIBS"
21006 cat > conftest.$ac_ext <<EOF
21007 #line 21008 "configure"
21008 #include "confdefs.h"
21009 /* Override any gcc2 internal prototype to avoid an error.  */
21010 /* We use char because int might match the return type of a gcc2
21011     builtin and then its argument prototype would still apply.  */
21012 char SQLDriverConnect();
21013
21014 int main() {
21015 SQLDriverConnect()
21016 ; return 0; }
21017 EOF
21018 if { (eval echo configure:21019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21019   rm -rf conftest*
21020   eval "ac_cv_lib_$ac_lib_var=yes"
21021 else
21022   echo "configure: failed program was:" >&5
21023   cat conftest.$ac_ext >&5
21024   rm -rf conftest*
21025   eval "ac_cv_lib_$ac_lib_var=no"
21026 fi
21027 rm -f conftest*
21028 LIBS="$ac_save_LIBS"
21029
21030 fi
21031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21032   echo "$ac_t""yes" 1>&6
21033   have_odbc=yes
21034 else
21035   echo "$ac_t""no" 1>&6
21036 have_odbc=no
21037 fi
21038
21039                 if test $have_odbc = yes ; then
21040                         ol_link_sql="-lodbc"
21041                 fi
21042         fi
21043
21044         if test $ol_link_sql != no ; then
21045                 SLAPD_SQL_LIBS="$ol_link_sql"
21046
21047         elif test $ol_enable_sql != auto ; then
21048                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
21049         fi
21050 fi
21051
21052 WITH_SASL=no
21053 ol_link_sasl=no
21054 ol_link_spasswd=no
21055 if test $ol_with_cyrus_sasl != no ; then
21056         for ac_hdr in sasl/sasl.h sasl.h
21057 do
21058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21060 echo "configure:21061: checking for $ac_hdr" >&5
21061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21062   echo $ac_n "(cached) $ac_c" 1>&6
21063 else
21064   cat > conftest.$ac_ext <<EOF
21065 #line 21066 "configure"
21066 #include "confdefs.h"
21067 #include <$ac_hdr>
21068 EOF
21069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21070 { (eval echo configure:21071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21072 if test -z "$ac_err"; then
21073   rm -rf conftest*
21074   eval "ac_cv_header_$ac_safe=yes"
21075 else
21076   echo "$ac_err" >&5
21077   echo "configure: failed program was:" >&5
21078   cat conftest.$ac_ext >&5
21079   rm -rf conftest*
21080   eval "ac_cv_header_$ac_safe=no"
21081 fi
21082 rm -f conftest*
21083 fi
21084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21085   echo "$ac_t""yes" 1>&6
21086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21087   cat >> confdefs.h <<EOF
21088 #define $ac_tr_hdr 1
21089 EOF
21090  
21091 else
21092   echo "$ac_t""no" 1>&6
21093 fi
21094 done
21095
21096
21097         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21098                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21099 echo "configure:21100: checking for sasl_client_init in -lsasl2" >&5
21100 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21101 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21102   echo $ac_n "(cached) $ac_c" 1>&6
21103 else
21104   ac_save_LIBS="$LIBS"
21105 LIBS="-lsasl2  $LIBS"
21106 cat > conftest.$ac_ext <<EOF
21107 #line 21108 "configure"
21108 #include "confdefs.h"
21109 /* Override any gcc2 internal prototype to avoid an error.  */
21110 /* We use char because int might match the return type of a gcc2
21111     builtin and then its argument prototype would still apply.  */
21112 char sasl_client_init();
21113
21114 int main() {
21115 sasl_client_init()
21116 ; return 0; }
21117 EOF
21118 if { (eval echo configure:21119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21119   rm -rf conftest*
21120   eval "ac_cv_lib_$ac_lib_var=yes"
21121 else
21122   echo "configure: failed program was:" >&5
21123   cat conftest.$ac_ext >&5
21124   rm -rf conftest*
21125   eval "ac_cv_lib_$ac_lib_var=no"
21126 fi
21127 rm -f conftest*
21128 LIBS="$ac_save_LIBS"
21129
21130 fi
21131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21132   echo "$ac_t""yes" 1>&6
21133   ol_link_sasl="-lsasl2"
21134 else
21135   echo "$ac_t""no" 1>&6
21136 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21137 echo "configure:21138: checking for sasl_client_init in -lsasl" >&5
21138 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21139 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21140   echo $ac_n "(cached) $ac_c" 1>&6
21141 else
21142   ac_save_LIBS="$LIBS"
21143 LIBS="-lsasl  $LIBS"
21144 cat > conftest.$ac_ext <<EOF
21145 #line 21146 "configure"
21146 #include "confdefs.h"
21147 /* Override any gcc2 internal prototype to avoid an error.  */
21148 /* We use char because int might match the return type of a gcc2
21149     builtin and then its argument prototype would still apply.  */
21150 char sasl_client_init();
21151
21152 int main() {
21153 sasl_client_init()
21154 ; return 0; }
21155 EOF
21156 if { (eval echo configure:21157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21157   rm -rf conftest*
21158   eval "ac_cv_lib_$ac_lib_var=yes"
21159 else
21160   echo "configure: failed program was:" >&5
21161   cat conftest.$ac_ext >&5
21162   rm -rf conftest*
21163   eval "ac_cv_lib_$ac_lib_var=no"
21164 fi
21165 rm -f conftest*
21166 LIBS="$ac_save_LIBS"
21167
21168 fi
21169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21170   echo "$ac_t""yes" 1>&6
21171   ol_link_sasl="-lsasl"
21172 else
21173   echo "$ac_t""no" 1>&6
21174 fi
21175
21176 fi
21177
21178         fi
21179
21180         if test $ol_link_sasl = no ; then
21181                 if test $ol_with_cyrus_sasl != auto ; then
21182                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21183                 else
21184                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21185                         echo "configure: warning: SASL authentication not supported!" 1>&2
21186                         if test $ol_link_tls = no ; then
21187                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21188                         fi
21189                 fi
21190         else
21191                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21192 echo "configure:21193: checking Cyrus SASL library version" >&5
21193 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21194   echo $ac_n "(cached) $ac_c" 1>&6
21195 else
21196   
21197         cat > conftest.$ac_ext <<EOF
21198 #line 21199 "configure"
21199 #include "confdefs.h"
21200
21201 #ifdef HAVE_SASL_SASL_H
21202 #include <sasl/sasl.h>
21203 #else
21204 #include <sasl.h>
21205 #endif
21206
21207 /* Require 2.1.15+ */
21208 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21209         char *__sasl_compat = "2.2+ or better okay (we guess)";
21210 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21211         && SASL_VERSION_STEP >=15
21212         char *__sasl_compat = "2.1.15+ or better okay";
21213 #endif
21214         
21215 EOF
21216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21217   egrep "__sasl_compat" >/dev/null 2>&1; then
21218   rm -rf conftest*
21219   ol_cv_sasl_compat=yes
21220 else
21221   rm -rf conftest*
21222   ol_cv_sasl_compat=no
21223 fi
21224 rm -f conftest*
21225
21226 fi
21227
21228 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21229
21230                 if test $ol_cv_sasl_compat = no ; then
21231                         ol_link_sasl=no
21232                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21233                 fi
21234
21235                 cat >> confdefs.h <<\EOF
21236 #define HAVE_CYRUS_SASL 1
21237 EOF
21238
21239                 SASL_LIBS="$ol_link_sasl"
21240                 if test $ol_enable_spasswd != no ; then
21241                         ol_link_spasswd=yes
21242                 fi
21243
21244                 ac_save_LIBS="$LIBS"
21245                 LIBS="$LIBS $ol_link_sasl"
21246                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21247 echo "configure:21248: checking for sasl_version" >&5
21248 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21249   echo $ac_n "(cached) $ac_c" 1>&6
21250 else
21251   cat > conftest.$ac_ext <<EOF
21252 #line 21253 "configure"
21253 #include "confdefs.h"
21254 /* System header to define __stub macros and hopefully few prototypes,
21255     which can conflict with char sasl_version(); below.  */
21256 #include <assert.h>
21257 /* Override any gcc2 internal prototype to avoid an error.  */
21258 /* We use char because int might match the return type of a gcc2
21259     builtin and then its argument prototype would still apply.  */
21260 char sasl_version();
21261 char (*f)();
21262
21263 int main() {
21264
21265 /* The GNU C library defines this for functions which it implements
21266     to always fail with ENOSYS.  Some functions are actually named
21267     something starting with __ and the normal name is an alias.  */
21268 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21269 choke me
21270 #else
21271 f = sasl_version;
21272 #endif
21273
21274 ; return 0; }
21275 EOF
21276 if { (eval echo configure:21277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21277   rm -rf conftest*
21278   eval "ac_cv_func_sasl_version=yes"
21279 else
21280   echo "configure: failed program was:" >&5
21281   cat conftest.$ac_ext >&5
21282   rm -rf conftest*
21283   eval "ac_cv_func_sasl_version=no"
21284 fi
21285 rm -f conftest*
21286 fi
21287
21288 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21289   echo "$ac_t""yes" 1>&6
21290   cat >> confdefs.h <<\EOF
21291 #define HAVE_SASL_VERSION 1
21292 EOF
21293
21294 else
21295   echo "$ac_t""no" 1>&6
21296 fi
21297
21298                 LIBS="$ac_save_LIBS"
21299
21300                 WITH_SASL=yes
21301         fi
21302
21303 else
21304         echo "configure: warning: SASL authentication not supported!" 1>&2
21305         if test $ol_link_tls = no ; then
21306                 echo "configure: warning: Strong authentication not supported!" 1>&2
21307         fi
21308 fi
21309
21310 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21311         dev=no
21312         if test -r /dev/urandom ; then
21313                 dev="/dev/urandom";
21314         elif test -r /idev/urandom ; then
21315                 dev="/idev/urandom";
21316         elif test -r /dev/srandom ; then
21317                 dev="/dev/srandom";
21318         elif test -r /dev/random ; then
21319                 dev="/dev/random";
21320         elif test -r /idev/random ; then
21321                 dev="/idev/random";
21322         fi
21323
21324         if test $dev != no ; then
21325                 cat >> confdefs.h <<EOF
21326 #define URANDOM_DEVICE "$dev"
21327 EOF
21328
21329         fi
21330 fi
21331
21332 ol_link_fetch=no
21333 if test $ol_with_fetch != no ; then
21334         ol_LIBS=$LIBS
21335 LIBS="-lfetch -lcom_err $LIBS"
21336 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21337 echo "configure:21338: checking fetch(3) library" >&5
21338 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21339   echo $ac_n "(cached) $ac_c" 1>&6
21340 else
21341   
21342         cat > conftest.$ac_ext <<EOF
21343 #line 21344 "configure"
21344 #include "confdefs.h"
21345
21346 #include <sys/param.h>
21347 #include <stdio.h>
21348 #include <fetch.h>
21349 int main() {
21350 struct url *u = fetchParseURL("file:///"); 
21351 ; return 0; }
21352 EOF
21353 if { (eval echo configure:21354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21354   rm -rf conftest*
21355   ol_cv_lib_fetch=yes
21356 else
21357   echo "configure: failed program was:" >&5
21358   cat conftest.$ac_ext >&5
21359   rm -rf conftest*
21360   ol_cv_lib_fetch=no
21361 fi
21362 rm -f conftest*
21363 fi
21364
21365 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21366 LIBS=$ol_LIBS
21367 if test $ol_cv_lib_fetch != no ; then
21368         ol_link_fetch="-lfetch -lcom_err"
21369         cat >> confdefs.h <<\EOF
21370 #define HAVE_FETCH 1
21371 EOF
21372
21373 fi
21374
21375
21376         if test $ol_cv_lib_fetch != no ; then
21377                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21378                 ol_link_fetch=freebsd
21379
21380         elif test $ol_with_fetch != auto ; then
21381                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21382         fi 
21383 fi
21384
21385 if test $ol_enable_crypt != no ; then
21386         save_LIBS="$LIBS"
21387         LIBS="$TLS_LIBS $LIBS"
21388
21389         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21390 echo "configure:21391: checking for crypt" >&5
21391 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21392   echo $ac_n "(cached) $ac_c" 1>&6
21393 else
21394   cat > conftest.$ac_ext <<EOF
21395 #line 21396 "configure"
21396 #include "confdefs.h"
21397 /* System header to define __stub macros and hopefully few prototypes,
21398     which can conflict with char crypt(); below.  */
21399 #include <assert.h>
21400 /* Override any gcc2 internal prototype to avoid an error.  */
21401 /* We use char because int might match the return type of a gcc2
21402     builtin and then its argument prototype would still apply.  */
21403 char crypt();
21404 char (*f)();
21405
21406 int main() {
21407
21408 /* The GNU C library defines this for functions which it implements
21409     to always fail with ENOSYS.  Some functions are actually named
21410     something starting with __ and the normal name is an alias.  */
21411 #if defined (__stub_crypt) || defined (__stub___crypt)
21412 choke me
21413 #else
21414 f = crypt;
21415 #endif
21416
21417 ; return 0; }
21418 EOF
21419 if { (eval echo configure:21420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21420   rm -rf conftest*
21421   eval "ac_cv_func_crypt=yes"
21422 else
21423   echo "configure: failed program was:" >&5
21424   cat conftest.$ac_ext >&5
21425   rm -rf conftest*
21426   eval "ac_cv_func_crypt=no"
21427 fi
21428 rm -f conftest*
21429 fi
21430
21431 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21432   echo "$ac_t""yes" 1>&6
21433   have_crypt=yes
21434 else
21435   echo "$ac_t""no" 1>&6
21436
21437                 LIBS="$save_LIBS"
21438                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21439 echo "configure:21440: checking for crypt in -lcrypt" >&5
21440 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21441 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21442   echo $ac_n "(cached) $ac_c" 1>&6
21443 else
21444   ac_save_LIBS="$LIBS"
21445 LIBS="-lcrypt  $LIBS"
21446 cat > conftest.$ac_ext <<EOF
21447 #line 21448 "configure"
21448 #include "confdefs.h"
21449 /* Override any gcc2 internal prototype to avoid an error.  */
21450 /* We use char because int might match the return type of a gcc2
21451     builtin and then its argument prototype would still apply.  */
21452 char crypt();
21453
21454 int main() {
21455 crypt()
21456 ; return 0; }
21457 EOF
21458 if { (eval echo configure:21459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21459   rm -rf conftest*
21460   eval "ac_cv_lib_$ac_lib_var=yes"
21461 else
21462   echo "configure: failed program was:" >&5
21463   cat conftest.$ac_ext >&5
21464   rm -rf conftest*
21465   eval "ac_cv_lib_$ac_lib_var=no"
21466 fi
21467 rm -f conftest*
21468 LIBS="$ac_save_LIBS"
21469
21470 fi
21471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21472   echo "$ac_t""yes" 1>&6
21473   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21474                         have_crypt=yes
21475 else
21476   echo "$ac_t""no" 1>&6
21477 have_crypt=no
21478 fi
21479
21480 fi
21481
21482
21483         LIBS="$save_LIBS"
21484
21485         if test $have_crypt = yes ; then
21486                 cat >> confdefs.h <<\EOF
21487 #define HAVE_CRYPT 1
21488 EOF
21489
21490         else
21491                 echo "configure: warning: could not find crypt" 1>&2
21492                 if test $ol_enable_crypt = yes ; then
21493                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21494                 fi
21495
21496                 echo "configure: warning: disabling crypt support" 1>&2
21497                 ol_enable_crypt=no
21498         fi
21499 fi
21500
21501 if test $ol_enable_proctitle != no ; then
21502         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21503 echo "configure:21504: checking for setproctitle" >&5
21504 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21505   echo $ac_n "(cached) $ac_c" 1>&6
21506 else
21507   cat > conftest.$ac_ext <<EOF
21508 #line 21509 "configure"
21509 #include "confdefs.h"
21510 /* System header to define __stub macros and hopefully few prototypes,
21511     which can conflict with char setproctitle(); below.  */
21512 #include <assert.h>
21513 /* Override any gcc2 internal prototype to avoid an error.  */
21514 /* We use char because int might match the return type of a gcc2
21515     builtin and then its argument prototype would still apply.  */
21516 char setproctitle();
21517 char (*f)();
21518
21519 int main() {
21520
21521 /* The GNU C library defines this for functions which it implements
21522     to always fail with ENOSYS.  Some functions are actually named
21523     something starting with __ and the normal name is an alias.  */
21524 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21525 choke me
21526 #else
21527 f = setproctitle;
21528 #endif
21529
21530 ; return 0; }
21531 EOF
21532 if { (eval echo configure:21533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21533   rm -rf conftest*
21534   eval "ac_cv_func_setproctitle=yes"
21535 else
21536   echo "configure: failed program was:" >&5
21537   cat conftest.$ac_ext >&5
21538   rm -rf conftest*
21539   eval "ac_cv_func_setproctitle=no"
21540 fi
21541 rm -f conftest*
21542 fi
21543
21544 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21545   echo "$ac_t""yes" 1>&6
21546   have_setproctitle=yes
21547 else
21548   echo "$ac_t""no" 1>&6
21549
21550                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21551 echo "configure:21552: checking for setproctitle in -lutil" >&5
21552 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21554   echo $ac_n "(cached) $ac_c" 1>&6
21555 else
21556   ac_save_LIBS="$LIBS"
21557 LIBS="-lutil  $LIBS"
21558 cat > conftest.$ac_ext <<EOF
21559 #line 21560 "configure"
21560 #include "confdefs.h"
21561 /* Override any gcc2 internal prototype to avoid an error.  */
21562 /* We use char because int might match the return type of a gcc2
21563     builtin and then its argument prototype would still apply.  */
21564 char setproctitle();
21565
21566 int main() {
21567 setproctitle()
21568 ; return 0; }
21569 EOF
21570 if { (eval echo configure:21571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21571   rm -rf conftest*
21572   eval "ac_cv_lib_$ac_lib_var=yes"
21573 else
21574   echo "configure: failed program was:" >&5
21575   cat conftest.$ac_ext >&5
21576   rm -rf conftest*
21577   eval "ac_cv_lib_$ac_lib_var=no"
21578 fi
21579 rm -f conftest*
21580 LIBS="$ac_save_LIBS"
21581
21582 fi
21583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21584   echo "$ac_t""yes" 1>&6
21585   have_setproctitle=yes
21586                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21587 else
21588   echo "$ac_t""no" 1>&6
21589 have_setproctitle=no
21590                         LIBOBJS="$LIBOBJS setproctitle.o"
21591                         LIBSRCS="$LIBSRCS setproctitle.c"
21592 fi
21593
21594 fi
21595
21596
21597         if test $have_setproctitle = yes ; then
21598                 cat >> confdefs.h <<\EOF
21599 #define HAVE_SETPROCTITLE 1
21600 EOF
21601
21602         fi
21603 fi
21604
21605 if test $ol_enable_slp != no ; then
21606         for ac_hdr in slp.h 
21607 do
21608 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21609 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21610 echo "configure:21611: checking for $ac_hdr" >&5
21611 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21612   echo $ac_n "(cached) $ac_c" 1>&6
21613 else
21614   cat > conftest.$ac_ext <<EOF
21615 #line 21616 "configure"
21616 #include "confdefs.h"
21617 #include <$ac_hdr>
21618 EOF
21619 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21620 { (eval echo configure:21621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21621 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21622 if test -z "$ac_err"; then
21623   rm -rf conftest*
21624   eval "ac_cv_header_$ac_safe=yes"
21625 else
21626   echo "$ac_err" >&5
21627   echo "configure: failed program was:" >&5
21628   cat conftest.$ac_ext >&5
21629   rm -rf conftest*
21630   eval "ac_cv_header_$ac_safe=no"
21631 fi
21632 rm -f conftest*
21633 fi
21634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21635   echo "$ac_t""yes" 1>&6
21636     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21637   cat >> confdefs.h <<EOF
21638 #define $ac_tr_hdr 1
21639 EOF
21640  
21641 else
21642   echo "$ac_t""no" 1>&6
21643 fi
21644 done
21645
21646
21647         if test $ac_cv_header_slp_h = yes ; then
21648                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21649 echo "configure:21650: checking for SLPOpen in -lslp" >&5
21650 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21652   echo $ac_n "(cached) $ac_c" 1>&6
21653 else
21654   ac_save_LIBS="$LIBS"
21655 LIBS="-lslp  $LIBS"
21656 cat > conftest.$ac_ext <<EOF
21657 #line 21658 "configure"
21658 #include "confdefs.h"
21659 /* Override any gcc2 internal prototype to avoid an error.  */
21660 /* We use char because int might match the return type of a gcc2
21661     builtin and then its argument prototype would still apply.  */
21662 char SLPOpen();
21663
21664 int main() {
21665 SLPOpen()
21666 ; return 0; }
21667 EOF
21668 if { (eval echo configure:21669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21669   rm -rf conftest*
21670   eval "ac_cv_lib_$ac_lib_var=yes"
21671 else
21672   echo "configure: failed program was:" >&5
21673   cat conftest.$ac_ext >&5
21674   rm -rf conftest*
21675   eval "ac_cv_lib_$ac_lib_var=no"
21676 fi
21677 rm -f conftest*
21678 LIBS="$ac_save_LIBS"
21679
21680 fi
21681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21682   echo "$ac_t""yes" 1>&6
21683   have_slp=yes
21684 else
21685   echo "$ac_t""no" 1>&6
21686 have_slp=no
21687 fi
21688
21689                 if test $have_slp = yes ; then
21690                         cat >> confdefs.h <<\EOF
21691 #define HAVE_SLP 1
21692 EOF
21693
21694                         SLAPD_SLP_LIBS=-lslp
21695                 fi
21696
21697         elif test $ol_enable_slp = yes ; then
21698                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21699         fi
21700 fi
21701
21702
21703 echo $ac_n "checking long long""... $ac_c" 1>&6
21704 echo "configure:21705: checking long long" >&5
21705 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21706   echo $ac_n "(cached) $ac_c" 1>&6
21707 else
21708   
21709         cat > conftest.$ac_ext <<EOF
21710 #line 21711 "configure"
21711 #include "confdefs.h"
21712
21713 int main() {
21714 long long x;
21715 ; return 0; }
21716 EOF
21717 if { (eval echo configure:21718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21718   rm -rf conftest*
21719   ol_cv_type_long_long=yes
21720 else
21721   echo "configure: failed program was:" >&5
21722   cat conftest.$ac_ext >&5
21723   rm -rf conftest*
21724   ol_cv_type_long_long=no
21725 fi
21726 rm -f conftest*
21727 fi
21728
21729 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21730 if test $ol_cv_type_long_long = yes; then
21731         cat >> confdefs.h <<\EOF
21732 #define HAVE_LONG_LONG 1
21733 EOF
21734
21735 fi
21736
21737 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21738 echo "configure:21739: checking for ANSI C header files" >&5
21739 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21740   echo $ac_n "(cached) $ac_c" 1>&6
21741 else
21742   cat > conftest.$ac_ext <<EOF
21743 #line 21744 "configure"
21744 #include "confdefs.h"
21745 #include <stdlib.h>
21746 #include <stdarg.h>
21747 #include <string.h>
21748 #include <float.h>
21749 EOF
21750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21751 { (eval echo configure:21752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21753 if test -z "$ac_err"; then
21754   rm -rf conftest*
21755   ac_cv_header_stdc=yes
21756 else
21757   echo "$ac_err" >&5
21758   echo "configure: failed program was:" >&5
21759   cat conftest.$ac_ext >&5
21760   rm -rf conftest*
21761   ac_cv_header_stdc=no
21762 fi
21763 rm -f conftest*
21764
21765 if test $ac_cv_header_stdc = yes; then
21766   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21767 cat > conftest.$ac_ext <<EOF
21768 #line 21769 "configure"
21769 #include "confdefs.h"
21770 #include <string.h>
21771 EOF
21772 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21773   egrep "memchr" >/dev/null 2>&1; then
21774   :
21775 else
21776   rm -rf conftest*
21777   ac_cv_header_stdc=no
21778 fi
21779 rm -f conftest*
21780
21781 fi
21782
21783 if test $ac_cv_header_stdc = yes; then
21784   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21785 cat > conftest.$ac_ext <<EOF
21786 #line 21787 "configure"
21787 #include "confdefs.h"
21788 #include <stdlib.h>
21789 EOF
21790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21791   egrep "free" >/dev/null 2>&1; then
21792   :
21793 else
21794   rm -rf conftest*
21795   ac_cv_header_stdc=no
21796 fi
21797 rm -f conftest*
21798
21799 fi
21800
21801 if test $ac_cv_header_stdc = yes; then
21802   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21803 if test "$cross_compiling" = yes; then
21804   :
21805 else
21806   cat > conftest.$ac_ext <<EOF
21807 #line 21808 "configure"
21808 #include "confdefs.h"
21809 #include <ctype.h>
21810 #if ((' ' & 0x0FF) == 0x020)
21811 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21812 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21813 #else
21814 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21815  || ('j' <= (c) && (c) <= 'r') \
21816  || ('s' <= (c) && (c) <= 'z'))
21817 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21818 #endif
21819 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21820 int main () { int i; for (i = 0; i < 256; i++)
21821 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21822 exit (0); }
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   :
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831   rm -fr conftest*
21832   ac_cv_header_stdc=no
21833 fi
21834 rm -fr conftest*
21835 fi
21836
21837 fi
21838 fi
21839
21840 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21841 if test $ac_cv_header_stdc = yes; then
21842   cat >> confdefs.h <<\EOF
21843 #define STDC_HEADERS 1
21844 EOF
21845
21846 fi
21847
21848 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21849 echo "configure:21850: checking for mode_t" >&5
21850 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21851   echo $ac_n "(cached) $ac_c" 1>&6
21852 else
21853   cat > conftest.$ac_ext <<EOF
21854 #line 21855 "configure"
21855 #include "confdefs.h"
21856 #include <sys/types.h>
21857 #if STDC_HEADERS
21858 #include <stdlib.h>
21859 #include <stddef.h>
21860 #endif
21861
21862 EOF
21863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21864   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21865   rm -rf conftest*
21866   eval "ac_cv_type_mode_t=yes"
21867 else
21868   rm -rf conftest*
21869   eval "ac_cv_type_mode_t=no"
21870 fi
21871 rm -f conftest*
21872
21873 fi
21874 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21875   echo "$ac_t""yes" 1>&6
21876 else
21877   echo "$ac_t""no" 1>&6
21878   cat >> confdefs.h <<EOF
21879 #define mode_t int
21880 EOF
21881
21882 fi
21883
21884 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21885 echo "configure:21886: checking for off_t" >&5
21886 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21887   echo $ac_n "(cached) $ac_c" 1>&6
21888 else
21889   cat > conftest.$ac_ext <<EOF
21890 #line 21891 "configure"
21891 #include "confdefs.h"
21892 #include <sys/types.h>
21893 #if STDC_HEADERS
21894 #include <stdlib.h>
21895 #include <stddef.h>
21896 #endif
21897
21898 EOF
21899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21900   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21901   rm -rf conftest*
21902   eval "ac_cv_type_off_t=yes"
21903 else
21904   rm -rf conftest*
21905   eval "ac_cv_type_off_t=no"
21906 fi
21907 rm -f conftest*
21908
21909 fi
21910 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21911   echo "$ac_t""yes" 1>&6
21912 else
21913   echo "$ac_t""no" 1>&6
21914   cat >> confdefs.h <<EOF
21915 #define off_t long
21916 EOF
21917
21918 fi
21919
21920 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21921 echo "configure:21922: checking for pid_t" >&5
21922 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21923   echo $ac_n "(cached) $ac_c" 1>&6
21924 else
21925   cat > conftest.$ac_ext <<EOF
21926 #line 21927 "configure"
21927 #include "confdefs.h"
21928 #include <sys/types.h>
21929 #if STDC_HEADERS
21930 #include <stdlib.h>
21931 #include <stddef.h>
21932 #endif
21933
21934 EOF
21935 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21936   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21937   rm -rf conftest*
21938   eval "ac_cv_type_pid_t=yes"
21939 else
21940   rm -rf conftest*
21941   eval "ac_cv_type_pid_t=no"
21942 fi
21943 rm -f conftest*
21944
21945 fi
21946 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21947   echo "$ac_t""yes" 1>&6
21948 else
21949   echo "$ac_t""no" 1>&6
21950   cat >> confdefs.h <<EOF
21951 #define pid_t int
21952 EOF
21953
21954 fi
21955
21956 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21957 echo "configure:21958: checking for ptrdiff_t" >&5
21958 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21959   echo $ac_n "(cached) $ac_c" 1>&6
21960 else
21961   cat > conftest.$ac_ext <<EOF
21962 #line 21963 "configure"
21963 #include "confdefs.h"
21964 #include <stddef.h>
21965 int main() {
21966 ptrdiff_t p
21967 ; return 0; }
21968 EOF
21969 if { (eval echo configure:21970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21970   rm -rf conftest*
21971   am_cv_type_ptrdiff_t=yes
21972 else
21973   echo "configure: failed program was:" >&5
21974   cat conftest.$ac_ext >&5
21975   rm -rf conftest*
21976   am_cv_type_ptrdiff_t=no
21977 fi
21978 rm -f conftest*
21979 fi
21980
21981 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21982    if test $am_cv_type_ptrdiff_t = yes; then
21983      cat >> confdefs.h <<\EOF
21984 #define HAVE_PTRDIFF_T 1
21985 EOF
21986
21987    fi
21988
21989 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21990 echo "configure:21991: checking return type of signal handlers" >&5
21991 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21992   echo $ac_n "(cached) $ac_c" 1>&6
21993 else
21994   cat > conftest.$ac_ext <<EOF
21995 #line 21996 "configure"
21996 #include "confdefs.h"
21997 #include <sys/types.h>
21998 #include <signal.h>
21999 #ifdef signal
22000 #undef signal
22001 #endif
22002 #ifdef __cplusplus
22003 extern "C" void (*signal (int, void (*)(int)))(int);
22004 #else
22005 void (*signal ()) ();
22006 #endif
22007
22008 int main() {
22009 int i;
22010 ; return 0; }
22011 EOF
22012 if { (eval echo configure:22013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22013   rm -rf conftest*
22014   ac_cv_type_signal=void
22015 else
22016   echo "configure: failed program was:" >&5
22017   cat conftest.$ac_ext >&5
22018   rm -rf conftest*
22019   ac_cv_type_signal=int
22020 fi
22021 rm -f conftest*
22022 fi
22023
22024 echo "$ac_t""$ac_cv_type_signal" 1>&6
22025 cat >> confdefs.h <<EOF
22026 #define RETSIGTYPE $ac_cv_type_signal
22027 EOF
22028
22029
22030 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22031 echo "configure:22032: checking for size_t" >&5
22032 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22033   echo $ac_n "(cached) $ac_c" 1>&6
22034 else
22035   cat > conftest.$ac_ext <<EOF
22036 #line 22037 "configure"
22037 #include "confdefs.h"
22038 #include <sys/types.h>
22039 #if STDC_HEADERS
22040 #include <stdlib.h>
22041 #include <stddef.h>
22042 #endif
22043
22044 EOF
22045 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22046   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22047   rm -rf conftest*
22048   eval "ac_cv_type_size_t=yes"
22049 else
22050   rm -rf conftest*
22051   eval "ac_cv_type_size_t=no"
22052 fi
22053 rm -f conftest*
22054
22055 fi
22056 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22057   echo "$ac_t""yes" 1>&6
22058 else
22059   echo "$ac_t""no" 1>&6
22060   cat >> confdefs.h <<EOF
22061 #define size_t unsigned
22062 EOF
22063
22064 fi
22065
22066
22067 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22068 echo "configure:22069: checking for ssize_t" >&5
22069 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22070   echo $ac_n "(cached) $ac_c" 1>&6
22071 else
22072   cat > conftest.$ac_ext <<EOF
22073 #line 22074 "configure"
22074 #include "confdefs.h"
22075 #include <sys/types.h>
22076 #if STDC_HEADERS
22077 #include <stdlib.h>
22078 #include <stddef.h>
22079 #endif
22080
22081 EOF
22082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22083   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22084   rm -rf conftest*
22085   eval "ac_cv_type_ssize_t=yes"
22086 else
22087   rm -rf conftest*
22088   eval "ac_cv_type_ssize_t=no"
22089 fi
22090 rm -f conftest*
22091
22092 fi
22093 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22094   echo "$ac_t""yes" 1>&6
22095 else
22096   echo "$ac_t""no" 1>&6
22097   cat >> confdefs.h <<EOF
22098 #define ssize_t signed int
22099 EOF
22100
22101 fi
22102
22103 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22104 echo "configure:22105: checking for caddr_t" >&5
22105 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22106   echo $ac_n "(cached) $ac_c" 1>&6
22107 else
22108   cat > conftest.$ac_ext <<EOF
22109 #line 22110 "configure"
22110 #include "confdefs.h"
22111 #include <sys/types.h>
22112 #if STDC_HEADERS
22113 #include <stdlib.h>
22114 #include <stddef.h>
22115 #endif
22116
22117 EOF
22118 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22119   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22120   rm -rf conftest*
22121   eval "ac_cv_type_caddr_t=yes"
22122 else
22123   rm -rf conftest*
22124   eval "ac_cv_type_caddr_t=no"
22125 fi
22126 rm -f conftest*
22127
22128 fi
22129 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22130   echo "$ac_t""yes" 1>&6
22131 else
22132   echo "$ac_t""no" 1>&6
22133   cat >> confdefs.h <<EOF
22134 #define caddr_t char *
22135 EOF
22136
22137 fi
22138
22139
22140 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22141 echo "configure:22142: checking for socklen_t" >&5
22142 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22143   echo $ac_n "(cached) $ac_c" 1>&6
22144 else
22145   cat > conftest.$ac_ext <<EOF
22146 #line 22147 "configure"
22147 #include "confdefs.h"
22148
22149 #ifdef HAVE_SYS_TYPES_H
22150 #include <sys/types.h>
22151 #endif
22152 #ifdef HAVE_SYS_SOCKET_H
22153 #include <sys/socket.h>
22154 #endif
22155
22156 int main() {
22157 socklen_t len;
22158 ; return 0; }
22159 EOF
22160 if { (eval echo configure:22161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22161   rm -rf conftest*
22162   ol_cv_type_socklen_t=yes
22163 else
22164   echo "configure: failed program was:" >&5
22165   cat conftest.$ac_ext >&5
22166   rm -rf conftest*
22167   ol_cv_type_socklen_t=no
22168 fi
22169 rm -f conftest*
22170 fi
22171
22172 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22173   if test $ol_cv_type_socklen_t = no; then
22174     cat >> confdefs.h <<\EOF
22175 #define socklen_t int
22176 EOF
22177
22178   fi
22179  
22180 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22181 echo "configure:22182: checking for member st_blksize in aggregate type struct stat" >&5
22182 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22183   echo $ac_n "(cached) $ac_c" 1>&6
22184 else
22185   cat > conftest.$ac_ext <<EOF
22186 #line 22187 "configure"
22187 #include "confdefs.h"
22188 #include <sys/types.h>
22189 #include <sys/stat.h>
22190 int main() {
22191 struct stat foo; foo.st_blksize;
22192 ; return 0; }
22193 EOF
22194 if { (eval echo configure:22195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22195   rm -rf conftest*
22196   ac_cv_c_struct_member_st_blksize=yes
22197 else
22198   echo "configure: failed program was:" >&5
22199   cat conftest.$ac_ext >&5
22200   rm -rf conftest*
22201   ac_cv_c_struct_member_st_blksize=no
22202 fi
22203 rm -f conftest*
22204 fi
22205
22206 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22207 st_blksize="$ac_cv_c_struct_member_st_blksize"
22208 if test $ac_cv_c_struct_member_st_blksize = yes; then
22209   cat >> confdefs.h <<\EOF
22210 #define HAVE_ST_BLKSIZE 1
22211 EOF
22212
22213 fi
22214
22215 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22216 echo "configure:22217: checking whether time.h and sys/time.h may both be included" >&5
22217 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22218   echo $ac_n "(cached) $ac_c" 1>&6
22219 else
22220   cat > conftest.$ac_ext <<EOF
22221 #line 22222 "configure"
22222 #include "confdefs.h"
22223 #include <sys/types.h>
22224 #include <sys/time.h>
22225 #include <time.h>
22226 int main() {
22227 struct tm *tp;
22228 ; return 0; }
22229 EOF
22230 if { (eval echo configure:22231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22231   rm -rf conftest*
22232   ac_cv_header_time=yes
22233 else
22234   echo "configure: failed program was:" >&5
22235   cat conftest.$ac_ext >&5
22236   rm -rf conftest*
22237   ac_cv_header_time=no
22238 fi
22239 rm -f conftest*
22240 fi
22241
22242 echo "$ac_t""$ac_cv_header_time" 1>&6
22243 if test $ac_cv_header_time = yes; then
22244   cat >> confdefs.h <<\EOF
22245 #define TIME_WITH_SYS_TIME 1
22246 EOF
22247
22248 fi
22249
22250 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22251 echo "configure:22252: checking whether struct tm is in sys/time.h or time.h" >&5
22252 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22253   echo $ac_n "(cached) $ac_c" 1>&6
22254 else
22255   cat > conftest.$ac_ext <<EOF
22256 #line 22257 "configure"
22257 #include "confdefs.h"
22258 #include <sys/types.h>
22259 #include <time.h>
22260 int main() {
22261 struct tm *tp; tp->tm_sec;
22262 ; return 0; }
22263 EOF
22264 if { (eval echo configure:22265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22265   rm -rf conftest*
22266   ac_cv_struct_tm=time.h
22267 else
22268   echo "configure: failed program was:" >&5
22269   cat conftest.$ac_ext >&5
22270   rm -rf conftest*
22271   ac_cv_struct_tm=sys/time.h
22272 fi
22273 rm -f conftest*
22274 fi
22275
22276 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22277 if test $ac_cv_struct_tm = sys/time.h; then
22278   cat >> confdefs.h <<\EOF
22279 #define TM_IN_SYS_TIME 1
22280 EOF
22281
22282 fi
22283
22284 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22285 echo "configure:22286: checking for uid_t in sys/types.h" >&5
22286 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22287   echo $ac_n "(cached) $ac_c" 1>&6
22288 else
22289   cat > conftest.$ac_ext <<EOF
22290 #line 22291 "configure"
22291 #include "confdefs.h"
22292 #include <sys/types.h>
22293 EOF
22294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22295   egrep "uid_t" >/dev/null 2>&1; then
22296   rm -rf conftest*
22297   ac_cv_type_uid_t=yes
22298 else
22299   rm -rf conftest*
22300   ac_cv_type_uid_t=no
22301 fi
22302 rm -f conftest*
22303
22304 fi
22305
22306 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22307 if test $ac_cv_type_uid_t = no; then
22308   cat >> confdefs.h <<\EOF
22309 #define uid_t int
22310 EOF
22311
22312   cat >> confdefs.h <<\EOF
22313 #define gid_t int
22314 EOF
22315
22316 fi
22317
22318 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22319 echo "configure:22320: checking for sig_atomic_t" >&5
22320 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22321   echo $ac_n "(cached) $ac_c" 1>&6
22322 else
22323   cat > conftest.$ac_ext <<EOF
22324 #line 22325 "configure"
22325 #include "confdefs.h"
22326 #include <signal.h>
22327 int main() {
22328 sig_atomic_t atomic;
22329 ; return 0; }
22330 EOF
22331 if { (eval echo configure:22332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22332   rm -rf conftest*
22333   ol_cv_type_sig_atomic_t=yes
22334 else
22335   echo "configure: failed program was:" >&5
22336   cat conftest.$ac_ext >&5
22337   rm -rf conftest*
22338   ol_cv_type_sig_atomic_t=no
22339 fi
22340 rm -f conftest*
22341 fi
22342
22343 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22344   if test $ol_cv_type_sig_atomic_t = no; then
22345     cat >> confdefs.h <<\EOF
22346 #define sig_atomic_t int
22347 EOF
22348
22349   fi
22350  
22351
22352
22353 # test for pw_gecos in struct passwd
22354 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22355 echo "configure:22356: checking struct passwd for pw_gecos" >&5
22356 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22357   echo $ac_n "(cached) $ac_c" 1>&6
22358 else
22359   
22360         cat > conftest.$ac_ext <<EOF
22361 #line 22362 "configure"
22362 #include "confdefs.h"
22363 #include <pwd.h>
22364 int main() {
22365
22366         struct passwd pwd;
22367         pwd.pw_gecos = pwd.pw_name;
22368
22369 ; return 0; }
22370 EOF
22371 if { (eval echo configure:22372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22372   rm -rf conftest*
22373   ol_cv_struct_passwd_pw_gecos=yes
22374 else
22375   echo "configure: failed program was:" >&5
22376   cat conftest.$ac_ext >&5
22377   rm -rf conftest*
22378   ol_cv_struct_passwd_pw_gecos=no
22379 fi
22380 rm -f conftest*
22381 fi
22382
22383 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22384 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22385         cat >> confdefs.h <<\EOF
22386 #define HAVE_PW_GECOS 1
22387 EOF
22388
22389 fi
22390
22391 # test for pw_passwd in struct passwd
22392 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22393 echo "configure:22394: checking struct passwd for pw_passwd" >&5
22394 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22395   echo $ac_n "(cached) $ac_c" 1>&6
22396 else
22397   
22398         cat > conftest.$ac_ext <<EOF
22399 #line 22400 "configure"
22400 #include "confdefs.h"
22401 #include <pwd.h>
22402 int main() {
22403
22404         struct passwd pwd;
22405         pwd.pw_passwd = pwd.pw_name;
22406
22407 ; return 0; }
22408 EOF
22409 if { (eval echo configure:22410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22410   rm -rf conftest*
22411   ol_cv_struct_passwd_pw_passwd=yes
22412 else
22413   echo "configure: failed program was:" >&5
22414   cat conftest.$ac_ext >&5
22415   rm -rf conftest*
22416   ol_cv_struct_passwd_pw_passwd=no
22417 fi
22418 rm -f conftest*
22419 fi
22420
22421 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22422 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22423         cat >> confdefs.h <<\EOF
22424 #define HAVE_PW_PASSWD 1
22425 EOF
22426
22427 fi
22428
22429
22430 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22431 echo "configure:22432: checking if toupper() requires islower()" >&5
22432 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22433   echo $ac_n "(cached) $ac_c" 1>&6
22434 else
22435   
22436         if test "$cross_compiling" = yes; then
22437   ol_cv_c_upper_lower=safe
22438 else
22439   cat > conftest.$ac_ext <<EOF
22440 #line 22441 "configure"
22441 #include "confdefs.h"
22442
22443 #include <ctype.h>
22444 main()
22445 {
22446         if ('C' == toupper('C'))
22447                 exit(0);
22448         else
22449                 exit(1);
22450 }
22451 EOF
22452 if { (eval echo configure:22453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22453 then
22454   ol_cv_c_upper_lower=no
22455 else
22456   echo "configure: failed program was:" >&5
22457   cat conftest.$ac_ext >&5
22458   rm -fr conftest*
22459   ol_cv_c_upper_lower=yes
22460 fi
22461 rm -fr conftest*
22462 fi
22463
22464 fi
22465
22466 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22467 if test $ol_cv_c_upper_lower != no ; then
22468         cat >> confdefs.h <<\EOF
22469 #define C_UPPER_LOWER 1
22470 EOF
22471
22472 fi
22473
22474 echo $ac_n "checking for working const""... $ac_c" 1>&6
22475 echo "configure:22476: checking for working const" >&5
22476 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22477   echo $ac_n "(cached) $ac_c" 1>&6
22478 else
22479   cat > conftest.$ac_ext <<EOF
22480 #line 22481 "configure"
22481 #include "confdefs.h"
22482
22483 int main() {
22484
22485 /* Ultrix mips cc rejects this.  */
22486 typedef int charset[2]; const charset x;
22487 /* SunOS 4.1.1 cc rejects this.  */
22488 char const *const *ccp;
22489 char **p;
22490 /* NEC SVR4.0.2 mips cc rejects this.  */
22491 struct point {int x, y;};
22492 static struct point const zero = {0,0};
22493 /* AIX XL C 1.02.0.0 rejects this.
22494    It does not let you subtract one const X* pointer from another in an arm
22495    of an if-expression whose if-part is not a constant expression */
22496 const char *g = "string";
22497 ccp = &g + (g ? g-g : 0);
22498 /* HPUX 7.0 cc rejects these. */
22499 ++ccp;
22500 p = (char**) ccp;
22501 ccp = (char const *const *) p;
22502 { /* SCO 3.2v4 cc rejects this.  */
22503   char *t;
22504   char const *s = 0 ? (char *) 0 : (char const *) 0;
22505
22506   *t++ = 0;
22507 }
22508 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22509   int x[] = {25, 17};
22510   const int *foo = &x[0];
22511   ++foo;
22512 }
22513 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22514   typedef const int *iptr;
22515   iptr p = 0;
22516   ++p;
22517 }
22518 { /* AIX XL C 1.02.0.0 rejects this saying
22519      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22520   struct s { int j; const int *ap[3]; };
22521   struct s *b; b->j = 5;
22522 }
22523 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22524   const int foo = 10;
22525 }
22526
22527 ; return 0; }
22528 EOF
22529 if { (eval echo configure:22530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22530   rm -rf conftest*
22531   ac_cv_c_const=yes
22532 else
22533   echo "configure: failed program was:" >&5
22534   cat conftest.$ac_ext >&5
22535   rm -rf conftest*
22536   ac_cv_c_const=no
22537 fi
22538 rm -f conftest*
22539 fi
22540
22541 echo "$ac_t""$ac_cv_c_const" 1>&6
22542 if test $ac_cv_c_const = no; then
22543   cat >> confdefs.h <<\EOF
22544 #define const 
22545 EOF
22546
22547 fi
22548
22549 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22550 echo "configure:22551: checking if compiler understands volatile" >&5
22551 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22552   echo $ac_n "(cached) $ac_c" 1>&6
22553 else
22554   cat > conftest.$ac_ext <<EOF
22555 #line 22556 "configure"
22556 #include "confdefs.h"
22557 int x, y, z;
22558 int main() {
22559 volatile int a; int * volatile b = x ? &y : &z;
22560       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22561       *b = 0;
22562 ; return 0; }
22563 EOF
22564 if { (eval echo configure:22565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22565   rm -rf conftest*
22566   ol_cv_c_volatile=yes
22567 else
22568   echo "configure: failed program was:" >&5
22569   cat conftest.$ac_ext >&5
22570   rm -rf conftest*
22571   ol_cv_c_volatile=no
22572 fi
22573 rm -f conftest*
22574 fi
22575
22576 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22577   if test $ol_cv_c_volatile = yes; then
22578     : 
22579   else
22580     cat >> confdefs.h <<\EOF
22581 #define volatile 
22582 EOF
22583
22584   fi
22585  
22586
22587 if test $cross_compiling = yes ; then
22588         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22589         cat >> confdefs.h <<\EOF
22590 #define CROSS_COMPILING 1
22591 EOF
22592
22593 else
22594         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22595 echo "configure:22596: checking whether byte ordering is bigendian" >&5
22596 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22597   echo $ac_n "(cached) $ac_c" 1>&6
22598 else
22599   ac_cv_c_bigendian=unknown
22600 # See if sys/param.h defines the BYTE_ORDER macro.
22601 cat > conftest.$ac_ext <<EOF
22602 #line 22603 "configure"
22603 #include "confdefs.h"
22604 #include <sys/types.h>
22605 #include <sys/param.h>
22606 int main() {
22607
22608 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22609  bogus endian macros
22610 #endif
22611 ; return 0; }
22612 EOF
22613 if { (eval echo configure:22614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22614   rm -rf conftest*
22615   # It does; now see whether it defined to BIG_ENDIAN or not.
22616 cat > conftest.$ac_ext <<EOF
22617 #line 22618 "configure"
22618 #include "confdefs.h"
22619 #include <sys/types.h>
22620 #include <sys/param.h>
22621 int main() {
22622
22623 #if BYTE_ORDER != BIG_ENDIAN
22624  not big endian
22625 #endif
22626 ; return 0; }
22627 EOF
22628 if { (eval echo configure:22629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22629   rm -rf conftest*
22630   ac_cv_c_bigendian=yes
22631 else
22632   echo "configure: failed program was:" >&5
22633   cat conftest.$ac_ext >&5
22634   rm -rf conftest*
22635   ac_cv_c_bigendian=no
22636 fi
22637 rm -f conftest*
22638 else
22639   echo "configure: failed program was:" >&5
22640   cat conftest.$ac_ext >&5
22641 fi
22642 rm -f conftest*
22643 if test $ac_cv_c_bigendian = unknown; then
22644 if test "$cross_compiling" = yes; then
22645     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22646 else
22647   cat > conftest.$ac_ext <<EOF
22648 #line 22649 "configure"
22649 #include "confdefs.h"
22650 main () {
22651   /* Are we little or big endian?  From Harbison&Steele.  */
22652   union
22653   {
22654     long l;
22655     char c[sizeof (long)];
22656   } u;
22657   u.l = 1;
22658   exit (u.c[sizeof (long) - 1] == 1);
22659 }
22660 EOF
22661 if { (eval echo configure:22662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22662 then
22663   ac_cv_c_bigendian=no
22664 else
22665   echo "configure: failed program was:" >&5
22666   cat conftest.$ac_ext >&5
22667   rm -fr conftest*
22668   ac_cv_c_bigendian=yes
22669 fi
22670 rm -fr conftest*
22671 fi
22672
22673 fi
22674 fi
22675
22676 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22677 if test $ac_cv_c_bigendian = yes; then
22678   cat >> confdefs.h <<\EOF
22679 #define WORDS_BIGENDIAN 1
22680 EOF
22681
22682 fi
22683
22684 fi
22685
22686 echo $ac_n "checking size of short""... $ac_c" 1>&6
22687 echo "configure:22688: checking size of short" >&5 
22688 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22689   echo $ac_n "(cached) $ac_c" 1>&6
22690 else
22691   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22692   cat > conftest.$ac_ext <<EOF
22693 #line 22694 "configure"
22694 #include "confdefs.h"
22695 #include "confdefs.h" 
22696 #include <stdlib.h>
22697 #include <sys/types.h> 
22698  
22699
22700 int main() {
22701 switch (0) case 0: case (sizeof (short) == $ac_size):;
22702 ; return 0; }
22703 EOF
22704 if { (eval echo configure:22705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22705   rm -rf conftest*
22706   ac_cv_sizeof_short=$ac_size
22707 else
22708   echo "configure: failed program was:" >&5
22709   cat conftest.$ac_ext >&5
22710 fi
22711 rm -f conftest* 
22712   if test x$ac_cv_sizeof_short != x ; then break; fi 
22713 done 
22714
22715 fi
22716  
22717 if test x$ac_cv_sizeof_short = x ; then 
22718   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22719 fi 
22720 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22721 cat >> confdefs.h <<EOF
22722 #define SIZEOF_SHORT $ac_cv_sizeof_short
22723 EOF
22724  
22725  
22726 echo $ac_n "checking size of int""... $ac_c" 1>&6
22727 echo "configure:22728: checking size of int" >&5 
22728 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22729   echo $ac_n "(cached) $ac_c" 1>&6
22730 else
22731   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22732   cat > conftest.$ac_ext <<EOF
22733 #line 22734 "configure"
22734 #include "confdefs.h"
22735 #include "confdefs.h" 
22736 #include <stdlib.h>
22737 #include <sys/types.h> 
22738  
22739
22740 int main() {
22741 switch (0) case 0: case (sizeof (int) == $ac_size):;
22742 ; return 0; }
22743 EOF
22744 if { (eval echo configure:22745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22745   rm -rf conftest*
22746   ac_cv_sizeof_int=$ac_size
22747 else
22748   echo "configure: failed program was:" >&5
22749   cat conftest.$ac_ext >&5
22750 fi
22751 rm -f conftest* 
22752   if test x$ac_cv_sizeof_int != x ; then break; fi 
22753 done 
22754
22755 fi
22756  
22757 if test x$ac_cv_sizeof_int = x ; then 
22758   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22759 fi 
22760 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22761 cat >> confdefs.h <<EOF
22762 #define SIZEOF_INT $ac_cv_sizeof_int
22763 EOF
22764  
22765  
22766 echo $ac_n "checking size of long""... $ac_c" 1>&6
22767 echo "configure:22768: checking size of long" >&5 
22768 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22769   echo $ac_n "(cached) $ac_c" 1>&6
22770 else
22771   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22772   cat > conftest.$ac_ext <<EOF
22773 #line 22774 "configure"
22774 #include "confdefs.h"
22775 #include "confdefs.h" 
22776 #include <stdlib.h>
22777 #include <sys/types.h> 
22778  
22779
22780 int main() {
22781 switch (0) case 0: case (sizeof (long) == $ac_size):;
22782 ; return 0; }
22783 EOF
22784 if { (eval echo configure:22785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22785   rm -rf conftest*
22786   ac_cv_sizeof_long=$ac_size
22787 else
22788   echo "configure: failed program was:" >&5
22789   cat conftest.$ac_ext >&5
22790 fi
22791 rm -f conftest* 
22792   if test x$ac_cv_sizeof_long != x ; then break; fi 
22793 done 
22794
22795 fi
22796  
22797 if test x$ac_cv_sizeof_long = x ; then 
22798   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22799 fi 
22800 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22801 cat >> confdefs.h <<EOF
22802 #define SIZEOF_LONG $ac_cv_sizeof_long
22803 EOF
22804  
22805
22806 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22807 echo "configure:22808: checking size of wchar_t" >&5 
22808 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22809   echo $ac_n "(cached) $ac_c" 1>&6
22810 else
22811   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22812   cat > conftest.$ac_ext <<EOF
22813 #line 22814 "configure"
22814 #include "confdefs.h"
22815 #include "confdefs.h" 
22816 #include <stdlib.h>
22817 #include <sys/types.h> 
22818  
22819
22820 int main() {
22821 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22822 ; return 0; }
22823 EOF
22824 if { (eval echo configure:22825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22825   rm -rf conftest*
22826   ac_cv_sizeof_wchar_t=$ac_size
22827 else
22828   echo "configure: failed program was:" >&5
22829   cat conftest.$ac_ext >&5
22830 fi
22831 rm -f conftest* 
22832   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22833 done 
22834
22835 fi
22836  
22837 if test x$ac_cv_sizeof_wchar_t = x ; then 
22838   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22839 fi 
22840 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22841 cat >> confdefs.h <<EOF
22842 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22843 EOF
22844  
22845
22846
22847 if test "$ac_cv_sizeof_int" -lt 4 ; then
22848         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22849
22850         cat >> confdefs.h <<\EOF
22851 #define LBER_INT_T long
22852 EOF
22853
22854 else
22855         cat >> confdefs.h <<\EOF
22856 #define LBER_INT_T int
22857 EOF
22858
22859 fi
22860
22861 cat >> confdefs.h <<\EOF
22862 #define LBER_LEN_T long
22863 EOF
22864
22865 cat >> confdefs.h <<\EOF
22866 #define LBER_SOCKET_T int
22867 EOF
22868
22869 cat >> confdefs.h <<\EOF
22870 #define LBER_TAG_T long
22871 EOF
22872
22873
22874 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22875 echo "configure:22876: checking for 8-bit clean memcmp" >&5
22876 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22877   echo $ac_n "(cached) $ac_c" 1>&6
22878 else
22879   if test "$cross_compiling" = yes; then
22880   ac_cv_func_memcmp_clean=no
22881 else
22882   cat > conftest.$ac_ext <<EOF
22883 #line 22884 "configure"
22884 #include "confdefs.h"
22885
22886 main()
22887 {
22888   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22889   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22890 }
22891
22892 EOF
22893 if { (eval echo configure:22894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22894 then
22895   ac_cv_func_memcmp_clean=yes
22896 else
22897   echo "configure: failed program was:" >&5
22898   cat conftest.$ac_ext >&5
22899   rm -fr conftest*
22900   ac_cv_func_memcmp_clean=no
22901 fi
22902 rm -fr conftest*
22903 fi
22904
22905 fi
22906
22907 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22908 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22909
22910 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22911 echo "configure:22912: checking for strftime" >&5
22912 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22913   echo $ac_n "(cached) $ac_c" 1>&6
22914 else
22915   cat > conftest.$ac_ext <<EOF
22916 #line 22917 "configure"
22917 #include "confdefs.h"
22918 /* System header to define __stub macros and hopefully few prototypes,
22919     which can conflict with char strftime(); below.  */
22920 #include <assert.h>
22921 /* Override any gcc2 internal prototype to avoid an error.  */
22922 /* We use char because int might match the return type of a gcc2
22923     builtin and then its argument prototype would still apply.  */
22924 char strftime();
22925 char (*f)();
22926
22927 int main() {
22928
22929 /* The GNU C library defines this for functions which it implements
22930     to always fail with ENOSYS.  Some functions are actually named
22931     something starting with __ and the normal name is an alias.  */
22932 #if defined (__stub_strftime) || defined (__stub___strftime)
22933 choke me
22934 #else
22935 f = strftime;
22936 #endif
22937
22938 ; return 0; }
22939 EOF
22940 if { (eval echo configure:22941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22941   rm -rf conftest*
22942   eval "ac_cv_func_strftime=yes"
22943 else
22944   echo "configure: failed program was:" >&5
22945   cat conftest.$ac_ext >&5
22946   rm -rf conftest*
22947   eval "ac_cv_func_strftime=no"
22948 fi
22949 rm -f conftest*
22950 fi
22951
22952 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22953   echo "$ac_t""yes" 1>&6
22954   cat >> confdefs.h <<\EOF
22955 #define HAVE_STRFTIME 1
22956 EOF
22957
22958 else
22959   echo "$ac_t""no" 1>&6
22960 # strftime is in -lintl on SCO UNIX.
22961 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22962 echo "configure:22963: checking for strftime in -lintl" >&5
22963 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22965   echo $ac_n "(cached) $ac_c" 1>&6
22966 else
22967   ac_save_LIBS="$LIBS"
22968 LIBS="-lintl  $LIBS"
22969 cat > conftest.$ac_ext <<EOF
22970 #line 22971 "configure"
22971 #include "confdefs.h"
22972 /* Override any gcc2 internal prototype to avoid an error.  */
22973 /* We use char because int might match the return type of a gcc2
22974     builtin and then its argument prototype would still apply.  */
22975 char strftime();
22976
22977 int main() {
22978 strftime()
22979 ; return 0; }
22980 EOF
22981 if { (eval echo configure:22982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22982   rm -rf conftest*
22983   eval "ac_cv_lib_$ac_lib_var=yes"
22984 else
22985   echo "configure: failed program was:" >&5
22986   cat conftest.$ac_ext >&5
22987   rm -rf conftest*
22988   eval "ac_cv_lib_$ac_lib_var=no"
22989 fi
22990 rm -f conftest*
22991 LIBS="$ac_save_LIBS"
22992
22993 fi
22994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22995   echo "$ac_t""yes" 1>&6
22996   cat >> confdefs.h <<\EOF
22997 #define HAVE_STRFTIME 1
22998 EOF
22999
23000 LIBS="-lintl $LIBS"
23001 else
23002   echo "$ac_t""no" 1>&6
23003 fi
23004
23005 fi
23006
23007
23008 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23009 echo "configure:23010: checking for inet_aton()" >&5
23010 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23011   echo $ac_n "(cached) $ac_c" 1>&6
23012 else
23013   cat > conftest.$ac_ext <<EOF
23014 #line 23015 "configure"
23015 #include "confdefs.h"
23016
23017 #ifdef HAVE_SYS_TYPES_H
23018 #       include <sys/types.h>
23019 #endif
23020 #ifdef HAVE_SYS_SOCKET_H
23021 #       include <sys/socket.h>
23022 #       ifdef HAVE_SYS_SELECT_H
23023 #               include <sys/select.h>
23024 #       endif
23025 #       include <netinet/in.h>
23026 #       ifdef HAVE_ARPA_INET_H
23027 #               include <arpa/inet.h>
23028 #       endif
23029 #endif
23030
23031 int main() {
23032 struct in_addr in;
23033 int rc = inet_aton( "255.255.255.255", &in );
23034 ; return 0; }
23035 EOF
23036 if { (eval echo configure:23037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23037   rm -rf conftest*
23038   ol_cv_func_inet_aton=yes
23039 else
23040   echo "configure: failed program was:" >&5
23041   cat conftest.$ac_ext >&5
23042   rm -rf conftest*
23043   ol_cv_func_inet_aton=no
23044 fi
23045 rm -f conftest*
23046 fi
23047
23048 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23049   if test $ol_cv_func_inet_aton != no; then
23050     cat >> confdefs.h <<\EOF
23051 #define HAVE_INET_ATON 1
23052 EOF
23053
23054   fi
23055  
23056
23057 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23058 echo "configure:23059: checking for _spawnlp" >&5
23059 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23060   echo $ac_n "(cached) $ac_c" 1>&6
23061 else
23062   cat > conftest.$ac_ext <<EOF
23063 #line 23064 "configure"
23064 #include "confdefs.h"
23065 /* System header to define __stub macros and hopefully few prototypes,
23066     which can conflict with char _spawnlp(); below.  */
23067 #include <assert.h>
23068 /* Override any gcc2 internal prototype to avoid an error.  */
23069 /* We use char because int might match the return type of a gcc2
23070     builtin and then its argument prototype would still apply.  */
23071 char _spawnlp();
23072 char (*f)();
23073
23074 int main() {
23075
23076 /* The GNU C library defines this for functions which it implements
23077     to always fail with ENOSYS.  Some functions are actually named
23078     something starting with __ and the normal name is an alias.  */
23079 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23080 choke me
23081 #else
23082 f = _spawnlp;
23083 #endif
23084
23085 ; return 0; }
23086 EOF
23087 if { (eval echo configure:23088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23088   rm -rf conftest*
23089   eval "ac_cv_func__spawnlp=yes"
23090 else
23091   echo "configure: failed program was:" >&5
23092   cat conftest.$ac_ext >&5
23093   rm -rf conftest*
23094   eval "ac_cv_func__spawnlp=no"
23095 fi
23096 rm -f conftest*
23097 fi
23098
23099 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23100   echo "$ac_t""yes" 1>&6
23101   cat >> confdefs.h <<\EOF
23102 #define HAVE_SPAWNLP 1
23103 EOF
23104
23105 else
23106   echo "$ac_t""no" 1>&6
23107 fi
23108
23109
23110 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23111 echo "configure:23112: checking for _snprintf" >&5
23112 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23113   echo $ac_n "(cached) $ac_c" 1>&6
23114 else
23115   cat > conftest.$ac_ext <<EOF
23116 #line 23117 "configure"
23117 #include "confdefs.h"
23118 /* System header to define __stub macros and hopefully few prototypes,
23119     which can conflict with char _snprintf(); below.  */
23120 #include <assert.h>
23121 /* Override any gcc2 internal prototype to avoid an error.  */
23122 /* We use char because int might match the return type of a gcc2
23123     builtin and then its argument prototype would still apply.  */
23124 char _snprintf();
23125 char (*f)();
23126
23127 int main() {
23128
23129 /* The GNU C library defines this for functions which it implements
23130     to always fail with ENOSYS.  Some functions are actually named
23131     something starting with __ and the normal name is an alias.  */
23132 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23133 choke me
23134 #else
23135 f = _snprintf;
23136 #endif
23137
23138 ; return 0; }
23139 EOF
23140 if { (eval echo configure:23141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23141   rm -rf conftest*
23142   eval "ac_cv_func__snprintf=yes"
23143 else
23144   echo "configure: failed program was:" >&5
23145   cat conftest.$ac_ext >&5
23146   rm -rf conftest*
23147   eval "ac_cv_func__snprintf=no"
23148 fi
23149 rm -f conftest*
23150 fi
23151
23152 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23153   echo "$ac_t""yes" 1>&6
23154   ac_cv_func_snprintf=yes
23155         cat >> confdefs.h <<\EOF
23156 #define snprintf _snprintf
23157 EOF
23158
23159
23160 else
23161   echo "$ac_t""no" 1>&6
23162 fi
23163
23164
23165 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23166 echo "configure:23167: checking for _vsnprintf" >&5
23167 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23168   echo $ac_n "(cached) $ac_c" 1>&6
23169 else
23170   cat > conftest.$ac_ext <<EOF
23171 #line 23172 "configure"
23172 #include "confdefs.h"
23173 /* System header to define __stub macros and hopefully few prototypes,
23174     which can conflict with char _vsnprintf(); below.  */
23175 #include <assert.h>
23176 /* Override any gcc2 internal prototype to avoid an error.  */
23177 /* We use char because int might match the return type of a gcc2
23178     builtin and then its argument prototype would still apply.  */
23179 char _vsnprintf();
23180 char (*f)();
23181
23182 int main() {
23183
23184 /* The GNU C library defines this for functions which it implements
23185     to always fail with ENOSYS.  Some functions are actually named
23186     something starting with __ and the normal name is an alias.  */
23187 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23188 choke me
23189 #else
23190 f = _vsnprintf;
23191 #endif
23192
23193 ; return 0; }
23194 EOF
23195 if { (eval echo configure:23196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23196   rm -rf conftest*
23197   eval "ac_cv_func__vsnprintf=yes"
23198 else
23199   echo "configure: failed program was:" >&5
23200   cat conftest.$ac_ext >&5
23201   rm -rf conftest*
23202   eval "ac_cv_func__vsnprintf=no"
23203 fi
23204 rm -f conftest*
23205 fi
23206
23207 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23208   echo "$ac_t""yes" 1>&6
23209   ac_cv_func_vsnprintf=yes
23210         cat >> confdefs.h <<\EOF
23211 #define vsnprintf _vsnprintf
23212 EOF
23213
23214
23215 else
23216   echo "$ac_t""no" 1>&6
23217 fi
23218
23219
23220 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23221 echo "configure:23222: checking for vprintf" >&5
23222 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23223   echo $ac_n "(cached) $ac_c" 1>&6
23224 else
23225   cat > conftest.$ac_ext <<EOF
23226 #line 23227 "configure"
23227 #include "confdefs.h"
23228 /* System header to define __stub macros and hopefully few prototypes,
23229     which can conflict with char vprintf(); below.  */
23230 #include <assert.h>
23231 /* Override any gcc2 internal prototype to avoid an error.  */
23232 /* We use char because int might match the return type of a gcc2
23233     builtin and then its argument prototype would still apply.  */
23234 char vprintf();
23235 char (*f)();
23236
23237 int main() {
23238
23239 /* The GNU C library defines this for functions which it implements
23240     to always fail with ENOSYS.  Some functions are actually named
23241     something starting with __ and the normal name is an alias.  */
23242 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23243 choke me
23244 #else
23245 f = vprintf;
23246 #endif
23247
23248 ; return 0; }
23249 EOF
23250 if { (eval echo configure:23251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23251   rm -rf conftest*
23252   eval "ac_cv_func_vprintf=yes"
23253 else
23254   echo "configure: failed program was:" >&5
23255   cat conftest.$ac_ext >&5
23256   rm -rf conftest*
23257   eval "ac_cv_func_vprintf=no"
23258 fi
23259 rm -f conftest*
23260 fi
23261
23262 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23263   echo "$ac_t""yes" 1>&6
23264   cat >> confdefs.h <<\EOF
23265 #define HAVE_VPRINTF 1
23266 EOF
23267
23268 else
23269   echo "$ac_t""no" 1>&6
23270 fi
23271
23272 if test "$ac_cv_func_vprintf" != yes; then
23273 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23274 echo "configure:23275: checking for _doprnt" >&5
23275 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23276   echo $ac_n "(cached) $ac_c" 1>&6
23277 else
23278   cat > conftest.$ac_ext <<EOF
23279 #line 23280 "configure"
23280 #include "confdefs.h"
23281 /* System header to define __stub macros and hopefully few prototypes,
23282     which can conflict with char _doprnt(); below.  */
23283 #include <assert.h>
23284 /* Override any gcc2 internal prototype to avoid an error.  */
23285 /* We use char because int might match the return type of a gcc2
23286     builtin and then its argument prototype would still apply.  */
23287 char _doprnt();
23288 char (*f)();
23289
23290 int main() {
23291
23292 /* The GNU C library defines this for functions which it implements
23293     to always fail with ENOSYS.  Some functions are actually named
23294     something starting with __ and the normal name is an alias.  */
23295 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23296 choke me
23297 #else
23298 f = _doprnt;
23299 #endif
23300
23301 ; return 0; }
23302 EOF
23303 if { (eval echo configure:23304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23304   rm -rf conftest*
23305   eval "ac_cv_func__doprnt=yes"
23306 else
23307   echo "configure: failed program was:" >&5
23308   cat conftest.$ac_ext >&5
23309   rm -rf conftest*
23310   eval "ac_cv_func__doprnt=no"
23311 fi
23312 rm -f conftest*
23313 fi
23314
23315 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23316   echo "$ac_t""yes" 1>&6
23317   cat >> confdefs.h <<\EOF
23318 #define HAVE_DOPRNT 1
23319 EOF
23320
23321 else
23322   echo "$ac_t""no" 1>&6
23323 fi
23324
23325 fi
23326
23327
23328 if test $ac_cv_func_vprintf = yes ; then
23329                 for ac_func in snprintf vsnprintf
23330 do
23331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23332 echo "configure:23333: checking for $ac_func" >&5
23333 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23334   echo $ac_n "(cached) $ac_c" 1>&6
23335 else
23336   cat > conftest.$ac_ext <<EOF
23337 #line 23338 "configure"
23338 #include "confdefs.h"
23339 /* System header to define __stub macros and hopefully few prototypes,
23340     which can conflict with char $ac_func(); below.  */
23341 #include <assert.h>
23342 /* Override any gcc2 internal prototype to avoid an error.  */
23343 /* We use char because int might match the return type of a gcc2
23344     builtin and then its argument prototype would still apply.  */
23345 char $ac_func();
23346 char (*f)();
23347
23348 int main() {
23349
23350 /* The GNU C library defines this for functions which it implements
23351     to always fail with ENOSYS.  Some functions are actually named
23352     something starting with __ and the normal name is an alias.  */
23353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23354 choke me
23355 #else
23356 f = $ac_func;
23357 #endif
23358
23359 ; return 0; }
23360 EOF
23361 if { (eval echo configure:23362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23362   rm -rf conftest*
23363   eval "ac_cv_func_$ac_func=yes"
23364 else
23365   echo "configure: failed program was:" >&5
23366   cat conftest.$ac_ext >&5
23367   rm -rf conftest*
23368   eval "ac_cv_func_$ac_func=no"
23369 fi
23370 rm -f conftest*
23371 fi
23372
23373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23374   echo "$ac_t""yes" 1>&6
23375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23376   cat >> confdefs.h <<EOF
23377 #define $ac_tr_func 1
23378 EOF
23379  
23380 else
23381   echo "$ac_t""no" 1>&6
23382 fi
23383 done
23384
23385 fi
23386
23387 for ac_func in \
23388         bcopy                   \
23389         closesocket             \
23390         chroot                  \
23391         endgrent                \
23392         endpwent                \
23393         fcntl                   \
23394         flock                   \
23395         fstat                   \
23396         getdtablesize   \
23397         getgrgid                \
23398         gethostname             \
23399         getpass                 \
23400         getpassphrase   \
23401         getpwuid                \
23402         getpwnam                \
23403         getspnam                \
23404         gettimeofday    \
23405         initgroups              \
23406         lockf                   \
23407         memcpy                  \
23408         memmove                 \
23409         mkstemp                 \
23410         mktemp                  \
23411         pipe                    \
23412         read                    \
23413         recv                    \
23414         recvfrom                \
23415         setpwfile               \
23416         setgid                  \
23417         setegid                 \
23418         setsid                  \
23419         setuid                  \
23420         seteuid                 \
23421         sigaction               \
23422         signal                  \
23423         sigset                  \
23424         strdup                  \
23425         strpbrk                 \
23426         strrchr                 \
23427         strsep                  \
23428         strstr                  \
23429         strtol                  \
23430         strtoul                 \
23431         strtoq                  \
23432         strtouq                 \
23433         strtoll                 \
23434         strspn                  \
23435         sysconf                 \
23436         usleep                  \
23437         waitpid                 \
23438         wait4                   \
23439         write                   \
23440         send                    \
23441         sendmsg                 \
23442         sendto                  \
23443
23444 do
23445 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23446 echo "configure:23447: checking for $ac_func" >&5
23447 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23448   echo $ac_n "(cached) $ac_c" 1>&6
23449 else
23450   cat > conftest.$ac_ext <<EOF
23451 #line 23452 "configure"
23452 #include "confdefs.h"
23453 /* System header to define __stub macros and hopefully few prototypes,
23454     which can conflict with char $ac_func(); below.  */
23455 #include <assert.h>
23456 /* Override any gcc2 internal prototype to avoid an error.  */
23457 /* We use char because int might match the return type of a gcc2
23458     builtin and then its argument prototype would still apply.  */
23459 char $ac_func();
23460 char (*f)();
23461
23462 int main() {
23463
23464 /* The GNU C library defines this for functions which it implements
23465     to always fail with ENOSYS.  Some functions are actually named
23466     something starting with __ and the normal name is an alias.  */
23467 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23468 choke me
23469 #else
23470 f = $ac_func;
23471 #endif
23472
23473 ; return 0; }
23474 EOF
23475 if { (eval echo configure:23476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23476   rm -rf conftest*
23477   eval "ac_cv_func_$ac_func=yes"
23478 else
23479   echo "configure: failed program was:" >&5
23480   cat conftest.$ac_ext >&5
23481   rm -rf conftest*
23482   eval "ac_cv_func_$ac_func=no"
23483 fi
23484 rm -f conftest*
23485 fi
23486
23487 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23488   echo "$ac_t""yes" 1>&6
23489     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23490   cat >> confdefs.h <<EOF
23491 #define $ac_tr_func 1
23492 EOF
23493  
23494 else
23495   echo "$ac_t""no" 1>&6
23496 fi
23497 done
23498
23499
23500 for ac_func in getopt getpeereid
23501 do
23502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23503 echo "configure:23504: checking for $ac_func" >&5
23504 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23505   echo $ac_n "(cached) $ac_c" 1>&6
23506 else
23507   cat > conftest.$ac_ext <<EOF
23508 #line 23509 "configure"
23509 #include "confdefs.h"
23510 /* System header to define __stub macros and hopefully few prototypes,
23511     which can conflict with char $ac_func(); below.  */
23512 #include <assert.h>
23513 /* Override any gcc2 internal prototype to avoid an error.  */
23514 /* We use char because int might match the return type of a gcc2
23515     builtin and then its argument prototype would still apply.  */
23516 char $ac_func();
23517 char (*f)();
23518
23519 int main() {
23520
23521 /* The GNU C library defines this for functions which it implements
23522     to always fail with ENOSYS.  Some functions are actually named
23523     something starting with __ and the normal name is an alias.  */
23524 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23525 choke me
23526 #else
23527 f = $ac_func;
23528 #endif
23529
23530 ; return 0; }
23531 EOF
23532 if { (eval echo configure:23533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23533   rm -rf conftest*
23534   eval "ac_cv_func_$ac_func=yes"
23535 else
23536   echo "configure: failed program was:" >&5
23537   cat conftest.$ac_ext >&5
23538   rm -rf conftest*
23539   eval "ac_cv_func_$ac_func=no"
23540 fi
23541 rm -f conftest*
23542 fi
23543
23544 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23545   echo "$ac_t""yes" 1>&6
23546     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23547   cat >> confdefs.h <<EOF
23548 #define $ac_tr_func 1
23549 EOF
23550  
23551 else
23552   echo "$ac_t""no" 1>&6
23553 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23554 fi
23555 done
23556
23557
23558
23559 if test "$ac_cv_func_getopt" != yes; then
23560         LIBSRCS="$LIBSRCS getopt.c"
23561 fi
23562 if test "$ac_cv_func_getpeereid" != yes; then
23563         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23564 echo "configure:23565: checking for msg_accrights in msghdr" >&5
23565 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23566   echo $ac_n "(cached) $ac_c" 1>&6
23567 else
23568   cat > conftest.$ac_ext <<EOF
23569 #line 23570 "configure"
23570 #include "confdefs.h"
23571 #include <sys/socket.h>
23572 int main() {
23573 struct msghdr m; m.msg_accrightslen=0
23574 ; return 0; }
23575 EOF
23576 if { (eval echo configure:23577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23577   rm -rf conftest*
23578   ol_cv_msghdr_msg_accrights=yes
23579 else
23580   echo "configure: failed program was:" >&5
23581   cat conftest.$ac_ext >&5
23582   rm -rf conftest*
23583   ol_cv_msghdr_msg_accrights=no
23584 fi
23585 rm -f conftest*
23586         
23587 fi
23588
23589 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23590   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23591         cat >> confdefs.h <<\EOF
23592 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23593 EOF
23594
23595   fi
23596
23597         LIBSRCS="$LIBSRCS getpeereid.c"
23598 fi
23599 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23600         if test "$ac_cv_func_snprintf" != yes; then
23601                 cat >> confdefs.h <<\EOF
23602 #define snprintf ber_pvt_snprintf
23603 EOF
23604
23605         fi
23606         if test "$ac_cv_func_vsnprintf" != yes; then
23607                 cat >> confdefs.h <<\EOF
23608 #define vsnprintf ber_pvt_vsnprintf
23609 EOF
23610
23611         fi
23612 fi
23613
23614
23615 if test "$ol_enable_slapi" != no ; then
23616                         for ac_hdr in ltdl.h
23617 do
23618 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23619 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23620 echo "configure:23621: checking for $ac_hdr" >&5
23621 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23622   echo $ac_n "(cached) $ac_c" 1>&6
23623 else
23624   cat > conftest.$ac_ext <<EOF
23625 #line 23626 "configure"
23626 #include "confdefs.h"
23627 #include <$ac_hdr>
23628 EOF
23629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23630 { (eval echo configure:23631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23632 if test -z "$ac_err"; then
23633   rm -rf conftest*
23634   eval "ac_cv_header_$ac_safe=yes"
23635 else
23636   echo "$ac_err" >&5
23637   echo "configure: failed program was:" >&5
23638   cat conftest.$ac_ext >&5
23639   rm -rf conftest*
23640   eval "ac_cv_header_$ac_safe=no"
23641 fi
23642 rm -f conftest*
23643 fi
23644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23645   echo "$ac_t""yes" 1>&6
23646     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23647   cat >> confdefs.h <<EOF
23648 #define $ac_tr_hdr 1
23649 EOF
23650  
23651 else
23652   echo "$ac_t""no" 1>&6
23653 fi
23654 done
23655
23656
23657         if test $ac_cv_header_ltdl_h != yes ; then
23658                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23659         fi
23660         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23661 echo "configure:23662: checking for lt_dlinit in -lltdl" >&5
23662 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23664   echo $ac_n "(cached) $ac_c" 1>&6
23665 else
23666   ac_save_LIBS="$LIBS"
23667 LIBS="-lltdl  $LIBS"
23668 cat > conftest.$ac_ext <<EOF
23669 #line 23670 "configure"
23670 #include "confdefs.h"
23671 /* Override any gcc2 internal prototype to avoid an error.  */
23672 /* We use char because int might match the return type of a gcc2
23673     builtin and then its argument prototype would still apply.  */
23674 char lt_dlinit();
23675
23676 int main() {
23677 lt_dlinit()
23678 ; return 0; }
23679 EOF
23680 if { (eval echo configure:23681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23681   rm -rf conftest*
23682   eval "ac_cv_lib_$ac_lib_var=yes"
23683 else
23684   echo "configure: failed program was:" >&5
23685   cat conftest.$ac_ext >&5
23686   rm -rf conftest*
23687   eval "ac_cv_lib_$ac_lib_var=no"
23688 fi
23689 rm -f conftest*
23690 LIBS="$ac_save_LIBS"
23691
23692 fi
23693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23694   echo "$ac_t""yes" 1>&6
23695   
23696                 SLAPI_LIBS=-lltdl
23697                 LIBSLAPI=libslapi.a
23698                 LIBSLAPITOOLS=../libslapi.a
23699                 cat >> confdefs.h <<\EOF
23700 #define HAVE_LIBLTDL 1
23701 EOF
23702
23703         
23704 else
23705   echo "$ac_t""no" 1>&6
23706 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23707 fi
23708
23709
23710         cat >> confdefs.h <<\EOF
23711 #define LDAP_SLAPI 1
23712 EOF
23713
23714 fi
23715
23716 if test "$ol_enable_debug" != no ; then
23717         cat >> confdefs.h <<\EOF
23718 #define LDAP_DEBUG 1
23719 EOF
23720
23721 fi
23722 if test "$ol_enable_syslog" = yes ; then
23723         cat >> confdefs.h <<\EOF
23724 #define LDAP_SYSLOG 1
23725 EOF
23726
23727 fi
23728 if test "$ol_link_kbind" != no ; then
23729         cat >> confdefs.h <<\EOF
23730 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23731 EOF
23732
23733 fi
23734 if test "$ol_enable_proctitle" != no ; then
23735         cat >> confdefs.h <<\EOF
23736 #define LDAP_PROCTITLE 1
23737 EOF
23738
23739 fi
23740 if test "$ol_enable_referrals" != no ; then
23741         cat >> confdefs.h <<\EOF
23742 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23743 EOF
23744
23745 fi
23746 if test "$ol_enable_local" != no; then
23747         cat >> confdefs.h <<\EOF
23748 #define LDAP_PF_LOCAL 1
23749 EOF
23750
23751 fi
23752 if test "$ol_link_ipv6" != no; then
23753         cat >> confdefs.h <<\EOF
23754 #define LDAP_PF_INET6 1
23755 EOF
23756
23757 fi
23758 if test "$ol_enable_cleartext" != no ; then
23759         cat >> confdefs.h <<\EOF
23760 #define SLAPD_CLEARTEXT 1
23761 EOF
23762
23763 fi
23764 if test "$ol_enable_crypt" != no ; then
23765         cat >> confdefs.h <<\EOF
23766 #define SLAPD_CRYPT 1
23767 EOF
23768
23769 fi
23770 if test "$ol_link_spasswd" != no ; then
23771         cat >> confdefs.h <<\EOF
23772 #define SLAPD_SPASSWD 1
23773 EOF
23774
23775 fi
23776 if test "$ol_enable_multimaster" != no ; then
23777         cat >> confdefs.h <<\EOF
23778 #define SLAPD_MULTIMASTER 1
23779 EOF
23780
23781 fi
23782 if test "$ol_enable_rlookups" != no ; then
23783         cat >> confdefs.h <<\EOF
23784 #define SLAPD_RLOOKUPS 1
23785 EOF
23786
23787 fi
23788 if test "$ol_enable_aci" != no ; then
23789         cat >> confdefs.h <<\EOF
23790 #define SLAPD_ACI_ENABLED 1
23791 EOF
23792
23793 fi
23794
23795 if test "$ol_link_modules" != no ; then
23796         cat >> confdefs.h <<\EOF
23797 #define SLAPD_MODULES 1
23798 EOF
23799
23800         BUILD_SLAPD=yes
23801         SLAPD_MODULES_LDFLAGS="-dlopen self"
23802 fi
23803
23804 cat >> confdefs.h <<\EOF
23805 #define SLAPD_MOD_STATIC 1
23806 EOF
23807
23808 cat >> confdefs.h <<\EOF
23809 #define SLAPD_MOD_DYNAMIC 2
23810 EOF
23811
23812
23813 if test "$ol_enable_bdb" != no ; then
23814         BUILD_SLAPD=yes
23815         BUILD_BDB=$ol_enable_bdb
23816         if test "$ol_enable_bdb" = mod ; then
23817                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23818                 MFLAG=SLAPD_MOD_DYNAMIC
23819         else
23820                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23821                 MFLAG=SLAPD_MOD_STATIC
23822         fi
23823         cat >> confdefs.h <<EOF
23824 #define SLAPD_BDB $MFLAG
23825 EOF
23826
23827 fi
23828
23829 if test "$ol_enable_dnssrv" != no ; then
23830         BUILD_SLAPD=yes
23831         BUILD_DNSSRV=$ol_enable_dnssrv
23832         if test "$ol_enable_dnssrv" = mod ; then
23833                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23834                 MFLAG=SLAPD_MOD_DYNAMIC
23835         else
23836                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23837                 MFLAG=SLAPD_MOD_STATIC
23838         fi
23839         cat >> confdefs.h <<EOF
23840 #define SLAPD_DNSSRV $MFLAG
23841 EOF
23842
23843 fi
23844
23845 if test "$ol_enable_hdb" != no ; then
23846         BUILD_SLAPD=yes
23847         BUILD_HDB=$ol_enable_hdb
23848         if test "$ol_enable_hdb" = mod ; then
23849                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23850                 MFLAG=SLAPD_MOD_DYNAMIC
23851         else
23852                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23853                 MFLAG=SLAPD_MOD_STATIC
23854         fi
23855         cat >> confdefs.h <<EOF
23856 #define SLAPD_HDB $MFLAG
23857 EOF
23858
23859 fi
23860
23861 if test "$ol_enable_ldap" != no ; then
23862         BUILD_SLAPD=yes
23863         BUILD_LDAP=$ol_enable_ldap
23864         if test "$ol_enable_ldap" = mod ; then
23865                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23866                 MFLAG=SLAPD_MOD_DYNAMIC
23867         else
23868                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23869                 MFLAG=SLAPD_MOD_STATIC
23870         fi
23871         cat >> confdefs.h <<EOF
23872 #define SLAPD_LDAP $MFLAG
23873 EOF
23874
23875 fi
23876
23877 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23878         BUILD_SLAPD=yes
23879         BUILD_LDBM=$ol_enable_ldbm
23880         if test "$ol_enable_ldbm" = mod ; then
23881                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23882                 MFLAG=SLAPD_MOD_DYNAMIC
23883         else
23884                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23885                 MFLAG=SLAPD_MOD_STATIC
23886         fi
23887         cat >> confdefs.h <<EOF
23888 #define SLAPD_LDBM $MFLAG
23889 EOF
23890
23891 fi
23892
23893 if test "$ol_enable_meta" != no ; then
23894         BUILD_SLAPD=yes
23895         BUILD_META=$ol_enable_meta
23896         BUILD_REWRITE=yes
23897         if test "$ol_enable_meta" = mod ; then
23898                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23899                 MFLAG=SLAPD_MOD_DYNAMIC
23900         else
23901                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23902                 MFLAG=SLAPD_MOD_STATIC
23903         fi
23904         cat >> confdefs.h <<EOF
23905 #define SLAPD_META $MFLAG
23906 EOF
23907
23908 fi
23909
23910 if test "$ol_enable_monitor" != no ; then
23911         BUILD_SLAPD=yes
23912         BUILD_MONITOR=$ol_enable_monitor
23913         if test "$ol_enable_monitor" = mod ; then
23914                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23915                 MFLAG=SLAPD_MOD_DYNAMIC
23916         else
23917                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23918                 MFLAG=SLAPD_MOD_STATIC
23919         fi
23920         cat >> confdefs.h <<EOF
23921 #define SLAPD_MONITOR $MFLAG
23922 EOF
23923
23924 fi
23925
23926 if test "$ol_enable_null" != no ; then
23927         BUILD_SLAPD=yes
23928         BUILD_NULL=$ol_enable_null
23929         if test "$ol_enable_null" = mod ; then
23930                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23931                 MFLAG=SLAPD_MOD_DYNAMIC
23932         else
23933                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23934                 MFLAG=SLAPD_MOD_STATIC
23935         fi
23936         cat >> confdefs.h <<EOF
23937 #define SLAPD_NULL $MFLAG
23938 EOF
23939
23940 fi
23941
23942 if test "$ol_enable_passwd" != no ; then
23943         BUILD_SLAPD=yes
23944         BUILD_PASSWD=$ol_enable_passwd
23945         if test "$ol_enable_passwd" = mod ; then
23946                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23947                 MFLAG=SLAPD_MOD_DYNAMIC
23948         else
23949                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23950                 MFLAG=SLAPD_MOD_STATIC
23951         fi
23952         cat >> confdefs.h <<EOF
23953 #define SLAPD_PASSWD $MFLAG
23954 EOF
23955
23956 fi
23957
23958 if test "$ol_link_perl" != no ; then
23959         BUILD_SLAPD=yes
23960         BUILD_PERL=$ol_enable_perl
23961         if test "$ol_enable_perl" = mod ; then
23962                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23963                 MFLAG=SLAPD_MOD_DYNAMIC
23964         else
23965                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23966                 MFLAG=SLAPD_MOD_STATIC
23967         fi
23968         cat >> confdefs.h <<EOF
23969 #define SLAPD_PERL $MFLAG
23970 EOF
23971
23972 fi
23973
23974 if test "$ol_enable_relay" != no ; then
23975         BUILD_SLAPD=yes
23976         BUILD_RELAY=$ol_enable_relay
23977         if test "$ol_enable_relay" = mod ; then
23978                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23979                 MFLAG=SLAPD_MOD_DYNAMIC
23980         else
23981                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23982                 MFLAG=SLAPD_MOD_STATIC
23983         fi
23984         cat >> confdefs.h <<EOF
23985 #define SLAPD_RELAY $MFLAG
23986 EOF
23987
23988 fi
23989
23990 if test "$ol_enable_shell" != no ; then
23991         if test "$ol_link_thread" != no ; then
23992                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23993         fi
23994         BUILD_SLAPD=yes
23995         BUILD_SHELL=$ol_enable_shell
23996         if test "$ol_enable_shell" = mod ; then
23997                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23998                 MFLAG=SLAPD_MOD_DYNAMIC
23999         else
24000                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24001                 MFLAG=SLAPD_MOD_STATIC
24002         fi
24003         cat >> confdefs.h <<EOF
24004 #define SLAPD_SHELL $MFLAG
24005 EOF
24006
24007 fi
24008
24009 if test "$ol_link_sql" != no ; then
24010         BUILD_SLAPD=yes
24011         BUILD_SQL=$ol_enable_sql
24012         if test "$ol_enable_sql" = mod; then
24013                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24014                 MFLAG=SLAPD_MOD_DYNAMIC
24015         else
24016                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24017                 MFLAG=SLAPD_MOD_STATIC
24018         fi
24019         cat >> confdefs.h <<EOF
24020 #define SLAPD_SQL $MFLAG
24021 EOF
24022
24023 fi
24024
24025 if test "$ol_enable_chain" != no ; then
24026         BUILD_CHAIN=$ol_enable_chain
24027         if test "$ol_enable_chain" = mod ; then
24028                 MFLAG=SLAPD_MOD_DYNAMIC
24029                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
24030         else
24031                 MFLAG=SLAPD_MOD_STATIC
24032         fi
24033         cat >> confdefs.h <<EOF
24034 #define SLAPD_OVER_CHAIN $MFLAG
24035 EOF
24036
24037 fi
24038
24039 if test "$ol_enable_denyop" != no ; then
24040         BUILD_DENYOP=$ol_enable_denyop
24041         if test "$ol_enable_denyop" = mod ; then
24042                 MFLAG=SLAPD_MOD_DYNAMIC
24043                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
24044         else
24045                 MFLAG=SLAPD_MOD_STATIC
24046         fi
24047         cat >> confdefs.h <<EOF
24048 #define SLAPD_OVER_DENYOP $MFLAG
24049 EOF
24050
24051 fi
24052
24053 if test "$ol_enable_dyngroup" != no ; then
24054         BUILD_DYNGROUP=$ol_enable_dyngroup
24055         if test "$ol_enable_dyngroup" = mod ; then
24056                 MFLAG=SLAPD_MOD_DYNAMIC
24057                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
24058         else
24059                 MFLAG=SLAPD_MOD_STATIC
24060         fi
24061         cat >> confdefs.h <<EOF
24062 #define SLAPD_OVER_DYNGROUP $MFLAG
24063 EOF
24064
24065 fi
24066
24067 if test "$ol_enable_lastmod" != no ; then
24068         BUILD_LASTMOD=$ol_enable_lastmod
24069         if test "$ol_enable_lastmod" = mod ; then
24070                 MFLAG=SLAPD_MOD_DYNAMIC
24071                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
24072         else
24073                 MFLAG=SLAPD_MOD_STATIC
24074         fi
24075         cat >> confdefs.h <<EOF
24076 #define SLAPD_OVER_LASTMOD $MFLAG
24077 EOF
24078
24079 fi
24080
24081 if test "$ol_enable_ppolicy" != no ; then
24082         BUILD_PPOLICY=$ol_enable_ppolicy
24083         if test "$ol_enable_ppolicy" = mod ; then
24084                 MFLAG=SLAPD_MOD_DYNAMIC
24085                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
24086         else
24087                 MFLAG=SLAPD_MOD_STATIC
24088         fi
24089         cat >> confdefs.h <<EOF
24090 #define SLAPD_OVER_PPOLICY $MFLAG
24091 EOF
24092
24093 fi
24094
24095 if test "$ol_enable_proxycache" != no ; then
24096         BUILD_PROXYCACHE=$ol_enable_proxycache
24097         if test "$ol_enable_proxycache" = mod ; then
24098                 MFLAG=SLAPD_MOD_DYNAMIC
24099                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
24100         else
24101                 MFLAG=SLAPD_MOD_STATIC
24102         fi
24103         cat >> confdefs.h <<EOF
24104 #define SLAPD_OVER_PROXYCACHE $MFLAG
24105 EOF
24106
24107 fi
24108
24109 if test "$ol_enable_refint" != no ; then
24110         BUILD_REFINT=$ol_enable_refint
24111         if test "$ol_enable_refint" = mod ; then
24112                 MFLAG=SLAPD_MOD_DYNAMIC
24113                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
24114         else
24115                 MFLAG=SLAPD_MOD_STATIC
24116         fi
24117         cat >> confdefs.h <<EOF
24118 #define SLAPD_OVER_REFINT $MFLAG
24119 EOF
24120
24121 fi
24122
24123 if test "$ol_enable_rwm" != no ; then
24124         BUILD_REWRITE=yes
24125         BUILD_RWM=$ol_enable_rwm
24126         if test "$ol_enable_rwm" = mod ; then
24127                 MFLAG=SLAPD_MOD_DYNAMIC
24128                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24129         else
24130                 MFLAG=SLAPD_MOD_STATIC
24131         fi
24132         cat >> confdefs.h <<EOF
24133 #define SLAPD_OVER_RWM $MFLAG
24134 EOF
24135
24136 fi
24137
24138 if test "$ol_enable_unique" != no ; then
24139         BUILD_UNIQUE=$ol_enable_unique
24140         if test "$ol_enable_unique" = mod ; then
24141                 MFLAG=SLAPD_MOD_DYNAMIC
24142                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24143         else
24144                 MFLAG=SLAPD_MOD_STATIC
24145         fi
24146         cat >> confdefs.h <<EOF
24147 #define SLAPD_OVER_UNIQUE $MFLAG
24148 EOF
24149
24150 fi
24151
24152 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24153         $BUILD_SLAPD = yes ; then
24154         BUILD_SLURPD=yes
24155 fi
24156
24157 if test "$ol_enable_rewrite" != no ; then
24158         cat >> confdefs.h <<\EOF
24159 #define ENABLE_REWRITE 1
24160 EOF
24161
24162         BUILD_REWRITE=yes
24163 fi
24164
24165 if test "$ol_enable_slapi" != no ; then
24166         cat >> confdefs.h <<\EOF
24167 #define ENABLE_SLAPI 1
24168 EOF
24169
24170         BUILD_SLAPI=yes
24171         SLAPD_SLAPI_DEPEND=libslapi.a
24172 fi
24173
24174
24175
24176 if test "$ac_cv_mingw32" = yes ; then
24177         PLAT=NT
24178         SLAPD_MODULES_LDFLAGS=
24179 else
24180         PLAT=UNIX
24181 fi
24182
24183 if test -z "$SLAPD_STATIC_BACKENDS"; then
24184         SLAPD_NO_STATIC='#'
24185 else
24186         SLAPD_NO_STATIC=
24187 fi
24188
24189
24190
24191
24192
24193
24194
24195
24196   
24197   
24198   
24199   
24200   
24201   
24202   
24203   
24204   
24205   
24206   
24207   
24208   
24209   
24210   
24211   
24212   
24213   
24214   
24215   
24216   
24217   
24218   
24219   
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258 # Check whether --with-xxinstall or --without-xxinstall was given.
24259 if test "${with_xxinstall+set}" = set; then
24260   withval="$with_xxinstall"
24261   :
24262 fi
24263
24264
24265
24266 trap '' 1 2 15
24267
24268 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24269
24270 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24271 # Let make expand exec_prefix.
24272 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24273
24274 # Any assignment to VPATH causes Sun make to only execute
24275 # the first set of double-colon rules, so remove it if not needed.
24276 # If there is a colon in the path, we need to keep it.
24277 if test "x$srcdir" = x.; then
24278   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24279 fi
24280
24281 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24282
24283 DEFS=-DHAVE_CONFIG_H
24284
24285 # Without the "./", some shells look in PATH for config.status.
24286 : ${CONFIG_STATUS=./config.status}
24287
24288 echo creating $CONFIG_STATUS
24289 rm -f $CONFIG_STATUS
24290 cat > $CONFIG_STATUS <<EOF
24291 #! /bin/sh
24292 # Generated automatically by configure.
24293 # Run this file to recreate the current configuration.
24294 # This directory was configured as follows,
24295 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24296 #
24297 # $0 $ac_configure_args
24298 #
24299 # Compiler output produced by configure, useful for debugging
24300 # configure, is in ./config.log if it exists.
24301
24302 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24303 for ac_option
24304 do
24305   case "\$ac_option" in
24306   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24307     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24308     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24309   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24310     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24311     exit 0 ;;
24312   -help | --help | --hel | --he | --h)
24313     echo "\$ac_cs_usage"; exit 0 ;;
24314   *) echo "\$ac_cs_usage"; exit 1 ;;
24315   esac
24316 done
24317
24318 ac_given_srcdir=$srcdir
24319 ac_given_INSTALL="$INSTALL"
24320
24321 trap 'rm -fr `echo "\
24322 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24323 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24324 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24325 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24326 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24327 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24328 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24329 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24330 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24331 include/Makefile:build/top.mk:include/Makefile.in \
24332 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24333 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24334 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24335 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24336 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24337 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24338 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24339 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24340 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24341 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24342 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24343 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24344 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24345 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24346 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24347 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24348 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24349 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24350 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24351 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24352 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24353 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24354 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24355 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24356 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24357 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24358 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24359 tests/run \
24360 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24361  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24362 EOF
24363 cat >> $CONFIG_STATUS <<EOF
24364
24365 # Protect against being on the right side of a sed subst in config.status.
24366 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24367  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24368 $ac_vpsub
24369 $extrasub
24370 s%@SHELL@%$SHELL%g
24371 s%@CFLAGS@%$CFLAGS%g
24372 s%@CPPFLAGS@%$CPPFLAGS%g
24373 s%@CXXFLAGS@%$CXXFLAGS%g
24374 s%@FFLAGS@%$FFLAGS%g
24375 s%@DEFS@%$DEFS%g
24376 s%@LDFLAGS@%$LDFLAGS%g
24377 s%@LIBS@%$LIBS%g
24378 s%@exec_prefix@%$exec_prefix%g
24379 s%@prefix@%$prefix%g
24380 s%@program_transform_name@%$program_transform_name%g
24381 s%@bindir@%$bindir%g
24382 s%@sbindir@%$sbindir%g
24383 s%@libexecdir@%$libexecdir%g
24384 s%@datadir@%$datadir%g
24385 s%@sysconfdir@%$sysconfdir%g
24386 s%@sharedstatedir@%$sharedstatedir%g
24387 s%@localstatedir@%$localstatedir%g
24388 s%@libdir@%$libdir%g
24389 s%@includedir@%$includedir%g
24390 s%@oldincludedir@%$oldincludedir%g
24391 s%@infodir@%$infodir%g
24392 s%@mandir@%$mandir%g
24393 s%@host@%$host%g
24394 s%@host_alias@%$host_alias%g
24395 s%@host_cpu@%$host_cpu%g
24396 s%@host_vendor@%$host_vendor%g
24397 s%@host_os@%$host_os%g
24398 s%@target@%$target%g
24399 s%@target_alias@%$target_alias%g
24400 s%@target_cpu@%$target_cpu%g
24401 s%@target_vendor@%$target_vendor%g
24402 s%@target_os@%$target_os%g
24403 s%@build@%$build%g
24404 s%@build_alias@%$build_alias%g
24405 s%@build_cpu@%$build_cpu%g
24406 s%@build_vendor@%$build_vendor%g
24407 s%@build_os@%$build_os%g
24408 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24409 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24410 s%@INSTALL_DATA@%$INSTALL_DATA%g
24411 s%@PACKAGE@%$PACKAGE%g
24412 s%@VERSION@%$VERSION%g
24413 s%@ACLOCAL@%$ACLOCAL%g
24414 s%@AUTOCONF@%$AUTOCONF%g
24415 s%@AUTOMAKE@%$AUTOMAKE%g
24416 s%@AUTOHEADER@%$AUTOHEADER%g
24417 s%@MAKEINFO@%$MAKEINFO%g
24418 s%@install_sh@%$install_sh%g
24419 s%@AMTAR@%$AMTAR%g
24420 s%@AWK@%$AWK%g
24421 s%@AMTARFLAGS@%$AMTARFLAGS%g
24422 s%@SET_MAKE@%$SET_MAKE%g
24423 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24424 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24425 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24426 s%@top_builddir@%$top_builddir%g
24427 s%@ldap_subdir@%$ldap_subdir%g
24428 s%@CC@%$CC%g
24429 s%@AR@%$AR%g
24430 s%@LN_S@%$LN_S%g
24431 s%@OBJEXT@%$OBJEXT%g
24432 s%@EXEEXT@%$EXEEXT%g
24433 s%@ECHO@%$ECHO%g
24434 s%@RANLIB@%$RANLIB%g
24435 s%@STRIP@%$STRIP%g
24436 s%@DLLTOOL@%$DLLTOOL%g
24437 s%@AS@%$AS%g
24438 s%@OBJDUMP@%$OBJDUMP%g
24439 s%@CPP@%$CPP%g
24440 s%@LIBTOOL@%$LIBTOOL%g
24441 s%@LN_H@%$LN_H%g
24442 s%@PERLBIN@%$PERLBIN%g
24443 s%@OL_MKDEP@%$OL_MKDEP%g
24444 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24445 s%@LTSTATIC@%$LTSTATIC%g
24446 s%@LIBOBJS@%$LIBOBJS%g
24447 s%@LIBSRCS@%$LIBSRCS%g
24448 s%@PLAT@%$PLAT%g
24449 s%@WITH_SASL@%$WITH_SASL%g
24450 s%@WITH_TLS@%$WITH_TLS%g
24451 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24452 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24453 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24454 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24455 s%@BUILD_BDB@%$BUILD_BDB%g
24456 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24457 s%@BUILD_HDB@%$BUILD_HDB%g
24458 s%@BUILD_LDAP@%$BUILD_LDAP%g
24459 s%@BUILD_LDBM@%$BUILD_LDBM%g
24460 s%@BUILD_META@%$BUILD_META%g
24461 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24462 s%@BUILD_NULL@%$BUILD_NULL%g
24463 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24464 s%@BUILD_RELAY@%$BUILD_RELAY%g
24465 s%@BUILD_PERL@%$BUILD_PERL%g
24466 s%@BUILD_SHELL@%$BUILD_SHELL%g
24467 s%@BUILD_SQL@%$BUILD_SQL%g
24468 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24469 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24470 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24471 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24472 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24473 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24474 s%@BUILD_REFINT@%$BUILD_REFINT%g
24475 s%@BUILD_RWM@%$BUILD_RWM%g
24476 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24477 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24478 s%@LDAP_LIBS@%$LDAP_LIBS%g
24479 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24480 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24481 s%@LDBM_LIBS@%$LDBM_LIBS%g
24482 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24483 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24484 s%@WRAP_LIBS@%$WRAP_LIBS%g
24485 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24486 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24487 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24488 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24489 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24490 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24491 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24492 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24493 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24494 s%@KRB4_LIBS@%$KRB4_LIBS%g
24495 s%@KRB5_LIBS@%$KRB5_LIBS%g
24496 s%@SASL_LIBS@%$SASL_LIBS%g
24497 s%@TLS_LIBS@%$TLS_LIBS%g
24498 s%@MODULES_LIBS@%$MODULES_LIBS%g
24499 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24500 s%@LIBSLAPI@%$LIBSLAPI%g
24501 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24502 s%@AUTH_LIBS@%$AUTH_LIBS%g
24503 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24504 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24505 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24506 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24507
24508 CEOF
24509 EOF
24510
24511 cat >> $CONFIG_STATUS <<\EOF
24512
24513 # Split the substitutions into bite-sized pieces for seds with
24514 # small command number limits, like on Digital OSF/1 and HP-UX.
24515 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24516 ac_file=1 # Number of current file.
24517 ac_beg=1 # First line for current file.
24518 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24519 ac_more_lines=:
24520 ac_sed_cmds=""
24521 while $ac_more_lines; do
24522   if test $ac_beg -gt 1; then
24523     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24524   else
24525     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24526   fi
24527   if test ! -s conftest.s$ac_file; then
24528     ac_more_lines=false
24529     rm -f conftest.s$ac_file
24530   else
24531     if test -z "$ac_sed_cmds"; then
24532       ac_sed_cmds="sed -f conftest.s$ac_file"
24533     else
24534       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24535     fi
24536     ac_file=`expr $ac_file + 1`
24537     ac_beg=$ac_end
24538     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24539   fi
24540 done
24541 if test -z "$ac_sed_cmds"; then
24542   ac_sed_cmds=cat
24543 fi
24544 EOF
24545
24546 cat >> $CONFIG_STATUS <<EOF
24547
24548 CONFIG_FILES=\${CONFIG_FILES-"\
24549 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24550 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24551 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24552 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24553 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24554 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24555 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24556 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24557 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24558 include/Makefile:build/top.mk:include/Makefile.in \
24559 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24560 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24561 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24562 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24563 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24564 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24565 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24566 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24567 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24568 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24569 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24570 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24571 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24572 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24573 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24574 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24575 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24576 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24577 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24578 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24579 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24580 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24581 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24582 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24583 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24584 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24585 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24586 tests/run \
24587 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24588 "}
24589 EOF
24590 cat >> $CONFIG_STATUS <<\EOF
24591 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24592   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24593   case "$ac_file" in
24594   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24595        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24596   *) ac_file_in="${ac_file}.in" ;;
24597   esac
24598
24599   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24600
24601   # Remove last slash and all that follows it.  Not all systems have dirname.
24602   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24603   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24604     # The file is in a subdirectory.
24605     test ! -d "$ac_dir" && mkdir "$ac_dir"
24606     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24607     # A "../" for each directory in $ac_dir_suffix.
24608     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24609   else
24610     ac_dir_suffix= ac_dots=
24611   fi
24612
24613   case "$ac_given_srcdir" in
24614   .)  srcdir=.
24615       if test -z "$ac_dots"; then top_srcdir=.
24616       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24617   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24618   *) # Relative path.
24619     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24620     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24621   esac
24622
24623   case "$ac_given_INSTALL" in
24624   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24625   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24626   esac
24627
24628   echo creating "$ac_file"
24629   rm -f "$ac_file"
24630   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24631   case "$ac_file" in
24632   *[Mm]akefile*) ac_comsub="1i\\
24633 # $configure_input" ;;
24634   *) ac_comsub= ;;
24635   esac
24636
24637   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24638   sed -e "$ac_comsub
24639 s%@configure_input@%$configure_input%g
24640 s%@srcdir@%$srcdir%g
24641 s%@top_srcdir@%$top_srcdir%g
24642 s%@INSTALL@%$INSTALL%g
24643 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24644 fi; done
24645 rm -f conftest.s*
24646
24647 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24648 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24649 #
24650 # ac_d sets the value in "#define NAME VALUE" lines.
24651 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24652 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24653 ac_dC='\3'
24654 ac_dD='%g'
24655 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24656 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24657 ac_uB='\([      ]\)%\1#\2define\3'
24658 ac_uC=' '
24659 ac_uD='\4%g'
24660 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24661 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24662 ac_eB='$%\1#\2define\3'
24663 ac_eC=' '
24664 ac_eD='%g'
24665
24666 if test "${CONFIG_HEADERS+set}" != set; then
24667 EOF
24668 cat >> $CONFIG_STATUS <<EOF
24669   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24670 EOF
24671 cat >> $CONFIG_STATUS <<\EOF
24672 fi
24673 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24674   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24675   case "$ac_file" in
24676   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24677        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24678   *) ac_file_in="${ac_file}.in" ;;
24679   esac
24680
24681   echo creating $ac_file
24682
24683   rm -f conftest.frag conftest.in conftest.out
24684   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24685   cat $ac_file_inputs > conftest.in
24686
24687 EOF
24688
24689 # Transform confdefs.h into a sed script conftest.vals that substitutes
24690 # the proper values into config.h.in to produce config.h.  And first:
24691 # Protect against being on the right side of a sed subst in config.status.
24692 # Protect against being in an unquoted here document in config.status.
24693 rm -f conftest.vals
24694 cat > conftest.hdr <<\EOF
24695 s/[\\&%]/\\&/g
24696 s%[\\$`]%\\&%g
24697 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24698 s%ac_d%ac_u%gp
24699 s%ac_u%ac_e%gp
24700 EOF
24701 sed -n -f conftest.hdr confdefs.h > conftest.vals
24702 rm -f conftest.hdr
24703
24704 # This sed command replaces #undef with comments.  This is necessary, for
24705 # example, in the case of _POSIX_SOURCE, which is predefined and required
24706 # on some systems where configure will not decide to define it.
24707 cat >> conftest.vals <<\EOF
24708 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24709 EOF
24710
24711 # Break up conftest.vals because some shells have a limit on
24712 # the size of here documents, and old seds have small limits too.
24713
24714 rm -f conftest.tail
24715 while :
24716 do
24717   ac_lines=`grep -c . conftest.vals`
24718   # grep -c gives empty output for an empty file on some AIX systems.
24719   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24720   # Write a limited-size here document to conftest.frag.
24721   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24722   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24723   echo 'CEOF
24724   sed -f conftest.frag conftest.in > conftest.out
24725   rm -f conftest.in
24726   mv conftest.out conftest.in
24727 ' >> $CONFIG_STATUS
24728   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24729   rm -f conftest.vals
24730   mv conftest.tail conftest.vals
24731 done
24732 rm -f conftest.vals
24733
24734 cat >> $CONFIG_STATUS <<\EOF
24735   rm -f conftest.frag conftest.h
24736   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24737   cat conftest.in >> conftest.h
24738   rm -f conftest.in
24739   if cmp -s $ac_file conftest.h 2>/dev/null; then
24740     echo "$ac_file is unchanged"
24741     rm -f conftest.h
24742   else
24743     # Remove last slash and all that follows it.  Not all systems have dirname.
24744       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24745       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24746       # The file is in a subdirectory.
24747       test ! -d "$ac_dir" && mkdir "$ac_dir"
24748     fi
24749     rm -f $ac_file
24750     mv conftest.h $ac_file
24751   fi
24752 fi; done
24753
24754 EOF
24755 cat >> $CONFIG_STATUS <<EOF
24756
24757 EOF
24758 cat >> $CONFIG_STATUS <<\EOF
24759
24760 chmod +x tests/run
24761 date > stamp-h
24762 echo Please run \"make depend\" to build dependencies
24763
24764 exit 0
24765 EOF
24766 chmod +x $CONFIG_STATUS
24767 rm -fr confdefs* $ac_clean_files
24768 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24769