]> git.sur5r.net Git - openldap/blob - configure
Rework test suite to use run script.
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.489 2003/10/14 03:47:04 kurt Exp  
4
5 # Copyright 1998-2003 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2003 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
34 ac_help="$ac_help
35   --enable-syslog         enable syslog support [auto]"
36 ac_help="$ac_help
37   --enable-proctitle      enable proctitle support [yes]"
38 ac_help="$ac_help
39   --enable-ipv6           enable IPv6 support [auto]"
40 ac_help="$ac_help
41   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
42 ac_help="$ac_help
43   --enable-x-compile      enable cross compiling [no]"
44 ac_help="$ac_help
45   --with-cyrus-sasl       with Cyrus SASL support [auto]"
46 ac_help="$ac_help
47   --with-fetch            with fetch(3) URL support [auto]"
48 ac_help="$ac_help
49   --with-threads          with threads [auto]"
50 ac_help="$ac_help
51   --with-tls              with TLS/SSL support [auto]"
52 ac_help="$ac_help
53   --with-yielding-select  with implicitly yielding select [auto]"
54 ac_help="$ac_help
55
56 SLAPD (Standalone LDAP Daemon) Options:"
57 ac_help="$ac_help
58   --enable-slapd          enable building slapd [yes]"
59 ac_help="$ac_help
60     --enable-aci          enable per-object ACIs (experimental) [no]"
61 ac_help="$ac_help
62     --enable-cleartext    enable cleartext passwords [yes]"
63 ac_help="$ac_help
64     --enable-crypt        enable crypt(3) passwords [no]"
65 ac_help="$ac_help
66     --enable-lmpasswd     enable LAN Manager passwords [no]"
67 ac_help="$ac_help
68     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
69 ac_help="$ac_help
70     --enable-modules      enable dynamic module support [no]"
71 ac_help="$ac_help
72     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
73 ac_help="$ac_help
74     --enable-rlookups     enable reverse lookups of client hostnames [no]"
75 ac_help="$ac_help
76     --enable-slapi        enable SLAPI support (experimental) [no]"
77 ac_help="$ac_help
78     --enable-slp          enable SLPv2 support [no]"
79 ac_help="$ac_help
80     --enable-wrappers     enable tcp wrapper support [no]"
81 ac_help="$ac_help
82     --enable-bdb          enable Berkeley DB backend [yes]"
83 ac_help="$ac_help
84     --with-bdb-module     module type static|dynamic [static]"
85 ac_help="$ac_help
86     --enable-dnssrv       enable dnssrv backend [no]"
87 ac_help="$ac_help
88     --with-dnssrv-module  module type static|dynamic [static]"
89 ac_help="$ac_help
90     --enable-hdb          enable Hierarchical DB backend [no]"
91 ac_help="$ac_help
92     --with-hdb-module     module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-ldap         enable ldap backend [no]"
95 ac_help="$ac_help
96     --with-ldap-module    module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend [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-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
105 ac_help="$ac_help
106     --enable-meta         enable metadirectory backend [no]"
107 ac_help="$ac_help
108     --with-meta-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --enable-monitor      enable monitor backend [yes]"
111 ac_help="$ac_help
112     --with-monitor-module module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-null         enable null backend [no]"
115 ac_help="$ac_help
116     --with-null-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-passwd       enable passwd backend [no]"
119 ac_help="$ac_help
120     --with-passwd-module  module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-perl         enable perl backend [no]"
123 ac_help="$ac_help
124     --with-perl-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-shell        enable shell backend [no]"
127 ac_help="$ac_help
128     --with-shell-module   module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-sql          enable sql backend [no]"
131 ac_help="$ac_help
132     --with-sql-module     module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-tcl          enable tcl backend [no]"
135 ac_help="$ac_help
136     --with-tcl-module     module type static|dynamic [static]"
137 ac_help="$ac_help
138
139 SLURPD (Replication Daemon) Options:"
140 ac_help="$ac_help
141   --enable-slurpd         enable building slurpd [auto]"
142 ac_help="$ac_help
143
144 Library Generation & Linking Options"
145 ac_help="$ac_help
146   --enable-static[=PKGS]  build static libraries [default=yes]"
147 ac_help="$ac_help
148   --enable-shared[=PKGS]  build shared libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
151 ac_help="$ac_help
152   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
153
154 # Find the correct PATH separator.  Usually this is `:', but
155 # DJGPP uses `;' like DOS.
156 if test "X${PATH_SEPARATOR+set}" != Xset; then
157   UNAME=${UNAME-`uname 2>/dev/null`}
158   case X$UNAME in
159     *-DOS) lt_cv_sys_path_separator=';' ;;
160     *)     lt_cv_sys_path_separator=':' ;;
161   esac
162   PATH_SEPARATOR=$lt_cv_sys_path_separator
163 fi
164
165
166 # Check that we are running under the correct shell.
167 SHELL=${CONFIG_SHELL-/bin/sh}
168
169 case X$ECHO in
170 X*--fallback-echo)
171   # Remove one level of quotation (which was required for Make).
172   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
173   ;;
174 esac
175
176 echo=${ECHO-echo}
177 if test "X$1" = X--no-reexec; then
178   # Discard the --no-reexec flag, and continue.
179   shift
180 elif test "X$1" = X--fallback-echo; then
181   # Avoid inline document here, it may be left over
182   :
183 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
184   # Yippee, $echo works!
185   :
186 else
187   # Restart under the correct shell.
188   exec $SHELL "$0" --no-reexec ${1+"$@"}
189 fi
190
191 if test "X$1" = X--fallback-echo; then
192   # used as fallback echo
193   shift
194   cat <<EOF
195
196 EOF
197   exit 0
198 fi
199
200 # The HP-UX ksh and POSIX shell print the target directory to stdout
201 # if CDPATH is set.
202 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
203
204 if test -z "$ECHO"; then
205 if test "X${echo_test_string+set}" != Xset; then
206 # find a string as large as possible, as long as the shell can cope with it
207   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
208     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
209     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
210        echo_test_string="`eval $cmd`" &&
211        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
212     then
213       break
214     fi
215   done
216 fi
217
218 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
219    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
220    test "X$echo_testing_string" = "X$echo_test_string"; then
221   :
222 else
223   # The Solaris, AIX, and Digital Unix default echo programs unquote
224   # backslashes.  This makes it impossible to quote backslashes using
225   #   echo "$something" | sed 's/\\/\\\\/g'
226   #
227   # So, first we look for a working echo in the user's PATH.
228
229   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
230   for dir in $PATH /usr/ucb; do
231     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
232        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
233        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
234        test "X$echo_testing_string" = "X$echo_test_string"; then
235       echo="$dir/echo"
236       break
237     fi
238   done
239   IFS="$save_ifs"
240
241   if test "X$echo" = Xecho; then
242     # We didn't find a better echo, so look for alternatives.
243     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
244        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
245        test "X$echo_testing_string" = "X$echo_test_string"; then
246       # This shell has a builtin print -r that does the trick.
247       echo='print -r'
248     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
249          test "X$CONFIG_SHELL" != X/bin/ksh; then
250       # If we have ksh, try running configure again with it.
251       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
252       export ORIGINAL_CONFIG_SHELL
253       CONFIG_SHELL=/bin/ksh
254       export CONFIG_SHELL
255       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
256     else
257       # Try using printf.
258       echo='printf %s\n'
259       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
260          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
261          test "X$echo_testing_string" = "X$echo_test_string"; then
262         # Cool, printf works
263         :
264       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
265            test "X$echo_testing_string" = 'X\t' &&
266            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
267            test "X$echo_testing_string" = "X$echo_test_string"; then
268         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
269         export CONFIG_SHELL
270         SHELL="$CONFIG_SHELL"
271         export SHELL
272         echo="$CONFIG_SHELL $0 --fallback-echo"
273       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
274            test "X$echo_testing_string" = 'X\t' &&
275            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
276            test "X$echo_testing_string" = "X$echo_test_string"; then
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       else
279         # maybe with a smaller string...
280         prev=:
281
282         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
283           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
284           then
285             break
286           fi
287           prev="$cmd"
288         done
289
290         if test "$prev" != 'sed 50q "$0"'; then
291           echo_test_string=`eval $prev`
292           export echo_test_string
293           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
294         else
295           # Oops.  We lost completely, so just stick with echo.
296           echo=echo
297         fi
298       fi
299     fi
300   fi
301 fi
302 fi
303
304 # Copy echo and quote the copy suitably for passing to libtool from
305 # the Makefile, instead of quoting the original, which is used later.
306 ECHO=$echo
307 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
308    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
309 fi
310
311
312 ac_help="$ac_help
313   --disable-libtool-lock  avoid locking (might break parallel builds)"
314 ac_help="$ac_help
315   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
316 ac_help="$ac_help
317
318 See INSTALL file for further details."
319
320 # Initialize some variables set by options.
321 # The variables have the same names as the options, with
322 # dashes changed to underlines.
323 build=NONE
324 cache_file=./config.cache
325 exec_prefix=NONE
326 host=NONE
327 no_create=
328 nonopt=NONE
329 no_recursion=
330 prefix=NONE
331 program_prefix=NONE
332 program_suffix=NONE
333 program_transform_name=s,x,x,
334 silent=
335 site=
336 srcdir=
337 target=NONE
338 verbose=
339 x_includes=NONE
340 x_libraries=NONE
341 bindir='${exec_prefix}/bin'
342 sbindir='${exec_prefix}/sbin'
343 libexecdir='${exec_prefix}/libexec'
344 datadir='${prefix}/share'
345 sysconfdir='${prefix}/etc'
346 sharedstatedir='${prefix}/com'
347 localstatedir='${prefix}/var'
348 libdir='${exec_prefix}/lib'
349 includedir='${prefix}/include'
350 oldincludedir='/usr/include'
351 infodir='${prefix}/info'
352 mandir='${prefix}/man'
353
354 # Initialize some other variables.
355 subdirs=
356 MFLAGS= MAKEFLAGS=
357 SHELL=${CONFIG_SHELL-/bin/sh}
358 # Maximum number of lines to put in a shell here document.
359 ac_max_here_lines=12
360
361 ac_prev=
362 for ac_option
363 do
364
365   # If the previous option needs an argument, assign it.
366   if test -n "$ac_prev"; then
367     eval "$ac_prev=\$ac_option"
368     ac_prev=
369     continue
370   fi
371
372   case "$ac_option" in
373   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
374   *) ac_optarg= ;;
375   esac
376
377   # Accept the important Cygnus configure options, so we can diagnose typos.
378
379   case "$ac_option" in
380
381   -bindir | --bindir | --bindi | --bind | --bin | --bi)
382     ac_prev=bindir ;;
383   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
384     bindir="$ac_optarg" ;;
385
386   -build | --build | --buil | --bui | --bu)
387     ac_prev=build ;;
388   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
389     build="$ac_optarg" ;;
390
391   -cache-file | --cache-file | --cache-fil | --cache-fi \
392   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
393     ac_prev=cache_file ;;
394   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
395   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
396     cache_file="$ac_optarg" ;;
397
398   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
399     ac_prev=datadir ;;
400   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
401   | --da=*)
402     datadir="$ac_optarg" ;;
403
404   -disable-* | --disable-*)
405     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
406     # Reject names that are not valid shell variable names.
407     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
408       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
409     fi
410     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
411     eval "enable_${ac_feature}=no" ;;
412
413   -enable-* | --enable-*)
414     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
415     # Reject names that are not valid shell variable names.
416     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
417       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
418     fi
419     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
420     case "$ac_option" in
421       *=*) ;;
422       *) ac_optarg=yes ;;
423     esac
424     eval "enable_${ac_feature}='$ac_optarg'" ;;
425
426   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
427   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
428   | --exec | --exe | --ex)
429     ac_prev=exec_prefix ;;
430   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
431   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
432   | --exec=* | --exe=* | --ex=*)
433     exec_prefix="$ac_optarg" ;;
434
435   -gas | --gas | --ga | --g)
436     # Obsolete; use --with-gas.
437     with_gas=yes ;;
438
439   -help | --help | --hel | --he)
440     # Omit some internal or obsolete options to make the list less imposing.
441     # This message is too long to be a string in the A/UX 3.1 sh.
442     cat << EOF
443 Usage: configure [options] [host]
444 Options: [defaults in brackets after descriptions]
445 Configuration:
446   --cache-file=FILE       cache test results in FILE
447   --help                  print this message
448   --no-create             do not create output files
449   --quiet, --silent       do not print \`checking...' messages
450   --version               print the version of autoconf that created configure
451 Directory and file names:
452   --prefix=PREFIX         install architecture-independent files in PREFIX
453                           [$ac_default_prefix]
454   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
455                           [same as prefix]
456   --bindir=DIR            user executables in DIR [EPREFIX/bin]
457   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
458   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
459   --datadir=DIR           read-only architecture-independent data in DIR
460                           [PREFIX/share]
461   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
462   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
463                           [PREFIX/com]
464   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
465   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
466   --includedir=DIR        C header files in DIR [PREFIX/include]
467   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
468   --infodir=DIR           info documentation in DIR [PREFIX/info]
469   --mandir=DIR            man documentation in DIR [PREFIX/man]
470   --srcdir=DIR            find the sources in DIR [configure dir or ..]
471   --program-prefix=PREFIX prepend PREFIX to installed program names
472   --program-suffix=SUFFIX append SUFFIX to installed program names
473   --program-transform-name=PROGRAM
474                           run sed PROGRAM on installed program names
475 EOF
476     cat << EOF
477 Host type:
478   --build=BUILD           configure for building on BUILD [BUILD=HOST]
479   --host=HOST             configure for HOST [guessed]
480   --target=TARGET         configure for TARGET [TARGET=HOST]
481 Features and packages:
482   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
483   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
484   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
485   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
486   --x-includes=DIR        X include files are in DIR
487   --x-libraries=DIR       X library files are in DIR
488 EOF
489     if test -n "$ac_help"; then
490       echo "--enable and --with options recognized:$ac_help"
491     fi
492     exit 0 ;;
493
494   -host | --host | --hos | --ho)
495     ac_prev=host ;;
496   -host=* | --host=* | --hos=* | --ho=*)
497     host="$ac_optarg" ;;
498
499   -includedir | --includedir | --includedi | --included | --include \
500   | --includ | --inclu | --incl | --inc)
501     ac_prev=includedir ;;
502   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
503   | --includ=* | --inclu=* | --incl=* | --inc=*)
504     includedir="$ac_optarg" ;;
505
506   -infodir | --infodir | --infodi | --infod | --info | --inf)
507     ac_prev=infodir ;;
508   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
509     infodir="$ac_optarg" ;;
510
511   -libdir | --libdir | --libdi | --libd)
512     ac_prev=libdir ;;
513   -libdir=* | --libdir=* | --libdi=* | --libd=*)
514     libdir="$ac_optarg" ;;
515
516   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
517   | --libexe | --libex | --libe)
518     ac_prev=libexecdir ;;
519   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
520   | --libexe=* | --libex=* | --libe=*)
521     libexecdir="$ac_optarg" ;;
522
523   -localstatedir | --localstatedir | --localstatedi | --localstated \
524   | --localstate | --localstat | --localsta | --localst \
525   | --locals | --local | --loca | --loc | --lo)
526     ac_prev=localstatedir ;;
527   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
528   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
529   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
530     localstatedir="$ac_optarg" ;;
531
532   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
533     ac_prev=mandir ;;
534   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
535     mandir="$ac_optarg" ;;
536
537   -nfp | --nfp | --nf)
538     # Obsolete; use --without-fp.
539     with_fp=no ;;
540
541   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
542   | --no-cr | --no-c)
543     no_create=yes ;;
544
545   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
546   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
547     no_recursion=yes ;;
548
549   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
550   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
551   | --oldin | --oldi | --old | --ol | --o)
552     ac_prev=oldincludedir ;;
553   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
554   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
555   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
556     oldincludedir="$ac_optarg" ;;
557
558   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
559     ac_prev=prefix ;;
560   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
561     prefix="$ac_optarg" ;;
562
563   -program-prefix | --program-prefix | --program-prefi | --program-pref \
564   | --program-pre | --program-pr | --program-p)
565     ac_prev=program_prefix ;;
566   -program-prefix=* | --program-prefix=* | --program-prefi=* \
567   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
568     program_prefix="$ac_optarg" ;;
569
570   -program-suffix | --program-suffix | --program-suffi | --program-suff \
571   | --program-suf | --program-su | --program-s)
572     ac_prev=program_suffix ;;
573   -program-suffix=* | --program-suffix=* | --program-suffi=* \
574   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
575     program_suffix="$ac_optarg" ;;
576
577   -program-transform-name | --program-transform-name \
578   | --program-transform-nam | --program-transform-na \
579   | --program-transform-n | --program-transform- \
580   | --program-transform | --program-transfor \
581   | --program-transfo | --program-transf \
582   | --program-trans | --program-tran \
583   | --progr-tra | --program-tr | --program-t)
584     ac_prev=program_transform_name ;;
585   -program-transform-name=* | --program-transform-name=* \
586   | --program-transform-nam=* | --program-transform-na=* \
587   | --program-transform-n=* | --program-transform-=* \
588   | --program-transform=* | --program-transfor=* \
589   | --program-transfo=* | --program-transf=* \
590   | --program-trans=* | --program-tran=* \
591   | --progr-tra=* | --program-tr=* | --program-t=*)
592     program_transform_name="$ac_optarg" ;;
593
594   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
595   | -silent | --silent | --silen | --sile | --sil)
596     silent=yes ;;
597
598   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
599     ac_prev=sbindir ;;
600   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
601   | --sbi=* | --sb=*)
602     sbindir="$ac_optarg" ;;
603
604   -sharedstatedir | --sharedstatedir | --sharedstatedi \
605   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
606   | --sharedst | --shareds | --shared | --share | --shar \
607   | --sha | --sh)
608     ac_prev=sharedstatedir ;;
609   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
610   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
611   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
612   | --sha=* | --sh=*)
613     sharedstatedir="$ac_optarg" ;;
614
615   -site | --site | --sit)
616     ac_prev=site ;;
617   -site=* | --site=* | --sit=*)
618     site="$ac_optarg" ;;
619
620   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
621     ac_prev=srcdir ;;
622   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
623     srcdir="$ac_optarg" ;;
624
625   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
626   | --syscon | --sysco | --sysc | --sys | --sy)
627     ac_prev=sysconfdir ;;
628   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
629   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
630     sysconfdir="$ac_optarg" ;;
631
632   -target | --target | --targe | --targ | --tar | --ta | --t)
633     ac_prev=target ;;
634   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
635     target="$ac_optarg" ;;
636
637   -v | -verbose | --verbose | --verbos | --verbo | --verb)
638     verbose=yes ;;
639
640   -version | --version | --versio | --versi | --vers)
641     echo "configure generated by autoconf version 2.13.1"
642     exit 0 ;;
643
644   -with-* | --with-*)
645     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
646     # Reject names that are not valid shell variable names.
647     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
648       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
649     fi
650     ac_package=`echo $ac_package| sed 's/-/_/g'`
651     case "$ac_option" in
652       *=*) ;;
653       *) ac_optarg=yes ;;
654     esac
655     eval "with_${ac_package}='$ac_optarg'" ;;
656
657   -without-* | --without-*)
658     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
659     # Reject names that are not valid shell variable names.
660     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
661       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
662     fi
663     ac_package=`echo $ac_package| sed 's/-/_/g'`
664     eval "with_${ac_package}=no" ;;
665
666   --x)
667     # Obsolete; use --with-x.
668     with_x=yes ;;
669
670   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
671   | --x-incl | --x-inc | --x-in | --x-i)
672     ac_prev=x_includes ;;
673   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
674   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
675     x_includes="$ac_optarg" ;;
676
677   -x-libraries | --x-libraries | --x-librarie | --x-librari \
678   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
679     ac_prev=x_libraries ;;
680   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
681   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
682     x_libraries="$ac_optarg" ;;
683
684   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
685     ;;
686
687   *)
688     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
689       echo "configure: warning: $ac_option: invalid host type" 1>&2
690     fi
691     if test "x$nonopt" != xNONE; then
692       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
693     fi
694     nonopt="$ac_option"
695     ;;
696
697   esac
698 done
699
700 if test -n "$ac_prev"; then
701   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
702 fi
703
704 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
705
706 # File descriptor usage:
707 # 0 standard input
708 # 1 file creation
709 # 2 errors and warnings
710 # 3 some systems may open it to /dev/tty
711 # 4 used on the Kubota Titan
712 # 6 checking for... messages and results
713 # 5 compiler messages saved in config.log
714 if test "$silent" = yes; then
715   exec 6>/dev/null
716 else
717   exec 6>&1
718 fi
719 exec 5>./config.log
720
721 echo "\
722 This file contains any messages produced by compilers while
723 running configure, to aid debugging if configure makes a mistake.
724 " 1>&5
725
726 # Strip out --no-create and --no-recursion so they do not pile up.
727 # Also quote any args containing shell metacharacters.
728 ac_configure_args=
729 for ac_arg
730 do
731   case "$ac_arg" in
732   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
733   | --no-cr | --no-c) ;;
734   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
735   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
736   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
737   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
738   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
739   esac
740 done
741
742 # NLS nuisances.
743 # Only set these to C if already set.  These must not be set unconditionally
744 # because not all systems understand e.g. LANG=C (notably SCO).
745 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
746 # Non-C LC_CTYPE values break the ctype check.
747 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
748 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
749 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
750 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
751
752 # confdefs.h avoids OS command line length limits that DEFS can exceed.
753 rm -rf conftest* confdefs.h
754 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
755 echo > confdefs.h
756
757 # A filename unique to this package, relative to the directory that
758 # configure is in, which we can look for to find out if srcdir is correct.
759 ac_unique_file=build/version.sh
760
761 # Find the source files, if location was not specified.
762 if test -z "$srcdir"; then
763   ac_srcdir_defaulted=yes
764   # Try the directory containing this script, then its parent.
765   ac_prog=$0
766   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
767   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
768   srcdir=$ac_confdir
769   if test ! -r $srcdir/$ac_unique_file; then
770     srcdir=..
771   fi
772 else
773   ac_srcdir_defaulted=no
774 fi
775 if test ! -r $srcdir/$ac_unique_file; then
776   if test "$ac_srcdir_defaulted" = yes; then
777     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
778   else
779     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
780   fi
781 fi
782 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
783
784 # Prefer explicitly selected file to automatically selected ones.
785 if test -z "$CONFIG_SITE"; then
786   if test "x$prefix" != xNONE; then
787     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
788   else
789     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
790   fi
791 fi
792 for ac_site_file in $CONFIG_SITE; do
793   if test -r "$ac_site_file"; then
794     echo "loading site script $ac_site_file"
795     . "$ac_site_file"
796   fi
797 done
798
799
800 ac_ext=c
801 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802 ac_cpp='$CPP $CPPFLAGS'
803 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805 cross_compiling=$ac_cv_prog_cc_cross
806
807 ac_exeext=
808 ac_objext=o
809 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
810   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
811   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
812     ac_n= ac_c='
813 ' ac_t='        '
814   else
815     ac_n=-n ac_c= ac_t=
816   fi
817 else
818   ac_n= ac_c='\c' ac_t=
819 fi
820
821
822 # set unset (borrowed from autoconf 2.49c)
823 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
824   ol_unset=unset
825 else
826   ol_unset=false
827 fi
828 # unset CDPATH
829 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
830
831 ac_aux_dir=
832 for ac_dir in build $srcdir/build; do
833   if test -f $ac_dir/install-sh; then
834     ac_aux_dir=$ac_dir
835     ac_install_sh="$ac_aux_dir/install-sh -c"
836     break
837   elif test -f $ac_dir/install.sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install.sh -c"
840     break
841   elif test -f $ac_dir/shtool; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/shtool install -c"
844     break
845   fi
846 done
847 if test -z "$ac_aux_dir"; then
848   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
849 fi
850 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
851 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
852 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
853
854 eval `$ac_aux_dir/version.sh`
855 if test -z "$OL_STRING"; then
856         { echo "configure: error: could not determine version" 1>&2; exit 1; }
857 fi
858
859 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
860         ac_cv_shtool="$ac_aux_dir/shtool"
861 else
862         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
863 fi
864
865 SHTOOL="$ac_cv_shtool"
866
867 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
868 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
869
870 OPENLDAP_CVS=""
871 if test -d $ac_aux_dir/CVS; then
872         OPENLDAP_CVS="(from CVS sources) "
873 fi
874
875 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
876
877
878 echo $ac_n "checking host system type""... $ac_c" 1>&6
879 echo "configure:880: checking host system type" >&5
880 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
881
882 # Make sure we can run config.sub.
883   if $ac_config_sub sun4 >/dev/null 2>&1; then :
884     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
885   fi
886
887   ac_cv_host_alias=$host
888   case "$ac_cv_host_alias" in
889   NONE)
890     case $nonopt in
891     NONE)
892       if ac_cv_host_alias=`$ac_config_guess`; then :
893       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
894       fi ;;
895     *) ac_cv_host_alias=$nonopt ;;
896     esac ;;
897   esac
898
899   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
900   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
901   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
902   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
903 else
904   echo $ac_n "(cached) $ac_c" 1>&6
905 fi
906
907 echo "$ac_t""$ac_cv_host" 1>&6
908
909 host=$ac_cv_host
910 host_alias=$ac_cv_host_alias
911 host_cpu=$ac_cv_host_cpu
912 host_vendor=$ac_cv_host_vendor
913 host_os=$ac_cv_host_os
914
915
916
917
918
919 echo $ac_n "checking target system type""... $ac_c" 1>&6
920 echo "configure:921: checking target system type" >&5
921 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
922
923 # Make sure we can run config.sub.
924   if $ac_config_sub sun4 >/dev/null 2>&1; then :
925     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
926   fi
927
928   ac_cv_target_alias=$target
929   case "$ac_cv_target_alias" in
930   NONE)
931     case $nonopt in
932     NONE)
933       ac_cv_target_alias=$host_alias ;;
934
935     *) ac_cv_target_alias=$nonopt ;;
936     esac ;;
937   esac
938
939   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
940   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
941   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
942   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
943 else
944   echo $ac_n "(cached) $ac_c" 1>&6
945 fi
946
947 echo "$ac_t""$ac_cv_target" 1>&6
948
949 target=$ac_cv_target
950 target_alias=$ac_cv_target_alias
951 target_cpu=$ac_cv_target_cpu
952 target_vendor=$ac_cv_target_vendor
953 target_os=$ac_cv_target_os
954
955
956
957
958
959 echo $ac_n "checking build system type""... $ac_c" 1>&6
960 echo "configure:961: checking build system type" >&5
961 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
962
963 # Make sure we can run config.sub.
964   if $ac_config_sub sun4 >/dev/null 2>&1; then :
965     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
966   fi
967
968   ac_cv_build_alias=$build
969   case "$ac_cv_build_alias" in
970   NONE)
971     case $nonopt in
972     NONE)
973       ac_cv_build_alias=$host_alias ;;
974
975     *) ac_cv_build_alias=$nonopt ;;
976     esac ;;
977   esac
978
979   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
980   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
981   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
982   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
983 else
984   echo $ac_n "(cached) $ac_c" 1>&6
985 fi
986
987 echo "$ac_t""$ac_cv_build" 1>&6
988
989 build=$ac_cv_build
990 build_alias=$ac_cv_build_alias
991 build_cpu=$ac_cv_build_cpu
992 build_vendor=$ac_cv_build_vendor
993 build_os=$ac_cv_build_os
994
995
996
997
998
999 # Do some error checking and defaulting for the host and target type.
1000 # The inputs are:
1001 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1002 #
1003 # The rules are:
1004 # 1. You are not allowed to specify --host, --target, and nonopt at the
1005 #    same time.
1006 # 2. Host defaults to nonopt.
1007 # 3. If nonopt is not specified, then host defaults to the current host,
1008 #    as determined by config.guess.
1009 # 4. Target and build default to nonopt.
1010 # 5. If nonopt is not specified, then target and build default to host.
1011
1012 # The aliases save the names the user supplied, while $host etc.
1013 # will get canonicalized.
1014 case $host---$target---$nonopt in
1015 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1016 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1017 esac
1018
1019 test "$host_alias" != "$target_alias" &&
1020   test "$program_prefix$program_suffix$program_transform_name" = \
1021     NONENONEs,x,x, &&
1022   program_prefix=${target_alias}-
1023
1024
1025 # Find a good install program.  We prefer a C program (faster),
1026 # so one script is as good as another.  But avoid the broken or
1027 # incompatible versions:
1028 # SysV /etc/install, /usr/sbin/install
1029 # SunOS /usr/etc/install
1030 # IRIX /sbin/install
1031 # AIX /bin/install
1032 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1033 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1034 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1035 # ./install, which can be erroneously created by make from ./install.sh.
1036 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1037 echo "configure:1038: checking for a BSD compatible install" >&5
1038 if test -z "$INSTALL"; then
1039 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1040   echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1043   for ac_dir in $PATH; do
1044     # Account for people who put trailing slashes in PATH elements.
1045     case "$ac_dir/" in
1046     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1047     *)
1048       # OSF1 and SCO ODT 3.0 have their own names for install.
1049       # Don't use installbsd from OSF since it installs stuff as root
1050       # by default.
1051       for ac_prog in ginstall scoinst install; do
1052         if test -f $ac_dir/$ac_prog; then
1053           if test $ac_prog = install &&
1054             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1055             # AIX install.  It has an incompatible calling convention.
1056             :
1057           elif test $ac_prog = install &&
1058             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # program-specific install script used by HP pwplus--don't use.
1060             :
1061           else
1062             ac_cv_path_install="$ac_dir/$ac_prog -c"
1063             break 2
1064           fi
1065         fi
1066       done
1067       ;;
1068     esac
1069   done
1070   IFS="$ac_save_IFS"
1071
1072 fi
1073   if test "${ac_cv_path_install+set}" = set; then
1074     INSTALL="$ac_cv_path_install"
1075   else
1076     # As a last resort, use the slow shell script.  We don't cache a
1077     # path for INSTALL within a source directory, because that will
1078     # break other packages using the cache if that directory is
1079     # removed, or if the path is relative.
1080     INSTALL="$ac_install_sh"
1081   fi
1082 fi
1083 echo "$ac_t""$INSTALL" 1>&6
1084
1085 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1086 # It thinks the first close brace ends the variable substitution.
1087 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1088
1089 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1090
1091 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1092
1093 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether build environment is sane" >&5
1095 # Just in case
1096 sleep 1
1097 echo timestamp > conftestfile
1098 # Do `set' in a subshell so we don't clobber the current shell's
1099 # arguments.  Must try -L first in case configure is actually a
1100 # symlink; some systems play weird games with the mod time of symlinks
1101 # (eg FreeBSD returns the mod time of the symlink's containing
1102 # directory).
1103 if (
1104    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1105    if test "$*" = "X"; then
1106       # -L didn't work.
1107       set X `ls -t $srcdir/configure conftestfile`
1108    fi
1109    if test "$*" != "X $srcdir/configure conftestfile" \
1110       && test "$*" != "X conftestfile $srcdir/configure"; then
1111
1112       # If neither matched, then we have a broken ls.  This can happen
1113       # if, for instance, CONFIG_SHELL is bash and it inherits a
1114       # broken ls alias from the environment.  This has actually
1115       # happened.  Such a system could not be considered "sane".
1116       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1117 alias in your environment" 1>&2; exit 1; }
1118    fi
1119
1120    test "$2" = conftestfile
1121    )
1122 then
1123    # Ok.
1124    :
1125 else
1126    { echo "configure: error: newly created file is older than distributed files!
1127 Check your system clock" 1>&2; exit 1; }
1128 fi
1129 rm -f conftest*
1130 echo "$ac_t""yes" 1>&6
1131 if test "$program_transform_name" = s,x,x,; then
1132   program_transform_name=
1133 else
1134   # Double any \ or $.  echo might interpret backslashes.
1135   cat <<\EOF_SED > conftestsed
1136 s,\\,\\\\,g; s,\$,$$,g
1137 EOF_SED
1138   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1139   rm -f conftestsed
1140 fi
1141 test "$program_prefix" != NONE &&
1142   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1143 # Use a double $ so make ignores it.
1144 test "$program_suffix" != NONE &&
1145   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1146
1147 # sed with no file args requires a program.
1148 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1149
1150 for ac_prog in mawk gawk nawk awk
1151 do
1152 # Extract the first word of "$ac_prog", so it can be a program name with args.
1153 set dummy $ac_prog; ac_word=$2
1154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1155 echo "configure:1156: checking for $ac_word" >&5
1156 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   if test -n "$AWK"; then
1160   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1161 else
1162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1163   ac_dummy="$PATH"
1164   for ac_dir in $ac_dummy; do
1165     test -z "$ac_dir" && ac_dir=.
1166     if test -f $ac_dir/$ac_word; then
1167       ac_cv_prog_AWK="$ac_prog"
1168       break
1169     fi
1170   done
1171   IFS="$ac_save_ifs"
1172 fi
1173 fi
1174 AWK="$ac_cv_prog_AWK"
1175 if test -n "$AWK"; then
1176   echo "$ac_t""$AWK" 1>&6
1177 else
1178   echo "$ac_t""no" 1>&6
1179 fi
1180
1181 test -n "$AWK" && break
1182 done
1183
1184 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1185 echo "configure:1186: checking whether ${MAKE-make} sets \${MAKE}" >&5
1186 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1187 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1188   echo $ac_n "(cached) $ac_c" 1>&6
1189 else
1190   cat > conftestmake <<\EOF
1191 all:
1192         @echo 'ac_maketemp="${MAKE}"'
1193 EOF
1194 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1195 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1196 if test -n "$ac_maketemp"; then
1197   eval ac_cv_prog_make_${ac_make}_set=yes
1198 else
1199   eval ac_cv_prog_make_${ac_make}_set=no
1200 fi
1201 rm -f conftestmake
1202 fi
1203 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1204   echo "$ac_t""yes" 1>&6
1205   SET_MAKE=
1206 else
1207   echo "$ac_t""no" 1>&6
1208   SET_MAKE="MAKE=${MAKE-make}"
1209 fi
1210
1211
1212
1213 PACKAGE=$OL_PACKAGE
1214
1215 VERSION=$OL_VERSION
1216
1217 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1218   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1219 fi
1220
1221
1222
1223 missing_dir=`cd $ac_aux_dir && pwd`
1224 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1225 echo "configure:1226: checking for working aclocal" >&5
1226 # Run test in a subshell; some versions of sh will print an error if
1227 # an executable is not found, even if stderr is redirected.
1228 # Redirect stdin to placate older versions of autoconf.  Sigh.
1229 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1230    ACLOCAL=aclocal
1231    echo "$ac_t""found" 1>&6
1232 else
1233    ACLOCAL="$missing_dir/missing aclocal"
1234    echo "$ac_t""missing" 1>&6
1235 fi
1236
1237 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working autoconf" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1243    AUTOCONF=autoconf
1244    echo "$ac_t""found" 1>&6
1245 else
1246    AUTOCONF="$missing_dir/missing autoconf"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working automake" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (automake --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOMAKE=automake
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOMAKE="$missing_dir/missing automake"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working autoheader" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOHEADER=autoheader
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOHEADER="$missing_dir/missing autoheader"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working makeinfo" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1282    MAKEINFO=makeinfo
1283    echo "$ac_t""found" 1>&6
1284 else
1285    MAKEINFO="$missing_dir/missing makeinfo"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 install_sh="$missing_dir/install-sh"
1290 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1291
1292 for ac_prog in gnutar gtar tar
1293 do
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1297 echo "configure:1298: checking for $ac_word" >&5
1298 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   if test -n "$AMTAR"; then
1302   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1303 else
1304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1305   ac_dummy="$PATH"
1306   for ac_dir in $ac_dummy; do
1307     test -z "$ac_dir" && ac_dir=.
1308     if test -f $ac_dir/$ac_word; then
1309       ac_cv_prog_AMTAR="$ac_prog"
1310       break
1311     fi
1312   done
1313   IFS="$ac_save_ifs"
1314 fi
1315 fi
1316 AMTAR="$ac_cv_prog_AMTAR"
1317 if test -n "$AMTAR"; then
1318   echo "$ac_t""$AMTAR" 1>&6
1319 else
1320   echo "$ac_t""no" 1>&6
1321 fi
1322
1323 test -n "$AMTAR" && break
1324 done
1325
1326
1327 AMTARFLAGS=
1328 if test -n "$AMTAR"; then
1329   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1330         AMTARFLAGS=o
1331   fi
1332 fi
1333
1334 cat >> confdefs.h <<EOF
1335 #define OPENLDAP_PACKAGE "$PACKAGE"
1336 EOF
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_VERSION "$VERSION"
1340 EOF
1341
1342
1343 cat >> confdefs.h <<EOF
1344 #define LDAP_VENDOR_VERSION $OL_API_INC
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1357 EOF
1358
1359
1360 OPENLDAP_LIBVERSION=$OL_API_LIB
1361
1362 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1363
1364
1365
1366 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1367 echo "configure:1368: checking configure arguments" >&5
1368
1369
1370 top_builddir=`pwd`
1371
1372 ldap_subdir="/openldap"
1373
1374 # Check whether --with-subdir or --without-subdir was given.
1375 if test "${with_subdir+set}" = set; then
1376   withval="$with_subdir"
1377   case "$withval" in
1378         no) ldap_subdir=""
1379                 ;;
1380         yes)
1381                 ;;
1382         /*|\\*)
1383                 ldap_subdir="$withval"
1384                 ;;
1385         *)
1386                 ldap_subdir="/$withval"
1387                 ;;
1388 esac
1389
1390 fi
1391
1392
1393 # OpenLDAP --enable-debug
1394         # Check whether --enable-debug or --disable-debug was given.
1395 if test "${enable_debug+set}" = set; then
1396   enableval="$enable_debug"
1397   
1398         ol_arg=invalid
1399         for ol_val in auto yes no ; do
1400                 if test "$enableval" = "$ol_val" ; then
1401                         ol_arg="$ol_val"
1402                 fi
1403         done
1404         if test "$ol_arg" = "invalid" ; then
1405                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1406         fi
1407         ol_enable_debug="$ol_arg"
1408
1409 else
1410         ol_enable_debug="yes"
1411 fi
1412 # end --enable-debug
1413 # OpenLDAP --enable-dynamic
1414         # Check whether --enable-dynamic or --disable-dynamic was given.
1415 if test "${enable_dynamic+set}" = set; then
1416   enableval="$enable_dynamic"
1417   
1418         ol_arg=invalid
1419         for ol_val in auto yes no ; do
1420                 if test "$enableval" = "$ol_val" ; then
1421                         ol_arg="$ol_val"
1422                 fi
1423         done
1424         if test "$ol_arg" = "invalid" ; then
1425                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1426         fi
1427         ol_enable_dynamic="$ol_arg"
1428
1429 else
1430         ol_enable_dynamic="no"
1431 fi
1432 # end --enable-dynamic
1433 # OpenLDAP --enable-syslog
1434         # Check whether --enable-syslog or --disable-syslog was given.
1435 if test "${enable_syslog+set}" = set; then
1436   enableval="$enable_syslog"
1437   
1438         ol_arg=invalid
1439         for ol_val in auto yes no ; do
1440                 if test "$enableval" = "$ol_val" ; then
1441                         ol_arg="$ol_val"
1442                 fi
1443         done
1444         if test "$ol_arg" = "invalid" ; then
1445                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1446         fi
1447         ol_enable_syslog="$ol_arg"
1448
1449 else
1450         ol_enable_syslog="auto"
1451 fi
1452 # end --enable-syslog
1453 # OpenLDAP --enable-proctitle
1454         # Check whether --enable-proctitle or --disable-proctitle was given.
1455 if test "${enable_proctitle+set}" = set; then
1456   enableval="$enable_proctitle"
1457   
1458         ol_arg=invalid
1459         for ol_val in auto yes no ; do
1460                 if test "$enableval" = "$ol_val" ; then
1461                         ol_arg="$ol_val"
1462                 fi
1463         done
1464         if test "$ol_arg" = "invalid" ; then
1465                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1466         fi
1467         ol_enable_proctitle="$ol_arg"
1468
1469 else
1470         ol_enable_proctitle="yes"
1471 fi
1472 # end --enable-proctitle
1473 ol_enable_referrals=${ol_enable_referrals-no}
1474 ol_enable_kbind=${ol_enable_kbind-no}
1475 # OpenLDAP --enable-ipv6
1476         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1477 if test "${enable_ipv6+set}" = set; then
1478   enableval="$enable_ipv6"
1479   
1480         ol_arg=invalid
1481         for ol_val in auto yes no ; do
1482                 if test "$enableval" = "$ol_val" ; then
1483                         ol_arg="$ol_val"
1484                 fi
1485         done
1486         if test "$ol_arg" = "invalid" ; then
1487                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1488         fi
1489         ol_enable_ipv6="$ol_arg"
1490
1491 else
1492         ol_enable_ipv6="auto"
1493 fi
1494 # end --enable-ipv6
1495 # OpenLDAP --enable-local
1496         # Check whether --enable-local or --disable-local was given.
1497 if test "${enable_local+set}" = set; then
1498   enableval="$enable_local"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1508         fi
1509         ol_enable_local="$ol_arg"
1510
1511 else
1512         ol_enable_local="auto"
1513 fi
1514 # end --enable-local
1515 # OpenLDAP --enable-x_compile
1516         # Check whether --enable-x_compile or --disable-x_compile was given.
1517 if test "${enable_x_compile+set}" = set; then
1518   enableval="$enable_x_compile"
1519   
1520         ol_arg=invalid
1521         for ol_val in yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1528         fi
1529         ol_enable_x_compile="$ol_arg"
1530
1531 else
1532         ol_enable_x_compile="no"
1533 fi
1534 # end --enable-x_compile
1535
1536
1537 # OpenLDAP --with-cyrus_sasl
1538         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1539 if test "${with_cyrus_sasl+set}" = set; then
1540   withval="$with_cyrus_sasl"
1541   
1542         ol_arg=invalid
1543         for ol_val in auto yes no  ; do
1544                 if test "$withval" = "$ol_val" ; then
1545                         ol_arg="$ol_val"
1546                 fi
1547         done
1548         if test "$ol_arg" = "invalid" ; then
1549                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1550         fi
1551         ol_with_cyrus_sasl="$ol_arg"
1552
1553 else
1554         ol_with_cyrus_sasl="auto"
1555 fi
1556 # end --with-cyrus_sasl
1557
1558 # OpenLDAP --with-fetch
1559         # Check whether --with-fetch or --without-fetch was given.
1560 if test "${with_fetch+set}" = set; then
1561   withval="$with_fetch"
1562   
1563         ol_arg=invalid
1564         for ol_val in auto yes no  ; do
1565                 if test "$withval" = "$ol_val" ; then
1566                         ol_arg="$ol_val"
1567                 fi
1568         done
1569         if test "$ol_arg" = "invalid" ; then
1570                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1571         fi
1572         ol_with_fetch="$ol_arg"
1573
1574 else
1575         ol_with_fetch="auto"
1576 fi
1577 # end --with-fetch
1578
1579 ol_with_kerberos=${ol_with_kerberos-auto}
1580 # OpenLDAP --with-threads
1581         # Check whether --with-threads or --without-threads was given.
1582 if test "${with_threads+set}" = set; then
1583   withval="$with_threads"
1584   
1585         ol_arg=invalid
1586         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1587                 if test "$withval" = "$ol_val" ; then
1588                         ol_arg="$ol_val"
1589                 fi
1590         done
1591         if test "$ol_arg" = "invalid" ; then
1592                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1593         fi
1594         ol_with_threads="$ol_arg"
1595
1596 else
1597         ol_with_threads="auto"
1598 fi
1599 # end --with-threads
1600
1601 # OpenLDAP --with-tls
1602         # Check whether --with-tls or --without-tls was given.
1603 if test "${with_tls+set}" = set; then
1604   withval="$with_tls"
1605   
1606         ol_arg=invalid
1607         for ol_val in auto ssleay openssl yes no  ; do
1608                 if test "$withval" = "$ol_val" ; then
1609                         ol_arg="$ol_val"
1610                 fi
1611         done
1612         if test "$ol_arg" = "invalid" ; then
1613                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1614         fi
1615         ol_with_tls="$ol_arg"
1616
1617 else
1618         ol_with_tls="auto"
1619 fi
1620 # end --with-tls
1621
1622 # OpenLDAP --with-yielding_select
1623         # Check whether --with-yielding_select or --without-yielding_select was given.
1624 if test "${with_yielding_select+set}" = set; then
1625   withval="$with_yielding_select"
1626   
1627         ol_arg=invalid
1628         for ol_val in auto yes no manual  ; do
1629                 if test "$withval" = "$ol_val" ; then
1630                         ol_arg="$ol_val"
1631                 fi
1632         done
1633         if test "$ol_arg" = "invalid" ; then
1634                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1635         fi
1636         ol_with_yielding_select="$ol_arg"
1637
1638 else
1639         ol_with_yielding_select="auto"
1640 fi
1641 # end --with-yielding_select
1642
1643
1644
1645 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1646 if test "${with_xxslapdoptions+set}" = set; then
1647   withval="$with_xxslapdoptions"
1648   :
1649 fi
1650
1651 # OpenLDAP --enable-slapd
1652         # Check whether --enable-slapd or --disable-slapd was given.
1653 if test "${enable_slapd+set}" = set; then
1654   enableval="$enable_slapd"
1655   
1656         ol_arg=invalid
1657         for ol_val in auto yes no ; do
1658                 if test "$enableval" = "$ol_val" ; then
1659                         ol_arg="$ol_val"
1660                 fi
1661         done
1662         if test "$ol_arg" = "invalid" ; then
1663                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1664         fi
1665         ol_enable_slapd="$ol_arg"
1666
1667 else
1668         ol_enable_slapd="yes"
1669 fi
1670 # end --enable-slapd
1671 # OpenLDAP --enable-aci
1672         # Check whether --enable-aci or --disable-aci was given.
1673 if test "${enable_aci+set}" = set; then
1674   enableval="$enable_aci"
1675   
1676         ol_arg=invalid
1677         for ol_val in auto yes no ; do
1678                 if test "$enableval" = "$ol_val" ; then
1679                         ol_arg="$ol_val"
1680                 fi
1681         done
1682         if test "$ol_arg" = "invalid" ; then
1683                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1684         fi
1685         ol_enable_aci="$ol_arg"
1686
1687 else
1688         ol_enable_aci="no"
1689 fi
1690 # end --enable-aci
1691 # OpenLDAP --enable-cleartext
1692         # Check whether --enable-cleartext or --disable-cleartext was given.
1693 if test "${enable_cleartext+set}" = set; then
1694   enableval="$enable_cleartext"
1695   
1696         ol_arg=invalid
1697         for ol_val in auto yes no ; do
1698                 if test "$enableval" = "$ol_val" ; then
1699                         ol_arg="$ol_val"
1700                 fi
1701         done
1702         if test "$ol_arg" = "invalid" ; then
1703                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1704         fi
1705         ol_enable_cleartext="$ol_arg"
1706
1707 else
1708         ol_enable_cleartext="yes"
1709 fi
1710 # end --enable-cleartext
1711 # OpenLDAP --enable-crypt
1712         # Check whether --enable-crypt or --disable-crypt was given.
1713 if test "${enable_crypt+set}" = set; then
1714   enableval="$enable_crypt"
1715   
1716         ol_arg=invalid
1717         for ol_val in auto yes no ; do
1718                 if test "$enableval" = "$ol_val" ; then
1719                         ol_arg="$ol_val"
1720                 fi
1721         done
1722         if test "$ol_arg" = "invalid" ; then
1723                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1724         fi
1725         ol_enable_crypt="$ol_arg"
1726
1727 else
1728         ol_enable_crypt="no"
1729 fi
1730 # end --enable-crypt
1731 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1732 # OpenLDAP --enable-lmpasswd
1733         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1734 if test "${enable_lmpasswd+set}" = set; then
1735   enableval="$enable_lmpasswd"
1736   
1737         ol_arg=invalid
1738         for ol_val in auto yes no ; do
1739                 if test "$enableval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1745         fi
1746         ol_enable_lmpasswd="$ol_arg"
1747
1748 else
1749         ol_enable_lmpasswd="no"
1750 fi
1751 # end --enable-lmpasswd
1752 # OpenLDAP --enable-spasswd
1753         # Check whether --enable-spasswd or --disable-spasswd was given.
1754 if test "${enable_spasswd+set}" = set; then
1755   enableval="$enable_spasswd"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1765         fi
1766         ol_enable_spasswd="$ol_arg"
1767
1768 else
1769         ol_enable_spasswd="no"
1770 fi
1771 # end --enable-spasswd
1772 # OpenLDAP --enable-modules
1773         # Check whether --enable-modules or --disable-modules was given.
1774 if test "${enable_modules+set}" = set; then
1775   enableval="$enable_modules"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1785         fi
1786         ol_enable_modules="$ol_arg"
1787
1788 else
1789         ol_enable_modules="no"
1790 fi
1791 # end --enable-modules
1792 ol_enable_multimaster=${ol_enable_multimaster-no}
1793 # OpenLDAP --enable-rewrite
1794         # Check whether --enable-rewrite or --disable-rewrite was given.
1795 if test "${enable_rewrite+set}" = set; then
1796   enableval="$enable_rewrite"
1797   
1798         ol_arg=invalid
1799         for ol_val in auto yes no ; do
1800                 if test "$enableval" = "$ol_val" ; then
1801                         ol_arg="$ol_val"
1802                 fi
1803         done
1804         if test "$ol_arg" = "invalid" ; then
1805                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1806         fi
1807         ol_enable_rewrite="$ol_arg"
1808
1809 else
1810         ol_enable_rewrite="no"
1811 fi
1812 # end --enable-rewrite
1813 # OpenLDAP --enable-rlookups
1814         # Check whether --enable-rlookups or --disable-rlookups was given.
1815 if test "${enable_rlookups+set}" = set; then
1816   enableval="$enable_rlookups"
1817   
1818         ol_arg=invalid
1819         for ol_val in auto yes no ; do
1820                 if test "$enableval" = "$ol_val" ; then
1821                         ol_arg="$ol_val"
1822                 fi
1823         done
1824         if test "$ol_arg" = "invalid" ; then
1825                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1826         fi
1827         ol_enable_rlookups="$ol_arg"
1828
1829 else
1830         ol_enable_rlookups="no"
1831 fi
1832 # end --enable-rlookups
1833 # OpenLDAP --enable-slapi
1834         # Check whether --enable-slapi or --disable-slapi was given.
1835 if test "${enable_slapi+set}" = set; then
1836   enableval="$enable_slapi"
1837   
1838         ol_arg=invalid
1839         for ol_val in auto yes no ; do
1840                 if test "$enableval" = "$ol_val" ; then
1841                         ol_arg="$ol_val"
1842                 fi
1843         done
1844         if test "$ol_arg" = "invalid" ; then
1845                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1846         fi
1847         ol_enable_slapi="$ol_arg"
1848
1849 else
1850         ol_enable_slapi="no"
1851 fi
1852 # end --enable-slapi
1853 # OpenLDAP --enable-slp
1854         # Check whether --enable-slp or --disable-slp was given.
1855 if test "${enable_slp+set}" = set; then
1856   enableval="$enable_slp"
1857   
1858         ol_arg=invalid
1859         for ol_val in auto yes no ; do
1860                 if test "$enableval" = "$ol_val" ; then
1861                         ol_arg="$ol_val"
1862                 fi
1863         done
1864         if test "$ol_arg" = "invalid" ; then
1865                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1866         fi
1867         ol_enable_slp="$ol_arg"
1868
1869 else
1870         ol_enable_slp="no"
1871 fi
1872 # end --enable-slp
1873 # OpenLDAP --enable-wrappers
1874         # Check whether --enable-wrappers or --disable-wrappers was given.
1875 if test "${enable_wrappers+set}" = set; then
1876   enableval="$enable_wrappers"
1877   
1878         ol_arg=invalid
1879         for ol_val in auto yes no ; do
1880                 if test "$enableval" = "$ol_val" ; then
1881                         ol_arg="$ol_val"
1882                 fi
1883         done
1884         if test "$ol_arg" = "invalid" ; then
1885                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1886         fi
1887         ol_enable_wrappers="$ol_arg"
1888
1889 else
1890         ol_enable_wrappers="no"
1891 fi
1892 # end --enable-wrappers
1893
1894
1895 # OpenLDAP --enable-bdb
1896         # Check whether --enable-bdb or --disable-bdb was given.
1897 if test "${enable_bdb+set}" = set; then
1898   enableval="$enable_bdb"
1899   
1900         ol_arg=invalid
1901         for ol_val in auto yes no ; do
1902                 if test "$enableval" = "$ol_val" ; then
1903                         ol_arg="$ol_val"
1904                 fi
1905         done
1906         if test "$ol_arg" = "invalid" ; then
1907                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1908         fi
1909         ol_enable_bdb="$ol_arg"
1910
1911 else
1912         ol_enable_bdb="yes"
1913 fi
1914 # end --enable-bdb
1915 # OpenLDAP --with-bdb_module
1916         # Check whether --with-bdb_module or --without-bdb_module was given.
1917 if test "${with_bdb_module+set}" = set; then
1918   withval="$with_bdb_module"
1919   
1920         ol_arg=invalid
1921         for ol_val in static dynamic ; do
1922                 if test "$withval" = "$ol_val" ; then
1923                         ol_arg="$ol_val"
1924                 fi
1925         done
1926         if test "$ol_arg" = "invalid" ; then
1927                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1928         fi
1929         ol_with_bdb_module="$ol_arg"
1930
1931 else
1932         ol_with_bdb_module="static"
1933 fi
1934 # end --with-bdb_module
1935
1936 # OpenLDAP --enable-dnssrv
1937         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1938 if test "${enable_dnssrv+set}" = set; then
1939   enableval="$enable_dnssrv"
1940   
1941         ol_arg=invalid
1942         for ol_val in auto yes no ; do
1943                 if test "$enableval" = "$ol_val" ; then
1944                         ol_arg="$ol_val"
1945                 fi
1946         done
1947         if test "$ol_arg" = "invalid" ; then
1948                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1949         fi
1950         ol_enable_dnssrv="$ol_arg"
1951
1952 else
1953         ol_enable_dnssrv="no"
1954 fi
1955 # end --enable-dnssrv
1956 # OpenLDAP --with-dnssrv_module
1957         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1958 if test "${with_dnssrv_module+set}" = set; then
1959   withval="$with_dnssrv_module"
1960   
1961         ol_arg=invalid
1962         for ol_val in static dynamic ; do
1963                 if test "$withval" = "$ol_val" ; then
1964                         ol_arg="$ol_val"
1965                 fi
1966         done
1967         if test "$ol_arg" = "invalid" ; then
1968                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1969         fi
1970         ol_with_dnssrv_module="$ol_arg"
1971
1972 else
1973         ol_with_dnssrv_module="static"
1974 fi
1975 # end --with-dnssrv_module
1976
1977 # OpenLDAP --enable-hdb
1978         # Check whether --enable-hdb or --disable-hdb was given.
1979 if test "${enable_hdb+set}" = set; then
1980   enableval="$enable_hdb"
1981   
1982         ol_arg=invalid
1983         for ol_val in auto yes no ; do
1984                 if test "$enableval" = "$ol_val" ; then
1985                         ol_arg="$ol_val"
1986                 fi
1987         done
1988         if test "$ol_arg" = "invalid" ; then
1989                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1990         fi
1991         ol_enable_hdb="$ol_arg"
1992
1993 else
1994         ol_enable_hdb="no"
1995 fi
1996 # end --enable-hdb
1997 # OpenLDAP --with-hdb_module
1998         # Check whether --with-hdb_module or --without-hdb_module was given.
1999 if test "${with_hdb_module+set}" = set; then
2000   withval="$with_hdb_module"
2001   
2002         ol_arg=invalid
2003         for ol_val in static dynamic ; do
2004                 if test "$withval" = "$ol_val" ; then
2005                         ol_arg="$ol_val"
2006                 fi
2007         done
2008         if test "$ol_arg" = "invalid" ; then
2009                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2010         fi
2011         ol_with_hdb_module="$ol_arg"
2012
2013 else
2014         ol_with_hdb_module="static"
2015 fi
2016 # end --with-hdb_module
2017
2018 # OpenLDAP --enable-ldap
2019         # Check whether --enable-ldap or --disable-ldap was given.
2020 if test "${enable_ldap+set}" = set; then
2021   enableval="$enable_ldap"
2022   
2023         ol_arg=invalid
2024         for ol_val in auto yes no ; do
2025                 if test "$enableval" = "$ol_val" ; then
2026                         ol_arg="$ol_val"
2027                 fi
2028         done
2029         if test "$ol_arg" = "invalid" ; then
2030                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2031         fi
2032         ol_enable_ldap="$ol_arg"
2033
2034 else
2035         ol_enable_ldap="no"
2036 fi
2037 # end --enable-ldap
2038 # OpenLDAP --with-ldap_module
2039         # Check whether --with-ldap_module or --without-ldap_module was given.
2040 if test "${with_ldap_module+set}" = set; then
2041   withval="$with_ldap_module"
2042   
2043         ol_arg=invalid
2044         for ol_val in static dynamic ; do
2045                 if test "$withval" = "$ol_val" ; then
2046                         ol_arg="$ol_val"
2047                 fi
2048         done
2049         if test "$ol_arg" = "invalid" ; then
2050                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2051         fi
2052         ol_with_ldap_module="$ol_arg"
2053
2054 else
2055         ol_with_ldap_module="static"
2056 fi
2057 # end --with-ldap_module
2058
2059 # OpenLDAP --enable-ldbm
2060         # Check whether --enable-ldbm or --disable-ldbm was given.
2061 if test "${enable_ldbm+set}" = set; then
2062   enableval="$enable_ldbm"
2063   
2064         ol_arg=invalid
2065         for ol_val in auto yes no ; do
2066                 if test "$enableval" = "$ol_val" ; then
2067                         ol_arg="$ol_val"
2068                 fi
2069         done
2070         if test "$ol_arg" = "invalid" ; then
2071                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2072         fi
2073         ol_enable_ldbm="$ol_arg"
2074
2075 else
2076         ol_enable_ldbm="no"
2077 fi
2078 # end --enable-ldbm
2079 # OpenLDAP --with-ldbm_api
2080         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2081 if test "${with_ldbm_api+set}" = set; then
2082   withval="$with_ldbm_api"
2083   
2084         ol_arg=invalid
2085         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2086                 if test "$withval" = "$ol_val" ; then
2087                         ol_arg="$ol_val"
2088                 fi
2089         done
2090         if test "$ol_arg" = "invalid" ; then
2091                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2092         fi
2093         ol_with_ldbm_api="$ol_arg"
2094
2095 else
2096         ol_with_ldbm_api="auto"
2097 fi
2098 # end --with-ldbm_api
2099
2100 # OpenLDAP --with-ldbm_module
2101         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2102 if test "${with_ldbm_module+set}" = set; then
2103   withval="$with_ldbm_module"
2104   
2105         ol_arg=invalid
2106         for ol_val in static dynamic ; do
2107                 if test "$withval" = "$ol_val" ; then
2108                         ol_arg="$ol_val"
2109                 fi
2110         done
2111         if test "$ol_arg" = "invalid" ; then
2112                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2113         fi
2114         ol_with_ldbm_module="$ol_arg"
2115
2116 else
2117         ol_with_ldbm_module="static"
2118 fi
2119 # end --with-ldbm_module
2120
2121 # OpenLDAP --with-ldbm_type
2122         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2123 if test "${with_ldbm_type+set}" = set; then
2124   withval="$with_ldbm_type"
2125   
2126         ol_arg=invalid
2127         for ol_val in auto btree hash ; do
2128                 if test "$withval" = "$ol_val" ; then
2129                         ol_arg="$ol_val"
2130                 fi
2131         done
2132         if test "$ol_arg" = "invalid" ; then
2133                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2134         fi
2135         ol_with_ldbm_type="$ol_arg"
2136
2137 else
2138         ol_with_ldbm_type="auto"
2139 fi
2140 # end --with-ldbm_type
2141
2142 # OpenLDAP --enable-meta
2143         # Check whether --enable-meta or --disable-meta was given.
2144 if test "${enable_meta+set}" = set; then
2145   enableval="$enable_meta"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto yes no ; do
2149                 if test "$enableval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2155         fi
2156         ol_enable_meta="$ol_arg"
2157
2158 else
2159         ol_enable_meta="no"
2160 fi
2161 # end --enable-meta
2162 # OpenLDAP --with-meta_module
2163         # Check whether --with-meta_module or --without-meta_module was given.
2164 if test "${with_meta_module+set}" = set; then
2165   withval="$with_meta_module"
2166   
2167         ol_arg=invalid
2168         for ol_val in static dynamic ; do
2169                 if test "$withval" = "$ol_val" ; then
2170                         ol_arg="$ol_val"
2171                 fi
2172         done
2173         if test "$ol_arg" = "invalid" ; then
2174                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2175         fi
2176         ol_with_meta_module="$ol_arg"
2177
2178 else
2179         ol_with_meta_module="static"
2180 fi
2181 # end --with-meta_module
2182
2183 # OpenLDAP --enable-monitor
2184         # Check whether --enable-monitor or --disable-monitor was given.
2185 if test "${enable_monitor+set}" = set; then
2186   enableval="$enable_monitor"
2187   
2188         ol_arg=invalid
2189         for ol_val in auto yes no ; do
2190                 if test "$enableval" = "$ol_val" ; then
2191                         ol_arg="$ol_val"
2192                 fi
2193         done
2194         if test "$ol_arg" = "invalid" ; then
2195                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2196         fi
2197         ol_enable_monitor="$ol_arg"
2198
2199 else
2200         ol_enable_monitor="yes"
2201 fi
2202 # end --enable-monitor
2203 # OpenLDAP --with-monitor_module
2204         # Check whether --with-monitor_module or --without-monitor_module was given.
2205 if test "${with_monitor_module+set}" = set; then
2206   withval="$with_monitor_module"
2207   
2208         ol_arg=invalid
2209         for ol_val in static dynamic ; do
2210                 if test "$withval" = "$ol_val" ; then
2211                         ol_arg="$ol_val"
2212                 fi
2213         done
2214         if test "$ol_arg" = "invalid" ; then
2215                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2216         fi
2217         ol_with_monitor_module="$ol_arg"
2218
2219 else
2220         ol_with_monitor_module="static"
2221 fi
2222 # end --with-monitor_module
2223
2224 # OpenLDAP --enable-null
2225         # Check whether --enable-null or --disable-null was given.
2226 if test "${enable_null+set}" = set; then
2227   enableval="$enable_null"
2228   
2229         ol_arg=invalid
2230         for ol_val in auto yes no ; do
2231                 if test "$enableval" = "$ol_val" ; then
2232                         ol_arg="$ol_val"
2233                 fi
2234         done
2235         if test "$ol_arg" = "invalid" ; then
2236                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2237         fi
2238         ol_enable_null="$ol_arg"
2239
2240 else
2241         ol_enable_null="no"
2242 fi
2243 # end --enable-null
2244 # OpenLDAP --with-null_module
2245         # Check whether --with-null_module or --without-null_module was given.
2246 if test "${with_null_module+set}" = set; then
2247   withval="$with_null_module"
2248   
2249         ol_arg=invalid
2250         for ol_val in static dynamic ; do
2251                 if test "$withval" = "$ol_val" ; then
2252                         ol_arg="$ol_val"
2253                 fi
2254         done
2255         if test "$ol_arg" = "invalid" ; then
2256                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2257         fi
2258         ol_with_null_module="$ol_arg"
2259
2260 else
2261         ol_with_null_module="static"
2262 fi
2263 # end --with-null_module
2264
2265 # OpenLDAP --enable-passwd
2266         # Check whether --enable-passwd or --disable-passwd was given.
2267 if test "${enable_passwd+set}" = set; then
2268   enableval="$enable_passwd"
2269   
2270         ol_arg=invalid
2271         for ol_val in auto yes no ; do
2272                 if test "$enableval" = "$ol_val" ; then
2273                         ol_arg="$ol_val"
2274                 fi
2275         done
2276         if test "$ol_arg" = "invalid" ; then
2277                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2278         fi
2279         ol_enable_passwd="$ol_arg"
2280
2281 else
2282         ol_enable_passwd="no"
2283 fi
2284 # end --enable-passwd
2285 # OpenLDAP --with-passwd_module
2286         # Check whether --with-passwd_module or --without-passwd_module was given.
2287 if test "${with_passwd_module+set}" = set; then
2288   withval="$with_passwd_module"
2289   
2290         ol_arg=invalid
2291         for ol_val in static dynamic ; do
2292                 if test "$withval" = "$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 $withval for --with-passwd_module" 1>&2; exit 1; }
2298         fi
2299         ol_with_passwd_module="$ol_arg"
2300
2301 else
2302         ol_with_passwd_module="static"
2303 fi
2304 # end --with-passwd_module
2305
2306 # OpenLDAP --enable-perl
2307         # Check whether --enable-perl or --disable-perl was given.
2308 if test "${enable_perl+set}" = set; then
2309   enableval="$enable_perl"
2310   
2311         ol_arg=invalid
2312         for ol_val in auto yes no ; 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-perl" 1>&2; exit 1; }
2319         fi
2320         ol_enable_perl="$ol_arg"
2321
2322 else
2323         ol_enable_perl="no"
2324 fi
2325 # end --enable-perl
2326 # OpenLDAP --with-perl_module
2327         # Check whether --with-perl_module or --without-perl_module was given.
2328 if test "${with_perl_module+set}" = set; then
2329   withval="$with_perl_module"
2330   
2331         ol_arg=invalid
2332         for ol_val in static dynamic ; do
2333                 if test "$withval" = "$ol_val" ; then
2334                         ol_arg="$ol_val"
2335                 fi
2336         done
2337         if test "$ol_arg" = "invalid" ; then
2338                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2339         fi
2340         ol_with_perl_module="$ol_arg"
2341
2342 else
2343         ol_with_perl_module="static"
2344 fi
2345 # end --with-perl_module
2346
2347 # OpenLDAP --enable-shell
2348         # Check whether --enable-shell or --disable-shell was given.
2349 if test "${enable_shell+set}" = set; then
2350   enableval="$enable_shell"
2351   
2352         ol_arg=invalid
2353         for ol_val in auto yes no ; do
2354                 if test "$enableval" = "$ol_val" ; then
2355                         ol_arg="$ol_val"
2356                 fi
2357         done
2358         if test "$ol_arg" = "invalid" ; then
2359                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2360         fi
2361         ol_enable_shell="$ol_arg"
2362
2363 else
2364         ol_enable_shell="no"
2365 fi
2366 # end --enable-shell
2367 # OpenLDAP --with-shell_module
2368         # Check whether --with-shell_module or --without-shell_module was given.
2369 if test "${with_shell_module+set}" = set; then
2370   withval="$with_shell_module"
2371   
2372         ol_arg=invalid
2373         for ol_val in static dynamic ; do
2374                 if test "$withval" = "$ol_val" ; then
2375                         ol_arg="$ol_val"
2376                 fi
2377         done
2378         if test "$ol_arg" = "invalid" ; then
2379                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2380         fi
2381         ol_with_shell_module="$ol_arg"
2382
2383 else
2384         ol_with_shell_module="static"
2385 fi
2386 # end --with-shell_module
2387
2388 # OpenLDAP --enable-sql
2389         # Check whether --enable-sql or --disable-sql was given.
2390 if test "${enable_sql+set}" = set; then
2391   enableval="$enable_sql"
2392   
2393         ol_arg=invalid
2394         for ol_val in auto yes no ; do
2395                 if test "$enableval" = "$ol_val" ; then
2396                         ol_arg="$ol_val"
2397                 fi
2398         done
2399         if test "$ol_arg" = "invalid" ; then
2400                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2401         fi
2402         ol_enable_sql="$ol_arg"
2403
2404 else
2405         ol_enable_sql="no"
2406 fi
2407 # end --enable-sql
2408 # OpenLDAP --with-sql_module
2409         # Check whether --with-sql_module or --without-sql_module was given.
2410 if test "${with_sql_module+set}" = set; then
2411   withval="$with_sql_module"
2412   
2413         ol_arg=invalid
2414         for ol_val in static dynamic ; do
2415                 if test "$withval" = "$ol_val" ; then
2416                         ol_arg="$ol_val"
2417                 fi
2418         done
2419         if test "$ol_arg" = "invalid" ; then
2420                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2421         fi
2422         ol_with_sql_module="$ol_arg"
2423
2424 else
2425         ol_with_sql_module="static"
2426 fi
2427 # end --with-sql_module
2428
2429 # OpenLDAP --enable-tcl
2430         # Check whether --enable-tcl or --disable-tcl was given.
2431 if test "${enable_tcl+set}" = set; then
2432   enableval="$enable_tcl"
2433   
2434         ol_arg=invalid
2435         for ol_val in auto yes no ; do
2436                 if test "$enableval" = "$ol_val" ; then
2437                         ol_arg="$ol_val"
2438                 fi
2439         done
2440         if test "$ol_arg" = "invalid" ; then
2441                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2442         fi
2443         ol_enable_tcl="$ol_arg"
2444
2445 else
2446         ol_enable_tcl="no"
2447 fi
2448 # end --enable-tcl
2449 # OpenLDAP --with-tcl_module
2450         # Check whether --with-tcl_module or --without-tcl_module was given.
2451 if test "${with_tcl_module+set}" = set; then
2452   withval="$with_tcl_module"
2453   
2454         ol_arg=invalid
2455         for ol_val in static dynamic ; do
2456                 if test "$withval" = "$ol_val" ; then
2457                         ol_arg="$ol_val"
2458                 fi
2459         done
2460         if test "$ol_arg" = "invalid" ; then
2461                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2462         fi
2463         ol_with_tcl_module="$ol_arg"
2464
2465 else
2466         ol_with_tcl_module="static"
2467 fi
2468 # end --with-tcl_module
2469
2470
2471 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2472 if test "${with_xxslurpdoptions+set}" = set; then
2473   withval="$with_xxslurpdoptions"
2474   :
2475 fi
2476
2477 # OpenLDAP --enable-slurpd
2478         # Check whether --enable-slurpd or --disable-slurpd was given.
2479 if test "${enable_slurpd+set}" = set; then
2480   enableval="$enable_slurpd"
2481   
2482         ol_arg=invalid
2483         for ol_val in auto yes no ; do
2484                 if test "$enableval" = "$ol_val" ; then
2485                         ol_arg="$ol_val"
2486                 fi
2487         done
2488         if test "$ol_arg" = "invalid" ; then
2489                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2490         fi
2491         ol_enable_slurpd="$ol_arg"
2492
2493 else
2494         ol_enable_slurpd="auto"
2495 fi
2496 # end --enable-slurpd
2497
2498 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2499 if test "${with_xxliboptions+set}" = set; then
2500   withval="$with_xxliboptions"
2501   :
2502 fi
2503
2504 # Check whether --enable-static or --disable-static was given.
2505 if test "${enable_static+set}" = set; then
2506   enableval="$enable_static"
2507   p=${PACKAGE-default}
2508 case $enableval in
2509 yes) enable_static=yes ;;
2510 no) enable_static=no ;;
2511 *)
2512   enable_static=no
2513   # Look at the argument we got.  We use all the common list separators.
2514   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2515   for pkg in $enableval; do
2516     if test "X$pkg" = "X$p"; then
2517       enable_static=yes
2518     fi
2519   done
2520   IFS="$ac_save_ifs"
2521   ;;
2522 esac
2523 else
2524   enable_static=yes
2525 fi
2526
2527 # Check whether --enable-shared or --disable-shared was given.
2528 if test "${enable_shared+set}" = set; then
2529   enableval="$enable_shared"
2530   p=${PACKAGE-default}
2531 case $enableval in
2532 yes) enable_shared=yes ;;
2533 no) enable_shared=no ;;
2534 *)
2535   enable_shared=no
2536   # Look at the argument we got.  We use all the common list separators.
2537   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2538   for pkg in $enableval; do
2539     if test "X$pkg" = "X$p"; then
2540       enable_shared=yes
2541     fi
2542   done
2543   IFS="$ac_save_ifs"
2544   ;;
2545 esac
2546 else
2547   enable_shared=yes
2548 fi
2549
2550
2551
2552 # validate options
2553 if test $ol_enable_slapd = no ; then
2554                 if test $ol_enable_slapi = yes ; then
2555                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2556         fi
2557         if test $ol_enable_bdb = yes ; then
2558                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2559         fi
2560         if test $ol_enable_dnssrv = yes ; then
2561                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2562         fi
2563         if test $ol_enable_hdb = yes ; then
2564                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2565         fi
2566         if test $ol_enable_ldap = yes ; then
2567                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2568         fi
2569         if test $ol_enable_ldbm = yes ; then
2570                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2571         fi
2572         if test $ol_enable_meta = yes ; then
2573                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2574         fi
2575         if test $ol_enable_monitor = yes ; then
2576                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2577         fi
2578         if test $ol_enable_null = yes ; then
2579                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2580         fi
2581         if test $ol_enable_passwd = yes ; then
2582                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2583         fi
2584         if test $ol_enable_perl = yes ; then
2585                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2586         fi
2587         if test $ol_enable_shell = yes ; then
2588                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2589         fi
2590         if test $ol_enable_tcl = yes ; then
2591                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2592         fi
2593         if test $ol_enable_sql = yes ; then
2594                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2595         fi
2596         if test $ol_enable_modules = yes ; then
2597                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2598         fi
2599         if test $ol_enable_multimaster = yes ; then
2600                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2601         fi
2602         if test $ol_enable_wrappers = yes ; then
2603                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2604         fi
2605         if test $ol_enable_rlookups = yes ; then
2606                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2607         fi
2608         if test $ol_enable_aci = yes ; then
2609                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2610         fi
2611         if test $ol_with_ldbm_api != auto ; then
2612                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2613         fi
2614         if test $ol_with_ldbm_type != auto ; then
2615                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2616         fi
2617         if test $ol_with_bdb_module != static ; then
2618                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2619         fi
2620         if test $ol_with_dnssrv_module != static ; then
2621                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2622         fi
2623         if test $ol_with_hdb_module != static ; then
2624                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2625         fi
2626         if test $ol_with_ldap_module != static ; then
2627                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2628         fi
2629         if test $ol_with_ldbm_module != static ; then
2630                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2631         fi
2632         if test $ol_with_meta_module != static ; then
2633                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2634         fi
2635         if test $ol_with_monitor_module != static ; then
2636                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2637         fi
2638         if test $ol_with_null_module != static ; then
2639                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2640         fi
2641         if test $ol_with_passwd_module != static ; then
2642                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2643         fi
2644         if test $ol_with_perl_module != static ; then
2645                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2646         fi
2647         if test $ol_with_shell_module != static ; then
2648                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2649         fi
2650         if test $ol_with_tcl_module != static ; then
2651                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2652         fi
2653         if test $ol_with_sql_module != static ; then
2654                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2655         fi
2656         if test $ol_enable_slurpd = yes ; then
2657                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2658         fi
2659         if test $ol_enable_rewrite = yes ; then
2660                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2661         fi
2662
2663         # force settings to no
2664         ol_enable_slapi=no
2665         ol_enable_bdb=no
2666         ol_enable_dnssrv=no
2667         ol_enable_hdb=no
2668         ol_enable_ldap=no
2669         ol_enable_ldbm=no
2670         ol_enable_meta=no
2671         ol_enable_monitor=no
2672         ol_enable_null=no
2673         ol_enable_passwd=no
2674         ol_enable_perl=no
2675         ol_enable_shell=no
2676         ol_enable_tcl=no
2677         ol_enable_sql=no
2678
2679         ol_enable_modules=no
2680         ol_enable_multimaster=no
2681         ol_enable_rlookups=no
2682         ol_enable_aci=no
2683         ol_enable_wrappers=no
2684         ol_enable_dynamic=no
2685
2686         ol_with_ldbm_api=no
2687         ol_with_ldbm_type=no
2688
2689         ol_with_bdb_module=static
2690         ol_with_dnssrv_module=static
2691         ol_with_hdb_module=static
2692         ol_with_ldap_module=static
2693         ol_with_ldbm_module=static
2694         ol_with_meta_module=static
2695         ol_with_monitor_module=static
2696         ol_with_null_module=static
2697         ol_with_passwd_module=static
2698         ol_with_perl_module=static
2699         ol_with_shell_module=static
2700         ol_with_tcl_module=static
2701         ol_with_sql_module=static
2702
2703         ol_enable_slurpd=no
2704
2705         ol_enable_rewrite=no
2706
2707 elif test $ol_enable_ldbm = no ; then
2708         
2709         if test $ol_with_ldbm_api != auto ; then
2710                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2711         fi
2712
2713         if test $ol_with_ldbm_type != auto ; then
2714                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2715         fi
2716
2717         if test $ol_with_ldbm_module != static ; then
2718                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2719         fi
2720
2721         if test $ol_enable_modules != yes -a \
2722                 $ol_enable_bdb = no -a \
2723                 $ol_enable_dnssrv = no -a \
2724                 $ol_enable_hdb = no -a \
2725                 $ol_enable_ldap = no -a \
2726                 $ol_enable_meta = no -a \
2727                 $ol_enable_monitor = no -a \
2728                 $ol_enable_null = no -a \
2729                 $ol_enable_passwd = no -a \
2730                 $ol_enable_perl = no -a \
2731                 $ol_enable_shell = no -a \
2732                 $ol_enable_sql = no -a \
2733                 $ol_enable_tcl = no ; then
2734
2735                 if test $ol_enable_slapd = yes ; then
2736                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2737                 else
2738                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2739                         ol_enable_slapd=no
2740                 fi
2741         fi
2742
2743         ol_with_ldbm_api=no
2744         ol_with_ldbm_type=no
2745         ol_with_ldbm_module=static
2746
2747         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2748                 ol_with_ldbm_api=berkeley
2749         fi
2750
2751 else
2752                 if test $ol_with_ldbm_api = gdbm -a \
2753                 $ol_with_ldbm_type = btree ; then
2754                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2755         fi
2756         if test $ol_with_ldbm_api = mdbm -a \
2757                 $ol_with_ldbm_type = btree ; then
2758                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2759         fi
2760         if test $ol_with_ldbm_api = ndbm -a \
2761                 $ol_with_ldbm_type = btree ; then
2762                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2763         fi
2764
2765         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2766                 if test $ol_with_ldbm_api = auto ; then
2767                         ol_with_ldbm_api=berkeley
2768                 elif test $ol_with_ldbm_api != berkeley ; then
2769                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2770                 fi
2771
2772         elif test $ol_enable_bdb = auto ; then
2773                 if test $ol_with_ldbm_api != berkeley \
2774                         -o $ol_with_ldbm_api != auto ; then
2775                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2776                         ol_enable_bdb=no
2777                 fi
2778         fi
2779 fi
2780
2781 if test $ol_enable_slurpd = yes ; then
2782                 if test $ol_with_threads = no ; then
2783                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2784         fi
2785 fi
2786
2787 if test $ol_enable_lmpasswd = yes ; then
2788         if test $ol_with_tls = no ; then
2789                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2790         fi
2791 fi
2792
2793 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2794         if test $ol_with_kerberos = no ; then
2795                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2796         elif test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=yes
2798         fi
2799
2800 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2801         if test $ol_with_kerberos = auto ; then
2802                 ol_with_kerberos=no
2803         elif test $ol_with_kerberos != no ; then
2804                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2805                 ol_with_kerberos=no
2806         fi
2807 fi
2808
2809 if test $ol_enable_spasswd = yes ; then
2810         if test $ol_with_cyrus_sasl = no ; then
2811                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2812         fi
2813         ol_with_cyrus_sasl=yes
2814 fi
2815
2816 echo "$ac_t""done" 1>&6
2817
2818 LDAP_LIBS=
2819 LDIF_LIBS=
2820 LDBM_LIBS=
2821 LTHREAD_LIBS=
2822 LUTIL_LIBS=
2823
2824 SLAPD_LIBS=
2825 SLURPD_LIBS=
2826
2827 BUILD_SLAPD=no
2828 BUILD_SLURPD=no
2829
2830 BUILD_THREAD=no
2831
2832 BUILD_SLAPI=no
2833 SLAPD_SLAPI_DEPEND=
2834
2835 BUILD_BDB=no
2836 BUILD_DNSSRV=no
2837 BUILD_HDB=no
2838 BUILD_LDAP=no
2839 BUILD_LDBM=no
2840 BUILD_META=no
2841 BUILD_MONITOR=no
2842 BUILD_CACHE=no
2843 BUILD_NULL=no
2844 BUILD_PASSWD=no
2845 BUILD_PERL=no
2846 BUILD_SHELL=no
2847 BUILD_SQL=no
2848 BUILD_TCL=no
2849
2850 BUILD_BDB_DYNAMIC=static
2851 BUILD_DNSSRV_DYNAMIC=static
2852 BUILD_HDB_DYNAMIC=static
2853 BUILD_LDAP_DYNAMIC=static
2854 BUILD_LDBM_DYNAMIC=static
2855 BUILD_META_DYNAMIC=static
2856 BUILD_MONITOR_DYNAMIC=static
2857 BUILD_NULL_DYNAMIC=static
2858 BUILD_PASSWD_DYNAMIC=static
2859 BUILD_PERL_DYNAMIC=static
2860 BUILD_SHELL_DYNAMIC=static
2861 BUILD_TCL_DYNAMIC=static
2862 BUILD_SQL_DYNAMIC=static
2863
2864 SLAPD_MODULES_LDFLAGS=
2865 SLAPD_MODULES_CPPFLAGS=
2866
2867 SLAPD_STATIC_BACKENDS=
2868 SLAPD_DYNAMIC_BACKENDS=
2869
2870 SLAPD_PERL_LDFLAGS=
2871 MOD_PERL_LDFLAGS=
2872 PERL_CPPFLAGS=
2873
2874 SLAPD_SQL_LDFLAGS=
2875 SLAPD_SQL_LIBS=
2876 SLAPD_SQL_INCLUDES=
2877
2878 MOD_TCL_LIB=
2879 KRB4_LIBS=
2880 KRB5_LIBS=
2881 SASL_LIBS=
2882 TERMCAP_LIBS=
2883 TLS_LIBS=
2884 MODULES_LIBS=
2885 SLAPI_LIBS=
2886 LIBSLAPI=
2887 LIBSLAPITOOLS=
2888 AUTH_LIBS=
2889
2890 SLAPD_SLP_LIBS=
2891
2892
2893 # Find a good install program.  We prefer a C program (faster),
2894 # so one script is as good as another.  But avoid the broken or
2895 # incompatible versions:
2896 # SysV /etc/install, /usr/sbin/install
2897 # SunOS /usr/etc/install
2898 # IRIX /sbin/install
2899 # AIX /bin/install
2900 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2901 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2902 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2903 # ./install, which can be erroneously created by make from ./install.sh.
2904 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2905 echo "configure:2906: checking for a BSD compatible install" >&5
2906 if test -z "$INSTALL"; then
2907 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2908   echo $ac_n "(cached) $ac_c" 1>&6
2909 else
2910     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2911   for ac_dir in $PATH; do
2912     # Account for people who put trailing slashes in PATH elements.
2913     case "$ac_dir/" in
2914     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2915     *)
2916       # OSF1 and SCO ODT 3.0 have their own names for install.
2917       # Don't use installbsd from OSF since it installs stuff as root
2918       # by default.
2919       for ac_prog in ginstall scoinst install; do
2920         if test -f $ac_dir/$ac_prog; then
2921           if test $ac_prog = install &&
2922             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2923             # AIX install.  It has an incompatible calling convention.
2924             :
2925           elif test $ac_prog = install &&
2926             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2927             # program-specific install script used by HP pwplus--don't use.
2928             :
2929           else
2930             ac_cv_path_install="$ac_dir/$ac_prog -c"
2931             break 2
2932           fi
2933         fi
2934       done
2935       ;;
2936     esac
2937   done
2938   IFS="$ac_save_IFS"
2939
2940 fi
2941   if test "${ac_cv_path_install+set}" = set; then
2942     INSTALL="$ac_cv_path_install"
2943   else
2944     # As a last resort, use the slow shell script.  We don't cache a
2945     # path for INSTALL within a source directory, because that will
2946     # break other packages using the cache if that directory is
2947     # removed, or if the path is relative.
2948     INSTALL="$ac_install_sh"
2949   fi
2950 fi
2951 echo "$ac_t""$INSTALL" 1>&6
2952
2953 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2954 # It thinks the first close brace ends the variable substitution.
2955 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2956
2957 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2958
2959 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2960
2961
2962 cat >> confdefs.h <<\EOF
2963 #define HAVE_MKVERSION 1
2964 EOF
2965
2966
2967
2968
2969 ol_aix_threads=no
2970 case "$target" in
2971 *-*-aix*)       if test -z "$CC" ; then
2972                 case "$ol_with_threads" in
2973                 auto | yes |  posix) ol_aix_threads=yes ;;
2974                 esac
2975         fi
2976 ;;
2977 esac
2978
2979 if test $ol_aix_threads = yes ; then
2980         if test -z "${CC}" ; then
2981                 for ac_prog in cc_r xlc_r cc
2982 do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984 set dummy $ac_prog; ac_word=$2
2985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2986 echo "configure:2987: checking for $ac_word" >&5
2987 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2988   echo $ac_n "(cached) $ac_c" 1>&6
2989 else
2990   if test -n "$CC"; then
2991   ac_cv_prog_CC="$CC" # Let the user override the test.
2992 else
2993   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2994   ac_dummy="$PATH"
2995   for ac_dir in $ac_dummy; do
2996     test -z "$ac_dir" && ac_dir=.
2997     if test -f $ac_dir/$ac_word; then
2998       ac_cv_prog_CC="$ac_prog"
2999       break
3000     fi
3001   done
3002   IFS="$ac_save_ifs"
3003 fi
3004 fi
3005 CC="$ac_cv_prog_CC"
3006 if test -n "$CC"; then
3007   echo "$ac_t""$CC" 1>&6
3008 else
3009   echo "$ac_t""no" 1>&6
3010 fi
3011
3012 test -n "$CC" && break
3013 done
3014
3015
3016                 if test "$CC" = cc ; then
3017                                                 if test $ol_with_threads != auto ; then
3018                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3019                         else
3020                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3021                         fi
3022                         ol_with_threads=no
3023                 fi
3024         fi
3025
3026         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3027                 ol_with_threads=posix
3028                 ol_cv_pthread_create=yes
3029         fi
3030 fi
3031
3032 if test -z "${CC}"; then
3033         for ac_prog in cc gcc
3034 do
3035 # Extract the first word of "$ac_prog", so it can be a program name with args.
3036 set dummy $ac_prog; ac_word=$2
3037 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3038 echo "configure:3039: checking for $ac_word" >&5
3039 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3040   echo $ac_n "(cached) $ac_c" 1>&6
3041 else
3042   if test -n "$CC"; then
3043   ac_cv_prog_CC="$CC" # Let the user override the test.
3044 else
3045   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3046   ac_dummy="$PATH"
3047   for ac_dir in $ac_dummy; do
3048     test -z "$ac_dir" && ac_dir=.
3049     if test -f $ac_dir/$ac_word; then
3050       ac_cv_prog_CC="$ac_prog"
3051       break
3052     fi
3053   done
3054   IFS="$ac_save_ifs"
3055 fi
3056 fi
3057 CC="$ac_cv_prog_CC"
3058 if test -n "$CC"; then
3059   echo "$ac_t""$CC" 1>&6
3060 else
3061   echo "$ac_t""no" 1>&6
3062 fi
3063
3064 test -n "$CC" && break
3065 done
3066 test -n "$CC" || CC="missing"
3067
3068
3069         if test "${CC}" = "missing" ; then
3070                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3071         fi
3072 fi
3073
3074 if test -z "${AR}"; then
3075         for ac_prog in ar gar
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$AR"; then
3085   ac_cv_prog_AR="$AR" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_AR="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 AR="$ac_cv_prog_AR"
3100 if test -n "$AR"; then
3101   echo "$ac_t""$AR" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$AR" && break
3107 done
3108 test -n "$AR" || AR="missing"
3109
3110
3111         if test "${AR}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116
3117
3118 # Find the correct PATH separator.  Usually this is `:', but
3119 # DJGPP uses `;' like DOS.
3120 if test "X${PATH_SEPARATOR+set}" != Xset; then
3121   UNAME=${UNAME-`uname 2>/dev/null`}
3122   case X$UNAME in
3123     *-DOS) lt_cv_sys_path_separator=';' ;;
3124     *)     lt_cv_sys_path_separator=':' ;;
3125   esac
3126   PATH_SEPARATOR=$lt_cv_sys_path_separator
3127 fi
3128
3129 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3130 echo "configure:3131: checking for Cygwin environment" >&5
3131 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3132   echo $ac_n "(cached) $ac_c" 1>&6
3133 else
3134   cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137
3138 int main() {
3139
3140 #ifndef __CYGWIN__
3141 #define __CYGWIN__ __CYGWIN32__
3142 #endif
3143 return __CYGWIN__;
3144 ; return 0; }
3145 EOF
3146 if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3147   rm -rf conftest*
3148   ac_cv_cygwin=yes
3149 else
3150   echo "configure: failed program was:" >&5
3151   cat conftest.$ac_ext >&5
3152   rm -rf conftest*
3153   ac_cv_cygwin=no
3154 fi
3155 rm -f conftest*
3156 fi
3157
3158 echo "$ac_t""$ac_cv_cygwin" 1>&6
3159 CYGWIN=
3160 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3161 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3162 echo "configure:3163: checking for mingw32 environment" >&5
3163 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3164   echo $ac_n "(cached) $ac_c" 1>&6
3165 else
3166   cat > conftest.$ac_ext <<EOF
3167 #line 3168 "configure"
3168 #include "confdefs.h"
3169
3170 int main() {
3171 return __MINGW32__;
3172 ; return 0; }
3173 EOF
3174 if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3175   rm -rf conftest*
3176   ac_cv_mingw32=yes
3177 else
3178   echo "configure: failed program was:" >&5
3179   cat conftest.$ac_ext >&5
3180   rm -rf conftest*
3181   ac_cv_mingw32=no
3182 fi
3183 rm -f conftest*
3184 fi
3185
3186 echo "$ac_t""$ac_cv_mingw32" 1>&6
3187 MINGW32=
3188 test "$ac_cv_mingw32" = yes && MINGW32=yes
3189 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3190 echo "configure:3191: checking for EMX OS/2 environment" >&5
3191 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3192   echo $ac_n "(cached) $ac_c" 1>&6
3193 else
3194   cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3197
3198 int main() {
3199 return __EMX__;
3200 ; return 0; }
3201 EOF
3202 if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3203   rm -rf conftest*
3204   ac_cv_emxos2=yes
3205 else
3206   echo "configure: failed program was:" >&5
3207   cat conftest.$ac_ext >&5
3208   rm -rf conftest*
3209   ac_cv_emxos2=no
3210 fi
3211 rm -f conftest*
3212 fi
3213
3214 echo "$ac_t""$ac_cv_emxos2" 1>&6
3215 EMXOS2=
3216 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3217 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3218 echo "configure:3219: checking how to run the C preprocessor" >&5
3219 # On Suns, sometimes $CPP names a directory.
3220 if test -n "$CPP" && test -d "$CPP"; then
3221   CPP=
3222 fi
3223 if test -z "$CPP"; then
3224 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3225   echo $ac_n "(cached) $ac_c" 1>&6
3226 else
3227     # This must be in double quotes, not single quotes, because CPP may get
3228   # substituted into the Makefile and "${CC-cc}" will confuse make.
3229   CPP="${CC-cc} -E"
3230   # On the NeXT, cc -E runs the code through the compiler's parser,
3231   # not just through cpp.
3232   cat > conftest.$ac_ext <<EOF
3233 #line 3234 "configure"
3234 #include "confdefs.h"
3235 #include <assert.h>
3236 Syntax Error
3237 EOF
3238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3239 { (eval echo configure:3240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3241 if test -z "$ac_err"; then
3242   :
3243 else
3244   echo "$ac_err" >&5
3245   echo "configure: failed program was:" >&5
3246   cat conftest.$ac_ext >&5
3247   rm -rf conftest*
3248   CPP="${CC-cc} -E -traditional-cpp"
3249   cat > conftest.$ac_ext <<EOF
3250 #line 3251 "configure"
3251 #include "confdefs.h"
3252 #include <assert.h>
3253 Syntax Error
3254 EOF
3255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3256 { (eval echo configure:3257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3258 if test -z "$ac_err"; then
3259   :
3260 else
3261   echo "$ac_err" >&5
3262   echo "configure: failed program was:" >&5
3263   cat conftest.$ac_ext >&5
3264   rm -rf conftest*
3265   CPP="${CC-cc} -nologo -E"
3266   cat > conftest.$ac_ext <<EOF
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269 #include <assert.h>
3270 Syntax Error
3271 EOF
3272 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3273 { (eval echo configure:3274: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3274 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3275 if test -z "$ac_err"; then
3276   :
3277 else
3278   echo "$ac_err" >&5
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   CPP=/lib/cpp
3283 fi
3284 rm -f conftest*
3285 fi
3286 rm -f conftest*
3287 fi
3288 rm -f conftest*
3289   ac_cv_prog_CPP="$CPP"
3290 fi
3291   CPP="$ac_cv_prog_CPP"
3292 else
3293   ac_cv_prog_CPP="$CPP"
3294 fi
3295 echo "$ac_t""$CPP" 1>&6
3296
3297 # Check whether --enable-fast-install or --disable-fast-install was given.
3298 if test "${enable_fast_install+set}" = set; then
3299   enableval="$enable_fast_install"
3300   p=${PACKAGE-default}
3301 case $enableval in
3302 yes) enable_fast_install=yes ;;
3303 no) enable_fast_install=no ;;
3304 *)
3305   enable_fast_install=no
3306   # Look at the argument we got.  We use all the common list separators.
3307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3308   for pkg in $enableval; do
3309     if test "X$pkg" = "X$p"; then
3310       enable_fast_install=yes
3311     fi
3312   done
3313   IFS="$ac_save_ifs"
3314   ;;
3315 esac
3316 else
3317   enable_fast_install=yes
3318 fi
3319
3320 # Extract the first word of "gcc", so it can be a program name with args.
3321 set dummy gcc; ac_word=$2
3322 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3323 echo "configure:3324: checking for $ac_word" >&5
3324 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3325   echo $ac_n "(cached) $ac_c" 1>&6
3326 else
3327   if test -n "$CC"; then
3328   ac_cv_prog_CC="$CC" # Let the user override the test.
3329 else
3330   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3331   ac_dummy="$PATH"
3332   for ac_dir in $ac_dummy; do
3333     test -z "$ac_dir" && ac_dir=.
3334     if test -f $ac_dir/$ac_word; then
3335       ac_cv_prog_CC="gcc"
3336       break
3337     fi
3338   done
3339   IFS="$ac_save_ifs"
3340 fi
3341 fi
3342 CC="$ac_cv_prog_CC"
3343 if test -n "$CC"; then
3344   echo "$ac_t""$CC" 1>&6
3345 else
3346   echo "$ac_t""no" 1>&6
3347 fi
3348
3349 if test -z "$CC"; then
3350   # Extract the first word of "cc", so it can be a program name with args.
3351 set dummy cc; ac_word=$2
3352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3353 echo "configure:3354: checking for $ac_word" >&5
3354 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   if test -n "$CC"; then
3358   ac_cv_prog_CC="$CC" # Let the user override the test.
3359 else
3360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3361   ac_prog_rejected=no
3362   ac_dummy="$PATH"
3363   for ac_dir in $ac_dummy; do
3364     test -z "$ac_dir" && ac_dir=.
3365     if test -f $ac_dir/$ac_word; then
3366       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3367         ac_prog_rejected=yes
3368         continue
3369       fi
3370       ac_cv_prog_CC="cc"
3371       break
3372     fi
3373   done
3374   IFS="$ac_save_ifs"
3375 if test $ac_prog_rejected = yes; then
3376   # We found a bogon in the path, so make sure we never use it.
3377   set dummy $ac_cv_prog_CC
3378   shift
3379   if test $# -gt 0; then
3380     # We chose a different compiler from the bogus one.
3381     # However, it has the same basename, so the bogon will be chosen
3382     # first if we set CC to just the basename; use the full file name.
3383     shift
3384     set dummy "$ac_dir/$ac_word" "$@"
3385     shift
3386     ac_cv_prog_CC="$@"
3387   fi
3388 fi
3389 fi
3390 fi
3391 CC="$ac_cv_prog_CC"
3392 if test -n "$CC"; then
3393   echo "$ac_t""$CC" 1>&6
3394 else
3395   echo "$ac_t""no" 1>&6
3396 fi
3397
3398   if test -z "$CC"; then
3399     case "`uname -s`" in
3400     *win32* | *WIN32* | *CYGWIN*)
3401       # Extract the first word of "cl", so it can be a program name with args.
3402 set dummy cl; ac_word=$2
3403 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3404 echo "configure:3405: checking for $ac_word" >&5
3405 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3406   echo $ac_n "(cached) $ac_c" 1>&6
3407 else
3408   if test -n "$CC"; then
3409   ac_cv_prog_CC="$CC" # Let the user override the test.
3410 else
3411   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3412   ac_dummy="$PATH"
3413   for ac_dir in $ac_dummy; do
3414     test -z "$ac_dir" && ac_dir=.
3415     if test -f $ac_dir/$ac_word; then
3416       ac_cv_prog_CC="cl"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421 fi
3422 fi
3423 CC="$ac_cv_prog_CC"
3424 if test -n "$CC"; then
3425   echo "$ac_t""$CC" 1>&6
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429  ;;
3430     esac
3431   fi
3432   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3433 fi
3434
3435 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3436 echo "configure:3437: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3437
3438 ac_ext=c
3439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3440 ac_cpp='$CPP $CPPFLAGS'
3441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3443 cross_compiling=$ac_cv_prog_cc_cross
3444
3445 cat > conftest.$ac_ext << EOF
3446
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449
3450 main(){return(0);}
3451 EOF
3452 if { (eval echo configure:3453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3453   ac_cv_prog_cc_works=yes
3454   # If we can't run a trivial program, we are probably using a cross compiler.
3455   if (./conftest; exit) 2>/dev/null; then
3456     ac_cv_prog_cc_cross=no
3457   else
3458     ac_cv_prog_cc_cross=yes
3459   fi
3460 else
3461   echo "configure: failed program was:" >&5
3462   cat conftest.$ac_ext >&5
3463   ac_cv_prog_cc_works=no
3464 fi
3465 rm -fr conftest*
3466 ac_ext=c
3467 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3468 ac_cpp='$CPP $CPPFLAGS'
3469 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3470 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3471 cross_compiling=$ac_cv_prog_cc_cross
3472
3473 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3474 if test $ac_cv_prog_cc_works = no; then
3475   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3476 fi
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3479 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3480 cross_compiling=$ac_cv_prog_cc_cross
3481
3482 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3483 echo "configure:3484: checking whether we are using GNU C" >&5
3484 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3485   echo $ac_n "(cached) $ac_c" 1>&6
3486 else
3487   cat > conftest.c <<EOF
3488 #ifdef __GNUC__
3489   yes;
3490 #endif
3491 EOF
3492 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3493   ac_cv_prog_gcc=yes
3494 else
3495   ac_cv_prog_gcc=no
3496 fi
3497 fi
3498
3499 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3500
3501 if test $ac_cv_prog_gcc = yes; then
3502   GCC=yes
3503 else
3504   GCC=
3505 fi
3506
3507 ac_test_CFLAGS="${CFLAGS+set}"
3508 ac_save_CFLAGS="$CFLAGS"
3509 CFLAGS=
3510 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3511 echo "configure:3512: checking whether ${CC-cc} accepts -g" >&5
3512 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3513   echo $ac_n "(cached) $ac_c" 1>&6
3514 else
3515   echo 'void f(){}' > conftest.c
3516 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3517   ac_cv_prog_cc_g=yes
3518 else
3519   ac_cv_prog_cc_g=no
3520 fi
3521 rm -f conftest*
3522
3523 fi
3524
3525 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3526 if test "$ac_test_CFLAGS" = set; then
3527   CFLAGS="$ac_save_CFLAGS"
3528 elif test $ac_cv_prog_cc_g = yes; then
3529   if test "$GCC" = yes; then
3530     CFLAGS="-g -O2"
3531   else
3532     CFLAGS="-g"
3533   fi
3534 else
3535   if test "$GCC" = yes; then
3536     CFLAGS="-O2"
3537   else
3538     CFLAGS=
3539   fi
3540 fi
3541
3542 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3543 if test "${with_gnu_ld+set}" = set; then
3544   withval="$with_gnu_ld"
3545   test "$withval" = no || with_gnu_ld=yes
3546 else
3547   with_gnu_ld=no
3548 fi
3549
3550 ac_prog=ld
3551 if test "$GCC" = yes; then
3552   # Check if gcc -print-prog-name=ld gives a path.
3553   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3554 echo "configure:3555: checking for ld used by GCC" >&5
3555   case $host in
3556   *-*-mingw*)
3557     # gcc leaves a trailing carriage return which upsets mingw
3558     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3559   *)
3560     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3561   esac
3562   case $ac_prog in
3563     # Accept absolute paths.
3564     [\\/]* | [A-Za-z]:[\\/]*)
3565       re_direlt='/[^/][^/]*/\.\./'
3566       # Canonicalize the path of ld
3567       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3568       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3569         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3570       done
3571       test -z "$LD" && LD="$ac_prog"
3572       ;;
3573   "")
3574     # If it fails, then pretend we aren't using GCC.
3575     ac_prog=ld
3576     ;;
3577   *)
3578     # If it is relative, then search for the first ld in PATH.
3579     with_gnu_ld=unknown
3580     ;;
3581   esac
3582 elif test "$with_gnu_ld" = yes; then
3583   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3584 echo "configure:3585: checking for GNU ld" >&5
3585 else
3586   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3587 echo "configure:3588: checking for non-GNU ld" >&5
3588 fi
3589 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   if test -z "$LD"; then
3593   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3594   for ac_dir in $PATH; do
3595     test -z "$ac_dir" && ac_dir=.
3596     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3597       lt_cv_path_LD="$ac_dir/$ac_prog"
3598       # Check to see if the program is GNU ld.  I'd rather use --version,
3599       # but apparently some GNU ld's only accept -v.
3600       # Break only if it was the GNU/non-GNU ld that we prefer.
3601       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3602         test "$with_gnu_ld" != no && break
3603       else
3604         test "$with_gnu_ld" != yes && break
3605       fi
3606     fi
3607   done
3608   IFS="$ac_save_ifs"
3609 else
3610   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3611 fi
3612 fi
3613
3614 LD="$lt_cv_path_LD"
3615 if test -n "$LD"; then
3616   echo "$ac_t""$LD" 1>&6
3617 else
3618   echo "$ac_t""no" 1>&6
3619 fi
3620 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3621 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3622 echo "configure:3623: checking if the linker ($LD) is GNU ld" >&5
3623 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3624   echo $ac_n "(cached) $ac_c" 1>&6
3625 else
3626   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3627 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3628   lt_cv_prog_gnu_ld=yes
3629 else
3630   lt_cv_prog_gnu_ld=no
3631 fi
3632 fi
3633
3634 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3635 with_gnu_ld=$lt_cv_prog_gnu_ld
3636
3637
3638 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3639 echo "configure:3640: checking for $LD option to reload object files" >&5
3640 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3641   echo $ac_n "(cached) $ac_c" 1>&6
3642 else
3643   lt_cv_ld_reload_flag='-r'
3644 fi
3645
3646 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3647 reload_flag=$lt_cv_ld_reload_flag
3648 test -n "$reload_flag" && reload_flag=" $reload_flag"
3649
3650 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3651 echo "configure:3652: checking for BSD-compatible nm" >&5
3652 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3653   echo $ac_n "(cached) $ac_c" 1>&6
3654 else
3655   if test -n "$NM"; then
3656   # Let the user override the test.
3657   lt_cv_path_NM="$NM"
3658 else
3659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3660   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3661     test -z "$ac_dir" && ac_dir=.
3662     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3663     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3664       # Check to see if the nm accepts a BSD-compat flag.
3665       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3666       #   nm: unknown option "B" ignored
3667       # Tru64's nm complains that /dev/null is an invalid object file
3668       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3669         lt_cv_path_NM="$tmp_nm -B"
3670         break
3671       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3672         lt_cv_path_NM="$tmp_nm -p"
3673         break
3674       else
3675         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3676         continue # so that we can try to find one that supports BSD flags
3677       fi
3678     fi
3679   done
3680   IFS="$ac_save_ifs"
3681   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3682 fi
3683 fi
3684
3685 NM="$lt_cv_path_NM"
3686 echo "$ac_t""$NM" 1>&6
3687
3688 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3689 echo "configure:3690: checking for a sed that does not truncate output" >&5
3690 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3691   echo $ac_n "(cached) $ac_c" 1>&6
3692 else
3693   # Loop through the user's path and test for sed and gsed.
3694 # Then use that list of sed's as ones to test for truncation.
3695 as_executable_p="test -f"
3696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3697 for as_dir in $PATH
3698 do
3699   IFS=$as_save_IFS
3700   test -z "$as_dir" && as_dir=.
3701   for ac_prog in sed gsed; do
3702     for ac_exec_ext in '' $ac_executable_extensions; do
3703       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3704         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3705       fi
3706     done
3707   done
3708 done
3709
3710   # Create a temporary directory, and hook for its removal unless debugging.
3711 $debug ||
3712 {
3713   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3714   trap '{ (exit 1); exit 1; }' 1 2 13 15
3715 }
3716
3717 # Create a (secure) tmp directory for tmp files.
3718 : ${TMPDIR=/tmp}
3719 {
3720   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3721   test -n "$tmp" && test -d "$tmp"
3722 }  ||
3723 {
3724   tmp=$TMPDIR/sed$$-$RANDOM
3725   (umask 077 && mkdir $tmp)
3726 } ||
3727 {
3728    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3729    { (exit 1); exit 1; }
3730 }
3731   _max=0
3732   _count=0
3733   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3734   # along with /bin/sed that truncates output.
3735   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3736     test ! -f ${_sed} && break
3737     cat /dev/null > "$tmp/sed.in"
3738     _count=0
3739     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3740     # Check for GNU sed and select it if it is found.
3741     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3742       lt_cv_path_SED=${_sed}
3743       break
3744     fi
3745     while true; do
3746       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3747       mv "$tmp/sed.tmp" "$tmp/sed.in"
3748       cp "$tmp/sed.in" "$tmp/sed.nl"
3749       echo >>"$tmp/sed.nl"
3750       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3751       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3752       # 40000 chars as input seems more than enough
3753       test $_count -gt 10 && break
3754       _count=`expr $_count + 1`
3755       if test $_count -gt $_max; then
3756         _max=$_count
3757         lt_cv_path_SED=$_sed
3758       fi
3759     done
3760   done
3761   rm -rf "$tmp"
3762
3763 fi
3764
3765 if test "X$SED" != "X"; then
3766   lt_cv_path_SED=$SED
3767 else
3768   SED=$lt_cv_path_SED
3769 fi
3770 echo "$ac_t""$SED" 1>&6
3771
3772 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3773 echo "configure:3774: checking whether ln -s works" >&5
3774 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3775   echo $ac_n "(cached) $ac_c" 1>&6
3776 else
3777   rm -f conftestdata
3778 if ln -s X conftestdata 2>/dev/null
3779 then
3780   rm -f conftestdata
3781   ac_cv_prog_LN_S="ln -s"
3782 else
3783   ac_cv_prog_LN_S=ln
3784 fi
3785 fi
3786 LN_S="$ac_cv_prog_LN_S"
3787 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3788   echo "$ac_t""yes" 1>&6
3789 else
3790   echo "$ac_t""no" 1>&6
3791 fi
3792
3793 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3794 echo "configure:3795: checking how to recognise dependent libraries" >&5
3795 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3796   echo $ac_n "(cached) $ac_c" 1>&6
3797 else
3798   lt_cv_file_magic_cmd='$MAGIC_CMD'
3799 lt_cv_file_magic_test_file=
3800 lt_cv_deplibs_check_method='unknown'
3801 # Need to set the preceding variable on all platforms that support
3802 # interlibrary dependencies.
3803 # 'none' -- dependencies not supported.
3804 # `unknown' -- same as none, but documents that we really don't know.
3805 # 'pass_all' -- all dependencies passed with no checks.
3806 # 'test_compile' -- check by making test program.
3807 # 'file_magic [[regex]]' -- check by looking for files in library path
3808 # which responds to the $file_magic_cmd with a given egrep regex.
3809 # If you have `file' or equivalent on your system and you're not sure
3810 # whether `pass_all' will *always* work, you probably want this one.
3811
3812 case $host_os in
3813 aix4* | aix5*)
3814   lt_cv_deplibs_check_method=pass_all
3815   ;;
3816
3817 beos*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 bsdi4*)
3822   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3823   lt_cv_file_magic_cmd='/usr/bin/file -L'
3824   lt_cv_file_magic_test_file=/shlib/libc.so
3825   ;;
3826
3827 cygwin* | mingw* | pw32*)
3828   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3829   lt_cv_file_magic_cmd='$OBJDUMP -f'
3830   ;;
3831
3832 darwin* | rhapsody*)
3833   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3834   lt_cv_file_magic_cmd='/usr/bin/file -L'
3835   case "$host_os" in
3836   rhapsody* | darwin1.[012])
3837     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3838     ;;
3839   *) # Darwin 1.3 on
3840     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3841     ;;
3842   esac
3843   ;;
3844
3845 freebsd*)
3846   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3847     case $host_cpu in
3848     i*86 )
3849       # Not sure whether the presence of OpenBSD here was a mistake.
3850       # Let's accept both of them until this is cleared up.
3851       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3852       lt_cv_file_magic_cmd=/usr/bin/file
3853       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3854       ;;
3855     esac
3856   else
3857     lt_cv_deplibs_check_method=pass_all
3858   fi
3859   ;;
3860
3861 gnu*)
3862   lt_cv_deplibs_check_method=pass_all
3863   ;;
3864
3865 hpux10.20*|hpux11*)
3866   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3867   lt_cv_file_magic_cmd=/usr/bin/file
3868   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3869   ;;
3870
3871 irix5* | irix6* | nonstopux*)
3872   case $host_os in
3873   irix5* | nonstopux*)
3874     # this will be overridden with pass_all, but let us keep it just in case
3875     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3876     ;;
3877   *)
3878     case $LD in
3879     *-32|*"-32 ") libmagic=32-bit;;
3880     *-n32|*"-n32 ") libmagic=N32;;
3881     *-64|*"-64 ") libmagic=64-bit;;
3882     *) libmagic=never-match;;
3883     esac
3884     # this will be overridden with pass_all, but let us keep it just in case
3885     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3886     ;;
3887   esac
3888   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3889   lt_cv_deplibs_check_method=pass_all
3890   ;;
3891
3892 # This must be Linux ELF.
3893 linux-gnu*)
3894   case $host_cpu in
3895   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3896     lt_cv_deplibs_check_method=pass_all ;;
3897   *)
3898     # glibc up to 2.1.1 does not perform some relocations on ARM
3899     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3900   esac
3901   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3902   ;;
3903
3904 netbsd*)
3905   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3906     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3907   else
3908     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3909   fi
3910   ;;
3911
3912 newos6*)
3913   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3914   lt_cv_file_magic_cmd=/usr/bin/file
3915   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3916   ;;
3917
3918 openbsd*)
3919   lt_cv_file_magic_cmd=/usr/bin/file
3920   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3921   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3922     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3923   else
3924     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3925   fi
3926   ;;
3927
3928 osf3* | osf4* | osf5*)
3929   # this will be overridden with pass_all, but let us keep it just in case
3930   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3931   lt_cv_file_magic_test_file=/shlib/libc.so
3932   lt_cv_deplibs_check_method=pass_all
3933   ;;
3934
3935 sco3.2v5*)
3936   lt_cv_deplibs_check_method=pass_all
3937   ;;
3938
3939 solaris*)
3940   lt_cv_deplibs_check_method=pass_all
3941   lt_cv_file_magic_test_file=/lib/libc.so
3942   ;;
3943
3944 sysv5uw[78]* | sysv4*uw2*)
3945   lt_cv_deplibs_check_method=pass_all
3946   ;;
3947
3948 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3949   case $host_vendor in
3950   motorola)
3951     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]'
3952     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3953     ;;
3954   ncr)
3955     lt_cv_deplibs_check_method=pass_all
3956     ;;
3957   sequent)
3958     lt_cv_file_magic_cmd='/bin/file'
3959     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3960     ;;
3961   sni)
3962     lt_cv_file_magic_cmd='/bin/file'
3963     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3964     lt_cv_file_magic_test_file=/lib/libc.so
3965     ;;
3966   siemens)
3967     lt_cv_deplibs_check_method=pass_all
3968     ;;
3969   esac
3970   ;;
3971 esac
3972
3973 fi
3974
3975 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3976 file_magic_cmd=$lt_cv_file_magic_cmd
3977 deplibs_check_method=$lt_cv_deplibs_check_method
3978
3979 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3980 echo "configure:3981: checking for object suffix" >&5
3981 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3982   echo $ac_n "(cached) $ac_c" 1>&6
3983 else
3984   rm -f conftest*
3985 echo 'int i = 1;' > conftest.$ac_ext
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987   for ac_file in conftest.*; do
3988     case $ac_file in
3989     *.c) ;;
3990     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3991     esac
3992   done
3993 else
3994   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3995 fi
3996 rm -f conftest*
3997 fi
3998
3999 echo "$ac_t""$ac_cv_objext" 1>&6
4000 OBJEXT=$ac_cv_objext
4001 ac_objext=$ac_cv_objext
4002
4003
4004
4005
4006 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4007 echo "configure:4008: checking for executable suffix" >&5
4008 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4012   ac_cv_exeext=.exe
4013 else
4014   rm -f conftest*
4015   echo 'int main () { return 0; }' > conftest.$ac_ext
4016   ac_cv_exeext=
4017   if { (eval echo configure:4018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4018     for file in conftest.*; do
4019       case $file in
4020       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4021       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4022       esac
4023     done
4024   else
4025     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4026   fi
4027   rm -f conftest*
4028   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4029 fi
4030 fi
4031
4032 EXEEXT=""
4033 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4034 echo "$ac_t""${ac_cv_exeext}" 1>&6
4035 ac_exeext=$EXEEXT
4036
4037 if test $host != $build; then
4038   ac_tool_prefix=${host_alias}-
4039 else
4040   ac_tool_prefix=
4041 fi
4042
4043
4044
4045
4046 # Check for command to grab the raw symbol name followed by C symbol from nm.
4047 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4048 echo "configure:4049: checking command to parse $NM output" >&5
4049 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4050   echo $ac_n "(cached) $ac_c" 1>&6
4051 else
4052   
4053 # These are sane defaults that work on at least a few old systems.
4054 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4055
4056 # Character class describing NM global symbol codes.
4057 symcode='[BCDEGRST]'
4058
4059 # Regexp to match symbols that can be accessed directly from C.
4060 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4061
4062 # Transform the above into a raw symbol and a C symbol.
4063 symxfrm='\1 \2\3 \3'
4064
4065 # Transform an extracted symbol line into a proper C declaration
4066 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4067
4068 # Transform an extracted symbol line into symbol name and symbol address
4069 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'"
4070
4071 # Define system-specific variables.
4072 case $host_os in
4073 aix*)
4074   symcode='[BCDT]'
4075   ;;
4076 cygwin* | mingw* | pw32*)
4077   symcode='[ABCDGISTW]'
4078   ;;
4079 hpux*) # Its linker distinguishes data from code symbols
4080   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4081   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'"
4082   ;;
4083 irix* | nonstopux*)
4084   symcode='[BCDEGRST]'
4085   ;;
4086 osf*)
4087   symcode='[BCDEGQRST]'
4088   ;;
4089 solaris* | sysv5*)
4090   symcode='[BDT]'
4091   ;;
4092 sysv4)
4093   symcode='[DFNSTU]'
4094   ;;
4095 esac
4096
4097 # Handle CRLF in mingw tool chain
4098 opt_cr=
4099 case $host_os in
4100 mingw*)
4101   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4102   ;;
4103 esac
4104
4105 # If we're using GNU nm, then use its standard symbol codes.
4106 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4107   symcode='[ABCDGISTW]'
4108 fi
4109
4110 # Try without a prefix undercore, then with it.
4111 for ac_symprfx in "" "_"; do
4112
4113   # Write the raw and C identifiers.
4114 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4115
4116   # Check to see that the pipe works correctly.
4117   pipe_works=no
4118   rm -f conftest*
4119   cat > conftest.$ac_ext <<EOF
4120 #ifdef __cplusplus
4121 extern "C" {
4122 #endif
4123 char nm_test_var;
4124 void nm_test_func(){}
4125 #ifdef __cplusplus
4126 }
4127 #endif
4128 int main(){nm_test_var='a';nm_test_func();return(0);}
4129 EOF
4130
4131   if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4132     # Now try to grab the symbols.
4133     nlist=conftest.nm
4134     if { (eval echo configure:4135: \"$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
4135       # Try sorting and uniquifying the output.
4136       if sort "$nlist" | uniq > "$nlist"T; then
4137         mv -f "$nlist"T "$nlist"
4138       else
4139         rm -f "$nlist"T
4140       fi
4141
4142       # Make sure that we snagged all the symbols we need.
4143       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4144         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4145           cat <<EOF > conftest.$ac_ext
4146 #ifdef __cplusplus
4147 extern "C" {
4148 #endif
4149
4150 EOF
4151           # Now generate the symbol file.
4152           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4153
4154           cat <<EOF >> conftest.$ac_ext
4155 #if defined (__STDC__) && __STDC__
4156 # define lt_ptr void *
4157 #else
4158 # define lt_ptr char *
4159 # define const
4160 #endif
4161
4162 /* The mapping between symbol names and symbols. */
4163 const struct {
4164   const char *name;
4165   lt_ptr address;
4166 }
4167 lt_preloaded_symbols[] =
4168 {
4169 EOF
4170           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4171           cat <<\EOF >> conftest.$ac_ext
4172   {0, (lt_ptr) 0}
4173 };
4174
4175 #ifdef __cplusplus
4176 }
4177 #endif
4178 EOF
4179           # Now try linking the two files.
4180           mv conftest.$ac_objext conftstm.$ac_objext
4181           save_LIBS="$LIBS"
4182           save_CFLAGS="$CFLAGS"
4183           LIBS="conftstm.$ac_objext"
4184           CFLAGS="$CFLAGS$no_builtin_flag"
4185           if { (eval echo configure:4186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4186             pipe_works=yes
4187           fi
4188           LIBS="$save_LIBS"
4189           CFLAGS="$save_CFLAGS"
4190         else
4191           echo "cannot find nm_test_func in $nlist" >&5
4192         fi
4193       else
4194         echo "cannot find nm_test_var in $nlist" >&5
4195       fi
4196     else
4197       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4198     fi
4199   else
4200     echo "$progname: failed program was:" >&5
4201     cat conftest.$ac_ext >&5
4202   fi
4203   rm -f conftest* conftst*
4204
4205   # Do not use the global_symbol_pipe unless it works.
4206   if test "$pipe_works" = yes; then
4207     break
4208   else
4209     lt_cv_sys_global_symbol_pipe=
4210   fi
4211 done
4212
4213 fi
4214
4215 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4216 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4217   global_symbol_to_cdecl=
4218   global_symbol_to_c_name_address=
4219 else
4220   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4221   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4222 fi
4223 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4224 then
4225   echo "$ac_t""failed" 1>&6
4226 else
4227   echo "$ac_t""ok" 1>&6
4228 fi
4229
4230 for ac_hdr in dlfcn.h
4231 do
4232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4234 echo "configure:4235: checking for $ac_hdr" >&5
4235 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4236   echo $ac_n "(cached) $ac_c" 1>&6
4237 else
4238   cat > conftest.$ac_ext <<EOF
4239 #line 4240 "configure"
4240 #include "confdefs.h"
4241 #include <$ac_hdr>
4242 EOF
4243 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4244 { (eval echo configure:4245: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4245 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4246 if test -z "$ac_err"; then
4247   rm -rf conftest*
4248   eval "ac_cv_header_$ac_safe=yes"
4249 else
4250   echo "$ac_err" >&5
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -rf conftest*
4254   eval "ac_cv_header_$ac_safe=no"
4255 fi
4256 rm -f conftest*
4257 fi
4258 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4259   echo "$ac_t""yes" 1>&6
4260     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4261   cat >> confdefs.h <<EOF
4262 #define $ac_tr_hdr 1
4263 EOF
4264  
4265 else
4266   echo "$ac_t""no" 1>&6
4267 fi
4268 done
4269
4270
4271
4272
4273
4274
4275 # Only perform the check for file, if the check method requires it
4276 case $deplibs_check_method in
4277 file_magic*)
4278   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4279     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4280 echo "configure:4281: checking for ${ac_tool_prefix}file" >&5
4281 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4282   echo $ac_n "(cached) $ac_c" 1>&6
4283 else
4284   case $MAGIC_CMD in
4285   /*)
4286   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4287   ;;
4288   ?:/*)
4289   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4290   ;;
4291   *)
4292   ac_save_MAGIC_CMD="$MAGIC_CMD"
4293   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4294   ac_dummy="/usr/bin:$PATH"
4295   for ac_dir in $ac_dummy; do
4296     test -z "$ac_dir" && ac_dir=.
4297     if test -f $ac_dir/${ac_tool_prefix}file; then
4298       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4299       if test -n "$file_magic_test_file"; then
4300         case $deplibs_check_method in
4301         "file_magic "*)
4302           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4303           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4304           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4305             egrep "$file_magic_regex" > /dev/null; then
4306             :
4307           else
4308             cat <<EOF 1>&2
4309
4310 *** Warning: the command libtool uses to detect shared libraries,
4311 *** $file_magic_cmd, produces output that libtool cannot recognize.
4312 *** The result is that libtool may fail to recognize shared libraries
4313 *** as such.  This will affect the creation of libtool libraries that
4314 *** depend on shared libraries, but programs linked with such libtool
4315 *** libraries will work regardless of this problem.  Nevertheless, you
4316 *** may want to report the problem to your system manager and/or to
4317 *** bug-libtool@gnu.org
4318
4319 EOF
4320           fi ;;
4321         esac
4322       fi
4323       break
4324     fi
4325   done
4326   IFS="$ac_save_ifs"
4327   MAGIC_CMD="$ac_save_MAGIC_CMD"
4328   ;;
4329 esac
4330 fi
4331
4332 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4333 if test -n "$MAGIC_CMD"; then
4334   echo "$ac_t""$MAGIC_CMD" 1>&6
4335 else
4336   echo "$ac_t""no" 1>&6
4337 fi
4338
4339 if test -z "$lt_cv_path_MAGIC_CMD"; then
4340   if test -n "$ac_tool_prefix"; then
4341     echo $ac_n "checking for file""... $ac_c" 1>&6
4342 echo "configure:4343: checking for file" >&5
4343 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4344   echo $ac_n "(cached) $ac_c" 1>&6
4345 else
4346   case $MAGIC_CMD in
4347   /*)
4348   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4349   ;;
4350   ?:/*)
4351   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4352   ;;
4353   *)
4354   ac_save_MAGIC_CMD="$MAGIC_CMD"
4355   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4356   ac_dummy="/usr/bin:$PATH"
4357   for ac_dir in $ac_dummy; do
4358     test -z "$ac_dir" && ac_dir=.
4359     if test -f $ac_dir/file; then
4360       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4361       if test -n "$file_magic_test_file"; then
4362         case $deplibs_check_method in
4363         "file_magic "*)
4364           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4365           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4366           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4367             egrep "$file_magic_regex" > /dev/null; then
4368             :
4369           else
4370             cat <<EOF 1>&2
4371
4372 *** Warning: the command libtool uses to detect shared libraries,
4373 *** $file_magic_cmd, produces output that libtool cannot recognize.
4374 *** The result is that libtool may fail to recognize shared libraries
4375 *** as such.  This will affect the creation of libtool libraries that
4376 *** depend on shared libraries, but programs linked with such libtool
4377 *** libraries will work regardless of this problem.  Nevertheless, you
4378 *** may want to report the problem to your system manager and/or to
4379 *** bug-libtool@gnu.org
4380
4381 EOF
4382           fi ;;
4383         esac
4384       fi
4385       break
4386     fi
4387   done
4388   IFS="$ac_save_ifs"
4389   MAGIC_CMD="$ac_save_MAGIC_CMD"
4390   ;;
4391 esac
4392 fi
4393
4394 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4395 if test -n "$MAGIC_CMD"; then
4396   echo "$ac_t""$MAGIC_CMD" 1>&6
4397 else
4398   echo "$ac_t""no" 1>&6
4399 fi
4400
4401   else
4402     MAGIC_CMD=:
4403   fi
4404 fi
4405
4406   fi
4407   ;;
4408 esac
4409
4410 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4411 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_word" >&5
4414 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   if test -n "$RANLIB"; then
4418   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4419 else
4420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4421   ac_dummy="$PATH"
4422   for ac_dir in $ac_dummy; do
4423     test -z "$ac_dir" && ac_dir=.
4424     if test -f $ac_dir/$ac_word; then
4425       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4426       break
4427     fi
4428   done
4429   IFS="$ac_save_ifs"
4430 fi
4431 fi
4432 RANLIB="$ac_cv_prog_RANLIB"
4433 if test -n "$RANLIB"; then
4434   echo "$ac_t""$RANLIB" 1>&6
4435 else
4436   echo "$ac_t""no" 1>&6
4437 fi
4438
4439
4440 if test -z "$ac_cv_prog_RANLIB"; then
4441 if test -n "$ac_tool_prefix"; then
4442   # Extract the first word of "ranlib", so it can be a program name with args.
4443 set dummy ranlib; ac_word=$2
4444 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4445 echo "configure:4446: checking for $ac_word" >&5
4446 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4447   echo $ac_n "(cached) $ac_c" 1>&6
4448 else
4449   if test -n "$RANLIB"; then
4450   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4451 else
4452   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4453   ac_dummy="$PATH"
4454   for ac_dir in $ac_dummy; do
4455     test -z "$ac_dir" && ac_dir=.
4456     if test -f $ac_dir/$ac_word; then
4457       ac_cv_prog_RANLIB="ranlib"
4458       break
4459     fi
4460   done
4461   IFS="$ac_save_ifs"
4462   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4463 fi
4464 fi
4465 RANLIB="$ac_cv_prog_RANLIB"
4466 if test -n "$RANLIB"; then
4467   echo "$ac_t""$RANLIB" 1>&6
4468 else
4469   echo "$ac_t""no" 1>&6
4470 fi
4471
4472 else
4473   RANLIB=":"
4474 fi
4475 fi
4476
4477 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4478 set dummy ${ac_tool_prefix}strip; ac_word=$2
4479 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4480 echo "configure:4481: checking for $ac_word" >&5
4481 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4482   echo $ac_n "(cached) $ac_c" 1>&6
4483 else
4484   if test -n "$STRIP"; then
4485   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4486 else
4487   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4488   ac_dummy="$PATH"
4489   for ac_dir in $ac_dummy; do
4490     test -z "$ac_dir" && ac_dir=.
4491     if test -f $ac_dir/$ac_word; then
4492       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4493       break
4494     fi
4495   done
4496   IFS="$ac_save_ifs"
4497 fi
4498 fi
4499 STRIP="$ac_cv_prog_STRIP"
4500 if test -n "$STRIP"; then
4501   echo "$ac_t""$STRIP" 1>&6
4502 else
4503   echo "$ac_t""no" 1>&6
4504 fi
4505
4506
4507 if test -z "$ac_cv_prog_STRIP"; then
4508 if test -n "$ac_tool_prefix"; then
4509   # Extract the first word of "strip", so it can be a program name with args.
4510 set dummy strip; ac_word=$2
4511 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4512 echo "configure:4513: checking for $ac_word" >&5
4513 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4514   echo $ac_n "(cached) $ac_c" 1>&6
4515 else
4516   if test -n "$STRIP"; then
4517   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4518 else
4519   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4520   ac_dummy="$PATH"
4521   for ac_dir in $ac_dummy; do
4522     test -z "$ac_dir" && ac_dir=.
4523     if test -f $ac_dir/$ac_word; then
4524       ac_cv_prog_STRIP="strip"
4525       break
4526     fi
4527   done
4528   IFS="$ac_save_ifs"
4529   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4530 fi
4531 fi
4532 STRIP="$ac_cv_prog_STRIP"
4533 if test -n "$STRIP"; then
4534   echo "$ac_t""$STRIP" 1>&6
4535 else
4536   echo "$ac_t""no" 1>&6
4537 fi
4538
4539 else
4540   STRIP=":"
4541 fi
4542 fi
4543
4544
4545 enable_dlopen=yes
4546 enable_win32_dll=yes
4547
4548 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4549 if test "${enable_libtool_lock+set}" = set; then
4550   enableval="$enable_libtool_lock"
4551   :
4552 fi
4553
4554 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4555
4556 # Some flags need to be propagated to the compiler or linker for good
4557 # libtool support.
4558 case $host in
4559 *-*-irix6*)
4560   # Find out which ABI we are using.
4561   echo '#line 4562 "configure"' > conftest.$ac_ext
4562   if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4563     case `/usr/bin/file conftest.$ac_objext` in
4564     *32-bit*)
4565       LD="${LD-ld} -32"
4566       ;;
4567     *N32*)
4568       LD="${LD-ld} -n32"
4569       ;;
4570     *64-bit*)
4571       LD="${LD-ld} -64"
4572       ;;
4573     esac
4574   fi
4575   rm -rf conftest*
4576   ;;
4577
4578 *-*-sco3.2v5*)
4579   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4580   SAVE_CFLAGS="$CFLAGS"
4581   CFLAGS="$CFLAGS -belf"
4582   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4583 echo "configure:4584: checking whether the C compiler needs -belf" >&5
4584 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4585   echo $ac_n "(cached) $ac_c" 1>&6
4586 else
4587   
4588      ac_ext=c
4589 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4590 ac_cpp='$CPP $CPPFLAGS'
4591 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4592 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4593 cross_compiling=$ac_cv_prog_cc_cross
4594
4595      cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598
4599 int main() {
4600
4601 ; return 0; }
4602 EOF
4603 if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4604   rm -rf conftest*
4605   lt_cv_cc_needs_belf=yes
4606 else
4607   echo "configure: failed program was:" >&5
4608   cat conftest.$ac_ext >&5
4609   rm -rf conftest*
4610   lt_cv_cc_needs_belf=no
4611 fi
4612 rm -f conftest*
4613      ac_ext=c
4614 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4615 ac_cpp='$CPP $CPPFLAGS'
4616 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4617 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4618 cross_compiling=$ac_cv_prog_cc_cross
4619
4620 fi
4621
4622 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4623   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4624     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4625     CFLAGS="$SAVE_CFLAGS"
4626   fi
4627   ;;
4628
4629 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4630   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4631 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_word" >&5
4634 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   if test -n "$DLLTOOL"; then
4638   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4639 else
4640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4641   ac_dummy="$PATH"
4642   for ac_dir in $ac_dummy; do
4643     test -z "$ac_dir" && ac_dir=.
4644     if test -f $ac_dir/$ac_word; then
4645       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4646       break
4647     fi
4648   done
4649   IFS="$ac_save_ifs"
4650 fi
4651 fi
4652 DLLTOOL="$ac_cv_prog_DLLTOOL"
4653 if test -n "$DLLTOOL"; then
4654   echo "$ac_t""$DLLTOOL" 1>&6
4655 else
4656   echo "$ac_t""no" 1>&6
4657 fi
4658
4659
4660 if test -z "$ac_cv_prog_DLLTOOL"; then
4661 if test -n "$ac_tool_prefix"; then
4662   # Extract the first word of "dlltool", so it can be a program name with args.
4663 set dummy dlltool; ac_word=$2
4664 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4665 echo "configure:4666: checking for $ac_word" >&5
4666 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4667   echo $ac_n "(cached) $ac_c" 1>&6
4668 else
4669   if test -n "$DLLTOOL"; then
4670   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4671 else
4672   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4673   ac_dummy="$PATH"
4674   for ac_dir in $ac_dummy; do
4675     test -z "$ac_dir" && ac_dir=.
4676     if test -f $ac_dir/$ac_word; then
4677       ac_cv_prog_DLLTOOL="dlltool"
4678       break
4679     fi
4680   done
4681   IFS="$ac_save_ifs"
4682   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4683 fi
4684 fi
4685 DLLTOOL="$ac_cv_prog_DLLTOOL"
4686 if test -n "$DLLTOOL"; then
4687   echo "$ac_t""$DLLTOOL" 1>&6
4688 else
4689   echo "$ac_t""no" 1>&6
4690 fi
4691
4692 else
4693   DLLTOOL="false"
4694 fi
4695 fi
4696
4697   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4698 set dummy ${ac_tool_prefix}as; ac_word=$2
4699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_word" >&5
4701 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   if test -n "$AS"; then
4705   ac_cv_prog_AS="$AS" # Let the user override the test.
4706 else
4707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4708   ac_dummy="$PATH"
4709   for ac_dir in $ac_dummy; do
4710     test -z "$ac_dir" && ac_dir=.
4711     if test -f $ac_dir/$ac_word; then
4712       ac_cv_prog_AS="${ac_tool_prefix}as"
4713       break
4714     fi
4715   done
4716   IFS="$ac_save_ifs"
4717 fi
4718 fi
4719 AS="$ac_cv_prog_AS"
4720 if test -n "$AS"; then
4721   echo "$ac_t""$AS" 1>&6
4722 else
4723   echo "$ac_t""no" 1>&6
4724 fi
4725
4726
4727 if test -z "$ac_cv_prog_AS"; then
4728 if test -n "$ac_tool_prefix"; then
4729   # Extract the first word of "as", so it can be a program name with args.
4730 set dummy as; ac_word=$2
4731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4732 echo "configure:4733: checking for $ac_word" >&5
4733 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4734   echo $ac_n "(cached) $ac_c" 1>&6
4735 else
4736   if test -n "$AS"; then
4737   ac_cv_prog_AS="$AS" # Let the user override the test.
4738 else
4739   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4740   ac_dummy="$PATH"
4741   for ac_dir in $ac_dummy; do
4742     test -z "$ac_dir" && ac_dir=.
4743     if test -f $ac_dir/$ac_word; then
4744       ac_cv_prog_AS="as"
4745       break
4746     fi
4747   done
4748   IFS="$ac_save_ifs"
4749   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4750 fi
4751 fi
4752 AS="$ac_cv_prog_AS"
4753 if test -n "$AS"; then
4754   echo "$ac_t""$AS" 1>&6
4755 else
4756   echo "$ac_t""no" 1>&6
4757 fi
4758
4759 else
4760   AS="false"
4761 fi
4762 fi
4763
4764   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4765 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4767 echo "configure:4768: checking for $ac_word" >&5
4768 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4769   echo $ac_n "(cached) $ac_c" 1>&6
4770 else
4771   if test -n "$OBJDUMP"; then
4772   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4773 else
4774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4775   ac_dummy="$PATH"
4776   for ac_dir in $ac_dummy; do
4777     test -z "$ac_dir" && ac_dir=.
4778     if test -f $ac_dir/$ac_word; then
4779       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4780       break
4781     fi
4782   done
4783   IFS="$ac_save_ifs"
4784 fi
4785 fi
4786 OBJDUMP="$ac_cv_prog_OBJDUMP"
4787 if test -n "$OBJDUMP"; then
4788   echo "$ac_t""$OBJDUMP" 1>&6
4789 else
4790   echo "$ac_t""no" 1>&6
4791 fi
4792
4793
4794 if test -z "$ac_cv_prog_OBJDUMP"; then
4795 if test -n "$ac_tool_prefix"; then
4796   # Extract the first word of "objdump", so it can be a program name with args.
4797 set dummy objdump; ac_word=$2
4798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4799 echo "configure:4800: checking for $ac_word" >&5
4800 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4801   echo $ac_n "(cached) $ac_c" 1>&6
4802 else
4803   if test -n "$OBJDUMP"; then
4804   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4805 else
4806   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4807   ac_dummy="$PATH"
4808   for ac_dir in $ac_dummy; do
4809     test -z "$ac_dir" && ac_dir=.
4810     if test -f $ac_dir/$ac_word; then
4811       ac_cv_prog_OBJDUMP="objdump"
4812       break
4813     fi
4814   done
4815   IFS="$ac_save_ifs"
4816   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4817 fi
4818 fi
4819 OBJDUMP="$ac_cv_prog_OBJDUMP"
4820 if test -n "$OBJDUMP"; then
4821   echo "$ac_t""$OBJDUMP" 1>&6
4822 else
4823   echo "$ac_t""no" 1>&6
4824 fi
4825
4826 else
4827   OBJDUMP="false"
4828 fi
4829 fi
4830
4831
4832   # recent cygwin and mingw systems supply a stub DllMain which the user
4833   # can override, but on older systems we have to supply one
4834   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4835 echo "configure:4836: checking if libtool should supply DllMain function" >&5
4836 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   cat > conftest.$ac_ext <<EOF
4840 #line 4841 "configure"
4841 #include "confdefs.h"
4842
4843 int main() {
4844 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4845       DllMain (0, 0, 0);
4846 ; return 0; }
4847 EOF
4848 if { (eval echo configure:4849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4849   rm -rf conftest*
4850   lt_cv_need_dllmain=no
4851 else
4852   echo "configure: failed program was:" >&5
4853   cat conftest.$ac_ext >&5
4854   rm -rf conftest*
4855   lt_cv_need_dllmain=yes
4856 fi
4857 rm -f conftest*
4858 fi
4859
4860 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4861
4862   case $host/$CC in
4863   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4864     # old mingw systems require "-dll" to link a DLL, while more recent ones
4865     # require "-mdll"
4866     SAVE_CFLAGS="$CFLAGS"
4867     CFLAGS="$CFLAGS -mdll"
4868     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4869 echo "configure:4870: checking how to link DLLs" >&5
4870 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4871   echo $ac_n "(cached) $ac_c" 1>&6
4872 else
4873   cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4876
4877 int main() {
4878
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4882   rm -rf conftest*
4883   lt_cv_cc_dll_switch=-mdll
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   lt_cv_cc_dll_switch=-dll
4889 fi
4890 rm -f conftest*
4891 fi
4892
4893 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4894     CFLAGS="$SAVE_CFLAGS" ;;
4895   *-*-cygwin* | *-*-pw32*)
4896     # cygwin systems need to pass --dll to the linker, and not link
4897     # crt.o which will require a WinMain@16 definition.
4898     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4899   esac
4900   ;;
4901   
4902 esac
4903
4904 # Sed substitution that helps us do robust quoting.  It backslashifies
4905 # metacharacters that are still active within double-quoted strings.
4906 Xsed='sed -e s/^X//'
4907 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4908
4909 # Same as above, but do not quote variable references.
4910 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4911
4912 # Sed substitution to delay expansion of an escaped shell variable in a
4913 # double_quote_subst'ed string.
4914 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4915
4916 # Constants:
4917 rm="rm -f"
4918
4919 # Global variables:
4920 default_ofile=libtool
4921 can_build_shared=yes
4922
4923 # All known linkers require a `.a' archive for static linking (except M$VC,
4924 # which needs '.lib').
4925 libext=a
4926 ltmain="$ac_aux_dir/ltmain.sh"
4927 ofile="$default_ofile"
4928 with_gnu_ld="$lt_cv_prog_gnu_ld"
4929 need_locks="$enable_libtool_lock"
4930
4931 old_CC="$CC"
4932 old_CFLAGS="$CFLAGS"
4933
4934 # Set sane defaults for various variables
4935 test -z "$AR" && AR=ar
4936 test -z "$AR_FLAGS" && AR_FLAGS=cru
4937 test -z "$AS" && AS=as
4938 test -z "$CC" && CC=cc
4939 test -z "$DLLTOOL" && DLLTOOL=dlltool
4940 test -z "$LD" && LD=ld
4941 test -z "$LN_S" && LN_S="ln -s"
4942 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4943 test -z "$NM" && NM=nm
4944 test -z "$OBJDUMP" && OBJDUMP=objdump
4945 test -z "$RANLIB" && RANLIB=:
4946 test -z "$STRIP" && STRIP=:
4947 test -z "$ac_objext" && ac_objext=o
4948
4949 if test x"$host" != x"$build"; then
4950   ac_tool_prefix=${host_alias}-
4951 else
4952   ac_tool_prefix=
4953 fi
4954
4955 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4956 case $host_os in
4957 linux-gnu*) ;;
4958 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4959 esac
4960
4961 case $host_os in
4962 aix3*)
4963   # AIX sometimes has problems with the GCC collect2 program.  For some
4964   # reason, if we set the COLLECT_NAMES environment variable, the problems
4965   # vanish in a puff of smoke.
4966   if test "X${COLLECT_NAMES+set}" != Xset; then
4967     COLLECT_NAMES=
4968     export COLLECT_NAMES
4969   fi
4970   ;;
4971 esac
4972
4973 # Determine commands to create old-style static archives.
4974 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4975 old_postinstall_cmds='chmod 644 $oldlib'
4976 old_postuninstall_cmds=
4977
4978 if test -n "$RANLIB"; then
4979   case $host_os in
4980   openbsd*)
4981     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4982     ;;
4983   *)
4984     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4985     ;;
4986   esac
4987   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4988 fi
4989
4990 # Allow CC to be a program name with arguments.
4991 set dummy $CC
4992 compiler="$2"
4993
4994 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4995 echo "configure:4996: checking for objdir" >&5
4996 rm -f .libs 2>/dev/null
4997 mkdir .libs 2>/dev/null
4998 if test -d .libs; then
4999   objdir=.libs
5000 else
5001   # MS-DOS does not allow filenames that begin with a dot.
5002   objdir=_libs
5003 fi
5004 rmdir .libs 2>/dev/null
5005 echo "$ac_t""$objdir" 1>&6
5006
5007
5008 # Check whether --with-pic or --without-pic was given.
5009 if test "${with_pic+set}" = set; then
5010   withval="$with_pic"
5011   pic_mode="$withval"
5012 else
5013   pic_mode=default
5014 fi
5015
5016 test -z "$pic_mode" && pic_mode=default
5017
5018 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5019 # in isolation, and that seeing it set (from the cache) indicates that
5020 # the associated values are set (in the cache) correctly too.
5021 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5022 echo "configure:5023: checking for $compiler option to produce PIC" >&5
5023 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5024   echo $ac_n "(cached) $ac_c" 1>&6
5025 else
5026    lt_cv_prog_cc_pic=
5027   lt_cv_prog_cc_shlib=
5028   lt_cv_prog_cc_wl=
5029   lt_cv_prog_cc_static=
5030   lt_cv_prog_cc_no_builtin=
5031   lt_cv_prog_cc_can_build_shared=$can_build_shared
5032
5033   if test "$GCC" = yes; then
5034     lt_cv_prog_cc_wl='-Wl,'
5035     lt_cv_prog_cc_static='-static'
5036
5037     case $host_os in
5038     aix*)
5039       # Below there is a dirty hack to force normal static linking with -ldl
5040       # The problem is because libdl dynamically linked with both libc and
5041       # libC (AIX C++ library), which obviously doesn't included in libraries
5042       # list by gcc. This cause undefined symbols with -static flags.
5043       # This hack allows C programs to be linked with "-static -ldl", but
5044       # not sure about C++ programs.
5045       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5046       ;;
5047     amigaos*)
5048       # FIXME: we need at least 68020 code to build shared libraries, but
5049       # adding the `-m68020' flag to GCC prevents building anything better,
5050       # like `-m68040'.
5051       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5052       ;;
5053     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5054       # PIC is the default for these OSes.
5055       ;;
5056     darwin* | rhapsody*)
5057       # PIC is the default on this platform
5058       # Common symbols not allowed in MH_DYLIB files
5059       lt_cv_prog_cc_pic='-fno-common'
5060       ;;
5061     cygwin* | mingw* | pw32* | os2*)
5062       # This hack is so that the source file can tell whether it is being
5063       # built for inclusion in a dll (and should export symbols for example).
5064       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5065       ;;
5066     sysv4*MP*)
5067       if test -d /usr/nec; then
5068          lt_cv_prog_cc_pic=-Kconform_pic
5069       fi
5070       ;;
5071     *)
5072       lt_cv_prog_cc_pic='-fPIC'
5073       ;;
5074     esac
5075   else
5076     # PORTME Check for PIC flags for the system compiler.
5077     case $host_os in
5078     aix3* | aix4* | aix5*)
5079       lt_cv_prog_cc_wl='-Wl,'
5080       # All AIX code is PIC.
5081       if test "$host_cpu" = ia64; then
5082         # AIX 5 now supports IA64 processor
5083         lt_cv_prog_cc_static='-Bstatic'
5084       else
5085         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5086       fi
5087       ;;
5088
5089     hpux9* | hpux10* | hpux11*)
5090       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5091       lt_cv_prog_cc_wl='-Wl,'
5092       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5093       lt_cv_prog_cc_pic='+Z'
5094       ;;
5095
5096     irix5* | irix6* | nonstopux*)
5097       lt_cv_prog_cc_wl='-Wl,'
5098       lt_cv_prog_cc_static='-non_shared'
5099       # PIC (with -KPIC) is the default.
5100       ;;
5101
5102     cygwin* | mingw* | pw32* | os2*)
5103       # This hack is so that the source file can tell whether it is being
5104       # built for inclusion in a dll (and should export symbols for example).
5105       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5106       ;;
5107
5108     newsos6)
5109       lt_cv_prog_cc_pic='-KPIC'
5110       lt_cv_prog_cc_static='-Bstatic'
5111       ;;
5112
5113     osf3* | osf4* | osf5*)
5114       # All OSF/1 code is PIC.
5115       lt_cv_prog_cc_wl='-Wl,'
5116       lt_cv_prog_cc_static='-non_shared'
5117       ;;
5118
5119     sco3.2v5*)
5120       lt_cv_prog_cc_pic='-Kpic'
5121       lt_cv_prog_cc_static='-dn'
5122       lt_cv_prog_cc_shlib='-belf'
5123       ;;
5124
5125     solaris*)
5126       lt_cv_prog_cc_pic='-KPIC'
5127       lt_cv_prog_cc_static='-Bstatic'
5128       lt_cv_prog_cc_wl='-Wl,'
5129       ;;
5130
5131     sunos4*)
5132       lt_cv_prog_cc_pic='-PIC'
5133       lt_cv_prog_cc_static='-Bstatic'
5134       lt_cv_prog_cc_wl='-Qoption ld '
5135       ;;
5136
5137     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5138       lt_cv_prog_cc_pic='-KPIC'
5139       lt_cv_prog_cc_static='-Bstatic'
5140       lt_cv_prog_cc_wl='-Wl,'
5141       ;;
5142
5143     uts4*)
5144       lt_cv_prog_cc_pic='-pic'
5145       lt_cv_prog_cc_static='-Bstatic'
5146       ;;
5147
5148     sysv4*MP*)
5149       if test -d /usr/nec ;then
5150         lt_cv_prog_cc_pic='-Kconform_pic'
5151         lt_cv_prog_cc_static='-Bstatic'
5152       fi
5153       ;;
5154
5155     *)
5156       lt_cv_prog_cc_can_build_shared=no
5157       ;;
5158     esac
5159   fi
5160
5161 fi
5162
5163 if test -z "$lt_cv_prog_cc_pic"; then
5164   echo "$ac_t""none" 1>&6
5165 else
5166   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5167
5168   # Check to make sure the pic_flag actually works.
5169   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5170 echo "configure:5171: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5171   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5172   echo $ac_n "(cached) $ac_c" 1>&6
5173 else
5174       save_CFLAGS="$CFLAGS"
5175     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5176     cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5179
5180 int main() {
5181
5182 ; return 0; }
5183 EOF
5184 if { (eval echo configure:5185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5185   rm -rf conftest*
5186         case $host_os in
5187       hpux9* | hpux10* | hpux11*)
5188         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5189         # they create non-PIC objects.  So, if there were any warnings, we
5190         # assume that PIC is not supported.
5191         if test -s conftest.err; then
5192           lt_cv_prog_cc_pic_works=no
5193         else
5194           lt_cv_prog_cc_pic_works=yes
5195         fi
5196         ;;
5197       *)
5198         lt_cv_prog_cc_pic_works=yes
5199         ;;
5200       esac
5201     
5202 else
5203   echo "configure: failed program was:" >&5
5204   cat conftest.$ac_ext >&5
5205   rm -rf conftest*
5206         lt_cv_prog_cc_pic_works=no
5207     
5208 fi
5209 rm -f conftest*
5210     CFLAGS="$save_CFLAGS"
5211   
5212 fi
5213
5214
5215   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5216     lt_cv_prog_cc_pic=
5217     lt_cv_prog_cc_can_build_shared=no
5218   else
5219     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5220   fi
5221
5222   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5223 fi
5224
5225 # Check for any special shared library compilation flags.
5226 if test -n "$lt_cv_prog_cc_shlib"; then
5227   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5228   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5229   else
5230    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5231     lt_cv_prog_cc_can_build_shared=no
5232   fi
5233 fi
5234
5235 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5236 echo "configure:5237: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5237 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5238   echo $ac_n "(cached) $ac_c" 1>&6
5239 else
5240     lt_cv_prog_cc_static_works=no
5241   save_LDFLAGS="$LDFLAGS"
5242   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5243   cat > conftest.$ac_ext <<EOF
5244 #line 5245 "configure"
5245 #include "confdefs.h"
5246
5247 int main() {
5248
5249 ; return 0; }
5250 EOF
5251 if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5252   rm -rf conftest*
5253   lt_cv_prog_cc_static_works=yes
5254 else
5255   echo "configure: failed program was:" >&5
5256   cat conftest.$ac_ext >&5
5257 fi
5258 rm -f conftest*
5259   LDFLAGS="$save_LDFLAGS"
5260
5261 fi
5262
5263
5264 # Belt *and* braces to stop my trousers falling down:
5265 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5266 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5267
5268 pic_flag="$lt_cv_prog_cc_pic"
5269 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5270 wl="$lt_cv_prog_cc_wl"
5271 link_static_flag="$lt_cv_prog_cc_static"
5272 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5273 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5274
5275
5276 # Check to see if options -o and -c are simultaneously supported by compiler
5277 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5278 echo "configure:5279: checking if $compiler supports -c -o file.$ac_objext" >&5
5279 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5280   echo $ac_n "(cached) $ac_c" 1>&6
5281 else
5282   
5283 $rm -r conftest 2>/dev/null
5284 mkdir conftest
5285 cd conftest
5286 echo "int some_variable = 0;" > conftest.$ac_ext
5287 mkdir out
5288 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5289 # that will create temporary files in the current directory regardless of
5290 # the output directory.  Thus, making CWD read-only will cause this test
5291 # to fail, enabling locking or at least warning the user not to do parallel
5292 # builds.
5293 chmod -w .
5294 save_CFLAGS="$CFLAGS"
5295 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5296 compiler_c_o=no
5297 if { (eval echo configure:5298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5298   # The compiler can only warn and ignore the option if not recognized
5299   # So say no if there are warnings
5300   if test -s out/conftest.err; then
5301     lt_cv_compiler_c_o=no
5302   else
5303     lt_cv_compiler_c_o=yes
5304   fi
5305 else
5306   # Append any errors to the config.log.
5307   cat out/conftest.err 1>&5
5308   lt_cv_compiler_c_o=no
5309 fi
5310 CFLAGS="$save_CFLAGS"
5311 chmod u+w .
5312 $rm conftest* out/*
5313 rmdir out
5314 cd ..
5315 rmdir conftest
5316 $rm -r conftest 2>/dev/null
5317
5318 fi
5319
5320 compiler_c_o=$lt_cv_compiler_c_o
5321 echo "$ac_t""$compiler_c_o" 1>&6
5322
5323 if test x"$compiler_c_o" = x"yes"; then
5324   # Check to see if we can write to a .lo
5325   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5326 echo "configure:5327: checking if $compiler supports -c -o file.lo" >&5
5327   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5328   echo $ac_n "(cached) $ac_c" 1>&6
5329 else
5330   
5331   lt_cv_compiler_o_lo=no
5332   save_CFLAGS="$CFLAGS"
5333   CFLAGS="$CFLAGS -c -o conftest.lo"
5334   save_objext="$ac_objext"
5335   ac_objext=lo
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 int main() {
5341 int some_variable = 0;
5342 ; return 0; }
5343 EOF
5344 if { (eval echo configure:5345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5345   rm -rf conftest*
5346       # The compiler can only warn and ignore the option if not recognized
5347     # So say no if there are warnings
5348     if test -s conftest.err; then
5349       lt_cv_compiler_o_lo=no
5350     else
5351       lt_cv_compiler_o_lo=yes
5352     fi
5353   
5354 else
5355   echo "configure: failed program was:" >&5
5356   cat conftest.$ac_ext >&5
5357 fi
5358 rm -f conftest*
5359   ac_objext="$save_objext"
5360   CFLAGS="$save_CFLAGS"
5361   
5362 fi
5363
5364   compiler_o_lo=$lt_cv_compiler_o_lo
5365   echo "$ac_t""$compiler_o_lo" 1>&6
5366 else
5367   compiler_o_lo=no
5368 fi
5369
5370 # Check to see if we can do hard links to lock some files if needed
5371 hard_links="nottested"
5372 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5373   # do not overwrite the value of need_locks provided by the user
5374   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5375 echo "configure:5376: checking if we can lock with hard links" >&5
5376   hard_links=yes
5377   $rm conftest*
5378   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5379   touch conftest.a
5380   ln conftest.a conftest.b 2>&5 || hard_links=no
5381   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5382   echo "$ac_t""$hard_links" 1>&6
5383   if test "$hard_links" = no; then
5384     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5385     need_locks=warn
5386   fi
5387 else
5388   need_locks=no
5389 fi
5390
5391 if test "$GCC" = yes; then
5392   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5393   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5394 echo "configure:5395: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5395   echo "int some_variable = 0;" > conftest.$ac_ext
5396   save_CFLAGS="$CFLAGS"
5397   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5398   compiler_rtti_exceptions=no
5399   cat > conftest.$ac_ext <<EOF
5400 #line 5401 "configure"
5401 #include "confdefs.h"
5402
5403 int main() {
5404 int some_variable = 0;
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5408   rm -rf conftest*
5409       # The compiler can only warn and ignore the option if not recognized
5410     # So say no if there are warnings
5411     if test -s conftest.err; then
5412       compiler_rtti_exceptions=no
5413     else
5414       compiler_rtti_exceptions=yes
5415     fi
5416   
5417 else
5418   echo "configure: failed program was:" >&5
5419   cat conftest.$ac_ext >&5
5420 fi
5421 rm -f conftest*
5422   CFLAGS="$save_CFLAGS"
5423   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5424
5425   if test "$compiler_rtti_exceptions" = "yes"; then
5426     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5427   else
5428     no_builtin_flag=' -fno-builtin'
5429   fi
5430 fi
5431
5432 # See if the linker supports building shared libraries.
5433 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5434 echo "configure:5435: checking whether the linker ($LD) supports shared libraries" >&5
5435
5436 allow_undefined_flag=
5437 no_undefined_flag=
5438 need_lib_prefix=unknown
5439 need_version=unknown
5440 # when you set need_version to no, make sure it does not cause -set_version
5441 # flags to be left without arguments
5442 archive_cmds=
5443 archive_expsym_cmds=
5444 old_archive_from_new_cmds=
5445 old_archive_from_expsyms_cmds=
5446 export_dynamic_flag_spec=
5447 whole_archive_flag_spec=
5448 thread_safe_flag_spec=
5449 hardcode_into_libs=no
5450 hardcode_libdir_flag_spec=
5451 hardcode_libdir_separator=
5452 hardcode_direct=no
5453 hardcode_minus_L=no
5454 hardcode_shlibpath_var=unsupported
5455 runpath_var=
5456 link_all_deplibs=unknown
5457 always_export_symbols=no
5458 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5459 # include_expsyms should be a list of space-separated symbols to be *always*
5460 # included in the symbol list
5461 include_expsyms=
5462 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5463 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5464 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5465 # as well as any symbol that contains `d'.
5466 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5467 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5468 # platforms (ab)use it in PIC code, but their linkers get confused if
5469 # the symbol is explicitly referenced.  Since portable code cannot
5470 # rely on this symbol name, it's probably fine to never include it in
5471 # preloaded symbol tables.
5472 extract_expsyms_cmds=
5473
5474 case $host_os in
5475 cygwin* | mingw* | pw32*)
5476   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5477   # When not using gcc, we currently assume that we are using
5478   # Microsoft Visual C++.
5479   if test "$GCC" != yes; then
5480     with_gnu_ld=no
5481   fi
5482   ;;
5483 openbsd*)
5484   with_gnu_ld=no
5485   ;;
5486 esac
5487
5488 ld_shlibs=yes
5489 if test "$with_gnu_ld" = yes; then
5490   # If archive_cmds runs LD, not CC, wlarc should be empty
5491   wlarc='${wl}'
5492
5493   # See if GNU ld supports shared libraries.
5494   case $host_os in
5495   aix3* | aix4* | aix5*)
5496     # On AIX, the GNU linker is very broken
5497     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5498     ld_shlibs=no
5499     cat <<EOF 1>&2
5500
5501 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5502 *** to be unable to reliably create shared libraries on AIX.
5503 *** Therefore, libtool is disabling shared libraries support.  If you
5504 *** really care for shared libraries, you may want to modify your PATH
5505 *** so that a non-GNU linker is found, and then restart.
5506
5507 EOF
5508     ;;
5509
5510   amigaos*)
5511     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)'
5512     hardcode_libdir_flag_spec='-L$libdir'
5513     hardcode_minus_L=yes
5514
5515     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5516     # that the semantics of dynamic libraries on AmigaOS, at least up
5517     # to version 4, is to share data among multiple programs linked
5518     # with the same dynamic library.  Since this doesn't match the
5519     # behavior of shared libraries on other platforms, we can use
5520     # them.
5521     ld_shlibs=no
5522     ;;
5523
5524   beos*)
5525     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5526       allow_undefined_flag=unsupported
5527       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5528       # support --undefined.  This deserves some investigation.  FIXME
5529       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5530     else
5531       ld_shlibs=no
5532     fi
5533     ;;
5534
5535   cygwin* | mingw* | pw32*)
5536     # hardcode_libdir_flag_spec is actually meaningless, as there is
5537     # no search path for DLLs.
5538     hardcode_libdir_flag_spec='-L$libdir'
5539     allow_undefined_flag=unsupported
5540     always_export_symbols=yes
5541
5542     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5543       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5544       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5545       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5546       else $CC -o impgen impgen.c ; fi)~
5547       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5548
5549     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5550
5551     # cygwin and mingw dlls have different entry points and sets of symbols
5552     # to exclude.
5553     # FIXME: what about values for MSVC?
5554     dll_entry=__cygwin_dll_entry@12
5555     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5556     case $host_os in
5557     mingw*)
5558       # mingw values
5559       dll_entry=_DllMainCRTStartup@12
5560       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5561       ;;
5562     esac
5563
5564     # mingw and cygwin differ, and it's simplest to just exclude the union
5565     # of the two symbol sets.
5566     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5567
5568     # recent cygwin and mingw systems supply a stub DllMain which the user
5569     # can override, but on older systems we have to supply one (in ltdll.c)
5570     if test "x$lt_cv_need_dllmain" = "xyes"; then
5571       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5572       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~
5573         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5574     else
5575       ltdll_obj=
5576       ltdll_cmds=
5577     fi
5578
5579     # Extract the symbol export list from an `--export-all' def file,
5580     # then regenerate the def file from the symbol export list, so that
5581     # the compiled dll only exports the symbol export list.
5582     # Be careful not to strip the DATA tag left be newer dlltools.
5583     export_symbols_cmds="$ltdll_cmds"'
5584       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5585       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5586
5587     # If the export-symbols file already is a .def file (1st line
5588     # is EXPORTS), use it as is.
5589     # If DATA tags from a recent dlltool are present, honour them!
5590     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5591         cp $export_symbols $output_objdir/$soname-def;
5592       else
5593         echo EXPORTS > $output_objdir/$soname-def;
5594         _lt_hint=1;
5595         cat $export_symbols | while read symbol; do
5596          set dummy \$symbol;
5597          case \$# in
5598            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5599            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5600            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5601          esac;
5602          _lt_hint=`expr 1 + \$_lt_hint`;
5603         done;
5604       fi~
5605       '"$ltdll_cmds"'
5606       $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~
5607       $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~
5608       $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~
5609       $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~
5610       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5611     ;;
5612
5613   netbsd*)
5614     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5615       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5616       wlarc=
5617     else
5618       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5619       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5620     fi
5621     ;;
5622
5623   solaris* | sysv5*)
5624     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5625       ld_shlibs=no
5626       cat <<EOF 1>&2
5627
5628 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5629 *** create shared libraries on Solaris systems.  Therefore, libtool
5630 *** is disabling shared libraries support.  We urge you to upgrade GNU
5631 *** binutils to release 2.9.1 or newer.  Another option is to modify
5632 *** your PATH or compiler configuration so that the native linker is
5633 *** used, and then restart.
5634
5635 EOF
5636     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5637       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5638       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5639     else
5640       ld_shlibs=no
5641     fi
5642     ;;
5643
5644   sunos4*)
5645     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5646     wlarc=
5647     hardcode_direct=yes
5648     hardcode_shlibpath_var=no
5649     ;;
5650
5651   *)
5652     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5653       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5654       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5655     else
5656       ld_shlibs=no
5657     fi
5658     ;;
5659   esac
5660
5661   if test "$ld_shlibs" = yes; then
5662     runpath_var=LD_RUN_PATH
5663     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5664     export_dynamic_flag_spec='${wl}--export-dynamic'
5665     case $host_os in
5666     cygwin* | mingw* | pw32*)
5667       # dlltool doesn't understand --whole-archive et. al.
5668       whole_archive_flag_spec=
5669       ;;
5670     *)
5671       # ancient GNU ld didn't support --whole-archive et. al.
5672       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5673         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5674       else
5675         whole_archive_flag_spec=
5676       fi
5677       ;;
5678     esac
5679   fi
5680 else
5681   # PORTME fill in a description of your system's linker (not GNU ld)
5682   case $host_os in
5683   aix3*)
5684     allow_undefined_flag=unsupported
5685     always_export_symbols=yes
5686     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'
5687     # Note: this linker hardcodes the directories in LIBPATH if there
5688     # are no directories specified by -L.
5689     hardcode_minus_L=yes
5690     if test "$GCC" = yes && test -z "$link_static_flag"; then
5691       # Neither direct hardcoding nor static linking is supported with a
5692       # broken collect2.
5693       hardcode_direct=unsupported
5694     fi
5695     ;;
5696
5697   aix4* | aix5*)
5698     if test "$host_cpu" = ia64; then
5699       # On IA64, the linker does run time linking by default, so we don't
5700       # have to do anything special.
5701       aix_use_runtimelinking=no
5702       exp_sym_flag='-Bexport'
5703       no_entry_flag=""
5704     else
5705       aix_use_runtimelinking=no
5706
5707       # Test if we are trying to use run time linking or normal
5708       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5709       # need to do runtime linking.
5710       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5711         for ld_flag in $LDFLAGS; do
5712           case $ld_flag in
5713           *-brtl*)
5714             aix_use_runtimelinking=yes
5715             break
5716           ;;
5717           esac
5718         done
5719       esac
5720
5721       exp_sym_flag='-bexport'
5722       no_entry_flag='-bnoentry'
5723     fi
5724
5725     # When large executables or shared objects are built, AIX ld can
5726     # have problems creating the table of contents.  If linking a library
5727     # or program results in "error TOC overflow" add -mminimal-toc to
5728     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5729     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5730
5731     hardcode_direct=yes
5732     archive_cmds=''
5733     hardcode_libdir_separator=':'
5734     if test "$GCC" = yes; then
5735       case $host_os in aix4.[012]|aix4.[012].*)
5736         collect2name=`${CC} -print-prog-name=collect2`
5737         if test -f "$collect2name" && \
5738           strings "$collect2name" | grep resolve_lib_name >/dev/null
5739         then
5740           # We have reworked collect2
5741           hardcode_direct=yes
5742         else
5743           # We have old collect2
5744           hardcode_direct=unsupported
5745           # It fails to find uninstalled libraries when the uninstalled
5746           # path is not listed in the libpath.  Setting hardcode_minus_L
5747           # to unsupported forces relinking
5748           hardcode_minus_L=yes
5749           hardcode_libdir_flag_spec='-L$libdir'
5750           hardcode_libdir_separator=
5751         fi
5752       esac
5753
5754       shared_flag='-shared'
5755     else
5756       # not using gcc
5757       if test "$host_cpu" = ia64; then
5758         shared_flag='${wl}-G'
5759       else
5760         if test "$aix_use_runtimelinking" = yes; then
5761           shared_flag='${wl}-G'
5762         else
5763           shared_flag='${wl}-bM:SRE'
5764         fi
5765       fi
5766     fi
5767
5768     # It seems that -bexpall can do strange things, so it is better to
5769     # generate a list of symbols to export.
5770     always_export_symbols=yes
5771     if test "$aix_use_runtimelinking" = yes; then
5772       # Warning - without using the other runtime loading flags (-brtl),
5773       # -berok will link without error, but may produce a broken library.
5774       allow_undefined_flag='-berok'
5775       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5776       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"
5777     else
5778       if test "$host_cpu" = ia64; then
5779         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5780         allow_undefined_flag="-z nodefs"
5781         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"
5782       else
5783         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5784         # Warning - without using the other run time loading flags,
5785         # -berok will link without error, but may produce a broken library.
5786         allow_undefined_flag='${wl}-berok'
5787         # This is a bit strange, but is similar to how AIX traditionally builds
5788         # it's shared libraries.
5789         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'
5790       fi
5791     fi
5792     ;;
5793
5794   amigaos*)
5795     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)'
5796     hardcode_libdir_flag_spec='-L$libdir'
5797     hardcode_minus_L=yes
5798     # see comment about different semantics on the GNU ld section
5799     ld_shlibs=no
5800     ;;
5801
5802   cygwin* | mingw* | pw32*)
5803     # When not using gcc, we currently assume that we are using
5804     # Microsoft Visual C++.
5805     # hardcode_libdir_flag_spec is actually meaningless, as there is
5806     # no search path for DLLs.
5807     hardcode_libdir_flag_spec=' '
5808     allow_undefined_flag=unsupported
5809     # Tell ltmain to make .lib files, not .a files.
5810     libext=lib
5811     # FIXME: Setting linknames here is a bad hack.
5812     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5813     # The linker will automatically build a .lib file if we build a DLL.
5814     old_archive_from_new_cmds='true'
5815     # FIXME: Should let the user specify the lib program.
5816     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5817     fix_srcfile_path='`cygpath -w "$srcfile"`'
5818     ;;
5819
5820   darwin* | rhapsody*)
5821     case "$host_os" in
5822     rhapsody* | darwin1.[012])
5823       allow_undefined_flag='-undefined suppress'
5824       ;;
5825     *) # Darwin 1.3 on
5826       allow_undefined_flag='-flat_namespace -undefined suppress'
5827       ;;
5828     esac
5829     # FIXME: Relying on posixy $() will cause problems for
5830     #        cross-compilation, but unfortunately the echo tests do not
5831     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5832     #        `"' quotes if we put them in here... so don't!
5833     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)'
5834     # We need to add '_' to the symbols in $export_symbols first
5835     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5836     hardcode_direct=yes
5837     hardcode_shlibpath_var=no
5838     whole_archive_flag_spec='-all_load $convenience'
5839     ;;
5840
5841   freebsd1*)
5842     ld_shlibs=no
5843     ;;
5844
5845   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5846   # support.  Future versions do this automatically, but an explicit c++rt0.o
5847   # does not break anything, and helps significantly (at the cost of a little
5848   # extra space).
5849   freebsd2.2*)
5850     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5851     hardcode_libdir_flag_spec='-R$libdir'
5852     hardcode_direct=yes
5853     hardcode_shlibpath_var=no
5854     ;;
5855
5856   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5857   freebsd2*)
5858     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5859     hardcode_direct=yes
5860     hardcode_minus_L=yes
5861     hardcode_shlibpath_var=no
5862     ;;
5863
5864   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5865   freebsd*)
5866     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5867     hardcode_libdir_flag_spec='-R$libdir'
5868     hardcode_direct=yes
5869     hardcode_shlibpath_var=no
5870     ;;
5871
5872   hpux9* | hpux10* | hpux11*)
5873     case $host_os in
5874     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' ;;
5875     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5876     esac
5877     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5878     hardcode_libdir_separator=:
5879     hardcode_direct=yes
5880     hardcode_minus_L=yes # Not in the search PATH, but as the default
5881                          # location of the library.
5882     export_dynamic_flag_spec='${wl}-E'
5883     ;;
5884
5885   irix5* | irix6* | nonstopux*)
5886     if test "$GCC" = yes; then
5887       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'
5888       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5889     else
5890       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'
5891       hardcode_libdir_flag_spec='-rpath $libdir'
5892     fi
5893     hardcode_libdir_separator=:
5894     link_all_deplibs=yes
5895     ;;
5896
5897   netbsd*)
5898     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5899       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5900     else
5901       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5902     fi
5903     hardcode_libdir_flag_spec='-R$libdir'
5904     hardcode_direct=yes
5905     hardcode_shlibpath_var=no
5906     ;;
5907
5908   newsos6)
5909     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5910     hardcode_direct=yes
5911     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5912     hardcode_libdir_separator=:
5913     hardcode_shlibpath_var=no
5914     ;;
5915
5916   openbsd*)
5917     hardcode_direct=yes
5918     hardcode_shlibpath_var=no
5919     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5920       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5921       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5922       export_dynamic_flag_spec='${wl}-E'
5923     else
5924       case "$host_os" in
5925       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5926         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5927         hardcode_libdir_flag_spec='-R$libdir'
5928         ;;
5929       *)
5930         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5931         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5932         ;;
5933       esac
5934     fi
5935     ;;
5936
5937   os2*)
5938     hardcode_libdir_flag_spec='-L$libdir'
5939     hardcode_minus_L=yes
5940     allow_undefined_flag=unsupported
5941     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'
5942     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5943     ;;
5944
5945   osf3*)
5946     if test "$GCC" = yes; then
5947       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5948       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'
5949     else
5950       allow_undefined_flag=' -expect_unresolved \*'
5951       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'
5952     fi
5953     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5954     hardcode_libdir_separator=:
5955     ;;
5956
5957   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5958     if test "$GCC" = yes; then
5959       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5960       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'
5961       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5962     else
5963       allow_undefined_flag=' -expect_unresolved \*'
5964       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'
5965       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5966       $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'
5967
5968       #Both c and cxx compiler support -rpath directly
5969       hardcode_libdir_flag_spec='-rpath $libdir'
5970     fi
5971     hardcode_libdir_separator=:
5972     ;;
5973
5974   sco3.2v5*)
5975     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5976     hardcode_shlibpath_var=no
5977     runpath_var=LD_RUN_PATH
5978     hardcode_runpath_var=yes
5979     export_dynamic_flag_spec='${wl}-Bexport'
5980     ;;
5981
5982   solaris*)
5983     # gcc --version < 3.0 without binutils cannot create self contained
5984     # shared libraries reliably, requiring libgcc.a to resolve some of
5985     # the object symbols generated in some cases.  Libraries that use
5986     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5987     # a copy of libgcc.a into every shared library to guarantee resolving
5988     # such symbols causes other problems:  According to Tim Van Holder
5989     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5990     # (to the application) exception stack for one thing.
5991     no_undefined_flag=' -z defs'
5992     if test "$GCC" = yes; then
5993       case `$CC --version 2>/dev/null` in
5994       [12].*)
5995         cat <<EOF 1>&2
5996
5997 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5998 *** create self contained shared libraries on Solaris systems, without
5999 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6000 *** -no-undefined support, which will at least allow you to build shared
6001 *** libraries.  However, you may find that when you link such libraries
6002 *** into an application without using GCC, you have to manually add
6003 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6004 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6005 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6006
6007 EOF
6008         no_undefined_flag=
6009         ;;
6010       esac
6011     fi
6012     # $CC -shared without GNU ld will not create a library from C++
6013     # object files and a static libstdc++, better avoid it by now
6014     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6015     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6016                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6017     hardcode_libdir_flag_spec='-R$libdir'
6018     hardcode_shlibpath_var=no
6019     case $host_os in
6020     solaris2.[0-5] | solaris2.[0-5].*) ;;
6021     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6022       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6023     esac
6024     link_all_deplibs=yes
6025     ;;
6026
6027   sunos4*)
6028     if test "x$host_vendor" = xsequent; then
6029       # Use $CC to link under sequent, because it throws in some extra .o
6030       # files that make .init and .fini sections work.
6031       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6032     else
6033       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6034     fi
6035     hardcode_libdir_flag_spec='-L$libdir'
6036     hardcode_direct=yes
6037     hardcode_minus_L=yes
6038     hardcode_shlibpath_var=no
6039     ;;
6040
6041   sysv4)
6042     case $host_vendor in
6043       sni)
6044         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6045         hardcode_direct=yes # is this really true???
6046         ;;
6047       siemens)
6048         ## LD is ld it makes a PLAMLIB
6049         ## CC just makes a GrossModule.
6050         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6051         reload_cmds='$CC -r -o $output$reload_objs'
6052         hardcode_direct=no
6053         ;;
6054       motorola)
6055         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6056         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6057         ;;
6058     esac
6059     runpath_var='LD_RUN_PATH'
6060     hardcode_shlibpath_var=no
6061     ;;
6062
6063   sysv4.3*)
6064     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6065     hardcode_shlibpath_var=no
6066     export_dynamic_flag_spec='-Bexport'
6067     ;;
6068
6069   sysv5*)
6070     no_undefined_flag=' -z text'
6071     # $CC -shared without GNU ld will not create a library from C++
6072     # object files and a static libstdc++, better avoid it by now
6073     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6074     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6075                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6076     hardcode_libdir_flag_spec=
6077     hardcode_shlibpath_var=no
6078     runpath_var='LD_RUN_PATH'
6079     ;;
6080
6081   uts4*)
6082     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6083     hardcode_libdir_flag_spec='-L$libdir'
6084     hardcode_shlibpath_var=no
6085     ;;
6086
6087   dgux*)
6088     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6089     hardcode_libdir_flag_spec='-L$libdir'
6090     hardcode_shlibpath_var=no
6091     ;;
6092
6093   sysv4*MP*)
6094     if test -d /usr/nec; then
6095       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6096       hardcode_shlibpath_var=no
6097       runpath_var=LD_RUN_PATH
6098       hardcode_runpath_var=yes
6099       ld_shlibs=yes
6100     fi
6101     ;;
6102
6103   sysv4.2uw2*)
6104     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6105     hardcode_direct=yes
6106     hardcode_minus_L=no
6107     hardcode_shlibpath_var=no
6108     hardcode_runpath_var=yes
6109     runpath_var=LD_RUN_PATH
6110     ;;
6111
6112   sysv5uw7* | unixware7*)
6113     no_undefined_flag='${wl}-z ${wl}text'
6114     if test "$GCC" = yes; then
6115       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6116     else
6117       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6118     fi
6119     runpath_var='LD_RUN_PATH'
6120     hardcode_shlibpath_var=no
6121     ;;
6122
6123   *)
6124     ld_shlibs=no
6125     ;;
6126   esac
6127 fi
6128 echo "$ac_t""$ld_shlibs" 1>&6
6129 test "$ld_shlibs" = no && can_build_shared=no
6130
6131 # Check hardcoding attributes.
6132 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6133 echo "configure:6134: checking how to hardcode library paths into programs" >&5
6134 hardcode_action=
6135 if test -n "$hardcode_libdir_flag_spec" || \
6136    test -n "$runpath_var"; then
6137
6138   # We can hardcode non-existant directories.
6139   if test "$hardcode_direct" != no &&
6140      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6141      # have to relink, otherwise we might link with an installed library
6142      # when we should be linking with a yet-to-be-installed one
6143      ## test "$hardcode_shlibpath_var" != no &&
6144      test "$hardcode_minus_L" != no; then
6145     # Linking always hardcodes the temporary library directory.
6146     hardcode_action=relink
6147   else
6148     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6149     hardcode_action=immediate
6150   fi
6151 else
6152   # We cannot hardcode anything, or else we can only hardcode existing
6153   # directories.
6154   hardcode_action=unsupported
6155 fi
6156 echo "$ac_t""$hardcode_action" 1>&6
6157
6158 striplib=
6159 old_striplib=
6160 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6161 echo "configure:6162: checking whether stripping libraries is possible" >&5
6162 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6163   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6164   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6165   echo "$ac_t""yes" 1>&6
6166 else
6167   echo "$ac_t""no" 1>&6
6168 fi
6169
6170 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6171 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6172
6173 # PORTME Fill in your ld.so characteristics
6174 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6175 echo "configure:6176: checking dynamic linker characteristics" >&5
6176 library_names_spec=
6177 libname_spec='lib$name'
6178 soname_spec=
6179 postinstall_cmds=
6180 postuninstall_cmds=
6181 finish_cmds=
6182 finish_eval=
6183 shlibpath_var=
6184 shlibpath_overrides_runpath=unknown
6185 version_type=none
6186 dynamic_linker="$host_os ld.so"
6187 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6188 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6189
6190 case $host_os in
6191 aix3*)
6192   version_type=linux
6193   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6194   shlibpath_var=LIBPATH
6195
6196   # AIX has no versioning support, so we append a major version to the name.
6197   soname_spec='${libname}${release}.so$major'
6198   ;;
6199
6200 aix4* | aix5*)
6201   version_type=linux
6202   need_lib_prefix=no
6203   need_version=no
6204   hardcode_into_libs=yes
6205   if test "$host_cpu" = ia64; then
6206     # AIX 5 supports IA64
6207     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6208     shlibpath_var=LD_LIBRARY_PATH
6209   else
6210     # With GCC up to 2.95.x, collect2 would create an import file
6211     # for dependence libraries.  The import file would start with
6212     # the line `#! .'.  This would cause the generated library to
6213     # depend on `.', always an invalid library.  This was fixed in
6214     # development snapshots of GCC prior to 3.0.
6215     case $host_os in
6216       aix4 | aix4.[01] | aix4.[01].*)
6217         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6218              echo ' yes '
6219              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6220           :
6221         else
6222           can_build_shared=no
6223         fi
6224         ;;
6225     esac
6226     # AIX (on Power*) has no versioning support, so currently we can
6227     # not hardcode correct soname into executable. Probably we can
6228     # add versioning support to collect2, so additional links can
6229     # be useful in future.
6230     if test "$aix_use_runtimelinking" = yes; then
6231       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6232       # instead of lib<name>.a to let people know that these are not
6233       # typical AIX shared libraries.
6234       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6235     else
6236       # We preserve .a as extension for shared libraries through AIX4.2
6237       # and later when we are not doing run time linking.
6238       library_names_spec='${libname}${release}.a $libname.a'
6239       soname_spec='${libname}${release}.so$major'
6240     fi
6241     shlibpath_var=LIBPATH
6242   fi
6243   hardcode_into_libs=yes
6244   ;;
6245
6246 amigaos*)
6247   library_names_spec='$libname.ixlibrary $libname.a'
6248   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6249   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'
6250   ;;
6251
6252 beos*)
6253   library_names_spec='${libname}.so'
6254   dynamic_linker="$host_os ld.so"
6255   shlibpath_var=LIBRARY_PATH
6256   ;;
6257
6258 bsdi4*)
6259   version_type=linux
6260   need_version=no
6261   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6262   soname_spec='${libname}${release}.so$major'
6263   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6264   shlibpath_var=LD_LIBRARY_PATH
6265   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6266   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6267   export_dynamic_flag_spec=-rdynamic
6268   # the default ld.so.conf also contains /usr/contrib/lib and
6269   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6270   # libtool to hard-code these into programs
6271   ;;
6272
6273 cygwin* | mingw* | pw32*)
6274   version_type=windows
6275   need_version=no
6276   need_lib_prefix=no
6277   case $GCC,$host_os in
6278   yes,cygwin*)
6279     library_names_spec='$libname.dll.a'
6280     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6281     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6282       dldir=$destdir/`dirname \$dlpath`~
6283       test -d \$dldir || mkdir -p \$dldir~
6284       $install_prog .libs/$dlname \$dldir/$dlname'
6285     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6286       dlpath=$dir/\$dldll~
6287        $rm \$dlpath'
6288     ;;
6289   yes,mingw*)
6290     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6291     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6292     ;;
6293   yes,pw32*)
6294     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6295     ;;
6296   *)
6297     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6298     ;;
6299   esac
6300   dynamic_linker='Win32 ld.exe'
6301   # FIXME: first we should search . and the directory the executable is in
6302   shlibpath_var=PATH
6303   ;;
6304
6305 darwin* | rhapsody*)
6306   dynamic_linker="$host_os dyld"
6307   version_type=darwin
6308   need_lib_prefix=no
6309   need_version=no
6310   # FIXME: Relying on posixy $() will cause problems for
6311   #        cross-compilation, but unfortunately the echo tests do not
6312   #        yet detect zsh echo's removal of \ escapes.
6313   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)'
6314   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6315   shlibpath_overrides_runpath=yes
6316   shlibpath_var=DYLD_LIBRARY_PATH
6317   ;;
6318
6319 freebsd1*)
6320   dynamic_linker=no
6321   ;;
6322
6323 freebsd*)
6324   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6325   version_type=freebsd-$objformat
6326   case $version_type in
6327     freebsd-elf*)
6328       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6329       need_version=no
6330       need_lib_prefix=no
6331       ;;
6332     freebsd-*)
6333       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6334       need_version=yes
6335       ;;
6336   esac
6337   shlibpath_var=LD_LIBRARY_PATH
6338   case $host_os in
6339   freebsd2*)
6340     shlibpath_overrides_runpath=yes
6341     ;;
6342   *)
6343     shlibpath_overrides_runpath=no
6344     hardcode_into_libs=yes
6345     ;;
6346   esac
6347   ;;
6348
6349 gnu*)
6350   version_type=linux
6351   need_lib_prefix=no
6352   need_version=no
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6354   soname_spec='${libname}${release}.so$major'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   hardcode_into_libs=yes
6357   ;;
6358
6359 hpux9* | hpux10* | hpux11*)
6360   # Give a soname corresponding to the major version so that dld.sl refuses to
6361   # link against other versions.
6362   dynamic_linker="$host_os dld.sl"
6363   version_type=sunos
6364   need_lib_prefix=no
6365   need_version=no
6366   shlibpath_var=SHLIB_PATH
6367   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6368   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6369   soname_spec='${libname}${release}.sl$major'
6370   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6371   postinstall_cmds='chmod 555 $lib'
6372   ;;
6373
6374 irix5* | irix6* | nonstopux*)
6375   case $host_os in
6376     nonstopux*) version_type=nonstopux ;;
6377     *)          version_type=irix ;;
6378   esac
6379   need_lib_prefix=no
6380   need_version=no
6381   soname_spec='${libname}${release}.so$major'
6382   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6383   case $host_os in
6384   irix5* | nonstopux*)
6385     libsuff= shlibsuff=
6386     ;;
6387   *)
6388     case $LD in # libtool.m4 will add one of these switches to LD
6389     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6390     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6391     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6392     *) libsuff= shlibsuff= libmagic=never-match;;
6393     esac
6394     ;;
6395   esac
6396   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6397   shlibpath_overrides_runpath=no
6398   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6399   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6400   ;;
6401
6402 # No shared lib support for Linux oldld, aout, or coff.
6403 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6404   dynamic_linker=no
6405   ;;
6406
6407 # This must be Linux ELF.
6408 linux-gnu*)
6409   version_type=linux
6410   need_lib_prefix=no
6411   need_version=no
6412   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6413   soname_spec='${libname}${release}.so$major'
6414   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6415   shlibpath_var=LD_LIBRARY_PATH
6416   shlibpath_overrides_runpath=no
6417   # This implies no fast_install, which is unacceptable.
6418   # Some rework will be needed to allow for fast_install
6419   # before this can be enabled.
6420   hardcode_into_libs=yes
6421
6422   # We used to test for /lib/ld.so.1 and disable shared libraries on
6423   # powerpc, because MkLinux only supported shared libraries with the
6424   # GNU dynamic linker.  Since this was broken with cross compilers,
6425   # most powerpc-linux boxes support dynamic linking these days and
6426   # people can always --disable-shared, the test was removed, and we
6427   # assume the GNU/Linux dynamic linker is in use.
6428   dynamic_linker='GNU/Linux ld.so'
6429   ;;
6430
6431 netbsd*)
6432   version_type=sunos
6433   need_lib_prefix=no
6434   need_version=no
6435   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6436     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6437     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6438     dynamic_linker='NetBSD (a.out) ld.so'
6439   else
6440     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6441     soname_spec='${libname}${release}.so$major'
6442     dynamic_linker='NetBSD ld.elf_so'
6443   fi
6444   shlibpath_var=LD_LIBRARY_PATH
6445   shlibpath_overrides_runpath=yes
6446   hardcode_into_libs=yes
6447   ;;
6448
6449 newsos6)
6450   version_type=linux
6451   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   shlibpath_overrides_runpath=yes
6454   ;;
6455
6456 openbsd*)
6457   version_type=sunos
6458   need_lib_prefix=no
6459   need_version=no
6460   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6461     case "$host_os" in
6462     openbsd2.[89] | openbsd2.[89].*)
6463       shlibpath_overrides_runpath=no
6464       ;;
6465     *)
6466       shlibpath_overrides_runpath=yes
6467       ;;
6468     esac
6469   else
6470     shlibpath_overrides_runpath=yes
6471   fi
6472   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6473   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   ;;
6476
6477 os2*)
6478   libname_spec='$name'
6479   need_lib_prefix=no
6480   library_names_spec='$libname.dll $libname.a'
6481   dynamic_linker='OS/2 ld.exe'
6482   shlibpath_var=LIBPATH
6483   ;;
6484
6485 osf3* | osf4* | osf5*)
6486   version_type=osf
6487   need_version=no
6488   soname_spec='${libname}${release}.so$major'
6489   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6490   shlibpath_var=LD_LIBRARY_PATH
6491   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6492   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6493   hardcode_into_libs=yes
6494   ;;
6495
6496 sco3.2v5*)
6497   version_type=osf
6498   soname_spec='${libname}${release}.so$major'
6499   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6500   shlibpath_var=LD_LIBRARY_PATH
6501   ;;
6502
6503 solaris*)
6504   version_type=linux
6505   need_lib_prefix=no
6506   need_version=no
6507   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6508   soname_spec='${libname}${release}.so$major'
6509   shlibpath_var=LD_LIBRARY_PATH
6510   shlibpath_overrides_runpath=yes
6511   hardcode_into_libs=yes
6512   # ldd complains unless libraries are executable
6513   postinstall_cmds='chmod +x $lib'
6514   ;;
6515
6516 sunos4*)
6517   version_type=sunos
6518   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6519   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6520   shlibpath_var=LD_LIBRARY_PATH
6521   shlibpath_overrides_runpath=yes
6522   if test "$with_gnu_ld" = yes; then
6523     need_lib_prefix=no
6524   fi
6525   need_version=yes
6526   ;;
6527
6528 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6529   version_type=linux
6530   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6531   soname_spec='${libname}${release}.so$major'
6532   shlibpath_var=LD_LIBRARY_PATH
6533   case $host_vendor in
6534     sni)
6535       shlibpath_overrides_runpath=no
6536       need_lib_prefix=no
6537       export_dynamic_flag_spec='${wl}-Blargedynsym'
6538       runpath_var=LD_RUN_PATH
6539       ;;
6540     siemens)
6541       need_lib_prefix=no
6542       ;;
6543     motorola)
6544       need_lib_prefix=no
6545       need_version=no
6546       shlibpath_overrides_runpath=no
6547       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6548       ;;
6549   esac
6550   ;;
6551
6552 uts4*)
6553   version_type=linux
6554   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6555   soname_spec='${libname}${release}.so$major'
6556   shlibpath_var=LD_LIBRARY_PATH
6557   ;;
6558
6559 dgux*)
6560   version_type=linux
6561   need_lib_prefix=no
6562   need_version=no
6563   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6564   soname_spec='${libname}${release}.so$major'
6565   shlibpath_var=LD_LIBRARY_PATH
6566   ;;
6567
6568 sysv4*MP*)
6569   if test -d /usr/nec ;then
6570     version_type=linux
6571     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6572     soname_spec='$libname.so.$major'
6573     shlibpath_var=LD_LIBRARY_PATH
6574   fi
6575   ;;
6576
6577 *)
6578   dynamic_linker=no
6579   ;;
6580 esac
6581 echo "$ac_t""$dynamic_linker" 1>&6
6582 test "$dynamic_linker" = no && can_build_shared=no
6583
6584 # Report the final consequences.
6585 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6586 echo "configure:6587: checking if libtool supports shared libraries" >&5
6587 echo "$ac_t""$can_build_shared" 1>&6
6588
6589 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6590 echo "configure:6591: checking whether to build shared libraries" >&5
6591 test "$can_build_shared" = "no" && enable_shared=no
6592
6593 # On AIX, shared libraries and static libraries use the same namespace, and
6594 # are all built from PIC.
6595 case "$host_os" in
6596 aix3*)
6597   test "$enable_shared" = yes && enable_static=no
6598   if test -n "$RANLIB"; then
6599     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6600     postinstall_cmds='$RANLIB $lib'
6601   fi
6602   ;;
6603
6604 aix4*)
6605   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6606     test "$enable_shared" = yes && enable_static=no
6607   fi
6608   ;;
6609 esac
6610 echo "$ac_t""$enable_shared" 1>&6
6611
6612 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6613 echo "configure:6614: checking whether to build static libraries" >&5
6614 # Make sure either enable_shared or enable_static is yes.
6615 test "$enable_shared" = yes || enable_static=yes
6616 echo "$ac_t""$enable_static" 1>&6
6617
6618 if test "$hardcode_action" = relink; then
6619   # Fast installation is not supported
6620   enable_fast_install=no
6621 elif test "$shlibpath_overrides_runpath" = yes ||
6622      test "$enable_shared" = no; then
6623   # Fast installation is not necessary
6624   enable_fast_install=needless
6625 fi
6626
6627 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6628 if test "$GCC" = yes; then
6629   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6630 fi
6631
6632 if test "x$enable_dlopen" != xyes; then
6633   enable_dlopen=unknown
6634   enable_dlopen_self=unknown
6635   enable_dlopen_self_static=unknown
6636 else
6637   lt_cv_dlopen=no
6638   lt_cv_dlopen_libs=
6639
6640   case $host_os in
6641   beos*)
6642     lt_cv_dlopen="load_add_on"
6643     lt_cv_dlopen_libs=
6644     lt_cv_dlopen_self=yes
6645     ;;
6646
6647   cygwin* | mingw* | pw32*)
6648     lt_cv_dlopen="LoadLibrary"
6649     lt_cv_dlopen_libs=
6650    ;;
6651
6652   *)
6653     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6654 echo "configure:6655: checking for shl_load" >&5
6655 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6656   echo $ac_n "(cached) $ac_c" 1>&6
6657 else
6658   cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* System header to define __stub macros and hopefully few prototypes,
6662     which can conflict with char shl_load(); below.  */
6663 #include <assert.h>
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char shl_load();
6668 char (*f)();
6669
6670 int main() {
6671
6672 /* The GNU C library defines this for functions which it implements
6673     to always fail with ENOSYS.  Some functions are actually named
6674     something starting with __ and the normal name is an alias.  */
6675 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6676 choke me
6677 #else
6678 f = shl_load;
6679 #endif
6680
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684   rm -rf conftest*
6685   eval "ac_cv_func_shl_load=yes"
6686 else
6687   echo "configure: failed program was:" >&5
6688   cat conftest.$ac_ext >&5
6689   rm -rf conftest*
6690   eval "ac_cv_func_shl_load=no"
6691 fi
6692 rm -f conftest*
6693 fi
6694
6695 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6696   echo "$ac_t""yes" 1>&6
6697   lt_cv_dlopen="shl_load"
6698 else
6699   echo "$ac_t""no" 1>&6
6700 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6701 echo "configure:6702: checking for shl_load in -ldld" >&5
6702 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6704   echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706   ac_save_LIBS="$LIBS"
6707 LIBS="-ldld  $LIBS"
6708 cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* Override any gcc2 internal prototype to avoid an error.  */
6712 /* We use char because int might match the return type of a gcc2
6713     builtin and then its argument prototype would still apply.  */
6714 char shl_load();
6715
6716 int main() {
6717 shl_load()
6718 ; return 0; }
6719 EOF
6720 if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6721   rm -rf conftest*
6722   eval "ac_cv_lib_$ac_lib_var=yes"
6723 else
6724   echo "configure: failed program was:" >&5
6725   cat conftest.$ac_ext >&5
6726   rm -rf conftest*
6727   eval "ac_cv_lib_$ac_lib_var=no"
6728 fi
6729 rm -f conftest*
6730 LIBS="$ac_save_LIBS"
6731
6732 fi
6733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6734   echo "$ac_t""yes" 1>&6
6735   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6736 else
6737   echo "$ac_t""no" 1>&6
6738 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6739 echo "configure:6740: checking for dlopen" >&5
6740 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747     which can conflict with char dlopen(); below.  */
6748 #include <assert.h>
6749 /* Override any gcc2 internal prototype to avoid an error.  */
6750 /* We use char because int might match the return type of a gcc2
6751     builtin and then its argument prototype would still apply.  */
6752 char dlopen();
6753 char (*f)();
6754
6755 int main() {
6756
6757 /* The GNU C library defines this for functions which it implements
6758     to always fail with ENOSYS.  Some functions are actually named
6759     something starting with __ and the normal name is an alias.  */
6760 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6761 choke me
6762 #else
6763 f = dlopen;
6764 #endif
6765
6766 ; return 0; }
6767 EOF
6768 if { (eval echo configure:6769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769   rm -rf conftest*
6770   eval "ac_cv_func_dlopen=yes"
6771 else
6772   echo "configure: failed program was:" >&5
6773   cat conftest.$ac_ext >&5
6774   rm -rf conftest*
6775   eval "ac_cv_func_dlopen=no"
6776 fi
6777 rm -f conftest*
6778 fi
6779
6780 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6781   echo "$ac_t""yes" 1>&6
6782   lt_cv_dlopen="dlopen"
6783 else
6784   echo "$ac_t""no" 1>&6
6785 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6786 echo "configure:6787: checking for dlopen in -ldl" >&5
6787 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6788 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6789   echo $ac_n "(cached) $ac_c" 1>&6
6790 else
6791   ac_save_LIBS="$LIBS"
6792 LIBS="-ldl  $LIBS"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error.  */
6797 /* We use char because int might match the return type of a gcc2
6798     builtin and then its argument prototype would still apply.  */
6799 char dlopen();
6800
6801 int main() {
6802 dlopen()
6803 ; return 0; }
6804 EOF
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=yes"
6808 else
6809   echo "configure: failed program was:" >&5
6810   cat conftest.$ac_ext >&5
6811   rm -rf conftest*
6812   eval "ac_cv_lib_$ac_lib_var=no"
6813 fi
6814 rm -f conftest*
6815 LIBS="$ac_save_LIBS"
6816
6817 fi
6818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6821 else
6822   echo "$ac_t""no" 1>&6
6823 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6824 echo "configure:6825: checking for dlopen in -lsvld" >&5
6825 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6826 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6827   echo $ac_n "(cached) $ac_c" 1>&6
6828 else
6829   ac_save_LIBS="$LIBS"
6830 LIBS="-lsvld  $LIBS"
6831 cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* Override any gcc2 internal prototype to avoid an error.  */
6835 /* We use char because int might match the return type of a gcc2
6836     builtin and then its argument prototype would still apply.  */
6837 char dlopen();
6838
6839 int main() {
6840 dlopen()
6841 ; return 0; }
6842 EOF
6843 if { (eval echo configure:6844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=yes"
6846 else
6847   echo "configure: failed program was:" >&5
6848   cat conftest.$ac_ext >&5
6849   rm -rf conftest*
6850   eval "ac_cv_lib_$ac_lib_var=no"
6851 fi
6852 rm -f conftest*
6853 LIBS="$ac_save_LIBS"
6854
6855 fi
6856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6859 else
6860   echo "$ac_t""no" 1>&6
6861 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6862 echo "configure:6863: checking for dld_link in -ldld" >&5
6863 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6864 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6865   echo $ac_n "(cached) $ac_c" 1>&6
6866 else
6867   ac_save_LIBS="$LIBS"
6868 LIBS="-ldld  $LIBS"
6869 cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872 /* Override any gcc2 internal prototype to avoid an error.  */
6873 /* We use char because int might match the return type of a gcc2
6874     builtin and then its argument prototype would still apply.  */
6875 char dld_link();
6876
6877 int main() {
6878 dld_link()
6879 ; return 0; }
6880 EOF
6881 if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6882   rm -rf conftest*
6883   eval "ac_cv_lib_$ac_lib_var=yes"
6884 else
6885   echo "configure: failed program was:" >&5
6886   cat conftest.$ac_ext >&5
6887   rm -rf conftest*
6888   eval "ac_cv_lib_$ac_lib_var=no"
6889 fi
6890 rm -f conftest*
6891 LIBS="$ac_save_LIBS"
6892
6893 fi
6894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6895   echo "$ac_t""yes" 1>&6
6896   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6897 else
6898   echo "$ac_t""no" 1>&6
6899 fi
6900
6901               
6902 fi
6903
6904             
6905 fi
6906
6907           
6908 fi
6909
6910         
6911 fi
6912
6913       
6914 fi
6915
6916     ;;
6917   esac
6918
6919   if test "x$lt_cv_dlopen" != xno; then
6920     enable_dlopen=yes
6921   else
6922     enable_dlopen=no
6923   fi
6924
6925   case $lt_cv_dlopen in
6926   dlopen)
6927     save_CPPFLAGS="$CPPFLAGS"
6928         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6929
6930     save_LDFLAGS="$LDFLAGS"
6931     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6932
6933     save_LIBS="$LIBS"
6934     LIBS="$lt_cv_dlopen_libs $LIBS"
6935
6936     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6937 echo "configure:6938: checking whether a program can dlopen itself" >&5
6938 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6939   echo $ac_n "(cached) $ac_c" 1>&6
6940 else
6941           if test "$cross_compiling" = yes; then :
6942   lt_cv_dlopen_self=cross
6943 else
6944     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6945   lt_status=$lt_dlunknown
6946   cat > conftest.$ac_ext <<EOF
6947 #line 6948 "configure"
6948 #include "confdefs.h"
6949
6950 #if HAVE_DLFCN_H
6951 #include <dlfcn.h>
6952 #endif
6953
6954 #include <stdio.h>
6955
6956 #ifdef RTLD_GLOBAL
6957 #  define LT_DLGLOBAL           RTLD_GLOBAL
6958 #else
6959 #  ifdef DL_GLOBAL
6960 #    define LT_DLGLOBAL         DL_GLOBAL
6961 #  else
6962 #    define LT_DLGLOBAL         0
6963 #  endif
6964 #endif
6965
6966 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6967    find out it does not work in some platform. */
6968 #ifndef LT_DLLAZY_OR_NOW
6969 #  ifdef RTLD_LAZY
6970 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6971 #  else
6972 #    ifdef DL_LAZY
6973 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6974 #    else
6975 #      ifdef RTLD_NOW
6976 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6977 #      else
6978 #        ifdef DL_NOW
6979 #          define LT_DLLAZY_OR_NOW      DL_NOW
6980 #        else
6981 #          define LT_DLLAZY_OR_NOW      0
6982 #        endif
6983 #      endif
6984 #    endif
6985 #  endif
6986 #endif
6987
6988 #ifdef __cplusplus
6989 extern "C" void exit (int);
6990 #endif
6991
6992 void fnord() { int i=42;}
6993 int main ()
6994 {
6995   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6996   int status = $lt_dlunknown;
6997
6998   if (self)
6999     {
7000       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7001       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7002       /* dlclose (self); */
7003     }
7004
7005     exit (status);
7006 }
7007 EOF
7008   if { (eval echo configure:7009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7009     (./conftest; exit; ) 2>/dev/null
7010     lt_status=$?
7011     case x$lt_status in
7012       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7013       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7014       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7015     esac
7016   else :
7017     # compilation failed
7018     lt_cv_dlopen_self=no
7019   fi
7020 fi
7021 rm -fr conftest*
7022
7023     
7024 fi
7025
7026 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7027
7028     if test "x$lt_cv_dlopen_self" = xyes; then
7029       LDFLAGS="$LDFLAGS $link_static_flag"
7030       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7031 echo "configure:7032: checking whether a statically linked program can dlopen itself" >&5
7032 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7033   echo $ac_n "(cached) $ac_c" 1>&6
7034 else
7035           if test "$cross_compiling" = yes; then :
7036   lt_cv_dlopen_self_static=cross
7037 else
7038     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7039   lt_status=$lt_dlunknown
7040   cat > conftest.$ac_ext <<EOF
7041 #line 7042 "configure"
7042 #include "confdefs.h"
7043
7044 #if HAVE_DLFCN_H
7045 #include <dlfcn.h>
7046 #endif
7047
7048 #include <stdio.h>
7049
7050 #ifdef RTLD_GLOBAL
7051 #  define LT_DLGLOBAL           RTLD_GLOBAL
7052 #else
7053 #  ifdef DL_GLOBAL
7054 #    define LT_DLGLOBAL         DL_GLOBAL
7055 #  else
7056 #    define LT_DLGLOBAL         0
7057 #  endif
7058 #endif
7059
7060 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7061    find out it does not work in some platform. */
7062 #ifndef LT_DLLAZY_OR_NOW
7063 #  ifdef RTLD_LAZY
7064 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7065 #  else
7066 #    ifdef DL_LAZY
7067 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7068 #    else
7069 #      ifdef RTLD_NOW
7070 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7071 #      else
7072 #        ifdef DL_NOW
7073 #          define LT_DLLAZY_OR_NOW      DL_NOW
7074 #        else
7075 #          define LT_DLLAZY_OR_NOW      0
7076 #        endif
7077 #      endif
7078 #    endif
7079 #  endif
7080 #endif
7081
7082 #ifdef __cplusplus
7083 extern "C" void exit (int);
7084 #endif
7085
7086 void fnord() { int i=42;}
7087 int main ()
7088 {
7089   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7090   int status = $lt_dlunknown;
7091
7092   if (self)
7093     {
7094       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7095       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7096       /* dlclose (self); */
7097     }
7098
7099     exit (status);
7100 }
7101 EOF
7102   if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7103     (./conftest; exit; ) 2>/dev/null
7104     lt_status=$?
7105     case x$lt_status in
7106       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7107       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7108       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7109     esac
7110   else :
7111     # compilation failed
7112     lt_cv_dlopen_self_static=no
7113   fi
7114 fi
7115 rm -fr conftest*
7116
7117       
7118 fi
7119
7120 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7121     fi
7122
7123     CPPFLAGS="$save_CPPFLAGS"
7124     LDFLAGS="$save_LDFLAGS"
7125     LIBS="$save_LIBS"
7126     ;;
7127   esac
7128
7129   case $lt_cv_dlopen_self in
7130   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7131   *) enable_dlopen_self=unknown ;;
7132   esac
7133
7134   case $lt_cv_dlopen_self_static in
7135   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7136   *) enable_dlopen_self_static=unknown ;;
7137   esac
7138 fi
7139
7140
7141 if test "$enable_shared" = yes && test "$GCC" = yes; then
7142   case $archive_cmds in
7143   *'~'*)
7144     # FIXME: we may have to deal with multi-command sequences.
7145     ;;
7146   '$CC '*)
7147     # Test whether the compiler implicitly links with -lc since on some
7148     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7149     # to ld, don't add -lc before -lgcc.
7150     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7151 echo "configure:7152: checking whether -lc should be explicitly linked in" >&5
7152     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7153   echo $ac_n "(cached) $ac_c" 1>&6
7154 else
7155   $rm conftest*
7156     echo 'static int dummy;' > conftest.$ac_ext
7157
7158     if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7159       soname=conftest
7160       lib=conftest
7161       libobjs=conftest.$ac_objext
7162       deplibs=
7163       wl=$lt_cv_prog_cc_wl
7164       compiler_flags=-v
7165       linker_flags=-v
7166       verstring=
7167       output_objdir=.
7168       libname=conftest
7169       save_allow_undefined_flag=$allow_undefined_flag
7170       allow_undefined_flag=
7171       if { (eval echo configure:7172: \"$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; }
7172       then
7173         lt_cv_archive_cmds_need_lc=no
7174       else
7175         lt_cv_archive_cmds_need_lc=yes
7176       fi
7177       allow_undefined_flag=$save_allow_undefined_flag
7178     else
7179       cat conftest.err 1>&5
7180     fi
7181 fi
7182
7183     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7184     ;;
7185   esac
7186 fi
7187 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7188
7189 # The second clause should only fire when bootstrapping the
7190 # libtool distribution, otherwise you forgot to ship ltmain.sh
7191 # with your package, and you will get complaints that there are
7192 # no rules to generate ltmain.sh.
7193 if test -f "$ltmain"; then
7194   :
7195 else
7196   # If there is no Makefile yet, we rely on a make rule to execute
7197   # `config.status --recheck' to rerun these tests and create the
7198   # libtool script then.
7199   test -f Makefile && make "$ltmain"
7200 fi
7201
7202 if test -f "$ltmain"; then
7203   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7204   $rm -f "${ofile}T"
7205
7206   echo creating $ofile
7207
7208   # Now quote all the things that may contain metacharacters while being
7209   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7210   # variables and quote the copies for generation of the libtool script.
7211   for var in echo old_CC old_CFLAGS SED \
7212     AR AR_FLAGS CC LD LN_S NM SHELL \
7213     reload_flag reload_cmds wl \
7214     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7215     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7216     library_names_spec soname_spec \
7217     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7218     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7219     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7220     old_striplib striplib file_magic_cmd export_symbols_cmds \
7221     deplibs_check_method allow_undefined_flag no_undefined_flag \
7222     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7223     global_symbol_to_c_name_address \
7224     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7225     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7226     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7227
7228     case $var in
7229     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7230     old_postinstall_cmds | old_postuninstall_cmds | \
7231     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7232     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7233     postinstall_cmds | postuninstall_cmds | \
7234     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7235       # Double-quote double-evaled strings.
7236       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7237       ;;
7238     *)
7239       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7240       ;;
7241     esac
7242   done
7243
7244   cat <<__EOF__ > "${ofile}T"
7245 #! $SHELL
7246
7247 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7248 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7249 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7250 #
7251 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7252 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7253 #
7254 # This program is free software; you can redistribute it and/or modify
7255 # it under the terms of the GNU General Public License as published by
7256 # the Free Software Foundation; either version 2 of the License, or
7257 # (at your option) any later version.
7258 #
7259 # This program is distributed in the hope that it will be useful, but
7260 # WITHOUT ANY WARRANTY; without even the implied warranty of
7261 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7262 # General Public License for more details.
7263 #
7264 # You should have received a copy of the GNU General Public License
7265 # along with this program; if not, write to the Free Software
7266 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7267 #
7268 # As a special exception to the GNU General Public License, if you
7269 # distribute this file as part of a program that contains a
7270 # configuration script generated by Autoconf, you may include it under
7271 # the same distribution terms that you use for the rest of that program.
7272
7273 # A sed that does not truncate output.
7274 SED=$lt_SED
7275
7276 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7277 Xsed="${SED} -e s/^X//"
7278
7279 # The HP-UX ksh and POSIX shell print the target directory to stdout
7280 # if CDPATH is set.
7281 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7282
7283 # ### BEGIN LIBTOOL CONFIG
7284
7285 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7286
7287 # Shell to use when invoking shell scripts.
7288 SHELL=$lt_SHELL
7289
7290 # Whether or not to build shared libraries.
7291 build_libtool_libs=$enable_shared
7292
7293 # Whether or not to build static libraries.
7294 build_old_libs=$enable_static
7295
7296 # Whether or not to add -lc for building shared libraries.
7297 build_libtool_need_lc=$need_lc
7298
7299 # Whether or not to optimize for fast installation.
7300 fast_install=$enable_fast_install
7301
7302 # The host system.
7303 host_alias=$host_alias
7304 host=$host
7305
7306 # An echo program that does not interpret backslashes.
7307 echo=$lt_echo
7308
7309 # The archiver.
7310 AR=$lt_AR
7311 AR_FLAGS=$lt_AR_FLAGS
7312
7313 # The default C compiler.
7314 CC=$lt_CC
7315
7316 # Is the compiler the GNU C compiler?
7317 with_gcc=$GCC
7318
7319 # The linker used to build libraries.
7320 LD=$lt_LD
7321
7322 # Whether we need hard or soft links.
7323 LN_S=$lt_LN_S
7324
7325 # A BSD-compatible nm program.
7326 NM=$lt_NM
7327
7328 # A symbol stripping program
7329 STRIP=$STRIP
7330
7331 # Used to examine libraries when file_magic_cmd begins "file"
7332 MAGIC_CMD=$MAGIC_CMD
7333
7334 # Used on cygwin: DLL creation program.
7335 DLLTOOL="$DLLTOOL"
7336
7337 # Used on cygwin: object dumper.
7338 OBJDUMP="$OBJDUMP"
7339
7340 # Used on cygwin: assembler.
7341 AS="$AS"
7342
7343 # The name of the directory that contains temporary libtool files.
7344 objdir=$objdir
7345
7346 # How to create reloadable object files.
7347 reload_flag=$lt_reload_flag
7348 reload_cmds=$lt_reload_cmds
7349
7350 # How to pass a linker flag through the compiler.
7351 wl=$lt_wl
7352
7353 # Object file suffix (normally "o").
7354 objext="$ac_objext"
7355
7356 # Old archive suffix (normally "a").
7357 libext="$libext"
7358
7359 # Executable file suffix (normally "").
7360 exeext="$exeext"
7361
7362 # Additional compiler flags for building library objects.
7363 pic_flag=$lt_pic_flag
7364 pic_mode=$pic_mode
7365
7366 # Does compiler simultaneously support -c and -o options?
7367 compiler_c_o=$lt_compiler_c_o
7368
7369 # Can we write directly to a .lo ?
7370 compiler_o_lo=$lt_compiler_o_lo
7371
7372 # Must we lock files when doing compilation ?
7373 need_locks=$lt_need_locks
7374
7375 # Do we need the lib prefix for modules?
7376 need_lib_prefix=$need_lib_prefix
7377
7378 # Do we need a version for libraries?
7379 need_version=$need_version
7380
7381 # Whether dlopen is supported.
7382 dlopen_support=$enable_dlopen
7383
7384 # Whether dlopen of programs is supported.
7385 dlopen_self=$enable_dlopen_self
7386
7387 # Whether dlopen of statically linked programs is supported.
7388 dlopen_self_static=$enable_dlopen_self_static
7389
7390 # Compiler flag to prevent dynamic linking.
7391 link_static_flag=$lt_link_static_flag
7392
7393 # Compiler flag to turn off builtin functions.
7394 no_builtin_flag=$lt_no_builtin_flag
7395
7396 # Compiler flag to allow reflexive dlopens.
7397 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7398
7399 # Compiler flag to generate shared objects directly from archives.
7400 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7401
7402 # Compiler flag to generate thread-safe objects.
7403 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7404
7405 # Library versioning type.
7406 version_type=$version_type
7407
7408 # Format of library name prefix.
7409 libname_spec=$lt_libname_spec
7410
7411 # List of archive names.  First name is the real one, the rest are links.
7412 # The last name is the one that the linker finds with -lNAME.
7413 library_names_spec=$lt_library_names_spec
7414
7415 # The coded name of the library, if different from the real name.
7416 soname_spec=$lt_soname_spec
7417
7418 # Commands used to build and install an old-style archive.
7419 RANLIB=$lt_RANLIB
7420 old_archive_cmds=$lt_old_archive_cmds
7421 old_postinstall_cmds=$lt_old_postinstall_cmds
7422 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7423
7424 # Create an old-style archive from a shared archive.
7425 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7426
7427 # Create a temporary old-style archive to link instead of a shared archive.
7428 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7429
7430 # Commands used to build and install a shared archive.
7431 archive_cmds=$lt_archive_cmds
7432 archive_expsym_cmds=$lt_archive_expsym_cmds
7433 postinstall_cmds=$lt_postinstall_cmds
7434 postuninstall_cmds=$lt_postuninstall_cmds
7435
7436 # Commands to strip libraries.
7437 old_striplib=$lt_old_striplib
7438 striplib=$lt_striplib
7439
7440 # Method to check whether dependent libraries are shared objects.
7441 deplibs_check_method=$lt_deplibs_check_method
7442
7443 # Command to use when deplibs_check_method == file_magic.
7444 file_magic_cmd=$lt_file_magic_cmd
7445
7446 # Flag that allows shared libraries with undefined symbols to be built.
7447 allow_undefined_flag=$lt_allow_undefined_flag
7448
7449 # Flag that forces no undefined symbols.
7450 no_undefined_flag=$lt_no_undefined_flag
7451
7452 # Commands used to finish a libtool library installation in a directory.
7453 finish_cmds=$lt_finish_cmds
7454
7455 # Same as above, but a single script fragment to be evaled but not shown.
7456 finish_eval=$lt_finish_eval
7457
7458 # Take the output of nm and produce a listing of raw symbols and C names.
7459 global_symbol_pipe=$lt_global_symbol_pipe
7460
7461 # Transform the output of nm in a proper C declaration
7462 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7463
7464 # Transform the output of nm in a C name address pair
7465 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7466
7467 # This is the shared library runtime path variable.
7468 runpath_var=$runpath_var
7469
7470 # This is the shared library path variable.
7471 shlibpath_var=$shlibpath_var
7472
7473 # Is shlibpath searched before the hard-coded library search path?
7474 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7475
7476 # How to hardcode a shared library path into an executable.
7477 hardcode_action=$hardcode_action
7478
7479 # Whether we should hardcode library paths into libraries.
7480 hardcode_into_libs=$hardcode_into_libs
7481
7482 # Flag to hardcode \$libdir into a binary during linking.
7483 # This must work even if \$libdir does not exist.
7484 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7485
7486 # Whether we need a single -rpath flag with a separated argument.
7487 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7488
7489 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7490 # resulting binary.
7491 hardcode_direct=$hardcode_direct
7492
7493 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7494 # resulting binary.
7495 hardcode_minus_L=$hardcode_minus_L
7496
7497 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7498 # the resulting binary.
7499 hardcode_shlibpath_var=$hardcode_shlibpath_var
7500
7501 # Variables whose values should be saved in libtool wrapper scripts and
7502 # restored at relink time.
7503 variables_saved_for_relink="$variables_saved_for_relink"
7504
7505 # Whether libtool must link a program against all its dependency libraries.
7506 link_all_deplibs=$link_all_deplibs
7507
7508 # Compile-time system search path for libraries
7509 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7510
7511 # Run-time system search path for libraries
7512 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7513
7514 # Fix the shell variable \$srcfile for the compiler.
7515 fix_srcfile_path="$fix_srcfile_path"
7516
7517 # Set to yes if exported symbols are required.
7518 always_export_symbols=$always_export_symbols
7519
7520 # The commands to list exported symbols.
7521 export_symbols_cmds=$lt_export_symbols_cmds
7522
7523 # The commands to extract the exported symbol list from a shared archive.
7524 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7525
7526 # Symbols that should not be listed in the preloaded symbols.
7527 exclude_expsyms=$lt_exclude_expsyms
7528
7529 # Symbols that must always be exported.
7530 include_expsyms=$lt_include_expsyms
7531
7532 # ### END LIBTOOL CONFIG
7533
7534 __EOF__
7535
7536   case $host_os in
7537   aix3*)
7538     cat <<\EOF >> "${ofile}T"
7539
7540 # AIX sometimes has problems with the GCC collect2 program.  For some
7541 # reason, if we set the COLLECT_NAMES environment variable, the problems
7542 # vanish in a puff of smoke.
7543 if test "X${COLLECT_NAMES+set}" != Xset; then
7544   COLLECT_NAMES=
7545   export COLLECT_NAMES
7546 fi
7547 EOF
7548     ;;
7549   esac
7550
7551   case $host_os in
7552   cygwin* | mingw* | pw32* | os2*)
7553     cat <<'EOF' >> "${ofile}T"
7554       # This is a source program that is used to create dlls on Windows
7555       # Don't remove nor modify the starting and closing comments
7556 # /* ltdll.c starts here */
7557 # #define WIN32_LEAN_AND_MEAN
7558 # #include <windows.h>
7559 # #undef WIN32_LEAN_AND_MEAN
7560 # #include <stdio.h>
7561 #
7562 # #ifndef __CYGWIN__
7563 # #  ifdef __CYGWIN32__
7564 # #    define __CYGWIN__ __CYGWIN32__
7565 # #  endif
7566 # #endif
7567 #
7568 # #ifdef __cplusplus
7569 # extern "C" {
7570 # #endif
7571 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7572 # #ifdef __cplusplus
7573 # }
7574 # #endif
7575 #
7576 # #ifdef __CYGWIN__
7577 # #include <cygwin/cygwin_dll.h>
7578 # DECLARE_CYGWIN_DLL( DllMain );
7579 # #endif
7580 # HINSTANCE __hDllInstance_base;
7581 #
7582 # BOOL APIENTRY
7583 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7584 # {
7585 #   __hDllInstance_base = hInst;
7586 #   return TRUE;
7587 # }
7588 # /* ltdll.c ends here */
7589         # This is a source program that is used to create import libraries
7590         # on Windows for dlls which lack them. Don't remove nor modify the
7591         # starting and closing comments
7592 # /* impgen.c starts here */
7593 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7594 #
7595 #  This file is part of GNU libtool.
7596 #
7597 #  This program is free software; you can redistribute it and/or modify
7598 #  it under the terms of the GNU General Public License as published by
7599 #  the Free Software Foundation; either version 2 of the License, or
7600 #  (at your option) any later version.
7601 #
7602 #  This program is distributed in the hope that it will be useful,
7603 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7604 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7605 #  GNU General Public License for more details.
7606 #
7607 #  You should have received a copy of the GNU General Public License
7608 #  along with this program; if not, write to the Free Software
7609 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7610 #  */
7611 #
7612 # #include <stdio.h>            /* for printf() */
7613 # #include <unistd.h>           /* for open(), lseek(), read() */
7614 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7615 # #include <string.h>           /* for strdup() */
7616 #
7617 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7618 # #ifndef O_BINARY
7619 # #define O_BINARY 0
7620 # #endif
7621 #
7622 # static unsigned int
7623 # pe_get16 (fd, offset)
7624 #      int fd;
7625 #      int offset;
7626 # {
7627 #   unsigned char b[2];
7628 #   lseek (fd, offset, SEEK_SET);
7629 #   read (fd, b, 2);
7630 #   return b[0] + (b[1]<<8);
7631 # }
7632 #
7633 # static unsigned int
7634 # pe_get32 (fd, offset)
7635 #     int fd;
7636 #     int offset;
7637 # {
7638 #   unsigned char b[4];
7639 #   lseek (fd, offset, SEEK_SET);
7640 #   read (fd, b, 4);
7641 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7642 # }
7643 #
7644 # static unsigned int
7645 # pe_as32 (ptr)
7646 #      void *ptr;
7647 # {
7648 #   unsigned char *b = ptr;
7649 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7650 # }
7651 #
7652 # int
7653 # main (argc, argv)
7654 #     int argc;
7655 #     char *argv[];
7656 # {
7657 #     int dll;
7658 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7659 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7660 #     unsigned long name_rvas, nexp;
7661 #     unsigned char *expdata, *erva;
7662 #     char *filename, *dll_name;
7663 #
7664 #     filename = argv[1];
7665 #
7666 #     dll = open(filename, O_RDONLY|O_BINARY);
7667 #     if (dll < 1)
7668 #       return 1;
7669 #
7670 #     dll_name = filename;
7671 #
7672 #     for (i=0; filename[i]; i++)
7673 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7674 #           dll_name = filename + i +1;
7675 #
7676 #     pe_header_offset = pe_get32 (dll, 0x3c);
7677 #     opthdr_ofs = pe_header_offset + 4 + 20;
7678 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7679 #
7680 #     if (num_entries < 1) /* no exports */
7681 #       return 1;
7682 #
7683 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7684 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7685 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7686 #     secptr = (pe_header_offset + 4 + 20 +
7687 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7688 #
7689 #     expptr = 0;
7690 #     for (i = 0; i < nsections; i++)
7691 #     {
7692 #       char sname[8];
7693 #       unsigned long secptr1 = secptr + 40 * i;
7694 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7695 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7696 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7697 #       lseek(dll, secptr1, SEEK_SET);
7698 #       read(dll, sname, 8);
7699 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7700 #       {
7701 #           expptr = fptr + (export_rva - vaddr);
7702 #           if (export_rva + export_size > vaddr + vsize)
7703 #               export_size = vsize - (export_rva - vaddr);
7704 #           break;
7705 #       }
7706 #     }
7707 #
7708 #     expdata = (unsigned char*)malloc(export_size);
7709 #     lseek (dll, expptr, SEEK_SET);
7710 #     read (dll, expdata, export_size);
7711 #     erva = expdata - export_rva;
7712 #
7713 #     nexp = pe_as32 (expdata+24);
7714 #     name_rvas = pe_as32 (expdata+32);
7715 #
7716 #     printf ("EXPORTS\n");
7717 #     for (i = 0; i<nexp; i++)
7718 #     {
7719 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7720 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7721 #     }
7722 #
7723 #     return 0;
7724 # }
7725 # /* impgen.c ends here */
7726
7727 EOF
7728     ;;
7729   esac
7730
7731   # We use sed instead of cat because bash on DJGPP gets confused if
7732   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7733   # text mode, it properly converts lines to CR/LF.  This bash problem
7734   # is reportedly fixed, but why not run on old versions too?
7735   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7736
7737   mv -f "${ofile}T" "$ofile" || \
7738     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7739   chmod +x "$ofile"
7740 fi
7741
7742
7743
7744
7745
7746 # This can be used to rebuild libtool when needed
7747 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7748
7749 # Always use our own libtool.
7750 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7751
7752 # Prevent multiple expansion
7753
7754
7755
7756 # test for ln hardlink support
7757 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7758 echo "configure:7759: checking whether ln works" >&5
7759 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7760   echo $ac_n "(cached) $ac_c" 1>&6
7761 else
7762   rm -f conftest.src conftest.dst
7763 echo "conftest" > conftest.src
7764 if ln conftest.src conftest.dst 2>/dev/null
7765 then
7766   ol_cv_prog_LN_H="ln"
7767 else
7768   ol_cv_prog_LN_H="cp"
7769 fi
7770 rm -f conftest.src conftest.dst
7771
7772 fi
7773 LN_H="$ol_cv_prog_LN_H"
7774 if test "$ol_cv_prog_LN_H" = "ln"; then
7775         echo "$ac_t""yes" 1>&6
7776 else
7777         echo "$ac_t""no" 1>&6
7778 fi
7779
7780 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7781 echo "configure:7782: checking whether ln -s works" >&5
7782 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7783   echo $ac_n "(cached) $ac_c" 1>&6
7784 else
7785   rm -f conftestdata
7786 if ln -s X conftestdata 2>/dev/null
7787 then
7788   rm -f conftestdata
7789   ac_cv_prog_LN_S="ln -s"
7790 else
7791   ac_cv_prog_LN_S=ln
7792 fi
7793 fi
7794 LN_S="$ac_cv_prog_LN_S"
7795 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7796   echo "$ac_t""yes" 1>&6
7797 else
7798   echo "$ac_t""no" 1>&6
7799 fi
7800
7801
7802 ol_link_perl=no
7803 if test $ol_enable_perl != no ; then
7804         # Extract the first word of "perl", so it can be a program name with args.
7805 set dummy perl; ac_word=$2
7806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7807 echo "configure:7808: checking for $ac_word" >&5
7808 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7809   echo $ac_n "(cached) $ac_c" 1>&6
7810 else
7811   case "$PERLBIN" in
7812   /*)
7813   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7814   ;;
7815   ?:/*)
7816   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7817   ;;
7818   *)
7819   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7820   ac_dummy="$PATH"
7821   for ac_dir in $ac_dummy; do 
7822     test -z "$ac_dir" && ac_dir=.
7823     if test -f $ac_dir/$ac_word; then
7824       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7825       break
7826     fi
7827   done
7828   IFS="$ac_save_ifs"
7829   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7830   ;;
7831 esac
7832 fi
7833 PERLBIN="$ac_cv_path_PERLBIN"
7834 if test -n "$PERLBIN"; then
7835   echo "$ac_t""$PERLBIN" 1>&6
7836 else
7837   echo "$ac_t""no" 1>&6
7838 fi
7839
7840
7841         if test "no$PERLBIN" = "no" ; then
7842                 if test $ol_enable_perl = yes ; then
7843                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7844                 fi
7845
7846         else
7847                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7848                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/\ -lc\ //g -e s/\ -lc\$// `"
7849                 if test x"$ol_with_perl_module" = "xstatic" ; then
7850                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS""
7851                 else
7852                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS""
7853                 fi
7854                                 ol_link_perl=yes
7855         fi
7856 fi
7857
7858 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7859 echo "configure:7860: checking how to run the C preprocessor" >&5
7860 # On Suns, sometimes $CPP names a directory.
7861 if test -n "$CPP" && test -d "$CPP"; then
7862   CPP=
7863 fi
7864 if test -z "$CPP"; then
7865 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7866   echo $ac_n "(cached) $ac_c" 1>&6
7867 else
7868     # This must be in double quotes, not single quotes, because CPP may get
7869   # substituted into the Makefile and "${CC-cc}" will confuse make.
7870   CPP="${CC-cc} -E"
7871   # On the NeXT, cc -E runs the code through the compiler's parser,
7872   # not just through cpp.
7873   cat > conftest.$ac_ext <<EOF
7874 #line 7875 "configure"
7875 #include "confdefs.h"
7876 #include <assert.h>
7877 Syntax Error
7878 EOF
7879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7880 { (eval echo configure:7881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7881 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7882 if test -z "$ac_err"; then
7883   :
7884 else
7885   echo "$ac_err" >&5
7886   echo "configure: failed program was:" >&5
7887   cat conftest.$ac_ext >&5
7888   rm -rf conftest*
7889   CPP="${CC-cc} -E -traditional-cpp"
7890   cat > conftest.$ac_ext <<EOF
7891 #line 7892 "configure"
7892 #include "confdefs.h"
7893 #include <assert.h>
7894 Syntax Error
7895 EOF
7896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7897 { (eval echo configure:7898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7899 if test -z "$ac_err"; then
7900   :
7901 else
7902   echo "$ac_err" >&5
7903   echo "configure: failed program was:" >&5
7904   cat conftest.$ac_ext >&5
7905   rm -rf conftest*
7906   CPP="${CC-cc} -nologo -E"
7907   cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 #include <assert.h>
7911 Syntax Error
7912 EOF
7913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7914 { (eval echo configure:7915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7916 if test -z "$ac_err"; then
7917   :
7918 else
7919   echo "$ac_err" >&5
7920   echo "configure: failed program was:" >&5
7921   cat conftest.$ac_ext >&5
7922   rm -rf conftest*
7923   CPP=/lib/cpp
7924 fi
7925 rm -f conftest*
7926 fi
7927 rm -f conftest*
7928 fi
7929 rm -f conftest*
7930   ac_cv_prog_CPP="$CPP"
7931 fi
7932   CPP="$ac_cv_prog_CPP"
7933 else
7934   ac_cv_prog_CPP="$CPP"
7935 fi
7936 echo "$ac_t""$CPP" 1>&6
7937
7938
7939 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7940         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7941
7942 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7943         echo "configure: warning: programs compiled here do run here..." 1>&2
7944         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7945
7946 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7947         echo "configure: warning: programs compiled here do not run here..." 1>&2
7948         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7949 fi
7950
7951
7952 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7953 echo "configure:7954: checking for Cygwin environment" >&5
7954 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7955   echo $ac_n "(cached) $ac_c" 1>&6
7956 else
7957   cat > conftest.$ac_ext <<EOF
7958 #line 7959 "configure"
7959 #include "confdefs.h"
7960
7961 int main() {
7962
7963 #ifndef __CYGWIN__
7964 #define __CYGWIN__ __CYGWIN32__
7965 #endif
7966 return __CYGWIN__;
7967 ; return 0; }
7968 EOF
7969 if { (eval echo configure:7970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7970   rm -rf conftest*
7971   ac_cv_cygwin=yes
7972 else
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   ac_cv_cygwin=no
7977 fi
7978 rm -f conftest*
7979 fi
7980
7981 echo "$ac_t""$ac_cv_cygwin" 1>&6
7982 CYGWIN=
7983 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7984 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7985 echo "configure:7986: checking for mingw32 environment" >&5
7986 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7987   echo $ac_n "(cached) $ac_c" 1>&6
7988 else
7989   cat > conftest.$ac_ext <<EOF
7990 #line 7991 "configure"
7991 #include "confdefs.h"
7992
7993 int main() {
7994 return __MINGW32__;
7995 ; return 0; }
7996 EOF
7997 if { (eval echo configure:7998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7998   rm -rf conftest*
7999   ac_cv_mingw32=yes
8000 else
8001   echo "configure: failed program was:" >&5
8002   cat conftest.$ac_ext >&5
8003   rm -rf conftest*
8004   ac_cv_mingw32=no
8005 fi
8006 rm -f conftest*
8007 fi
8008
8009 echo "$ac_t""$ac_cv_mingw32" 1>&6
8010 MINGW32=
8011 test "$ac_cv_mingw32" = yes && MINGW32=yes
8012
8013
8014
8015 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8016 echo "configure:8017: checking for executable suffix" >&5
8017 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8018   echo $ac_n "(cached) $ac_c" 1>&6
8019 else
8020   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8021   ac_cv_exeext=.exe
8022 else
8023   rm -f conftest*
8024   echo 'int main () { return 0; }' > conftest.$ac_ext
8025   ac_cv_exeext=
8026   if { (eval echo configure:8027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8027     for file in conftest.*; do
8028       case $file in
8029       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8030       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8031       esac
8032     done
8033   else
8034     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8035   fi
8036   rm -f conftest*
8037   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8038 fi
8039 fi
8040
8041 EXEEXT=""
8042 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8043 echo "$ac_t""${ac_cv_exeext}" 1>&6
8044 ac_exeext=$EXEEXT
8045
8046 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8047 echo "configure:8048: checking for object suffix" >&5
8048 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8049   echo $ac_n "(cached) $ac_c" 1>&6
8050 else
8051   rm -f conftest*
8052 echo 'int i = 1;' > conftest.$ac_ext
8053 if { (eval echo configure:8054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8054   for ac_file in conftest.*; do
8055     case $ac_file in
8056     *.c) ;;
8057     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8058     esac
8059   done
8060 else
8061   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8062 fi
8063 rm -f conftest*
8064 fi
8065
8066 echo "$ac_t""$ac_cv_objext" 1>&6
8067 OBJEXT=$ac_cv_objext
8068 ac_objext=$ac_cv_objext
8069
8070
8071 cat >> confdefs.h <<EOF
8072 #define EXEEXT "${EXEEXT}"
8073 EOF
8074
8075
8076 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8077 echo "configure:8078: checking for be_app in -lbe" >&5
8078 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8079 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8080   echo $ac_n "(cached) $ac_c" 1>&6
8081 else
8082   ac_save_LIBS="$LIBS"
8083 LIBS="-lbe -lroot -lnet $LIBS"
8084 cat > conftest.$ac_ext <<EOF
8085 #line 8086 "configure"
8086 #include "confdefs.h"
8087 /* Override any gcc2 internal prototype to avoid an error.  */
8088 /* We use char because int might match the return type of a gcc2
8089     builtin and then its argument prototype would still apply.  */
8090 char be_app();
8091
8092 int main() {
8093 be_app()
8094 ; return 0; }
8095 EOF
8096 if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8097   rm -rf conftest*
8098   eval "ac_cv_lib_$ac_lib_var=yes"
8099 else
8100   echo "configure: failed program was:" >&5
8101   cat conftest.$ac_ext >&5
8102   rm -rf conftest*
8103   eval "ac_cv_lib_$ac_lib_var=no"
8104 fi
8105 rm -f conftest*
8106 LIBS="$ac_save_LIBS"
8107
8108 fi
8109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8110   echo "$ac_t""yes" 1>&6
8111   LIBS="$LIBS -lbe -lroot -lnet"
8112 else
8113   echo "$ac_t""no" 1>&6
8114 :
8115 fi
8116
8117
8118
8119
8120
8121 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8122 echo "configure:8123: checking for ${CC-cc} option to accept ANSI C" >&5
8123 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8124   echo $ac_n "(cached) $ac_c" 1>&6
8125 else
8126   am_cv_prog_cc_stdc=no
8127 ac_save_CC="$CC"
8128 # Don't try gcc -ansi; that turns off useful extensions and
8129 # breaks some systems' header files.
8130 # AIX                   -qlanglvl=ansi
8131 # Ultrix and OSF/1      -std1
8132 # HP-UX 10.20 and later -Ae
8133 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8134 # SVR4                  -Xc -D__EXTENSIONS__
8135 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8136 do
8137   CC="$ac_save_CC $ac_arg"
8138   cat > conftest.$ac_ext <<EOF
8139 #line 8140 "configure"
8140 #include "confdefs.h"
8141 #include <stdarg.h>
8142 #include <stdio.h>
8143 #include <sys/types.h>
8144 #include <sys/stat.h>
8145 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8146 struct buf { int x; };
8147 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8148 static char *e (p, i)
8149      char **p;
8150      int i;
8151 {
8152   return p[i];
8153 }
8154 static char *f (char * (*g) (char **, int), char **p, ...)
8155 {
8156   char *s;
8157   va_list v;
8158   va_start (v,p);
8159   s = g (p, va_arg (v,int));
8160   va_end (v);
8161   return s;
8162 }
8163 int test (int i, double x);
8164 struct s1 {int (*f) (int a);};
8165 struct s2 {int (*f) (double a);};
8166 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8167 int argc;
8168 char **argv;
8169
8170 int main() {
8171
8172 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8173
8174 ; return 0; }
8175 EOF
8176 if { (eval echo configure:8177: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8177   rm -rf conftest*
8178   am_cv_prog_cc_stdc="$ac_arg"; break
8179 else
8180   echo "configure: failed program was:" >&5
8181   cat conftest.$ac_ext >&5
8182 fi
8183 rm -f conftest*
8184 done
8185 CC="$ac_save_CC"
8186
8187 fi
8188
8189 if test -z "$am_cv_prog_cc_stdc"; then
8190   echo "$ac_t""none needed" 1>&6
8191 else
8192   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8193 fi
8194 case "x$am_cv_prog_cc_stdc" in
8195   x|xno) ;;
8196   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8197 esac
8198
8199 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8200         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8201 fi
8202
8203 # test for make depend flag
8204 OL_MKDEP=
8205 OL_MKDEP_FLAGS=
8206 if test -z "${MKDEP}"; then
8207         OL_MKDEP="${CC-cc}"
8208         if test -z "${MKDEP_FLAGS}"; then
8209                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8210 echo "configure:8211: checking for ${OL_MKDEP} depend flag" >&5
8211 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8212   echo $ac_n "(cached) $ac_c" 1>&6
8213 else
8214   
8215                         ol_cv_mkdep=no
8216                         for flag in "-M" "-xM"; do
8217                                 cat > conftest.c <<EOF
8218  noCode;
8219 EOF
8220                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8221                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8222                                 then
8223                                         if test ! -f conftest."${ac_object}" ; then
8224                                                 ol_cv_mkdep=$flag
8225                                                 OL_MKDEP_FLAGS="$flag"
8226                                                 break
8227                                         fi
8228                                 fi
8229                         done
8230                         rm -f conftest*
8231                 
8232 fi
8233
8234 echo "$ac_t""$ol_cv_mkdep" 1>&6
8235         else
8236                 cc_cv_mkdep=yes
8237                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8238         fi
8239 else
8240         cc_cv_mkdep=yes
8241         OL_MKDEP="${MKDEP}"
8242         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8243 fi
8244
8245
8246
8247 if test "${ol_cv_mkdep}" = no ; then
8248         # this will soon become an error
8249         echo "configure: warning: do not know how to generate dependencies" 1>&2
8250 fi
8251
8252 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8253 echo "configure:8254: checking for afopen in -ls" >&5
8254 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8255 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8256   echo $ac_n "(cached) $ac_c" 1>&6
8257 else
8258   ac_save_LIBS="$LIBS"
8259 LIBS="-ls  $LIBS"
8260 cat > conftest.$ac_ext <<EOF
8261 #line 8262 "configure"
8262 #include "confdefs.h"
8263 /* Override any gcc2 internal prototype to avoid an error.  */
8264 /* We use char because int might match the return type of a gcc2
8265     builtin and then its argument prototype would still apply.  */
8266 char afopen();
8267
8268 int main() {
8269 afopen()
8270 ; return 0; }
8271 EOF
8272 if { (eval echo configure:8273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8273   rm -rf conftest*
8274   eval "ac_cv_lib_$ac_lib_var=yes"
8275 else
8276   echo "configure: failed program was:" >&5
8277   cat conftest.$ac_ext >&5
8278   rm -rf conftest*
8279   eval "ac_cv_lib_$ac_lib_var=no"
8280 fi
8281 rm -f conftest*
8282 LIBS="$ac_save_LIBS"
8283
8284 fi
8285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8286   echo "$ac_t""yes" 1>&6
8287   
8288         AUTH_LIBS=-ls
8289         cat >> confdefs.h <<\EOF
8290 #define HAVE_AIX_SECURITY 1
8291 EOF
8292
8293
8294 else
8295   echo "$ac_t""no" 1>&6
8296 fi
8297
8298
8299 case "$target" in
8300 *-ibm-openedition)
8301         ac_cv_func_getopt=no
8302         cat >> confdefs.h <<\EOF
8303 #define BOTH_STRINGS_H 1
8304 EOF
8305
8306         ;;
8307 esac
8308
8309 ol_link_modules=no
8310 if test $ol_enable_modules != no ; then
8311         for ac_hdr in ltdl.h
8312 do
8313 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8314 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8315 echo "configure:8316: checking for $ac_hdr" >&5
8316 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8317   echo $ac_n "(cached) $ac_c" 1>&6
8318 else
8319   cat > conftest.$ac_ext <<EOF
8320 #line 8321 "configure"
8321 #include "confdefs.h"
8322 #include <$ac_hdr>
8323 EOF
8324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8325 { (eval echo configure:8326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8327 if test -z "$ac_err"; then
8328   rm -rf conftest*
8329   eval "ac_cv_header_$ac_safe=yes"
8330 else
8331   echo "$ac_err" >&5
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -rf conftest*
8335   eval "ac_cv_header_$ac_safe=no"
8336 fi
8337 rm -f conftest*
8338 fi
8339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8340   echo "$ac_t""yes" 1>&6
8341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8342   cat >> confdefs.h <<EOF
8343 #define $ac_tr_hdr 1
8344 EOF
8345  
8346 else
8347   echo "$ac_t""no" 1>&6
8348 fi
8349 done
8350
8351
8352         if test $ac_cv_header_ltdl_h = no ; then
8353                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8354         fi
8355
8356         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8357 echo "configure:8358: checking for lt_dlinit in -lltdl" >&5
8358 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8360   echo $ac_n "(cached) $ac_c" 1>&6
8361 else
8362   ac_save_LIBS="$LIBS"
8363 LIBS="-lltdl  $LIBS"
8364 cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* Override any gcc2 internal prototype to avoid an error.  */
8368 /* We use char because int might match the return type of a gcc2
8369     builtin and then its argument prototype would still apply.  */
8370 char lt_dlinit();
8371
8372 int main() {
8373 lt_dlinit()
8374 ; return 0; }
8375 EOF
8376 if { (eval echo configure:8377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8377   rm -rf conftest*
8378   eval "ac_cv_lib_$ac_lib_var=yes"
8379 else
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=no"
8384 fi
8385 rm -f conftest*
8386 LIBS="$ac_save_LIBS"
8387
8388 fi
8389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8390   echo "$ac_t""yes" 1>&6
8391   
8392                 MODULES_LIBS=-lltdl
8393                 cat >> confdefs.h <<\EOF
8394 #define HAVE_LIBLTDL 1
8395 EOF
8396
8397         
8398 else
8399   echo "$ac_t""no" 1>&6
8400 fi
8401
8402
8403         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8404                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8405         fi
8406         ol_link_modules=yes
8407 else
8408         ol_with_bdb_module=static
8409         ol_with_dnssrv_module=static
8410         ol_with_hdb_module=static
8411         ol_with_ldap_module=static
8412         ol_with_ldbm_module=static
8413         ol_with_meta_module=static
8414         ol_with_monitor_module=static
8415         ol_with_null_module=static
8416         ol_with_passwd_module=static
8417         ol_with_perl_module=static
8418         ol_with_shell_module=static
8419         ol_with_tcl_module=static
8420         ol_with_sql_module=static
8421 fi
8422
8423 # test for EBCDIC
8424 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8425 echo "configure:8426: checking for EBCDIC" >&5
8426 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   
8430         cat > conftest.$ac_ext <<EOF
8431 #line 8432 "configure"
8432 #include "confdefs.h"
8433
8434 #if !('M' == 0xd4)
8435 #include <__ASCII__/generate_error.h>
8436 #endif
8437
8438 EOF
8439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8440 { (eval echo configure:8441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8442 if test -z "$ac_err"; then
8443   rm -rf conftest*
8444   ol_cv_cpp_ebcdic=yes
8445 else
8446   echo "$ac_err" >&5
8447   echo "configure: failed program was:" >&5
8448   cat conftest.$ac_ext >&5
8449   rm -rf conftest*
8450   ol_cv_cpp_ebcdic=no
8451 fi
8452 rm -f conftest*
8453 fi
8454
8455 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8456 if test $ol_cv_cpp_ebcdic = yes ; then
8457         cat >> confdefs.h <<\EOF
8458 #define HAVE_EBCDIC 1
8459 EOF
8460
8461 fi
8462
8463 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8464 echo "configure:8465: checking for ANSI C header files" >&5
8465 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8466   echo $ac_n "(cached) $ac_c" 1>&6
8467 else
8468   cat > conftest.$ac_ext <<EOF
8469 #line 8470 "configure"
8470 #include "confdefs.h"
8471 #include <stdlib.h>
8472 #include <stdarg.h>
8473 #include <string.h>
8474 #include <float.h>
8475 EOF
8476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8477 { (eval echo configure:8478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8479 if test -z "$ac_err"; then
8480   rm -rf conftest*
8481   ol_cv_header_stdc=yes
8482 else
8483   echo "$ac_err" >&5
8484   echo "configure: failed program was:" >&5
8485   cat conftest.$ac_ext >&5
8486   rm -rf conftest*
8487   ol_cv_header_stdc=no
8488 fi
8489 rm -f conftest*
8490
8491 if test $ol_cv_header_stdc = yes; then
8492   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8493 cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 #include <string.h>
8497 EOF
8498 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8499   egrep "memchr" >/dev/null 2>&1; then
8500   :
8501 else
8502   rm -rf conftest*
8503   ol_cv_header_stdc=no
8504 fi
8505 rm -f conftest*
8506
8507 fi
8508
8509 if test $ol_cv_header_stdc = yes; then
8510   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8511 cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 #include <stdlib.h>
8515 EOF
8516 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8517   egrep "free" >/dev/null 2>&1; then
8518   :
8519 else
8520   rm -rf conftest*
8521   ol_cv_header_stdc=no
8522 fi
8523 rm -f conftest*
8524
8525 fi
8526
8527 if test $ol_cv_header_stdc = yes; then
8528   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8529 if test "$cross_compiling" = yes; then
8530   :
8531 else
8532   cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 #include <ctype.h>
8536 #ifndef HAVE_EBCDIC
8537 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8538 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8539 #else
8540 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8541                 || ('j' <= (c) && (c) <= 'r') \
8542                 || ('s' <= (c) && (c) <= 'z'))
8543 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8544 #endif
8545 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8546 int main () { int i; for (i = 0; i < 256; i++)
8547 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8548 exit (0); }
8549
8550 EOF
8551 if { (eval echo configure:8552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8552 then
8553   :
8554 else
8555   echo "configure: failed program was:" >&5
8556   cat conftest.$ac_ext >&5
8557   rm -fr conftest*
8558   ol_cv_header_stdc=no
8559 fi
8560 rm -fr conftest*
8561 fi
8562
8563 fi
8564 fi
8565
8566 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8567 if test $ol_cv_header_stdc = yes; then
8568   cat >> confdefs.h <<\EOF
8569 #define STDC_HEADERS 1
8570 EOF
8571
8572 fi
8573 ac_cv_header_stdc=disable
8574
8575
8576 if test $ol_cv_header_stdc != yes; then
8577         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8578 fi
8579
8580 ac_header_dirent=no
8581 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8582 do
8583 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8584 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8585 echo "configure:8586: checking for $ac_hdr that defines DIR" >&5
8586 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 #include <sys/types.h>
8593 #include <$ac_hdr>
8594 int main() {
8595 DIR *dirp = 0;
8596 ; return 0; }
8597 EOF
8598 if { (eval echo configure:8599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8599   rm -rf conftest*
8600   eval "ac_cv_header_dirent_$ac_safe=yes"
8601 else
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604   rm -rf conftest*
8605   eval "ac_cv_header_dirent_$ac_safe=no"
8606 fi
8607 rm -f conftest*
8608 fi
8609 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8610   echo "$ac_t""yes" 1>&6
8611     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8612   cat >> confdefs.h <<EOF
8613 #define $ac_tr_hdr 1
8614 EOF
8615  ac_header_dirent=$ac_hdr; break
8616 else
8617   echo "$ac_t""no" 1>&6
8618 fi
8619 done
8620 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8621 if test $ac_header_dirent = dirent.h; then
8622 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8623 echo "configure:8624: checking for opendir in -ldir" >&5
8624 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   ac_save_LIBS="$LIBS"
8629 LIBS="-ldir  $LIBS"
8630 cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 /* Override any gcc2 internal prototype to avoid an error.  */
8634 /* We use char because int might match the return type of a gcc2
8635     builtin and then its argument prototype would still apply.  */
8636 char opendir();
8637
8638 int main() {
8639 opendir()
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8643   rm -rf conftest*
8644   eval "ac_cv_lib_$ac_lib_var=yes"
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=no"
8650 fi
8651 rm -f conftest*
8652 LIBS="$ac_save_LIBS"
8653
8654 fi
8655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8656   echo "$ac_t""yes" 1>&6
8657   LIBS="$LIBS -ldir"
8658 else
8659   echo "$ac_t""no" 1>&6
8660 fi
8661
8662 else
8663 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8664 echo "configure:8665: checking for opendir in -lx" >&5
8665 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8666 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   ac_save_LIBS="$LIBS"
8670 LIBS="-lx  $LIBS"
8671 cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 /* Override any gcc2 internal prototype to avoid an error.  */
8675 /* We use char because int might match the return type of a gcc2
8676     builtin and then its argument prototype would still apply.  */
8677 char opendir();
8678
8679 int main() {
8680 opendir()
8681 ; return 0; }
8682 EOF
8683 if { (eval echo configure:8684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8684   rm -rf conftest*
8685   eval "ac_cv_lib_$ac_lib_var=yes"
8686 else
8687   echo "configure: failed program was:" >&5
8688   cat conftest.$ac_ext >&5
8689   rm -rf conftest*
8690   eval "ac_cv_lib_$ac_lib_var=no"
8691 fi
8692 rm -f conftest*
8693 LIBS="$ac_save_LIBS"
8694
8695 fi
8696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8697   echo "$ac_t""yes" 1>&6
8698   LIBS="$LIBS -lx"
8699 else
8700   echo "$ac_t""no" 1>&6
8701 fi
8702
8703 fi
8704
8705 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8706 echo "configure:8707: checking for sys/wait.h that is POSIX.1 compatible" >&5
8707 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8708   echo $ac_n "(cached) $ac_c" 1>&6
8709 else
8710   cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8713 #include <sys/types.h>
8714 #include <sys/wait.h>
8715 #ifndef WEXITSTATUS
8716 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8717 #endif
8718 #ifndef WIFEXITED
8719 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8720 #endif
8721 int main() {
8722 int s;
8723 wait (&s);
8724 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8725 ; return 0; }
8726 EOF
8727 if { (eval echo configure:8728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8728   rm -rf conftest*
8729   ac_cv_header_sys_wait_h=yes
8730 else
8731   echo "configure: failed program was:" >&5
8732   cat conftest.$ac_ext >&5
8733   rm -rf conftest*
8734   ac_cv_header_sys_wait_h=no
8735 fi
8736 rm -f conftest*
8737 fi
8738
8739 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8740 if test $ac_cv_header_sys_wait_h = yes; then
8741   cat >> confdefs.h <<\EOF
8742 #define HAVE_SYS_WAIT_H 1
8743 EOF
8744
8745 fi
8746
8747 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8748 echo "configure:8749: checking POSIX termios" >&5
8749 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8750   echo $ac_n "(cached) $ac_c" 1>&6
8751 else
8752   cat > conftest.$ac_ext <<EOF
8753 #line 8754 "configure"
8754 #include "confdefs.h"
8755 #include <sys/types.h>
8756 #include <unistd.h>
8757 #include <termios.h>
8758 int main() {
8759 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8760    tcgetattr(0, 0);
8761 ; return 0; }
8762 EOF
8763 if { (eval echo configure:8764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8764   rm -rf conftest*
8765   am_cv_sys_posix_termios=yes
8766 else
8767   echo "configure: failed program was:" >&5
8768   cat conftest.$ac_ext >&5
8769   rm -rf conftest*
8770   am_cv_sys_posix_termios=no
8771 fi
8772 rm -f conftest*
8773 fi
8774
8775 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8776
8777
8778  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8779 echo "configure:8780: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8780 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8781   echo $ac_n "(cached) $ac_c" 1>&6
8782 else
8783   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8784
8785   gwinsz_in_termios_h=no
8786   if test $am_cv_sys_posix_termios = yes; then
8787     cat > conftest.$ac_ext <<EOF
8788 #line 8789 "configure"
8789 #include "confdefs.h"
8790 #include <sys/types.h>
8791 #     include <termios.h>
8792 #     ifdef TIOCGWINSZ
8793         yes
8794 #     endif
8795     
8796 EOF
8797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8798   egrep "yes" >/dev/null 2>&1; then
8799   rm -rf conftest*
8800   gwinsz_in_termios_h=yes
8801 fi
8802 rm -f conftest*
8803
8804   fi
8805
8806   if test $gwinsz_in_termios_h = no; then
8807     cat > conftest.$ac_ext <<EOF
8808 #line 8809 "configure"
8809 #include "confdefs.h"
8810 #include <sys/types.h>
8811 #     include <sys/ioctl.h>
8812 #     ifdef TIOCGWINSZ
8813         yes
8814 #     endif
8815     
8816 EOF
8817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8818   egrep "yes" >/dev/null 2>&1; then
8819   rm -rf conftest*
8820   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8821 fi
8822 rm -f conftest*
8823
8824   fi
8825   
8826 fi
8827
8828 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8829   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8830     cat >> confdefs.h <<\EOF
8831 #define GWINSZ_IN_SYS_IOCTL 1
8832 EOF
8833
8834   fi
8835
8836 if test $am_cv_sys_posix_termios = yes ; then
8837         cat >> confdefs.h <<\EOF
8838 #define HAVE_POSIX_TERMIOS 1
8839 EOF
8840
8841 fi
8842
8843 for ac_hdr in \
8844         arpa/inet.h             \
8845         arpa/nameser.h  \
8846         assert.h                \
8847         conio.h                 \
8848         crypt.h                 \
8849         direct.h                \
8850         errno.h                 \
8851         fcntl.h                 \
8852         filio.h                 \
8853         getopt.h                \
8854         grp.h                   \
8855         io.h                    \
8856         libutil.h               \
8857         limits.h                \
8858         locale.h                \
8859         netinet/tcp.h   \
8860         malloc.h                \
8861         memory.h                \
8862         psap.h                  \
8863         pwd.h                   \
8864         process.h               \
8865         resolv.h                \
8866         sgtty.h                 \
8867         shadow.h                \
8868         stddef.h                \
8869         string.h                \
8870         strings.h               \
8871         sysexits.h              \
8872         sys/file.h              \
8873         sys/filio.h             \
8874         sys/errno.h             \
8875         sys/ioctl.h             \
8876         sys/param.h             \
8877         sys/resource.h  \
8878         sys/select.h    \
8879         sys/socket.h    \
8880         sys/stat.h              \
8881         sys/syslog.h    \
8882         sys/time.h              \
8883         sys/types.h             \
8884         sys/ucred.h             \
8885         sys/uio.h               \
8886         syslog.h                \
8887         termios.h               \
8888         unistd.h                \
8889         winsock.h               \
8890         winsock2.h              \
8891
8892 do
8893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8895 echo "configure:8896: checking for $ac_hdr" >&5
8896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8897   echo $ac_n "(cached) $ac_c" 1>&6
8898 else
8899   cat > conftest.$ac_ext <<EOF
8900 #line 8901 "configure"
8901 #include "confdefs.h"
8902 #include <$ac_hdr>
8903 EOF
8904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8905 { (eval echo configure:8906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8907 if test -z "$ac_err"; then
8908   rm -rf conftest*
8909   eval "ac_cv_header_$ac_safe=yes"
8910 else
8911   echo "$ac_err" >&5
8912   echo "configure: failed program was:" >&5
8913   cat conftest.$ac_ext >&5
8914   rm -rf conftest*
8915   eval "ac_cv_header_$ac_safe=no"
8916 fi
8917 rm -f conftest*
8918 fi
8919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8920   echo "$ac_t""yes" 1>&6
8921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8922   cat >> confdefs.h <<EOF
8923 #define $ac_tr_hdr 1
8924 EOF
8925  
8926 else
8927   echo "$ac_t""no" 1>&6
8928 fi
8929 done
8930
8931
8932
8933
8934 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8935 echo "configure:8936: checking for dlopen" >&5
8936 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8937   echo $ac_n "(cached) $ac_c" 1>&6
8938 else
8939   cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* System header to define __stub macros and hopefully few prototypes,
8943     which can conflict with char dlopen(); below.  */
8944 #include <assert.h>
8945 /* Override any gcc2 internal prototype to avoid an error.  */
8946 /* We use char because int might match the return type of a gcc2
8947     builtin and then its argument prototype would still apply.  */
8948 char dlopen();
8949 char (*f)();
8950
8951 int main() {
8952
8953 /* The GNU C library defines this for functions which it implements
8954     to always fail with ENOSYS.  Some functions are actually named
8955     something starting with __ and the normal name is an alias.  */
8956 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8957 choke me
8958 #else
8959 f = dlopen;
8960 #endif
8961
8962 ; return 0; }
8963 EOF
8964 if { (eval echo configure:8965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8965   rm -rf conftest*
8966   eval "ac_cv_func_dlopen=yes"
8967 else
8968   echo "configure: failed program was:" >&5
8969   cat conftest.$ac_ext >&5
8970   rm -rf conftest*
8971   eval "ac_cv_func_dlopen=no"
8972 fi
8973 rm -f conftest*
8974 fi
8975
8976 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978   :
8979 else
8980   echo "$ac_t""no" 1>&6
8981 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8982 echo "configure:8983: checking for dlopen in -ldl" >&5
8983 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8985   echo $ac_n "(cached) $ac_c" 1>&6
8986 else
8987   ac_save_LIBS="$LIBS"
8988 LIBS="-ldl  $LIBS"
8989 cat > conftest.$ac_ext <<EOF
8990 #line 8991 "configure"
8991 #include "confdefs.h"
8992 /* Override any gcc2 internal prototype to avoid an error.  */
8993 /* We use char because int might match the return type of a gcc2
8994     builtin and then its argument prototype would still apply.  */
8995 char dlopen();
8996
8997 int main() {
8998 dlopen()
8999 ; return 0; }
9000 EOF
9001 if { (eval echo configure:9002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9002   rm -rf conftest*
9003   eval "ac_cv_lib_$ac_lib_var=yes"
9004 else
9005   echo "configure: failed program was:" >&5
9006   cat conftest.$ac_ext >&5
9007   rm -rf conftest*
9008   eval "ac_cv_lib_$ac_lib_var=no"
9009 fi
9010 rm -f conftest*
9011 LIBS="$ac_save_LIBS"
9012
9013 fi
9014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9015   echo "$ac_t""yes" 1>&6
9016     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9018   cat >> confdefs.h <<EOF
9019 #define $ac_tr_lib 1
9020 EOF
9021
9022   LIBS="-ldl $LIBS"
9023
9024 else
9025   echo "$ac_t""no" 1>&6
9026 fi
9027
9028 fi
9029
9030
9031 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9032 echo "configure:9033: checking for sigset in -lV3" >&5
9033 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9034 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9035   echo $ac_n "(cached) $ac_c" 1>&6
9036 else
9037   ac_save_LIBS="$LIBS"
9038 LIBS="-lV3  $LIBS"
9039 cat > conftest.$ac_ext <<EOF
9040 #line 9041 "configure"
9041 #include "confdefs.h"
9042 /* Override any gcc2 internal prototype to avoid an error.  */
9043 /* We use char because int might match the return type of a gcc2
9044     builtin and then its argument prototype would still apply.  */
9045 char sigset();
9046
9047 int main() {
9048 sigset()
9049 ; return 0; }
9050 EOF
9051 if { (eval echo configure:9052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9052   rm -rf conftest*
9053   eval "ac_cv_lib_$ac_lib_var=yes"
9054 else
9055   echo "configure: failed program was:" >&5
9056   cat conftest.$ac_ext >&5
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=no"
9059 fi
9060 rm -f conftest*
9061 LIBS="$ac_save_LIBS"
9062
9063 fi
9064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9065   echo "$ac_t""yes" 1>&6
9066     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9067     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9068   cat >> confdefs.h <<EOF
9069 #define $ac_tr_lib 1
9070 EOF
9071
9072   LIBS="-lV3 $LIBS"
9073
9074 else
9075   echo "$ac_t""no" 1>&6
9076 fi
9077
9078
9079 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9080 echo "configure:9081: checking for winsock" >&5
9081 save_LIBS="$LIBS"
9082 for curlib in ws2_32 wsock32; do
9083         LIBS="$LIBS -l$curlib"
9084         cat > conftest.$ac_ext <<EOF
9085 #line 9086 "configure"
9086 #include "confdefs.h"
9087
9088                         char socket@12();
9089                         char select@20();
9090                         char closesocket@4();
9091                         char gethostname@8();
9092                         
9093 int main() {
9094
9095                         socket@12();
9096                         select@20();
9097                         closesocket@4();
9098                         gethostname@8();
9099                         
9100 ; return 0; }
9101 EOF
9102 if { (eval echo configure:9103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9103   rm -rf conftest*
9104   have_winsock=yes
9105 else
9106   echo "configure: failed program was:" >&5
9107   cat conftest.$ac_ext >&5
9108   rm -rf conftest*
9109   have_winsock=no
9110 fi
9111 rm -f conftest*
9112
9113         if test $have_winsock = yes; then
9114                 cat >> confdefs.h <<\EOF
9115 #define HAVE_WINSOCK 1
9116 EOF
9117
9118                 ac_cv_func_socket=yes
9119                 ac_cv_func_select=yes
9120                 ac_cv_func_closesocket=yes
9121                 ac_cv_func_gethostname=yes
9122                 if test $curlib = ws2_32; then
9123                         have_winsock=winsock2
9124                         cat >> confdefs.h <<\EOF
9125 #define HAVE_WINSOCK2 1
9126 EOF
9127
9128                 fi
9129                 break
9130         fi
9131         LIBS="$save_LIBS"
9132 done
9133 echo "$ac_t""$have_winsock" 1>&6
9134
9135
9136 echo $ac_n "checking for socket""... $ac_c" 1>&6
9137 echo "configure:9138: checking for socket" >&5
9138 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9139   echo $ac_n "(cached) $ac_c" 1>&6
9140 else
9141   cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 /* System header to define __stub macros and hopefully few prototypes,
9145     which can conflict with char socket(); below.  */
9146 #include <assert.h>
9147 /* Override any gcc2 internal prototype to avoid an error.  */
9148 /* We use char because int might match the return type of a gcc2
9149     builtin and then its argument prototype would still apply.  */
9150 char socket();
9151 char (*f)();
9152
9153 int main() {
9154
9155 /* The GNU C library defines this for functions which it implements
9156     to always fail with ENOSYS.  Some functions are actually named
9157     something starting with __ and the normal name is an alias.  */
9158 #if defined (__stub_socket) || defined (__stub___socket)
9159 choke me
9160 #else
9161 f = socket;
9162 #endif
9163
9164 ; return 0; }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9167   rm -rf conftest*
9168   eval "ac_cv_func_socket=yes"
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_func_socket=no"
9174 fi
9175 rm -f conftest*
9176 fi
9177
9178 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9179   echo "$ac_t""yes" 1>&6
9180   :
9181 else
9182   echo "$ac_t""no" 1>&6
9183         
9184         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9185 echo "configure:9186: checking for main in -lsocket" >&5
9186 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9187 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9188   echo $ac_n "(cached) $ac_c" 1>&6
9189 else
9190   ac_save_LIBS="$LIBS"
9191 LIBS="-lsocket  $LIBS"
9192 cat > conftest.$ac_ext <<EOF
9193 #line 9194 "configure"
9194 #include "confdefs.h"
9195
9196 int main() {
9197 main()
9198 ; return 0; }
9199 EOF
9200 if { (eval echo configure:9201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9201   rm -rf conftest*
9202   eval "ac_cv_lib_$ac_lib_var=yes"
9203 else
9204   echo "configure: failed program was:" >&5
9205   cat conftest.$ac_ext >&5
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=no"
9208 fi
9209 rm -f conftest*
9210 LIBS="$ac_save_LIBS"
9211
9212 fi
9213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9214   echo "$ac_t""yes" 1>&6
9215     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9216     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9217   cat >> confdefs.h <<EOF
9218 #define $ac_tr_lib 1
9219 EOF
9220
9221   LIBS="-lsocket $LIBS"
9222
9223 else
9224   echo "$ac_t""no" 1>&6
9225 fi
9226
9227         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9228 echo "configure:9229: checking for main in -lnet" >&5
9229 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9231   echo $ac_n "(cached) $ac_c" 1>&6
9232 else
9233   ac_save_LIBS="$LIBS"
9234 LIBS="-lnet  $LIBS"
9235 cat > conftest.$ac_ext <<EOF
9236 #line 9237 "configure"
9237 #include "confdefs.h"
9238
9239 int main() {
9240 main()
9241 ; return 0; }
9242 EOF
9243 if { (eval echo configure:9244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9244   rm -rf conftest*
9245   eval "ac_cv_lib_$ac_lib_var=yes"
9246 else
9247   echo "configure: failed program was:" >&5
9248   cat conftest.$ac_ext >&5
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=no"
9251 fi
9252 rm -f conftest*
9253 LIBS="$ac_save_LIBS"
9254
9255 fi
9256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9257   echo "$ac_t""yes" 1>&6
9258     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9259     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9260   cat >> confdefs.h <<EOF
9261 #define $ac_tr_lib 1
9262 EOF
9263
9264   LIBS="-lnet $LIBS"
9265
9266 else
9267   echo "$ac_t""no" 1>&6
9268 fi
9269
9270         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9271 echo "configure:9272: checking for main in -lnsl_s" >&5
9272 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9273 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9274   echo $ac_n "(cached) $ac_c" 1>&6
9275 else
9276   ac_save_LIBS="$LIBS"
9277 LIBS="-lnsl_s  $LIBS"
9278 cat > conftest.$ac_ext <<EOF
9279 #line 9280 "configure"
9280 #include "confdefs.h"
9281
9282 int main() {
9283 main()
9284 ; return 0; }
9285 EOF
9286 if { (eval echo configure:9287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9287   rm -rf conftest*
9288   eval "ac_cv_lib_$ac_lib_var=yes"
9289 else
9290   echo "configure: failed program was:" >&5
9291   cat conftest.$ac_ext >&5
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=no"
9294 fi
9295 rm -f conftest*
9296 LIBS="$ac_save_LIBS"
9297
9298 fi
9299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9300   echo "$ac_t""yes" 1>&6
9301     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9302     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9303   cat >> confdefs.h <<EOF
9304 #define $ac_tr_lib 1
9305 EOF
9306
9307   LIBS="-lnsl_s $LIBS"
9308
9309 else
9310   echo "$ac_t""no" 1>&6
9311 fi
9312
9313         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9314 echo "configure:9315: checking for main in -lnsl" >&5
9315 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9316 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9317   echo $ac_n "(cached) $ac_c" 1>&6
9318 else
9319   ac_save_LIBS="$LIBS"
9320 LIBS="-lnsl  $LIBS"
9321 cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9324
9325 int main() {
9326 main()
9327 ; return 0; }
9328 EOF
9329 if { (eval echo configure:9330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9330   rm -rf conftest*
9331   eval "ac_cv_lib_$ac_lib_var=yes"
9332 else
9333   echo "configure: failed program was:" >&5
9334   cat conftest.$ac_ext >&5
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=no"
9337 fi
9338 rm -f conftest*
9339 LIBS="$ac_save_LIBS"
9340
9341 fi
9342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9343   echo "$ac_t""yes" 1>&6
9344     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9345     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9346   cat >> confdefs.h <<EOF
9347 #define $ac_tr_lib 1
9348 EOF
9349
9350   LIBS="-lnsl $LIBS"
9351
9352 else
9353   echo "$ac_t""no" 1>&6
9354 fi
9355
9356         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9357 echo "configure:9358: checking for socket in -linet" >&5
9358 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9359 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9360   echo $ac_n "(cached) $ac_c" 1>&6
9361 else
9362   ac_save_LIBS="$LIBS"
9363 LIBS="-linet  $LIBS"
9364 cat > conftest.$ac_ext <<EOF
9365 #line 9366 "configure"
9366 #include "confdefs.h"
9367 /* Override any gcc2 internal prototype to avoid an error.  */
9368 /* We use char because int might match the return type of a gcc2
9369     builtin and then its argument prototype would still apply.  */
9370 char socket();
9371
9372 int main() {
9373 socket()
9374 ; return 0; }
9375 EOF
9376 if { (eval echo configure:9377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9377   rm -rf conftest*
9378   eval "ac_cv_lib_$ac_lib_var=yes"
9379 else
9380   echo "configure: failed program was:" >&5
9381   cat conftest.$ac_ext >&5
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=no"
9384 fi
9385 rm -f conftest*
9386 LIBS="$ac_save_LIBS"
9387
9388 fi
9389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9390   echo "$ac_t""yes" 1>&6
9391     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9392     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9393   cat >> confdefs.h <<EOF
9394 #define $ac_tr_lib 1
9395 EOF
9396
9397   LIBS="-linet $LIBS"
9398
9399 else
9400   echo "$ac_t""no" 1>&6
9401 fi
9402
9403         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9404 echo "configure:9405: checking for main in -lgen" >&5
9405 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9406 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   ac_save_LIBS="$LIBS"
9410 LIBS="-lgen  $LIBS"
9411 cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414
9415 int main() {
9416 main()
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   eval "ac_cv_lib_$ac_lib_var=yes"
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   eval "ac_cv_lib_$ac_lib_var=no"
9427 fi
9428 rm -f conftest*
9429 LIBS="$ac_save_LIBS"
9430
9431 fi
9432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9433   echo "$ac_t""yes" 1>&6
9434     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9435     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9436   cat >> confdefs.h <<EOF
9437 #define $ac_tr_lib 1
9438 EOF
9439
9440   LIBS="-lgen $LIBS"
9441
9442 else
9443   echo "$ac_t""no" 1>&6
9444 fi
9445
9446
9447 fi
9448
9449
9450 echo $ac_n "checking for select""... $ac_c" 1>&6
9451 echo "configure:9452: checking for select" >&5
9452 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9453   echo $ac_n "(cached) $ac_c" 1>&6
9454 else
9455   cat > conftest.$ac_ext <<EOF
9456 #line 9457 "configure"
9457 #include "confdefs.h"
9458 /* System header to define __stub macros and hopefully few prototypes,
9459     which can conflict with char select(); below.  */
9460 #include <assert.h>
9461 /* Override any gcc2 internal prototype to avoid an error.  */
9462 /* We use char because int might match the return type of a gcc2
9463     builtin and then its argument prototype would still apply.  */
9464 char select();
9465 char (*f)();
9466
9467 int main() {
9468
9469 /* The GNU C library defines this for functions which it implements
9470     to always fail with ENOSYS.  Some functions are actually named
9471     something starting with __ and the normal name is an alias.  */
9472 #if defined (__stub_select) || defined (__stub___select)
9473 choke me
9474 #else
9475 f = select;
9476 #endif
9477
9478 ; return 0; }
9479 EOF
9480 if { (eval echo configure:9481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9481   rm -rf conftest*
9482   eval "ac_cv_func_select=yes"
9483 else
9484   echo "configure: failed program was:" >&5
9485   cat conftest.$ac_ext >&5
9486   rm -rf conftest*
9487   eval "ac_cv_func_select=no"
9488 fi
9489 rm -f conftest*
9490 fi
9491
9492 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9493   echo "$ac_t""yes" 1>&6
9494   :
9495 else
9496   echo "$ac_t""no" 1>&6
9497 { echo "configure: error: select() required." 1>&2; exit 1; }
9498 fi
9499
9500
9501 if test "${ac_cv_header_winsock_h}" != yes; then
9502                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9503 echo "configure:9504: checking types of arguments for select()" >&5
9504  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9505   echo $ac_n "(cached) $ac_c" 1>&6
9506 else
9507    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9508   echo $ac_n "(cached) $ac_c" 1>&6
9509 else
9510     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9511   echo $ac_n "(cached) $ac_c" 1>&6
9512 else
9513      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9514      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9515       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9516        cat > conftest.$ac_ext <<EOF
9517 #line 9518 "configure"
9518 #include "confdefs.h"
9519 #ifdef HAVE_SYS_TYPES_H
9520 #include <sys/types.h>
9521 #endif
9522 #ifdef HAVE_SYS_TIME_H
9523 #include <sys/time.h>
9524 #endif
9525 #ifdef HAVE_SYS_SELECT_H
9526 #include <sys/select.h>
9527 #endif
9528 #ifdef HAVE_SYS_SOCKET_H
9529 #include <sys/socket.h>
9530 #endif
9531 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);
9532 int main() {
9533
9534 ; return 0; }
9535 EOF
9536 if { (eval echo configure:9537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9537   rm -rf conftest*
9538           ac_not_found=no ; break 3
9539 else
9540   echo "configure: failed program was:" >&5
9541   cat conftest.$ac_ext >&5
9542   rm -rf conftest*
9543   ac_not_found=yes
9544 fi
9545 rm -f conftest*
9546       done
9547      done
9548     done
9549    
9550 fi
9551   
9552 fi
9553  
9554 fi
9555  if test "$ac_not_found" = yes; then
9556   ac_cv_func_select_arg1=int 
9557   ac_cv_func_select_arg234='int *' 
9558   ac_cv_func_select_arg5='struct timeval *'
9559  fi
9560  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9561  cat >> confdefs.h <<EOF
9562 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9563 EOF
9564
9565  cat >> confdefs.h <<EOF
9566 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9567 EOF
9568
9569  cat >> confdefs.h <<EOF
9570 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9571 EOF
9572
9573
9574 fi
9575
9576
9577 for ac_hdr in regex.h 
9578 do
9579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9581 echo "configure:9582: checking for $ac_hdr" >&5
9582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9583   echo $ac_n "(cached) $ac_c" 1>&6
9584 else
9585   cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 #include <$ac_hdr>
9589 EOF
9590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9591 { (eval echo configure:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9593 if test -z "$ac_err"; then
9594   rm -rf conftest*
9595   eval "ac_cv_header_$ac_safe=yes"
9596 else
9597   echo "$ac_err" >&5
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=no"
9602 fi
9603 rm -f conftest*
9604 fi
9605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9606   echo "$ac_t""yes" 1>&6
9607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9608   cat >> confdefs.h <<EOF
9609 #define $ac_tr_hdr 1
9610 EOF
9611  
9612 else
9613   echo "$ac_t""no" 1>&6
9614 fi
9615 done
9616
9617 if test "$ac_cv_header_regex_h" != yes ; then
9618         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9619 fi
9620
9621 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9622 echo "configure:9623: checking for library containing regfree" >&5
9623 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9624   echo $ac_n "(cached) $ac_c" 1>&6
9625 else
9626   ac_func_search_save_LIBS="$LIBS"
9627 ac_cv_search_regfree="no"
9628 cat > conftest.$ac_ext <<EOF
9629 #line 9630 "configure"
9630 #include "confdefs.h"
9631 /* Override any gcc2 internal prototype to avoid an error.  */
9632 /* We use char because int might match the return type of a gcc2
9633     builtin and then its argument prototype would still apply.  */
9634 char regfree();
9635
9636 int main() {
9637 regfree()
9638 ; return 0; }
9639 EOF
9640 if { (eval echo configure:9641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9641   rm -rf conftest*
9642   ac_cv_search_regfree="none required"
9643 else
9644   echo "configure: failed program was:" >&5
9645   cat conftest.$ac_ext >&5
9646 fi
9647 rm -f conftest*
9648 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9649 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9650 cat > conftest.$ac_ext <<EOF
9651 #line 9652 "configure"
9652 #include "confdefs.h"
9653 /* Override any gcc2 internal prototype to avoid an error.  */
9654 /* We use char because int might match the return type of a gcc2
9655     builtin and then its argument prototype would still apply.  */
9656 char regfree();
9657
9658 int main() {
9659 regfree()
9660 ; return 0; }
9661 EOF
9662 if { (eval echo configure:9663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9663   rm -rf conftest*
9664   ac_cv_search_regfree="-l$ac_lib"
9665 break
9666 else
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669 fi
9670 rm -f conftest*
9671 done
9672 LIBS="$ac_func_search_save_LIBS"
9673 fi
9674
9675 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9676 if test "$ac_cv_search_regfree" != "no"; then
9677   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9678   :
9679 else :
9680   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9681 fi
9682
9683
9684 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9685 echo "configure:9686: checking for compatible POSIX regex" >&5
9686 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9687   echo $ac_n "(cached) $ac_c" 1>&6
9688 else
9689   
9690         if test "$cross_compiling" = yes; then
9691   ol_cv_c_posix_regex=cross
9692 else
9693   cat > conftest.$ac_ext <<EOF
9694 #line 9695 "configure"
9695 #include "confdefs.h"
9696
9697 #include <sys/types.h>
9698 #include <regex.h>
9699 static char *pattern, *string;
9700 main()
9701 {
9702         int rc;
9703         regex_t re;
9704
9705         pattern = "^A";
9706
9707         if(regcomp(&re, pattern, 0)) {
9708                 return -1;
9709         }
9710         
9711         string = "ALL MATCH";
9712         
9713         rc = regexec(&re, string, 0, (void*)0, 0);
9714
9715         regfree(&re);
9716
9717         return rc;
9718 }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9721 then
9722   ol_cv_c_posix_regex=yes
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -fr conftest*
9727   ol_cv_c_posix_regex=no
9728 fi
9729 rm -fr conftest*
9730 fi
9731
9732 fi
9733
9734 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9735
9736 if test "$ol_cv_c_posix_regex" = no ; then
9737         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9738 fi
9739
9740
9741 have_uuid=no
9742 for ac_hdr in sys/uuid.h
9743 do
9744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9746 echo "configure:9747: checking for $ac_hdr" >&5
9747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9748   echo $ac_n "(cached) $ac_c" 1>&6
9749 else
9750   cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753 #include <$ac_hdr>
9754 EOF
9755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9756 { (eval echo configure:9757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9758 if test -z "$ac_err"; then
9759   rm -rf conftest*
9760   eval "ac_cv_header_$ac_safe=yes"
9761 else
9762   echo "$ac_err" >&5
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -rf conftest*
9766   eval "ac_cv_header_$ac_safe=no"
9767 fi
9768 rm -f conftest*
9769 fi
9770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9771   echo "$ac_t""yes" 1>&6
9772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9773   cat >> confdefs.h <<EOF
9774 #define $ac_tr_hdr 1
9775 EOF
9776  
9777 else
9778   echo "$ac_t""no" 1>&6
9779 fi
9780 done
9781
9782 if test $ac_cv_header_sys_uuid_h = yes ; then
9783         save_LIBS="$LIBS"
9784         
9785 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9786 echo "configure:9787: checking for library containing uuid_to_str" >&5
9787 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9788   echo $ac_n "(cached) $ac_c" 1>&6
9789 else
9790   ac_func_search_save_LIBS="$LIBS"
9791 ac_cv_search_uuid_to_str="no"
9792 cat > conftest.$ac_ext <<EOF
9793 #line 9794 "configure"
9794 #include "confdefs.h"
9795 /* Override any gcc2 internal prototype to avoid an error.  */
9796 /* We use char because int might match the return type of a gcc2
9797     builtin and then its argument prototype would still apply.  */
9798 char uuid_to_str();
9799
9800 int main() {
9801 uuid_to_str()
9802 ; return 0; }
9803 EOF
9804 if { (eval echo configure:9805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9805   rm -rf conftest*
9806   ac_cv_search_uuid_to_str="none required"
9807 else
9808   echo "configure: failed program was:" >&5
9809   cat conftest.$ac_ext >&5
9810 fi
9811 rm -f conftest*
9812 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9813 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9814 cat > conftest.$ac_ext <<EOF
9815 #line 9816 "configure"
9816 #include "confdefs.h"
9817 /* Override any gcc2 internal prototype to avoid an error.  */
9818 /* We use char because int might match the return type of a gcc2
9819     builtin and then its argument prototype would still apply.  */
9820 char uuid_to_str();
9821
9822 int main() {
9823 uuid_to_str()
9824 ; return 0; }
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9827   rm -rf conftest*
9828   ac_cv_search_uuid_to_str="-l$ac_lib"
9829 break
9830 else
9831   echo "configure: failed program was:" >&5
9832   cat conftest.$ac_ext >&5
9833 fi
9834 rm -f conftest*
9835 done
9836 LIBS="$ac_func_search_save_LIBS"
9837 fi
9838
9839 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9840 if test "$ac_cv_search_uuid_to_str" != "no"; then
9841   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9842   have_uuid=yes
9843 else :
9844   :
9845 fi
9846         LIBS="$save_LIBS"
9847
9848         if test have_uuid = yes ; then
9849                 cat >> confdefs.h <<\EOF
9850 #define HAVE_UUID_TO_STR 1
9851 EOF
9852
9853
9854                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9855                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9856         fi
9857 fi
9858
9859 if test $have_uuid = no ; then
9860         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9861 echo "configure:9862: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9862         save_LIBS="$LIBS"
9863         LIBS="$LIBS -lrpcrt4"
9864         cat > conftest.$ac_ext <<EOF
9865 #line 9866 "configure"
9866 #include "confdefs.h"
9867
9868                 char UuidCreate@4();
9869                 char UuidToStringA@8();
9870                 
9871 int main() {
9872
9873                 UuidCreate@4();
9874                 UuidToStringA@8();
9875                 
9876 ; return 0; }
9877 EOF
9878 if { (eval echo configure:9879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9879   rm -rf conftest*
9880   need_rpcrt=yes
9881 else
9882   echo "configure: failed program was:" >&5
9883   cat conftest.$ac_ext >&5
9884   rm -rf conftest*
9885   need_rpcrt=no
9886 fi
9887 rm -f conftest*
9888         if test $need_rpcrt = yes; then
9889                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9890         fi
9891         LIBS="$save_LIBS"
9892         echo "$ac_t""$need_rpcrt" 1>&6
9893 fi
9894
9895 ol_link_dnssrv=no
9896 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9897 echo "configure:9898: checking for res_query" >&5
9898 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9899   echo $ac_n "(cached) $ac_c" 1>&6
9900 else
9901   cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904 /* System header to define __stub macros and hopefully few prototypes,
9905     which can conflict with char res_query(); below.  */
9906 #include <assert.h>
9907 /* Override any gcc2 internal prototype to avoid an error.  */
9908 /* We use char because int might match the return type of a gcc2
9909     builtin and then its argument prototype would still apply.  */
9910 char res_query();
9911 char (*f)();
9912
9913 int main() {
9914
9915 /* The GNU C library defines this for functions which it implements
9916     to always fail with ENOSYS.  Some functions are actually named
9917     something starting with __ and the normal name is an alias.  */
9918 #if defined (__stub_res_query) || defined (__stub___res_query)
9919 choke me
9920 #else
9921 f = res_query;
9922 #endif
9923
9924 ; return 0; }
9925 EOF
9926 if { (eval echo configure:9927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9927   rm -rf conftest*
9928   eval "ac_cv_func_res_query=yes"
9929 else
9930   echo "configure: failed program was:" >&5
9931   cat conftest.$ac_ext >&5
9932   rm -rf conftest*
9933   eval "ac_cv_func_res_query=no"
9934 fi
9935 rm -f conftest*
9936 fi
9937
9938 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9939   echo "$ac_t""yes" 1>&6
9940   :
9941 else
9942   echo "$ac_t""no" 1>&6
9943 fi
9944
9945 if test $ac_cv_func_res_query = no ; then 
9946         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9947 echo "configure:9948: checking for __res_query" >&5
9948 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9949   echo $ac_n "(cached) $ac_c" 1>&6
9950 else
9951   cat > conftest.$ac_ext <<EOF
9952 #line 9953 "configure"
9953 #include "confdefs.h"
9954 /* System header to define __stub macros and hopefully few prototypes,
9955     which can conflict with char __res_query(); below.  */
9956 #include <assert.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 __res_query();
9961 char (*f)();
9962
9963 int main() {
9964
9965 /* The GNU C library defines this for functions which it implements
9966     to always fail with ENOSYS.  Some functions are actually named
9967     something starting with __ and the normal name is an alias.  */
9968 #if defined (__stub___res_query) || defined (__stub_____res_query)
9969 choke me
9970 #else
9971 f = __res_query;
9972 #endif
9973
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   eval "ac_cv_func___res_query=yes"
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   eval "ac_cv_func___res_query=no"
9984 fi
9985 rm -f conftest*
9986 fi
9987
9988 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9989   echo "$ac_t""yes" 1>&6
9990   :
9991 else
9992   echo "$ac_t""no" 1>&6
9993 fi
9994
9995         ac_cv_func_res_query=$ac_cv_func___res_query
9996 fi
9997
9998 if test $ac_cv_func_res_query = no ; then 
9999         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10000 echo "configure:10001: checking for res_query in -lbind" >&5
10001 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10003   echo $ac_n "(cached) $ac_c" 1>&6
10004 else
10005   ac_save_LIBS="$LIBS"
10006 LIBS="-lbind  $LIBS"
10007 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 /* Override any gcc2 internal prototype to avoid an error.  */
10011 /* We use char because int might match the return type of a gcc2
10012     builtin and then its argument prototype would still apply.  */
10013 char res_query();
10014
10015 int main() {
10016 res_query()
10017 ; return 0; }
10018 EOF
10019 if { (eval echo configure:10020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10020   rm -rf conftest*
10021   eval "ac_cv_lib_$ac_lib_var=yes"
10022 else
10023   echo "configure: failed program was:" >&5
10024   cat conftest.$ac_ext >&5
10025   rm -rf conftest*
10026   eval "ac_cv_lib_$ac_lib_var=no"
10027 fi
10028 rm -f conftest*
10029 LIBS="$ac_save_LIBS"
10030
10031 fi
10032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10033   echo "$ac_t""yes" 1>&6
10034     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10035     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10036   cat >> confdefs.h <<EOF
10037 #define $ac_tr_lib 1
10038 EOF
10039
10040   LIBS="-lbind $LIBS"
10041
10042 else
10043   echo "$ac_t""no" 1>&6
10044 fi
10045
10046         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10047 fi
10048
10049 if test $ac_cv_func_res_query = no ; then 
10050         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10051 echo "configure:10052: checking for __res_query in -lbind" >&5
10052 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10053 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10054   echo $ac_n "(cached) $ac_c" 1>&6
10055 else
10056   ac_save_LIBS="$LIBS"
10057 LIBS="-lbind  $LIBS"
10058 cat > conftest.$ac_ext <<EOF
10059 #line 10060 "configure"
10060 #include "confdefs.h"
10061 /* Override any gcc2 internal prototype to avoid an error.  */
10062 /* We use char because int might match the return type of a gcc2
10063     builtin and then its argument prototype would still apply.  */
10064 char __res_query();
10065
10066 int main() {
10067 __res_query()
10068 ; return 0; }
10069 EOF
10070 if { (eval echo configure:10071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10071   rm -rf conftest*
10072   eval "ac_cv_lib_$ac_lib_var=yes"
10073 else
10074   echo "configure: failed program was:" >&5
10075   cat conftest.$ac_ext >&5
10076   rm -rf conftest*
10077   eval "ac_cv_lib_$ac_lib_var=no"
10078 fi
10079 rm -f conftest*
10080 LIBS="$ac_save_LIBS"
10081
10082 fi
10083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10084   echo "$ac_t""yes" 1>&6
10085     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10086     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10087   cat >> confdefs.h <<EOF
10088 #define $ac_tr_lib 1
10089 EOF
10090
10091   LIBS="-lbind $LIBS"
10092
10093 else
10094   echo "$ac_t""no" 1>&6
10095 fi
10096
10097         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10098 fi
10099
10100 if test $ac_cv_func_res_query = no ; then 
10101         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10102 echo "configure:10103: checking for res_query in -lresolv" >&5
10103 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   ac_save_LIBS="$LIBS"
10108 LIBS="-lresolv  $LIBS"
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112 /* Override any gcc2 internal prototype to avoid an error.  */
10113 /* We use char because int might match the return type of a gcc2
10114     builtin and then its argument prototype would still apply.  */
10115 char res_query();
10116
10117 int main() {
10118 res_query()
10119 ; return 0; }
10120 EOF
10121 if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10122   rm -rf conftest*
10123   eval "ac_cv_lib_$ac_lib_var=yes"
10124 else
10125   echo "configure: failed program was:" >&5
10126   cat conftest.$ac_ext >&5
10127   rm -rf conftest*
10128   eval "ac_cv_lib_$ac_lib_var=no"
10129 fi
10130 rm -f conftest*
10131 LIBS="$ac_save_LIBS"
10132
10133 fi
10134 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10135   echo "$ac_t""yes" 1>&6
10136     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10137     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10138   cat >> confdefs.h <<EOF
10139 #define $ac_tr_lib 1
10140 EOF
10141
10142   LIBS="-lresolv $LIBS"
10143
10144 else
10145   echo "$ac_t""no" 1>&6
10146 fi
10147
10148         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10149 fi
10150
10151 if test $ac_cv_func_res_query = no ; then 
10152         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10153 echo "configure:10154: checking for __res_query in -lresolv" >&5
10154 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10156   echo $ac_n "(cached) $ac_c" 1>&6
10157 else
10158   ac_save_LIBS="$LIBS"
10159 LIBS="-lresolv  $LIBS"
10160 cat > conftest.$ac_ext <<EOF
10161 #line 10162 "configure"
10162 #include "confdefs.h"
10163 /* Override any gcc2 internal prototype to avoid an error.  */
10164 /* We use char because int might match the return type of a gcc2
10165     builtin and then its argument prototype would still apply.  */
10166 char __res_query();
10167
10168 int main() {
10169 __res_query()
10170 ; return 0; }
10171 EOF
10172 if { (eval echo configure:10173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10173   rm -rf conftest*
10174   eval "ac_cv_lib_$ac_lib_var=yes"
10175 else
10176   echo "configure: failed program was:" >&5
10177   cat conftest.$ac_ext >&5
10178   rm -rf conftest*
10179   eval "ac_cv_lib_$ac_lib_var=no"
10180 fi
10181 rm -f conftest*
10182 LIBS="$ac_save_LIBS"
10183
10184 fi
10185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10186   echo "$ac_t""yes" 1>&6
10187     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10188     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10189   cat >> confdefs.h <<EOF
10190 #define $ac_tr_lib 1
10191 EOF
10192
10193   LIBS="-lresolv $LIBS"
10194
10195 else
10196   echo "$ac_t""no" 1>&6
10197 fi
10198
10199         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10200 fi
10201
10202 if test "$ac_cv_func_res_query" = yes ; then
10203         cat >> confdefs.h <<\EOF
10204 #define HAVE_RES_QUERY 1
10205 EOF
10206
10207
10208         if test $ol_enable_dnssrv != no ; then
10209                 ol_link_dnssrv=yes
10210         fi
10211 fi
10212
10213 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10214         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10215 fi
10216
10217 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10218 do
10219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10220 echo "configure:10221: checking for $ac_func" >&5
10221 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10222   echo $ac_n "(cached) $ac_c" 1>&6
10223 else
10224   cat > conftest.$ac_ext <<EOF
10225 #line 10226 "configure"
10226 #include "confdefs.h"
10227 /* System header to define __stub macros and hopefully few prototypes,
10228     which can conflict with char $ac_func(); below.  */
10229 #include <assert.h>
10230 /* Override any gcc2 internal prototype to avoid an error.  */
10231 /* We use char because int might match the return type of a gcc2
10232     builtin and then its argument prototype would still apply.  */
10233 char $ac_func();
10234 char (*f)();
10235
10236 int main() {
10237
10238 /* The GNU C library defines this for functions which it implements
10239     to always fail with ENOSYS.  Some functions are actually named
10240     something starting with __ and the normal name is an alias.  */
10241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10242 choke me
10243 #else
10244 f = $ac_func;
10245 #endif
10246
10247 ; return 0; }
10248 EOF
10249 if { (eval echo configure:10250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10250   rm -rf conftest*
10251   eval "ac_cv_func_$ac_func=yes"
10252 else
10253   echo "configure: failed program was:" >&5
10254   cat conftest.$ac_ext >&5
10255   rm -rf conftest*
10256   eval "ac_cv_func_$ac_func=no"
10257 fi
10258 rm -f conftest*
10259 fi
10260
10261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10262   echo "$ac_t""yes" 1>&6
10263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10264   cat >> confdefs.h <<EOF
10265 #define $ac_tr_func 1
10266 EOF
10267  
10268 else
10269   echo "$ac_t""no" 1>&6
10270 fi
10271 done
10272
10273
10274 ol_link_ipv6=no
10275 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10276         if test $ol_enable_ipv6 = yes ; then
10277                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10278         fi
10279 elif test $ol_enable_ipv6 != no ; then
10280         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10281 echo "configure:10282: checking INET6_ADDRSTRLEN" >&5
10282 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10283   echo $ac_n "(cached) $ac_c" 1>&6
10284 else
10285   
10286                 cat > conftest.$ac_ext <<EOF
10287 #line 10288 "configure"
10288 #include "confdefs.h"
10289
10290 #                       include <netinet/in.h>
10291 #                       ifdef INET6_ADDRSTRLEN
10292                                 __has_inet6_addrstrlen__;
10293 #                       endif
10294                 
10295 EOF
10296 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10297   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10298   rm -rf conftest*
10299   ol_cv_inet6_addrstrlen=yes
10300 else
10301   rm -rf conftest*
10302   ol_cv_inet6_addrstrlen=no
10303 fi
10304 rm -f conftest*
10305
10306 fi
10307
10308 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10309
10310
10311         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10312 echo "configure:10313: checking struct sockaddr_storage" >&5
10313 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10314   echo $ac_n "(cached) $ac_c" 1>&6
10315 else
10316   
10317                 cat > conftest.$ac_ext <<EOF
10318 #line 10319 "configure"
10319 #include "confdefs.h"
10320
10321 #include <sys/types.h>
10322 #include <sys/socket.h>
10323
10324 int main() {
10325
10326                         struct sockaddr_storage ss;
10327
10328 ; return 0; }
10329 EOF
10330 if { (eval echo configure:10331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10331   rm -rf conftest*
10332   ol_cv_struct_sockaddr_storage=yes
10333 else
10334   echo "configure: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   rm -rf conftest*
10337   ol_cv_struct_sockaddr_storage=no
10338 fi
10339 rm -f conftest*
10340 fi
10341
10342 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10343
10344         if test $ol_cv_inet6_addrstrlen = yes \
10345                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10346                 ol_link_ipv6=yes
10347         elif test $ol_enable_ipv6 = yes \
10348                         -a $ol_cv_inet6_addrstrlen = no ; then
10349                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10350         elif test $ol_enable_ipv6 = yes \
10351                         -a $ol_cv_struct_sockaddr_storage = no ; then
10352                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10353         fi
10354 fi
10355
10356 if test $ol_enable_local != no ; then
10357         for ac_hdr in sys/un.h 
10358 do
10359 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10360 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10361 echo "configure:10362: checking for $ac_hdr" >&5
10362 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10363   echo $ac_n "(cached) $ac_c" 1>&6
10364 else
10365   cat > conftest.$ac_ext <<EOF
10366 #line 10367 "configure"
10367 #include "confdefs.h"
10368 #include <$ac_hdr>
10369 EOF
10370 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10371 { (eval echo configure:10372: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10372 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10373 if test -z "$ac_err"; then
10374   rm -rf conftest*
10375   eval "ac_cv_header_$ac_safe=yes"
10376 else
10377   echo "$ac_err" >&5
10378   echo "configure: failed program was:" >&5
10379   cat conftest.$ac_ext >&5
10380   rm -rf conftest*
10381   eval "ac_cv_header_$ac_safe=no"
10382 fi
10383 rm -f conftest*
10384 fi
10385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10386   echo "$ac_t""yes" 1>&6
10387     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10388   cat >> confdefs.h <<EOF
10389 #define $ac_tr_hdr 1
10390 EOF
10391  
10392 else
10393   echo "$ac_t""no" 1>&6
10394 fi
10395 done
10396
10397
10398         if test $ol_enable_local = auto ; then
10399                 ol_enable_local=$ac_cv_header_sys_un_h
10400         elif test $ac_cv_header_sys_un_h = no ; then
10401                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10402         fi
10403 fi
10404
10405 ol_link_kbind=no
10406 ol_link_kpasswd=no
10407 ol_link_krb5=no
10408 ol_link_krb4=no
10409
10410 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10411         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10412         -o $ol_with_kerberos = k425 ; then
10413
10414         for ac_hdr in krb5.h
10415 do
10416 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10417 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10418 echo "configure:10419: checking for $ac_hdr" >&5
10419 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10420   echo $ac_n "(cached) $ac_c" 1>&6
10421 else
10422   cat > conftest.$ac_ext <<EOF
10423 #line 10424 "configure"
10424 #include "confdefs.h"
10425 #include <$ac_hdr>
10426 EOF
10427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10428 { (eval echo configure:10429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10430 if test -z "$ac_err"; then
10431   rm -rf conftest*
10432   eval "ac_cv_header_$ac_safe=yes"
10433 else
10434   echo "$ac_err" >&5
10435   echo "configure: failed program was:" >&5
10436   cat conftest.$ac_ext >&5
10437   rm -rf conftest*
10438   eval "ac_cv_header_$ac_safe=no"
10439 fi
10440 rm -f conftest*
10441 fi
10442 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10443   echo "$ac_t""yes" 1>&6
10444     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10445   cat >> confdefs.h <<EOF
10446 #define $ac_tr_hdr 1
10447 EOF
10448  
10449 else
10450   echo "$ac_t""no" 1>&6
10451 fi
10452 done
10453
10454
10455         if test $ac_cv_header_krb5_h = yes ; then
10456                                 for ac_hdr in heim_err.h
10457 do
10458 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10459 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10460 echo "configure:10461: checking for $ac_hdr" >&5
10461 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10462   echo $ac_n "(cached) $ac_c" 1>&6
10463 else
10464   cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 #include <$ac_hdr>
10468 EOF
10469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10470 { (eval echo configure:10471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10472 if test -z "$ac_err"; then
10473   rm -rf conftest*
10474   eval "ac_cv_header_$ac_safe=yes"
10475 else
10476   echo "$ac_err" >&5
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   eval "ac_cv_header_$ac_safe=no"
10481 fi
10482 rm -f conftest*
10483 fi
10484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10485   echo "$ac_t""yes" 1>&6
10486     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10487   cat >> confdefs.h <<EOF
10488 #define $ac_tr_hdr 1
10489 EOF
10490  
10491 else
10492   echo "$ac_t""no" 1>&6
10493 fi
10494 done
10495
10496                 if test $ac_cv_header_heim_err_h = yes ; then
10497                         krb5_impl=heimdal
10498                 else
10499                         krb5_impl=mit
10500                 fi
10501
10502                 if test $krb5_impl = mit; then
10503                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10504 echo "configure:10505: checking for main in -lk5crypto" >&5
10505 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10507   echo $ac_n "(cached) $ac_c" 1>&6
10508 else
10509   ac_save_LIBS="$LIBS"
10510 LIBS="-lk5crypto  $LIBS"
10511 cat > conftest.$ac_ext <<EOF
10512 #line 10513 "configure"
10513 #include "confdefs.h"
10514
10515 int main() {
10516 main()
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_lib_$ac_lib_var=yes"
10522 else
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=no"
10527 fi
10528 rm -f conftest*
10529 LIBS="$ac_save_LIBS"
10530
10531 fi
10532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10533   echo "$ac_t""yes" 1>&6
10534   krb5crypto=k5crypto
10535 else
10536   echo "$ac_t""no" 1>&6
10537 krb5crypto=crypto
10538 fi
10539
10540
10541                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10542 echo "configure:10543: checking for main in -lkrb5" >&5
10543 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10544 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10545   echo $ac_n "(cached) $ac_c" 1>&6
10546 else
10547   ac_save_LIBS="$LIBS"
10548 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10549 cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552
10553 int main() {
10554 main()
10555 ; return 0; }
10556 EOF
10557 if { (eval echo configure:10558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10558   rm -rf conftest*
10559   eval "ac_cv_lib_$ac_lib_var=yes"
10560 else
10561   echo "configure: failed program was:" >&5
10562   cat conftest.$ac_ext >&5
10563   rm -rf conftest*
10564   eval "ac_cv_lib_$ac_lib_var=no"
10565 fi
10566 rm -f conftest*
10567 LIBS="$ac_save_LIBS"
10568
10569 fi
10570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10571   echo "$ac_t""yes" 1>&6
10572   have_krb5=yes
10573                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10574 else
10575   echo "$ac_t""no" 1>&6
10576 have_krb5=no
10577 fi
10578
10579
10580                 elif test $krb5_impl = heimdal; then
10581                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10582 echo "configure:10583: checking for main in -ldes" >&5
10583 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10585   echo $ac_n "(cached) $ac_c" 1>&6
10586 else
10587   ac_save_LIBS="$LIBS"
10588 LIBS="-ldes  $LIBS"
10589 cat > conftest.$ac_ext <<EOF
10590 #line 10591 "configure"
10591 #include "confdefs.h"
10592
10593 int main() {
10594 main()
10595 ; return 0; }
10596 EOF
10597 if { (eval echo configure:10598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10598   rm -rf conftest*
10599   eval "ac_cv_lib_$ac_lib_var=yes"
10600 else
10601   echo "configure: failed program was:" >&5
10602   cat conftest.$ac_ext >&5
10603   rm -rf conftest*
10604   eval "ac_cv_lib_$ac_lib_var=no"
10605 fi
10606 rm -f conftest*
10607 LIBS="$ac_save_LIBS"
10608
10609 fi
10610 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10611   echo "$ac_t""yes" 1>&6
10612   krb5crypto=des
10613 else
10614   echo "$ac_t""no" 1>&6
10615 krb5crypto=crypto
10616 fi
10617
10618
10619                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10620 echo "configure:10621: checking for main in -lkrb5" >&5
10621 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10622 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10623   echo $ac_n "(cached) $ac_c" 1>&6
10624 else
10625   ac_save_LIBS="$LIBS"
10626 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10627 cat > conftest.$ac_ext <<EOF
10628 #line 10629 "configure"
10629 #include "confdefs.h"
10630
10631 int main() {
10632 main()
10633 ; return 0; }
10634 EOF
10635 if { (eval echo configure:10636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10636   rm -rf conftest*
10637   eval "ac_cv_lib_$ac_lib_var=yes"
10638 else
10639   echo "configure: failed program was:" >&5
10640   cat conftest.$ac_ext >&5
10641   rm -rf conftest*
10642   eval "ac_cv_lib_$ac_lib_var=no"
10643 fi
10644 rm -f conftest*
10645 LIBS="$ac_save_LIBS"
10646
10647 fi
10648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10649   echo "$ac_t""yes" 1>&6
10650   have_krb5=yes
10651                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10652 else
10653   echo "$ac_t""no" 1>&6
10654 have_krb5=no
10655 fi
10656
10657
10658                         cat >> confdefs.h <<\EOF
10659 #define HAVE_HEIMDAL_KERBEROS 1
10660 EOF
10661
10662
10663                 else
10664                         have_krb5=no
10665                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10666                 fi
10667
10668                 if test $have_krb5 = yes ; then
10669                         ol_link_krb5=yes
10670
10671                         cat >> confdefs.h <<\EOF
10672 #define HAVE_KRB5 1
10673 EOF
10674
10675
10676                         if test $ol_enable_kpasswd != no ; then
10677                                 ol_link_kpasswd=yes;
10678                         fi
10679
10680                         if test $ol_with_kerberos = k5only ; then
10681                                 ol_with_kerberos=found
10682                         fi
10683
10684                 elif test $ol_with_kerberos != auto ; then
10685                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10686                 fi
10687
10688         fi
10689 fi
10690
10691 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10692         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10693
10694         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10695 do
10696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10698 echo "configure:10699: checking for $ac_hdr" >&5
10699 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   cat > conftest.$ac_ext <<EOF
10703 #line 10704 "configure"
10704 #include "confdefs.h"
10705 #include <$ac_hdr>
10706 EOF
10707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10708 { (eval echo configure:10709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10710 if test -z "$ac_err"; then
10711   rm -rf conftest*
10712   eval "ac_cv_header_$ac_safe=yes"
10713 else
10714   echo "$ac_err" >&5
10715   echo "configure: failed program was:" >&5
10716   cat conftest.$ac_ext >&5
10717   rm -rf conftest*
10718   eval "ac_cv_header_$ac_safe=no"
10719 fi
10720 rm -f conftest*
10721 fi
10722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10723   echo "$ac_t""yes" 1>&6
10724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10725   cat >> confdefs.h <<EOF
10726 #define $ac_tr_hdr 1
10727 EOF
10728  
10729 else
10730   echo "$ac_t""no" 1>&6
10731 fi
10732 done
10733
10734
10735         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10736                 if test $krb5_impl = mit; then
10737                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10738 echo "configure:10739: checking for main in -lkrb4" >&5
10739 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   ac_save_LIBS="$LIBS"
10744 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10745 cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748
10749 int main() {
10750 main()
10751 ; return 0; }
10752 EOF
10753 if { (eval echo configure:10754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10754   rm -rf conftest*
10755   eval "ac_cv_lib_$ac_lib_var=yes"
10756 else
10757   echo "configure: failed program was:" >&5
10758   cat conftest.$ac_ext >&5
10759   rm -rf conftest*
10760   eval "ac_cv_lib_$ac_lib_var=no"
10761 fi
10762 rm -f conftest*
10763 LIBS="$ac_save_LIBS"
10764
10765 fi
10766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10767   echo "$ac_t""yes" 1>&6
10768   have_k425=yes
10769                                 KRB4_LIBS="-lkrb4 -ldes425"
10770 else
10771   echo "$ac_t""no" 1>&6
10772 have_k425=no
10773 fi
10774
10775
10776                 elif test $krb5_impl = heimdal; then
10777                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10778 echo "configure:10779: checking for main in -lkrb4" >&5
10779 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10780 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10781   echo $ac_n "(cached) $ac_c" 1>&6
10782 else
10783   ac_save_LIBS="$LIBS"
10784 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10785 cat > conftest.$ac_ext <<EOF
10786 #line 10787 "configure"
10787 #include "confdefs.h"
10788
10789 int main() {
10790 main()
10791 ; return 0; }
10792 EOF
10793 if { (eval echo configure:10794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10794   rm -rf conftest*
10795   eval "ac_cv_lib_$ac_lib_var=yes"
10796 else
10797   echo "configure: failed program was:" >&5
10798   cat conftest.$ac_ext >&5
10799   rm -rf conftest*
10800   eval "ac_cv_lib_$ac_lib_var=no"
10801 fi
10802 rm -f conftest*
10803 LIBS="$ac_save_LIBS"
10804
10805 fi
10806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10807   echo "$ac_t""yes" 1>&6
10808   have_k425=yes
10809                                 KRB4_LIBS="-lkrb4"
10810 else
10811   echo "$ac_t""no" 1>&6
10812 have_k425=no
10813 fi
10814
10815
10816                 else
10817                         have_425=no
10818                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10819                 fi
10820
10821                 if test $have_k425 = yes ; then
10822                         ol_with_kerberos=found
10823                         ol_link_krb4=yes
10824
10825                         cat >> confdefs.h <<\EOF
10826 #define HAVE_KRB425 1
10827 EOF
10828
10829                         cat >> confdefs.h <<\EOF
10830 #define HAVE_KRB4 1
10831 EOF
10832
10833
10834                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10835 echo "configure:10836: checking for des_debug in Kerberos libraries" >&5
10836 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10837   echo $ac_n "(cached) $ac_c" 1>&6
10838 else
10839   
10840                                                                 save_LIBS="$LIBS"
10841                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10842                                 cat > conftest.$ac_ext <<EOF
10843 #line 10844 "configure"
10844 #include "confdefs.h"
10845
10846 #include <kerberosIV/krb.h>
10847 #include <kerberosIV/des.h>
10848 extern int des_debug;
10849
10850 int main() {
10851
10852 des_debug = 1;
10853
10854 ; return 0; }
10855 EOF
10856 if { (eval echo configure:10857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10857   rm -rf conftest*
10858   ol_cv_var_des_debug=yes
10859 else
10860   echo "configure: failed program was:" >&5
10861   cat conftest.$ac_ext >&5
10862   rm -rf conftest*
10863   ol_cv_var_des_debug=no
10864 fi
10865 rm -f conftest*
10866                                                                 LIBS="$save_LIBS"
10867                         
10868 fi
10869
10870 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10871
10872                         if test $ol_cv_var_des_debug = yes ; then
10873                                 cat >> confdefs.h <<\EOF
10874 #define HAVE_DES_DEBUG 1
10875 EOF
10876
10877                         fi
10878
10879                         LIBS="$save_LIBS"
10880                 fi
10881         fi
10882 fi
10883
10884 if test $ol_link_krb5 = yes ; then
10885         ol_with_kerberos=found
10886 fi
10887
10888 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10889         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10890
10891         for ac_hdr in krb.h des.h krb-archaeology.h 
10892 do
10893 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10894 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10895 echo "configure:10896: checking for $ac_hdr" >&5
10896 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10897   echo $ac_n "(cached) $ac_c" 1>&6
10898 else
10899   cat > conftest.$ac_ext <<EOF
10900 #line 10901 "configure"
10901 #include "confdefs.h"
10902 #include <$ac_hdr>
10903 EOF
10904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10905 { (eval echo configure:10906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10907 if test -z "$ac_err"; then
10908   rm -rf conftest*
10909   eval "ac_cv_header_$ac_safe=yes"
10910 else
10911   echo "$ac_err" >&5
10912   echo "configure: failed program was:" >&5
10913   cat conftest.$ac_ext >&5
10914   rm -rf conftest*
10915   eval "ac_cv_header_$ac_safe=no"
10916 fi
10917 rm -f conftest*
10918 fi
10919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10920   echo "$ac_t""yes" 1>&6
10921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10922   cat >> confdefs.h <<EOF
10923 #define $ac_tr_hdr 1
10924 EOF
10925  
10926 else
10927   echo "$ac_t""no" 1>&6
10928 fi
10929 done
10930
10931
10932         if test $ac_cv_header_krb_h = yes ; then
10933                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10934 echo "configure:10935: checking for main in -lkrb" >&5
10935 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10937   echo $ac_n "(cached) $ac_c" 1>&6
10938 else
10939   ac_save_LIBS="$LIBS"
10940 LIBS="-lkrb -ldes $LIBS"
10941 cat > conftest.$ac_ext <<EOF
10942 #line 10943 "configure"
10943 #include "confdefs.h"
10944
10945 int main() {
10946 main()
10947 ; return 0; }
10948 EOF
10949 if { (eval echo configure:10950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10950   rm -rf conftest*
10951   eval "ac_cv_lib_$ac_lib_var=yes"
10952 else
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_lib_$ac_lib_var=no"
10957 fi
10958 rm -f conftest*
10959 LIBS="$ac_save_LIBS"
10960
10961 fi
10962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10963   echo "$ac_t""yes" 1>&6
10964   have_k4=yes
10965 else
10966   echo "$ac_t""no" 1>&6
10967 have_k4=no
10968 fi
10969
10970
10971                 if test $have_k4 = yes ; then
10972                         ol_with_kerberos=found
10973                         ol_link_krb4=yes
10974
10975                         cat >> confdefs.h <<\EOF
10976 #define HAVE_KRB4 1
10977 EOF
10978
10979
10980                         KRB4_LIBS="-lkrb -ldes"
10981
10982                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10983                                 cat >> confdefs.h <<\EOF
10984 #define HAVE_KTH_KERBEROS 1
10985 EOF
10986
10987                         fi
10988                 fi
10989         fi
10990 fi
10991
10992 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10993         ol_link_kpasswd=yes
10994 fi
10995
10996 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10997         ol_link_kbind=yes
10998
10999 elif test $ol_enable_kbind = yes ; then
11000         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11001 fi
11002
11003 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11004         cat >> confdefs.h <<\EOF
11005 #define HAVE_KERBEROS 1
11006 EOF
11007
11008
11009 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11010         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11011 fi
11012
11013 ol_link_tls=no
11014 if test $ol_with_tls != no ; then
11015         for ac_hdr in openssl/ssl.h ssl.h
11016 do
11017 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11018 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11019 echo "configure:11020: checking for $ac_hdr" >&5
11020 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11021   echo $ac_n "(cached) $ac_c" 1>&6
11022 else
11023   cat > conftest.$ac_ext <<EOF
11024 #line 11025 "configure"
11025 #include "confdefs.h"
11026 #include <$ac_hdr>
11027 EOF
11028 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11029 { (eval echo configure:11030: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11030 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11031 if test -z "$ac_err"; then
11032   rm -rf conftest*
11033   eval "ac_cv_header_$ac_safe=yes"
11034 else
11035   echo "$ac_err" >&5
11036   echo "configure: failed program was:" >&5
11037   cat conftest.$ac_ext >&5
11038   rm -rf conftest*
11039   eval "ac_cv_header_$ac_safe=no"
11040 fi
11041 rm -f conftest*
11042 fi
11043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11044   echo "$ac_t""yes" 1>&6
11045     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11046   cat >> confdefs.h <<EOF
11047 #define $ac_tr_hdr 1
11048 EOF
11049  
11050 else
11051   echo "$ac_t""no" 1>&6
11052 fi
11053 done
11054
11055         
11056         if test $ac_cv_header_openssl_ssl_h = yes \
11057                 -o $ac_cv_header_ssl_h = yes ; then
11058                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11059 echo "configure:11060: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11060 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11062   echo $ac_n "(cached) $ac_c" 1>&6
11063 else
11064   ac_save_LIBS="$LIBS"
11065 LIBS="-lssl -lcrypto $LIBS"
11066 cat > conftest.$ac_ext <<EOF
11067 #line 11068 "configure"
11068 #include "confdefs.h"
11069 /* Override any gcc2 internal prototype to avoid an error.  */
11070 /* We use char because int might match the return type of a gcc2
11071     builtin and then its argument prototype would still apply.  */
11072 char SSLeay_add_ssl_algorithms();
11073
11074 int main() {
11075 SSLeay_add_ssl_algorithms()
11076 ; return 0; }
11077 EOF
11078 if { (eval echo configure:11079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11079   rm -rf conftest*
11080   eval "ac_cv_lib_$ac_lib_var=yes"
11081 else
11082   echo "configure: failed program was:" >&5
11083   cat conftest.$ac_ext >&5
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=no"
11086 fi
11087 rm -f conftest*
11088 LIBS="$ac_save_LIBS"
11089
11090 fi
11091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093   have_ssleay=yes
11094                         need_rsaref=no
11095 else
11096   echo "$ac_t""no" 1>&6
11097 have_ssleay=no
11098 fi
11099
11100                         
11101                 if test $have_ssleay = no ; then
11102                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11103 echo "configure:11104: checking for SSL_library_init in -lssl" >&5
11104 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11106   echo $ac_n "(cached) $ac_c" 1>&6
11107 else
11108   ac_save_LIBS="$LIBS"
11109 LIBS="-lssl -lcrypto $LIBS"
11110 cat > conftest.$ac_ext <<EOF
11111 #line 11112 "configure"
11112 #include "confdefs.h"
11113 /* Override any gcc2 internal prototype to avoid an error.  */
11114 /* We use char because int might match the return type of a gcc2
11115     builtin and then its argument prototype would still apply.  */
11116 char SSL_library_init();
11117
11118 int main() {
11119 SSL_library_init()
11120 ; return 0; }
11121 EOF
11122 if { (eval echo configure:11123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11123   rm -rf conftest*
11124   eval "ac_cv_lib_$ac_lib_var=yes"
11125 else
11126   echo "configure: failed program was:" >&5
11127   cat conftest.$ac_ext >&5
11128   rm -rf conftest*
11129   eval "ac_cv_lib_$ac_lib_var=no"
11130 fi
11131 rm -f conftest*
11132 LIBS="$ac_save_LIBS"
11133
11134 fi
11135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11136   echo "$ac_t""yes" 1>&6
11137   have_ssleay=yes
11138                                 need_rsaref=no
11139 else
11140   echo "$ac_t""no" 1>&6
11141 have_ssleay=no
11142 fi
11143
11144                 fi
11145
11146                 if test $have_ssleay = no ; then
11147                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11148 echo "configure:11149: checking for ssl3_accept in -lssl" >&5
11149 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11151   echo $ac_n "(cached) $ac_c" 1>&6
11152 else
11153   ac_save_LIBS="$LIBS"
11154 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11155 cat > conftest.$ac_ext <<EOF
11156 #line 11157 "configure"
11157 #include "confdefs.h"
11158 /* Override any gcc2 internal prototype to avoid an error.  */
11159 /* We use char because int might match the return type of a gcc2
11160     builtin and then its argument prototype would still apply.  */
11161 char ssl3_accept();
11162
11163 int main() {
11164 ssl3_accept()
11165 ; return 0; }
11166 EOF
11167 if { (eval echo configure:11168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11168   rm -rf conftest*
11169   eval "ac_cv_lib_$ac_lib_var=yes"
11170 else
11171   echo "configure: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=no"
11175 fi
11176 rm -f conftest*
11177 LIBS="$ac_save_LIBS"
11178
11179 fi
11180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11181   echo "$ac_t""yes" 1>&6
11182   have_ssleay=yes
11183                                 need_rsaref=yes
11184 else
11185   echo "$ac_t""no" 1>&6
11186 have_ssleay=no
11187 fi
11188
11189                 fi
11190
11191                 if test $have_ssleay = yes ; then
11192                         ol_with_tls=found
11193                         ol_link_tls=yes
11194
11195                         cat >> confdefs.h <<\EOF
11196 #define HAVE_SSLEAY 1
11197 EOF
11198
11199
11200                         if test $need_rsaref = yes; then
11201                                 cat >> confdefs.h <<\EOF
11202 #define HAVE_RSAREF 1
11203 EOF
11204
11205
11206                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11207                         else
11208                                 TLS_LIBS="-lssl -lcrypto"
11209                         fi
11210                 fi
11211         fi
11212
11213 else
11214         echo "configure: warning: TLS data protection not supported!" 1>&2
11215 fi
11216
11217 WITH_TLS=no
11218 if test $ol_link_tls = yes ; then
11219         cat >> confdefs.h <<\EOF
11220 #define HAVE_TLS 1
11221 EOF
11222
11223         WITH_TLS=yes
11224
11225 elif test $ol_with_tls = auto ; then
11226         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11227         echo "configure: warning: TLS data protection not supported!" 1>&2
11228
11229 elif test $ol_with_tls != no ; then
11230         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11231 fi
11232
11233 if test $ol_enable_lmpasswd != no; then
11234         if test $ol_link_tls != yes ; then
11235                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11236         fi
11237
11238         cat >> confdefs.h <<\EOF
11239 #define SLAPD_LMHASH 1
11240 EOF
11241
11242 fi
11243
11244 ol_link_threads=no
11245
11246 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11247         -o $ol_with_threads = nt ; then
11248
11249         
11250         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11251 echo "configure:11252: checking for _beginthread" >&5
11252 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11253   echo $ac_n "(cached) $ac_c" 1>&6
11254 else
11255   cat > conftest.$ac_ext <<EOF
11256 #line 11257 "configure"
11257 #include "confdefs.h"
11258 /* System header to define __stub macros and hopefully few prototypes,
11259     which can conflict with char _beginthread(); below.  */
11260 #include <assert.h>
11261 /* Override any gcc2 internal prototype to avoid an error.  */
11262 /* We use char because int might match the return type of a gcc2
11263     builtin and then its argument prototype would still apply.  */
11264 char _beginthread();
11265 char (*f)();
11266
11267 int main() {
11268
11269 /* The GNU C library defines this for functions which it implements
11270     to always fail with ENOSYS.  Some functions are actually named
11271     something starting with __ and the normal name is an alias.  */
11272 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11273 choke me
11274 #else
11275 f = _beginthread;
11276 #endif
11277
11278 ; return 0; }
11279 EOF
11280 if { (eval echo configure:11281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11281   rm -rf conftest*
11282   eval "ac_cv_func__beginthread=yes"
11283 else
11284   echo "configure: failed program was:" >&5
11285   cat conftest.$ac_ext >&5
11286   rm -rf conftest*
11287   eval "ac_cv_func__beginthread=no"
11288 fi
11289 rm -f conftest*
11290 fi
11291
11292 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294   :
11295 else
11296   echo "$ac_t""no" 1>&6
11297 fi
11298
11299
11300         if test $ac_cv_func__beginthread = yes ; then
11301                 cat >> confdefs.h <<\EOF
11302 #define HAVE_NT_THREADS 1
11303 EOF
11304
11305                 ol_cv_nt_threads=yes
11306         fi
11307
11308
11309         if test "$ol_cv_nt_threads" = yes ; then
11310                 ol_link_threads=nt
11311                 ol_with_threads=found
11312                 ol_with_yielding_select=yes
11313
11314                 cat >> confdefs.h <<\EOF
11315 #define HAVE_NT_SERVICE_MANAGER 1
11316 EOF
11317
11318                 cat >> confdefs.h <<\EOF
11319 #define HAVE_NT_EVENT_LOG 1
11320 EOF
11321
11322         fi
11323
11324         if test $ol_with_threads = nt ; then
11325                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11326         fi
11327 fi
11328
11329 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11330         -o $ol_with_threads = posix ; then
11331
11332         for ac_hdr in pthread.h
11333 do
11334 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11335 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11336 echo "configure:11337: checking for $ac_hdr" >&5
11337 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11338   echo $ac_n "(cached) $ac_c" 1>&6
11339 else
11340   cat > conftest.$ac_ext <<EOF
11341 #line 11342 "configure"
11342 #include "confdefs.h"
11343 #include <$ac_hdr>
11344 EOF
11345 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11346 { (eval echo configure:11347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11347 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11348 if test -z "$ac_err"; then
11349   rm -rf conftest*
11350   eval "ac_cv_header_$ac_safe=yes"
11351 else
11352   echo "$ac_err" >&5
11353   echo "configure: failed program was:" >&5
11354   cat conftest.$ac_ext >&5
11355   rm -rf conftest*
11356   eval "ac_cv_header_$ac_safe=no"
11357 fi
11358 rm -f conftest*
11359 fi
11360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11361   echo "$ac_t""yes" 1>&6
11362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11363   cat >> confdefs.h <<EOF
11364 #define $ac_tr_hdr 1
11365 EOF
11366  
11367 else
11368   echo "$ac_t""no" 1>&6
11369 fi
11370 done
11371
11372
11373         if test $ac_cv_header_pthread_h = yes ; then
11374                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11375 echo "configure:11376: checking POSIX thread version" >&5
11376 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11377   echo $ac_n "(cached) $ac_c" 1>&6
11378 else
11379   
11380         cat > conftest.$ac_ext <<EOF
11381 #line 11382 "configure"
11382 #include "confdefs.h"
11383
11384 #               include <pthread.h>
11385         
11386 int main() {
11387
11388                 int i = PTHREAD_CREATE_JOINABLE;
11389         
11390 ; return 0; }
11391 EOF
11392 if { (eval echo configure:11393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11393   rm -rf conftest*
11394   
11395         cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 #include <pthread.h>
11399 EOF
11400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11401   egrep "pthread_detach" >/dev/null 2>&1; then
11402   rm -rf conftest*
11403   ol_cv_pthread_version=10
11404 else
11405   rm -rf conftest*
11406   ol_cv_pthread_version=8
11407 fi
11408 rm -f conftest*
11409
11410 else
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   
11415         cat > conftest.$ac_ext <<EOF
11416 #line 11417 "configure"
11417 #include "confdefs.h"
11418
11419 #               include <pthread.h>
11420 #               ifdef PTHREAD_CREATE_UNDETACHED
11421                 draft7
11422 #               endif
11423         
11424 EOF
11425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11426   egrep "draft7" >/dev/null 2>&1; then
11427   rm -rf conftest*
11428   ol_cv_pthread_version=7
11429 else
11430   rm -rf conftest*
11431   
11432         cat > conftest.$ac_ext <<EOF
11433 #line 11434 "configure"
11434 #include "confdefs.h"
11435 #include <pthread.h>
11436 EOF
11437 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11438   egrep "pthread_attr_init" >/dev/null 2>&1; then
11439   rm -rf conftest*
11440   ol_cv_pthread_version=6
11441 else
11442   rm -rf conftest*
11443   
11444         cat > conftest.$ac_ext <<EOF
11445 #line 11446 "configure"
11446 #include "confdefs.h"
11447
11448 #               include <pthread.h>
11449 #ifdef          PTHREAD_MUTEX_INITIALIZER
11450                 draft5
11451 #endif
11452         
11453 EOF
11454 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11455   egrep "draft5" >/dev/null 2>&1; then
11456   rm -rf conftest*
11457   ol_cv_pthread_version=5
11458 else
11459   rm -rf conftest*
11460   ol_cv_pthread_version=4
11461 fi
11462 rm -f conftest*
11463  
11464 fi
11465 rm -f conftest*
11466  
11467 fi
11468 rm -f conftest*
11469  
11470 fi
11471 rm -f conftest*
11472
11473 fi
11474
11475 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11476
11477
11478                 if test $ol_cv_pthread_version != 0 ; then
11479                         cat >> confdefs.h <<EOF
11480 #define HAVE_PTHREADS $ol_cv_pthread_version
11481 EOF
11482
11483                 else
11484                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11485                 fi
11486
11487                 # consider threads found
11488                 ol_with_threads=found
11489
11490                 
11491         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11492 echo "configure:11493: checking for LinuxThreads pthread.h" >&5
11493 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11494   echo $ac_n "(cached) $ac_c" 1>&6
11495 else
11496   cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499 #include <pthread.h>
11500 EOF
11501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11502   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11503   rm -rf conftest*
11504   ol_cv_header_linux_threads=yes
11505 else
11506   rm -rf conftest*
11507   ol_cv_header_linux_threads=no
11508 fi
11509 rm -f conftest*
11510
11511                 
11512 fi
11513
11514 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11515         if test $ol_cv_header_linux_threads = yes; then
11516                 cat >> confdefs.h <<\EOF
11517 #define HAVE_LINUX_THREADS 1
11518 EOF
11519
11520         fi
11521
11522                 
11523         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11524 echo "configure:11525: checking for GNU Pth pthread.h" >&5
11525 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11526   echo $ac_n "(cached) $ac_c" 1>&6
11527 else
11528   cat > conftest.$ac_ext <<EOF
11529 #line 11530 "configure"
11530 #include "confdefs.h"
11531 #include <pthread.h>
11532 #ifdef _POSIX_THREAD_IS_GNU_PTH
11533         __gnu_pth__;
11534 #endif
11535
11536 EOF
11537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11538   egrep "__gnu_pth__" >/dev/null 2>&1; then
11539   rm -rf conftest*
11540   ol_cv_header_gnu_pth_pthread_h=yes
11541 else
11542   rm -rf conftest*
11543   ol_cv_header_gnu_pth_pthread_h=no
11544 fi
11545 rm -f conftest*
11546
11547                 
11548 fi
11549
11550 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11551
11552
11553                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11554                         for ac_hdr in sched.h
11555 do
11556 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11557 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11558 echo "configure:11559: checking for $ac_hdr" >&5
11559 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11560   echo $ac_n "(cached) $ac_c" 1>&6
11561 else
11562   cat > conftest.$ac_ext <<EOF
11563 #line 11564 "configure"
11564 #include "confdefs.h"
11565 #include <$ac_hdr>
11566 EOF
11567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11568 { (eval echo configure:11569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11570 if test -z "$ac_err"; then
11571   rm -rf conftest*
11572   eval "ac_cv_header_$ac_safe=yes"
11573 else
11574   echo "$ac_err" >&5
11575   echo "configure: failed program was:" >&5
11576   cat conftest.$ac_ext >&5
11577   rm -rf conftest*
11578   eval "ac_cv_header_$ac_safe=no"
11579 fi
11580 rm -f conftest*
11581 fi
11582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11583   echo "$ac_t""yes" 1>&6
11584     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11585   cat >> confdefs.h <<EOF
11586 #define $ac_tr_hdr 1
11587 EOF
11588  
11589 else
11590   echo "$ac_t""no" 1>&6
11591 fi
11592 done
11593
11594                 fi
11595
11596                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11597                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11598 echo "configure:11599: checking for pthread_create in default libraries" >&5
11599 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11600   echo $ac_n "(cached) $ac_c" 1>&6
11601 else
11602   
11603                 if test "$cross_compiling" = yes; then
11604   cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 /* pthread test headers */
11608 #include <pthread.h>
11609 #if HAVE_PTHREADS < 7
11610 #include <errno.h>
11611 #endif
11612 #ifndef NULL
11613 #define NULL (void*)0
11614 #endif
11615
11616 static void *task(p)
11617         void *p;
11618 {
11619         return (void *) (p == NULL);
11620 }
11621
11622 int main() {
11623
11624         /* pthread test function */
11625 #ifndef PTHREAD_CREATE_DETACHED
11626 #define PTHREAD_CREATE_DETACHED 1
11627 #endif
11628         pthread_t t;
11629         int status;
11630         int detach = PTHREAD_CREATE_DETACHED;
11631
11632 #if HAVE_PTHREADS > 4
11633         /* Final pthreads */
11634         pthread_attr_t attr;
11635
11636         status = pthread_attr_init(&attr);
11637         if( status ) return status;
11638
11639 #if HAVE_PTHREADS < 7
11640         status = pthread_attr_setdetachstate(&attr, &detach);
11641         if( status < 0 ) status = errno;
11642 #else
11643         status = pthread_attr_setdetachstate(&attr, detach);
11644 #endif
11645         if( status ) return status;
11646         status = pthread_create( &t, &attr, task, NULL );
11647 #if HAVE_PTHREADS < 7
11648         if( status < 0 ) status = errno;
11649 #endif
11650         if( status ) return status;
11651 #else
11652         /* Draft 4 pthreads */
11653         status = pthread_create( &t, pthread_attr_default, task, NULL );
11654         if( status ) return errno;
11655
11656         /* give thread a chance to complete */
11657         /* it should remain joinable and hence detachable */
11658         sleep( 1 );
11659
11660         status = pthread_detach( &t );
11661         if( status ) return errno;
11662 #endif
11663
11664 #ifdef HAVE_LINUX_THREADS
11665         pthread_kill_other_threads_np();
11666 #endif
11667
11668         return 0;
11669
11670 ; return 0; }
11671 EOF
11672 if { (eval echo configure:11673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11673   rm -rf conftest*
11674   ol_cv_pthread_create=yes
11675 else
11676   echo "configure: failed program was:" >&5
11677   cat conftest.$ac_ext >&5
11678   rm -rf conftest*
11679   ol_cv_pthread_create=no
11680 fi
11681 rm -f conftest*
11682 else
11683   cat > conftest.$ac_ext <<EOF
11684 #line 11685 "configure"
11685 #include "confdefs.h"
11686 /* pthread test headers */
11687 #include <pthread.h>
11688 #if HAVE_PTHREADS < 7
11689 #include <errno.h>
11690 #endif
11691 #ifndef NULL
11692 #define NULL (void*)0
11693 #endif
11694
11695 static void *task(p)
11696         void *p;
11697 {
11698         return (void *) (p == NULL);
11699 }
11700
11701
11702 int main(argc, argv)
11703         int argc;
11704         char **argv;
11705 {
11706
11707         /* pthread test function */
11708 #ifndef PTHREAD_CREATE_DETACHED
11709 #define PTHREAD_CREATE_DETACHED 1
11710 #endif
11711         pthread_t t;
11712         int status;
11713         int detach = PTHREAD_CREATE_DETACHED;
11714
11715 #if HAVE_PTHREADS > 4
11716         /* Final pthreads */
11717         pthread_attr_t attr;
11718
11719         status = pthread_attr_init(&attr);
11720         if( status ) return status;
11721
11722 #if HAVE_PTHREADS < 7
11723         status = pthread_attr_setdetachstate(&attr, &detach);
11724         if( status < 0 ) status = errno;
11725 #else
11726         status = pthread_attr_setdetachstate(&attr, detach);
11727 #endif
11728         if( status ) return status;
11729         status = pthread_create( &t, &attr, task, NULL );
11730 #if HAVE_PTHREADS < 7
11731         if( status < 0 ) status = errno;
11732 #endif
11733         if( status ) return status;
11734 #else
11735         /* Draft 4 pthreads */
11736         status = pthread_create( &t, pthread_attr_default, task, NULL );
11737         if( status ) return errno;
11738
11739         /* give thread a chance to complete */
11740         /* it should remain joinable and hence detachable */
11741         sleep( 1 );
11742
11743         status = pthread_detach( &t );
11744         if( status ) return errno;
11745 #endif
11746
11747 #ifdef HAVE_LINUX_THREADS
11748         pthread_kill_other_threads_np();
11749 #endif
11750
11751         return 0;
11752
11753 }
11754
11755 EOF
11756 if { (eval echo configure:11757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11757 then
11758   ol_cv_pthread_create=yes
11759 else
11760   echo "configure: failed program was:" >&5
11761   cat conftest.$ac_ext >&5
11762   rm -fr conftest*
11763   ol_cv_pthread_create=no
11764 fi
11765 rm -fr conftest*
11766 fi
11767
11768 fi
11769
11770 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11771
11772                 if test $ol_cv_pthread_create != no ; then
11773                         ol_link_threads=posix
11774                         ol_link_pthreads=""
11775                 fi
11776                 
11777                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11778 if test "$ol_link_threads" = no ; then
11779         # try -kthread
11780         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11781 echo "configure:11782: checking for pthread link with -kthread" >&5
11782 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11783   echo $ac_n "(cached) $ac_c" 1>&6
11784 else
11785   
11786                 # save the flags
11787                 ol_LIBS="$LIBS"
11788                 LIBS="-kthread $LIBS"
11789
11790                 if test "$cross_compiling" = yes; then
11791   cat > conftest.$ac_ext <<EOF
11792 #line 11793 "configure"
11793 #include "confdefs.h"
11794 /* pthread test headers */
11795 #include <pthread.h>
11796 #if HAVE_PTHREADS < 7
11797 #include <errno.h>
11798 #endif
11799 #ifndef NULL
11800 #define NULL (void*)0
11801 #endif
11802
11803 static void *task(p)
11804         void *p;
11805 {
11806         return (void *) (p == NULL);
11807 }
11808
11809 int main() {
11810
11811         /* pthread test function */
11812 #ifndef PTHREAD_CREATE_DETACHED
11813 #define PTHREAD_CREATE_DETACHED 1
11814 #endif
11815         pthread_t t;
11816         int status;
11817         int detach = PTHREAD_CREATE_DETACHED;
11818
11819 #if HAVE_PTHREADS > 4
11820         /* Final pthreads */
11821         pthread_attr_t attr;
11822
11823         status = pthread_attr_init(&attr);
11824         if( status ) return status;
11825
11826 #if HAVE_PTHREADS < 7
11827         status = pthread_attr_setdetachstate(&attr, &detach);
11828         if( status < 0 ) status = errno;
11829 #else
11830         status = pthread_attr_setdetachstate(&attr, detach);
11831 #endif
11832         if( status ) return status;
11833         status = pthread_create( &t, &attr, task, NULL );
11834 #if HAVE_PTHREADS < 7
11835         if( status < 0 ) status = errno;
11836 #endif
11837         if( status ) return status;
11838 #else
11839         /* Draft 4 pthreads */
11840         status = pthread_create( &t, pthread_attr_default, task, NULL );
11841         if( status ) return errno;
11842
11843         /* give thread a chance to complete */
11844         /* it should remain joinable and hence detachable */
11845         sleep( 1 );
11846
11847         status = pthread_detach( &t );
11848         if( status ) return errno;
11849 #endif
11850
11851 #ifdef HAVE_LINUX_THREADS
11852         pthread_kill_other_threads_np();
11853 #endif
11854
11855         return 0;
11856
11857 ; return 0; }
11858 EOF
11859 if { (eval echo configure:11860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11860   rm -rf conftest*
11861   ol_cv_pthread_kthread=yes
11862 else
11863   echo "configure: failed program was:" >&5
11864   cat conftest.$ac_ext >&5
11865   rm -rf conftest*
11866   ol_cv_pthread_kthread=no
11867 fi
11868 rm -f conftest*
11869 else
11870   cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 /* pthread test headers */
11874 #include <pthread.h>
11875 #if HAVE_PTHREADS < 7
11876 #include <errno.h>
11877 #endif
11878 #ifndef NULL
11879 #define NULL (void*)0
11880 #endif
11881
11882 static void *task(p)
11883         void *p;
11884 {
11885         return (void *) (p == NULL);
11886 }
11887
11888
11889 int main(argc, argv)
11890         int argc;
11891         char **argv;
11892 {
11893
11894         /* pthread test function */
11895 #ifndef PTHREAD_CREATE_DETACHED
11896 #define PTHREAD_CREATE_DETACHED 1
11897 #endif
11898         pthread_t t;
11899         int status;
11900         int detach = PTHREAD_CREATE_DETACHED;
11901
11902 #if HAVE_PTHREADS > 4
11903         /* Final pthreads */
11904         pthread_attr_t attr;
11905
11906         status = pthread_attr_init(&attr);
11907         if( status ) return status;
11908
11909 #if HAVE_PTHREADS < 7
11910         status = pthread_attr_setdetachstate(&attr, &detach);
11911         if( status < 0 ) status = errno;
11912 #else
11913         status = pthread_attr_setdetachstate(&attr, detach);
11914 #endif
11915         if( status ) return status;
11916         status = pthread_create( &t, &attr, task, NULL );
11917 #if HAVE_PTHREADS < 7
11918         if( status < 0 ) status = errno;
11919 #endif
11920         if( status ) return status;
11921 #else
11922         /* Draft 4 pthreads */
11923         status = pthread_create( &t, pthread_attr_default, task, NULL );
11924         if( status ) return errno;
11925
11926         /* give thread a chance to complete */
11927         /* it should remain joinable and hence detachable */
11928         sleep( 1 );
11929
11930         status = pthread_detach( &t );
11931         if( status ) return errno;
11932 #endif
11933
11934 #ifdef HAVE_LINUX_THREADS
11935         pthread_kill_other_threads_np();
11936 #endif
11937
11938         return 0;
11939
11940 }
11941
11942 EOF
11943 if { (eval echo configure:11944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11944 then
11945   ol_cv_pthread_kthread=yes
11946 else
11947   echo "configure: failed program was:" >&5
11948   cat conftest.$ac_ext >&5
11949   rm -fr conftest*
11950   ol_cv_pthread_kthread=no
11951 fi
11952 rm -fr conftest*
11953 fi
11954
11955
11956                 # restore the LIBS
11957                 LIBS="$ol_LIBS"
11958         
11959 fi
11960
11961 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11962
11963         if test $ol_cv_pthread_kthread = yes ; then
11964                 ol_link_pthreads="-kthread"
11965                 ol_link_threads=posix
11966         fi
11967 fi
11968
11969                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11970 if test "$ol_link_threads" = no ; then
11971         # try -pthread
11972         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11973 echo "configure:11974: checking for pthread link with -pthread" >&5
11974 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11975   echo $ac_n "(cached) $ac_c" 1>&6
11976 else
11977   
11978                 # save the flags
11979                 ol_LIBS="$LIBS"
11980                 LIBS="-pthread $LIBS"
11981
11982                 if test "$cross_compiling" = yes; then
11983   cat > conftest.$ac_ext <<EOF
11984 #line 11985 "configure"
11985 #include "confdefs.h"
11986 /* pthread test headers */
11987 #include <pthread.h>
11988 #if HAVE_PTHREADS < 7
11989 #include <errno.h>
11990 #endif
11991 #ifndef NULL
11992 #define NULL (void*)0
11993 #endif
11994
11995 static void *task(p)
11996         void *p;
11997 {
11998         return (void *) (p == NULL);
11999 }
12000
12001 int main() {
12002
12003         /* pthread test function */
12004 #ifndef PTHREAD_CREATE_DETACHED
12005 #define PTHREAD_CREATE_DETACHED 1
12006 #endif
12007         pthread_t t;
12008         int status;
12009         int detach = PTHREAD_CREATE_DETACHED;
12010
12011 #if HAVE_PTHREADS > 4
12012         /* Final pthreads */
12013         pthread_attr_t attr;
12014
12015         status = pthread_attr_init(&attr);
12016         if( status ) return status;
12017
12018 #if HAVE_PTHREADS < 7
12019         status = pthread_attr_setdetachstate(&attr, &detach);
12020         if( status < 0 ) status = errno;
12021 #else
12022         status = pthread_attr_setdetachstate(&attr, detach);
12023 #endif
12024         if( status ) return status;
12025         status = pthread_create( &t, &attr, task, NULL );
12026 #if HAVE_PTHREADS < 7
12027         if( status < 0 ) status = errno;
12028 #endif
12029         if( status ) return status;
12030 #else
12031         /* Draft 4 pthreads */
12032         status = pthread_create( &t, pthread_attr_default, task, NULL );
12033         if( status ) return errno;
12034
12035         /* give thread a chance to complete */
12036         /* it should remain joinable and hence detachable */
12037         sleep( 1 );
12038
12039         status = pthread_detach( &t );
12040         if( status ) return errno;
12041 #endif
12042
12043 #ifdef HAVE_LINUX_THREADS
12044         pthread_kill_other_threads_np();
12045 #endif
12046
12047         return 0;
12048
12049 ; return 0; }
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12052   rm -rf conftest*
12053   ol_cv_pthread_pthread=yes
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -rf conftest*
12058   ol_cv_pthread_pthread=no
12059 fi
12060 rm -f conftest*
12061 else
12062   cat > conftest.$ac_ext <<EOF
12063 #line 12064 "configure"
12064 #include "confdefs.h"
12065 /* pthread test headers */
12066 #include <pthread.h>
12067 #if HAVE_PTHREADS < 7
12068 #include <errno.h>
12069 #endif
12070 #ifndef NULL
12071 #define NULL (void*)0
12072 #endif
12073
12074 static void *task(p)
12075         void *p;
12076 {
12077         return (void *) (p == NULL);
12078 }
12079
12080
12081 int main(argc, argv)
12082         int argc;
12083         char **argv;
12084 {
12085
12086         /* pthread test function */
12087 #ifndef PTHREAD_CREATE_DETACHED
12088 #define PTHREAD_CREATE_DETACHED 1
12089 #endif
12090         pthread_t t;
12091         int status;
12092         int detach = PTHREAD_CREATE_DETACHED;
12093
12094 #if HAVE_PTHREADS > 4
12095         /* Final pthreads */
12096         pthread_attr_t attr;
12097
12098         status = pthread_attr_init(&attr);
12099         if( status ) return status;
12100
12101 #if HAVE_PTHREADS < 7
12102         status = pthread_attr_setdetachstate(&attr, &detach);
12103         if( status < 0 ) status = errno;
12104 #else
12105         status = pthread_attr_setdetachstate(&attr, detach);
12106 #endif
12107         if( status ) return status;
12108         status = pthread_create( &t, &attr, task, NULL );
12109 #if HAVE_PTHREADS < 7
12110         if( status < 0 ) status = errno;
12111 #endif
12112         if( status ) return status;
12113 #else
12114         /* Draft 4 pthreads */
12115         status = pthread_create( &t, pthread_attr_default, task, NULL );
12116         if( status ) return errno;
12117
12118         /* give thread a chance to complete */
12119         /* it should remain joinable and hence detachable */
12120         sleep( 1 );
12121
12122         status = pthread_detach( &t );
12123         if( status ) return errno;
12124 #endif
12125
12126 #ifdef HAVE_LINUX_THREADS
12127         pthread_kill_other_threads_np();
12128 #endif
12129
12130         return 0;
12131
12132 }
12133
12134 EOF
12135 if { (eval echo configure:12136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12136 then
12137   ol_cv_pthread_pthread=yes
12138 else
12139   echo "configure: failed program was:" >&5
12140   cat conftest.$ac_ext >&5
12141   rm -fr conftest*
12142   ol_cv_pthread_pthread=no
12143 fi
12144 rm -fr conftest*
12145 fi
12146
12147
12148                 # restore the LIBS
12149                 LIBS="$ol_LIBS"
12150         
12151 fi
12152
12153 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12154
12155         if test $ol_cv_pthread_pthread = yes ; then
12156                 ol_link_pthreads="-pthread"
12157                 ol_link_threads=posix
12158         fi
12159 fi
12160
12161                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12162 if test "$ol_link_threads" = no ; then
12163         # try -pthreads
12164         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12165 echo "configure:12166: checking for pthread link with -pthreads" >&5
12166 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12167   echo $ac_n "(cached) $ac_c" 1>&6
12168 else
12169   
12170                 # save the flags
12171                 ol_LIBS="$LIBS"
12172                 LIBS="-pthreads $LIBS"
12173
12174                 if test "$cross_compiling" = yes; then
12175   cat > conftest.$ac_ext <<EOF
12176 #line 12177 "configure"
12177 #include "confdefs.h"
12178 /* pthread test headers */
12179 #include <pthread.h>
12180 #if HAVE_PTHREADS < 7
12181 #include <errno.h>
12182 #endif
12183 #ifndef NULL
12184 #define NULL (void*)0
12185 #endif
12186
12187 static void *task(p)
12188         void *p;
12189 {
12190         return (void *) (p == NULL);
12191 }
12192
12193 int main() {
12194
12195         /* pthread test function */
12196 #ifndef PTHREAD_CREATE_DETACHED
12197 #define PTHREAD_CREATE_DETACHED 1
12198 #endif
12199         pthread_t t;
12200         int status;
12201         int detach = PTHREAD_CREATE_DETACHED;
12202
12203 #if HAVE_PTHREADS > 4
12204         /* Final pthreads */
12205         pthread_attr_t attr;
12206
12207         status = pthread_attr_init(&attr);
12208         if( status ) return status;
12209
12210 #if HAVE_PTHREADS < 7
12211         status = pthread_attr_setdetachstate(&attr, &detach);
12212         if( status < 0 ) status = errno;
12213 #else
12214         status = pthread_attr_setdetachstate(&attr, detach);
12215 #endif
12216         if( status ) return status;
12217         status = pthread_create( &t, &attr, task, NULL );
12218 #if HAVE_PTHREADS < 7
12219         if( status < 0 ) status = errno;
12220 #endif
12221         if( status ) return status;
12222 #else
12223         /* Draft 4 pthreads */
12224         status = pthread_create( &t, pthread_attr_default, task, NULL );
12225         if( status ) return errno;
12226
12227         /* give thread a chance to complete */
12228         /* it should remain joinable and hence detachable */
12229         sleep( 1 );
12230
12231         status = pthread_detach( &t );
12232         if( status ) return errno;
12233 #endif
12234
12235 #ifdef HAVE_LINUX_THREADS
12236         pthread_kill_other_threads_np();
12237 #endif
12238
12239         return 0;
12240
12241 ; return 0; }
12242 EOF
12243 if { (eval echo configure:12244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12244   rm -rf conftest*
12245   ol_cv_pthread_pthreads=yes
12246 else
12247   echo "configure: failed program was:" >&5
12248   cat conftest.$ac_ext >&5
12249   rm -rf conftest*
12250   ol_cv_pthread_pthreads=no
12251 fi
12252 rm -f conftest*
12253 else
12254   cat > conftest.$ac_ext <<EOF
12255 #line 12256 "configure"
12256 #include "confdefs.h"
12257 /* pthread test headers */
12258 #include <pthread.h>
12259 #if HAVE_PTHREADS < 7
12260 #include <errno.h>
12261 #endif
12262 #ifndef NULL
12263 #define NULL (void*)0
12264 #endif
12265
12266 static void *task(p)
12267         void *p;
12268 {
12269         return (void *) (p == NULL);
12270 }
12271
12272
12273 int main(argc, argv)
12274         int argc;
12275         char **argv;
12276 {
12277
12278         /* pthread test function */
12279 #ifndef PTHREAD_CREATE_DETACHED
12280 #define PTHREAD_CREATE_DETACHED 1
12281 #endif
12282         pthread_t t;
12283         int status;
12284         int detach = PTHREAD_CREATE_DETACHED;
12285
12286 #if HAVE_PTHREADS > 4
12287         /* Final pthreads */
12288         pthread_attr_t attr;
12289
12290         status = pthread_attr_init(&attr);
12291         if( status ) return status;
12292
12293 #if HAVE_PTHREADS < 7
12294         status = pthread_attr_setdetachstate(&attr, &detach);
12295         if( status < 0 ) status = errno;
12296 #else
12297         status = pthread_attr_setdetachstate(&attr, detach);
12298 #endif
12299         if( status ) return status;
12300         status = pthread_create( &t, &attr, task, NULL );
12301 #if HAVE_PTHREADS < 7
12302         if( status < 0 ) status = errno;
12303 #endif
12304         if( status ) return status;
12305 #else
12306         /* Draft 4 pthreads */
12307         status = pthread_create( &t, pthread_attr_default, task, NULL );
12308         if( status ) return errno;
12309
12310         /* give thread a chance to complete */
12311         /* it should remain joinable and hence detachable */
12312         sleep( 1 );
12313
12314         status = pthread_detach( &t );
12315         if( status ) return errno;
12316 #endif
12317
12318 #ifdef HAVE_LINUX_THREADS
12319         pthread_kill_other_threads_np();
12320 #endif
12321
12322         return 0;
12323
12324 }
12325
12326 EOF
12327 if { (eval echo configure:12328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12328 then
12329   ol_cv_pthread_pthreads=yes
12330 else
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -fr conftest*
12334   ol_cv_pthread_pthreads=no
12335 fi
12336 rm -fr conftest*
12337 fi
12338
12339
12340                 # restore the LIBS
12341                 LIBS="$ol_LIBS"
12342         
12343 fi
12344
12345 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12346
12347         if test $ol_cv_pthread_pthreads = yes ; then
12348                 ol_link_pthreads="-pthreads"
12349                 ol_link_threads=posix
12350         fi
12351 fi
12352
12353                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12354 if test "$ol_link_threads" = no ; then
12355         # try -mthreads
12356         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12357 echo "configure:12358: checking for pthread link with -mthreads" >&5
12358 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12359   echo $ac_n "(cached) $ac_c" 1>&6
12360 else
12361   
12362                 # save the flags
12363                 ol_LIBS="$LIBS"
12364                 LIBS="-mthreads $LIBS"
12365
12366                 if test "$cross_compiling" = yes; then
12367   cat > conftest.$ac_ext <<EOF
12368 #line 12369 "configure"
12369 #include "confdefs.h"
12370 /* pthread test headers */
12371 #include <pthread.h>
12372 #if HAVE_PTHREADS < 7
12373 #include <errno.h>
12374 #endif
12375 #ifndef NULL
12376 #define NULL (void*)0
12377 #endif
12378
12379 static void *task(p)
12380         void *p;
12381 {
12382         return (void *) (p == NULL);
12383 }
12384
12385 int main() {
12386
12387         /* pthread test function */
12388 #ifndef PTHREAD_CREATE_DETACHED
12389 #define PTHREAD_CREATE_DETACHED 1
12390 #endif
12391         pthread_t t;
12392         int status;
12393         int detach = PTHREAD_CREATE_DETACHED;
12394
12395 #if HAVE_PTHREADS > 4
12396         /* Final pthreads */
12397         pthread_attr_t attr;
12398
12399         status = pthread_attr_init(&attr);
12400         if( status ) return status;
12401
12402 #if HAVE_PTHREADS < 7
12403         status = pthread_attr_setdetachstate(&attr, &detach);
12404         if( status < 0 ) status = errno;
12405 #else
12406         status = pthread_attr_setdetachstate(&attr, detach);
12407 #endif
12408         if( status ) return status;
12409         status = pthread_create( &t, &attr, task, NULL );
12410 #if HAVE_PTHREADS < 7
12411         if( status < 0 ) status = errno;
12412 #endif
12413         if( status ) return status;
12414 #else
12415         /* Draft 4 pthreads */
12416         status = pthread_create( &t, pthread_attr_default, task, NULL );
12417         if( status ) return errno;
12418
12419         /* give thread a chance to complete */
12420         /* it should remain joinable and hence detachable */
12421         sleep( 1 );
12422
12423         status = pthread_detach( &t );
12424         if( status ) return errno;
12425 #endif
12426
12427 #ifdef HAVE_LINUX_THREADS
12428         pthread_kill_other_threads_np();
12429 #endif
12430
12431         return 0;
12432
12433 ; return 0; }
12434 EOF
12435 if { (eval echo configure:12436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12436   rm -rf conftest*
12437   ol_cv_pthread_mthreads=yes
12438 else
12439   echo "configure: failed program was:" >&5
12440   cat conftest.$ac_ext >&5
12441   rm -rf conftest*
12442   ol_cv_pthread_mthreads=no
12443 fi
12444 rm -f conftest*
12445 else
12446   cat > conftest.$ac_ext <<EOF
12447 #line 12448 "configure"
12448 #include "confdefs.h"
12449 /* pthread test headers */
12450 #include <pthread.h>
12451 #if HAVE_PTHREADS < 7
12452 #include <errno.h>
12453 #endif
12454 #ifndef NULL
12455 #define NULL (void*)0
12456 #endif
12457
12458 static void *task(p)
12459         void *p;
12460 {
12461         return (void *) (p == NULL);
12462 }
12463
12464
12465 int main(argc, argv)
12466         int argc;
12467         char **argv;
12468 {
12469
12470         /* pthread test function */
12471 #ifndef PTHREAD_CREATE_DETACHED
12472 #define PTHREAD_CREATE_DETACHED 1
12473 #endif
12474         pthread_t t;
12475         int status;
12476         int detach = PTHREAD_CREATE_DETACHED;
12477
12478 #if HAVE_PTHREADS > 4
12479         /* Final pthreads */
12480         pthread_attr_t attr;
12481
12482         status = pthread_attr_init(&attr);
12483         if( status ) return status;
12484
12485 #if HAVE_PTHREADS < 7
12486         status = pthread_attr_setdetachstate(&attr, &detach);
12487         if( status < 0 ) status = errno;
12488 #else
12489         status = pthread_attr_setdetachstate(&attr, detach);
12490 #endif
12491         if( status ) return status;
12492         status = pthread_create( &t, &attr, task, NULL );
12493 #if HAVE_PTHREADS < 7
12494         if( status < 0 ) status = errno;
12495 #endif
12496         if( status ) return status;
12497 #else
12498         /* Draft 4 pthreads */
12499         status = pthread_create( &t, pthread_attr_default, task, NULL );
12500         if( status ) return errno;
12501
12502         /* give thread a chance to complete */
12503         /* it should remain joinable and hence detachable */
12504         sleep( 1 );
12505
12506         status = pthread_detach( &t );
12507         if( status ) return errno;
12508 #endif
12509
12510 #ifdef HAVE_LINUX_THREADS
12511         pthread_kill_other_threads_np();
12512 #endif
12513
12514         return 0;
12515
12516 }
12517
12518 EOF
12519 if { (eval echo configure:12520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12520 then
12521   ol_cv_pthread_mthreads=yes
12522 else
12523   echo "configure: failed program was:" >&5
12524   cat conftest.$ac_ext >&5
12525   rm -fr conftest*
12526   ol_cv_pthread_mthreads=no
12527 fi
12528 rm -fr conftest*
12529 fi
12530
12531
12532                 # restore the LIBS
12533                 LIBS="$ol_LIBS"
12534         
12535 fi
12536
12537 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12538
12539         if test $ol_cv_pthread_mthreads = yes ; then
12540                 ol_link_pthreads="-mthreads"
12541                 ol_link_threads=posix
12542         fi
12543 fi
12544
12545                 # Pthread try link: -thread (ol_cv_pthread_thread)
12546 if test "$ol_link_threads" = no ; then
12547         # try -thread
12548         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12549 echo "configure:12550: checking for pthread link with -thread" >&5
12550 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12551   echo $ac_n "(cached) $ac_c" 1>&6
12552 else
12553   
12554                 # save the flags
12555                 ol_LIBS="$LIBS"
12556                 LIBS="-thread $LIBS"
12557
12558                 if test "$cross_compiling" = yes; then
12559   cat > conftest.$ac_ext <<EOF
12560 #line 12561 "configure"
12561 #include "confdefs.h"
12562 /* pthread test headers */
12563 #include <pthread.h>
12564 #if HAVE_PTHREADS < 7
12565 #include <errno.h>
12566 #endif
12567 #ifndef NULL
12568 #define NULL (void*)0
12569 #endif
12570
12571 static void *task(p)
12572         void *p;
12573 {
12574         return (void *) (p == NULL);
12575 }
12576
12577 int main() {
12578
12579         /* pthread test function */
12580 #ifndef PTHREAD_CREATE_DETACHED
12581 #define PTHREAD_CREATE_DETACHED 1
12582 #endif
12583         pthread_t t;
12584         int status;
12585         int detach = PTHREAD_CREATE_DETACHED;
12586
12587 #if HAVE_PTHREADS > 4
12588         /* Final pthreads */
12589         pthread_attr_t attr;
12590
12591         status = pthread_attr_init(&attr);
12592         if( status ) return status;
12593
12594 #if HAVE_PTHREADS < 7
12595         status = pthread_attr_setdetachstate(&attr, &detach);
12596         if( status < 0 ) status = errno;
12597 #else
12598         status = pthread_attr_setdetachstate(&attr, detach);
12599 #endif
12600         if( status ) return status;
12601         status = pthread_create( &t, &attr, task, NULL );
12602 #if HAVE_PTHREADS < 7
12603         if( status < 0 ) status = errno;
12604 #endif
12605         if( status ) return status;
12606 #else
12607         /* Draft 4 pthreads */
12608         status = pthread_create( &t, pthread_attr_default, task, NULL );
12609         if( status ) return errno;
12610
12611         /* give thread a chance to complete */
12612         /* it should remain joinable and hence detachable */
12613         sleep( 1 );
12614
12615         status = pthread_detach( &t );
12616         if( status ) return errno;
12617 #endif
12618
12619 #ifdef HAVE_LINUX_THREADS
12620         pthread_kill_other_threads_np();
12621 #endif
12622
12623         return 0;
12624
12625 ; return 0; }
12626 EOF
12627 if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12628   rm -rf conftest*
12629   ol_cv_pthread_thread=yes
12630 else
12631   echo "configure: failed program was:" >&5
12632   cat conftest.$ac_ext >&5
12633   rm -rf conftest*
12634   ol_cv_pthread_thread=no
12635 fi
12636 rm -f conftest*
12637 else
12638   cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641 /* pthread test headers */
12642 #include <pthread.h>
12643 #if HAVE_PTHREADS < 7
12644 #include <errno.h>
12645 #endif
12646 #ifndef NULL
12647 #define NULL (void*)0
12648 #endif
12649
12650 static void *task(p)
12651         void *p;
12652 {
12653         return (void *) (p == NULL);
12654 }
12655
12656
12657 int main(argc, argv)
12658         int argc;
12659         char **argv;
12660 {
12661
12662         /* pthread test function */
12663 #ifndef PTHREAD_CREATE_DETACHED
12664 #define PTHREAD_CREATE_DETACHED 1
12665 #endif
12666         pthread_t t;
12667         int status;
12668         int detach = PTHREAD_CREATE_DETACHED;
12669
12670 #if HAVE_PTHREADS > 4
12671         /* Final pthreads */
12672         pthread_attr_t attr;
12673
12674         status = pthread_attr_init(&attr);
12675         if( status ) return status;
12676
12677 #if HAVE_PTHREADS < 7
12678         status = pthread_attr_setdetachstate(&attr, &detach);
12679         if( status < 0 ) status = errno;
12680 #else
12681         status = pthread_attr_setdetachstate(&attr, detach);
12682 #endif
12683         if( status ) return status;
12684         status = pthread_create( &t, &attr, task, NULL );
12685 #if HAVE_PTHREADS < 7
12686         if( status < 0 ) status = errno;
12687 #endif
12688         if( status ) return status;
12689 #else
12690         /* Draft 4 pthreads */
12691         status = pthread_create( &t, pthread_attr_default, task, NULL );
12692         if( status ) return errno;
12693
12694         /* give thread a chance to complete */
12695         /* it should remain joinable and hence detachable */
12696         sleep( 1 );
12697
12698         status = pthread_detach( &t );
12699         if( status ) return errno;
12700 #endif
12701
12702 #ifdef HAVE_LINUX_THREADS
12703         pthread_kill_other_threads_np();
12704 #endif
12705
12706         return 0;
12707
12708 }
12709
12710 EOF
12711 if { (eval echo configure:12712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12712 then
12713   ol_cv_pthread_thread=yes
12714 else
12715   echo "configure: failed program was:" >&5
12716   cat conftest.$ac_ext >&5
12717   rm -fr conftest*
12718   ol_cv_pthread_thread=no
12719 fi
12720 rm -fr conftest*
12721 fi
12722
12723
12724                 # restore the LIBS
12725                 LIBS="$ol_LIBS"
12726         
12727 fi
12728
12729 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12730
12731         if test $ol_cv_pthread_thread = yes ; then
12732                 ol_link_pthreads="-thread"
12733                 ol_link_threads=posix
12734         fi
12735 fi
12736
12737
12738                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12739 if test "$ol_link_threads" = no ; then
12740         # try -lpthread -lmach -lexc -lc_r
12741         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12742 echo "configure:12743: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12743 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12744   echo $ac_n "(cached) $ac_c" 1>&6
12745 else
12746   
12747                 # save the flags
12748                 ol_LIBS="$LIBS"
12749                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12750
12751                 if test "$cross_compiling" = yes; then
12752   cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755 /* pthread test headers */
12756 #include <pthread.h>
12757 #if HAVE_PTHREADS < 7
12758 #include <errno.h>
12759 #endif
12760 #ifndef NULL
12761 #define NULL (void*)0
12762 #endif
12763
12764 static void *task(p)
12765         void *p;
12766 {
12767         return (void *) (p == NULL);
12768 }
12769
12770 int main() {
12771
12772         /* pthread test function */
12773 #ifndef PTHREAD_CREATE_DETACHED
12774 #define PTHREAD_CREATE_DETACHED 1
12775 #endif
12776         pthread_t t;
12777         int status;
12778         int detach = PTHREAD_CREATE_DETACHED;
12779
12780 #if HAVE_PTHREADS > 4
12781         /* Final pthreads */
12782         pthread_attr_t attr;
12783
12784         status = pthread_attr_init(&attr);
12785         if( status ) return status;
12786
12787 #if HAVE_PTHREADS < 7
12788         status = pthread_attr_setdetachstate(&attr, &detach);
12789         if( status < 0 ) status = errno;
12790 #else
12791         status = pthread_attr_setdetachstate(&attr, detach);
12792 #endif
12793         if( status ) return status;
12794         status = pthread_create( &t, &attr, task, NULL );
12795 #if HAVE_PTHREADS < 7
12796         if( status < 0 ) status = errno;
12797 #endif
12798         if( status ) return status;
12799 #else
12800         /* Draft 4 pthreads */
12801         status = pthread_create( &t, pthread_attr_default, task, NULL );
12802         if( status ) return errno;
12803
12804         /* give thread a chance to complete */
12805         /* it should remain joinable and hence detachable */
12806         sleep( 1 );
12807
12808         status = pthread_detach( &t );
12809         if( status ) return errno;
12810 #endif
12811
12812 #ifdef HAVE_LINUX_THREADS
12813         pthread_kill_other_threads_np();
12814 #endif
12815
12816         return 0;
12817
12818 ; return 0; }
12819 EOF
12820 if { (eval echo configure:12821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12821   rm -rf conftest*
12822   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12823 else
12824   echo "configure: failed program was:" >&5
12825   cat conftest.$ac_ext >&5
12826   rm -rf conftest*
12827   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12828 fi
12829 rm -f conftest*
12830 else
12831   cat > conftest.$ac_ext <<EOF
12832 #line 12833 "configure"
12833 #include "confdefs.h"
12834 /* pthread test headers */
12835 #include <pthread.h>
12836 #if HAVE_PTHREADS < 7
12837 #include <errno.h>
12838 #endif
12839 #ifndef NULL
12840 #define NULL (void*)0
12841 #endif
12842
12843 static void *task(p)
12844         void *p;
12845 {
12846         return (void *) (p == NULL);
12847 }
12848
12849
12850 int main(argc, argv)
12851         int argc;
12852         char **argv;
12853 {
12854
12855         /* pthread test function */
12856 #ifndef PTHREAD_CREATE_DETACHED
12857 #define PTHREAD_CREATE_DETACHED 1
12858 #endif
12859         pthread_t t;
12860         int status;
12861         int detach = PTHREAD_CREATE_DETACHED;
12862
12863 #if HAVE_PTHREADS > 4
12864         /* Final pthreads */
12865         pthread_attr_t attr;
12866
12867         status = pthread_attr_init(&attr);
12868         if( status ) return status;
12869
12870 #if HAVE_PTHREADS < 7
12871         status = pthread_attr_setdetachstate(&attr, &detach);
12872         if( status < 0 ) status = errno;
12873 #else
12874         status = pthread_attr_setdetachstate(&attr, detach);
12875 #endif
12876         if( status ) return status;
12877         status = pthread_create( &t, &attr, task, NULL );
12878 #if HAVE_PTHREADS < 7
12879         if( status < 0 ) status = errno;
12880 #endif
12881         if( status ) return status;
12882 #else
12883         /* Draft 4 pthreads */
12884         status = pthread_create( &t, pthread_attr_default, task, NULL );
12885         if( status ) return errno;
12886
12887         /* give thread a chance to complete */
12888         /* it should remain joinable and hence detachable */
12889         sleep( 1 );
12890
12891         status = pthread_detach( &t );
12892         if( status ) return errno;
12893 #endif
12894
12895 #ifdef HAVE_LINUX_THREADS
12896         pthread_kill_other_threads_np();
12897 #endif
12898
12899         return 0;
12900
12901 }
12902
12903 EOF
12904 if { (eval echo configure:12905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12905 then
12906   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12907 else
12908   echo "configure: failed program was:" >&5
12909   cat conftest.$ac_ext >&5
12910   rm -fr conftest*
12911   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12912 fi
12913 rm -fr conftest*
12914 fi
12915
12916
12917                 # restore the LIBS
12918                 LIBS="$ol_LIBS"
12919         
12920 fi
12921
12922 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12923
12924         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12925                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12926                 ol_link_threads=posix
12927         fi
12928 fi
12929
12930                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12931 if test "$ol_link_threads" = no ; then
12932         # try -lpthread -lmach -lexc
12933         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12934 echo "configure:12935: checking for pthread link with -lpthread -lmach -lexc" >&5
12935 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12936   echo $ac_n "(cached) $ac_c" 1>&6
12937 else
12938   
12939                 # save the flags
12940                 ol_LIBS="$LIBS"
12941                 LIBS="-lpthread -lmach -lexc $LIBS"
12942
12943                 if test "$cross_compiling" = yes; then
12944   cat > conftest.$ac_ext <<EOF
12945 #line 12946 "configure"
12946 #include "confdefs.h"
12947 /* pthread test headers */
12948 #include <pthread.h>
12949 #if HAVE_PTHREADS < 7
12950 #include <errno.h>
12951 #endif
12952 #ifndef NULL
12953 #define NULL (void*)0
12954 #endif
12955
12956 static void *task(p)
12957         void *p;
12958 {
12959         return (void *) (p == NULL);
12960 }
12961
12962 int main() {
12963
12964         /* pthread test function */
12965 #ifndef PTHREAD_CREATE_DETACHED
12966 #define PTHREAD_CREATE_DETACHED 1
12967 #endif
12968         pthread_t t;
12969         int status;
12970         int detach = PTHREAD_CREATE_DETACHED;
12971
12972 #if HAVE_PTHREADS > 4
12973         /* Final pthreads */
12974         pthread_attr_t attr;
12975
12976         status = pthread_attr_init(&attr);
12977         if( status ) return status;
12978
12979 #if HAVE_PTHREADS < 7
12980         status = pthread_attr_setdetachstate(&attr, &detach);
12981         if( status < 0 ) status = errno;
12982 #else
12983         status = pthread_attr_setdetachstate(&attr, detach);
12984 #endif
12985         if( status ) return status;
12986         status = pthread_create( &t, &attr, task, NULL );
12987 #if HAVE_PTHREADS < 7
12988         if( status < 0 ) status = errno;
12989 #endif
12990         if( status ) return status;
12991 #else
12992         /* Draft 4 pthreads */
12993         status = pthread_create( &t, pthread_attr_default, task, NULL );
12994         if( status ) return errno;
12995
12996         /* give thread a chance to complete */
12997         /* it should remain joinable and hence detachable */
12998         sleep( 1 );
12999
13000         status = pthread_detach( &t );
13001         if( status ) return errno;
13002 #endif
13003
13004 #ifdef HAVE_LINUX_THREADS
13005         pthread_kill_other_threads_np();
13006 #endif
13007
13008         return 0;
13009
13010 ; return 0; }
13011 EOF
13012 if { (eval echo configure:13013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13013   rm -rf conftest*
13014   ol_cv_pthread_lpthread_lmach_lexc=yes
13015 else
13016   echo "configure: failed program was:" >&5
13017   cat conftest.$ac_ext >&5
13018   rm -rf conftest*
13019   ol_cv_pthread_lpthread_lmach_lexc=no
13020 fi
13021 rm -f conftest*
13022 else
13023   cat > conftest.$ac_ext <<EOF
13024 #line 13025 "configure"
13025 #include "confdefs.h"
13026 /* pthread test headers */
13027 #include <pthread.h>
13028 #if HAVE_PTHREADS < 7
13029 #include <errno.h>
13030 #endif
13031 #ifndef NULL
13032 #define NULL (void*)0
13033 #endif
13034
13035 static void *task(p)
13036         void *p;
13037 {
13038         return (void *) (p == NULL);
13039 }
13040
13041
13042 int main(argc, argv)
13043         int argc;
13044         char **argv;
13045 {
13046
13047         /* pthread test function */
13048 #ifndef PTHREAD_CREATE_DETACHED
13049 #define PTHREAD_CREATE_DETACHED 1
13050 #endif
13051         pthread_t t;
13052         int status;
13053         int detach = PTHREAD_CREATE_DETACHED;
13054
13055 #if HAVE_PTHREADS > 4
13056         /* Final pthreads */
13057         pthread_attr_t attr;
13058
13059         status = pthread_attr_init(&attr);
13060         if( status ) return status;
13061
13062 #if HAVE_PTHREADS < 7
13063         status = pthread_attr_setdetachstate(&attr, &detach);
13064         if( status < 0 ) status = errno;
13065 #else
13066         status = pthread_attr_setdetachstate(&attr, detach);
13067 #endif
13068         if( status ) return status;
13069         status = pthread_create( &t, &attr, task, NULL );
13070 #if HAVE_PTHREADS < 7
13071         if( status < 0 ) status = errno;
13072 #endif
13073         if( status ) return status;
13074 #else
13075         /* Draft 4 pthreads */
13076         status = pthread_create( &t, pthread_attr_default, task, NULL );
13077         if( status ) return errno;
13078
13079         /* give thread a chance to complete */
13080         /* it should remain joinable and hence detachable */
13081         sleep( 1 );
13082
13083         status = pthread_detach( &t );
13084         if( status ) return errno;
13085 #endif
13086
13087 #ifdef HAVE_LINUX_THREADS
13088         pthread_kill_other_threads_np();
13089 #endif
13090
13091         return 0;
13092
13093 }
13094
13095 EOF
13096 if { (eval echo configure:13097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13097 then
13098   ol_cv_pthread_lpthread_lmach_lexc=yes
13099 else
13100   echo "configure: failed program was:" >&5
13101   cat conftest.$ac_ext >&5
13102   rm -fr conftest*
13103   ol_cv_pthread_lpthread_lmach_lexc=no
13104 fi
13105 rm -fr conftest*
13106 fi
13107
13108
13109                 # restore the LIBS
13110                 LIBS="$ol_LIBS"
13111         
13112 fi
13113
13114 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13115
13116         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13117                 ol_link_pthreads="-lpthread -lmach -lexc"
13118                 ol_link_threads=posix
13119         fi
13120 fi
13121
13122
13123                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13124 if test "$ol_link_threads" = no ; then
13125         # try -lpthread -Wl,-woff,85
13126         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13127 echo "configure:13128: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13128 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13129   echo $ac_n "(cached) $ac_c" 1>&6
13130 else
13131   
13132                 # save the flags
13133                 ol_LIBS="$LIBS"
13134                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13135
13136                 if test "$cross_compiling" = yes; then
13137   cat > conftest.$ac_ext <<EOF
13138 #line 13139 "configure"
13139 #include "confdefs.h"
13140 /* pthread test headers */
13141 #include <pthread.h>
13142 #if HAVE_PTHREADS < 7
13143 #include <errno.h>
13144 #endif
13145 #ifndef NULL
13146 #define NULL (void*)0
13147 #endif
13148
13149 static void *task(p)
13150         void *p;
13151 {
13152         return (void *) (p == NULL);
13153 }
13154
13155 int main() {
13156
13157         /* pthread test function */
13158 #ifndef PTHREAD_CREATE_DETACHED
13159 #define PTHREAD_CREATE_DETACHED 1
13160 #endif
13161         pthread_t t;
13162         int status;
13163         int detach = PTHREAD_CREATE_DETACHED;
13164
13165 #if HAVE_PTHREADS > 4
13166         /* Final pthreads */
13167         pthread_attr_t attr;
13168
13169         status = pthread_attr_init(&attr);
13170         if( status ) return status;
13171
13172 #if HAVE_PTHREADS < 7
13173         status = pthread_attr_setdetachstate(&attr, &detach);
13174         if( status < 0 ) status = errno;
13175 #else
13176         status = pthread_attr_setdetachstate(&attr, detach);
13177 #endif
13178         if( status ) return status;
13179         status = pthread_create( &t, &attr, task, NULL );
13180 #if HAVE_PTHREADS < 7
13181         if( status < 0 ) status = errno;
13182 #endif
13183         if( status ) return status;
13184 #else
13185         /* Draft 4 pthreads */
13186         status = pthread_create( &t, pthread_attr_default, task, NULL );
13187         if( status ) return errno;
13188
13189         /* give thread a chance to complete */
13190         /* it should remain joinable and hence detachable */
13191         sleep( 1 );
13192
13193         status = pthread_detach( &t );
13194         if( status ) return errno;
13195 #endif
13196
13197 #ifdef HAVE_LINUX_THREADS
13198         pthread_kill_other_threads_np();
13199 #endif
13200
13201         return 0;
13202
13203 ; return 0; }
13204 EOF
13205 if { (eval echo configure:13206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13206   rm -rf conftest*
13207   ol_cv_pthread_lib_lpthread_woff=yes
13208 else
13209   echo "configure: failed program was:" >&5
13210   cat conftest.$ac_ext >&5
13211   rm -rf conftest*
13212   ol_cv_pthread_lib_lpthread_woff=no
13213 fi
13214 rm -f conftest*
13215 else
13216   cat > conftest.$ac_ext <<EOF
13217 #line 13218 "configure"
13218 #include "confdefs.h"
13219 /* pthread test headers */
13220 #include <pthread.h>
13221 #if HAVE_PTHREADS < 7
13222 #include <errno.h>
13223 #endif
13224 #ifndef NULL
13225 #define NULL (void*)0
13226 #endif
13227
13228 static void *task(p)
13229         void *p;
13230 {
13231         return (void *) (p == NULL);
13232 }
13233
13234
13235 int main(argc, argv)
13236         int argc;
13237         char **argv;
13238 {
13239
13240         /* pthread test function */
13241 #ifndef PTHREAD_CREATE_DETACHED
13242 #define PTHREAD_CREATE_DETACHED 1
13243 #endif
13244         pthread_t t;
13245         int status;
13246         int detach = PTHREAD_CREATE_DETACHED;
13247
13248 #if HAVE_PTHREADS > 4
13249         /* Final pthreads */
13250         pthread_attr_t attr;
13251
13252         status = pthread_attr_init(&attr);
13253         if( status ) return status;
13254
13255 #if HAVE_PTHREADS < 7
13256         status = pthread_attr_setdetachstate(&attr, &detach);
13257         if( status < 0 ) status = errno;
13258 #else
13259         status = pthread_attr_setdetachstate(&attr, detach);
13260 #endif
13261         if( status ) return status;
13262         status = pthread_create( &t, &attr, task, NULL );
13263 #if HAVE_PTHREADS < 7
13264         if( status < 0 ) status = errno;
13265 #endif
13266         if( status ) return status;
13267 #else
13268         /* Draft 4 pthreads */
13269         status = pthread_create( &t, pthread_attr_default, task, NULL );
13270         if( status ) return errno;
13271
13272         /* give thread a chance to complete */
13273         /* it should remain joinable and hence detachable */
13274         sleep( 1 );
13275
13276         status = pthread_detach( &t );
13277         if( status ) return errno;
13278 #endif
13279
13280 #ifdef HAVE_LINUX_THREADS
13281         pthread_kill_other_threads_np();
13282 #endif
13283
13284         return 0;
13285
13286 }
13287
13288 EOF
13289 if { (eval echo configure:13290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13290 then
13291   ol_cv_pthread_lib_lpthread_woff=yes
13292 else
13293   echo "configure: failed program was:" >&5
13294   cat conftest.$ac_ext >&5
13295   rm -fr conftest*
13296   ol_cv_pthread_lib_lpthread_woff=no
13297 fi
13298 rm -fr conftest*
13299 fi
13300
13301
13302                 # restore the LIBS
13303                 LIBS="$ol_LIBS"
13304         
13305 fi
13306
13307 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13308
13309         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13310                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13311                 ol_link_threads=posix
13312         fi
13313 fi
13314
13315
13316                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13317 if test "$ol_link_threads" = no ; then
13318         # try -lpthread
13319         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13320 echo "configure:13321: checking for pthread link with -lpthread" >&5
13321 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13322   echo $ac_n "(cached) $ac_c" 1>&6
13323 else
13324   
13325                 # save the flags
13326                 ol_LIBS="$LIBS"
13327                 LIBS="-lpthread $LIBS"
13328
13329                 if test "$cross_compiling" = yes; then
13330   cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333 /* pthread test headers */
13334 #include <pthread.h>
13335 #if HAVE_PTHREADS < 7
13336 #include <errno.h>
13337 #endif
13338 #ifndef NULL
13339 #define NULL (void*)0
13340 #endif
13341
13342 static void *task(p)
13343         void *p;
13344 {
13345         return (void *) (p == NULL);
13346 }
13347
13348 int main() {
13349
13350         /* pthread test function */
13351 #ifndef PTHREAD_CREATE_DETACHED
13352 #define PTHREAD_CREATE_DETACHED 1
13353 #endif
13354         pthread_t t;
13355         int status;
13356         int detach = PTHREAD_CREATE_DETACHED;
13357
13358 #if HAVE_PTHREADS > 4
13359         /* Final pthreads */
13360         pthread_attr_t attr;
13361
13362         status = pthread_attr_init(&attr);
13363         if( status ) return status;
13364
13365 #if HAVE_PTHREADS < 7
13366         status = pthread_attr_setdetachstate(&attr, &detach);
13367         if( status < 0 ) status = errno;
13368 #else
13369         status = pthread_attr_setdetachstate(&attr, detach);
13370 #endif
13371         if( status ) return status;
13372         status = pthread_create( &t, &attr, task, NULL );
13373 #if HAVE_PTHREADS < 7
13374         if( status < 0 ) status = errno;
13375 #endif
13376         if( status ) return status;
13377 #else
13378         /* Draft 4 pthreads */
13379         status = pthread_create( &t, pthread_attr_default, task, NULL );
13380         if( status ) return errno;
13381
13382         /* give thread a chance to complete */
13383         /* it should remain joinable and hence detachable */
13384         sleep( 1 );
13385
13386         status = pthread_detach( &t );
13387         if( status ) return errno;
13388 #endif
13389
13390 #ifdef HAVE_LINUX_THREADS
13391         pthread_kill_other_threads_np();
13392 #endif
13393
13394         return 0;
13395
13396 ; return 0; }
13397 EOF
13398 if { (eval echo configure:13399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13399   rm -rf conftest*
13400   ol_cv_pthread_lpthread=yes
13401 else
13402   echo "configure: failed program was:" >&5
13403   cat conftest.$ac_ext >&5
13404   rm -rf conftest*
13405   ol_cv_pthread_lpthread=no
13406 fi
13407 rm -f conftest*
13408 else
13409   cat > conftest.$ac_ext <<EOF
13410 #line 13411 "configure"
13411 #include "confdefs.h"
13412 /* pthread test headers */
13413 #include <pthread.h>
13414 #if HAVE_PTHREADS < 7
13415 #include <errno.h>
13416 #endif
13417 #ifndef NULL
13418 #define NULL (void*)0
13419 #endif
13420
13421 static void *task(p)
13422         void *p;
13423 {
13424         return (void *) (p == NULL);
13425 }
13426
13427
13428 int main(argc, argv)
13429         int argc;
13430         char **argv;
13431 {
13432
13433         /* pthread test function */
13434 #ifndef PTHREAD_CREATE_DETACHED
13435 #define PTHREAD_CREATE_DETACHED 1
13436 #endif
13437         pthread_t t;
13438         int status;
13439         int detach = PTHREAD_CREATE_DETACHED;
13440
13441 #if HAVE_PTHREADS > 4
13442         /* Final pthreads */
13443         pthread_attr_t attr;
13444
13445         status = pthread_attr_init(&attr);
13446         if( status ) return status;
13447
13448 #if HAVE_PTHREADS < 7
13449         status = pthread_attr_setdetachstate(&attr, &detach);
13450         if( status < 0 ) status = errno;
13451 #else
13452         status = pthread_attr_setdetachstate(&attr, detach);
13453 #endif
13454         if( status ) return status;
13455         status = pthread_create( &t, &attr, task, NULL );
13456 #if HAVE_PTHREADS < 7
13457         if( status < 0 ) status = errno;
13458 #endif
13459         if( status ) return status;
13460 #else
13461         /* Draft 4 pthreads */
13462         status = pthread_create( &t, pthread_attr_default, task, NULL );
13463         if( status ) return errno;
13464
13465         /* give thread a chance to complete */
13466         /* it should remain joinable and hence detachable */
13467         sleep( 1 );
13468
13469         status = pthread_detach( &t );
13470         if( status ) return errno;
13471 #endif
13472
13473 #ifdef HAVE_LINUX_THREADS
13474         pthread_kill_other_threads_np();
13475 #endif
13476
13477         return 0;
13478
13479 }
13480
13481 EOF
13482 if { (eval echo configure:13483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13483 then
13484   ol_cv_pthread_lpthread=yes
13485 else
13486   echo "configure: failed program was:" >&5
13487   cat conftest.$ac_ext >&5
13488   rm -fr conftest*
13489   ol_cv_pthread_lpthread=no
13490 fi
13491 rm -fr conftest*
13492 fi
13493
13494
13495                 # restore the LIBS
13496                 LIBS="$ol_LIBS"
13497         
13498 fi
13499
13500 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13501
13502         if test $ol_cv_pthread_lpthread = yes ; then
13503                 ol_link_pthreads="-lpthread"
13504                 ol_link_threads=posix
13505         fi
13506 fi
13507
13508                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13509 if test "$ol_link_threads" = no ; then
13510         # try -lc_r
13511         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13512 echo "configure:13513: checking for pthread link with -lc_r" >&5
13513 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13514   echo $ac_n "(cached) $ac_c" 1>&6
13515 else
13516   
13517                 # save the flags
13518                 ol_LIBS="$LIBS"
13519                 LIBS="-lc_r $LIBS"
13520
13521                 if test "$cross_compiling" = yes; then
13522   cat > conftest.$ac_ext <<EOF
13523 #line 13524 "configure"
13524 #include "confdefs.h"
13525 /* pthread test headers */
13526 #include <pthread.h>
13527 #if HAVE_PTHREADS < 7
13528 #include <errno.h>
13529 #endif
13530 #ifndef NULL
13531 #define NULL (void*)0
13532 #endif
13533
13534 static void *task(p)
13535         void *p;
13536 {
13537         return (void *) (p == NULL);
13538 }
13539
13540 int main() {
13541
13542         /* pthread test function */
13543 #ifndef PTHREAD_CREATE_DETACHED
13544 #define PTHREAD_CREATE_DETACHED 1
13545 #endif
13546         pthread_t t;
13547         int status;
13548         int detach = PTHREAD_CREATE_DETACHED;
13549
13550 #if HAVE_PTHREADS > 4
13551         /* Final pthreads */
13552         pthread_attr_t attr;
13553
13554         status = pthread_attr_init(&attr);
13555         if( status ) return status;
13556
13557 #if HAVE_PTHREADS < 7
13558         status = pthread_attr_setdetachstate(&attr, &detach);
13559         if( status < 0 ) status = errno;
13560 #else
13561         status = pthread_attr_setdetachstate(&attr, detach);
13562 #endif
13563         if( status ) return status;
13564         status = pthread_create( &t, &attr, task, NULL );
13565 #if HAVE_PTHREADS < 7
13566         if( status < 0 ) status = errno;
13567 #endif
13568         if( status ) return status;
13569 #else
13570         /* Draft 4 pthreads */
13571         status = pthread_create( &t, pthread_attr_default, task, NULL );
13572         if( status ) return errno;
13573
13574         /* give thread a chance to complete */
13575         /* it should remain joinable and hence detachable */
13576         sleep( 1 );
13577
13578         status = pthread_detach( &t );
13579         if( status ) return errno;
13580 #endif
13581
13582 #ifdef HAVE_LINUX_THREADS
13583         pthread_kill_other_threads_np();
13584 #endif
13585
13586         return 0;
13587
13588 ; return 0; }
13589 EOF
13590 if { (eval echo configure:13591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13591   rm -rf conftest*
13592   ol_cv_pthread_lc_r=yes
13593 else
13594   echo "configure: failed program was:" >&5
13595   cat conftest.$ac_ext >&5
13596   rm -rf conftest*
13597   ol_cv_pthread_lc_r=no
13598 fi
13599 rm -f conftest*
13600 else
13601   cat > conftest.$ac_ext <<EOF
13602 #line 13603 "configure"
13603 #include "confdefs.h"
13604 /* pthread test headers */
13605 #include <pthread.h>
13606 #if HAVE_PTHREADS < 7
13607 #include <errno.h>
13608 #endif
13609 #ifndef NULL
13610 #define NULL (void*)0
13611 #endif
13612
13613 static void *task(p)
13614         void *p;
13615 {
13616         return (void *) (p == NULL);
13617 }
13618
13619
13620 int main(argc, argv)
13621         int argc;
13622         char **argv;
13623 {
13624
13625         /* pthread test function */
13626 #ifndef PTHREAD_CREATE_DETACHED
13627 #define PTHREAD_CREATE_DETACHED 1
13628 #endif
13629         pthread_t t;
13630         int status;
13631         int detach = PTHREAD_CREATE_DETACHED;
13632
13633 #if HAVE_PTHREADS > 4
13634         /* Final pthreads */
13635         pthread_attr_t attr;
13636
13637         status = pthread_attr_init(&attr);
13638         if( status ) return status;
13639
13640 #if HAVE_PTHREADS < 7
13641         status = pthread_attr_setdetachstate(&attr, &detach);
13642         if( status < 0 ) status = errno;
13643 #else
13644         status = pthread_attr_setdetachstate(&attr, detach);
13645 #endif
13646         if( status ) return status;
13647         status = pthread_create( &t, &attr, task, NULL );
13648 #if HAVE_PTHREADS < 7
13649         if( status < 0 ) status = errno;
13650 #endif
13651         if( status ) return status;
13652 #else
13653         /* Draft 4 pthreads */
13654         status = pthread_create( &t, pthread_attr_default, task, NULL );
13655         if( status ) return errno;
13656
13657         /* give thread a chance to complete */
13658         /* it should remain joinable and hence detachable */
13659         sleep( 1 );
13660
13661         status = pthread_detach( &t );
13662         if( status ) return errno;
13663 #endif
13664
13665 #ifdef HAVE_LINUX_THREADS
13666         pthread_kill_other_threads_np();
13667 #endif
13668
13669         return 0;
13670
13671 }
13672
13673 EOF
13674 if { (eval echo configure:13675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13675 then
13676   ol_cv_pthread_lc_r=yes
13677 else
13678   echo "configure: failed program was:" >&5
13679   cat conftest.$ac_ext >&5
13680   rm -fr conftest*
13681   ol_cv_pthread_lc_r=no
13682 fi
13683 rm -fr conftest*
13684 fi
13685
13686
13687                 # restore the LIBS
13688                 LIBS="$ol_LIBS"
13689         
13690 fi
13691
13692 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13693
13694         if test $ol_cv_pthread_lc_r = yes ; then
13695                 ol_link_pthreads="-lc_r"
13696                 ol_link_threads=posix
13697         fi
13698 fi
13699
13700
13701                 # Pthread try link: -threads (ol_cv_pthread_threads)
13702 if test "$ol_link_threads" = no ; then
13703         # try -threads
13704         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13705 echo "configure:13706: checking for pthread link with -threads" >&5
13706 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13707   echo $ac_n "(cached) $ac_c" 1>&6
13708 else
13709   
13710                 # save the flags
13711                 ol_LIBS="$LIBS"
13712                 LIBS="-threads $LIBS"
13713
13714                 if test "$cross_compiling" = yes; then
13715   cat > conftest.$ac_ext <<EOF
13716 #line 13717 "configure"
13717 #include "confdefs.h"
13718 /* pthread test headers */
13719 #include <pthread.h>
13720 #if HAVE_PTHREADS < 7
13721 #include <errno.h>
13722 #endif
13723 #ifndef NULL
13724 #define NULL (void*)0
13725 #endif
13726
13727 static void *task(p)
13728         void *p;
13729 {
13730         return (void *) (p == NULL);
13731 }
13732
13733 int main() {
13734
13735         /* pthread test function */
13736 #ifndef PTHREAD_CREATE_DETACHED
13737 #define PTHREAD_CREATE_DETACHED 1
13738 #endif
13739         pthread_t t;
13740         int status;
13741         int detach = PTHREAD_CREATE_DETACHED;
13742
13743 #if HAVE_PTHREADS > 4
13744         /* Final pthreads */
13745         pthread_attr_t attr;
13746
13747         status = pthread_attr_init(&attr);
13748         if( status ) return status;
13749
13750 #if HAVE_PTHREADS < 7
13751         status = pthread_attr_setdetachstate(&attr, &detach);
13752         if( status < 0 ) status = errno;
13753 #else
13754         status = pthread_attr_setdetachstate(&attr, detach);
13755 #endif
13756         if( status ) return status;
13757         status = pthread_create( &t, &attr, task, NULL );
13758 #if HAVE_PTHREADS < 7
13759         if( status < 0 ) status = errno;
13760 #endif
13761         if( status ) return status;
13762 #else
13763         /* Draft 4 pthreads */
13764         status = pthread_create( &t, pthread_attr_default, task, NULL );
13765         if( status ) return errno;
13766
13767         /* give thread a chance to complete */
13768         /* it should remain joinable and hence detachable */
13769         sleep( 1 );
13770
13771         status = pthread_detach( &t );
13772         if( status ) return errno;
13773 #endif
13774
13775 #ifdef HAVE_LINUX_THREADS
13776         pthread_kill_other_threads_np();
13777 #endif
13778
13779         return 0;
13780
13781 ; return 0; }
13782 EOF
13783 if { (eval echo configure:13784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13784   rm -rf conftest*
13785   ol_cv_pthread_threads=yes
13786 else
13787   echo "configure: failed program was:" >&5
13788   cat conftest.$ac_ext >&5
13789   rm -rf conftest*
13790   ol_cv_pthread_threads=no
13791 fi
13792 rm -f conftest*
13793 else
13794   cat > conftest.$ac_ext <<EOF
13795 #line 13796 "configure"
13796 #include "confdefs.h"
13797 /* pthread test headers */
13798 #include <pthread.h>
13799 #if HAVE_PTHREADS < 7
13800 #include <errno.h>
13801 #endif
13802 #ifndef NULL
13803 #define NULL (void*)0
13804 #endif
13805
13806 static void *task(p)
13807         void *p;
13808 {
13809         return (void *) (p == NULL);
13810 }
13811
13812
13813 int main(argc, argv)
13814         int argc;
13815         char **argv;
13816 {
13817
13818         /* pthread test function */
13819 #ifndef PTHREAD_CREATE_DETACHED
13820 #define PTHREAD_CREATE_DETACHED 1
13821 #endif
13822         pthread_t t;
13823         int status;
13824         int detach = PTHREAD_CREATE_DETACHED;
13825
13826 #if HAVE_PTHREADS > 4
13827         /* Final pthreads */
13828         pthread_attr_t attr;
13829
13830         status = pthread_attr_init(&attr);
13831         if( status ) return status;
13832
13833 #if HAVE_PTHREADS < 7
13834         status = pthread_attr_setdetachstate(&attr, &detach);
13835         if( status < 0 ) status = errno;
13836 #else
13837         status = pthread_attr_setdetachstate(&attr, detach);
13838 #endif
13839         if( status ) return status;
13840         status = pthread_create( &t, &attr, task, NULL );
13841 #if HAVE_PTHREADS < 7
13842         if( status < 0 ) status = errno;
13843 #endif
13844         if( status ) return status;
13845 #else
13846         /* Draft 4 pthreads */
13847         status = pthread_create( &t, pthread_attr_default, task, NULL );
13848         if( status ) return errno;
13849
13850         /* give thread a chance to complete */
13851         /* it should remain joinable and hence detachable */
13852         sleep( 1 );
13853
13854         status = pthread_detach( &t );
13855         if( status ) return errno;
13856 #endif
13857
13858 #ifdef HAVE_LINUX_THREADS
13859         pthread_kill_other_threads_np();
13860 #endif
13861
13862         return 0;
13863
13864 }
13865
13866 EOF
13867 if { (eval echo configure:13868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13868 then
13869   ol_cv_pthread_threads=yes
13870 else
13871   echo "configure: failed program was:" >&5
13872   cat conftest.$ac_ext >&5
13873   rm -fr conftest*
13874   ol_cv_pthread_threads=no
13875 fi
13876 rm -fr conftest*
13877 fi
13878
13879
13880                 # restore the LIBS
13881                 LIBS="$ol_LIBS"
13882         
13883 fi
13884
13885 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13886
13887         if test $ol_cv_pthread_threads = yes ; then
13888                 ol_link_pthreads="-threads"
13889                 ol_link_threads=posix
13890         fi
13891 fi
13892
13893
13894                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13895 if test "$ol_link_threads" = no ; then
13896         # try -lpthreads -lmach -lexc -lc_r
13897         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13898 echo "configure:13899: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13899 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13900   echo $ac_n "(cached) $ac_c" 1>&6
13901 else
13902   
13903                 # save the flags
13904                 ol_LIBS="$LIBS"
13905                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13906
13907                 if test "$cross_compiling" = yes; then
13908   cat > conftest.$ac_ext <<EOF
13909 #line 13910 "configure"
13910 #include "confdefs.h"
13911 /* pthread test headers */
13912 #include <pthread.h>
13913 #if HAVE_PTHREADS < 7
13914 #include <errno.h>
13915 #endif
13916 #ifndef NULL
13917 #define NULL (void*)0
13918 #endif
13919
13920 static void *task(p)
13921         void *p;
13922 {
13923         return (void *) (p == NULL);
13924 }
13925
13926 int main() {
13927
13928         /* pthread test function */
13929 #ifndef PTHREAD_CREATE_DETACHED
13930 #define PTHREAD_CREATE_DETACHED 1
13931 #endif
13932         pthread_t t;
13933         int status;
13934         int detach = PTHREAD_CREATE_DETACHED;
13935
13936 #if HAVE_PTHREADS > 4
13937         /* Final pthreads */
13938         pthread_attr_t attr;
13939
13940         status = pthread_attr_init(&attr);
13941         if( status ) return status;
13942
13943 #if HAVE_PTHREADS < 7
13944         status = pthread_attr_setdetachstate(&attr, &detach);
13945         if( status < 0 ) status = errno;
13946 #else
13947         status = pthread_attr_setdetachstate(&attr, detach);
13948 #endif
13949         if( status ) return status;
13950         status = pthread_create( &t, &attr, task, NULL );
13951 #if HAVE_PTHREADS < 7
13952         if( status < 0 ) status = errno;
13953 #endif
13954         if( status ) return status;
13955 #else
13956         /* Draft 4 pthreads */
13957         status = pthread_create( &t, pthread_attr_default, task, NULL );
13958         if( status ) return errno;
13959
13960         /* give thread a chance to complete */
13961         /* it should remain joinable and hence detachable */
13962         sleep( 1 );
13963
13964         status = pthread_detach( &t );
13965         if( status ) return errno;
13966 #endif
13967
13968 #ifdef HAVE_LINUX_THREADS
13969         pthread_kill_other_threads_np();
13970 #endif
13971
13972         return 0;
13973
13974 ; return 0; }
13975 EOF
13976 if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13977   rm -rf conftest*
13978   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13979 else
13980   echo "configure: failed program was:" >&5
13981   cat conftest.$ac_ext >&5
13982   rm -rf conftest*
13983   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13984 fi
13985 rm -f conftest*
13986 else
13987   cat > conftest.$ac_ext <<EOF
13988 #line 13989 "configure"
13989 #include "confdefs.h"
13990 /* pthread test headers */
13991 #include <pthread.h>
13992 #if HAVE_PTHREADS < 7
13993 #include <errno.h>
13994 #endif
13995 #ifndef NULL
13996 #define NULL (void*)0
13997 #endif
13998
13999 static void *task(p)
14000         void *p;
14001 {
14002         return (void *) (p == NULL);
14003 }
14004
14005
14006 int main(argc, argv)
14007         int argc;
14008         char **argv;
14009 {
14010
14011         /* pthread test function */
14012 #ifndef PTHREAD_CREATE_DETACHED
14013 #define PTHREAD_CREATE_DETACHED 1
14014 #endif
14015         pthread_t t;
14016         int status;
14017         int detach = PTHREAD_CREATE_DETACHED;
14018
14019 #if HAVE_PTHREADS > 4
14020         /* Final pthreads */
14021         pthread_attr_t attr;
14022
14023         status = pthread_attr_init(&attr);
14024         if( status ) return status;
14025
14026 #if HAVE_PTHREADS < 7
14027         status = pthread_attr_setdetachstate(&attr, &detach);
14028         if( status < 0 ) status = errno;
14029 #else
14030         status = pthread_attr_setdetachstate(&attr, detach);
14031 #endif
14032         if( status ) return status;
14033         status = pthread_create( &t, &attr, task, NULL );
14034 #if HAVE_PTHREADS < 7
14035         if( status < 0 ) status = errno;
14036 #endif
14037         if( status ) return status;
14038 #else
14039         /* Draft 4 pthreads */
14040         status = pthread_create( &t, pthread_attr_default, task, NULL );
14041         if( status ) return errno;
14042
14043         /* give thread a chance to complete */
14044         /* it should remain joinable and hence detachable */
14045         sleep( 1 );
14046
14047         status = pthread_detach( &t );
14048         if( status ) return errno;
14049 #endif
14050
14051 #ifdef HAVE_LINUX_THREADS
14052         pthread_kill_other_threads_np();
14053 #endif
14054
14055         return 0;
14056
14057 }
14058
14059 EOF
14060 if { (eval echo configure:14061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14061 then
14062   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14063 else
14064   echo "configure: failed program was:" >&5
14065   cat conftest.$ac_ext >&5
14066   rm -fr conftest*
14067   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14068 fi
14069 rm -fr conftest*
14070 fi
14071
14072
14073                 # restore the LIBS
14074                 LIBS="$ol_LIBS"
14075         
14076 fi
14077
14078 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14079
14080         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14081                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14082                 ol_link_threads=posix
14083         fi
14084 fi
14085
14086                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14087 if test "$ol_link_threads" = no ; then
14088         # try -lpthreads -lmach -lexc
14089         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14090 echo "configure:14091: checking for pthread link with -lpthreads -lmach -lexc" >&5
14091 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14092   echo $ac_n "(cached) $ac_c" 1>&6
14093 else
14094   
14095                 # save the flags
14096                 ol_LIBS="$LIBS"
14097                 LIBS="-lpthreads -lmach -lexc $LIBS"
14098
14099                 if test "$cross_compiling" = yes; then
14100   cat > conftest.$ac_ext <<EOF
14101 #line 14102 "configure"
14102 #include "confdefs.h"
14103 /* pthread test headers */
14104 #include <pthread.h>
14105 #if HAVE_PTHREADS < 7
14106 #include <errno.h>
14107 #endif
14108 #ifndef NULL
14109 #define NULL (void*)0
14110 #endif
14111
14112 static void *task(p)
14113         void *p;
14114 {
14115         return (void *) (p == NULL);
14116 }
14117
14118 int main() {
14119
14120         /* pthread test function */
14121 #ifndef PTHREAD_CREATE_DETACHED
14122 #define PTHREAD_CREATE_DETACHED 1
14123 #endif
14124         pthread_t t;
14125         int status;
14126         int detach = PTHREAD_CREATE_DETACHED;
14127
14128 #if HAVE_PTHREADS > 4
14129         /* Final pthreads */
14130         pthread_attr_t attr;
14131
14132         status = pthread_attr_init(&attr);
14133         if( status ) return status;
14134
14135 #if HAVE_PTHREADS < 7
14136         status = pthread_attr_setdetachstate(&attr, &detach);
14137         if( status < 0 ) status = errno;
14138 #else
14139         status = pthread_attr_setdetachstate(&attr, detach);
14140 #endif
14141         if( status ) return status;
14142         status = pthread_create( &t, &attr, task, NULL );
14143 #if HAVE_PTHREADS < 7
14144         if( status < 0 ) status = errno;
14145 #endif
14146         if( status ) return status;
14147 #else
14148         /* Draft 4 pthreads */
14149         status = pthread_create( &t, pthread_attr_default, task, NULL );
14150         if( status ) return errno;
14151
14152         /* give thread a chance to complete */
14153         /* it should remain joinable and hence detachable */
14154         sleep( 1 );
14155
14156         status = pthread_detach( &t );
14157         if( status ) return errno;
14158 #endif
14159
14160 #ifdef HAVE_LINUX_THREADS
14161         pthread_kill_other_threads_np();
14162 #endif
14163
14164         return 0;
14165
14166 ; return 0; }
14167 EOF
14168 if { (eval echo configure:14169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14169   rm -rf conftest*
14170   ol_cv_pthread_lpthreads_lmach_lexc=yes
14171 else
14172   echo "configure: failed program was:" >&5
14173   cat conftest.$ac_ext >&5
14174   rm -rf conftest*
14175   ol_cv_pthread_lpthreads_lmach_lexc=no
14176 fi
14177 rm -f conftest*
14178 else
14179   cat > conftest.$ac_ext <<EOF
14180 #line 14181 "configure"
14181 #include "confdefs.h"
14182 /* pthread test headers */
14183 #include <pthread.h>
14184 #if HAVE_PTHREADS < 7
14185 #include <errno.h>
14186 #endif
14187 #ifndef NULL
14188 #define NULL (void*)0
14189 #endif
14190
14191 static void *task(p)
14192         void *p;
14193 {
14194         return (void *) (p == NULL);
14195 }
14196
14197
14198 int main(argc, argv)
14199         int argc;
14200         char **argv;
14201 {
14202
14203         /* pthread test function */
14204 #ifndef PTHREAD_CREATE_DETACHED
14205 #define PTHREAD_CREATE_DETACHED 1
14206 #endif
14207         pthread_t t;
14208         int status;
14209         int detach = PTHREAD_CREATE_DETACHED;
14210
14211 #if HAVE_PTHREADS > 4
14212         /* Final pthreads */
14213         pthread_attr_t attr;
14214
14215         status = pthread_attr_init(&attr);
14216         if( status ) return status;
14217
14218 #if HAVE_PTHREADS < 7
14219         status = pthread_attr_setdetachstate(&attr, &detach);
14220         if( status < 0 ) status = errno;
14221 #else
14222         status = pthread_attr_setdetachstate(&attr, detach);
14223 #endif
14224         if( status ) return status;
14225         status = pthread_create( &t, &attr, task, NULL );
14226 #if HAVE_PTHREADS < 7
14227         if( status < 0 ) status = errno;
14228 #endif
14229         if( status ) return status;
14230 #else
14231         /* Draft 4 pthreads */
14232         status = pthread_create( &t, pthread_attr_default, task, NULL );
14233         if( status ) return errno;
14234
14235         /* give thread a chance to complete */
14236         /* it should remain joinable and hence detachable */
14237         sleep( 1 );
14238
14239         status = pthread_detach( &t );
14240         if( status ) return errno;
14241 #endif
14242
14243 #ifdef HAVE_LINUX_THREADS
14244         pthread_kill_other_threads_np();
14245 #endif
14246
14247         return 0;
14248
14249 }
14250
14251 EOF
14252 if { (eval echo configure:14253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14253 then
14254   ol_cv_pthread_lpthreads_lmach_lexc=yes
14255 else
14256   echo "configure: failed program was:" >&5
14257   cat conftest.$ac_ext >&5
14258   rm -fr conftest*
14259   ol_cv_pthread_lpthreads_lmach_lexc=no
14260 fi
14261 rm -fr conftest*
14262 fi
14263
14264
14265                 # restore the LIBS
14266                 LIBS="$ol_LIBS"
14267         
14268 fi
14269
14270 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14271
14272         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14273                 ol_link_pthreads="-lpthreads -lmach -lexc"
14274                 ol_link_threads=posix
14275         fi
14276 fi
14277
14278                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14279 if test "$ol_link_threads" = no ; then
14280         # try -lpthreads -lexc
14281         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14282 echo "configure:14283: checking for pthread link with -lpthreads -lexc" >&5
14283 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14284   echo $ac_n "(cached) $ac_c" 1>&6
14285 else
14286   
14287                 # save the flags
14288                 ol_LIBS="$LIBS"
14289                 LIBS="-lpthreads -lexc $LIBS"
14290
14291                 if test "$cross_compiling" = yes; then
14292   cat > conftest.$ac_ext <<EOF
14293 #line 14294 "configure"
14294 #include "confdefs.h"
14295 /* pthread test headers */
14296 #include <pthread.h>
14297 #if HAVE_PTHREADS < 7
14298 #include <errno.h>
14299 #endif
14300 #ifndef NULL
14301 #define NULL (void*)0
14302 #endif
14303
14304 static void *task(p)
14305         void *p;
14306 {
14307         return (void *) (p == NULL);
14308 }
14309
14310 int main() {
14311
14312         /* pthread test function */
14313 #ifndef PTHREAD_CREATE_DETACHED
14314 #define PTHREAD_CREATE_DETACHED 1
14315 #endif
14316         pthread_t t;
14317         int status;
14318         int detach = PTHREAD_CREATE_DETACHED;
14319
14320 #if HAVE_PTHREADS > 4
14321         /* Final pthreads */
14322         pthread_attr_t attr;
14323
14324         status = pthread_attr_init(&attr);
14325         if( status ) return status;
14326
14327 #if HAVE_PTHREADS < 7
14328         status = pthread_attr_setdetachstate(&attr, &detach);
14329         if( status < 0 ) status = errno;
14330 #else
14331         status = pthread_attr_setdetachstate(&attr, detach);
14332 #endif
14333         if( status ) return status;
14334         status = pthread_create( &t, &attr, task, NULL );
14335 #if HAVE_PTHREADS < 7
14336         if( status < 0 ) status = errno;
14337 #endif
14338         if( status ) return status;
14339 #else
14340         /* Draft 4 pthreads */
14341         status = pthread_create( &t, pthread_attr_default, task, NULL );
14342         if( status ) return errno;
14343
14344         /* give thread a chance to complete */
14345         /* it should remain joinable and hence detachable */
14346         sleep( 1 );
14347
14348         status = pthread_detach( &t );
14349         if( status ) return errno;
14350 #endif
14351
14352 #ifdef HAVE_LINUX_THREADS
14353         pthread_kill_other_threads_np();
14354 #endif
14355
14356         return 0;
14357
14358 ; return 0; }
14359 EOF
14360 if { (eval echo configure:14361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14361   rm -rf conftest*
14362   ol_cv_pthread_lpthreads_lexc=yes
14363 else
14364   echo "configure: failed program was:" >&5
14365   cat conftest.$ac_ext >&5
14366   rm -rf conftest*
14367   ol_cv_pthread_lpthreads_lexc=no
14368 fi
14369 rm -f conftest*
14370 else
14371   cat > conftest.$ac_ext <<EOF
14372 #line 14373 "configure"
14373 #include "confdefs.h"
14374 /* pthread test headers */
14375 #include <pthread.h>
14376 #if HAVE_PTHREADS < 7
14377 #include <errno.h>
14378 #endif
14379 #ifndef NULL
14380 #define NULL (void*)0
14381 #endif
14382
14383 static void *task(p)
14384         void *p;
14385 {
14386         return (void *) (p == NULL);
14387 }
14388
14389
14390 int main(argc, argv)
14391         int argc;
14392         char **argv;
14393 {
14394
14395         /* pthread test function */
14396 #ifndef PTHREAD_CREATE_DETACHED
14397 #define PTHREAD_CREATE_DETACHED 1
14398 #endif
14399         pthread_t t;
14400         int status;
14401         int detach = PTHREAD_CREATE_DETACHED;
14402
14403 #if HAVE_PTHREADS > 4
14404         /* Final pthreads */
14405         pthread_attr_t attr;
14406
14407         status = pthread_attr_init(&attr);
14408         if( status ) return status;
14409
14410 #if HAVE_PTHREADS < 7
14411         status = pthread_attr_setdetachstate(&attr, &detach);
14412         if( status < 0 ) status = errno;
14413 #else
14414         status = pthread_attr_setdetachstate(&attr, detach);
14415 #endif
14416         if( status ) return status;
14417         status = pthread_create( &t, &attr, task, NULL );
14418 #if HAVE_PTHREADS < 7
14419         if( status < 0 ) status = errno;
14420 #endif
14421         if( status ) return status;
14422 #else
14423         /* Draft 4 pthreads */
14424         status = pthread_create( &t, pthread_attr_default, task, NULL );
14425         if( status ) return errno;
14426
14427         /* give thread a chance to complete */
14428         /* it should remain joinable and hence detachable */
14429         sleep( 1 );
14430
14431         status = pthread_detach( &t );
14432         if( status ) return errno;
14433 #endif
14434
14435 #ifdef HAVE_LINUX_THREADS
14436         pthread_kill_other_threads_np();
14437 #endif
14438
14439         return 0;
14440
14441 }
14442
14443 EOF
14444 if { (eval echo configure:14445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14445 then
14446   ol_cv_pthread_lpthreads_lexc=yes
14447 else
14448   echo "configure: failed program was:" >&5
14449   cat conftest.$ac_ext >&5
14450   rm -fr conftest*
14451   ol_cv_pthread_lpthreads_lexc=no
14452 fi
14453 rm -fr conftest*
14454 fi
14455
14456
14457                 # restore the LIBS
14458                 LIBS="$ol_LIBS"
14459         
14460 fi
14461
14462 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14463
14464         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14465                 ol_link_pthreads="-lpthreads -lexc"
14466                 ol_link_threads=posix
14467         fi
14468 fi
14469
14470
14471                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14472 if test "$ol_link_threads" = no ; then
14473         # try -lpthreads
14474         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14475 echo "configure:14476: checking for pthread link with -lpthreads" >&5
14476 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14477   echo $ac_n "(cached) $ac_c" 1>&6
14478 else
14479   
14480                 # save the flags
14481                 ol_LIBS="$LIBS"
14482                 LIBS="-lpthreads $LIBS"
14483
14484                 if test "$cross_compiling" = yes; then
14485   cat > conftest.$ac_ext <<EOF
14486 #line 14487 "configure"
14487 #include "confdefs.h"
14488 /* pthread test headers */
14489 #include <pthread.h>
14490 #if HAVE_PTHREADS < 7
14491 #include <errno.h>
14492 #endif
14493 #ifndef NULL
14494 #define NULL (void*)0
14495 #endif
14496
14497 static void *task(p)
14498         void *p;
14499 {
14500         return (void *) (p == NULL);
14501 }
14502
14503 int main() {
14504
14505         /* pthread test function */
14506 #ifndef PTHREAD_CREATE_DETACHED
14507 #define PTHREAD_CREATE_DETACHED 1
14508 #endif
14509         pthread_t t;
14510         int status;
14511         int detach = PTHREAD_CREATE_DETACHED;
14512
14513 #if HAVE_PTHREADS > 4
14514         /* Final pthreads */
14515         pthread_attr_t attr;
14516
14517         status = pthread_attr_init(&attr);
14518         if( status ) return status;
14519
14520 #if HAVE_PTHREADS < 7
14521         status = pthread_attr_setdetachstate(&attr, &detach);
14522         if( status < 0 ) status = errno;
14523 #else
14524         status = pthread_attr_setdetachstate(&attr, detach);
14525 #endif
14526         if( status ) return status;
14527         status = pthread_create( &t, &attr, task, NULL );
14528 #if HAVE_PTHREADS < 7
14529         if( status < 0 ) status = errno;
14530 #endif
14531         if( status ) return status;
14532 #else
14533         /* Draft 4 pthreads */
14534         status = pthread_create( &t, pthread_attr_default, task, NULL );
14535         if( status ) return errno;
14536
14537         /* give thread a chance to complete */
14538         /* it should remain joinable and hence detachable */
14539         sleep( 1 );
14540
14541         status = pthread_detach( &t );
14542         if( status ) return errno;
14543 #endif
14544
14545 #ifdef HAVE_LINUX_THREADS
14546         pthread_kill_other_threads_np();
14547 #endif
14548
14549         return 0;
14550
14551 ; return 0; }
14552 EOF
14553 if { (eval echo configure:14554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14554   rm -rf conftest*
14555   ol_cv_pthread_lib_lpthreads=yes
14556 else
14557   echo "configure: failed program was:" >&5
14558   cat conftest.$ac_ext >&5
14559   rm -rf conftest*
14560   ol_cv_pthread_lib_lpthreads=no
14561 fi
14562 rm -f conftest*
14563 else
14564   cat > conftest.$ac_ext <<EOF
14565 #line 14566 "configure"
14566 #include "confdefs.h"
14567 /* pthread test headers */
14568 #include <pthread.h>
14569 #if HAVE_PTHREADS < 7
14570 #include <errno.h>
14571 #endif
14572 #ifndef NULL
14573 #define NULL (void*)0
14574 #endif
14575
14576 static void *task(p)
14577         void *p;
14578 {
14579         return (void *) (p == NULL);
14580 }
14581
14582
14583 int main(argc, argv)
14584         int argc;
14585         char **argv;
14586 {
14587
14588         /* pthread test function */
14589 #ifndef PTHREAD_CREATE_DETACHED
14590 #define PTHREAD_CREATE_DETACHED 1
14591 #endif
14592         pthread_t t;
14593         int status;
14594         int detach = PTHREAD_CREATE_DETACHED;
14595
14596 #if HAVE_PTHREADS > 4
14597         /* Final pthreads */
14598         pthread_attr_t attr;
14599
14600         status = pthread_attr_init(&attr);
14601         if( status ) return status;
14602
14603 #if HAVE_PTHREADS < 7
14604         status = pthread_attr_setdetachstate(&attr, &detach);
14605         if( status < 0 ) status = errno;
14606 #else
14607         status = pthread_attr_setdetachstate(&attr, detach);
14608 #endif
14609         if( status ) return status;
14610         status = pthread_create( &t, &attr, task, NULL );
14611 #if HAVE_PTHREADS < 7
14612         if( status < 0 ) status = errno;
14613 #endif
14614         if( status ) return status;
14615 #else
14616         /* Draft 4 pthreads */
14617         status = pthread_create( &t, pthread_attr_default, task, NULL );
14618         if( status ) return errno;
14619
14620         /* give thread a chance to complete */
14621         /* it should remain joinable and hence detachable */
14622         sleep( 1 );
14623
14624         status = pthread_detach( &t );
14625         if( status ) return errno;
14626 #endif
14627
14628 #ifdef HAVE_LINUX_THREADS
14629         pthread_kill_other_threads_np();
14630 #endif
14631
14632         return 0;
14633
14634 }
14635
14636 EOF
14637 if { (eval echo configure:14638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14638 then
14639   ol_cv_pthread_lib_lpthreads=yes
14640 else
14641   echo "configure: failed program was:" >&5
14642   cat conftest.$ac_ext >&5
14643   rm -fr conftest*
14644   ol_cv_pthread_lib_lpthreads=no
14645 fi
14646 rm -fr conftest*
14647 fi
14648
14649
14650                 # restore the LIBS
14651                 LIBS="$ol_LIBS"
14652         
14653 fi
14654
14655 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14656
14657         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14658                 ol_link_pthreads="-lpthreads"
14659                 ol_link_threads=posix
14660         fi
14661 fi
14662
14663
14664                 if test $ol_link_threads != no ; then
14665                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14666
14667                                                 save_CPPFLAGS="$CPPFLAGS"
14668                         save_LIBS="$LIBS"
14669                         LIBS="$LTHREAD_LIBS $LIBS"
14670
14671                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14672 do
14673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14674 echo "configure:14675: checking for $ac_func" >&5
14675 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14676   echo $ac_n "(cached) $ac_c" 1>&6
14677 else
14678   cat > conftest.$ac_ext <<EOF
14679 #line 14680 "configure"
14680 #include "confdefs.h"
14681 /* System header to define __stub macros and hopefully few prototypes,
14682     which can conflict with char $ac_func(); below.  */
14683 #include <assert.h>
14684 /* Override any gcc2 internal prototype to avoid an error.  */
14685 /* We use char because int might match the return type of a gcc2
14686     builtin and then its argument prototype would still apply.  */
14687 char $ac_func();
14688 char (*f)();
14689
14690 int main() {
14691
14692 /* The GNU C library defines this for functions which it implements
14693     to always fail with ENOSYS.  Some functions are actually named
14694     something starting with __ and the normal name is an alias.  */
14695 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14696 choke me
14697 #else
14698 f = $ac_func;
14699 #endif
14700
14701 ; return 0; }
14702 EOF
14703 if { (eval echo configure:14704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14704   rm -rf conftest*
14705   eval "ac_cv_func_$ac_func=yes"
14706 else
14707   echo "configure: failed program was:" >&5
14708   cat conftest.$ac_ext >&5
14709   rm -rf conftest*
14710   eval "ac_cv_func_$ac_func=no"
14711 fi
14712 rm -f conftest*
14713 fi
14714
14715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14716   echo "$ac_t""yes" 1>&6
14717     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14718   cat >> confdefs.h <<EOF
14719 #define $ac_tr_func 1
14720 EOF
14721  
14722 else
14723   echo "$ac_t""no" 1>&6
14724 fi
14725 done
14726
14727
14728                         if test $ac_cv_func_sched_yield = no -a \
14729                                 $ac_cv_func_pthread_yield = no -a \
14730                                 $ac_cv_func_thr_yield = no ; then
14731                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14732 echo "configure:14733: checking for sched_yield in -lrt" >&5
14733 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14734 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14735   echo $ac_n "(cached) $ac_c" 1>&6
14736 else
14737   ac_save_LIBS="$LIBS"
14738 LIBS="-lrt  $LIBS"
14739 cat > conftest.$ac_ext <<EOF
14740 #line 14741 "configure"
14741 #include "confdefs.h"
14742 /* Override any gcc2 internal prototype to avoid an error.  */
14743 /* We use char because int might match the return type of a gcc2
14744     builtin and then its argument prototype would still apply.  */
14745 char sched_yield();
14746
14747 int main() {
14748 sched_yield()
14749 ; return 0; }
14750 EOF
14751 if { (eval echo configure:14752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14752   rm -rf conftest*
14753   eval "ac_cv_lib_$ac_lib_var=yes"
14754 else
14755   echo "configure: failed program was:" >&5
14756   cat conftest.$ac_ext >&5
14757   rm -rf conftest*
14758   eval "ac_cv_lib_$ac_lib_var=no"
14759 fi
14760 rm -f conftest*
14761 LIBS="$ac_save_LIBS"
14762
14763 fi
14764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14765   echo "$ac_t""yes" 1>&6
14766   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14767                                         cat >> confdefs.h <<\EOF
14768 #define HAVE_SCHED_YIELD 1
14769 EOF
14770
14771                                         ac_cv_func_sched_yield=yes
14772 else
14773   echo "$ac_t""no" 1>&6
14774 ac_cv_func_sched_yield=no
14775 fi
14776
14777                         fi
14778                         if test $ac_cv_func_sched_yield = no -a \
14779                                 $ac_cv_func_pthread_yield = no -a \
14780                                 "$ac_cv_func_thr_yield" = no ; then
14781                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14782                         fi
14783
14784                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14785 do
14786 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14787 echo "configure:14788: checking for $ac_func" >&5
14788 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14789   echo $ac_n "(cached) $ac_c" 1>&6
14790 else
14791   cat > conftest.$ac_ext <<EOF
14792 #line 14793 "configure"
14793 #include "confdefs.h"
14794 /* System header to define __stub macros and hopefully few prototypes,
14795     which can conflict with char $ac_func(); below.  */
14796 #include <assert.h>
14797 /* Override any gcc2 internal prototype to avoid an error.  */
14798 /* We use char because int might match the return type of a gcc2
14799     builtin and then its argument prototype would still apply.  */
14800 char $ac_func();
14801 char (*f)();
14802
14803 int main() {
14804
14805 /* The GNU C library defines this for functions which it implements
14806     to always fail with ENOSYS.  Some functions are actually named
14807     something starting with __ and the normal name is an alias.  */
14808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14809 choke me
14810 #else
14811 f = $ac_func;
14812 #endif
14813
14814 ; return 0; }
14815 EOF
14816 if { (eval echo configure:14817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14817   rm -rf conftest*
14818   eval "ac_cv_func_$ac_func=yes"
14819 else
14820   echo "configure: failed program was:" >&5
14821   cat conftest.$ac_ext >&5
14822   rm -rf conftest*
14823   eval "ac_cv_func_$ac_func=no"
14824 fi
14825 rm -f conftest*
14826 fi
14827
14828 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14829   echo "$ac_t""yes" 1>&6
14830     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14831   cat >> confdefs.h <<EOF
14832 #define $ac_tr_func 1
14833 EOF
14834  
14835 else
14836   echo "$ac_t""no" 1>&6
14837 fi
14838 done
14839
14840
14841                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14842 echo "configure:14843: checking for pthread_detach with <pthread.h>" >&5
14843 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14844   echo $ac_n "(cached) $ac_c" 1>&6
14845 else
14846   
14847                                                                 cat > conftest.$ac_ext <<EOF
14848 #line 14849 "configure"
14849 #include "confdefs.h"
14850
14851 #include <pthread.h>
14852 #ifndef NULL
14853 #define NULL (void*)0
14854 #endif
14855
14856 int main() {
14857 pthread_detach(NULL);
14858 ; return 0; }
14859 EOF
14860 if { (eval echo configure:14861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14861   rm -rf conftest*
14862   ol_cv_func_pthread_detach=yes
14863 else
14864   echo "configure: failed program was:" >&5
14865   cat conftest.$ac_ext >&5
14866   rm -rf conftest*
14867   ol_cv_func_pthread_detach=no
14868 fi
14869 rm -f conftest*
14870                         
14871 fi
14872
14873 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14874
14875                         if test $ol_cv_func_pthread_detach = no ; then
14876                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14877                         fi
14878
14879                         cat >> confdefs.h <<\EOF
14880 #define HAVE_PTHREAD_DETACH 1
14881 EOF
14882
14883
14884                                                 for ac_func in \
14885                                 pthread_setconcurrency \
14886                                 pthread_getconcurrency \
14887                                 thr_setconcurrency \
14888                                 thr_getconcurrency \
14889                         
14890 do
14891 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14892 echo "configure:14893: checking for $ac_func" >&5
14893 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14894   echo $ac_n "(cached) $ac_c" 1>&6
14895 else
14896   cat > conftest.$ac_ext <<EOF
14897 #line 14898 "configure"
14898 #include "confdefs.h"
14899 /* System header to define __stub macros and hopefully few prototypes,
14900     which can conflict with char $ac_func(); below.  */
14901 #include <assert.h>
14902 /* Override any gcc2 internal prototype to avoid an error.  */
14903 /* We use char because int might match the return type of a gcc2
14904     builtin and then its argument prototype would still apply.  */
14905 char $ac_func();
14906 char (*f)();
14907
14908 int main() {
14909
14910 /* The GNU C library defines this for functions which it implements
14911     to always fail with ENOSYS.  Some functions are actually named
14912     something starting with __ and the normal name is an alias.  */
14913 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14914 choke me
14915 #else
14916 f = $ac_func;
14917 #endif
14918
14919 ; return 0; }
14920 EOF
14921 if { (eval echo configure:14922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14922   rm -rf conftest*
14923   eval "ac_cv_func_$ac_func=yes"
14924 else
14925   echo "configure: failed program was:" >&5
14926   cat conftest.$ac_ext >&5
14927   rm -rf conftest*
14928   eval "ac_cv_func_$ac_func=no"
14929 fi
14930 rm -f conftest*
14931 fi
14932
14933 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14934   echo "$ac_t""yes" 1>&6
14935     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14936   cat >> confdefs.h <<EOF
14937 #define $ac_tr_func 1
14938 EOF
14939  
14940 else
14941   echo "$ac_t""no" 1>&6
14942 fi
14943 done
14944
14945
14946                         
14947         for ac_func in pthread_kill_other_threads_np
14948 do
14949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14950 echo "configure:14951: checking for $ac_func" >&5
14951 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14952   echo $ac_n "(cached) $ac_c" 1>&6
14953 else
14954   cat > conftest.$ac_ext <<EOF
14955 #line 14956 "configure"
14956 #include "confdefs.h"
14957 /* System header to define __stub macros and hopefully few prototypes,
14958     which can conflict with char $ac_func(); below.  */
14959 #include <assert.h>
14960 /* Override any gcc2 internal prototype to avoid an error.  */
14961 /* We use char because int might match the return type of a gcc2
14962     builtin and then its argument prototype would still apply.  */
14963 char $ac_func();
14964 char (*f)();
14965
14966 int main() {
14967
14968 /* The GNU C library defines this for functions which it implements
14969     to always fail with ENOSYS.  Some functions are actually named
14970     something starting with __ and the normal name is an alias.  */
14971 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14972 choke me
14973 #else
14974 f = $ac_func;
14975 #endif
14976
14977 ; return 0; }
14978 EOF
14979 if { (eval echo configure:14980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14980   rm -rf conftest*
14981   eval "ac_cv_func_$ac_func=yes"
14982 else
14983   echo "configure: failed program was:" >&5
14984   cat conftest.$ac_ext >&5
14985   rm -rf conftest*
14986   eval "ac_cv_func_$ac_func=no"
14987 fi
14988 rm -f conftest*
14989 fi
14990
14991 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14992   echo "$ac_t""yes" 1>&6
14993     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14994   cat >> confdefs.h <<EOF
14995 #define $ac_tr_func 1
14996 EOF
14997  
14998 else
14999   echo "$ac_t""no" 1>&6
15000 fi
15001 done
15002
15003         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15004 echo "configure:15005: checking for LinuxThreads implementation" >&5
15005 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15006   echo $ac_n "(cached) $ac_c" 1>&6
15007 else
15008   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15009 fi
15010
15011 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15012
15013                         
15014         
15015         
15016         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15017 echo "configure:15018: checking for LinuxThreads consistency" >&5
15018 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15019   echo $ac_n "(cached) $ac_c" 1>&6
15020 else
15021   
15022                 if test $ol_cv_header_linux_threads = yes -a \
15023                         $ol_cv_sys_linux_threads = yes; then
15024                         ol_cv_linux_threads=yes
15025                 elif test $ol_cv_header_linux_threads = no -a \
15026                         $ol_cv_sys_linux_threads = no; then
15027                         ol_cv_linux_threads=no
15028                 else
15029                         ol_cv_linux_threads=error
15030                 fi
15031         
15032 fi
15033
15034 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15035
15036
15037                         if test $ol_cv_linux_threads = error; then
15038                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15039                         fi
15040
15041                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15042 echo "configure:15043: checking if pthread_create() works" >&5
15043 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15044   echo $ac_n "(cached) $ac_c" 1>&6
15045 else
15046   
15047                         if test "$cross_compiling" = yes; then
15048                                 ol_cv_pthread_create_works=yes
15049 else
15050   cat > conftest.$ac_ext <<EOF
15051 #line 15052 "configure"
15052 #include "confdefs.h"
15053 /* pthread test headers */
15054 #include <pthread.h>
15055 #if HAVE_PTHREADS < 7
15056 #include <errno.h>
15057 #endif
15058 #ifndef NULL
15059 #define NULL (void*)0
15060 #endif
15061
15062 static void *task(p)
15063         void *p;
15064 {
15065         return (void *) (p == NULL);
15066 }
15067
15068
15069 int main(argc, argv)
15070         int argc;
15071         char **argv;
15072 {
15073
15074         /* pthread test function */
15075 #ifndef PTHREAD_CREATE_DETACHED
15076 #define PTHREAD_CREATE_DETACHED 1
15077 #endif
15078         pthread_t t;
15079         int status;
15080         int detach = PTHREAD_CREATE_DETACHED;
15081
15082 #if HAVE_PTHREADS > 4
15083         /* Final pthreads */
15084         pthread_attr_t attr;
15085
15086         status = pthread_attr_init(&attr);
15087         if( status ) return status;
15088
15089 #if HAVE_PTHREADS < 7
15090         status = pthread_attr_setdetachstate(&attr, &detach);
15091         if( status < 0 ) status = errno;
15092 #else
15093         status = pthread_attr_setdetachstate(&attr, detach);
15094 #endif
15095         if( status ) return status;
15096         status = pthread_create( &t, &attr, task, NULL );
15097 #if HAVE_PTHREADS < 7
15098         if( status < 0 ) status = errno;
15099 #endif
15100         if( status ) return status;
15101 #else
15102         /* Draft 4 pthreads */
15103         status = pthread_create( &t, pthread_attr_default, task, NULL );
15104         if( status ) return errno;
15105
15106         /* give thread a chance to complete */
15107         /* it should remain joinable and hence detachable */
15108         sleep( 1 );
15109
15110         status = pthread_detach( &t );
15111         if( status ) return errno;
15112 #endif
15113
15114 #ifdef HAVE_LINUX_THREADS
15115         pthread_kill_other_threads_np();
15116 #endif
15117
15118         return 0;
15119
15120 }
15121
15122 EOF
15123 if { (eval echo configure:15124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15124 then
15125   ol_cv_pthread_create_works=yes
15126 else
15127   echo "configure: failed program was:" >&5
15128   cat conftest.$ac_ext >&5
15129   rm -fr conftest*
15130   ol_cv_pthread_create_works=no
15131 fi
15132 rm -fr conftest*
15133 fi
15134
15135 fi
15136
15137 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15138
15139                         if test $ol_cv_pthread_create_works = no ; then
15140                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15141                         fi
15142
15143                                                 if test $ol_with_yielding_select = auto ; then
15144                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15145 echo "configure:15146: checking if select yields when using pthreads" >&5
15146 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15147   echo $ac_n "(cached) $ac_c" 1>&6
15148 else
15149   
15150                                 if test "$cross_compiling" = yes; then
15151   ol_cv_pthread_select_yields=cross
15152 else
15153   cat > conftest.$ac_ext <<EOF
15154 #line 15155 "configure"
15155 #include "confdefs.h"
15156
15157 #include <sys/types.h>
15158 #include <sys/time.h>
15159 #include <unistd.h>
15160 #include <pthread.h>
15161 #ifndef NULL
15162 #define NULL (void*) 0
15163 #endif
15164
15165 static int fildes[2];
15166
15167 static void *task(p)
15168         void *p;
15169 {
15170         int i;
15171         struct timeval tv;
15172
15173         fd_set rfds;
15174
15175         tv.tv_sec=10;
15176         tv.tv_usec=0;
15177
15178         FD_ZERO(&rfds);
15179         FD_SET(fildes[0], &rfds);
15180
15181         /* we're not interested in any fds */
15182         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15183
15184         if(i < 0) {
15185                 perror("select");
15186                 exit(10);
15187         }
15188
15189         exit(0); /* if we exit here, the select blocked the whole process */
15190 }
15191
15192 int main(argc, argv)
15193         int argc;
15194         char **argv;
15195 {
15196         pthread_t t;
15197
15198         /* create a pipe to select */
15199         if(pipe(&fildes[0])) {
15200                 perror("select");
15201                 exit(1);
15202         }
15203
15204 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15205         (void) pthread_setconcurrency(2);
15206 #else
15207 #ifdef HAVE_THR_SETCONCURRENCY
15208         /* Set Solaris LWP concurrency to 2 */
15209         thr_setconcurrency(2);
15210 #endif
15211 #endif
15212
15213 #if HAVE_PTHREADS < 6
15214         pthread_create(&t, pthread_attr_default, task, NULL);
15215 #else
15216         pthread_create(&t, NULL, task, NULL);
15217 #endif
15218
15219         /* make sure task runs first */
15220 #if HAVE_THR_YIELD
15221         thr_yield();
15222 #elif defined( HAVE_SCHED_YIELD )
15223         sched_yield();
15224 #elif defined( HAVE_PTHREAD_YIELD )
15225         pthread_yield();
15226 #endif
15227
15228         exit(2);
15229 }
15230 EOF
15231 if { (eval echo configure:15232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15232 then
15233   ol_cv_pthread_select_yields=no
15234 else
15235   echo "configure: failed program was:" >&5
15236   cat conftest.$ac_ext >&5
15237   rm -fr conftest*
15238   ol_cv_pthread_select_yields=yes
15239 fi
15240 rm -fr conftest*
15241 fi
15242
15243 fi
15244
15245 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15246
15247                                 if test $ol_cv_pthread_select_yields = cross ; then
15248                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15249                                 fi
15250
15251                                 if test $ol_cv_pthread_select_yields = yes ; then
15252                                         ol_with_yielding_select=yes
15253                                 fi
15254                         fi
15255
15256                                                 CPPFLAGS="$save_CPPFLAGS"
15257                         LIBS="$save_LIBS"
15258                 else
15259                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15260                 fi
15261         fi
15262
15263         if test $ol_with_threads = posix ; then
15264                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15265         fi
15266 fi
15267
15268 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15269         -o $ol_with_threads = mach ; then
15270
15271                 for ac_hdr in mach/cthreads.h cthreads.h
15272 do
15273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15275 echo "configure:15276: checking for $ac_hdr" >&5
15276 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15277   echo $ac_n "(cached) $ac_c" 1>&6
15278 else
15279   cat > conftest.$ac_ext <<EOF
15280 #line 15281 "configure"
15281 #include "confdefs.h"
15282 #include <$ac_hdr>
15283 EOF
15284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15285 { (eval echo configure:15286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15287 if test -z "$ac_err"; then
15288   rm -rf conftest*
15289   eval "ac_cv_header_$ac_safe=yes"
15290 else
15291   echo "$ac_err" >&5
15292   echo "configure: failed program was:" >&5
15293   cat conftest.$ac_ext >&5
15294   rm -rf conftest*
15295   eval "ac_cv_header_$ac_safe=no"
15296 fi
15297 rm -f conftest*
15298 fi
15299 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15300   echo "$ac_t""yes" 1>&6
15301     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15302   cat >> confdefs.h <<EOF
15303 #define $ac_tr_hdr 1
15304 EOF
15305  
15306 else
15307   echo "$ac_t""no" 1>&6
15308 fi
15309 done
15310
15311         if test $ac_cv_header_mach_cthreads_h = yes ; then
15312                 ol_with_threads=found
15313
15314                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15315 echo "configure:15316: checking for cthread_fork" >&5
15316 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15317   echo $ac_n "(cached) $ac_c" 1>&6
15318 else
15319   cat > conftest.$ac_ext <<EOF
15320 #line 15321 "configure"
15321 #include "confdefs.h"
15322 /* System header to define __stub macros and hopefully few prototypes,
15323     which can conflict with char cthread_fork(); below.  */
15324 #include <assert.h>
15325 /* Override any gcc2 internal prototype to avoid an error.  */
15326 /* We use char because int might match the return type of a gcc2
15327     builtin and then its argument prototype would still apply.  */
15328 char cthread_fork();
15329 char (*f)();
15330
15331 int main() {
15332
15333 /* The GNU C library defines this for functions which it implements
15334     to always fail with ENOSYS.  Some functions are actually named
15335     something starting with __ and the normal name is an alias.  */
15336 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15337 choke me
15338 #else
15339 f = cthread_fork;
15340 #endif
15341
15342 ; return 0; }
15343 EOF
15344 if { (eval echo configure:15345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15345   rm -rf conftest*
15346   eval "ac_cv_func_cthread_fork=yes"
15347 else
15348   echo "configure: failed program was:" >&5
15349   cat conftest.$ac_ext >&5
15350   rm -rf conftest*
15351   eval "ac_cv_func_cthread_fork=no"
15352 fi
15353 rm -f conftest*
15354 fi
15355
15356 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15357   echo "$ac_t""yes" 1>&6
15358   ol_link_threads=yes
15359 else
15360   echo "$ac_t""no" 1>&6
15361 fi
15362
15363
15364                 if test $ol_link_threads = no ; then
15365                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15366 echo "configure:15367: checking for cthread_fork with -all_load" >&5
15367 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15368   echo $ac_n "(cached) $ac_c" 1>&6
15369 else
15370   
15371                                                                 save_LIBS="$LIBS"
15372                                 LIBS="-all_load $LIBS"
15373                                 cat > conftest.$ac_ext <<EOF
15374 #line 15375 "configure"
15375 #include "confdefs.h"
15376 #include <mach/cthreads.h>
15377 int main() {
15378
15379                                         cthread_fork((void *)0, (void *)0);
15380                                         
15381 ; return 0; }
15382 EOF
15383 if { (eval echo configure:15384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15384   rm -rf conftest*
15385   ol_cv_cthread_all_load=yes
15386 else
15387   echo "configure: failed program was:" >&5
15388   cat conftest.$ac_ext >&5
15389   rm -rf conftest*
15390   ol_cv_cthread_all_load=no
15391 fi
15392 rm -f conftest*
15393                                                                 LIBS="$save_LIBS"
15394                         
15395 fi
15396
15397 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15398
15399                         if test $ol_cv_cthread_all_load = yes ; then
15400                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15401                                 ol_link_threads=mach
15402                                 ol_with_threads=found
15403                         fi
15404                 fi
15405
15406         elif test $ac_cv_header_cthreads_h = yes ; then
15407                                 
15408                 ol_with_threads=found
15409  
15410                                 save_LIBS="$LIBS"
15411                 LIBS="$LIBS -lthreads"
15412                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15413 echo "configure:15414: checking for cthread_fork" >&5
15414 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15415   echo $ac_n "(cached) $ac_c" 1>&6
15416 else
15417   cat > conftest.$ac_ext <<EOF
15418 #line 15419 "configure"
15419 #include "confdefs.h"
15420 /* System header to define __stub macros and hopefully few prototypes,
15421     which can conflict with char cthread_fork(); below.  */
15422 #include <assert.h>
15423 /* Override any gcc2 internal prototype to avoid an error.  */
15424 /* We use char because int might match the return type of a gcc2
15425     builtin and then its argument prototype would still apply.  */
15426 char cthread_fork();
15427 char (*f)();
15428
15429 int main() {
15430
15431 /* The GNU C library defines this for functions which it implements
15432     to always fail with ENOSYS.  Some functions are actually named
15433     something starting with __ and the normal name is an alias.  */
15434 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15435 choke me
15436 #else
15437 f = cthread_fork;
15438 #endif
15439
15440 ; return 0; }
15441 EOF
15442 if { (eval echo configure:15443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15443   rm -rf conftest*
15444   eval "ac_cv_func_cthread_fork=yes"
15445 else
15446   echo "configure: failed program was:" >&5
15447   cat conftest.$ac_ext >&5
15448   rm -rf conftest*
15449   eval "ac_cv_func_cthread_fork=no"
15450 fi
15451 rm -f conftest*
15452 fi
15453
15454 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15455   echo "$ac_t""yes" 1>&6
15456   ol_link_threads=yes
15457 else
15458   echo "$ac_t""no" 1>&6
15459 fi
15460
15461                 LIBS="$save_LIBS"
15462
15463                 if test $ol_link_threads = yes ; then
15464                         LTHREAD_LIBS="-lthreads"
15465                         ol_link_threads=mach
15466                         ol_with_threads=found
15467                 else
15468                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15469                 fi
15470
15471         elif test $ol_with_threads = mach ; then
15472                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15473         fi
15474
15475         if test $ol_link_threads = mach ; then
15476                 cat >> confdefs.h <<\EOF
15477 #define HAVE_MACH_CTHREADS 1
15478 EOF
15479
15480         elif test $ol_with_threads = found ; then
15481                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15482         fi
15483 fi
15484
15485 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15486         -o $ol_with_threads = pth ; then
15487
15488         for ac_hdr in pth.h
15489 do
15490 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15491 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15492 echo "configure:15493: checking for $ac_hdr" >&5
15493 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15494   echo $ac_n "(cached) $ac_c" 1>&6
15495 else
15496   cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499 #include <$ac_hdr>
15500 EOF
15501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15502 { (eval echo configure:15503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15504 if test -z "$ac_err"; then
15505   rm -rf conftest*
15506   eval "ac_cv_header_$ac_safe=yes"
15507 else
15508   echo "$ac_err" >&5
15509   echo "configure: failed program was:" >&5
15510   cat conftest.$ac_ext >&5
15511   rm -rf conftest*
15512   eval "ac_cv_header_$ac_safe=no"
15513 fi
15514 rm -f conftest*
15515 fi
15516 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15517   echo "$ac_t""yes" 1>&6
15518     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15519   cat >> confdefs.h <<EOF
15520 #define $ac_tr_hdr 1
15521 EOF
15522  
15523 else
15524   echo "$ac_t""no" 1>&6
15525 fi
15526 done
15527
15528
15529         if test $ac_cv_header_pth_h = yes ; then
15530                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15531 echo "configure:15532: checking for pth_version in -lpth" >&5
15532 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15533 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15534   echo $ac_n "(cached) $ac_c" 1>&6
15535 else
15536   ac_save_LIBS="$LIBS"
15537 LIBS="-lpth  $LIBS"
15538 cat > conftest.$ac_ext <<EOF
15539 #line 15540 "configure"
15540 #include "confdefs.h"
15541 /* Override any gcc2 internal prototype to avoid an error.  */
15542 /* We use char because int might match the return type of a gcc2
15543     builtin and then its argument prototype would still apply.  */
15544 char pth_version();
15545
15546 int main() {
15547 pth_version()
15548 ; return 0; }
15549 EOF
15550 if { (eval echo configure:15551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15551   rm -rf conftest*
15552   eval "ac_cv_lib_$ac_lib_var=yes"
15553 else
15554   echo "configure: failed program was:" >&5
15555   cat conftest.$ac_ext >&5
15556   rm -rf conftest*
15557   eval "ac_cv_lib_$ac_lib_var=no"
15558 fi
15559 rm -f conftest*
15560 LIBS="$ac_save_LIBS"
15561
15562 fi
15563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15564   echo "$ac_t""yes" 1>&6
15565   have_pth=yes
15566 else
15567   echo "$ac_t""no" 1>&6
15568 have_pth=no
15569 fi
15570
15571
15572                 if test $have_pth = yes ; then
15573                         cat >> confdefs.h <<\EOF
15574 #define HAVE_GNU_PTH 1
15575 EOF
15576
15577                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15578                         ol_link_threads=pth
15579                         ol_with_threads=found
15580
15581                         if test $ol_with_yielding_select = auto ; then
15582                                 ol_with_yielding_select=yes
15583                         fi
15584                 fi
15585         fi
15586 fi
15587
15588 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15589         -o $ol_with_threads = lwp ; then
15590
15591                 for ac_hdr in thread.h synch.h
15592 do
15593 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15594 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15595 echo "configure:15596: checking for $ac_hdr" >&5
15596 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15597   echo $ac_n "(cached) $ac_c" 1>&6
15598 else
15599   cat > conftest.$ac_ext <<EOF
15600 #line 15601 "configure"
15601 #include "confdefs.h"
15602 #include <$ac_hdr>
15603 EOF
15604 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15605 { (eval echo configure:15606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15606 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15607 if test -z "$ac_err"; then
15608   rm -rf conftest*
15609   eval "ac_cv_header_$ac_safe=yes"
15610 else
15611   echo "$ac_err" >&5
15612   echo "configure: failed program was:" >&5
15613   cat conftest.$ac_ext >&5
15614   rm -rf conftest*
15615   eval "ac_cv_header_$ac_safe=no"
15616 fi
15617 rm -f conftest*
15618 fi
15619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15620   echo "$ac_t""yes" 1>&6
15621     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15622   cat >> confdefs.h <<EOF
15623 #define $ac_tr_hdr 1
15624 EOF
15625  
15626 else
15627   echo "$ac_t""no" 1>&6
15628 fi
15629 done
15630
15631         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15632                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15633 echo "configure:15634: checking for thr_create in -lthread" >&5
15634 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15636   echo $ac_n "(cached) $ac_c" 1>&6
15637 else
15638   ac_save_LIBS="$LIBS"
15639 LIBS="-lthread  $LIBS"
15640 cat > conftest.$ac_ext <<EOF
15641 #line 15642 "configure"
15642 #include "confdefs.h"
15643 /* Override any gcc2 internal prototype to avoid an error.  */
15644 /* We use char because int might match the return type of a gcc2
15645     builtin and then its argument prototype would still apply.  */
15646 char thr_create();
15647
15648 int main() {
15649 thr_create()
15650 ; return 0; }
15651 EOF
15652 if { (eval echo configure:15653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15653   rm -rf conftest*
15654   eval "ac_cv_lib_$ac_lib_var=yes"
15655 else
15656   echo "configure: failed program was:" >&5
15657   cat conftest.$ac_ext >&5
15658   rm -rf conftest*
15659   eval "ac_cv_lib_$ac_lib_var=no"
15660 fi
15661 rm -f conftest*
15662 LIBS="$ac_save_LIBS"
15663
15664 fi
15665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15666   echo "$ac_t""yes" 1>&6
15667   have_thr=yes
15668 else
15669   echo "$ac_t""no" 1>&6
15670 have_thr=no
15671 fi
15672
15673
15674                 if test $have_thr = yes ; then
15675                         cat >> confdefs.h <<\EOF
15676 #define HAVE_THR 1
15677 EOF
15678
15679                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15680                         ol_link_threads=thr
15681
15682                         if test $ol_with_yielding_select = auto ; then
15683                                 ol_with_yielding_select=yes
15684                         fi
15685
15686                                                 for ac_func in \
15687                                 thr_setconcurrency \
15688                                 thr_getconcurrency \
15689                         
15690 do
15691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15692 echo "configure:15693: checking for $ac_func" >&5
15693 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15694   echo $ac_n "(cached) $ac_c" 1>&6
15695 else
15696   cat > conftest.$ac_ext <<EOF
15697 #line 15698 "configure"
15698 #include "confdefs.h"
15699 /* System header to define __stub macros and hopefully few prototypes,
15700     which can conflict with char $ac_func(); below.  */
15701 #include <assert.h>
15702 /* Override any gcc2 internal prototype to avoid an error.  */
15703 /* We use char because int might match the return type of a gcc2
15704     builtin and then its argument prototype would still apply.  */
15705 char $ac_func();
15706 char (*f)();
15707
15708 int main() {
15709
15710 /* The GNU C library defines this for functions which it implements
15711     to always fail with ENOSYS.  Some functions are actually named
15712     something starting with __ and the normal name is an alias.  */
15713 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15714 choke me
15715 #else
15716 f = $ac_func;
15717 #endif
15718
15719 ; return 0; }
15720 EOF
15721 if { (eval echo configure:15722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15722   rm -rf conftest*
15723   eval "ac_cv_func_$ac_func=yes"
15724 else
15725   echo "configure: failed program was:" >&5
15726   cat conftest.$ac_ext >&5
15727   rm -rf conftest*
15728   eval "ac_cv_func_$ac_func=no"
15729 fi
15730 rm -f conftest*
15731 fi
15732
15733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15734   echo "$ac_t""yes" 1>&6
15735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15736   cat >> confdefs.h <<EOF
15737 #define $ac_tr_func 1
15738 EOF
15739  
15740 else
15741   echo "$ac_t""no" 1>&6
15742 fi
15743 done
15744
15745                 fi
15746         fi
15747
15748                 for ac_hdr in lwp/lwp.h
15749 do
15750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15752 echo "configure:15753: checking for $ac_hdr" >&5
15753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15754   echo $ac_n "(cached) $ac_c" 1>&6
15755 else
15756   cat > conftest.$ac_ext <<EOF
15757 #line 15758 "configure"
15758 #include "confdefs.h"
15759 #include <$ac_hdr>
15760 EOF
15761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15762 { (eval echo configure:15763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15764 if test -z "$ac_err"; then
15765   rm -rf conftest*
15766   eval "ac_cv_header_$ac_safe=yes"
15767 else
15768   echo "$ac_err" >&5
15769   echo "configure: failed program was:" >&5
15770   cat conftest.$ac_ext >&5
15771   rm -rf conftest*
15772   eval "ac_cv_header_$ac_safe=no"
15773 fi
15774 rm -f conftest*
15775 fi
15776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15777   echo "$ac_t""yes" 1>&6
15778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15779   cat >> confdefs.h <<EOF
15780 #define $ac_tr_hdr 1
15781 EOF
15782  
15783 else
15784   echo "$ac_t""no" 1>&6
15785 fi
15786 done
15787
15788         if test $ac_cv_header_lwp_lwp_h = yes ; then
15789                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15790 echo "configure:15791: checking for lwp_create in -llwp" >&5
15791 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15793   echo $ac_n "(cached) $ac_c" 1>&6
15794 else
15795   ac_save_LIBS="$LIBS"
15796 LIBS="-llwp  $LIBS"
15797 cat > conftest.$ac_ext <<EOF
15798 #line 15799 "configure"
15799 #include "confdefs.h"
15800 /* Override any gcc2 internal prototype to avoid an error.  */
15801 /* We use char because int might match the return type of a gcc2
15802     builtin and then its argument prototype would still apply.  */
15803 char lwp_create();
15804
15805 int main() {
15806 lwp_create()
15807 ; return 0; }
15808 EOF
15809 if { (eval echo configure:15810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15810   rm -rf conftest*
15811   eval "ac_cv_lib_$ac_lib_var=yes"
15812 else
15813   echo "configure: failed program was:" >&5
15814   cat conftest.$ac_ext >&5
15815   rm -rf conftest*
15816   eval "ac_cv_lib_$ac_lib_var=no"
15817 fi
15818 rm -f conftest*
15819 LIBS="$ac_save_LIBS"
15820
15821 fi
15822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15823   echo "$ac_t""yes" 1>&6
15824   have_lwp=yes
15825 else
15826   echo "$ac_t""no" 1>&6
15827 have_lwp=no
15828 fi
15829
15830
15831                 if test $have_lwp = yes ; then
15832                         cat >> confdefs.h <<\EOF
15833 #define HAVE_LWP 1
15834 EOF
15835
15836                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15837                         ol_link_threads=lwp
15838
15839                         if test $ol_with_yielding_select = auto ; then
15840                                 ol_with_yielding_select=no
15841                         fi
15842                 fi
15843         fi
15844 fi
15845
15846 if test $ol_with_yielding_select = yes ; then
15847         cat >> confdefs.h <<\EOF
15848 #define HAVE_YIELDING_SELECT 1
15849 EOF
15850
15851 fi
15852
15853 if test $ol_with_threads = manual ; then
15854                 ol_link_threads=yes
15855
15856         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15857
15858         for ac_hdr in pthread.h sched.h
15859 do
15860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15862 echo "configure:15863: checking for $ac_hdr" >&5
15863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15864   echo $ac_n "(cached) $ac_c" 1>&6
15865 else
15866   cat > conftest.$ac_ext <<EOF
15867 #line 15868 "configure"
15868 #include "confdefs.h"
15869 #include <$ac_hdr>
15870 EOF
15871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15872 { (eval echo configure:15873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15874 if test -z "$ac_err"; then
15875   rm -rf conftest*
15876   eval "ac_cv_header_$ac_safe=yes"
15877 else
15878   echo "$ac_err" >&5
15879   echo "configure: failed program was:" >&5
15880   cat conftest.$ac_ext >&5
15881   rm -rf conftest*
15882   eval "ac_cv_header_$ac_safe=no"
15883 fi
15884 rm -f conftest*
15885 fi
15886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15887   echo "$ac_t""yes" 1>&6
15888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15889   cat >> confdefs.h <<EOF
15890 #define $ac_tr_hdr 1
15891 EOF
15892  
15893 else
15894   echo "$ac_t""no" 1>&6
15895 fi
15896 done
15897
15898         for ac_func in sched_yield pthread_yield
15899 do
15900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15901 echo "configure:15902: checking for $ac_func" >&5
15902 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15903   echo $ac_n "(cached) $ac_c" 1>&6
15904 else
15905   cat > conftest.$ac_ext <<EOF
15906 #line 15907 "configure"
15907 #include "confdefs.h"
15908 /* System header to define __stub macros and hopefully few prototypes,
15909     which can conflict with char $ac_func(); below.  */
15910 #include <assert.h>
15911 /* Override any gcc2 internal prototype to avoid an error.  */
15912 /* We use char because int might match the return type of a gcc2
15913     builtin and then its argument prototype would still apply.  */
15914 char $ac_func();
15915 char (*f)();
15916
15917 int main() {
15918
15919 /* The GNU C library defines this for functions which it implements
15920     to always fail with ENOSYS.  Some functions are actually named
15921     something starting with __ and the normal name is an alias.  */
15922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15923 choke me
15924 #else
15925 f = $ac_func;
15926 #endif
15927
15928 ; return 0; }
15929 EOF
15930 if { (eval echo configure:15931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15931   rm -rf conftest*
15932   eval "ac_cv_func_$ac_func=yes"
15933 else
15934   echo "configure: failed program was:" >&5
15935   cat conftest.$ac_ext >&5
15936   rm -rf conftest*
15937   eval "ac_cv_func_$ac_func=no"
15938 fi
15939 rm -f conftest*
15940 fi
15941
15942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15943   echo "$ac_t""yes" 1>&6
15944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15945   cat >> confdefs.h <<EOF
15946 #define $ac_tr_func 1
15947 EOF
15948  
15949 else
15950   echo "$ac_t""no" 1>&6
15951 fi
15952 done
15953
15954         
15955         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15956 echo "configure:15957: checking for LinuxThreads pthread.h" >&5
15957 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15958   echo $ac_n "(cached) $ac_c" 1>&6
15959 else
15960   cat > conftest.$ac_ext <<EOF
15961 #line 15962 "configure"
15962 #include "confdefs.h"
15963 #include <pthread.h>
15964 EOF
15965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15966   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15967   rm -rf conftest*
15968   ol_cv_header_linux_threads=yes
15969 else
15970   rm -rf conftest*
15971   ol_cv_header_linux_threads=no
15972 fi
15973 rm -f conftest*
15974
15975                 
15976 fi
15977
15978 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15979         if test $ol_cv_header_linux_threads = yes; then
15980                 cat >> confdefs.h <<\EOF
15981 #define HAVE_LINUX_THREADS 1
15982 EOF
15983
15984         fi
15985
15986
15987         for ac_hdr in mach/cthreads.h
15988 do
15989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15991 echo "configure:15992: checking for $ac_hdr" >&5
15992 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15993   echo $ac_n "(cached) $ac_c" 1>&6
15994 else
15995   cat > conftest.$ac_ext <<EOF
15996 #line 15997 "configure"
15997 #include "confdefs.h"
15998 #include <$ac_hdr>
15999 EOF
16000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16001 { (eval echo configure:16002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16003 if test -z "$ac_err"; then
16004   rm -rf conftest*
16005   eval "ac_cv_header_$ac_safe=yes"
16006 else
16007   echo "$ac_err" >&5
16008   echo "configure: failed program was:" >&5
16009   cat conftest.$ac_ext >&5
16010   rm -rf conftest*
16011   eval "ac_cv_header_$ac_safe=no"
16012 fi
16013 rm -f conftest*
16014 fi
16015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16016   echo "$ac_t""yes" 1>&6
16017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16018   cat >> confdefs.h <<EOF
16019 #define $ac_tr_hdr 1
16020 EOF
16021  
16022 else
16023   echo "$ac_t""no" 1>&6
16024 fi
16025 done
16026
16027         for ac_hdr in lwp/lwp.h
16028 do
16029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16031 echo "configure:16032: checking for $ac_hdr" >&5
16032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16033   echo $ac_n "(cached) $ac_c" 1>&6
16034 else
16035   cat > conftest.$ac_ext <<EOF
16036 #line 16037 "configure"
16037 #include "confdefs.h"
16038 #include <$ac_hdr>
16039 EOF
16040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16041 { (eval echo configure:16042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16043 if test -z "$ac_err"; then
16044   rm -rf conftest*
16045   eval "ac_cv_header_$ac_safe=yes"
16046 else
16047   echo "$ac_err" >&5
16048   echo "configure: failed program was:" >&5
16049   cat conftest.$ac_ext >&5
16050   rm -rf conftest*
16051   eval "ac_cv_header_$ac_safe=no"
16052 fi
16053 rm -f conftest*
16054 fi
16055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16056   echo "$ac_t""yes" 1>&6
16057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16058   cat >> confdefs.h <<EOF
16059 #define $ac_tr_hdr 1
16060 EOF
16061  
16062 else
16063   echo "$ac_t""no" 1>&6
16064 fi
16065 done
16066
16067         for ac_hdr in thread.h synch.h
16068 do
16069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16071 echo "configure:16072: checking for $ac_hdr" >&5
16072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16073   echo $ac_n "(cached) $ac_c" 1>&6
16074 else
16075   cat > conftest.$ac_ext <<EOF
16076 #line 16077 "configure"
16077 #include "confdefs.h"
16078 #include <$ac_hdr>
16079 EOF
16080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16081 { (eval echo configure:16082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16083 if test -z "$ac_err"; then
16084   rm -rf conftest*
16085   eval "ac_cv_header_$ac_safe=yes"
16086 else
16087   echo "$ac_err" >&5
16088   echo "configure: failed program was:" >&5
16089   cat conftest.$ac_ext >&5
16090   rm -rf conftest*
16091   eval "ac_cv_header_$ac_safe=no"
16092 fi
16093 rm -f conftest*
16094 fi
16095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16096   echo "$ac_t""yes" 1>&6
16097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16098   cat >> confdefs.h <<EOF
16099 #define $ac_tr_hdr 1
16100 EOF
16101  
16102 else
16103   echo "$ac_t""no" 1>&6
16104 fi
16105 done
16106
16107 fi
16108
16109 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16110                         cat >> confdefs.h <<\EOF
16111 #define REENTRANT 1
16112 EOF
16113
16114         cat >> confdefs.h <<\EOF
16115 #define _REENTRANT 1
16116 EOF
16117
16118         cat >> confdefs.h <<\EOF
16119 #define THREAD_SAFE 1
16120 EOF
16121
16122         cat >> confdefs.h <<\EOF
16123 #define _THREAD_SAFE 1
16124 EOF
16125
16126         cat >> confdefs.h <<\EOF
16127 #define THREADSAFE 1
16128 EOF
16129
16130         cat >> confdefs.h <<\EOF
16131 #define _THREADSAFE 1
16132 EOF
16133
16134         cat >> confdefs.h <<\EOF
16135 #define _SGI_MP_SOURCE 1
16136 EOF
16137
16138
16139                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16140 echo "configure:16141: checking for thread specific errno" >&5
16141 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16142   echo $ac_n "(cached) $ac_c" 1>&6
16143 else
16144   
16145                 cat > conftest.$ac_ext <<EOF
16146 #line 16147 "configure"
16147 #include "confdefs.h"
16148 #include <errno.h>
16149 int main() {
16150 errno = 0;
16151 ; return 0; }
16152 EOF
16153 if { (eval echo configure:16154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16154   rm -rf conftest*
16155   ol_cv_errno_thread_specific=yes
16156 else
16157   echo "configure: failed program was:" >&5
16158   cat conftest.$ac_ext >&5
16159   rm -rf conftest*
16160   ol_cv_errno_thread_specific=no
16161 fi
16162 rm -f conftest*
16163         
16164 fi
16165
16166 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16167
16168                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16169 echo "configure:16170: checking for thread specific h_errno" >&5
16170 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16171   echo $ac_n "(cached) $ac_c" 1>&6
16172 else
16173   
16174                 cat > conftest.$ac_ext <<EOF
16175 #line 16176 "configure"
16176 #include "confdefs.h"
16177 #include <netdb.h>
16178 int main() {
16179 h_errno = 0;
16180 ; return 0; }
16181 EOF
16182 if { (eval echo configure:16183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16183   rm -rf conftest*
16184   ol_cv_h_errno_thread_specific=yes
16185 else
16186   echo "configure: failed program was:" >&5
16187   cat conftest.$ac_ext >&5
16188   rm -rf conftest*
16189   ol_cv_h_errno_thread_specific=no
16190 fi
16191 rm -f conftest*
16192         
16193 fi
16194
16195 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16196
16197         if test $ol_cv_errno_thread_specific != yes \
16198                 -o $ol_cv_h_errno_thread_specific != yes ; then
16199                 LIBS="$LTHREAD_LIBS $LIBS"
16200                 LTHREAD_LIBS=""
16201         fi
16202
16203 fi  
16204
16205 if test $ol_link_threads = no ; then
16206         if test $ol_with_threads = yes ; then
16207                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16208         fi
16209
16210         if test $ol_with_threads = auto ; then
16211                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16212                 ol_with_threads=no
16213         fi
16214
16215         cat >> confdefs.h <<\EOF
16216 #define NO_THREADS 1
16217 EOF
16218
16219         LTHREAD_LIBS=""
16220 fi
16221
16222 if test $ol_link_threads != no ; then
16223         cat >> confdefs.h <<\EOF
16224 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16225 EOF
16226
16227 fi
16228
16229 for ac_func in \
16230         ctime_r                 \
16231         gethostbyname_r gethostbyaddr_r \
16232
16233 do
16234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16235 echo "configure:16236: checking for $ac_func" >&5
16236 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16237   echo $ac_n "(cached) $ac_c" 1>&6
16238 else
16239   cat > conftest.$ac_ext <<EOF
16240 #line 16241 "configure"
16241 #include "confdefs.h"
16242 /* System header to define __stub macros and hopefully few prototypes,
16243     which can conflict with char $ac_func(); below.  */
16244 #include <assert.h>
16245 /* Override any gcc2 internal prototype to avoid an error.  */
16246 /* We use char because int might match the return type of a gcc2
16247     builtin and then its argument prototype would still apply.  */
16248 char $ac_func();
16249 char (*f)();
16250
16251 int main() {
16252
16253 /* The GNU C library defines this for functions which it implements
16254     to always fail with ENOSYS.  Some functions are actually named
16255     something starting with __ and the normal name is an alias.  */
16256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16257 choke me
16258 #else
16259 f = $ac_func;
16260 #endif
16261
16262 ; return 0; }
16263 EOF
16264 if { (eval echo configure:16265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16265   rm -rf conftest*
16266   eval "ac_cv_func_$ac_func=yes"
16267 else
16268   echo "configure: failed program was:" >&5
16269   cat conftest.$ac_ext >&5
16270   rm -rf conftest*
16271   eval "ac_cv_func_$ac_func=no"
16272 fi
16273 rm -f conftest*
16274 fi
16275
16276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16277   echo "$ac_t""yes" 1>&6
16278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16279   cat >> confdefs.h <<EOF
16280 #define $ac_tr_func 1
16281 EOF
16282  
16283 else
16284   echo "$ac_t""no" 1>&6
16285 fi
16286 done
16287
16288
16289 if test "$ac_cv_func_ctime_r" = no ; then
16290         ol_cv_func_ctime_r_nargs=0
16291 else
16292         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16293 echo "configure:16294: checking number of arguments of ctime_r" >&5
16294 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16295   echo $ac_n "(cached) $ac_c" 1>&6
16296 else
16297   cat > conftest.$ac_ext <<EOF
16298 #line 16299 "configure"
16299 #include "confdefs.h"
16300 #include <time.h>
16301 int main() {
16302 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16303 ; return 0; }
16304 EOF
16305 if { (eval echo configure:16306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16306   rm -rf conftest*
16307   ol_cv_func_ctime_r_nargs3=yes
16308 else
16309   echo "configure: failed program was:" >&5
16310   cat conftest.$ac_ext >&5
16311   rm -rf conftest*
16312   ol_cv_func_ctime_r_nargs3=no
16313 fi
16314 rm -f conftest*
16315
16316         cat > conftest.$ac_ext <<EOF
16317 #line 16318 "configure"
16318 #include "confdefs.h"
16319 #include <time.h>
16320 int main() {
16321 time_t ti; char *buffer; ctime_r(&ti,buffer);
16322 ; return 0; }
16323 EOF
16324 if { (eval echo configure:16325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16325   rm -rf conftest*
16326   ol_cv_func_ctime_r_nargs2=yes
16327 else
16328   echo "configure: failed program was:" >&5
16329   cat conftest.$ac_ext >&5
16330   rm -rf conftest*
16331   ol_cv_func_ctime_r_nargs2=no
16332 fi
16333 rm -f conftest*
16334
16335         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16336                 $ol_cv_func_ctime_r_nargs2 = no ; then
16337
16338                 ol_cv_func_ctime_r_nargs=3
16339
16340         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16341                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16342
16343                 ol_cv_func_ctime_r_nargs=2
16344
16345         else
16346                 ol_cv_func_ctime_r_nargs=0
16347         fi
16348   
16349 fi
16350
16351 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16352
16353   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16354         cat >> confdefs.h <<EOF
16355 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16356 EOF
16357
16358   fi
16359
16360 fi
16361
16362 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16363         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16364 echo "configure:16365: checking number of arguments of gethostbyname_r" >&5
16365 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16366   echo $ac_n "(cached) $ac_c" 1>&6
16367 else
16368   cat > conftest.$ac_ext <<EOF
16369 #line 16370 "configure"
16370 #include "confdefs.h"
16371 #include <sys/types.h>
16372 #include <sys/socket.h>
16373 #include <netinet/in.h>
16374 #include <netdb.h>
16375 #define BUFSIZE (sizeof(struct hostent)+10)
16376 int main() {
16377 struct hostent hent; char buffer[BUFSIZE];
16378                 int bufsize=BUFSIZE;int h_errno;
16379                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16380                         buffer, bufsize, &h_errno);
16381 ; return 0; }
16382 EOF
16383 if { (eval echo configure:16384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16384   rm -rf conftest*
16385   ol_cv_func_gethostbyname_r_nargs5=yes
16386 else
16387   echo "configure: failed program was:" >&5
16388   cat conftest.$ac_ext >&5
16389   rm -rf conftest*
16390   ol_cv_func_gethostbyname_r_nargs5=no
16391 fi
16392 rm -f conftest*
16393
16394         cat > conftest.$ac_ext <<EOF
16395 #line 16396 "configure"
16396 #include "confdefs.h"
16397 #include <sys/types.h>
16398 #include <sys/socket.h>
16399 #include <netinet/in.h>
16400 #include <netdb.h>
16401 #define BUFSIZE (sizeof(struct hostent)+10)
16402 int main() {
16403 struct hostent hent;struct hostent *rhent;
16404                 char buffer[BUFSIZE];
16405                 int bufsize=BUFSIZE;int h_errno;
16406                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16407                         &rhent, &h_errno);
16408 ; return 0; }
16409 EOF
16410 if { (eval echo configure:16411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16411   rm -rf conftest*
16412   ol_cv_func_gethostbyname_r_nargs6=yes
16413 else
16414   echo "configure: failed program was:" >&5
16415   cat conftest.$ac_ext >&5
16416   rm -rf conftest*
16417   ol_cv_func_gethostbyname_r_nargs6=no
16418 fi
16419 rm -f conftest*
16420
16421         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16422                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16423
16424                 ol_cv_func_gethostbyname_r_nargs=5
16425
16426         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16427                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16428
16429                 ol_cv_func_gethostbyname_r_nargs=6
16430
16431         else
16432                 ol_cv_func_gethostbyname_r_nargs=0
16433         fi
16434   
16435 fi
16436
16437 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16438   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16439         cat >> confdefs.h <<EOF
16440 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16441 EOF
16442
16443   fi
16444
16445 else
16446         ol_cv_func_gethostbyname_r_nargs=0
16447 fi
16448  
16449 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16450         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16451 echo "configure:16452: checking number of arguments of gethostbyaddr_r" >&5
16452 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16453   echo $ac_n "(cached) $ac_c" 1>&6
16454 else
16455   cat > conftest.$ac_ext <<EOF
16456 #line 16457 "configure"
16457 #include "confdefs.h"
16458 #include <sys/types.h>
16459 #include <sys/socket.h>
16460 #include <netinet/in.h>
16461 #include <netdb.h>
16462 #define BUFSIZE (sizeof(struct hostent)+10)
16463 int main() {
16464 struct hostent hent; char buffer[BUFSIZE]; 
16465             struct in_addr add;
16466             size_t alen=sizeof(struct in_addr);
16467             int bufsize=BUFSIZE;int h_errno;
16468                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16469                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16470 ; return 0; }
16471 EOF
16472 if { (eval echo configure:16473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16473   rm -rf conftest*
16474   ol_cv_func_gethostbyaddr_r_nargs7=yes
16475 else
16476   echo "configure: failed program was:" >&5
16477   cat conftest.$ac_ext >&5
16478   rm -rf conftest*
16479   ol_cv_func_gethostbyaddr_r_nargs7=no
16480 fi
16481 rm -f conftest*
16482
16483         cat > conftest.$ac_ext <<EOF
16484 #line 16485 "configure"
16485 #include "confdefs.h"
16486 #include <sys/types.h>
16487 #include <sys/socket.h>
16488 #include <netinet/in.h>
16489 #include <netdb.h>
16490 #define BUFSIZE (sizeof(struct hostent)+10)
16491 int main() {
16492 struct hostent hent;
16493                 struct hostent *rhent; char buffer[BUFSIZE]; 
16494                 struct in_addr add;
16495                 size_t alen=sizeof(struct in_addr);
16496                 int bufsize=BUFSIZE;int h_errno;
16497                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16498                         alen, AF_INET, &hent, buffer, bufsize, 
16499                         &rhent, &h_errno);
16500 ; return 0; }
16501 EOF
16502 if { (eval echo configure:16503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16503   rm -rf conftest*
16504   ol_cv_func_gethostbyaddr_r_nargs8=yes
16505 else
16506   echo "configure: failed program was:" >&5
16507   cat conftest.$ac_ext >&5
16508   rm -rf conftest*
16509   ol_cv_func_gethostbyaddr_r_nargs8=no
16510 fi
16511 rm -f conftest*
16512
16513         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16514                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16515
16516                 ol_cv_func_gethostbyaddr_r_nargs=7
16517
16518         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16519                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16520
16521                 ol_cv_func_gethostbyaddr_r_nargs=8
16522
16523         else
16524                 ol_cv_func_gethostbyaddr_r_nargs=0
16525         fi
16526   
16527 fi
16528
16529 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16530   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16531     cat >> confdefs.h <<EOF
16532 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16533 EOF
16534
16535   fi
16536
16537 else
16538         ol_cv_func_gethostbyaddr_r_nargs=0
16539 fi
16540
16541 ol_link_ldbm=no 
16542
16543 if test $ol_with_ldbm_api = auto \
16544         -o $ol_with_ldbm_api = berkeley \
16545         -o $ol_with_ldbm_api = bcompat ; then
16546
16547         if test $ol_with_ldbm_api = bcompat; then \
16548                 for ac_hdr in db_185.h db.h
16549 do
16550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16552 echo "configure:16553: checking for $ac_hdr" >&5
16553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16554   echo $ac_n "(cached) $ac_c" 1>&6
16555 else
16556   cat > conftest.$ac_ext <<EOF
16557 #line 16558 "configure"
16558 #include "confdefs.h"
16559 #include <$ac_hdr>
16560 EOF
16561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16562 { (eval echo configure:16563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16564 if test -z "$ac_err"; then
16565   rm -rf conftest*
16566   eval "ac_cv_header_$ac_safe=yes"
16567 else
16568   echo "$ac_err" >&5
16569   echo "configure: failed program was:" >&5
16570   cat conftest.$ac_ext >&5
16571   rm -rf conftest*
16572   eval "ac_cv_header_$ac_safe=no"
16573 fi
16574 rm -f conftest*
16575 fi
16576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16577   echo "$ac_t""yes" 1>&6
16578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16579   cat >> confdefs.h <<EOF
16580 #define $ac_tr_hdr 1
16581 EOF
16582  
16583 else
16584   echo "$ac_t""no" 1>&6
16585 fi
16586 done
16587
16588 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16589         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16590 echo "configure:16591: checking if Berkeley DB header compatibility" >&5
16591 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16592   echo $ac_n "(cached) $ac_c" 1>&6
16593 else
16594   
16595                 cat > conftest.$ac_ext <<EOF
16596 #line 16597 "configure"
16597 #include "confdefs.h"
16598
16599 #if HAVE_DB_185_H
16600 #       include <db_185.h>
16601 #else
16602 #       include <db.h>
16603 #endif
16604
16605  /* this check could be improved */
16606 #ifndef DB_VERSION_MAJOR
16607 #       define DB_VERSION_MAJOR 1
16608 #endif
16609
16610 #if DB_VERSION_MAJOR == 1 
16611         __db_version_1
16612 #endif
16613
16614 EOF
16615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16616   egrep "__db_version_1" >/dev/null 2>&1; then
16617   rm -rf conftest*
16618   ol_cv_header_db1=yes
16619 else
16620   rm -rf conftest*
16621   ol_cv_header_db1=no
16622 fi
16623 rm -f conftest*
16624
16625 fi
16626
16627 echo "$ac_t""$ol_cv_header_db1" 1>&6
16628
16629         if test $ol_cv_header_db1 = yes ; then
16630                 ol_cv_lib_db=no
16631 if test $ol_cv_lib_db = no ; then
16632         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16633 echo "configure:16634: checking for Berkeley DB link (default)" >&5
16634 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16635   echo $ac_n "(cached) $ac_c" 1>&6
16636 else
16637   
16638         ol_DB_LIB=
16639         ol_LIBS=$LIBS
16640         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16641
16642         cat > conftest.$ac_ext <<EOF
16643 #line 16644 "configure"
16644 #include "confdefs.h"
16645
16646 #ifdef HAVE_DB_185_H
16647 # include <db_185.h>
16648 #else
16649 # include <db.h>
16650 #endif
16651
16652 #ifndef DB_VERSION_MAJOR
16653 # define DB_VERSION_MAJOR 1
16654 #endif
16655
16656 #ifndef NULL
16657 #define NULL ((void*)0)
16658 #endif
16659
16660 int main() {
16661
16662 #if DB_VERSION_MAJOR > 1
16663         {
16664                 char *version;
16665                 int major, minor, patch;
16666
16667                 version = db_version( &major, &minor, &patch );
16668
16669                 if( major != DB_VERSION_MAJOR ||
16670                         minor < DB_VERSION_MINOR )
16671                 {
16672                         printf("Berkeley DB version mismatch\n"
16673                                 "\texpected: %s\n\tgot: %s\n",
16674                                 DB_VERSION_STRING, version);
16675                         return 1;
16676                 }
16677         }
16678 #endif
16679
16680 #if DB_VERSION_MAJOR > 2
16681         db_env_create( NULL, 0 );
16682 #elif DB_VERSION_MAJOR > 1
16683         db_appexit( NULL );
16684 #else
16685         (void) dbopen( NULL, 0, 0, 0, NULL);
16686 #endif
16687
16688 ; return 0; }
16689 EOF
16690 if { (eval echo configure:16691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16691   rm -rf conftest*
16692   ol_cv_db_none=yes
16693 else
16694   echo "configure: failed program was:" >&5
16695   cat conftest.$ac_ext >&5
16696   rm -rf conftest*
16697   ol_cv_db_none=no
16698 fi
16699 rm -f conftest*
16700
16701         LIBS="$ol_LIBS"
16702
16703 fi
16704
16705 echo "$ac_t""$ol_cv_db_none" 1>&6
16706
16707         if test $ol_cv_db_none = yes ; then
16708                 ol_cv_lib_db=yes
16709         fi
16710 fi
16711
16712 if test $ol_cv_lib_db = no ; then
16713         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16714 echo "configure:16715: checking for Berkeley DB link (-ldb41)" >&5
16715 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16716   echo $ac_n "(cached) $ac_c" 1>&6
16717 else
16718   
16719         ol_DB_LIB=-ldb41
16720         ol_LIBS=$LIBS
16721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16722
16723         cat > conftest.$ac_ext <<EOF
16724 #line 16725 "configure"
16725 #include "confdefs.h"
16726
16727 #ifdef HAVE_DB_185_H
16728 # include <db_185.h>
16729 #else
16730 # include <db.h>
16731 #endif
16732
16733 #ifndef DB_VERSION_MAJOR
16734 # define DB_VERSION_MAJOR 1
16735 #endif
16736
16737 #ifndef NULL
16738 #define NULL ((void*)0)
16739 #endif
16740
16741 int main() {
16742
16743 #if DB_VERSION_MAJOR > 1
16744         {
16745                 char *version;
16746                 int major, minor, patch;
16747
16748                 version = db_version( &major, &minor, &patch );
16749
16750                 if( major != DB_VERSION_MAJOR ||
16751                         minor < DB_VERSION_MINOR )
16752                 {
16753                         printf("Berkeley DB version mismatch\n"
16754                                 "\texpected: %s\n\tgot: %s\n",
16755                                 DB_VERSION_STRING, version);
16756                         return 1;
16757                 }
16758         }
16759 #endif
16760
16761 #if DB_VERSION_MAJOR > 2
16762         db_env_create( NULL, 0 );
16763 #elif DB_VERSION_MAJOR > 1
16764         db_appexit( NULL );
16765 #else
16766         (void) dbopen( NULL, 0, 0, 0, NULL);
16767 #endif
16768
16769 ; return 0; }
16770 EOF
16771 if { (eval echo configure:16772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16772   rm -rf conftest*
16773   ol_cv_db_db41=yes
16774 else
16775   echo "configure: failed program was:" >&5
16776   cat conftest.$ac_ext >&5
16777   rm -rf conftest*
16778   ol_cv_db_db41=no
16779 fi
16780 rm -f conftest*
16781
16782         LIBS="$ol_LIBS"
16783
16784 fi
16785
16786 echo "$ac_t""$ol_cv_db_db41" 1>&6
16787
16788         if test $ol_cv_db_db41 = yes ; then
16789                 ol_cv_lib_db=-ldb41
16790         fi
16791 fi
16792
16793 if test $ol_cv_lib_db = no ; then
16794         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16795 echo "configure:16796: checking for Berkeley DB link (-ldb-41)" >&5
16796 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16797   echo $ac_n "(cached) $ac_c" 1>&6
16798 else
16799   
16800         ol_DB_LIB=-ldb-41
16801         ol_LIBS=$LIBS
16802         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16803
16804         cat > conftest.$ac_ext <<EOF
16805 #line 16806 "configure"
16806 #include "confdefs.h"
16807
16808 #ifdef HAVE_DB_185_H
16809 # include <db_185.h>
16810 #else
16811 # include <db.h>
16812 #endif
16813
16814 #ifndef DB_VERSION_MAJOR
16815 # define DB_VERSION_MAJOR 1
16816 #endif
16817
16818 #ifndef NULL
16819 #define NULL ((void*)0)
16820 #endif
16821
16822 int main() {
16823
16824 #if DB_VERSION_MAJOR > 1
16825         {
16826                 char *version;
16827                 int major, minor, patch;
16828
16829                 version = db_version( &major, &minor, &patch );
16830
16831                 if( major != DB_VERSION_MAJOR ||
16832                         minor < DB_VERSION_MINOR )
16833                 {
16834                         printf("Berkeley DB version mismatch\n"
16835                                 "\texpected: %s\n\tgot: %s\n",
16836                                 DB_VERSION_STRING, version);
16837                         return 1;
16838                 }
16839         }
16840 #endif
16841
16842 #if DB_VERSION_MAJOR > 2
16843         db_env_create( NULL, 0 );
16844 #elif DB_VERSION_MAJOR > 1
16845         db_appexit( NULL );
16846 #else
16847         (void) dbopen( NULL, 0, 0, 0, NULL);
16848 #endif
16849
16850 ; return 0; }
16851 EOF
16852 if { (eval echo configure:16853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16853   rm -rf conftest*
16854   ol_cv_db_db_41=yes
16855 else
16856   echo "configure: failed program was:" >&5
16857   cat conftest.$ac_ext >&5
16858   rm -rf conftest*
16859   ol_cv_db_db_41=no
16860 fi
16861 rm -f conftest*
16862
16863         LIBS="$ol_LIBS"
16864
16865 fi
16866
16867 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16868
16869         if test $ol_cv_db_db_41 = yes ; then
16870                 ol_cv_lib_db=-ldb-41
16871         fi
16872 fi
16873
16874 if test $ol_cv_lib_db = no ; then
16875         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
16876 echo "configure:16877: checking for Berkeley DB link (-ldb-4.1)" >&5
16877 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
16878   echo $ac_n "(cached) $ac_c" 1>&6
16879 else
16880   
16881         ol_DB_LIB=-ldb-4.1
16882         ol_LIBS=$LIBS
16883         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16884
16885         cat > conftest.$ac_ext <<EOF
16886 #line 16887 "configure"
16887 #include "confdefs.h"
16888
16889 #ifdef HAVE_DB_185_H
16890 # include <db_185.h>
16891 #else
16892 # include <db.h>
16893 #endif
16894
16895 #ifndef DB_VERSION_MAJOR
16896 # define DB_VERSION_MAJOR 1
16897 #endif
16898
16899 #ifndef NULL
16900 #define NULL ((void*)0)
16901 #endif
16902
16903 int main() {
16904
16905 #if DB_VERSION_MAJOR > 1
16906         {
16907                 char *version;
16908                 int major, minor, patch;
16909
16910                 version = db_version( &major, &minor, &patch );
16911
16912                 if( major != DB_VERSION_MAJOR ||
16913                         minor < DB_VERSION_MINOR )
16914                 {
16915                         printf("Berkeley DB version mismatch\n"
16916                                 "\texpected: %s\n\tgot: %s\n",
16917                                 DB_VERSION_STRING, version);
16918                         return 1;
16919                 }
16920         }
16921 #endif
16922
16923 #if DB_VERSION_MAJOR > 2
16924         db_env_create( NULL, 0 );
16925 #elif DB_VERSION_MAJOR > 1
16926         db_appexit( NULL );
16927 #else
16928         (void) dbopen( NULL, 0, 0, 0, NULL);
16929 #endif
16930
16931 ; return 0; }
16932 EOF
16933 if { (eval echo configure:16934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16934   rm -rf conftest*
16935   ol_cv_db_db_4_dot_1=yes
16936 else
16937   echo "configure: failed program was:" >&5
16938   cat conftest.$ac_ext >&5
16939   rm -rf conftest*
16940   ol_cv_db_db_4_dot_1=no
16941 fi
16942 rm -f conftest*
16943
16944         LIBS="$ol_LIBS"
16945
16946 fi
16947
16948 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
16949
16950         if test $ol_cv_db_db_4_dot_1 = yes ; then
16951                 ol_cv_lib_db=-ldb-4.1
16952         fi
16953 fi
16954
16955 if test $ol_cv_lib_db = no ; then
16956         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
16957 echo "configure:16958: checking for Berkeley DB link (-ldb-4-1)" >&5
16958 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
16959   echo $ac_n "(cached) $ac_c" 1>&6
16960 else
16961   
16962         ol_DB_LIB=-ldb-4-1
16963         ol_LIBS=$LIBS
16964         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16965
16966         cat > conftest.$ac_ext <<EOF
16967 #line 16968 "configure"
16968 #include "confdefs.h"
16969
16970 #ifdef HAVE_DB_185_H
16971 # include <db_185.h>
16972 #else
16973 # include <db.h>
16974 #endif
16975
16976 #ifndef DB_VERSION_MAJOR
16977 # define DB_VERSION_MAJOR 1
16978 #endif
16979
16980 #ifndef NULL
16981 #define NULL ((void*)0)
16982 #endif
16983
16984 int main() {
16985
16986 #if DB_VERSION_MAJOR > 1
16987         {
16988                 char *version;
16989                 int major, minor, patch;
16990
16991                 version = db_version( &major, &minor, &patch );
16992
16993                 if( major != DB_VERSION_MAJOR ||
16994                         minor < DB_VERSION_MINOR )
16995                 {
16996                         printf("Berkeley DB version mismatch\n"
16997                                 "\texpected: %s\n\tgot: %s\n",
16998                                 DB_VERSION_STRING, version);
16999                         return 1;
17000                 }
17001         }
17002 #endif
17003
17004 #if DB_VERSION_MAJOR > 2
17005         db_env_create( NULL, 0 );
17006 #elif DB_VERSION_MAJOR > 1
17007         db_appexit( NULL );
17008 #else
17009         (void) dbopen( NULL, 0, 0, 0, NULL);
17010 #endif
17011
17012 ; return 0; }
17013 EOF
17014 if { (eval echo configure:17015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17015   rm -rf conftest*
17016   ol_cv_db_db_4_1=yes
17017 else
17018   echo "configure: failed program was:" >&5
17019   cat conftest.$ac_ext >&5
17020   rm -rf conftest*
17021   ol_cv_db_db_4_1=no
17022 fi
17023 rm -f conftest*
17024
17025         LIBS="$ol_LIBS"
17026
17027 fi
17028
17029 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17030
17031         if test $ol_cv_db_db_4_1 = yes ; then
17032                 ol_cv_lib_db=-ldb-4-1
17033         fi
17034 fi
17035
17036 if test $ol_cv_lib_db = no ; then
17037         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17038 echo "configure:17039: checking for Berkeley DB link (-ldb-4)" >&5
17039 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17040   echo $ac_n "(cached) $ac_c" 1>&6
17041 else
17042   
17043         ol_DB_LIB=-ldb-4
17044         ol_LIBS=$LIBS
17045         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17046
17047         cat > conftest.$ac_ext <<EOF
17048 #line 17049 "configure"
17049 #include "confdefs.h"
17050
17051 #ifdef HAVE_DB_185_H
17052 # include <db_185.h>
17053 #else
17054 # include <db.h>
17055 #endif
17056
17057 #ifndef DB_VERSION_MAJOR
17058 # define DB_VERSION_MAJOR 1
17059 #endif
17060
17061 #ifndef NULL
17062 #define NULL ((void*)0)
17063 #endif
17064
17065 int main() {
17066
17067 #if DB_VERSION_MAJOR > 1
17068         {
17069                 char *version;
17070                 int major, minor, patch;
17071
17072                 version = db_version( &major, &minor, &patch );
17073
17074                 if( major != DB_VERSION_MAJOR ||
17075                         minor < DB_VERSION_MINOR )
17076                 {
17077                         printf("Berkeley DB version mismatch\n"
17078                                 "\texpected: %s\n\tgot: %s\n",
17079                                 DB_VERSION_STRING, version);
17080                         return 1;
17081                 }
17082         }
17083 #endif
17084
17085 #if DB_VERSION_MAJOR > 2
17086         db_env_create( NULL, 0 );
17087 #elif DB_VERSION_MAJOR > 1
17088         db_appexit( NULL );
17089 #else
17090         (void) dbopen( NULL, 0, 0, 0, NULL);
17091 #endif
17092
17093 ; return 0; }
17094 EOF
17095 if { (eval echo configure:17096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17096   rm -rf conftest*
17097   ol_cv_db_db_4=yes
17098 else
17099   echo "configure: failed program was:" >&5
17100   cat conftest.$ac_ext >&5
17101   rm -rf conftest*
17102   ol_cv_db_db_4=no
17103 fi
17104 rm -f conftest*
17105
17106         LIBS="$ol_LIBS"
17107
17108 fi
17109
17110 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17111
17112         if test $ol_cv_db_db_4 = yes ; then
17113                 ol_cv_lib_db=-ldb-4
17114         fi
17115 fi
17116
17117 if test $ol_cv_lib_db = no ; then
17118         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17119 echo "configure:17120: checking for Berkeley DB link (-ldb4)" >&5
17120 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17121   echo $ac_n "(cached) $ac_c" 1>&6
17122 else
17123   
17124         ol_DB_LIB=-ldb4
17125         ol_LIBS=$LIBS
17126         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17127
17128         cat > conftest.$ac_ext <<EOF
17129 #line 17130 "configure"
17130 #include "confdefs.h"
17131
17132 #ifdef HAVE_DB_185_H
17133 # include <db_185.h>
17134 #else
17135 # include <db.h>
17136 #endif
17137
17138 #ifndef DB_VERSION_MAJOR
17139 # define DB_VERSION_MAJOR 1
17140 #endif
17141
17142 #ifndef NULL
17143 #define NULL ((void*)0)
17144 #endif
17145
17146 int main() {
17147
17148 #if DB_VERSION_MAJOR > 1
17149         {
17150                 char *version;
17151                 int major, minor, patch;
17152
17153                 version = db_version( &major, &minor, &patch );
17154
17155                 if( major != DB_VERSION_MAJOR ||
17156                         minor < DB_VERSION_MINOR )
17157                 {
17158                         printf("Berkeley DB version mismatch\n"
17159                                 "\texpected: %s\n\tgot: %s\n",
17160                                 DB_VERSION_STRING, version);
17161                         return 1;
17162                 }
17163         }
17164 #endif
17165
17166 #if DB_VERSION_MAJOR > 2
17167         db_env_create( NULL, 0 );
17168 #elif DB_VERSION_MAJOR > 1
17169         db_appexit( NULL );
17170 #else
17171         (void) dbopen( NULL, 0, 0, 0, NULL);
17172 #endif
17173
17174 ; return 0; }
17175 EOF
17176 if { (eval echo configure:17177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17177   rm -rf conftest*
17178   ol_cv_db_db4=yes
17179 else
17180   echo "configure: failed program was:" >&5
17181   cat conftest.$ac_ext >&5
17182   rm -rf conftest*
17183   ol_cv_db_db4=no
17184 fi
17185 rm -f conftest*
17186
17187         LIBS="$ol_LIBS"
17188
17189 fi
17190
17191 echo "$ac_t""$ol_cv_db_db4" 1>&6
17192
17193         if test $ol_cv_db_db4 = yes ; then
17194                 ol_cv_lib_db=-ldb4
17195         fi
17196 fi
17197
17198 if test $ol_cv_lib_db = no ; then
17199         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17200 echo "configure:17201: checking for Berkeley DB link (-ldb)" >&5
17201 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17202   echo $ac_n "(cached) $ac_c" 1>&6
17203 else
17204   
17205         ol_DB_LIB=-ldb
17206         ol_LIBS=$LIBS
17207         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17208
17209         cat > conftest.$ac_ext <<EOF
17210 #line 17211 "configure"
17211 #include "confdefs.h"
17212
17213 #ifdef HAVE_DB_185_H
17214 # include <db_185.h>
17215 #else
17216 # include <db.h>
17217 #endif
17218
17219 #ifndef DB_VERSION_MAJOR
17220 # define DB_VERSION_MAJOR 1
17221 #endif
17222
17223 #ifndef NULL
17224 #define NULL ((void*)0)
17225 #endif
17226
17227 int main() {
17228
17229 #if DB_VERSION_MAJOR > 1
17230         {
17231                 char *version;
17232                 int major, minor, patch;
17233
17234                 version = db_version( &major, &minor, &patch );
17235
17236                 if( major != DB_VERSION_MAJOR ||
17237                         minor < DB_VERSION_MINOR )
17238                 {
17239                         printf("Berkeley DB version mismatch\n"
17240                                 "\texpected: %s\n\tgot: %s\n",
17241                                 DB_VERSION_STRING, version);
17242                         return 1;
17243                 }
17244         }
17245 #endif
17246
17247 #if DB_VERSION_MAJOR > 2
17248         db_env_create( NULL, 0 );
17249 #elif DB_VERSION_MAJOR > 1
17250         db_appexit( NULL );
17251 #else
17252         (void) dbopen( NULL, 0, 0, 0, NULL);
17253 #endif
17254
17255 ; return 0; }
17256 EOF
17257 if { (eval echo configure:17258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17258   rm -rf conftest*
17259   ol_cv_db_db=yes
17260 else
17261   echo "configure: failed program was:" >&5
17262   cat conftest.$ac_ext >&5
17263   rm -rf conftest*
17264   ol_cv_db_db=no
17265 fi
17266 rm -f conftest*
17267
17268         LIBS="$ol_LIBS"
17269
17270 fi
17271
17272 echo "$ac_t""$ol_cv_db_db" 1>&6
17273
17274         if test $ol_cv_db_db = yes ; then
17275                 ol_cv_lib_db=-ldb
17276         fi
17277 fi
17278
17279 if test $ol_cv_lib_db = no ; then
17280         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17281 echo "configure:17282: checking for Berkeley DB link (-ldb3)" >&5
17282 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17283   echo $ac_n "(cached) $ac_c" 1>&6
17284 else
17285   
17286         ol_DB_LIB=-ldb3
17287         ol_LIBS=$LIBS
17288         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17289
17290         cat > conftest.$ac_ext <<EOF
17291 #line 17292 "configure"
17292 #include "confdefs.h"
17293
17294 #ifdef HAVE_DB_185_H
17295 # include <db_185.h>
17296 #else
17297 # include <db.h>
17298 #endif
17299
17300 #ifndef DB_VERSION_MAJOR
17301 # define DB_VERSION_MAJOR 1
17302 #endif
17303
17304 #ifndef NULL
17305 #define NULL ((void*)0)
17306 #endif
17307
17308 int main() {
17309
17310 #if DB_VERSION_MAJOR > 1
17311         {
17312                 char *version;
17313                 int major, minor, patch;
17314
17315                 version = db_version( &major, &minor, &patch );
17316
17317                 if( major != DB_VERSION_MAJOR ||
17318                         minor < DB_VERSION_MINOR )
17319                 {
17320                         printf("Berkeley DB version mismatch\n"
17321                                 "\texpected: %s\n\tgot: %s\n",
17322                                 DB_VERSION_STRING, version);
17323                         return 1;
17324                 }
17325         }
17326 #endif
17327
17328 #if DB_VERSION_MAJOR > 2
17329         db_env_create( NULL, 0 );
17330 #elif DB_VERSION_MAJOR > 1
17331         db_appexit( NULL );
17332 #else
17333         (void) dbopen( NULL, 0, 0, 0, NULL);
17334 #endif
17335
17336 ; return 0; }
17337 EOF
17338 if { (eval echo configure:17339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17339   rm -rf conftest*
17340   ol_cv_db_db3=yes
17341 else
17342   echo "configure: failed program was:" >&5
17343   cat conftest.$ac_ext >&5
17344   rm -rf conftest*
17345   ol_cv_db_db3=no
17346 fi
17347 rm -f conftest*
17348
17349         LIBS="$ol_LIBS"
17350
17351 fi
17352
17353 echo "$ac_t""$ol_cv_db_db3" 1>&6
17354
17355         if test $ol_cv_db_db3 = yes ; then
17356                 ol_cv_lib_db=-ldb3
17357         fi
17358 fi
17359
17360 if test $ol_cv_lib_db = no ; then
17361         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17362 echo "configure:17363: checking for Berkeley DB link (-ldb-3)" >&5
17363 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17364   echo $ac_n "(cached) $ac_c" 1>&6
17365 else
17366   
17367         ol_DB_LIB=-ldb-3
17368         ol_LIBS=$LIBS
17369         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17370
17371         cat > conftest.$ac_ext <<EOF
17372 #line 17373 "configure"
17373 #include "confdefs.h"
17374
17375 #ifdef HAVE_DB_185_H
17376 # include <db_185.h>
17377 #else
17378 # include <db.h>
17379 #endif
17380
17381 #ifndef DB_VERSION_MAJOR
17382 # define DB_VERSION_MAJOR 1
17383 #endif
17384
17385 #ifndef NULL
17386 #define NULL ((void*)0)
17387 #endif
17388
17389 int main() {
17390
17391 #if DB_VERSION_MAJOR > 1
17392         {
17393                 char *version;
17394                 int major, minor, patch;
17395
17396                 version = db_version( &major, &minor, &patch );
17397
17398                 if( major != DB_VERSION_MAJOR ||
17399                         minor < DB_VERSION_MINOR )
17400                 {
17401                         printf("Berkeley DB version mismatch\n"
17402                                 "\texpected: %s\n\tgot: %s\n",
17403                                 DB_VERSION_STRING, version);
17404                         return 1;
17405                 }
17406         }
17407 #endif
17408
17409 #if DB_VERSION_MAJOR > 2
17410         db_env_create( NULL, 0 );
17411 #elif DB_VERSION_MAJOR > 1
17412         db_appexit( NULL );
17413 #else
17414         (void) dbopen( NULL, 0, 0, 0, NULL);
17415 #endif
17416
17417 ; return 0; }
17418 EOF
17419 if { (eval echo configure:17420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17420   rm -rf conftest*
17421   ol_cv_db_db_3=yes
17422 else
17423   echo "configure: failed program was:" >&5
17424   cat conftest.$ac_ext >&5
17425   rm -rf conftest*
17426   ol_cv_db_db_3=no
17427 fi
17428 rm -f conftest*
17429
17430         LIBS="$ol_LIBS"
17431
17432 fi
17433
17434 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17435
17436         if test $ol_cv_db_db_3 = yes ; then
17437                 ol_cv_lib_db=-ldb-3
17438         fi
17439 fi
17440
17441 if test $ol_cv_lib_db = no ; then
17442         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17443 echo "configure:17444: checking for Berkeley DB link (-ldb2)" >&5
17444 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17445   echo $ac_n "(cached) $ac_c" 1>&6
17446 else
17447   
17448         ol_DB_LIB=-ldb2
17449         ol_LIBS=$LIBS
17450         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17451
17452         cat > conftest.$ac_ext <<EOF
17453 #line 17454 "configure"
17454 #include "confdefs.h"
17455
17456 #ifdef HAVE_DB_185_H
17457 # include <db_185.h>
17458 #else
17459 # include <db.h>
17460 #endif
17461
17462 #ifndef DB_VERSION_MAJOR
17463 # define DB_VERSION_MAJOR 1
17464 #endif
17465
17466 #ifndef NULL
17467 #define NULL ((void*)0)
17468 #endif
17469
17470 int main() {
17471
17472 #if DB_VERSION_MAJOR > 1
17473         {
17474                 char *version;
17475                 int major, minor, patch;
17476
17477                 version = db_version( &major, &minor, &patch );
17478
17479                 if( major != DB_VERSION_MAJOR ||
17480                         minor < DB_VERSION_MINOR )
17481                 {
17482                         printf("Berkeley DB version mismatch\n"
17483                                 "\texpected: %s\n\tgot: %s\n",
17484                                 DB_VERSION_STRING, version);
17485                         return 1;
17486                 }
17487         }
17488 #endif
17489
17490 #if DB_VERSION_MAJOR > 2
17491         db_env_create( NULL, 0 );
17492 #elif DB_VERSION_MAJOR > 1
17493         db_appexit( NULL );
17494 #else
17495         (void) dbopen( NULL, 0, 0, 0, NULL);
17496 #endif
17497
17498 ; return 0; }
17499 EOF
17500 if { (eval echo configure:17501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17501   rm -rf conftest*
17502   ol_cv_db_db2=yes
17503 else
17504   echo "configure: failed program was:" >&5
17505   cat conftest.$ac_ext >&5
17506   rm -rf conftest*
17507   ol_cv_db_db2=no
17508 fi
17509 rm -f conftest*
17510
17511         LIBS="$ol_LIBS"
17512
17513 fi
17514
17515 echo "$ac_t""$ol_cv_db_db2" 1>&6
17516
17517         if test $ol_cv_db_db2 = yes ; then
17518                 ol_cv_lib_db=-ldb2
17519         fi
17520 fi
17521
17522 if test $ol_cv_lib_db = no ; then
17523         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17524 echo "configure:17525: checking for Berkeley DB link (-ldb-2)" >&5
17525 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17526   echo $ac_n "(cached) $ac_c" 1>&6
17527 else
17528   
17529         ol_DB_LIB=-ldb-2
17530         ol_LIBS=$LIBS
17531         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17532
17533         cat > conftest.$ac_ext <<EOF
17534 #line 17535 "configure"
17535 #include "confdefs.h"
17536
17537 #ifdef HAVE_DB_185_H
17538 # include <db_185.h>
17539 #else
17540 # include <db.h>
17541 #endif
17542
17543 #ifndef DB_VERSION_MAJOR
17544 # define DB_VERSION_MAJOR 1
17545 #endif
17546
17547 #ifndef NULL
17548 #define NULL ((void*)0)
17549 #endif
17550
17551 int main() {
17552
17553 #if DB_VERSION_MAJOR > 1
17554         {
17555                 char *version;
17556                 int major, minor, patch;
17557
17558                 version = db_version( &major, &minor, &patch );
17559
17560                 if( major != DB_VERSION_MAJOR ||
17561                         minor < DB_VERSION_MINOR )
17562                 {
17563                         printf("Berkeley DB version mismatch\n"
17564                                 "\texpected: %s\n\tgot: %s\n",
17565                                 DB_VERSION_STRING, version);
17566                         return 1;
17567                 }
17568         }
17569 #endif
17570
17571 #if DB_VERSION_MAJOR > 2
17572         db_env_create( NULL, 0 );
17573 #elif DB_VERSION_MAJOR > 1
17574         db_appexit( NULL );
17575 #else
17576         (void) dbopen( NULL, 0, 0, 0, NULL);
17577 #endif
17578
17579 ; return 0; }
17580 EOF
17581 if { (eval echo configure:17582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17582   rm -rf conftest*
17583   ol_cv_db_db_2=yes
17584 else
17585   echo "configure: failed program was:" >&5
17586   cat conftest.$ac_ext >&5
17587   rm -rf conftest*
17588   ol_cv_db_db_2=no
17589 fi
17590 rm -f conftest*
17591
17592         LIBS="$ol_LIBS"
17593
17594 fi
17595
17596 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17597
17598         if test $ol_cv_db_db_2 = yes ; then
17599                 ol_cv_lib_db=-ldb-2
17600         fi
17601 fi
17602
17603 if test $ol_cv_lib_db = no ; then
17604         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17605 echo "configure:17606: checking for Berkeley DB link (-ldb1)" >&5
17606 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17607   echo $ac_n "(cached) $ac_c" 1>&6
17608 else
17609   
17610         ol_DB_LIB=-ldb1
17611         ol_LIBS=$LIBS
17612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17613
17614         cat > conftest.$ac_ext <<EOF
17615 #line 17616 "configure"
17616 #include "confdefs.h"
17617
17618 #ifdef HAVE_DB_185_H
17619 # include <db_185.h>
17620 #else
17621 # include <db.h>
17622 #endif
17623
17624 #ifndef DB_VERSION_MAJOR
17625 # define DB_VERSION_MAJOR 1
17626 #endif
17627
17628 #ifndef NULL
17629 #define NULL ((void*)0)
17630 #endif
17631
17632 int main() {
17633
17634 #if DB_VERSION_MAJOR > 1
17635         {
17636                 char *version;
17637                 int major, minor, patch;
17638
17639                 version = db_version( &major, &minor, &patch );
17640
17641                 if( major != DB_VERSION_MAJOR ||
17642                         minor < DB_VERSION_MINOR )
17643                 {
17644                         printf("Berkeley DB version mismatch\n"
17645                                 "\texpected: %s\n\tgot: %s\n",
17646                                 DB_VERSION_STRING, version);
17647                         return 1;
17648                 }
17649         }
17650 #endif
17651
17652 #if DB_VERSION_MAJOR > 2
17653         db_env_create( NULL, 0 );
17654 #elif DB_VERSION_MAJOR > 1
17655         db_appexit( NULL );
17656 #else
17657         (void) dbopen( NULL, 0, 0, 0, NULL);
17658 #endif
17659
17660 ; return 0; }
17661 EOF
17662 if { (eval echo configure:17663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17663   rm -rf conftest*
17664   ol_cv_db_db1=yes
17665 else
17666   echo "configure: failed program was:" >&5
17667   cat conftest.$ac_ext >&5
17668   rm -rf conftest*
17669   ol_cv_db_db1=no
17670 fi
17671 rm -f conftest*
17672
17673         LIBS="$ol_LIBS"
17674
17675 fi
17676
17677 echo "$ac_t""$ol_cv_db_db1" 1>&6
17678
17679         if test $ol_cv_db_db1 = yes ; then
17680                 ol_cv_lib_db=-ldb1
17681         fi
17682 fi
17683
17684 if test $ol_cv_lib_db = no ; then
17685         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17686 echo "configure:17687: checking for Berkeley DB link (-ldb-1)" >&5
17687 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17688   echo $ac_n "(cached) $ac_c" 1>&6
17689 else
17690   
17691         ol_DB_LIB=-ldb-1
17692         ol_LIBS=$LIBS
17693         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17694
17695         cat > conftest.$ac_ext <<EOF
17696 #line 17697 "configure"
17697 #include "confdefs.h"
17698
17699 #ifdef HAVE_DB_185_H
17700 # include <db_185.h>
17701 #else
17702 # include <db.h>
17703 #endif
17704
17705 #ifndef DB_VERSION_MAJOR
17706 # define DB_VERSION_MAJOR 1
17707 #endif
17708
17709 #ifndef NULL
17710 #define NULL ((void*)0)
17711 #endif
17712
17713 int main() {
17714
17715 #if DB_VERSION_MAJOR > 1
17716         {
17717                 char *version;
17718                 int major, minor, patch;
17719
17720                 version = db_version( &major, &minor, &patch );
17721
17722                 if( major != DB_VERSION_MAJOR ||
17723                         minor < DB_VERSION_MINOR )
17724                 {
17725                         printf("Berkeley DB version mismatch\n"
17726                                 "\texpected: %s\n\tgot: %s\n",
17727                                 DB_VERSION_STRING, version);
17728                         return 1;
17729                 }
17730         }
17731 #endif
17732
17733 #if DB_VERSION_MAJOR > 2
17734         db_env_create( NULL, 0 );
17735 #elif DB_VERSION_MAJOR > 1
17736         db_appexit( NULL );
17737 #else
17738         (void) dbopen( NULL, 0, 0, 0, NULL);
17739 #endif
17740
17741 ; return 0; }
17742 EOF
17743 if { (eval echo configure:17744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17744   rm -rf conftest*
17745   ol_cv_db_db_1=yes
17746 else
17747   echo "configure: failed program was:" >&5
17748   cat conftest.$ac_ext >&5
17749   rm -rf conftest*
17750   ol_cv_db_db_1=no
17751 fi
17752 rm -f conftest*
17753
17754         LIBS="$ol_LIBS"
17755
17756 fi
17757
17758 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17759
17760         if test $ol_cv_db_db_1 = yes ; then
17761                 ol_cv_lib_db=-ldb-1
17762         fi
17763 fi
17764
17765
17766                 if test "$ol_cv_lib_db" != no ; then
17767                         ol_cv_berkeley_db=yes
17768                 fi
17769         fi
17770 fi
17771
17772         else
17773                 ol_cv_berkeley_db=no
17774 for ac_hdr in db.h
17775 do
17776 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17777 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17778 echo "configure:17779: checking for $ac_hdr" >&5
17779 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17780   echo $ac_n "(cached) $ac_c" 1>&6
17781 else
17782   cat > conftest.$ac_ext <<EOF
17783 #line 17784 "configure"
17784 #include "confdefs.h"
17785 #include <$ac_hdr>
17786 EOF
17787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17788 { (eval echo configure:17789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17790 if test -z "$ac_err"; then
17791   rm -rf conftest*
17792   eval "ac_cv_header_$ac_safe=yes"
17793 else
17794   echo "$ac_err" >&5
17795   echo "configure: failed program was:" >&5
17796   cat conftest.$ac_ext >&5
17797   rm -rf conftest*
17798   eval "ac_cv_header_$ac_safe=no"
17799 fi
17800 rm -f conftest*
17801 fi
17802 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17803   echo "$ac_t""yes" 1>&6
17804     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17805   cat >> confdefs.h <<EOF
17806 #define $ac_tr_hdr 1
17807 EOF
17808  
17809 else
17810   echo "$ac_t""no" 1>&6
17811 fi
17812 done
17813
17814 if test $ac_cv_header_db_h = yes; then
17815         ol_cv_lib_db=no
17816 if test $ol_cv_lib_db = no ; then
17817         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17818 echo "configure:17819: checking for Berkeley DB link (default)" >&5
17819 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17820   echo $ac_n "(cached) $ac_c" 1>&6
17821 else
17822   
17823         ol_DB_LIB=
17824         ol_LIBS=$LIBS
17825         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17826
17827         cat > conftest.$ac_ext <<EOF
17828 #line 17829 "configure"
17829 #include "confdefs.h"
17830
17831 #ifdef HAVE_DB_185_H
17832 # include <db_185.h>
17833 #else
17834 # include <db.h>
17835 #endif
17836
17837 #ifndef DB_VERSION_MAJOR
17838 # define DB_VERSION_MAJOR 1
17839 #endif
17840
17841 #ifndef NULL
17842 #define NULL ((void*)0)
17843 #endif
17844
17845 int main() {
17846
17847 #if DB_VERSION_MAJOR > 1
17848         {
17849                 char *version;
17850                 int major, minor, patch;
17851
17852                 version = db_version( &major, &minor, &patch );
17853
17854                 if( major != DB_VERSION_MAJOR ||
17855                         minor < DB_VERSION_MINOR )
17856                 {
17857                         printf("Berkeley DB version mismatch\n"
17858                                 "\texpected: %s\n\tgot: %s\n",
17859                                 DB_VERSION_STRING, version);
17860                         return 1;
17861                 }
17862         }
17863 #endif
17864
17865 #if DB_VERSION_MAJOR > 2
17866         db_env_create( NULL, 0 );
17867 #elif DB_VERSION_MAJOR > 1
17868         db_appexit( NULL );
17869 #else
17870         (void) dbopen( NULL, 0, 0, 0, NULL);
17871 #endif
17872
17873 ; return 0; }
17874 EOF
17875 if { (eval echo configure:17876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17876   rm -rf conftest*
17877   ol_cv_db_none=yes
17878 else
17879   echo "configure: failed program was:" >&5
17880   cat conftest.$ac_ext >&5
17881   rm -rf conftest*
17882   ol_cv_db_none=no
17883 fi
17884 rm -f conftest*
17885
17886         LIBS="$ol_LIBS"
17887
17888 fi
17889
17890 echo "$ac_t""$ol_cv_db_none" 1>&6
17891
17892         if test $ol_cv_db_none = yes ; then
17893                 ol_cv_lib_db=yes
17894         fi
17895 fi
17896
17897 if test $ol_cv_lib_db = no ; then
17898         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17899 echo "configure:17900: checking for Berkeley DB link (-ldb41)" >&5
17900 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17901   echo $ac_n "(cached) $ac_c" 1>&6
17902 else
17903   
17904         ol_DB_LIB=-ldb41
17905         ol_LIBS=$LIBS
17906         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17907
17908         cat > conftest.$ac_ext <<EOF
17909 #line 17910 "configure"
17910 #include "confdefs.h"
17911
17912 #ifdef HAVE_DB_185_H
17913 # include <db_185.h>
17914 #else
17915 # include <db.h>
17916 #endif
17917
17918 #ifndef DB_VERSION_MAJOR
17919 # define DB_VERSION_MAJOR 1
17920 #endif
17921
17922 #ifndef NULL
17923 #define NULL ((void*)0)
17924 #endif
17925
17926 int main() {
17927
17928 #if DB_VERSION_MAJOR > 1
17929         {
17930                 char *version;
17931                 int major, minor, patch;
17932
17933                 version = db_version( &major, &minor, &patch );
17934
17935                 if( major != DB_VERSION_MAJOR ||
17936                         minor < DB_VERSION_MINOR )
17937                 {
17938                         printf("Berkeley DB version mismatch\n"
17939                                 "\texpected: %s\n\tgot: %s\n",
17940                                 DB_VERSION_STRING, version);
17941                         return 1;
17942                 }
17943         }
17944 #endif
17945
17946 #if DB_VERSION_MAJOR > 2
17947         db_env_create( NULL, 0 );
17948 #elif DB_VERSION_MAJOR > 1
17949         db_appexit( NULL );
17950 #else
17951         (void) dbopen( NULL, 0, 0, 0, NULL);
17952 #endif
17953
17954 ; return 0; }
17955 EOF
17956 if { (eval echo configure:17957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17957   rm -rf conftest*
17958   ol_cv_db_db41=yes
17959 else
17960   echo "configure: failed program was:" >&5
17961   cat conftest.$ac_ext >&5
17962   rm -rf conftest*
17963   ol_cv_db_db41=no
17964 fi
17965 rm -f conftest*
17966
17967         LIBS="$ol_LIBS"
17968
17969 fi
17970
17971 echo "$ac_t""$ol_cv_db_db41" 1>&6
17972
17973         if test $ol_cv_db_db41 = yes ; then
17974                 ol_cv_lib_db=-ldb41
17975         fi
17976 fi
17977
17978 if test $ol_cv_lib_db = no ; then
17979         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17980 echo "configure:17981: checking for Berkeley DB link (-ldb-41)" >&5
17981 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17982   echo $ac_n "(cached) $ac_c" 1>&6
17983 else
17984   
17985         ol_DB_LIB=-ldb-41
17986         ol_LIBS=$LIBS
17987         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17988
17989         cat > conftest.$ac_ext <<EOF
17990 #line 17991 "configure"
17991 #include "confdefs.h"
17992
17993 #ifdef HAVE_DB_185_H
17994 # include <db_185.h>
17995 #else
17996 # include <db.h>
17997 #endif
17998
17999 #ifndef DB_VERSION_MAJOR
18000 # define DB_VERSION_MAJOR 1
18001 #endif
18002
18003 #ifndef NULL
18004 #define NULL ((void*)0)
18005 #endif
18006
18007 int main() {
18008
18009 #if DB_VERSION_MAJOR > 1
18010         {
18011                 char *version;
18012                 int major, minor, patch;
18013
18014                 version = db_version( &major, &minor, &patch );
18015
18016                 if( major != DB_VERSION_MAJOR ||
18017                         minor < DB_VERSION_MINOR )
18018                 {
18019                         printf("Berkeley DB version mismatch\n"
18020                                 "\texpected: %s\n\tgot: %s\n",
18021                                 DB_VERSION_STRING, version);
18022                         return 1;
18023                 }
18024         }
18025 #endif
18026
18027 #if DB_VERSION_MAJOR > 2
18028         db_env_create( NULL, 0 );
18029 #elif DB_VERSION_MAJOR > 1
18030         db_appexit( NULL );
18031 #else
18032         (void) dbopen( NULL, 0, 0, 0, NULL);
18033 #endif
18034
18035 ; return 0; }
18036 EOF
18037 if { (eval echo configure:18038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18038   rm -rf conftest*
18039   ol_cv_db_db_41=yes
18040 else
18041   echo "configure: failed program was:" >&5
18042   cat conftest.$ac_ext >&5
18043   rm -rf conftest*
18044   ol_cv_db_db_41=no
18045 fi
18046 rm -f conftest*
18047
18048         LIBS="$ol_LIBS"
18049
18050 fi
18051
18052 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18053
18054         if test $ol_cv_db_db_41 = yes ; then
18055                 ol_cv_lib_db=-ldb-41
18056         fi
18057 fi
18058
18059 if test $ol_cv_lib_db = no ; then
18060         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18061 echo "configure:18062: checking for Berkeley DB link (-ldb-4.1)" >&5
18062 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18063   echo $ac_n "(cached) $ac_c" 1>&6
18064 else
18065   
18066         ol_DB_LIB=-ldb-4.1
18067         ol_LIBS=$LIBS
18068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18069
18070         cat > conftest.$ac_ext <<EOF
18071 #line 18072 "configure"
18072 #include "confdefs.h"
18073
18074 #ifdef HAVE_DB_185_H
18075 # include <db_185.h>
18076 #else
18077 # include <db.h>
18078 #endif
18079
18080 #ifndef DB_VERSION_MAJOR
18081 # define DB_VERSION_MAJOR 1
18082 #endif
18083
18084 #ifndef NULL
18085 #define NULL ((void*)0)
18086 #endif
18087
18088 int main() {
18089
18090 #if DB_VERSION_MAJOR > 1
18091         {
18092                 char *version;
18093                 int major, minor, patch;
18094
18095                 version = db_version( &major, &minor, &patch );
18096
18097                 if( major != DB_VERSION_MAJOR ||
18098                         minor < DB_VERSION_MINOR )
18099                 {
18100                         printf("Berkeley DB version mismatch\n"
18101                                 "\texpected: %s\n\tgot: %s\n",
18102                                 DB_VERSION_STRING, version);
18103                         return 1;
18104                 }
18105         }
18106 #endif
18107
18108 #if DB_VERSION_MAJOR > 2
18109         db_env_create( NULL, 0 );
18110 #elif DB_VERSION_MAJOR > 1
18111         db_appexit( NULL );
18112 #else
18113         (void) dbopen( NULL, 0, 0, 0, NULL);
18114 #endif
18115
18116 ; return 0; }
18117 EOF
18118 if { (eval echo configure:18119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18119   rm -rf conftest*
18120   ol_cv_db_db_4_dot_1=yes
18121 else
18122   echo "configure: failed program was:" >&5
18123   cat conftest.$ac_ext >&5
18124   rm -rf conftest*
18125   ol_cv_db_db_4_dot_1=no
18126 fi
18127 rm -f conftest*
18128
18129         LIBS="$ol_LIBS"
18130
18131 fi
18132
18133 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18134
18135         if test $ol_cv_db_db_4_dot_1 = yes ; then
18136                 ol_cv_lib_db=-ldb-4.1
18137         fi
18138 fi
18139
18140 if test $ol_cv_lib_db = no ; then
18141         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18142 echo "configure:18143: checking for Berkeley DB link (-ldb-4-1)" >&5
18143 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18144   echo $ac_n "(cached) $ac_c" 1>&6
18145 else
18146   
18147         ol_DB_LIB=-ldb-4-1
18148         ol_LIBS=$LIBS
18149         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18150
18151         cat > conftest.$ac_ext <<EOF
18152 #line 18153 "configure"
18153 #include "confdefs.h"
18154
18155 #ifdef HAVE_DB_185_H
18156 # include <db_185.h>
18157 #else
18158 # include <db.h>
18159 #endif
18160
18161 #ifndef DB_VERSION_MAJOR
18162 # define DB_VERSION_MAJOR 1
18163 #endif
18164
18165 #ifndef NULL
18166 #define NULL ((void*)0)
18167 #endif
18168
18169 int main() {
18170
18171 #if DB_VERSION_MAJOR > 1
18172         {
18173                 char *version;
18174                 int major, minor, patch;
18175
18176                 version = db_version( &major, &minor, &patch );
18177
18178                 if( major != DB_VERSION_MAJOR ||
18179                         minor < DB_VERSION_MINOR )
18180                 {
18181                         printf("Berkeley DB version mismatch\n"
18182                                 "\texpected: %s\n\tgot: %s\n",
18183                                 DB_VERSION_STRING, version);
18184                         return 1;
18185                 }
18186         }
18187 #endif
18188
18189 #if DB_VERSION_MAJOR > 2
18190         db_env_create( NULL, 0 );
18191 #elif DB_VERSION_MAJOR > 1
18192         db_appexit( NULL );
18193 #else
18194         (void) dbopen( NULL, 0, 0, 0, NULL);
18195 #endif
18196
18197 ; return 0; }
18198 EOF
18199 if { (eval echo configure:18200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18200   rm -rf conftest*
18201   ol_cv_db_db_4_1=yes
18202 else
18203   echo "configure: failed program was:" >&5
18204   cat conftest.$ac_ext >&5
18205   rm -rf conftest*
18206   ol_cv_db_db_4_1=no
18207 fi
18208 rm -f conftest*
18209
18210         LIBS="$ol_LIBS"
18211
18212 fi
18213
18214 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18215
18216         if test $ol_cv_db_db_4_1 = yes ; then
18217                 ol_cv_lib_db=-ldb-4-1
18218         fi
18219 fi
18220
18221 if test $ol_cv_lib_db = no ; then
18222         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18223 echo "configure:18224: checking for Berkeley DB link (-ldb-4)" >&5
18224 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18225   echo $ac_n "(cached) $ac_c" 1>&6
18226 else
18227   
18228         ol_DB_LIB=-ldb-4
18229         ol_LIBS=$LIBS
18230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18231
18232         cat > conftest.$ac_ext <<EOF
18233 #line 18234 "configure"
18234 #include "confdefs.h"
18235
18236 #ifdef HAVE_DB_185_H
18237 # include <db_185.h>
18238 #else
18239 # include <db.h>
18240 #endif
18241
18242 #ifndef DB_VERSION_MAJOR
18243 # define DB_VERSION_MAJOR 1
18244 #endif
18245
18246 #ifndef NULL
18247 #define NULL ((void*)0)
18248 #endif
18249
18250 int main() {
18251
18252 #if DB_VERSION_MAJOR > 1
18253         {
18254                 char *version;
18255                 int major, minor, patch;
18256
18257                 version = db_version( &major, &minor, &patch );
18258
18259                 if( major != DB_VERSION_MAJOR ||
18260                         minor < DB_VERSION_MINOR )
18261                 {
18262                         printf("Berkeley DB version mismatch\n"
18263                                 "\texpected: %s\n\tgot: %s\n",
18264                                 DB_VERSION_STRING, version);
18265                         return 1;
18266                 }
18267         }
18268 #endif
18269
18270 #if DB_VERSION_MAJOR > 2
18271         db_env_create( NULL, 0 );
18272 #elif DB_VERSION_MAJOR > 1
18273         db_appexit( NULL );
18274 #else
18275         (void) dbopen( NULL, 0, 0, 0, NULL);
18276 #endif
18277
18278 ; return 0; }
18279 EOF
18280 if { (eval echo configure:18281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18281   rm -rf conftest*
18282   ol_cv_db_db_4=yes
18283 else
18284   echo "configure: failed program was:" >&5
18285   cat conftest.$ac_ext >&5
18286   rm -rf conftest*
18287   ol_cv_db_db_4=no
18288 fi
18289 rm -f conftest*
18290
18291         LIBS="$ol_LIBS"
18292
18293 fi
18294
18295 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18296
18297         if test $ol_cv_db_db_4 = yes ; then
18298                 ol_cv_lib_db=-ldb-4
18299         fi
18300 fi
18301
18302 if test $ol_cv_lib_db = no ; then
18303         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18304 echo "configure:18305: checking for Berkeley DB link (-ldb4)" >&5
18305 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18306   echo $ac_n "(cached) $ac_c" 1>&6
18307 else
18308   
18309         ol_DB_LIB=-ldb4
18310         ol_LIBS=$LIBS
18311         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18312
18313         cat > conftest.$ac_ext <<EOF
18314 #line 18315 "configure"
18315 #include "confdefs.h"
18316
18317 #ifdef HAVE_DB_185_H
18318 # include <db_185.h>
18319 #else
18320 # include <db.h>
18321 #endif
18322
18323 #ifndef DB_VERSION_MAJOR
18324 # define DB_VERSION_MAJOR 1
18325 #endif
18326
18327 #ifndef NULL
18328 #define NULL ((void*)0)
18329 #endif
18330
18331 int main() {
18332
18333 #if DB_VERSION_MAJOR > 1
18334         {
18335                 char *version;
18336                 int major, minor, patch;
18337
18338                 version = db_version( &major, &minor, &patch );
18339
18340                 if( major != DB_VERSION_MAJOR ||
18341                         minor < DB_VERSION_MINOR )
18342                 {
18343                         printf("Berkeley DB version mismatch\n"
18344                                 "\texpected: %s\n\tgot: %s\n",
18345                                 DB_VERSION_STRING, version);
18346                         return 1;
18347                 }
18348         }
18349 #endif
18350
18351 #if DB_VERSION_MAJOR > 2
18352         db_env_create( NULL, 0 );
18353 #elif DB_VERSION_MAJOR > 1
18354         db_appexit( NULL );
18355 #else
18356         (void) dbopen( NULL, 0, 0, 0, NULL);
18357 #endif
18358
18359 ; return 0; }
18360 EOF
18361 if { (eval echo configure:18362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18362   rm -rf conftest*
18363   ol_cv_db_db4=yes
18364 else
18365   echo "configure: failed program was:" >&5
18366   cat conftest.$ac_ext >&5
18367   rm -rf conftest*
18368   ol_cv_db_db4=no
18369 fi
18370 rm -f conftest*
18371
18372         LIBS="$ol_LIBS"
18373
18374 fi
18375
18376 echo "$ac_t""$ol_cv_db_db4" 1>&6
18377
18378         if test $ol_cv_db_db4 = yes ; then
18379                 ol_cv_lib_db=-ldb4
18380         fi
18381 fi
18382
18383 if test $ol_cv_lib_db = no ; then
18384         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18385 echo "configure:18386: checking for Berkeley DB link (-ldb)" >&5
18386 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18387   echo $ac_n "(cached) $ac_c" 1>&6
18388 else
18389   
18390         ol_DB_LIB=-ldb
18391         ol_LIBS=$LIBS
18392         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18393
18394         cat > conftest.$ac_ext <<EOF
18395 #line 18396 "configure"
18396 #include "confdefs.h"
18397
18398 #ifdef HAVE_DB_185_H
18399 # include <db_185.h>
18400 #else
18401 # include <db.h>
18402 #endif
18403
18404 #ifndef DB_VERSION_MAJOR
18405 # define DB_VERSION_MAJOR 1
18406 #endif
18407
18408 #ifndef NULL
18409 #define NULL ((void*)0)
18410 #endif
18411
18412 int main() {
18413
18414 #if DB_VERSION_MAJOR > 1
18415         {
18416                 char *version;
18417                 int major, minor, patch;
18418
18419                 version = db_version( &major, &minor, &patch );
18420
18421                 if( major != DB_VERSION_MAJOR ||
18422                         minor < DB_VERSION_MINOR )
18423                 {
18424                         printf("Berkeley DB version mismatch\n"
18425                                 "\texpected: %s\n\tgot: %s\n",
18426                                 DB_VERSION_STRING, version);
18427                         return 1;
18428                 }
18429         }
18430 #endif
18431
18432 #if DB_VERSION_MAJOR > 2
18433         db_env_create( NULL, 0 );
18434 #elif DB_VERSION_MAJOR > 1
18435         db_appexit( NULL );
18436 #else
18437         (void) dbopen( NULL, 0, 0, 0, NULL);
18438 #endif
18439
18440 ; return 0; }
18441 EOF
18442 if { (eval echo configure:18443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18443   rm -rf conftest*
18444   ol_cv_db_db=yes
18445 else
18446   echo "configure: failed program was:" >&5
18447   cat conftest.$ac_ext >&5
18448   rm -rf conftest*
18449   ol_cv_db_db=no
18450 fi
18451 rm -f conftest*
18452
18453         LIBS="$ol_LIBS"
18454
18455 fi
18456
18457 echo "$ac_t""$ol_cv_db_db" 1>&6
18458
18459         if test $ol_cv_db_db = yes ; then
18460                 ol_cv_lib_db=-ldb
18461         fi
18462 fi
18463
18464 if test $ol_cv_lib_db = no ; then
18465         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18466 echo "configure:18467: checking for Berkeley DB link (-ldb3)" >&5
18467 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18468   echo $ac_n "(cached) $ac_c" 1>&6
18469 else
18470   
18471         ol_DB_LIB=-ldb3
18472         ol_LIBS=$LIBS
18473         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18474
18475         cat > conftest.$ac_ext <<EOF
18476 #line 18477 "configure"
18477 #include "confdefs.h"
18478
18479 #ifdef HAVE_DB_185_H
18480 # include <db_185.h>
18481 #else
18482 # include <db.h>
18483 #endif
18484
18485 #ifndef DB_VERSION_MAJOR
18486 # define DB_VERSION_MAJOR 1
18487 #endif
18488
18489 #ifndef NULL
18490 #define NULL ((void*)0)
18491 #endif
18492
18493 int main() {
18494
18495 #if DB_VERSION_MAJOR > 1
18496         {
18497                 char *version;
18498                 int major, minor, patch;
18499
18500                 version = db_version( &major, &minor, &patch );
18501
18502                 if( major != DB_VERSION_MAJOR ||
18503                         minor < DB_VERSION_MINOR )
18504                 {
18505                         printf("Berkeley DB version mismatch\n"
18506                                 "\texpected: %s\n\tgot: %s\n",
18507                                 DB_VERSION_STRING, version);
18508                         return 1;
18509                 }
18510         }
18511 #endif
18512
18513 #if DB_VERSION_MAJOR > 2
18514         db_env_create( NULL, 0 );
18515 #elif DB_VERSION_MAJOR > 1
18516         db_appexit( NULL );
18517 #else
18518         (void) dbopen( NULL, 0, 0, 0, NULL);
18519 #endif
18520
18521 ; return 0; }
18522 EOF
18523 if { (eval echo configure:18524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18524   rm -rf conftest*
18525   ol_cv_db_db3=yes
18526 else
18527   echo "configure: failed program was:" >&5
18528   cat conftest.$ac_ext >&5
18529   rm -rf conftest*
18530   ol_cv_db_db3=no
18531 fi
18532 rm -f conftest*
18533
18534         LIBS="$ol_LIBS"
18535
18536 fi
18537
18538 echo "$ac_t""$ol_cv_db_db3" 1>&6
18539
18540         if test $ol_cv_db_db3 = yes ; then
18541                 ol_cv_lib_db=-ldb3
18542         fi
18543 fi
18544
18545 if test $ol_cv_lib_db = no ; then
18546         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18547 echo "configure:18548: checking for Berkeley DB link (-ldb-3)" >&5
18548 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18549   echo $ac_n "(cached) $ac_c" 1>&6
18550 else
18551   
18552         ol_DB_LIB=-ldb-3
18553         ol_LIBS=$LIBS
18554         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18555
18556         cat > conftest.$ac_ext <<EOF
18557 #line 18558 "configure"
18558 #include "confdefs.h"
18559
18560 #ifdef HAVE_DB_185_H
18561 # include <db_185.h>
18562 #else
18563 # include <db.h>
18564 #endif
18565
18566 #ifndef DB_VERSION_MAJOR
18567 # define DB_VERSION_MAJOR 1
18568 #endif
18569
18570 #ifndef NULL
18571 #define NULL ((void*)0)
18572 #endif
18573
18574 int main() {
18575
18576 #if DB_VERSION_MAJOR > 1
18577         {
18578                 char *version;
18579                 int major, minor, patch;
18580
18581                 version = db_version( &major, &minor, &patch );
18582
18583                 if( major != DB_VERSION_MAJOR ||
18584                         minor < DB_VERSION_MINOR )
18585                 {
18586                         printf("Berkeley DB version mismatch\n"
18587                                 "\texpected: %s\n\tgot: %s\n",
18588                                 DB_VERSION_STRING, version);
18589                         return 1;
18590                 }
18591         }
18592 #endif
18593
18594 #if DB_VERSION_MAJOR > 2
18595         db_env_create( NULL, 0 );
18596 #elif DB_VERSION_MAJOR > 1
18597         db_appexit( NULL );
18598 #else
18599         (void) dbopen( NULL, 0, 0, 0, NULL);
18600 #endif
18601
18602 ; return 0; }
18603 EOF
18604 if { (eval echo configure:18605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18605   rm -rf conftest*
18606   ol_cv_db_db_3=yes
18607 else
18608   echo "configure: failed program was:" >&5
18609   cat conftest.$ac_ext >&5
18610   rm -rf conftest*
18611   ol_cv_db_db_3=no
18612 fi
18613 rm -f conftest*
18614
18615         LIBS="$ol_LIBS"
18616
18617 fi
18618
18619 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18620
18621         if test $ol_cv_db_db_3 = yes ; then
18622                 ol_cv_lib_db=-ldb-3
18623         fi
18624 fi
18625
18626 if test $ol_cv_lib_db = no ; then
18627         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18628 echo "configure:18629: checking for Berkeley DB link (-ldb2)" >&5
18629 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18630   echo $ac_n "(cached) $ac_c" 1>&6
18631 else
18632   
18633         ol_DB_LIB=-ldb2
18634         ol_LIBS=$LIBS
18635         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18636
18637         cat > conftest.$ac_ext <<EOF
18638 #line 18639 "configure"
18639 #include "confdefs.h"
18640
18641 #ifdef HAVE_DB_185_H
18642 # include <db_185.h>
18643 #else
18644 # include <db.h>
18645 #endif
18646
18647 #ifndef DB_VERSION_MAJOR
18648 # define DB_VERSION_MAJOR 1
18649 #endif
18650
18651 #ifndef NULL
18652 #define NULL ((void*)0)
18653 #endif
18654
18655 int main() {
18656
18657 #if DB_VERSION_MAJOR > 1
18658         {
18659                 char *version;
18660                 int major, minor, patch;
18661
18662                 version = db_version( &major, &minor, &patch );
18663
18664                 if( major != DB_VERSION_MAJOR ||
18665                         minor < DB_VERSION_MINOR )
18666                 {
18667                         printf("Berkeley DB version mismatch\n"
18668                                 "\texpected: %s\n\tgot: %s\n",
18669                                 DB_VERSION_STRING, version);
18670                         return 1;
18671                 }
18672         }
18673 #endif
18674
18675 #if DB_VERSION_MAJOR > 2
18676         db_env_create( NULL, 0 );
18677 #elif DB_VERSION_MAJOR > 1
18678         db_appexit( NULL );
18679 #else
18680         (void) dbopen( NULL, 0, 0, 0, NULL);
18681 #endif
18682
18683 ; return 0; }
18684 EOF
18685 if { (eval echo configure:18686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18686   rm -rf conftest*
18687   ol_cv_db_db2=yes
18688 else
18689   echo "configure: failed program was:" >&5
18690   cat conftest.$ac_ext >&5
18691   rm -rf conftest*
18692   ol_cv_db_db2=no
18693 fi
18694 rm -f conftest*
18695
18696         LIBS="$ol_LIBS"
18697
18698 fi
18699
18700 echo "$ac_t""$ol_cv_db_db2" 1>&6
18701
18702         if test $ol_cv_db_db2 = yes ; then
18703                 ol_cv_lib_db=-ldb2
18704         fi
18705 fi
18706
18707 if test $ol_cv_lib_db = no ; then
18708         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18709 echo "configure:18710: checking for Berkeley DB link (-ldb-2)" >&5
18710 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18711   echo $ac_n "(cached) $ac_c" 1>&6
18712 else
18713   
18714         ol_DB_LIB=-ldb-2
18715         ol_LIBS=$LIBS
18716         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18717
18718         cat > conftest.$ac_ext <<EOF
18719 #line 18720 "configure"
18720 #include "confdefs.h"
18721
18722 #ifdef HAVE_DB_185_H
18723 # include <db_185.h>
18724 #else
18725 # include <db.h>
18726 #endif
18727
18728 #ifndef DB_VERSION_MAJOR
18729 # define DB_VERSION_MAJOR 1
18730 #endif
18731
18732 #ifndef NULL
18733 #define NULL ((void*)0)
18734 #endif
18735
18736 int main() {
18737
18738 #if DB_VERSION_MAJOR > 1
18739         {
18740                 char *version;
18741                 int major, minor, patch;
18742
18743                 version = db_version( &major, &minor, &patch );
18744
18745                 if( major != DB_VERSION_MAJOR ||
18746                         minor < DB_VERSION_MINOR )
18747                 {
18748                         printf("Berkeley DB version mismatch\n"
18749                                 "\texpected: %s\n\tgot: %s\n",
18750                                 DB_VERSION_STRING, version);
18751                         return 1;
18752                 }
18753         }
18754 #endif
18755
18756 #if DB_VERSION_MAJOR > 2
18757         db_env_create( NULL, 0 );
18758 #elif DB_VERSION_MAJOR > 1
18759         db_appexit( NULL );
18760 #else
18761         (void) dbopen( NULL, 0, 0, 0, NULL);
18762 #endif
18763
18764 ; return 0; }
18765 EOF
18766 if { (eval echo configure:18767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18767   rm -rf conftest*
18768   ol_cv_db_db_2=yes
18769 else
18770   echo "configure: failed program was:" >&5
18771   cat conftest.$ac_ext >&5
18772   rm -rf conftest*
18773   ol_cv_db_db_2=no
18774 fi
18775 rm -f conftest*
18776
18777         LIBS="$ol_LIBS"
18778
18779 fi
18780
18781 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18782
18783         if test $ol_cv_db_db_2 = yes ; then
18784                 ol_cv_lib_db=-ldb-2
18785         fi
18786 fi
18787
18788 if test $ol_cv_lib_db = no ; then
18789         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18790 echo "configure:18791: checking for Berkeley DB link (-ldb1)" >&5
18791 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18792   echo $ac_n "(cached) $ac_c" 1>&6
18793 else
18794   
18795         ol_DB_LIB=-ldb1
18796         ol_LIBS=$LIBS
18797         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18798
18799         cat > conftest.$ac_ext <<EOF
18800 #line 18801 "configure"
18801 #include "confdefs.h"
18802
18803 #ifdef HAVE_DB_185_H
18804 # include <db_185.h>
18805 #else
18806 # include <db.h>
18807 #endif
18808
18809 #ifndef DB_VERSION_MAJOR
18810 # define DB_VERSION_MAJOR 1
18811 #endif
18812
18813 #ifndef NULL
18814 #define NULL ((void*)0)
18815 #endif
18816
18817 int main() {
18818
18819 #if DB_VERSION_MAJOR > 1
18820         {
18821                 char *version;
18822                 int major, minor, patch;
18823
18824                 version = db_version( &major, &minor, &patch );
18825
18826                 if( major != DB_VERSION_MAJOR ||
18827                         minor < DB_VERSION_MINOR )
18828                 {
18829                         printf("Berkeley DB version mismatch\n"
18830                                 "\texpected: %s\n\tgot: %s\n",
18831                                 DB_VERSION_STRING, version);
18832                         return 1;
18833                 }
18834         }
18835 #endif
18836
18837 #if DB_VERSION_MAJOR > 2
18838         db_env_create( NULL, 0 );
18839 #elif DB_VERSION_MAJOR > 1
18840         db_appexit( NULL );
18841 #else
18842         (void) dbopen( NULL, 0, 0, 0, NULL);
18843 #endif
18844
18845 ; return 0; }
18846 EOF
18847 if { (eval echo configure:18848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18848   rm -rf conftest*
18849   ol_cv_db_db1=yes
18850 else
18851   echo "configure: failed program was:" >&5
18852   cat conftest.$ac_ext >&5
18853   rm -rf conftest*
18854   ol_cv_db_db1=no
18855 fi
18856 rm -f conftest*
18857
18858         LIBS="$ol_LIBS"
18859
18860 fi
18861
18862 echo "$ac_t""$ol_cv_db_db1" 1>&6
18863
18864         if test $ol_cv_db_db1 = yes ; then
18865                 ol_cv_lib_db=-ldb1
18866         fi
18867 fi
18868
18869 if test $ol_cv_lib_db = no ; then
18870         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18871 echo "configure:18872: checking for Berkeley DB link (-ldb-1)" >&5
18872 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18873   echo $ac_n "(cached) $ac_c" 1>&6
18874 else
18875   
18876         ol_DB_LIB=-ldb-1
18877         ol_LIBS=$LIBS
18878         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18879
18880         cat > conftest.$ac_ext <<EOF
18881 #line 18882 "configure"
18882 #include "confdefs.h"
18883
18884 #ifdef HAVE_DB_185_H
18885 # include <db_185.h>
18886 #else
18887 # include <db.h>
18888 #endif
18889
18890 #ifndef DB_VERSION_MAJOR
18891 # define DB_VERSION_MAJOR 1
18892 #endif
18893
18894 #ifndef NULL
18895 #define NULL ((void*)0)
18896 #endif
18897
18898 int main() {
18899
18900 #if DB_VERSION_MAJOR > 1
18901         {
18902                 char *version;
18903                 int major, minor, patch;
18904
18905                 version = db_version( &major, &minor, &patch );
18906
18907                 if( major != DB_VERSION_MAJOR ||
18908                         minor < DB_VERSION_MINOR )
18909                 {
18910                         printf("Berkeley DB version mismatch\n"
18911                                 "\texpected: %s\n\tgot: %s\n",
18912                                 DB_VERSION_STRING, version);
18913                         return 1;
18914                 }
18915         }
18916 #endif
18917
18918 #if DB_VERSION_MAJOR > 2
18919         db_env_create( NULL, 0 );
18920 #elif DB_VERSION_MAJOR > 1
18921         db_appexit( NULL );
18922 #else
18923         (void) dbopen( NULL, 0, 0, 0, NULL);
18924 #endif
18925
18926 ; return 0; }
18927 EOF
18928 if { (eval echo configure:18929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18929   rm -rf conftest*
18930   ol_cv_db_db_1=yes
18931 else
18932   echo "configure: failed program was:" >&5
18933   cat conftest.$ac_ext >&5
18934   rm -rf conftest*
18935   ol_cv_db_db_1=no
18936 fi
18937 rm -f conftest*
18938
18939         LIBS="$ol_LIBS"
18940
18941 fi
18942
18943 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18944
18945         if test $ol_cv_db_db_1 = yes ; then
18946                 ol_cv_lib_db=-ldb-1
18947         fi
18948 fi
18949
18950
18951         if test "$ol_cv_lib_db" != no ; then
18952                 ol_cv_berkeley_db=yes
18953                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18954 echo "configure:18955: checking for Berkeley DB thread support" >&5
18955 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18956   echo $ac_n "(cached) $ac_c" 1>&6
18957 else
18958   
18959         ol_LIBS="$LIBS"
18960         LIBS="$LTHREAD_LIBS $LIBS"
18961         if test $ol_cv_lib_db != yes ; then
18962                 LIBS="$ol_cv_lib_db $LIBS"
18963         fi
18964
18965         if test "$cross_compiling" = yes; then
18966   ol_cv_berkeley_db_thread=cross
18967 else
18968   cat > conftest.$ac_ext <<EOF
18969 #line 18970 "configure"
18970 #include "confdefs.h"
18971
18972 #ifdef HAVE_DB_185_H
18973         choke me;
18974 #else
18975 #include <db.h>
18976 #endif
18977 #ifndef NULL
18978 #define NULL ((void *)0)
18979 #endif
18980 main()
18981 {
18982         int rc;
18983         u_int32_t flags = DB_CREATE |
18984 #ifdef DB_PRIVATE
18985                 DB_PRIVATE |
18986 #endif
18987                 DB_THREAD;
18988
18989 #if DB_VERSION_MAJOR > 2
18990         DB_ENV *env = NULL;
18991
18992         rc = db_env_create( &env, 0 );
18993
18994         flags |= DB_INIT_MPOOL;
18995 #ifdef DB_MPOOL_PRIVATE
18996         flags |= DB_MPOOL_PRIVATE;
18997 #endif
18998
18999         if( rc ) {
19000                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19001                 return rc;
19002         }
19003
19004 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19005         rc = env->open( env, NULL, flags, 0 );
19006 #else
19007         rc = env->open( env, NULL, NULL, flags, 0 );
19008 #endif
19009
19010         if ( rc == 0 ) {
19011                 rc = env->close( env, 0 );
19012         }
19013
19014         if( rc ) {
19015                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19016                 return rc;
19017         }
19018
19019 #else
19020         DB_ENV env;
19021         memset( &env, '\0', sizeof(env) );
19022
19023         rc = db_appinit( NULL, NULL, &env, flags );
19024
19025         if( rc == 0 ) {
19026                 db_appexit( &env );
19027         }
19028
19029         unlink("__db_mpool.share");
19030         unlink("__db_lock.share");
19031 #endif
19032
19033         return rc;
19034 }
19035 EOF
19036 if { (eval echo configure:19037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19037 then
19038   ol_cv_berkeley_db_thread=yes
19039 else
19040   echo "configure: failed program was:" >&5
19041   cat conftest.$ac_ext >&5
19042   rm -fr conftest*
19043   ol_cv_berkeley_db_thread=no
19044 fi
19045 rm -fr conftest*
19046 fi
19047
19048
19049         LIBS="$ol_LIBS"
19050
19051 fi
19052
19053 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19054
19055         if test $ol_cv_berkeley_db_thread != no ; then
19056                 cat >> confdefs.h <<\EOF
19057 #define HAVE_BERKELEY_DB_THREAD 1
19058 EOF
19059
19060         fi
19061
19062         fi
19063 fi
19064
19065         fi
19066
19067         if test $ol_cv_berkeley_db != no ; then
19068                 cat >> confdefs.h <<\EOF
19069 #define HAVE_BERKELEY_DB 1
19070 EOF
19071
19072
19073                 ol_link_ldbm=berkeley
19074                 ol_with_ldbm_api=berkeley
19075
19076                 if test $ol_with_ldbm_type = hash ; then
19077                         cat >> confdefs.h <<\EOF
19078 #define LDBM_USE_DBHASH 1
19079 EOF
19080
19081                 else
19082                         cat >> confdefs.h <<\EOF
19083 #define LDBM_USE_DBBTREE 1
19084 EOF
19085
19086                 fi
19087
19088                                                 if test $ol_cv_lib_db != yes ; then
19089                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19090                 fi
19091         fi
19092 fi
19093
19094 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19095         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19096 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19097         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19098 echo "configure:19099: checking Berkeley DB version for BDB backend" >&5
19099 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19100   echo $ac_n "(cached) $ac_c" 1>&6
19101 else
19102   
19103         cat > conftest.$ac_ext <<EOF
19104 #line 19105 "configure"
19105 #include "confdefs.h"
19106
19107 #include <db.h>
19108
19109  /* this check could be improved */
19110 #ifndef DB_VERSION_MAJOR
19111 #       define DB_VERSION_MAJOR 1
19112 #endif
19113 #ifndef DB_VERSION_MINOR
19114 #       define DB_VERSION_MINOR 0
19115 #endif
19116
19117 /* require 4.1 or later */
19118 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
19119         __db_version_compat
19120 #endif
19121         
19122 EOF
19123 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19124   egrep "__db_version_compat" >/dev/null 2>&1; then
19125   rm -rf conftest*
19126   ol_cv_bdb_compat=yes
19127 else
19128   rm -rf conftest*
19129   ol_cv_bdb_compat=no
19130 fi
19131 rm -f conftest*
19132
19133 fi
19134
19135 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19136
19137
19138         if test $ol_cv_bdb_compat = yes ; then
19139                 ol_enable_bdb=yes
19140         elif test $ol_enable_bdb = yes ; then
19141                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19142         else
19143                 ol_enable_bdb=no
19144         fi
19145 fi
19146 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19147         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19148 fi
19149
19150 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19151         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19152         ol_with_ldbm_api=none
19153 fi
19154
19155 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19156         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19157 echo "configure:19158: checking for MDBM library" >&5
19158 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19159   echo $ac_n "(cached) $ac_c" 1>&6
19160 else
19161         ol_LIBS="$LIBS"
19162         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19163 echo "configure:19164: checking for mdbm_set_chain" >&5
19164 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19165   echo $ac_n "(cached) $ac_c" 1>&6
19166 else
19167   cat > conftest.$ac_ext <<EOF
19168 #line 19169 "configure"
19169 #include "confdefs.h"
19170 /* System header to define __stub macros and hopefully few prototypes,
19171     which can conflict with char mdbm_set_chain(); below.  */
19172 #include <assert.h>
19173 /* Override any gcc2 internal prototype to avoid an error.  */
19174 /* We use char because int might match the return type of a gcc2
19175     builtin and then its argument prototype would still apply.  */
19176 char mdbm_set_chain();
19177 char (*f)();
19178
19179 int main() {
19180
19181 /* The GNU C library defines this for functions which it implements
19182     to always fail with ENOSYS.  Some functions are actually named
19183     something starting with __ and the normal name is an alias.  */
19184 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19185 choke me
19186 #else
19187 f = mdbm_set_chain;
19188 #endif
19189
19190 ; return 0; }
19191 EOF
19192 if { (eval echo configure:19193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19193   rm -rf conftest*
19194   eval "ac_cv_func_mdbm_set_chain=yes"
19195 else
19196   echo "configure: failed program was:" >&5
19197   cat conftest.$ac_ext >&5
19198   rm -rf conftest*
19199   eval "ac_cv_func_mdbm_set_chain=no"
19200 fi
19201 rm -f conftest*
19202 fi
19203
19204 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19205   echo "$ac_t""yes" 1>&6
19206   ol_cv_lib_mdbm=yes
19207 else
19208   echo "$ac_t""no" 1>&6
19209
19210                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19211 echo "configure:19212: checking for mdbm_set_chain in -lmdbm" >&5
19212 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19214   echo $ac_n "(cached) $ac_c" 1>&6
19215 else
19216   ac_save_LIBS="$LIBS"
19217 LIBS="-lmdbm  $LIBS"
19218 cat > conftest.$ac_ext <<EOF
19219 #line 19220 "configure"
19220 #include "confdefs.h"
19221 /* Override any gcc2 internal prototype to avoid an error.  */
19222 /* We use char because int might match the return type of a gcc2
19223     builtin and then its argument prototype would still apply.  */
19224 char mdbm_set_chain();
19225
19226 int main() {
19227 mdbm_set_chain()
19228 ; return 0; }
19229 EOF
19230 if { (eval echo configure:19231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19231   rm -rf conftest*
19232   eval "ac_cv_lib_$ac_lib_var=yes"
19233 else
19234   echo "configure: failed program was:" >&5
19235   cat conftest.$ac_ext >&5
19236   rm -rf conftest*
19237   eval "ac_cv_lib_$ac_lib_var=no"
19238 fi
19239 rm -f conftest*
19240 LIBS="$ac_save_LIBS"
19241
19242 fi
19243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19244   echo "$ac_t""yes" 1>&6
19245   ol_cv_lib_mdbm=-lmdbm
19246 else
19247   echo "$ac_t""no" 1>&6
19248 ol_cv_lib_mdbm=no
19249 fi
19250
19251         
19252 fi
19253
19254         LIBS="$ol_LIBS"
19255
19256 fi
19257
19258 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19259
19260
19261  for ac_hdr in mdbm.h
19262 do
19263 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19264 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19265 echo "configure:19266: checking for $ac_hdr" >&5
19266 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19267   echo $ac_n "(cached) $ac_c" 1>&6
19268 else
19269   cat > conftest.$ac_ext <<EOF
19270 #line 19271 "configure"
19271 #include "confdefs.h"
19272 #include <$ac_hdr>
19273 EOF
19274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19275 { (eval echo configure:19276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19277 if test -z "$ac_err"; then
19278   rm -rf conftest*
19279   eval "ac_cv_header_$ac_safe=yes"
19280 else
19281   echo "$ac_err" >&5
19282   echo "configure: failed program was:" >&5
19283   cat conftest.$ac_ext >&5
19284   rm -rf conftest*
19285   eval "ac_cv_header_$ac_safe=no"
19286 fi
19287 rm -f conftest*
19288 fi
19289 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19290   echo "$ac_t""yes" 1>&6
19291     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19292   cat >> confdefs.h <<EOF
19293 #define $ac_tr_hdr 1
19294 EOF
19295  
19296 else
19297   echo "$ac_t""no" 1>&6
19298 fi
19299 done
19300
19301  echo $ac_n "checking for db""... $ac_c" 1>&6
19302 echo "configure:19303: checking for db" >&5
19303 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19304   echo $ac_n "(cached) $ac_c" 1>&6
19305 else
19306   
19307         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19308                 ol_cv_mdbm=no
19309         else
19310                 ol_cv_mdbm=yes
19311         fi
19312
19313 fi
19314
19315 echo "$ac_t""$ol_cv_mdbm" 1>&6
19316  if test $ol_cv_mdbm = yes ; then
19317         cat >> confdefs.h <<\EOF
19318 #define HAVE_MDBM 1
19319 EOF
19320
19321  fi
19322
19323
19324         if test $ol_cv_mdbm = yes ; then
19325                 ol_link_ldbm=mdbm
19326                 ol_with_ldbm_api=mdbm
19327                 if test $ol_cv_lib_mdbm != yes ; then
19328                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19329                 fi
19330         fi
19331 fi
19332
19333 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19334         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19335 echo "configure:19336: checking for GDBM library" >&5
19336 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19337   echo $ac_n "(cached) $ac_c" 1>&6
19338 else
19339         ol_LIBS="$LIBS"
19340         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19341 echo "configure:19342: checking for gdbm_open" >&5
19342 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19343   echo $ac_n "(cached) $ac_c" 1>&6
19344 else
19345   cat > conftest.$ac_ext <<EOF
19346 #line 19347 "configure"
19347 #include "confdefs.h"
19348 /* System header to define __stub macros and hopefully few prototypes,
19349     which can conflict with char gdbm_open(); below.  */
19350 #include <assert.h>
19351 /* Override any gcc2 internal prototype to avoid an error.  */
19352 /* We use char because int might match the return type of a gcc2
19353     builtin and then its argument prototype would still apply.  */
19354 char gdbm_open();
19355 char (*f)();
19356
19357 int main() {
19358
19359 /* The GNU C library defines this for functions which it implements
19360     to always fail with ENOSYS.  Some functions are actually named
19361     something starting with __ and the normal name is an alias.  */
19362 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19363 choke me
19364 #else
19365 f = gdbm_open;
19366 #endif
19367
19368 ; return 0; }
19369 EOF
19370 if { (eval echo configure:19371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19371   rm -rf conftest*
19372   eval "ac_cv_func_gdbm_open=yes"
19373 else
19374   echo "configure: failed program was:" >&5
19375   cat conftest.$ac_ext >&5
19376   rm -rf conftest*
19377   eval "ac_cv_func_gdbm_open=no"
19378 fi
19379 rm -f conftest*
19380 fi
19381
19382 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19383   echo "$ac_t""yes" 1>&6
19384   ol_cv_lib_gdbm=yes
19385 else
19386   echo "$ac_t""no" 1>&6
19387
19388                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19389 echo "configure:19390: checking for gdbm_open in -lgdbm" >&5
19390 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19391 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19392   echo $ac_n "(cached) $ac_c" 1>&6
19393 else
19394   ac_save_LIBS="$LIBS"
19395 LIBS="-lgdbm  $LIBS"
19396 cat > conftest.$ac_ext <<EOF
19397 #line 19398 "configure"
19398 #include "confdefs.h"
19399 /* Override any gcc2 internal prototype to avoid an error.  */
19400 /* We use char because int might match the return type of a gcc2
19401     builtin and then its argument prototype would still apply.  */
19402 char gdbm_open();
19403
19404 int main() {
19405 gdbm_open()
19406 ; return 0; }
19407 EOF
19408 if { (eval echo configure:19409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19409   rm -rf conftest*
19410   eval "ac_cv_lib_$ac_lib_var=yes"
19411 else
19412   echo "configure: failed program was:" >&5
19413   cat conftest.$ac_ext >&5
19414   rm -rf conftest*
19415   eval "ac_cv_lib_$ac_lib_var=no"
19416 fi
19417 rm -f conftest*
19418 LIBS="$ac_save_LIBS"
19419
19420 fi
19421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19422   echo "$ac_t""yes" 1>&6
19423   ol_cv_lib_gdbm=-lgdbm
19424 else
19425   echo "$ac_t""no" 1>&6
19426 ol_cv_lib_gdbm=no
19427 fi
19428
19429         
19430 fi
19431
19432         LIBS="$ol_LIBS"
19433
19434 fi
19435
19436 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19437
19438
19439  for ac_hdr in gdbm.h
19440 do
19441 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19442 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19443 echo "configure:19444: checking for $ac_hdr" >&5
19444 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19445   echo $ac_n "(cached) $ac_c" 1>&6
19446 else
19447   cat > conftest.$ac_ext <<EOF
19448 #line 19449 "configure"
19449 #include "confdefs.h"
19450 #include <$ac_hdr>
19451 EOF
19452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19453 { (eval echo configure:19454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19455 if test -z "$ac_err"; then
19456   rm -rf conftest*
19457   eval "ac_cv_header_$ac_safe=yes"
19458 else
19459   echo "$ac_err" >&5
19460   echo "configure: failed program was:" >&5
19461   cat conftest.$ac_ext >&5
19462   rm -rf conftest*
19463   eval "ac_cv_header_$ac_safe=no"
19464 fi
19465 rm -f conftest*
19466 fi
19467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19468   echo "$ac_t""yes" 1>&6
19469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19470   cat >> confdefs.h <<EOF
19471 #define $ac_tr_hdr 1
19472 EOF
19473  
19474 else
19475   echo "$ac_t""no" 1>&6
19476 fi
19477 done
19478
19479  echo $ac_n "checking for db""... $ac_c" 1>&6
19480 echo "configure:19481: checking for db" >&5
19481 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19482   echo $ac_n "(cached) $ac_c" 1>&6
19483 else
19484   
19485         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19486                 ol_cv_gdbm=no
19487         else
19488                 ol_cv_gdbm=yes
19489         fi
19490
19491 fi
19492
19493 echo "$ac_t""$ol_cv_gdbm" 1>&6
19494  if test $ol_cv_gdbm = yes ; then
19495         cat >> confdefs.h <<\EOF
19496 #define HAVE_GDBM 1
19497 EOF
19498
19499  fi
19500
19501
19502         if test $ol_cv_gdbm = yes ; then
19503                 ol_link_ldbm=gdbm
19504                 ol_with_ldbm_api=gdbm
19505
19506                 if test $ol_cv_lib_gdbm != yes ; then
19507                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19508                 fi
19509         fi
19510 fi
19511
19512 if test $ol_with_ldbm_api = ndbm ; then
19513         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19514 echo "configure:19515: checking for NDBM library" >&5
19515 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19516   echo $ac_n "(cached) $ac_c" 1>&6
19517 else
19518         ol_LIBS="$LIBS"
19519         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19520 echo "configure:19521: checking for dbm_open" >&5
19521 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19522   echo $ac_n "(cached) $ac_c" 1>&6
19523 else
19524   cat > conftest.$ac_ext <<EOF
19525 #line 19526 "configure"
19526 #include "confdefs.h"
19527 /* System header to define __stub macros and hopefully few prototypes,
19528     which can conflict with char dbm_open(); below.  */
19529 #include <assert.h>
19530 /* Override any gcc2 internal prototype to avoid an error.  */
19531 /* We use char because int might match the return type of a gcc2
19532     builtin and then its argument prototype would still apply.  */
19533 char dbm_open();
19534 char (*f)();
19535
19536 int main() {
19537
19538 /* The GNU C library defines this for functions which it implements
19539     to always fail with ENOSYS.  Some functions are actually named
19540     something starting with __ and the normal name is an alias.  */
19541 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19542 choke me
19543 #else
19544 f = dbm_open;
19545 #endif
19546
19547 ; return 0; }
19548 EOF
19549 if { (eval echo configure:19550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19550   rm -rf conftest*
19551   eval "ac_cv_func_dbm_open=yes"
19552 else
19553   echo "configure: failed program was:" >&5
19554   cat conftest.$ac_ext >&5
19555   rm -rf conftest*
19556   eval "ac_cv_func_dbm_open=no"
19557 fi
19558 rm -f conftest*
19559 fi
19560
19561 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19562   echo "$ac_t""yes" 1>&6
19563   ol_cv_lib_ndbm=yes
19564 else
19565   echo "$ac_t""no" 1>&6
19566
19567                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19568 echo "configure:19569: checking for dbm_open in -lndbm" >&5
19569 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19570 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19571   echo $ac_n "(cached) $ac_c" 1>&6
19572 else
19573   ac_save_LIBS="$LIBS"
19574 LIBS="-lndbm  $LIBS"
19575 cat > conftest.$ac_ext <<EOF
19576 #line 19577 "configure"
19577 #include "confdefs.h"
19578 /* Override any gcc2 internal prototype to avoid an error.  */
19579 /* We use char because int might match the return type of a gcc2
19580     builtin and then its argument prototype would still apply.  */
19581 char dbm_open();
19582
19583 int main() {
19584 dbm_open()
19585 ; return 0; }
19586 EOF
19587 if { (eval echo configure:19588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19588   rm -rf conftest*
19589   eval "ac_cv_lib_$ac_lib_var=yes"
19590 else
19591   echo "configure: failed program was:" >&5
19592   cat conftest.$ac_ext >&5
19593   rm -rf conftest*
19594   eval "ac_cv_lib_$ac_lib_var=no"
19595 fi
19596 rm -f conftest*
19597 LIBS="$ac_save_LIBS"
19598
19599 fi
19600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19601   echo "$ac_t""yes" 1>&6
19602   ol_cv_lib_ndbm=-lndbm
19603 else
19604   echo "$ac_t""no" 1>&6
19605
19606                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19607 echo "configure:19608: checking for dbm_open in -ldbm" >&5
19608 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19610   echo $ac_n "(cached) $ac_c" 1>&6
19611 else
19612   ac_save_LIBS="$LIBS"
19613 LIBS="-ldbm  $LIBS"
19614 cat > conftest.$ac_ext <<EOF
19615 #line 19616 "configure"
19616 #include "confdefs.h"
19617 /* Override any gcc2 internal prototype to avoid an error.  */
19618 /* We use char because int might match the return type of a gcc2
19619     builtin and then its argument prototype would still apply.  */
19620 char dbm_open();
19621
19622 int main() {
19623 dbm_open()
19624 ; return 0; }
19625 EOF
19626 if { (eval echo configure:19627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19627   rm -rf conftest*
19628   eval "ac_cv_lib_$ac_lib_var=yes"
19629 else
19630   echo "configure: failed program was:" >&5
19631   cat conftest.$ac_ext >&5
19632   rm -rf conftest*
19633   eval "ac_cv_lib_$ac_lib_var=no"
19634 fi
19635 rm -f conftest*
19636 LIBS="$ac_save_LIBS"
19637
19638 fi
19639 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19640   echo "$ac_t""yes" 1>&6
19641   ol_cv_lib_ndbm=-ldbm
19642 else
19643   echo "$ac_t""no" 1>&6
19644 ol_cv_lib_ndbm=no
19645 fi
19646                 
19647 fi
19648
19649         
19650 fi
19651
19652         LIBS="$ol_LIBS"
19653
19654 fi
19655
19656 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19657
19658
19659  for ac_hdr in ndbm.h
19660 do
19661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19663 echo "configure:19664: checking for $ac_hdr" >&5
19664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19665   echo $ac_n "(cached) $ac_c" 1>&6
19666 else
19667   cat > conftest.$ac_ext <<EOF
19668 #line 19669 "configure"
19669 #include "confdefs.h"
19670 #include <$ac_hdr>
19671 EOF
19672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19673 { (eval echo configure:19674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19675 if test -z "$ac_err"; then
19676   rm -rf conftest*
19677   eval "ac_cv_header_$ac_safe=yes"
19678 else
19679   echo "$ac_err" >&5
19680   echo "configure: failed program was:" >&5
19681   cat conftest.$ac_ext >&5
19682   rm -rf conftest*
19683   eval "ac_cv_header_$ac_safe=no"
19684 fi
19685 rm -f conftest*
19686 fi
19687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19688   echo "$ac_t""yes" 1>&6
19689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19690   cat >> confdefs.h <<EOF
19691 #define $ac_tr_hdr 1
19692 EOF
19693  
19694 else
19695   echo "$ac_t""no" 1>&6
19696 fi
19697 done
19698
19699  echo $ac_n "checking for db""... $ac_c" 1>&6
19700 echo "configure:19701: checking for db" >&5
19701 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19702   echo $ac_n "(cached) $ac_c" 1>&6
19703 else
19704   
19705         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19706                 ol_cv_ndbm=no
19707         else
19708                 ol_cv_ndbm=yes
19709         fi
19710
19711 fi
19712
19713 echo "$ac_t""$ol_cv_ndbm" 1>&6
19714  if test $ol_cv_ndbm = yes ; then
19715         cat >> confdefs.h <<\EOF
19716 #define HAVE_NDBM 1
19717 EOF
19718
19719  fi
19720
19721
19722         if test $ol_cv_ndbm = yes ; then
19723                 ol_link_ldbm=ndbm
19724                 ol_with_ldbm_api=ndbm
19725
19726                 if test $ol_cv_lib_ndbm != yes ; then
19727                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19728                 fi
19729         fi
19730 fi
19731
19732 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19733         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19734         if test $ol_enable_ldbm = yes ; then
19735                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19736         fi
19737
19738         echo "configure: warning: disabling LDBM" 1>&2
19739         ol_enable_ldbm=no
19740 fi
19741
19742
19743 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19744         BUILD_LIBS_DYNAMIC=shared
19745         cat >> confdefs.h <<\EOF
19746 #define LDAP_LIBS_DYNAMIC 1
19747 EOF
19748
19749         LTSTATIC=""
19750 else
19751         BUILD_LIBS_DYNAMIC=static
19752         LTSTATIC="-static"
19753 fi
19754
19755 if test $ol_enable_wrappers != no ; then
19756         for ac_hdr in tcpd.h
19757 do
19758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19760 echo "configure:19761: checking for $ac_hdr" >&5
19761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19762   echo $ac_n "(cached) $ac_c" 1>&6
19763 else
19764   cat > conftest.$ac_ext <<EOF
19765 #line 19766 "configure"
19766 #include "confdefs.h"
19767 #include <$ac_hdr>
19768 EOF
19769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19770 { (eval echo configure:19771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19772 if test -z "$ac_err"; then
19773   rm -rf conftest*
19774   eval "ac_cv_header_$ac_safe=yes"
19775 else
19776   echo "$ac_err" >&5
19777   echo "configure: failed program was:" >&5
19778   cat conftest.$ac_ext >&5
19779   rm -rf conftest*
19780   eval "ac_cv_header_$ac_safe=no"
19781 fi
19782 rm -f conftest*
19783 fi
19784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19785   echo "$ac_t""yes" 1>&6
19786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19787   cat >> confdefs.h <<EOF
19788 #define $ac_tr_hdr 1
19789 EOF
19790  
19791                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19792 echo "configure:19793: checking for TCP wrappers library" >&5
19793                 save_LIBS="$LIBS"
19794                 LIBS="$LIBS -lwrap"
19795                 cat > conftest.$ac_ext <<EOF
19796 #line 19797 "configure"
19797 #include "confdefs.h"
19798
19799 #include <tcpd.h>
19800 int allow_severity = 0;
19801 int deny_severity  = 0;
19802
19803 struct request_info *req;
19804                 
19805 int main() {
19806
19807 hosts_access(req)
19808                 
19809 ; return 0; }
19810 EOF
19811 if { (eval echo configure:19812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19812   rm -rf conftest*
19813   echo "$ac_t""-lwrap" 1>&6
19814                 have_wrappers=yes
19815                 LIBS="$save_LIBS"
19816 else
19817   echo "configure: failed program was:" >&5
19818   cat conftest.$ac_ext >&5
19819   rm -rf conftest*
19820   
19821                                 LIBS="$LIBS -lnsl"
19822                 cat > conftest.$ac_ext <<EOF
19823 #line 19824 "configure"
19824 #include "confdefs.h"
19825
19826 #include <tcpd.h>
19827 int allow_severity = 0;
19828 int deny_severity  = 0;
19829
19830 struct request_info *req;
19831                 
19832 int main() {
19833
19834 hosts_access(req)
19835                 
19836 ; return 0; }
19837 EOF
19838 if { (eval echo configure:19839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19839   rm -rf conftest*
19840   echo "$ac_t""-lwrap -lnsl" 1>&6
19841                 have_wrappers=yes
19842                 LIBS="$save_LIBS -lnsl"
19843 else
19844   echo "configure: failed program was:" >&5
19845   cat conftest.$ac_ext >&5
19846   rm -rf conftest*
19847   
19848                 echo "$ac_t""no" 1>&6
19849                 have_wrappers=no
19850                 LIBS=$save_LIBS
19851 fi
19852 rm -f conftest*
19853 fi
19854 rm -f conftest*
19855 else
19856   echo "$ac_t""no" 1>&6
19857 have_wrappers=no
19858 fi
19859 done
19860
19861
19862         if test $have_wrappers = yes ; then
19863                 cat >> confdefs.h <<\EOF
19864 #define HAVE_TCPD 1
19865 EOF
19866
19867                 WRAP_LIBS="-lwrap"
19868         elif test $ol_enable_wrappers = yes ; then
19869                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19870         else
19871                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19872                 WRAP_LIBS=""
19873         fi
19874 fi
19875
19876 if test $ol_enable_syslog != no ; then
19877         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19878 echo "configure:19879: checking for openlog" >&5
19879 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19880   echo $ac_n "(cached) $ac_c" 1>&6
19881 else
19882   cat > conftest.$ac_ext <<EOF
19883 #line 19884 "configure"
19884 #include "confdefs.h"
19885 /* System header to define __stub macros and hopefully few prototypes,
19886     which can conflict with char openlog(); below.  */
19887 #include <assert.h>
19888 /* Override any gcc2 internal prototype to avoid an error.  */
19889 /* We use char because int might match the return type of a gcc2
19890     builtin and then its argument prototype would still apply.  */
19891 char openlog();
19892 char (*f)();
19893
19894 int main() {
19895
19896 /* The GNU C library defines this for functions which it implements
19897     to always fail with ENOSYS.  Some functions are actually named
19898     something starting with __ and the normal name is an alias.  */
19899 #if defined (__stub_openlog) || defined (__stub___openlog)
19900 choke me
19901 #else
19902 f = openlog;
19903 #endif
19904
19905 ; return 0; }
19906 EOF
19907 if { (eval echo configure:19908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19908   rm -rf conftest*
19909   eval "ac_cv_func_openlog=yes"
19910 else
19911   echo "configure: failed program was:" >&5
19912   cat conftest.$ac_ext >&5
19913   rm -rf conftest*
19914   eval "ac_cv_func_openlog=no"
19915 fi
19916 rm -f conftest*
19917 fi
19918
19919 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19920   echo "$ac_t""yes" 1>&6
19921   :
19922 else
19923   echo "$ac_t""no" 1>&6
19924 fi
19925
19926         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19927                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19928         fi
19929         ol_enable_syslog=$ac_cv_func_openlog
19930 fi
19931
19932
19933 ol_link_sql=no
19934 if test $ol_enable_sql != no ; then
19935         for ac_hdr in sql.h sqlext.h
19936 do
19937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19939 echo "configure:19940: checking for $ac_hdr" >&5
19940 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19941   echo $ac_n "(cached) $ac_c" 1>&6
19942 else
19943   cat > conftest.$ac_ext <<EOF
19944 #line 19945 "configure"
19945 #include "confdefs.h"
19946 #include <$ac_hdr>
19947 EOF
19948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19949 { (eval echo configure:19950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19951 if test -z "$ac_err"; then
19952   rm -rf conftest*
19953   eval "ac_cv_header_$ac_safe=yes"
19954 else
19955   echo "$ac_err" >&5
19956   echo "configure: failed program was:" >&5
19957   cat conftest.$ac_ext >&5
19958   rm -rf conftest*
19959   eval "ac_cv_header_$ac_safe=no"
19960 fi
19961 rm -f conftest*
19962 fi
19963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19964   echo "$ac_t""yes" 1>&6
19965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19966   cat >> confdefs.h <<EOF
19967 #define $ac_tr_hdr 1
19968 EOF
19969  
19970 else
19971   echo "$ac_t""no" 1>&6
19972 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19973         
19974 fi
19975 done
19976
19977
19978         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19979 echo "configure:19980: checking for SQLDriverConnect in -liodbc" >&5
19980 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19982   echo $ac_n "(cached) $ac_c" 1>&6
19983 else
19984   ac_save_LIBS="$LIBS"
19985 LIBS="-liodbc  $LIBS"
19986 cat > conftest.$ac_ext <<EOF
19987 #line 19988 "configure"
19988 #include "confdefs.h"
19989 /* Override any gcc2 internal prototype to avoid an error.  */
19990 /* We use char because int might match the return type of a gcc2
19991     builtin and then its argument prototype would still apply.  */
19992 char SQLDriverConnect();
19993
19994 int main() {
19995 SQLDriverConnect()
19996 ; return 0; }
19997 EOF
19998 if { (eval echo configure:19999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19999   rm -rf conftest*
20000   eval "ac_cv_lib_$ac_lib_var=yes"
20001 else
20002   echo "configure: failed program was:" >&5
20003   cat conftest.$ac_ext >&5
20004   rm -rf conftest*
20005   eval "ac_cv_lib_$ac_lib_var=no"
20006 fi
20007 rm -f conftest*
20008 LIBS="$ac_save_LIBS"
20009
20010 fi
20011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20012   echo "$ac_t""yes" 1>&6
20013   have_iodbc=yes
20014 else
20015   echo "$ac_t""no" 1>&6
20016 have_iodbc=no
20017 fi
20018
20019         if test $have_iodbc = yes ; then
20020                 ol_link_sql="-liodbc"
20021         else
20022                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20023 echo "configure:20024: checking for SQLDriverConnect in -lodbc" >&5
20024 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20025 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20026   echo $ac_n "(cached) $ac_c" 1>&6
20027 else
20028   ac_save_LIBS="$LIBS"
20029 LIBS="-lodbc  $LIBS"
20030 cat > conftest.$ac_ext <<EOF
20031 #line 20032 "configure"
20032 #include "confdefs.h"
20033 /* Override any gcc2 internal prototype to avoid an error.  */
20034 /* We use char because int might match the return type of a gcc2
20035     builtin and then its argument prototype would still apply.  */
20036 char SQLDriverConnect();
20037
20038 int main() {
20039 SQLDriverConnect()
20040 ; return 0; }
20041 EOF
20042 if { (eval echo configure:20043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20043   rm -rf conftest*
20044   eval "ac_cv_lib_$ac_lib_var=yes"
20045 else
20046   echo "configure: failed program was:" >&5
20047   cat conftest.$ac_ext >&5
20048   rm -rf conftest*
20049   eval "ac_cv_lib_$ac_lib_var=no"
20050 fi
20051 rm -f conftest*
20052 LIBS="$ac_save_LIBS"
20053
20054 fi
20055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20056   echo "$ac_t""yes" 1>&6
20057   have_odbc=yes
20058 else
20059   echo "$ac_t""no" 1>&6
20060 have_odbc=no
20061 fi
20062
20063                 if test $have_odbc = yes ; then
20064                         ol_link_sql="-lodbc"
20065                 fi
20066         fi
20067
20068         if test $ol_link_sql != no ; then
20069                 SLAPD_SQL_LIBS="$ol_link_sql"
20070
20071         elif test $ol_enable_sql != auto ; then
20072                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20073         fi
20074 fi
20075
20076 if test $ol_enable_tcl != no ; then
20077         for ac_hdr in tcl.h
20078 do
20079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20081 echo "configure:20082: checking for $ac_hdr" >&5
20082 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20083   echo $ac_n "(cached) $ac_c" 1>&6
20084 else
20085   cat > conftest.$ac_ext <<EOF
20086 #line 20087 "configure"
20087 #include "confdefs.h"
20088 #include <$ac_hdr>
20089 EOF
20090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20091 { (eval echo configure:20092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20093 if test -z "$ac_err"; then
20094   rm -rf conftest*
20095   eval "ac_cv_header_$ac_safe=yes"
20096 else
20097   echo "$ac_err" >&5
20098   echo "configure: failed program was:" >&5
20099   cat conftest.$ac_ext >&5
20100   rm -rf conftest*
20101   eval "ac_cv_header_$ac_safe=no"
20102 fi
20103 rm -f conftest*
20104 fi
20105 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20106   echo "$ac_t""yes" 1>&6
20107     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20108   cat >> confdefs.h <<EOF
20109 #define $ac_tr_hdr 1
20110 EOF
20111  
20112 else
20113   echo "$ac_t""no" 1>&6
20114 fi
20115 done
20116
20117
20118         if test $ac_cv_header_tcl_h != yes ; then
20119                 have_tcl=no
20120         else
20121                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20122                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20123 echo "configure:20124: checking for main in -l$lib" >&5
20124 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20126   echo $ac_n "(cached) $ac_c" 1>&6
20127 else
20128   ac_save_LIBS="$LIBS"
20129 LIBS="-l$lib  $LIBS"
20130 cat > conftest.$ac_ext <<EOF
20131 #line 20132 "configure"
20132 #include "confdefs.h"
20133
20134 int main() {
20135 main()
20136 ; return 0; }
20137 EOF
20138 if { (eval echo configure:20139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20139   rm -rf conftest*
20140   eval "ac_cv_lib_$ac_lib_var=yes"
20141 else
20142   echo "configure: failed program was:" >&5
20143   cat conftest.$ac_ext >&5
20144   rm -rf conftest*
20145   eval "ac_cv_lib_$ac_lib_var=no"
20146 fi
20147 rm -f conftest*
20148 LIBS="$ac_save_LIBS"
20149
20150 fi
20151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20152   echo "$ac_t""yes" 1>&6
20153   have_tcl=yes
20154                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20155                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20156                            else
20157                                         MOD_TCL_LIB="-l${lib}"
20158                            fi;break
20159 else
20160   echo "$ac_t""no" 1>&6
20161 have_tcl=no
20162 fi
20163
20164                 done
20165         fi
20166
20167         if test $have_tcl != yes ; then
20168                 echo "configure: warning: could not find -ltcl" 1>&2
20169                 if test $ol_enable_tcl = yes ; then
20170                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20171                 fi
20172
20173                 ol_enable_tcl=no
20174         fi
20175 fi
20176
20177 ol_link_termcap=no
20178 for ac_hdr in termcap.h ncurses.h
20179 do
20180 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20181 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20182 echo "configure:20183: checking for $ac_hdr" >&5
20183 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20184   echo $ac_n "(cached) $ac_c" 1>&6
20185 else
20186   cat > conftest.$ac_ext <<EOF
20187 #line 20188 "configure"
20188 #include "confdefs.h"
20189 #include <$ac_hdr>
20190 EOF
20191 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20192 { (eval echo configure:20193: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20193 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20194 if test -z "$ac_err"; then
20195   rm -rf conftest*
20196   eval "ac_cv_header_$ac_safe=yes"
20197 else
20198   echo "$ac_err" >&5
20199   echo "configure: failed program was:" >&5
20200   cat conftest.$ac_ext >&5
20201   rm -rf conftest*
20202   eval "ac_cv_header_$ac_safe=no"
20203 fi
20204 rm -f conftest*
20205 fi
20206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20207   echo "$ac_t""yes" 1>&6
20208     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20209   cat >> confdefs.h <<EOF
20210 #define $ac_tr_hdr 1
20211 EOF
20212  
20213 else
20214   echo "$ac_t""no" 1>&6
20215 fi
20216 done
20217
20218
20219 if test $ol_link_termcap = no ; then
20220         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
20221 echo "configure:20222: checking for tputs in -ltermcap" >&5
20222 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20224   echo $ac_n "(cached) $ac_c" 1>&6
20225 else
20226   ac_save_LIBS="$LIBS"
20227 LIBS="-ltermcap  $LIBS"
20228 cat > conftest.$ac_ext <<EOF
20229 #line 20230 "configure"
20230 #include "confdefs.h"
20231 /* Override any gcc2 internal prototype to avoid an error.  */
20232 /* We use char because int might match the return type of a gcc2
20233     builtin and then its argument prototype would still apply.  */
20234 char tputs();
20235
20236 int main() {
20237 tputs()
20238 ; return 0; }
20239 EOF
20240 if { (eval echo configure:20241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20241   rm -rf conftest*
20242   eval "ac_cv_lib_$ac_lib_var=yes"
20243 else
20244   echo "configure: failed program was:" >&5
20245   cat conftest.$ac_ext >&5
20246   rm -rf conftest*
20247   eval "ac_cv_lib_$ac_lib_var=no"
20248 fi
20249 rm -f conftest*
20250 LIBS="$ac_save_LIBS"
20251
20252 fi
20253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20254   echo "$ac_t""yes" 1>&6
20255   have_termcap=yes
20256 else
20257   echo "$ac_t""no" 1>&6
20258 have_termcap=no
20259 fi
20260
20261         if test $have_termcap = yes ; then
20262                 cat >> confdefs.h <<\EOF
20263 #define HAVE_TERMCAP 1
20264 EOF
20265
20266                 ol_link_termcap=yes
20267                 TERMCAP_LIBS=-ltermcap
20268         fi
20269 fi
20270
20271 if test $ol_link_termcap = no ; then
20272         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20273 echo "configure:20274: checking for initscr in -lncurses" >&5
20274 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20275 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20276   echo $ac_n "(cached) $ac_c" 1>&6
20277 else
20278   ac_save_LIBS="$LIBS"
20279 LIBS="-lncurses  $LIBS"
20280 cat > conftest.$ac_ext <<EOF
20281 #line 20282 "configure"
20282 #include "confdefs.h"
20283 /* Override any gcc2 internal prototype to avoid an error.  */
20284 /* We use char because int might match the return type of a gcc2
20285     builtin and then its argument prototype would still apply.  */
20286 char initscr();
20287
20288 int main() {
20289 initscr()
20290 ; return 0; }
20291 EOF
20292 if { (eval echo configure:20293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20293   rm -rf conftest*
20294   eval "ac_cv_lib_$ac_lib_var=yes"
20295 else
20296   echo "configure: failed program was:" >&5
20297   cat conftest.$ac_ext >&5
20298   rm -rf conftest*
20299   eval "ac_cv_lib_$ac_lib_var=no"
20300 fi
20301 rm -f conftest*
20302 LIBS="$ac_save_LIBS"
20303
20304 fi
20305 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20306   echo "$ac_t""yes" 1>&6
20307   have_ncurses=yes
20308 else
20309   echo "$ac_t""no" 1>&6
20310 have_ncurses=no
20311 fi
20312
20313         if test $have_ncurses = yes ; then
20314                 cat >> confdefs.h <<\EOF
20315 #define HAVE_NCURSES 1
20316 EOF
20317
20318                 ol_link_termcap=yes
20319                 TERMCAP_LIBS=-lncurses
20320         fi
20321 fi
20322
20323 if test $ol_link_termcap = no ; then
20324         cat >> confdefs.h <<\EOF
20325 #define NO_TERMCAP 1
20326 EOF
20327
20328         TERMCAP_LIBS=
20329 fi
20330
20331 ol_link_sasl=no
20332 ol_link_spasswd=no
20333 if test $ol_with_cyrus_sasl != no ; then
20334         for ac_hdr in sasl/sasl.h sasl.h
20335 do
20336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20338 echo "configure:20339: checking for $ac_hdr" >&5
20339 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20340   echo $ac_n "(cached) $ac_c" 1>&6
20341 else
20342   cat > conftest.$ac_ext <<EOF
20343 #line 20344 "configure"
20344 #include "confdefs.h"
20345 #include <$ac_hdr>
20346 EOF
20347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20348 { (eval echo configure:20349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20350 if test -z "$ac_err"; then
20351   rm -rf conftest*
20352   eval "ac_cv_header_$ac_safe=yes"
20353 else
20354   echo "$ac_err" >&5
20355   echo "configure: failed program was:" >&5
20356   cat conftest.$ac_ext >&5
20357   rm -rf conftest*
20358   eval "ac_cv_header_$ac_safe=no"
20359 fi
20360 rm -f conftest*
20361 fi
20362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20363   echo "$ac_t""yes" 1>&6
20364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20365   cat >> confdefs.h <<EOF
20366 #define $ac_tr_hdr 1
20367 EOF
20368  
20369 else
20370   echo "$ac_t""no" 1>&6
20371 fi
20372 done
20373
20374
20375         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20376                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20377 echo "configure:20378: checking for sasl_client_init in -lsasl2" >&5
20378 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20379 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20380   echo $ac_n "(cached) $ac_c" 1>&6
20381 else
20382   ac_save_LIBS="$LIBS"
20383 LIBS="-lsasl2  $LIBS"
20384 cat > conftest.$ac_ext <<EOF
20385 #line 20386 "configure"
20386 #include "confdefs.h"
20387 /* Override any gcc2 internal prototype to avoid an error.  */
20388 /* We use char because int might match the return type of a gcc2
20389     builtin and then its argument prototype would still apply.  */
20390 char sasl_client_init();
20391
20392 int main() {
20393 sasl_client_init()
20394 ; return 0; }
20395 EOF
20396 if { (eval echo configure:20397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20397   rm -rf conftest*
20398   eval "ac_cv_lib_$ac_lib_var=yes"
20399 else
20400   echo "configure: failed program was:" >&5
20401   cat conftest.$ac_ext >&5
20402   rm -rf conftest*
20403   eval "ac_cv_lib_$ac_lib_var=no"
20404 fi
20405 rm -f conftest*
20406 LIBS="$ac_save_LIBS"
20407
20408 fi
20409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20410   echo "$ac_t""yes" 1>&6
20411   ol_link_sasl="-lsasl2"
20412 else
20413   echo "$ac_t""no" 1>&6
20414 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20415 echo "configure:20416: checking for sasl_client_init in -lsasl" >&5
20416 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20417 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20418   echo $ac_n "(cached) $ac_c" 1>&6
20419 else
20420   ac_save_LIBS="$LIBS"
20421 LIBS="-lsasl  $LIBS"
20422 cat > conftest.$ac_ext <<EOF
20423 #line 20424 "configure"
20424 #include "confdefs.h"
20425 /* Override any gcc2 internal prototype to avoid an error.  */
20426 /* We use char because int might match the return type of a gcc2
20427     builtin and then its argument prototype would still apply.  */
20428 char sasl_client_init();
20429
20430 int main() {
20431 sasl_client_init()
20432 ; return 0; }
20433 EOF
20434 if { (eval echo configure:20435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20435   rm -rf conftest*
20436   eval "ac_cv_lib_$ac_lib_var=yes"
20437 else
20438   echo "configure: failed program was:" >&5
20439   cat conftest.$ac_ext >&5
20440   rm -rf conftest*
20441   eval "ac_cv_lib_$ac_lib_var=no"
20442 fi
20443 rm -f conftest*
20444 LIBS="$ac_save_LIBS"
20445
20446 fi
20447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20448   echo "$ac_t""yes" 1>&6
20449   ol_link_sasl="-lsasl"
20450 else
20451   echo "$ac_t""no" 1>&6
20452 fi
20453
20454 fi
20455
20456         fi
20457
20458         if test $ol_link_sasl = no ; then
20459                 if test $ol_with_cyrus_sasl != auto ; then
20460                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20461                 else
20462                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20463                         echo "configure: warning: SASL authentication not supported!" 1>&2
20464                         if test $ol_link_tls = no ; then
20465                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20466                         fi
20467                 fi
20468         else
20469                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20470 echo "configure:20471: checking Cyrus SASL library version" >&5
20471 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20472   echo $ac_n "(cached) $ac_c" 1>&6
20473 else
20474   
20475         cat > conftest.$ac_ext <<EOF
20476 #line 20477 "configure"
20477 #include "confdefs.h"
20478
20479 #ifdef HAVE_SASL_SASL_H
20480 #include <sasl/sasl.h>
20481 #else
20482 #include <sasl.h>
20483 #endif
20484
20485 /* require 2.1.3 or later */
20486 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20487         char *__sasl_compat = "2.2+ or better okay (we guess)";
20488 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20489         && SASL_VERSION_STEP >=3
20490         char *__sasl_compat = "2.1.3+ or better okay";
20491 #endif
20492         
20493 EOF
20494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20495   egrep "__sasl_compat" >/dev/null 2>&1; then
20496   rm -rf conftest*
20497   ol_cv_sasl_compat=yes
20498 else
20499   rm -rf conftest*
20500   ol_cv_sasl_compat=no
20501 fi
20502 rm -f conftest*
20503
20504 fi
20505
20506 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20507
20508                 if test $ol_cv_sasl_compat = no ; then
20509                         ol_link_sasl=no
20510                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20511                 fi
20512
20513                 cat >> confdefs.h <<\EOF
20514 #define HAVE_CYRUS_SASL 1
20515 EOF
20516
20517                 SASL_LIBS="$ol_link_sasl"
20518                 if test $ol_enable_spasswd != no ; then
20519                         ol_link_spasswd=yes
20520                 fi
20521
20522                 ac_save_LIBS="$LIBS"
20523                 LIBS="$LIBS $ol_link_sasl"
20524                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20525 echo "configure:20526: checking for sasl_version" >&5
20526 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20527   echo $ac_n "(cached) $ac_c" 1>&6
20528 else
20529   cat > conftest.$ac_ext <<EOF
20530 #line 20531 "configure"
20531 #include "confdefs.h"
20532 /* System header to define __stub macros and hopefully few prototypes,
20533     which can conflict with char sasl_version(); below.  */
20534 #include <assert.h>
20535 /* Override any gcc2 internal prototype to avoid an error.  */
20536 /* We use char because int might match the return type of a gcc2
20537     builtin and then its argument prototype would still apply.  */
20538 char sasl_version();
20539 char (*f)();
20540
20541 int main() {
20542
20543 /* The GNU C library defines this for functions which it implements
20544     to always fail with ENOSYS.  Some functions are actually named
20545     something starting with __ and the normal name is an alias.  */
20546 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20547 choke me
20548 #else
20549 f = sasl_version;
20550 #endif
20551
20552 ; return 0; }
20553 EOF
20554 if { (eval echo configure:20555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20555   rm -rf conftest*
20556   eval "ac_cv_func_sasl_version=yes"
20557 else
20558   echo "configure: failed program was:" >&5
20559   cat conftest.$ac_ext >&5
20560   rm -rf conftest*
20561   eval "ac_cv_func_sasl_version=no"
20562 fi
20563 rm -f conftest*
20564 fi
20565
20566 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20567   echo "$ac_t""yes" 1>&6
20568   cat >> confdefs.h <<\EOF
20569 #define HAVE_SASL_VERSION 1
20570 EOF
20571
20572 else
20573   echo "$ac_t""no" 1>&6
20574 fi
20575
20576                 LIBS="$ac_save_LIBS"
20577         fi
20578
20579 else
20580         echo "configure: warning: SASL authentication not supported!" 1>&2
20581         if test $ol_link_tls = no ; then
20582                 echo "configure: warning: Strong authentication not supported!" 1>&2
20583         fi
20584 fi
20585
20586 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20587         dev=no
20588         if test -r /dev/urandom ; then
20589                 dev="/dev/urandom";
20590         elif test -r /idev/urandom ; then
20591                 dev="/idev/urandom";
20592         elif test -r /dev/srandom ; then
20593                 dev="/dev/srandom";
20594         elif test -r /dev/random ; then
20595                 dev="/dev/random";
20596         elif test -r /idev/random ; then
20597                 dev="/idev/random";
20598         fi
20599
20600         if test $dev != no ; then
20601                 cat >> confdefs.h <<EOF
20602 #define URANDOM_DEVICE "$dev"
20603 EOF
20604
20605         fi
20606 fi
20607
20608 ol_link_fetch=no
20609 if test $ol_with_fetch != no ; then
20610         ol_LIBS=$LIBS
20611 LIBS="-lfetch -lcom_err $LIBS"
20612 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20613 echo "configure:20614: checking fetch(3) library" >&5
20614 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20615   echo $ac_n "(cached) $ac_c" 1>&6
20616 else
20617   
20618         cat > conftest.$ac_ext <<EOF
20619 #line 20620 "configure"
20620 #include "confdefs.h"
20621
20622 #include <sys/param.h>
20623 #include <stdio.h>
20624 #include <fetch.h>
20625 int main() {
20626 struct url *u = fetchParseURL("file:///"); 
20627 ; return 0; }
20628 EOF
20629 if { (eval echo configure:20630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20630   rm -rf conftest*
20631   ol_cv_lib_fetch=yes
20632 else
20633   echo "configure: failed program was:" >&5
20634   cat conftest.$ac_ext >&5
20635   rm -rf conftest*
20636   ol_cv_lib_fetch=no
20637 fi
20638 rm -f conftest*
20639 fi
20640
20641 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20642 LIBS=$ol_LIBS
20643 if test $ol_cv_lib_fetch != no ; then
20644         ol_link_fetch="-lfetch -lcom_err"
20645         cat >> confdefs.h <<\EOF
20646 #define HAVE_FETCH 1
20647 EOF
20648
20649 fi
20650
20651
20652         if test $ol_cv_lib_fetch != no ; then
20653                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20654                 ol_link_fetch=freebsd
20655
20656         elif test $ol_with_fetch != auto ; then
20657                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20658         fi 
20659 fi
20660
20661 if test $ol_enable_crypt != no ; then
20662         save_LIBS="$LIBS"
20663         LIBS="$TLS_LIBS $LIBS"
20664
20665         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20666 echo "configure:20667: checking for crypt" >&5
20667 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20668   echo $ac_n "(cached) $ac_c" 1>&6
20669 else
20670   cat > conftest.$ac_ext <<EOF
20671 #line 20672 "configure"
20672 #include "confdefs.h"
20673 /* System header to define __stub macros and hopefully few prototypes,
20674     which can conflict with char crypt(); below.  */
20675 #include <assert.h>
20676 /* Override any gcc2 internal prototype to avoid an error.  */
20677 /* We use char because int might match the return type of a gcc2
20678     builtin and then its argument prototype would still apply.  */
20679 char crypt();
20680 char (*f)();
20681
20682 int main() {
20683
20684 /* The GNU C library defines this for functions which it implements
20685     to always fail with ENOSYS.  Some functions are actually named
20686     something starting with __ and the normal name is an alias.  */
20687 #if defined (__stub_crypt) || defined (__stub___crypt)
20688 choke me
20689 #else
20690 f = crypt;
20691 #endif
20692
20693 ; return 0; }
20694 EOF
20695 if { (eval echo configure:20696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20696   rm -rf conftest*
20697   eval "ac_cv_func_crypt=yes"
20698 else
20699   echo "configure: failed program was:" >&5
20700   cat conftest.$ac_ext >&5
20701   rm -rf conftest*
20702   eval "ac_cv_func_crypt=no"
20703 fi
20704 rm -f conftest*
20705 fi
20706
20707 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20708   echo "$ac_t""yes" 1>&6
20709   have_crypt=yes
20710 else
20711   echo "$ac_t""no" 1>&6
20712
20713                 LIBS="$save_LIBS"
20714                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20715 echo "configure:20716: checking for crypt in -lcrypt" >&5
20716 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20718   echo $ac_n "(cached) $ac_c" 1>&6
20719 else
20720   ac_save_LIBS="$LIBS"
20721 LIBS="-lcrypt  $LIBS"
20722 cat > conftest.$ac_ext <<EOF
20723 #line 20724 "configure"
20724 #include "confdefs.h"
20725 /* Override any gcc2 internal prototype to avoid an error.  */
20726 /* We use char because int might match the return type of a gcc2
20727     builtin and then its argument prototype would still apply.  */
20728 char crypt();
20729
20730 int main() {
20731 crypt()
20732 ; return 0; }
20733 EOF
20734 if { (eval echo configure:20735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20735   rm -rf conftest*
20736   eval "ac_cv_lib_$ac_lib_var=yes"
20737 else
20738   echo "configure: failed program was:" >&5
20739   cat conftest.$ac_ext >&5
20740   rm -rf conftest*
20741   eval "ac_cv_lib_$ac_lib_var=no"
20742 fi
20743 rm -f conftest*
20744 LIBS="$ac_save_LIBS"
20745
20746 fi
20747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20748   echo "$ac_t""yes" 1>&6
20749   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20750                         have_crypt=yes
20751 else
20752   echo "$ac_t""no" 1>&6
20753 have_crypt=no
20754 fi
20755
20756 fi
20757
20758
20759         LIBS="$save_LIBS"
20760
20761         if test $have_crypt = yes ; then
20762                 cat >> confdefs.h <<\EOF
20763 #define HAVE_CRYPT 1
20764 EOF
20765
20766         else
20767                 echo "configure: warning: could not find crypt" 1>&2
20768                 if test $ol_enable_crypt = yes ; then
20769                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20770                 fi
20771
20772                 echo "configure: warning: disabling crypt support" 1>&2
20773                 ol_enable_crypt=no
20774         fi
20775 fi
20776
20777 if test $ol_enable_proctitle != no ; then
20778         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20779 echo "configure:20780: checking for setproctitle" >&5
20780 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20781   echo $ac_n "(cached) $ac_c" 1>&6
20782 else
20783   cat > conftest.$ac_ext <<EOF
20784 #line 20785 "configure"
20785 #include "confdefs.h"
20786 /* System header to define __stub macros and hopefully few prototypes,
20787     which can conflict with char setproctitle(); below.  */
20788 #include <assert.h>
20789 /* Override any gcc2 internal prototype to avoid an error.  */
20790 /* We use char because int might match the return type of a gcc2
20791     builtin and then its argument prototype would still apply.  */
20792 char setproctitle();
20793 char (*f)();
20794
20795 int main() {
20796
20797 /* The GNU C library defines this for functions which it implements
20798     to always fail with ENOSYS.  Some functions are actually named
20799     something starting with __ and the normal name is an alias.  */
20800 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20801 choke me
20802 #else
20803 f = setproctitle;
20804 #endif
20805
20806 ; return 0; }
20807 EOF
20808 if { (eval echo configure:20809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20809   rm -rf conftest*
20810   eval "ac_cv_func_setproctitle=yes"
20811 else
20812   echo "configure: failed program was:" >&5
20813   cat conftest.$ac_ext >&5
20814   rm -rf conftest*
20815   eval "ac_cv_func_setproctitle=no"
20816 fi
20817 rm -f conftest*
20818 fi
20819
20820 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20821   echo "$ac_t""yes" 1>&6
20822   have_setproctitle=yes
20823 else
20824   echo "$ac_t""no" 1>&6
20825
20826                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20827 echo "configure:20828: checking for setproctitle in -lutil" >&5
20828 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20830   echo $ac_n "(cached) $ac_c" 1>&6
20831 else
20832   ac_save_LIBS="$LIBS"
20833 LIBS="-lutil  $LIBS"
20834 cat > conftest.$ac_ext <<EOF
20835 #line 20836 "configure"
20836 #include "confdefs.h"
20837 /* Override any gcc2 internal prototype to avoid an error.  */
20838 /* We use char because int might match the return type of a gcc2
20839     builtin and then its argument prototype would still apply.  */
20840 char setproctitle();
20841
20842 int main() {
20843 setproctitle()
20844 ; return 0; }
20845 EOF
20846 if { (eval echo configure:20847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20847   rm -rf conftest*
20848   eval "ac_cv_lib_$ac_lib_var=yes"
20849 else
20850   echo "configure: failed program was:" >&5
20851   cat conftest.$ac_ext >&5
20852   rm -rf conftest*
20853   eval "ac_cv_lib_$ac_lib_var=no"
20854 fi
20855 rm -f conftest*
20856 LIBS="$ac_save_LIBS"
20857
20858 fi
20859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20860   echo "$ac_t""yes" 1>&6
20861   have_setproctitle=yes
20862                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20863 else
20864   echo "$ac_t""no" 1>&6
20865 have_setproctitle=no
20866                         LIBOBJS="$LIBOBJS setproctitle.o"
20867                         LIBSRCS="$LIBSRCS setproctitle.c"
20868 fi
20869
20870 fi
20871
20872
20873         if test $have_setproctitle = yes ; then
20874                 cat >> confdefs.h <<\EOF
20875 #define HAVE_SETPROCTITLE 1
20876 EOF
20877
20878         fi
20879 fi
20880
20881 if test $ol_enable_slp != no ; then
20882         for ac_hdr in slp.h 
20883 do
20884 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20885 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20886 echo "configure:20887: checking for $ac_hdr" >&5
20887 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20888   echo $ac_n "(cached) $ac_c" 1>&6
20889 else
20890   cat > conftest.$ac_ext <<EOF
20891 #line 20892 "configure"
20892 #include "confdefs.h"
20893 #include <$ac_hdr>
20894 EOF
20895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20896 { (eval echo configure:20897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20898 if test -z "$ac_err"; then
20899   rm -rf conftest*
20900   eval "ac_cv_header_$ac_safe=yes"
20901 else
20902   echo "$ac_err" >&5
20903   echo "configure: failed program was:" >&5
20904   cat conftest.$ac_ext >&5
20905   rm -rf conftest*
20906   eval "ac_cv_header_$ac_safe=no"
20907 fi
20908 rm -f conftest*
20909 fi
20910 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20911   echo "$ac_t""yes" 1>&6
20912     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20913   cat >> confdefs.h <<EOF
20914 #define $ac_tr_hdr 1
20915 EOF
20916  
20917 else
20918   echo "$ac_t""no" 1>&6
20919 fi
20920 done
20921
20922
20923         if test $ac_cv_header_slp_h = yes ; then
20924                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20925 echo "configure:20926: checking for SLPOpen in -lslp" >&5
20926 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20927 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20928   echo $ac_n "(cached) $ac_c" 1>&6
20929 else
20930   ac_save_LIBS="$LIBS"
20931 LIBS="-lslp  $LIBS"
20932 cat > conftest.$ac_ext <<EOF
20933 #line 20934 "configure"
20934 #include "confdefs.h"
20935 /* Override any gcc2 internal prototype to avoid an error.  */
20936 /* We use char because int might match the return type of a gcc2
20937     builtin and then its argument prototype would still apply.  */
20938 char SLPOpen();
20939
20940 int main() {
20941 SLPOpen()
20942 ; return 0; }
20943 EOF
20944 if { (eval echo configure:20945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20945   rm -rf conftest*
20946   eval "ac_cv_lib_$ac_lib_var=yes"
20947 else
20948   echo "configure: failed program was:" >&5
20949   cat conftest.$ac_ext >&5
20950   rm -rf conftest*
20951   eval "ac_cv_lib_$ac_lib_var=no"
20952 fi
20953 rm -f conftest*
20954 LIBS="$ac_save_LIBS"
20955
20956 fi
20957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20958   echo "$ac_t""yes" 1>&6
20959   have_slp=yes
20960 else
20961   echo "$ac_t""no" 1>&6
20962 have_slp=no
20963 fi
20964
20965                 if test $have_slp = yes ; then
20966                         cat >> confdefs.h <<\EOF
20967 #define HAVE_SLP 1
20968 EOF
20969
20970                         SLAPD_SLP_LIBS=-lslp
20971                 fi
20972
20973         elif test $ol_enable_slp = yes ; then
20974                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20975         fi
20976 fi
20977
20978
20979 echo $ac_n "checking long long""... $ac_c" 1>&6
20980 echo "configure:20981: checking long long" >&5
20981 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20982   echo $ac_n "(cached) $ac_c" 1>&6
20983 else
20984   
20985         cat > conftest.$ac_ext <<EOF
20986 #line 20987 "configure"
20987 #include "confdefs.h"
20988
20989 int main() {
20990 long long x;
20991 ; return 0; }
20992 EOF
20993 if { (eval echo configure:20994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20994   rm -rf conftest*
20995   ol_cv_type_long_long=yes
20996 else
20997   echo "configure: failed program was:" >&5
20998   cat conftest.$ac_ext >&5
20999   rm -rf conftest*
21000   ol_cv_type_long_long=no
21001 fi
21002 rm -f conftest*
21003 fi
21004
21005 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21006 if test $ol_cv_type_long_long = yes; then
21007         cat >> confdefs.h <<\EOF
21008 #define HAVE_LONG_LONG 1
21009 EOF
21010
21011 fi
21012
21013 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21014 echo "configure:21015: checking for ANSI C header files" >&5
21015 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21016   echo $ac_n "(cached) $ac_c" 1>&6
21017 else
21018   cat > conftest.$ac_ext <<EOF
21019 #line 21020 "configure"
21020 #include "confdefs.h"
21021 #include <stdlib.h>
21022 #include <stdarg.h>
21023 #include <string.h>
21024 #include <float.h>
21025 EOF
21026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21027 { (eval echo configure:21028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21029 if test -z "$ac_err"; then
21030   rm -rf conftest*
21031   ac_cv_header_stdc=yes
21032 else
21033   echo "$ac_err" >&5
21034   echo "configure: failed program was:" >&5
21035   cat conftest.$ac_ext >&5
21036   rm -rf conftest*
21037   ac_cv_header_stdc=no
21038 fi
21039 rm -f conftest*
21040
21041 if test $ac_cv_header_stdc = yes; then
21042   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21043 cat > conftest.$ac_ext <<EOF
21044 #line 21045 "configure"
21045 #include "confdefs.h"
21046 #include <string.h>
21047 EOF
21048 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21049   egrep "memchr" >/dev/null 2>&1; then
21050   :
21051 else
21052   rm -rf conftest*
21053   ac_cv_header_stdc=no
21054 fi
21055 rm -f conftest*
21056
21057 fi
21058
21059 if test $ac_cv_header_stdc = yes; then
21060   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21061 cat > conftest.$ac_ext <<EOF
21062 #line 21063 "configure"
21063 #include "confdefs.h"
21064 #include <stdlib.h>
21065 EOF
21066 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21067   egrep "free" >/dev/null 2>&1; then
21068   :
21069 else
21070   rm -rf conftest*
21071   ac_cv_header_stdc=no
21072 fi
21073 rm -f conftest*
21074
21075 fi
21076
21077 if test $ac_cv_header_stdc = yes; then
21078   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21079 if test "$cross_compiling" = yes; then
21080   :
21081 else
21082   cat > conftest.$ac_ext <<EOF
21083 #line 21084 "configure"
21084 #include "confdefs.h"
21085 #include <ctype.h>
21086 #if ((' ' & 0x0FF) == 0x020)
21087 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21088 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21089 #else
21090 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21091  || ('j' <= (c) && (c) <= 'r') \
21092  || ('s' <= (c) && (c) <= 'z'))
21093 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21094 #endif
21095 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21096 int main () { int i; for (i = 0; i < 256; i++)
21097 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21098 exit (0); }
21099
21100 EOF
21101 if { (eval echo configure:21102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21102 then
21103   :
21104 else
21105   echo "configure: failed program was:" >&5
21106   cat conftest.$ac_ext >&5
21107   rm -fr conftest*
21108   ac_cv_header_stdc=no
21109 fi
21110 rm -fr conftest*
21111 fi
21112
21113 fi
21114 fi
21115
21116 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21117 if test $ac_cv_header_stdc = yes; then
21118   cat >> confdefs.h <<\EOF
21119 #define STDC_HEADERS 1
21120 EOF
21121
21122 fi
21123
21124 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21125 echo "configure:21126: checking for mode_t" >&5
21126 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21127   echo $ac_n "(cached) $ac_c" 1>&6
21128 else
21129   cat > conftest.$ac_ext <<EOF
21130 #line 21131 "configure"
21131 #include "confdefs.h"
21132 #include <sys/types.h>
21133 #if STDC_HEADERS
21134 #include <stdlib.h>
21135 #include <stddef.h>
21136 #endif
21137
21138 EOF
21139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21140   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21141   rm -rf conftest*
21142   eval "ac_cv_type_mode_t=yes"
21143 else
21144   rm -rf conftest*
21145   eval "ac_cv_type_mode_t=no"
21146 fi
21147 rm -f conftest*
21148
21149 fi
21150 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21151   echo "$ac_t""yes" 1>&6
21152 else
21153   echo "$ac_t""no" 1>&6
21154   cat >> confdefs.h <<EOF
21155 #define mode_t int
21156 EOF
21157
21158 fi
21159
21160 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21161 echo "configure:21162: checking for off_t" >&5
21162 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21163   echo $ac_n "(cached) $ac_c" 1>&6
21164 else
21165   cat > conftest.$ac_ext <<EOF
21166 #line 21167 "configure"
21167 #include "confdefs.h"
21168 #include <sys/types.h>
21169 #if STDC_HEADERS
21170 #include <stdlib.h>
21171 #include <stddef.h>
21172 #endif
21173
21174 EOF
21175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21176   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21177   rm -rf conftest*
21178   eval "ac_cv_type_off_t=yes"
21179 else
21180   rm -rf conftest*
21181   eval "ac_cv_type_off_t=no"
21182 fi
21183 rm -f conftest*
21184
21185 fi
21186 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21187   echo "$ac_t""yes" 1>&6
21188 else
21189   echo "$ac_t""no" 1>&6
21190   cat >> confdefs.h <<EOF
21191 #define off_t long
21192 EOF
21193
21194 fi
21195
21196 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21197 echo "configure:21198: checking for pid_t" >&5
21198 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21199   echo $ac_n "(cached) $ac_c" 1>&6
21200 else
21201   cat > conftest.$ac_ext <<EOF
21202 #line 21203 "configure"
21203 #include "confdefs.h"
21204 #include <sys/types.h>
21205 #if STDC_HEADERS
21206 #include <stdlib.h>
21207 #include <stddef.h>
21208 #endif
21209
21210 EOF
21211 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21212   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21213   rm -rf conftest*
21214   eval "ac_cv_type_pid_t=yes"
21215 else
21216   rm -rf conftest*
21217   eval "ac_cv_type_pid_t=no"
21218 fi
21219 rm -f conftest*
21220
21221 fi
21222 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21223   echo "$ac_t""yes" 1>&6
21224 else
21225   echo "$ac_t""no" 1>&6
21226   cat >> confdefs.h <<EOF
21227 #define pid_t int
21228 EOF
21229
21230 fi
21231
21232 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21233 echo "configure:21234: checking for ptrdiff_t" >&5
21234 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21235   echo $ac_n "(cached) $ac_c" 1>&6
21236 else
21237   cat > conftest.$ac_ext <<EOF
21238 #line 21239 "configure"
21239 #include "confdefs.h"
21240 #include <stddef.h>
21241 int main() {
21242 ptrdiff_t p
21243 ; return 0; }
21244 EOF
21245 if { (eval echo configure:21246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21246   rm -rf conftest*
21247   am_cv_type_ptrdiff_t=yes
21248 else
21249   echo "configure: failed program was:" >&5
21250   cat conftest.$ac_ext >&5
21251   rm -rf conftest*
21252   am_cv_type_ptrdiff_t=no
21253 fi
21254 rm -f conftest*
21255 fi
21256
21257 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21258    if test $am_cv_type_ptrdiff_t = yes; then
21259      cat >> confdefs.h <<\EOF
21260 #define HAVE_PTRDIFF_T 1
21261 EOF
21262
21263    fi
21264
21265 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21266 echo "configure:21267: checking return type of signal handlers" >&5
21267 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21268   echo $ac_n "(cached) $ac_c" 1>&6
21269 else
21270   cat > conftest.$ac_ext <<EOF
21271 #line 21272 "configure"
21272 #include "confdefs.h"
21273 #include <sys/types.h>
21274 #include <signal.h>
21275 #ifdef signal
21276 #undef signal
21277 #endif
21278 #ifdef __cplusplus
21279 extern "C" void (*signal (int, void (*)(int)))(int);
21280 #else
21281 void (*signal ()) ();
21282 #endif
21283
21284 int main() {
21285 int i;
21286 ; return 0; }
21287 EOF
21288 if { (eval echo configure:21289: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21289   rm -rf conftest*
21290   ac_cv_type_signal=void
21291 else
21292   echo "configure: failed program was:" >&5
21293   cat conftest.$ac_ext >&5
21294   rm -rf conftest*
21295   ac_cv_type_signal=int
21296 fi
21297 rm -f conftest*
21298 fi
21299
21300 echo "$ac_t""$ac_cv_type_signal" 1>&6
21301 cat >> confdefs.h <<EOF
21302 #define RETSIGTYPE $ac_cv_type_signal
21303 EOF
21304
21305
21306 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21307 echo "configure:21308: checking for size_t" >&5
21308 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21309   echo $ac_n "(cached) $ac_c" 1>&6
21310 else
21311   cat > conftest.$ac_ext <<EOF
21312 #line 21313 "configure"
21313 #include "confdefs.h"
21314 #include <sys/types.h>
21315 #if STDC_HEADERS
21316 #include <stdlib.h>
21317 #include <stddef.h>
21318 #endif
21319
21320 EOF
21321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21322   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21323   rm -rf conftest*
21324   eval "ac_cv_type_size_t=yes"
21325 else
21326   rm -rf conftest*
21327   eval "ac_cv_type_size_t=no"
21328 fi
21329 rm -f conftest*
21330
21331 fi
21332 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21333   echo "$ac_t""yes" 1>&6
21334 else
21335   echo "$ac_t""no" 1>&6
21336   cat >> confdefs.h <<EOF
21337 #define size_t unsigned
21338 EOF
21339
21340 fi
21341
21342
21343 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21344 echo "configure:21345: checking for ssize_t" >&5
21345 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21346   echo $ac_n "(cached) $ac_c" 1>&6
21347 else
21348   cat > conftest.$ac_ext <<EOF
21349 #line 21350 "configure"
21350 #include "confdefs.h"
21351 #include <sys/types.h>
21352 #if STDC_HEADERS
21353 #include <stdlib.h>
21354 #include <stddef.h>
21355 #endif
21356
21357 EOF
21358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21359   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21360   rm -rf conftest*
21361   eval "ac_cv_type_ssize_t=yes"
21362 else
21363   rm -rf conftest*
21364   eval "ac_cv_type_ssize_t=no"
21365 fi
21366 rm -f conftest*
21367
21368 fi
21369 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21370   echo "$ac_t""yes" 1>&6
21371 else
21372   echo "$ac_t""no" 1>&6
21373   cat >> confdefs.h <<EOF
21374 #define ssize_t signed int
21375 EOF
21376
21377 fi
21378
21379 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21380 echo "configure:21381: checking for caddr_t" >&5
21381 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21382   echo $ac_n "(cached) $ac_c" 1>&6
21383 else
21384   cat > conftest.$ac_ext <<EOF
21385 #line 21386 "configure"
21386 #include "confdefs.h"
21387 #include <sys/types.h>
21388 #if STDC_HEADERS
21389 #include <stdlib.h>
21390 #include <stddef.h>
21391 #endif
21392
21393 EOF
21394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21395   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21396   rm -rf conftest*
21397   eval "ac_cv_type_caddr_t=yes"
21398 else
21399   rm -rf conftest*
21400   eval "ac_cv_type_caddr_t=no"
21401 fi
21402 rm -f conftest*
21403
21404 fi
21405 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21406   echo "$ac_t""yes" 1>&6
21407 else
21408   echo "$ac_t""no" 1>&6
21409   cat >> confdefs.h <<EOF
21410 #define caddr_t char *
21411 EOF
21412
21413 fi
21414
21415
21416 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21417 echo "configure:21418: checking for socklen_t" >&5
21418 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21419   echo $ac_n "(cached) $ac_c" 1>&6
21420 else
21421   cat > conftest.$ac_ext <<EOF
21422 #line 21423 "configure"
21423 #include "confdefs.h"
21424
21425 #ifdef HAVE_SYS_TYPES_H
21426 #include <sys/types.h>
21427 #endif
21428 #ifdef HAVE_SYS_SOCKET_H
21429 #include <sys/socket.h>
21430 #endif
21431
21432 int main() {
21433 socklen_t len;
21434 ; return 0; }
21435 EOF
21436 if { (eval echo configure:21437: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21437   rm -rf conftest*
21438   ol_cv_type_socklen_t=yes
21439 else
21440   echo "configure: failed program was:" >&5
21441   cat conftest.$ac_ext >&5
21442   rm -rf conftest*
21443   ol_cv_type_socklen_t=no
21444 fi
21445 rm -f conftest*
21446 fi
21447
21448 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21449   if test $ol_cv_type_socklen_t = no; then
21450     cat >> confdefs.h <<\EOF
21451 #define socklen_t int
21452 EOF
21453
21454   fi
21455  
21456 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21457 echo "configure:21458: checking for member st_blksize in aggregate type struct stat" >&5
21458 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21459   echo $ac_n "(cached) $ac_c" 1>&6
21460 else
21461   cat > conftest.$ac_ext <<EOF
21462 #line 21463 "configure"
21463 #include "confdefs.h"
21464 #include <sys/types.h>
21465 #include <sys/stat.h>
21466 int main() {
21467 struct stat foo; foo.st_blksize;
21468 ; return 0; }
21469 EOF
21470 if { (eval echo configure:21471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21471   rm -rf conftest*
21472   ac_cv_c_struct_member_st_blksize=yes
21473 else
21474   echo "configure: failed program was:" >&5
21475   cat conftest.$ac_ext >&5
21476   rm -rf conftest*
21477   ac_cv_c_struct_member_st_blksize=no
21478 fi
21479 rm -f conftest*
21480 fi
21481
21482 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21483 st_blksize="$ac_cv_c_struct_member_st_blksize"
21484 if test $ac_cv_c_struct_member_st_blksize = yes; then
21485   cat >> confdefs.h <<\EOF
21486 #define HAVE_ST_BLKSIZE 1
21487 EOF
21488
21489 fi
21490
21491 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21492 echo "configure:21493: checking whether time.h and sys/time.h may both be included" >&5
21493 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21494   echo $ac_n "(cached) $ac_c" 1>&6
21495 else
21496   cat > conftest.$ac_ext <<EOF
21497 #line 21498 "configure"
21498 #include "confdefs.h"
21499 #include <sys/types.h>
21500 #include <sys/time.h>
21501 #include <time.h>
21502 int main() {
21503 struct tm *tp;
21504 ; return 0; }
21505 EOF
21506 if { (eval echo configure:21507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21507   rm -rf conftest*
21508   ac_cv_header_time=yes
21509 else
21510   echo "configure: failed program was:" >&5
21511   cat conftest.$ac_ext >&5
21512   rm -rf conftest*
21513   ac_cv_header_time=no
21514 fi
21515 rm -f conftest*
21516 fi
21517
21518 echo "$ac_t""$ac_cv_header_time" 1>&6
21519 if test $ac_cv_header_time = yes; then
21520   cat >> confdefs.h <<\EOF
21521 #define TIME_WITH_SYS_TIME 1
21522 EOF
21523
21524 fi
21525
21526 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21527 echo "configure:21528: checking whether struct tm is in sys/time.h or time.h" >&5
21528 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21529   echo $ac_n "(cached) $ac_c" 1>&6
21530 else
21531   cat > conftest.$ac_ext <<EOF
21532 #line 21533 "configure"
21533 #include "confdefs.h"
21534 #include <sys/types.h>
21535 #include <time.h>
21536 int main() {
21537 struct tm *tp; tp->tm_sec;
21538 ; return 0; }
21539 EOF
21540 if { (eval echo configure:21541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21541   rm -rf conftest*
21542   ac_cv_struct_tm=time.h
21543 else
21544   echo "configure: failed program was:" >&5
21545   cat conftest.$ac_ext >&5
21546   rm -rf conftest*
21547   ac_cv_struct_tm=sys/time.h
21548 fi
21549 rm -f conftest*
21550 fi
21551
21552 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21553 if test $ac_cv_struct_tm = sys/time.h; then
21554   cat >> confdefs.h <<\EOF
21555 #define TM_IN_SYS_TIME 1
21556 EOF
21557
21558 fi
21559
21560 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21561 echo "configure:21562: checking for uid_t in sys/types.h" >&5
21562 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21563   echo $ac_n "(cached) $ac_c" 1>&6
21564 else
21565   cat > conftest.$ac_ext <<EOF
21566 #line 21567 "configure"
21567 #include "confdefs.h"
21568 #include <sys/types.h>
21569 EOF
21570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21571   egrep "uid_t" >/dev/null 2>&1; then
21572   rm -rf conftest*
21573   ac_cv_type_uid_t=yes
21574 else
21575   rm -rf conftest*
21576   ac_cv_type_uid_t=no
21577 fi
21578 rm -f conftest*
21579
21580 fi
21581
21582 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21583 if test $ac_cv_type_uid_t = no; then
21584   cat >> confdefs.h <<\EOF
21585 #define uid_t int
21586 EOF
21587
21588   cat >> confdefs.h <<\EOF
21589 #define gid_t int
21590 EOF
21591
21592 fi
21593
21594 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21595 echo "configure:21596: checking for sig_atomic_t" >&5
21596 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21597   echo $ac_n "(cached) $ac_c" 1>&6
21598 else
21599   cat > conftest.$ac_ext <<EOF
21600 #line 21601 "configure"
21601 #include "confdefs.h"
21602 #include <signal.h>
21603 int main() {
21604 sig_atomic_t atomic;
21605 ; return 0; }
21606 EOF
21607 if { (eval echo configure:21608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21608   rm -rf conftest*
21609   ol_cv_type_sig_atomic_t=yes
21610 else
21611   echo "configure: failed program was:" >&5
21612   cat conftest.$ac_ext >&5
21613   rm -rf conftest*
21614   ol_cv_type_sig_atomic_t=no
21615 fi
21616 rm -f conftest*
21617 fi
21618
21619 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21620   if test $ol_cv_type_sig_atomic_t = no; then
21621     cat >> confdefs.h <<\EOF
21622 #define sig_atomic_t int
21623 EOF
21624
21625   fi
21626  
21627
21628
21629 # test for pw_gecos in struct passwd
21630 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21631 echo "configure:21632: checking struct passwd for pw_gecos" >&5
21632 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21633   echo $ac_n "(cached) $ac_c" 1>&6
21634 else
21635   
21636         cat > conftest.$ac_ext <<EOF
21637 #line 21638 "configure"
21638 #include "confdefs.h"
21639 #include <pwd.h>
21640 int main() {
21641
21642         struct passwd pwd;
21643         pwd.pw_gecos = pwd.pw_name;
21644
21645 ; return 0; }
21646 EOF
21647 if { (eval echo configure:21648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21648   rm -rf conftest*
21649   ol_cv_struct_passwd_pw_gecos=yes
21650 else
21651   echo "configure: failed program was:" >&5
21652   cat conftest.$ac_ext >&5
21653   rm -rf conftest*
21654   ol_cv_struct_passwd_pw_gecos=no
21655 fi
21656 rm -f conftest*
21657 fi
21658
21659 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21660 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21661         cat >> confdefs.h <<\EOF
21662 #define HAVE_PW_GECOS 1
21663 EOF
21664
21665 fi
21666
21667 # test for pw_passwd in struct passwd
21668 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21669 echo "configure:21670: checking struct passwd for pw_passwd" >&5
21670 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21671   echo $ac_n "(cached) $ac_c" 1>&6
21672 else
21673   
21674         cat > conftest.$ac_ext <<EOF
21675 #line 21676 "configure"
21676 #include "confdefs.h"
21677 #include <pwd.h>
21678 int main() {
21679
21680         struct passwd pwd;
21681         pwd.pw_passwd = pwd.pw_name;
21682
21683 ; return 0; }
21684 EOF
21685 if { (eval echo configure:21686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21686   rm -rf conftest*
21687   ol_cv_struct_passwd_pw_passwd=yes
21688 else
21689   echo "configure: failed program was:" >&5
21690   cat conftest.$ac_ext >&5
21691   rm -rf conftest*
21692   ol_cv_struct_passwd_pw_passwd=no
21693 fi
21694 rm -f conftest*
21695 fi
21696
21697 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21698 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21699         cat >> confdefs.h <<\EOF
21700 #define HAVE_PW_PASSWD 1
21701 EOF
21702
21703 fi
21704
21705
21706 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21707 echo "configure:21708: checking if toupper() requires islower()" >&5
21708 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21709   echo $ac_n "(cached) $ac_c" 1>&6
21710 else
21711   
21712         if test "$cross_compiling" = yes; then
21713   ol_cv_c_upper_lower=safe
21714 else
21715   cat > conftest.$ac_ext <<EOF
21716 #line 21717 "configure"
21717 #include "confdefs.h"
21718
21719 #include <ctype.h>
21720 main()
21721 {
21722         if ('C' == toupper('C'))
21723                 exit(0);
21724         else
21725                 exit(1);
21726 }
21727 EOF
21728 if { (eval echo configure:21729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21729 then
21730   ol_cv_c_upper_lower=no
21731 else
21732   echo "configure: failed program was:" >&5
21733   cat conftest.$ac_ext >&5
21734   rm -fr conftest*
21735   ol_cv_c_upper_lower=yes
21736 fi
21737 rm -fr conftest*
21738 fi
21739
21740 fi
21741
21742 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21743 if test $ol_cv_c_upper_lower != no ; then
21744         cat >> confdefs.h <<\EOF
21745 #define C_UPPER_LOWER 1
21746 EOF
21747
21748 fi
21749
21750 echo $ac_n "checking for working const""... $ac_c" 1>&6
21751 echo "configure:21752: checking for working const" >&5
21752 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21753   echo $ac_n "(cached) $ac_c" 1>&6
21754 else
21755   cat > conftest.$ac_ext <<EOF
21756 #line 21757 "configure"
21757 #include "confdefs.h"
21758
21759 int main() {
21760
21761 /* Ultrix mips cc rejects this.  */
21762 typedef int charset[2]; const charset x;
21763 /* SunOS 4.1.1 cc rejects this.  */
21764 char const *const *ccp;
21765 char **p;
21766 /* NEC SVR4.0.2 mips cc rejects this.  */
21767 struct point {int x, y;};
21768 static struct point const zero = {0,0};
21769 /* AIX XL C 1.02.0.0 rejects this.
21770    It does not let you subtract one const X* pointer from another in an arm
21771    of an if-expression whose if-part is not a constant expression */
21772 const char *g = "string";
21773 ccp = &g + (g ? g-g : 0);
21774 /* HPUX 7.0 cc rejects these. */
21775 ++ccp;
21776 p = (char**) ccp;
21777 ccp = (char const *const *) p;
21778 { /* SCO 3.2v4 cc rejects this.  */
21779   char *t;
21780   char const *s = 0 ? (char *) 0 : (char const *) 0;
21781
21782   *t++ = 0;
21783 }
21784 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21785   int x[] = {25, 17};
21786   const int *foo = &x[0];
21787   ++foo;
21788 }
21789 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21790   typedef const int *iptr;
21791   iptr p = 0;
21792   ++p;
21793 }
21794 { /* AIX XL C 1.02.0.0 rejects this saying
21795      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21796   struct s { int j; const int *ap[3]; };
21797   struct s *b; b->j = 5;
21798 }
21799 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21800   const int foo = 10;
21801 }
21802
21803 ; return 0; }
21804 EOF
21805 if { (eval echo configure:21806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21806   rm -rf conftest*
21807   ac_cv_c_const=yes
21808 else
21809   echo "configure: failed program was:" >&5
21810   cat conftest.$ac_ext >&5
21811   rm -rf conftest*
21812   ac_cv_c_const=no
21813 fi
21814 rm -f conftest*
21815 fi
21816
21817 echo "$ac_t""$ac_cv_c_const" 1>&6
21818 if test $ac_cv_c_const = no; then
21819   cat >> confdefs.h <<\EOF
21820 #define const 
21821 EOF
21822
21823 fi
21824
21825 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21826 echo "configure:21827: checking if compiler understands volatile" >&5
21827 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21828   echo $ac_n "(cached) $ac_c" 1>&6
21829 else
21830   cat > conftest.$ac_ext <<EOF
21831 #line 21832 "configure"
21832 #include "confdefs.h"
21833 int x, y, z;
21834 int main() {
21835 volatile int a; int * volatile b = x ? &y : &z;
21836       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21837       *b = 0;
21838 ; return 0; }
21839 EOF
21840 if { (eval echo configure:21841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21841   rm -rf conftest*
21842   ol_cv_c_volatile=yes
21843 else
21844   echo "configure: failed program was:" >&5
21845   cat conftest.$ac_ext >&5
21846   rm -rf conftest*
21847   ol_cv_c_volatile=no
21848 fi
21849 rm -f conftest*
21850 fi
21851
21852 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21853   if test $ol_cv_c_volatile = yes; then
21854     : 
21855   else
21856     cat >> confdefs.h <<\EOF
21857 #define volatile 
21858 EOF
21859
21860   fi
21861  
21862
21863 if test $cross_compiling = yes ; then
21864         cat >> confdefs.h <<\EOF
21865 #define CROSS_COMPILING 1
21866 EOF
21867
21868 else
21869         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21870 echo "configure:21871: checking whether byte ordering is bigendian" >&5
21871 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21872   echo $ac_n "(cached) $ac_c" 1>&6
21873 else
21874   ac_cv_c_bigendian=unknown
21875 # See if sys/param.h defines the BYTE_ORDER macro.
21876 cat > conftest.$ac_ext <<EOF
21877 #line 21878 "configure"
21878 #include "confdefs.h"
21879 #include <sys/types.h>
21880 #include <sys/param.h>
21881 int main() {
21882
21883 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21884  bogus endian macros
21885 #endif
21886 ; return 0; }
21887 EOF
21888 if { (eval echo configure:21889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21889   rm -rf conftest*
21890   # It does; now see whether it defined to BIG_ENDIAN or not.
21891 cat > conftest.$ac_ext <<EOF
21892 #line 21893 "configure"
21893 #include "confdefs.h"
21894 #include <sys/types.h>
21895 #include <sys/param.h>
21896 int main() {
21897
21898 #if BYTE_ORDER != BIG_ENDIAN
21899  not big endian
21900 #endif
21901 ; return 0; }
21902 EOF
21903 if { (eval echo configure:21904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21904   rm -rf conftest*
21905   ac_cv_c_bigendian=yes
21906 else
21907   echo "configure: failed program was:" >&5
21908   cat conftest.$ac_ext >&5
21909   rm -rf conftest*
21910   ac_cv_c_bigendian=no
21911 fi
21912 rm -f conftest*
21913 else
21914   echo "configure: failed program was:" >&5
21915   cat conftest.$ac_ext >&5
21916 fi
21917 rm -f conftest*
21918 if test $ac_cv_c_bigendian = unknown; then
21919 if test "$cross_compiling" = yes; then
21920     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21921 else
21922   cat > conftest.$ac_ext <<EOF
21923 #line 21924 "configure"
21924 #include "confdefs.h"
21925 main () {
21926   /* Are we little or big endian?  From Harbison&Steele.  */
21927   union
21928   {
21929     long l;
21930     char c[sizeof (long)];
21931   } u;
21932   u.l = 1;
21933   exit (u.c[sizeof (long) - 1] == 1);
21934 }
21935 EOF
21936 if { (eval echo configure:21937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21937 then
21938   ac_cv_c_bigendian=no
21939 else
21940   echo "configure: failed program was:" >&5
21941   cat conftest.$ac_ext >&5
21942   rm -fr conftest*
21943   ac_cv_c_bigendian=yes
21944 fi
21945 rm -fr conftest*
21946 fi
21947
21948 fi
21949 fi
21950
21951 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21952 if test $ac_cv_c_bigendian = yes; then
21953   cat >> confdefs.h <<\EOF
21954 #define WORDS_BIGENDIAN 1
21955 EOF
21956
21957 fi
21958
21959 fi
21960
21961 echo $ac_n "checking size of short""... $ac_c" 1>&6
21962 echo "configure:21963: checking size of short" >&5 
21963 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21964   echo $ac_n "(cached) $ac_c" 1>&6
21965 else
21966   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21967   cat > conftest.$ac_ext <<EOF
21968 #line 21969 "configure"
21969 #include "confdefs.h"
21970 #include "confdefs.h" 
21971 #include <sys/types.h> 
21972  
21973
21974 int main() {
21975 switch (0) case 0: case (sizeof (short) == $ac_size):;
21976 ; return 0; }
21977 EOF
21978 if { (eval echo configure:21979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21979   rm -rf conftest*
21980   ac_cv_sizeof_short=$ac_size
21981 else
21982   echo "configure: failed program was:" >&5
21983   cat conftest.$ac_ext >&5
21984 fi
21985 rm -f conftest* 
21986   if test x$ac_cv_sizeof_short != x ; then break; fi 
21987 done 
21988
21989 fi
21990  
21991 if test x$ac_cv_sizeof_short = x ; then 
21992   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21993 fi 
21994 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21995 cat >> confdefs.h <<EOF
21996 #define SIZEOF_SHORT $ac_cv_sizeof_short
21997 EOF
21998  
21999  
22000 echo $ac_n "checking size of int""... $ac_c" 1>&6
22001 echo "configure:22002: checking size of int" >&5 
22002 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22003   echo $ac_n "(cached) $ac_c" 1>&6
22004 else
22005   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22006   cat > conftest.$ac_ext <<EOF
22007 #line 22008 "configure"
22008 #include "confdefs.h"
22009 #include "confdefs.h" 
22010 #include <sys/types.h> 
22011  
22012
22013 int main() {
22014 switch (0) case 0: case (sizeof (int) == $ac_size):;
22015 ; return 0; }
22016 EOF
22017 if { (eval echo configure:22018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22018   rm -rf conftest*
22019   ac_cv_sizeof_int=$ac_size
22020 else
22021   echo "configure: failed program was:" >&5
22022   cat conftest.$ac_ext >&5
22023 fi
22024 rm -f conftest* 
22025   if test x$ac_cv_sizeof_int != x ; then break; fi 
22026 done 
22027
22028 fi
22029  
22030 if test x$ac_cv_sizeof_int = x ; then 
22031   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22032 fi 
22033 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22034 cat >> confdefs.h <<EOF
22035 #define SIZEOF_INT $ac_cv_sizeof_int
22036 EOF
22037  
22038  
22039 echo $ac_n "checking size of long""... $ac_c" 1>&6
22040 echo "configure:22041: checking size of long" >&5 
22041 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22042   echo $ac_n "(cached) $ac_c" 1>&6
22043 else
22044   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22045   cat > conftest.$ac_ext <<EOF
22046 #line 22047 "configure"
22047 #include "confdefs.h"
22048 #include "confdefs.h" 
22049 #include <sys/types.h> 
22050  
22051
22052 int main() {
22053 switch (0) case 0: case (sizeof (long) == $ac_size):;
22054 ; return 0; }
22055 EOF
22056 if { (eval echo configure:22057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22057   rm -rf conftest*
22058   ac_cv_sizeof_long=$ac_size
22059 else
22060   echo "configure: failed program was:" >&5
22061   cat conftest.$ac_ext >&5
22062 fi
22063 rm -f conftest* 
22064   if test x$ac_cv_sizeof_long != x ; then break; fi 
22065 done 
22066
22067 fi
22068  
22069 if test x$ac_cv_sizeof_long = x ; then 
22070   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22071 fi 
22072 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22073 cat >> confdefs.h <<EOF
22074 #define SIZEOF_LONG $ac_cv_sizeof_long
22075 EOF
22076  
22077
22078
22079 if test "$ac_cv_sizeof_int" -lt 4 ; then
22080         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22081
22082         cat >> confdefs.h <<\EOF
22083 #define LBER_INT_T long
22084 EOF
22085
22086 else
22087         cat >> confdefs.h <<\EOF
22088 #define LBER_INT_T int
22089 EOF
22090
22091 fi
22092
22093 cat >> confdefs.h <<\EOF
22094 #define LBER_LEN_T long
22095 EOF
22096
22097 cat >> confdefs.h <<\EOF
22098 #define LBER_SOCKET_T int
22099 EOF
22100
22101 cat >> confdefs.h <<\EOF
22102 #define LBER_TAG_T long
22103 EOF
22104
22105
22106 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22107 echo "configure:22108: checking for 8-bit clean memcmp" >&5
22108 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22109   echo $ac_n "(cached) $ac_c" 1>&6
22110 else
22111   if test "$cross_compiling" = yes; then
22112   ac_cv_func_memcmp_clean=no
22113 else
22114   cat > conftest.$ac_ext <<EOF
22115 #line 22116 "configure"
22116 #include "confdefs.h"
22117
22118 main()
22119 {
22120   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22121   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22122 }
22123
22124 EOF
22125 if { (eval echo configure:22126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22126 then
22127   ac_cv_func_memcmp_clean=yes
22128 else
22129   echo "configure: failed program was:" >&5
22130   cat conftest.$ac_ext >&5
22131   rm -fr conftest*
22132   ac_cv_func_memcmp_clean=no
22133 fi
22134 rm -fr conftest*
22135 fi
22136
22137 fi
22138
22139 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22140 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22141
22142 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22143 echo "configure:22144: checking for strftime" >&5
22144 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22145   echo $ac_n "(cached) $ac_c" 1>&6
22146 else
22147   cat > conftest.$ac_ext <<EOF
22148 #line 22149 "configure"
22149 #include "confdefs.h"
22150 /* System header to define __stub macros and hopefully few prototypes,
22151     which can conflict with char strftime(); below.  */
22152 #include <assert.h>
22153 /* Override any gcc2 internal prototype to avoid an error.  */
22154 /* We use char because int might match the return type of a gcc2
22155     builtin and then its argument prototype would still apply.  */
22156 char strftime();
22157 char (*f)();
22158
22159 int main() {
22160
22161 /* The GNU C library defines this for functions which it implements
22162     to always fail with ENOSYS.  Some functions are actually named
22163     something starting with __ and the normal name is an alias.  */
22164 #if defined (__stub_strftime) || defined (__stub___strftime)
22165 choke me
22166 #else
22167 f = strftime;
22168 #endif
22169
22170 ; return 0; }
22171 EOF
22172 if { (eval echo configure:22173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22173   rm -rf conftest*
22174   eval "ac_cv_func_strftime=yes"
22175 else
22176   echo "configure: failed program was:" >&5
22177   cat conftest.$ac_ext >&5
22178   rm -rf conftest*
22179   eval "ac_cv_func_strftime=no"
22180 fi
22181 rm -f conftest*
22182 fi
22183
22184 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22185   echo "$ac_t""yes" 1>&6
22186   cat >> confdefs.h <<\EOF
22187 #define HAVE_STRFTIME 1
22188 EOF
22189
22190 else
22191   echo "$ac_t""no" 1>&6
22192 # strftime is in -lintl on SCO UNIX.
22193 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22194 echo "configure:22195: checking for strftime in -lintl" >&5
22195 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22197   echo $ac_n "(cached) $ac_c" 1>&6
22198 else
22199   ac_save_LIBS="$LIBS"
22200 LIBS="-lintl  $LIBS"
22201 cat > conftest.$ac_ext <<EOF
22202 #line 22203 "configure"
22203 #include "confdefs.h"
22204 /* Override any gcc2 internal prototype to avoid an error.  */
22205 /* We use char because int might match the return type of a gcc2
22206     builtin and then its argument prototype would still apply.  */
22207 char strftime();
22208
22209 int main() {
22210 strftime()
22211 ; return 0; }
22212 EOF
22213 if { (eval echo configure:22214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22214   rm -rf conftest*
22215   eval "ac_cv_lib_$ac_lib_var=yes"
22216 else
22217   echo "configure: failed program was:" >&5
22218   cat conftest.$ac_ext >&5
22219   rm -rf conftest*
22220   eval "ac_cv_lib_$ac_lib_var=no"
22221 fi
22222 rm -f conftest*
22223 LIBS="$ac_save_LIBS"
22224
22225 fi
22226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22227   echo "$ac_t""yes" 1>&6
22228   cat >> confdefs.h <<\EOF
22229 #define HAVE_STRFTIME 1
22230 EOF
22231
22232 LIBS="-lintl $LIBS"
22233 else
22234   echo "$ac_t""no" 1>&6
22235 fi
22236
22237 fi
22238
22239
22240 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22241 echo "configure:22242: checking for inet_aton()" >&5
22242 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22243   echo $ac_n "(cached) $ac_c" 1>&6
22244 else
22245   cat > conftest.$ac_ext <<EOF
22246 #line 22247 "configure"
22247 #include "confdefs.h"
22248
22249 #ifdef HAVE_SYS_TYPES_H
22250 #       include <sys/types.h>
22251 #endif
22252 #ifdef HAVE_SYS_SOCKET_H
22253 #       include <sys/socket.h>
22254 #       ifdef HAVE_SYS_SELECT_H
22255 #               include <sys/select.h>
22256 #       endif
22257 #       include <netinet/in.h>
22258 #       ifdef HAVE_ARPA_INET_H
22259 #               include <arpa/inet.h>
22260 #       endif
22261 #endif
22262
22263 int main() {
22264 struct in_addr in;
22265 int rc = inet_aton( "255.255.255.255", &in );
22266 ; return 0; }
22267 EOF
22268 if { (eval echo configure:22269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22269   rm -rf conftest*
22270   ol_cv_func_inet_aton=yes
22271 else
22272   echo "configure: failed program was:" >&5
22273   cat conftest.$ac_ext >&5
22274   rm -rf conftest*
22275   ol_cv_func_inet_aton=no
22276 fi
22277 rm -f conftest*
22278 fi
22279
22280 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22281   if test $ol_cv_func_inet_aton != no; then
22282     cat >> confdefs.h <<\EOF
22283 #define HAVE_INET_ATON 1
22284 EOF
22285
22286   fi
22287  
22288
22289 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22290 echo "configure:22291: checking for _spawnlp" >&5
22291 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22292   echo $ac_n "(cached) $ac_c" 1>&6
22293 else
22294   cat > conftest.$ac_ext <<EOF
22295 #line 22296 "configure"
22296 #include "confdefs.h"
22297 /* System header to define __stub macros and hopefully few prototypes,
22298     which can conflict with char _spawnlp(); below.  */
22299 #include <assert.h>
22300 /* Override any gcc2 internal prototype to avoid an error.  */
22301 /* We use char because int might match the return type of a gcc2
22302     builtin and then its argument prototype would still apply.  */
22303 char _spawnlp();
22304 char (*f)();
22305
22306 int main() {
22307
22308 /* The GNU C library defines this for functions which it implements
22309     to always fail with ENOSYS.  Some functions are actually named
22310     something starting with __ and the normal name is an alias.  */
22311 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22312 choke me
22313 #else
22314 f = _spawnlp;
22315 #endif
22316
22317 ; return 0; }
22318 EOF
22319 if { (eval echo configure:22320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22320   rm -rf conftest*
22321   eval "ac_cv_func__spawnlp=yes"
22322 else
22323   echo "configure: failed program was:" >&5
22324   cat conftest.$ac_ext >&5
22325   rm -rf conftest*
22326   eval "ac_cv_func__spawnlp=no"
22327 fi
22328 rm -f conftest*
22329 fi
22330
22331 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22332   echo "$ac_t""yes" 1>&6
22333   cat >> confdefs.h <<\EOF
22334 #define HAVE_SPAWNLP 1
22335 EOF
22336
22337 else
22338   echo "$ac_t""no" 1>&6
22339 fi
22340
22341
22342 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22343 echo "configure:22344: checking for _snprintf" >&5
22344 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22345   echo $ac_n "(cached) $ac_c" 1>&6
22346 else
22347   cat > conftest.$ac_ext <<EOF
22348 #line 22349 "configure"
22349 #include "confdefs.h"
22350 /* System header to define __stub macros and hopefully few prototypes,
22351     which can conflict with char _snprintf(); below.  */
22352 #include <assert.h>
22353 /* Override any gcc2 internal prototype to avoid an error.  */
22354 /* We use char because int might match the return type of a gcc2
22355     builtin and then its argument prototype would still apply.  */
22356 char _snprintf();
22357 char (*f)();
22358
22359 int main() {
22360
22361 /* The GNU C library defines this for functions which it implements
22362     to always fail with ENOSYS.  Some functions are actually named
22363     something starting with __ and the normal name is an alias.  */
22364 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22365 choke me
22366 #else
22367 f = _snprintf;
22368 #endif
22369
22370 ; return 0; }
22371 EOF
22372 if { (eval echo configure:22373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22373   rm -rf conftest*
22374   eval "ac_cv_func__snprintf=yes"
22375 else
22376   echo "configure: failed program was:" >&5
22377   cat conftest.$ac_ext >&5
22378   rm -rf conftest*
22379   eval "ac_cv_func__snprintf=no"
22380 fi
22381 rm -f conftest*
22382 fi
22383
22384 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22385   echo "$ac_t""yes" 1>&6
22386   ac_cv_func_snprintf=yes
22387         cat >> confdefs.h <<\EOF
22388 #define snprintf _snprintf
22389 EOF
22390
22391
22392 else
22393   echo "$ac_t""no" 1>&6
22394 fi
22395
22396
22397 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22398 echo "configure:22399: checking for _vsnprintf" >&5
22399 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22400   echo $ac_n "(cached) $ac_c" 1>&6
22401 else
22402   cat > conftest.$ac_ext <<EOF
22403 #line 22404 "configure"
22404 #include "confdefs.h"
22405 /* System header to define __stub macros and hopefully few prototypes,
22406     which can conflict with char _vsnprintf(); below.  */
22407 #include <assert.h>
22408 /* Override any gcc2 internal prototype to avoid an error.  */
22409 /* We use char because int might match the return type of a gcc2
22410     builtin and then its argument prototype would still apply.  */
22411 char _vsnprintf();
22412 char (*f)();
22413
22414 int main() {
22415
22416 /* The GNU C library defines this for functions which it implements
22417     to always fail with ENOSYS.  Some functions are actually named
22418     something starting with __ and the normal name is an alias.  */
22419 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22420 choke me
22421 #else
22422 f = _vsnprintf;
22423 #endif
22424
22425 ; return 0; }
22426 EOF
22427 if { (eval echo configure:22428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22428   rm -rf conftest*
22429   eval "ac_cv_func__vsnprintf=yes"
22430 else
22431   echo "configure: failed program was:" >&5
22432   cat conftest.$ac_ext >&5
22433   rm -rf conftest*
22434   eval "ac_cv_func__vsnprintf=no"
22435 fi
22436 rm -f conftest*
22437 fi
22438
22439 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22440   echo "$ac_t""yes" 1>&6
22441   ac_cv_func_vsnprintf=yes
22442         cat >> confdefs.h <<\EOF
22443 #define vsnprintf _vsnprintf
22444 EOF
22445
22446
22447 else
22448   echo "$ac_t""no" 1>&6
22449 fi
22450
22451
22452 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22453 echo "configure:22454: checking for vprintf" >&5
22454 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22455   echo $ac_n "(cached) $ac_c" 1>&6
22456 else
22457   cat > conftest.$ac_ext <<EOF
22458 #line 22459 "configure"
22459 #include "confdefs.h"
22460 /* System header to define __stub macros and hopefully few prototypes,
22461     which can conflict with char vprintf(); below.  */
22462 #include <assert.h>
22463 /* Override any gcc2 internal prototype to avoid an error.  */
22464 /* We use char because int might match the return type of a gcc2
22465     builtin and then its argument prototype would still apply.  */
22466 char vprintf();
22467 char (*f)();
22468
22469 int main() {
22470
22471 /* The GNU C library defines this for functions which it implements
22472     to always fail with ENOSYS.  Some functions are actually named
22473     something starting with __ and the normal name is an alias.  */
22474 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22475 choke me
22476 #else
22477 f = vprintf;
22478 #endif
22479
22480 ; return 0; }
22481 EOF
22482 if { (eval echo configure:22483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22483   rm -rf conftest*
22484   eval "ac_cv_func_vprintf=yes"
22485 else
22486   echo "configure: failed program was:" >&5
22487   cat conftest.$ac_ext >&5
22488   rm -rf conftest*
22489   eval "ac_cv_func_vprintf=no"
22490 fi
22491 rm -f conftest*
22492 fi
22493
22494 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22495   echo "$ac_t""yes" 1>&6
22496   cat >> confdefs.h <<\EOF
22497 #define HAVE_VPRINTF 1
22498 EOF
22499
22500 else
22501   echo "$ac_t""no" 1>&6
22502 fi
22503
22504 if test "$ac_cv_func_vprintf" != yes; then
22505 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22506 echo "configure:22507: checking for _doprnt" >&5
22507 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22508   echo $ac_n "(cached) $ac_c" 1>&6
22509 else
22510   cat > conftest.$ac_ext <<EOF
22511 #line 22512 "configure"
22512 #include "confdefs.h"
22513 /* System header to define __stub macros and hopefully few prototypes,
22514     which can conflict with char _doprnt(); below.  */
22515 #include <assert.h>
22516 /* Override any gcc2 internal prototype to avoid an error.  */
22517 /* We use char because int might match the return type of a gcc2
22518     builtin and then its argument prototype would still apply.  */
22519 char _doprnt();
22520 char (*f)();
22521
22522 int main() {
22523
22524 /* The GNU C library defines this for functions which it implements
22525     to always fail with ENOSYS.  Some functions are actually named
22526     something starting with __ and the normal name is an alias.  */
22527 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22528 choke me
22529 #else
22530 f = _doprnt;
22531 #endif
22532
22533 ; return 0; }
22534 EOF
22535 if { (eval echo configure:22536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22536   rm -rf conftest*
22537   eval "ac_cv_func__doprnt=yes"
22538 else
22539   echo "configure: failed program was:" >&5
22540   cat conftest.$ac_ext >&5
22541   rm -rf conftest*
22542   eval "ac_cv_func__doprnt=no"
22543 fi
22544 rm -f conftest*
22545 fi
22546
22547 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22548   echo "$ac_t""yes" 1>&6
22549   cat >> confdefs.h <<\EOF
22550 #define HAVE_DOPRNT 1
22551 EOF
22552
22553 else
22554   echo "$ac_t""no" 1>&6
22555 fi
22556
22557 fi
22558
22559
22560 if test $ac_cv_func_vprintf = yes ; then
22561                 for ac_func in snprintf vsnprintf
22562 do
22563 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22564 echo "configure:22565: checking for $ac_func" >&5
22565 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22566   echo $ac_n "(cached) $ac_c" 1>&6
22567 else
22568   cat > conftest.$ac_ext <<EOF
22569 #line 22570 "configure"
22570 #include "confdefs.h"
22571 /* System header to define __stub macros and hopefully few prototypes,
22572     which can conflict with char $ac_func(); below.  */
22573 #include <assert.h>
22574 /* Override any gcc2 internal prototype to avoid an error.  */
22575 /* We use char because int might match the return type of a gcc2
22576     builtin and then its argument prototype would still apply.  */
22577 char $ac_func();
22578 char (*f)();
22579
22580 int main() {
22581
22582 /* The GNU C library defines this for functions which it implements
22583     to always fail with ENOSYS.  Some functions are actually named
22584     something starting with __ and the normal name is an alias.  */
22585 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22586 choke me
22587 #else
22588 f = $ac_func;
22589 #endif
22590
22591 ; return 0; }
22592 EOF
22593 if { (eval echo configure:22594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22594   rm -rf conftest*
22595   eval "ac_cv_func_$ac_func=yes"
22596 else
22597   echo "configure: failed program was:" >&5
22598   cat conftest.$ac_ext >&5
22599   rm -rf conftest*
22600   eval "ac_cv_func_$ac_func=no"
22601 fi
22602 rm -f conftest*
22603 fi
22604
22605 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22606   echo "$ac_t""yes" 1>&6
22607     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22608   cat >> confdefs.h <<EOF
22609 #define $ac_tr_func 1
22610 EOF
22611  
22612 else
22613   echo "$ac_t""no" 1>&6
22614 fi
22615 done
22616
22617 fi
22618
22619 for ac_func in \
22620         bcopy                   \
22621         closesocket             \
22622         chroot                  \
22623         endgrent                \
22624         endpwent                \
22625         fcntl                   \
22626         flock                   \
22627         fstat                   \
22628         getdtablesize   \
22629         getgrgid                \
22630         gethostname             \
22631         getpass                 \
22632         getpassphrase   \
22633         getpwuid                \
22634         getpwnam                \
22635         getspnam                \
22636         gettimeofday    \
22637         initgroups              \
22638         lockf                   \
22639         memcpy                  \
22640         memmove                 \
22641         mkstemp                 \
22642         mktemp                  \
22643         pipe                    \
22644         read                    \
22645         recv                    \
22646         recvfrom                \
22647         setpwfile               \
22648         setgid                  \
22649         setegid                 \
22650         setsid                  \
22651         setuid                  \
22652         seteuid                 \
22653         sigaction               \
22654         signal                  \
22655         sigset                  \
22656         strdup                  \
22657         strerror                \
22658         strpbrk                 \
22659         strrchr                 \
22660         strsep                  \
22661         strstr                  \
22662         strtol                  \
22663         strtoul                 \
22664         strtoq                  \
22665         strtouq                 \
22666         strtoll                 \
22667         strspn                  \
22668         sysconf                 \
22669         usleep                  \
22670         waitpid                 \
22671         wait4                   \
22672         write                   \
22673         send                    \
22674         sendmsg                 \
22675         sendto                  \
22676
22677 do
22678 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22679 echo "configure:22680: checking for $ac_func" >&5
22680 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22681   echo $ac_n "(cached) $ac_c" 1>&6
22682 else
22683   cat > conftest.$ac_ext <<EOF
22684 #line 22685 "configure"
22685 #include "confdefs.h"
22686 /* System header to define __stub macros and hopefully few prototypes,
22687     which can conflict with char $ac_func(); below.  */
22688 #include <assert.h>
22689 /* Override any gcc2 internal prototype to avoid an error.  */
22690 /* We use char because int might match the return type of a gcc2
22691     builtin and then its argument prototype would still apply.  */
22692 char $ac_func();
22693 char (*f)();
22694
22695 int main() {
22696
22697 /* The GNU C library defines this for functions which it implements
22698     to always fail with ENOSYS.  Some functions are actually named
22699     something starting with __ and the normal name is an alias.  */
22700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22701 choke me
22702 #else
22703 f = $ac_func;
22704 #endif
22705
22706 ; return 0; }
22707 EOF
22708 if { (eval echo configure:22709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22709   rm -rf conftest*
22710   eval "ac_cv_func_$ac_func=yes"
22711 else
22712   echo "configure: failed program was:" >&5
22713   cat conftest.$ac_ext >&5
22714   rm -rf conftest*
22715   eval "ac_cv_func_$ac_func=no"
22716 fi
22717 rm -f conftest*
22718 fi
22719
22720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22721   echo "$ac_t""yes" 1>&6
22722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22723   cat >> confdefs.h <<EOF
22724 #define $ac_tr_func 1
22725 EOF
22726  
22727 else
22728   echo "$ac_t""no" 1>&6
22729 fi
22730 done
22731
22732
22733 for ac_func in getopt getpeereid
22734 do
22735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22736 echo "configure:22737: checking for $ac_func" >&5
22737 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22738   echo $ac_n "(cached) $ac_c" 1>&6
22739 else
22740   cat > conftest.$ac_ext <<EOF
22741 #line 22742 "configure"
22742 #include "confdefs.h"
22743 /* System header to define __stub macros and hopefully few prototypes,
22744     which can conflict with char $ac_func(); below.  */
22745 #include <assert.h>
22746 /* Override any gcc2 internal prototype to avoid an error.  */
22747 /* We use char because int might match the return type of a gcc2
22748     builtin and then its argument prototype would still apply.  */
22749 char $ac_func();
22750 char (*f)();
22751
22752 int main() {
22753
22754 /* The GNU C library defines this for functions which it implements
22755     to always fail with ENOSYS.  Some functions are actually named
22756     something starting with __ and the normal name is an alias.  */
22757 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22758 choke me
22759 #else
22760 f = $ac_func;
22761 #endif
22762
22763 ; return 0; }
22764 EOF
22765 if { (eval echo configure:22766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22766   rm -rf conftest*
22767   eval "ac_cv_func_$ac_func=yes"
22768 else
22769   echo "configure: failed program was:" >&5
22770   cat conftest.$ac_ext >&5
22771   rm -rf conftest*
22772   eval "ac_cv_func_$ac_func=no"
22773 fi
22774 rm -f conftest*
22775 fi
22776
22777 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22778   echo "$ac_t""yes" 1>&6
22779     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22780   cat >> confdefs.h <<EOF
22781 #define $ac_tr_func 1
22782 EOF
22783  
22784 else
22785   echo "$ac_t""no" 1>&6
22786 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22787 fi
22788 done
22789
22790
22791
22792 if test "$ac_cv_func_getopt" != yes; then
22793         LIBSRCS="$LIBSRCS getopt.c"
22794 fi
22795 if test "$ac_cv_func_getpeereid" != yes; then
22796         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22797 echo "configure:22798: checking for msg_accrights in msghdr" >&5
22798 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22799   echo $ac_n "(cached) $ac_c" 1>&6
22800 else
22801   cat > conftest.$ac_ext <<EOF
22802 #line 22803 "configure"
22803 #include "confdefs.h"
22804 #include <sys/socket.h>
22805 int main() {
22806 struct msghdr m; m.msg_accrightslen=0
22807 ; return 0; }
22808 EOF
22809 if { (eval echo configure:22810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22810   rm -rf conftest*
22811   ol_cv_msghdr_msg_accrights=yes
22812 else
22813   echo "configure: failed program was:" >&5
22814   cat conftest.$ac_ext >&5
22815   rm -rf conftest*
22816   ol_cv_msghdr_msg_accrights=no
22817 fi
22818 rm -f conftest*
22819         
22820 fi
22821
22822 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22823   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22824         cat >> confdefs.h <<\EOF
22825 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22826 EOF
22827
22828   fi
22829
22830         LIBSRCS="$LIBSRCS getpeereid.c"
22831 fi
22832 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22833         if test "$ac_cv_func_snprintf" != yes; then
22834                 cat >> confdefs.h <<\EOF
22835 #define snprintf ber_pvt_snprintf
22836 EOF
22837
22838         fi
22839         if test "$ac_cv_func_vsnprintf" != yes; then
22840                 cat >> confdefs.h <<\EOF
22841 #define vsnprintf ber_pvt_vsnprintf
22842 EOF
22843
22844         fi
22845 fi
22846
22847 # Check Configuration
22848 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22849 echo "configure:22850: checking declaration of sys_errlist" >&5
22850 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22851   echo $ac_n "(cached) $ac_c" 1>&6
22852 else
22853   
22854         cat > conftest.$ac_ext <<EOF
22855 #line 22856 "configure"
22856 #include "confdefs.h"
22857
22858 #include <stdio.h>
22859 #include <sys/types.h>
22860 #include <errno.h>
22861 #ifdef WINNT
22862 #include <stdlib.h>
22863 #endif 
22864 int main() {
22865 char *c = (char *) *sys_errlist
22866 ; return 0; }
22867 EOF
22868 if { (eval echo configure:22869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22869   rm -rf conftest*
22870   ol_cv_dcl_sys_errlist=yes
22871         ol_cv_have_sys_errlist=yes
22872 else
22873   echo "configure: failed program was:" >&5
22874   cat conftest.$ac_ext >&5
22875   rm -rf conftest*
22876   ol_cv_dcl_sys_errlist=no
22877 fi
22878 rm -f conftest*
22879 fi
22880
22881 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22882 #
22883 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22884 if test $ol_cv_dcl_sys_errlist = no ; then
22885         cat >> confdefs.h <<\EOF
22886 #define DECL_SYS_ERRLIST 1
22887 EOF
22888
22889
22890         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22891 echo "configure:22892: checking existence of sys_errlist" >&5
22892 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22893   echo $ac_n "(cached) $ac_c" 1>&6
22894 else
22895   
22896                 cat > conftest.$ac_ext <<EOF
22897 #line 22898 "configure"
22898 #include "confdefs.h"
22899 #include <errno.h>
22900 int main() {
22901 char *c = (char *) *sys_errlist
22902 ; return 0; }
22903 EOF
22904 if { (eval echo configure:22905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22905   rm -rf conftest*
22906   ol_cv_have_sys_errlist=yes
22907 else
22908   echo "configure: failed program was:" >&5
22909   cat conftest.$ac_ext >&5
22910   rm -rf conftest*
22911   ol_cv_have_sys_errlist=no
22912 fi
22913 rm -f conftest*
22914 fi
22915
22916 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22917 fi
22918 if test $ol_cv_have_sys_errlist = yes ; then
22919         cat >> confdefs.h <<\EOF
22920 #define HAVE_SYS_ERRLIST 1
22921 EOF
22922
22923 fi
22924
22925
22926
22927 if test "$ol_enable_slapi" != no ; then
22928                         for ac_hdr in ltdl.h
22929 do
22930 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22931 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22932 echo "configure:22933: checking for $ac_hdr" >&5
22933 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22934   echo $ac_n "(cached) $ac_c" 1>&6
22935 else
22936   cat > conftest.$ac_ext <<EOF
22937 #line 22938 "configure"
22938 #include "confdefs.h"
22939 #include <$ac_hdr>
22940 EOF
22941 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22942 { (eval echo configure:22943: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22943 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22944 if test -z "$ac_err"; then
22945   rm -rf conftest*
22946   eval "ac_cv_header_$ac_safe=yes"
22947 else
22948   echo "$ac_err" >&5
22949   echo "configure: failed program was:" >&5
22950   cat conftest.$ac_ext >&5
22951   rm -rf conftest*
22952   eval "ac_cv_header_$ac_safe=no"
22953 fi
22954 rm -f conftest*
22955 fi
22956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22957   echo "$ac_t""yes" 1>&6
22958     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22959   cat >> confdefs.h <<EOF
22960 #define $ac_tr_hdr 1
22961 EOF
22962  
22963 else
22964   echo "$ac_t""no" 1>&6
22965 fi
22966 done
22967
22968
22969         if test $ac_cv_header_ltdl_h != yes ; then
22970                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22971         fi
22972         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22973 echo "configure:22974: checking for lt_dlinit in -lltdl" >&5
22974 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22975 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22976   echo $ac_n "(cached) $ac_c" 1>&6
22977 else
22978   ac_save_LIBS="$LIBS"
22979 LIBS="-lltdl  $LIBS"
22980 cat > conftest.$ac_ext <<EOF
22981 #line 22982 "configure"
22982 #include "confdefs.h"
22983 /* Override any gcc2 internal prototype to avoid an error.  */
22984 /* We use char because int might match the return type of a gcc2
22985     builtin and then its argument prototype would still apply.  */
22986 char lt_dlinit();
22987
22988 int main() {
22989 lt_dlinit()
22990 ; return 0; }
22991 EOF
22992 if { (eval echo configure:22993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22993   rm -rf conftest*
22994   eval "ac_cv_lib_$ac_lib_var=yes"
22995 else
22996   echo "configure: failed program was:" >&5
22997   cat conftest.$ac_ext >&5
22998   rm -rf conftest*
22999   eval "ac_cv_lib_$ac_lib_var=no"
23000 fi
23001 rm -f conftest*
23002 LIBS="$ac_save_LIBS"
23003
23004 fi
23005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23006   echo "$ac_t""yes" 1>&6
23007   
23008                 SLAPI_LIBS=-lltdl
23009                 LIBSLAPI=libslapi.a
23010                 LIBSLAPITOOLS=../libslapi.a
23011                 cat >> confdefs.h <<\EOF
23012 #define HAVE_LIBLTDL 1
23013 EOF
23014
23015         
23016 else
23017   echo "$ac_t""no" 1>&6
23018 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23019 fi
23020
23021
23022         cat >> confdefs.h <<\EOF
23023 #define LDAP_SLAPI 1
23024 EOF
23025
23026 fi
23027
23028 if test "$ol_enable_debug" != no ; then
23029         cat >> confdefs.h <<\EOF
23030 #define LDAP_DEBUG 1
23031 EOF
23032
23033 fi
23034 if test "$ol_enable_syslog" = yes ; then
23035         cat >> confdefs.h <<\EOF
23036 #define LDAP_SYSLOG 1
23037 EOF
23038
23039 fi
23040 if test "$ol_link_kbind" != no ; then
23041         cat >> confdefs.h <<\EOF
23042 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23043 EOF
23044
23045 fi
23046 if test "$ol_enable_proctitle" != no ; then
23047         cat >> confdefs.h <<\EOF
23048 #define LDAP_PROCTITLE 1
23049 EOF
23050
23051 fi
23052 if test "$ol_enable_referrals" != no ; then
23053         cat >> confdefs.h <<\EOF
23054 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23055 EOF
23056
23057 fi
23058 if test "$ol_enable_local" != no; then
23059         cat >> confdefs.h <<\EOF
23060 #define LDAP_PF_LOCAL 1
23061 EOF
23062
23063 fi
23064 if test "$ol_link_ipv6" != no; then
23065         cat >> confdefs.h <<\EOF
23066 #define LDAP_PF_INET6 1
23067 EOF
23068
23069 fi
23070 if test "$ol_enable_cleartext" != no ; then
23071         cat >> confdefs.h <<\EOF
23072 #define SLAPD_CLEARTEXT 1
23073 EOF
23074
23075 fi
23076 if test "$ol_enable_crypt" != no ; then
23077         cat >> confdefs.h <<\EOF
23078 #define SLAPD_CRYPT 1
23079 EOF
23080
23081 fi
23082 if test "$ol_link_kpasswd" != no ; then
23083         cat >> confdefs.h <<\EOF
23084 #define SLAPD_KPASSWD 1
23085 EOF
23086
23087 fi
23088 if test "$ol_link_spasswd" != no ; then
23089         cat >> confdefs.h <<\EOF
23090 #define SLAPD_SPASSWD 1
23091 EOF
23092
23093 fi
23094 if test "$ol_enable_multimaster" != no ; then
23095         cat >> confdefs.h <<\EOF
23096 #define SLAPD_MULTIMASTER 1
23097 EOF
23098
23099 fi
23100 if test "$ol_enable_rlookups" != no ; then
23101         cat >> confdefs.h <<\EOF
23102 #define SLAPD_RLOOKUPS 1
23103 EOF
23104
23105 fi
23106 if test "$ol_enable_aci" != no ; then
23107         cat >> confdefs.h <<\EOF
23108 #define SLAPD_ACI_ENABLED 1
23109 EOF
23110
23111 fi
23112
23113 if test "$ol_link_modules" != no ; then
23114         cat >> confdefs.h <<\EOF
23115 #define SLAPD_MODULES 1
23116 EOF
23117
23118         BUILD_SLAPD=yes
23119         SLAPD_MODULES_LDFLAGS="-dlopen self"
23120 fi
23121
23122 if test "$ol_enable_bdb" != no ; then
23123         cat >> confdefs.h <<\EOF
23124 #define SLAPD_BDB 1
23125 EOF
23126
23127         BUILD_SLAPD=yes
23128         BUILD_BDB=yes
23129         if test "$ol_with_bdb_module" != static ; then
23130                 cat >> confdefs.h <<\EOF
23131 #define SLAPD_BDB_DYNAMIC 1
23132 EOF
23133
23134                 BUILD_BDB=mod
23135                 BUILD_BDB_DYNAMIC=shared
23136                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23137         else
23138                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23139         fi
23140 fi
23141
23142 if test "$ol_link_dnssrv" != no ; then
23143         cat >> confdefs.h <<\EOF
23144 #define SLAPD_DNSSRV 1
23145 EOF
23146
23147         BUILD_SLAPD=yes
23148         BUILD_DNSSRV=yes
23149         if test "$ol_with_dnssrv_module" != static ; then
23150                 cat >> confdefs.h <<\EOF
23151 #define SLAPD_DNSSRV_DYNAMIC 1
23152 EOF
23153
23154                 BUILD_DNSSRV=mod
23155                 BUILD_DNSSRV_DYNAMIC=shared
23156                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23157         else
23158                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23159         fi
23160 fi
23161
23162 if test "$ol_enable_hdb" != no ; then
23163         cat >> confdefs.h <<\EOF
23164 #define SLAPD_HDB 1
23165 EOF
23166
23167         BUILD_SLAPD=yes
23168         BUILD_HDB=yes
23169         if test "$ol_with_hdb_module" != static ; then
23170                 cat >> confdefs.h <<\EOF
23171 #define SLAPD_HDB_DYNAMIC 1
23172 EOF
23173
23174                 BUILD_HDB=mod
23175                 BUILD_HDB_DYNAMIC=shared
23176                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23177         else
23178                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23179         fi
23180 fi
23181
23182 if test "$ol_enable_ldap" != no ; then
23183         cat >> confdefs.h <<\EOF
23184 #define SLAPD_LDAP 1
23185 EOF
23186
23187         BUILD_SLAPD=yes
23188         BUILD_LDAP=yes
23189         if test "$ol_with_ldap_module" != static ; then
23190                 cat >> confdefs.h <<\EOF
23191 #define SLAPD_LDAP_DYNAMIC 1
23192 EOF
23193
23194                 BUILD_LDAP=mod
23195                 BUILD_LDAP_DYNAMIC=shared
23196                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23197         else
23198                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23199         fi
23200 fi
23201
23202 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23203         cat >> confdefs.h <<\EOF
23204 #define SLAPD_LDBM 1
23205 EOF
23206
23207         BUILD_SLAPD=yes
23208         BUILD_LDBM=yes
23209         if test "$ol_with_ldbm_module" != static ; then
23210                 cat >> confdefs.h <<\EOF
23211 #define SLAPD_LDBM_DYNAMIC 1
23212 EOF
23213
23214                 BUILD_LDBM=mod
23215                 BUILD_LDBM_DYNAMIC=shared
23216                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23217         else
23218                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23219         fi
23220 fi
23221
23222 if test "$ol_enable_meta" != no ; then
23223         if test "$ol_enable_ldap" = no ; then
23224                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23225         fi
23226         if test "$ol_enable_rewrite" = no ; then
23227                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23228         fi
23229         cat >> confdefs.h <<\EOF
23230 #define SLAPD_META 1
23231 EOF
23232
23233         BUILD_SLAPD=yes
23234         BUILD_META=yes
23235         BUILD_REWRITE=yes
23236         if test $ol_enable_ldbm = yes -o \
23237                 $ol_enable_bdb = yes ; then 
23238                 BUILD_CACHE=yes
23239         fi
23240         if test "$ol_with_meta_module" != static ; then
23241                 cat >> confdefs.h <<\EOF
23242 #define SLAPD_META_DYNAMIC 1
23243 EOF
23244
23245                 BUILD_META=mod
23246                 BUILD_META_DYNAMIC=shared
23247                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23248         else
23249                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23250         fi
23251 fi
23252
23253 if test "$ol_enable_monitor" != no ; then
23254         cat >> confdefs.h <<\EOF
23255 #define SLAPD_MONITOR 1
23256 EOF
23257
23258         BUILD_SLAPD=yes
23259         BUILD_MONITOR=yes
23260         if test "$ol_with_monitor_module" != static ; then
23261                 cat >> confdefs.h <<\EOF
23262 #define SLAPD_MONITOR_DYNAMIC 1
23263 EOF
23264
23265                 BUILD_MONITOR=mod
23266                 BUILD_MONITOR_DYNAMIC=shared
23267                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23268         else
23269                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23270         fi
23271 fi
23272
23273 if test "$ol_enable_null" != no ; then
23274         cat >> confdefs.h <<\EOF
23275 #define SLAPD_NULL 1
23276 EOF
23277
23278         BUILD_SLAPD=yes
23279         BUILD_NULL=yes
23280         if test "$ol_with_null_module" != static ; then
23281                 cat >> confdefs.h <<\EOF
23282 #define SLAPD_NULL_DYNAMIC 1
23283 EOF
23284
23285                 BUILD_NULL=mod
23286                 BUILD_NULL_DYNAMIC=shared
23287                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23288         else
23289                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23290         fi
23291 fi
23292
23293 if test "$ol_enable_passwd" != no ; then
23294         cat >> confdefs.h <<\EOF
23295 #define SLAPD_PASSWD 1
23296 EOF
23297
23298         BUILD_SLAPD=yes
23299         BUILD_PASSWD=yes
23300         if test "$ol_with_passwd_module" != static ; then
23301                 cat >> confdefs.h <<\EOF
23302 #define SLAPD_PASSWD_DYNAMIC 1
23303 EOF
23304
23305                 BUILD_PASSWD=mod
23306                 BUILD_PASSWD_DYNAMIC=shared
23307                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23308         else
23309                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23310         fi
23311 fi
23312
23313 if test "$ol_link_perl" != no ; then
23314         cat >> confdefs.h <<\EOF
23315 #define SLAPD_PERL 1
23316 EOF
23317
23318         BUILD_SLAPD=yes
23319         BUILD_PERL=yes
23320         if test "$ol_with_perl_module" != static ; then
23321                 cat >> confdefs.h <<\EOF
23322 #define SLAPD_PERL_DYNAMIC 1
23323 EOF
23324
23325                 BUILD_PERL=mod
23326                 BUILD_PERL_DYNAMIC=shared
23327                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23328         else
23329                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23330         fi
23331 fi
23332
23333 if test "$ol_enable_shell" != no ; then
23334         if test "$ol_link_thread" != no ; then
23335                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23336         fi
23337         cat >> confdefs.h <<\EOF
23338 #define SLAPD_SHELL 1
23339 EOF
23340
23341         BUILD_SLAPD=yes
23342         BUILD_SHELL=yes
23343         if test "$ol_with_shell_module" != static ; then
23344                 cat >> confdefs.h <<\EOF
23345 #define SLAPD_SHELL_DYNAMIC 1
23346 EOF
23347
23348                 BUILD_SHELL=mod
23349                 BUILD_SHELL_DYNAMIC=shared
23350                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23351         else
23352                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23353         fi
23354 fi
23355
23356 if test "$ol_enable_tcl" != no ; then
23357         cat >> confdefs.h <<\EOF
23358 #define SLAPD_TCL 1
23359 EOF
23360
23361         BUILD_SLAPD=yes
23362         BUILD_TCL=yes
23363         if test "$ol_with_tcl_module" != static; then
23364                 cat >> confdefs.h <<\EOF
23365 #define SLAPD_TCL_DYNAMIC 1
23366 EOF
23367
23368                 BUILD_TCL=mod
23369                 BUILD_TCL_DYNAMIC=shared
23370                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23371         else
23372                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23373         fi
23374 fi
23375
23376 if test "$ol_link_sql" != no ; then
23377         cat >> confdefs.h <<\EOF
23378 #define SLAPD_SQL 1
23379 EOF
23380
23381         BUILD_SLAPD=yes
23382         BUILD_SQL=yes
23383         if test "$ol_with_sql_module" != static; then
23384                 cat >> confdefs.h <<\EOF
23385 #define SLAPD_SQL_DYNAMIC 1
23386 EOF
23387
23388                 BUILD_SQL=mod
23389                 BUILD_SQL_DYNAMIC=shared
23390                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23391         else
23392                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23393         fi
23394 fi
23395
23396 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23397         $BUILD_SLAPD = yes ; then
23398         BUILD_SLURPD=yes
23399 fi
23400
23401 if test "$ol_enable_rewrite" != no ; then
23402         cat >> confdefs.h <<\EOF
23403 #define ENABLE_REWRITE 1
23404 EOF
23405
23406         BUILD_REWRITE=yes
23407 fi
23408
23409 if test "$ol_enable_slapi" != no ; then
23410         cat >> confdefs.h <<\EOF
23411 #define ENABLE_SLAPI 1
23412 EOF
23413
23414         BUILD_SLAPI=yes
23415         SLAPD_SLAPI_DEPEND=libslapi.a
23416 fi
23417
23418
23419
23420 if test "$ac_cv_mingw32" = yes ; then
23421         PLAT=NT
23422         SLAPD_MODULES_LDFLAGS=
23423 else
23424         PLAT=UNIX
23425 fi
23426
23427 if test -z "$SLAPD_STATIC_BACKENDS"; then
23428         SLAPD_NO_STATIC='#'
23429 else
23430         SLAPD_NO_STATIC=
23431 fi
23432
23433
23434
23435
23436
23437
23438
23439   
23440   
23441   
23442   
23443   
23444   
23445   
23446   
23447   
23448   
23449   
23450   
23451   
23452   
23453   
23454   
23455   
23456   
23457   
23458   
23459   
23460   
23461   
23462   
23463   
23464   
23465   
23466   
23467   
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508 # Check whether --with-xxinstall or --without-xxinstall was given.
23509 if test "${with_xxinstall+set}" = set; then
23510   withval="$with_xxinstall"
23511   :
23512 fi
23513
23514
23515
23516 trap '' 1 2 15
23517
23518 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23519
23520 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23521 # Let make expand exec_prefix.
23522 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23523
23524 # Any assignment to VPATH causes Sun make to only execute
23525 # the first set of double-colon rules, so remove it if not needed.
23526 # If there is a colon in the path, we need to keep it.
23527 if test "x$srcdir" = x.; then
23528   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23529 fi
23530
23531 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23532
23533 DEFS=-DHAVE_CONFIG_H
23534
23535 # Without the "./", some shells look in PATH for config.status.
23536 : ${CONFIG_STATUS=./config.status}
23537
23538 echo creating $CONFIG_STATUS
23539 rm -f $CONFIG_STATUS
23540 cat > $CONFIG_STATUS <<EOF
23541 #! /bin/sh
23542 # Generated automatically by configure.
23543 # Run this file to recreate the current configuration.
23544 # This directory was configured as follows,
23545 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23546 #
23547 # $0 $ac_configure_args
23548 #
23549 # Compiler output produced by configure, useful for debugging
23550 # configure, is in ./config.log if it exists.
23551
23552 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23553 for ac_option
23554 do
23555   case "\$ac_option" in
23556   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23557     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23558     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23559   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23560     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23561     exit 0 ;;
23562   -help | --help | --hel | --he | --h)
23563     echo "\$ac_cs_usage"; exit 0 ;;
23564   *) echo "\$ac_cs_usage"; exit 1 ;;
23565   esac
23566 done
23567
23568 ac_given_srcdir=$srcdir
23569 ac_given_INSTALL="$INSTALL"
23570
23571 trap 'rm -fr `echo "\
23572 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23573 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23574 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23575 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23576 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23577 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23578 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23579 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23580 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23581 include/Makefile:build/top.mk:include/Makefile.in \
23582 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23583 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23584 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23585 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23586 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23587 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23588 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23589 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23590 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23591 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23592 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23593 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23594 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23595 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23596 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23597 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23598 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23599 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23600 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23601 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23602 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23603 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23604 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23605 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23606 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23607 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23608 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23609 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23610 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23611 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23612 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23613  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23614 EOF
23615 cat >> $CONFIG_STATUS <<EOF
23616
23617 # Protect against being on the right side of a sed subst in config.status.
23618 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23619  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23620 $ac_vpsub
23621 $extrasub
23622 s%@SHELL@%$SHELL%g
23623 s%@CFLAGS@%$CFLAGS%g
23624 s%@CPPFLAGS@%$CPPFLAGS%g
23625 s%@CXXFLAGS@%$CXXFLAGS%g
23626 s%@FFLAGS@%$FFLAGS%g
23627 s%@DEFS@%$DEFS%g
23628 s%@LDFLAGS@%$LDFLAGS%g
23629 s%@LIBS@%$LIBS%g
23630 s%@exec_prefix@%$exec_prefix%g
23631 s%@prefix@%$prefix%g
23632 s%@program_transform_name@%$program_transform_name%g
23633 s%@bindir@%$bindir%g
23634 s%@sbindir@%$sbindir%g
23635 s%@libexecdir@%$libexecdir%g
23636 s%@datadir@%$datadir%g
23637 s%@sysconfdir@%$sysconfdir%g
23638 s%@sharedstatedir@%$sharedstatedir%g
23639 s%@localstatedir@%$localstatedir%g
23640 s%@libdir@%$libdir%g
23641 s%@includedir@%$includedir%g
23642 s%@oldincludedir@%$oldincludedir%g
23643 s%@infodir@%$infodir%g
23644 s%@mandir@%$mandir%g
23645 s%@host@%$host%g
23646 s%@host_alias@%$host_alias%g
23647 s%@host_cpu@%$host_cpu%g
23648 s%@host_vendor@%$host_vendor%g
23649 s%@host_os@%$host_os%g
23650 s%@target@%$target%g
23651 s%@target_alias@%$target_alias%g
23652 s%@target_cpu@%$target_cpu%g
23653 s%@target_vendor@%$target_vendor%g
23654 s%@target_os@%$target_os%g
23655 s%@build@%$build%g
23656 s%@build_alias@%$build_alias%g
23657 s%@build_cpu@%$build_cpu%g
23658 s%@build_vendor@%$build_vendor%g
23659 s%@build_os@%$build_os%g
23660 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23661 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23662 s%@INSTALL_DATA@%$INSTALL_DATA%g
23663 s%@PACKAGE@%$PACKAGE%g
23664 s%@VERSION@%$VERSION%g
23665 s%@ACLOCAL@%$ACLOCAL%g
23666 s%@AUTOCONF@%$AUTOCONF%g
23667 s%@AUTOMAKE@%$AUTOMAKE%g
23668 s%@AUTOHEADER@%$AUTOHEADER%g
23669 s%@MAKEINFO@%$MAKEINFO%g
23670 s%@install_sh@%$install_sh%g
23671 s%@AMTAR@%$AMTAR%g
23672 s%@AWK@%$AWK%g
23673 s%@AMTARFLAGS@%$AMTARFLAGS%g
23674 s%@SET_MAKE@%$SET_MAKE%g
23675 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23676 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23677 s%@top_builddir@%$top_builddir%g
23678 s%@ldap_subdir@%$ldap_subdir%g
23679 s%@CC@%$CC%g
23680 s%@AR@%$AR%g
23681 s%@LN_S@%$LN_S%g
23682 s%@OBJEXT@%$OBJEXT%g
23683 s%@EXEEXT@%$EXEEXT%g
23684 s%@ECHO@%$ECHO%g
23685 s%@RANLIB@%$RANLIB%g
23686 s%@STRIP@%$STRIP%g
23687 s%@DLLTOOL@%$DLLTOOL%g
23688 s%@AS@%$AS%g
23689 s%@OBJDUMP@%$OBJDUMP%g
23690 s%@CPP@%$CPP%g
23691 s%@LIBTOOL@%$LIBTOOL%g
23692 s%@LN_H@%$LN_H%g
23693 s%@PERLBIN@%$PERLBIN%g
23694 s%@OL_MKDEP@%$OL_MKDEP%g
23695 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23696 s%@LTSTATIC@%$LTSTATIC%g
23697 s%@LIBOBJS@%$LIBOBJS%g
23698 s%@LIBSRCS@%$LIBSRCS%g
23699 s%@PLAT@%$PLAT%g
23700 s%@WITH_TLS@%$WITH_TLS%g
23701 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23702 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23703 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23704 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23705 s%@BUILD_BDB@%$BUILD_BDB%g
23706 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23707 s%@BUILD_HDB@%$BUILD_HDB%g
23708 s%@BUILD_LDAP@%$BUILD_LDAP%g
23709 s%@BUILD_LDBM@%$BUILD_LDBM%g
23710 s%@BUILD_META@%$BUILD_META%g
23711 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23712 s%@BUILD_CACHE@%$BUILD_CACHE%g
23713 s%@BUILD_NULL@%$BUILD_NULL%g
23714 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23715 s%@BUILD_PERL@%$BUILD_PERL%g
23716 s%@BUILD_SHELL@%$BUILD_SHELL%g
23717 s%@BUILD_SQL@%$BUILD_SQL%g
23718 s%@BUILD_TCL@%$BUILD_TCL%g
23719 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23720 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23721 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
23722 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23723 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23724 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23725 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23726 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23727 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23728 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23729 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23730 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23731 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23732 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23733 s%@LDAP_LIBS@%$LDAP_LIBS%g
23734 s%@LDIF_LIBS@%$LDIF_LIBS%g
23735 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23736 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23737 s%@LDBM_LIBS@%$LDBM_LIBS%g
23738 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23739 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23740 s%@WRAP_LIBS@%$WRAP_LIBS%g
23741 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23742 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23743 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23744 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23745 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23746 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23747 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23748 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23749 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23750 s%@KRB4_LIBS@%$KRB4_LIBS%g
23751 s%@KRB5_LIBS@%$KRB5_LIBS%g
23752 s%@SASL_LIBS@%$SASL_LIBS%g
23753 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23754 s%@TLS_LIBS@%$TLS_LIBS%g
23755 s%@MODULES_LIBS@%$MODULES_LIBS%g
23756 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23757 s%@LIBSLAPI@%$LIBSLAPI%g
23758 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23759 s%@AUTH_LIBS@%$AUTH_LIBS%g
23760 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23761 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23762 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23763 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23764
23765 CEOF
23766 EOF
23767
23768 cat >> $CONFIG_STATUS <<\EOF
23769
23770 # Split the substitutions into bite-sized pieces for seds with
23771 # small command number limits, like on Digital OSF/1 and HP-UX.
23772 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23773 ac_file=1 # Number of current file.
23774 ac_beg=1 # First line for current file.
23775 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23776 ac_more_lines=:
23777 ac_sed_cmds=""
23778 while $ac_more_lines; do
23779   if test $ac_beg -gt 1; then
23780     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23781   else
23782     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23783   fi
23784   if test ! -s conftest.s$ac_file; then
23785     ac_more_lines=false
23786     rm -f conftest.s$ac_file
23787   else
23788     if test -z "$ac_sed_cmds"; then
23789       ac_sed_cmds="sed -f conftest.s$ac_file"
23790     else
23791       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23792     fi
23793     ac_file=`expr $ac_file + 1`
23794     ac_beg=$ac_end
23795     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23796   fi
23797 done
23798 if test -z "$ac_sed_cmds"; then
23799   ac_sed_cmds=cat
23800 fi
23801 EOF
23802
23803 cat >> $CONFIG_STATUS <<EOF
23804
23805 CONFIG_FILES=\${CONFIG_FILES-"\
23806 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23807 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23808 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23809 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23810 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23811 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23812 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23813 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23814 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23815 include/Makefile:build/top.mk:include/Makefile.in \
23816 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23817 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23818 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23819 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23820 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23821 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23822 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23823 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23824 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23825 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23826 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23827 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23828 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23829 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23830 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23831 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23832 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23833 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23834 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23835 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23836 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23837 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23838 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23839 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23840 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23841 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23842 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23843 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23844 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23845 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23846 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23847 "}
23848 EOF
23849 cat >> $CONFIG_STATUS <<\EOF
23850 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23851   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23852   case "$ac_file" in
23853   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23854        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23855   *) ac_file_in="${ac_file}.in" ;;
23856   esac
23857
23858   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23859
23860   # Remove last slash and all that follows it.  Not all systems have dirname.
23861   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23862   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23863     # The file is in a subdirectory.
23864     test ! -d "$ac_dir" && mkdir "$ac_dir"
23865     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23866     # A "../" for each directory in $ac_dir_suffix.
23867     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23868   else
23869     ac_dir_suffix= ac_dots=
23870   fi
23871
23872   case "$ac_given_srcdir" in
23873   .)  srcdir=.
23874       if test -z "$ac_dots"; then top_srcdir=.
23875       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23876   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23877   *) # Relative path.
23878     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23879     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23880   esac
23881
23882   case "$ac_given_INSTALL" in
23883   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23884   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23885   esac
23886
23887   echo creating "$ac_file"
23888   rm -f "$ac_file"
23889   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23890   case "$ac_file" in
23891   *[Mm]akefile*) ac_comsub="1i\\
23892 # $configure_input" ;;
23893   *) ac_comsub= ;;
23894   esac
23895
23896   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23897   sed -e "$ac_comsub
23898 s%@configure_input@%$configure_input%g
23899 s%@srcdir@%$srcdir%g
23900 s%@top_srcdir@%$top_srcdir%g
23901 s%@INSTALL@%$INSTALL%g
23902 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23903 fi; done
23904 rm -f conftest.s*
23905
23906 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23907 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23908 #
23909 # ac_d sets the value in "#define NAME VALUE" lines.
23910 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23911 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23912 ac_dC='\3'
23913 ac_dD='%g'
23914 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23915 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23916 ac_uB='\([      ]\)%\1#\2define\3'
23917 ac_uC=' '
23918 ac_uD='\4%g'
23919 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23920 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23921 ac_eB='$%\1#\2define\3'
23922 ac_eC=' '
23923 ac_eD='%g'
23924
23925 if test "${CONFIG_HEADERS+set}" != set; then
23926 EOF
23927 cat >> $CONFIG_STATUS <<EOF
23928   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23929 EOF
23930 cat >> $CONFIG_STATUS <<\EOF
23931 fi
23932 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23933   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23934   case "$ac_file" in
23935   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23936        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23937   *) ac_file_in="${ac_file}.in" ;;
23938   esac
23939
23940   echo creating $ac_file
23941
23942   rm -f conftest.frag conftest.in conftest.out
23943   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23944   cat $ac_file_inputs > conftest.in
23945
23946 EOF
23947
23948 # Transform confdefs.h into a sed script conftest.vals that substitutes
23949 # the proper values into config.h.in to produce config.h.  And first:
23950 # Protect against being on the right side of a sed subst in config.status.
23951 # Protect against being in an unquoted here document in config.status.
23952 rm -f conftest.vals
23953 cat > conftest.hdr <<\EOF
23954 s/[\\&%]/\\&/g
23955 s%[\\$`]%\\&%g
23956 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23957 s%ac_d%ac_u%gp
23958 s%ac_u%ac_e%gp
23959 EOF
23960 sed -n -f conftest.hdr confdefs.h > conftest.vals
23961 rm -f conftest.hdr
23962
23963 # This sed command replaces #undef with comments.  This is necessary, for
23964 # example, in the case of _POSIX_SOURCE, which is predefined and required
23965 # on some systems where configure will not decide to define it.
23966 cat >> conftest.vals <<\EOF
23967 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23968 EOF
23969
23970 # Break up conftest.vals because some shells have a limit on
23971 # the size of here documents, and old seds have small limits too.
23972
23973 rm -f conftest.tail
23974 while :
23975 do
23976   ac_lines=`grep -c . conftest.vals`
23977   # grep -c gives empty output for an empty file on some AIX systems.
23978   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23979   # Write a limited-size here document to conftest.frag.
23980   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23981   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23982   echo 'CEOF
23983   sed -f conftest.frag conftest.in > conftest.out
23984   rm -f conftest.in
23985   mv conftest.out conftest.in
23986 ' >> $CONFIG_STATUS
23987   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23988   rm -f conftest.vals
23989   mv conftest.tail conftest.vals
23990 done
23991 rm -f conftest.vals
23992
23993 cat >> $CONFIG_STATUS <<\EOF
23994   rm -f conftest.frag conftest.h
23995   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23996   cat conftest.in >> conftest.h
23997   rm -f conftest.in
23998   if cmp -s $ac_file conftest.h 2>/dev/null; then
23999     echo "$ac_file is unchanged"
24000     rm -f conftest.h
24001   else
24002     # Remove last slash and all that follows it.  Not all systems have dirname.
24003       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24004       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24005       # The file is in a subdirectory.
24006       test ! -d "$ac_dir" && mkdir "$ac_dir"
24007     fi
24008     rm -f $ac_file
24009     mv conftest.h $ac_file
24010   fi
24011 fi; done
24012
24013 EOF
24014 cat >> $CONFIG_STATUS <<EOF
24015
24016 EOF
24017 cat >> $CONFIG_STATUS <<\EOF
24018
24019 date > stamp-h
24020 echo Please run \"make depend\" to build dependencies
24021
24022 exit 0
24023 EOF
24024 chmod +x $CONFIG_STATUS
24025 rm -fr confdefs* $ac_clean_files
24026 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24027