]> git.sur5r.net Git - openldap/blob - configure
91a29724f18d572df9d509cc5217927f477f87c7
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.456 2003/02/09 06:42:24 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-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-ipv6           enable IPv6 support [auto]"
38 ac_help="$ac_help
39   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
40 ac_help="$ac_help
41   --enable-x-compile      enable cross compiling [no]"
42 ac_help="$ac_help
43   --with-cyrus-sasl       with Cyrus SASL support [auto]"
44 ac_help="$ac_help
45   --with-fetch            with fetch(3) URL support [auto]"
46 ac_help="$ac_help
47   --with-kerberos         with Kerberos support [auto]"
48 ac_help="$ac_help
49   --with-readline         with readline support [auto]"
50 ac_help="$ac_help
51   --with-threads          with threads [auto]"
52 ac_help="$ac_help
53   --with-tls              with TLS/SSL support [auto]"
54 ac_help="$ac_help
55   --with-yielding-select  with implicitly yielding select [auto]"
56 ac_help="$ac_help
57
58 SLAPD (Standalone LDAP Daemon) Options:"
59 ac_help="$ac_help
60   --enable-slapd          enable building slapd [yes]"
61 ac_help="$ac_help
62     --enable-aci          enable per-object ACIs (experimental) [no]"
63 ac_help="$ac_help
64     --enable-cleartext    enable cleartext passwords [yes]"
65 ac_help="$ac_help
66     --enable-crypt        enable crypt(3) passwords [no]"
67 ac_help="$ac_help
68     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
69 ac_help="$ac_help
70     --enable-kpasswd      enable Kerberos password verification [no]"
71 ac_help="$ac_help
72     --enable-lmpasswd     enable LAN Manager passwords [no]"
73 ac_help="$ac_help
74     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
75 ac_help="$ac_help
76     --enable-modules      enable dynamic module support [no]"
77 ac_help="$ac_help
78     --enable-phonetic     enable phonetic/soundex [no]"
79 ac_help="$ac_help
80     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
81 ac_help="$ac_help
82     --enable-rlookups     enable reverse lookups of client hostnames [no]"
83 ac_help="$ac_help
84     --enable-slp          enable SLPv2 support [no]"
85 ac_help="$ac_help
86     --enable-wrappers     enable tcp wrapper support [no]"
87 ac_help="$ac_help
88     --enable-slapi   enable installation of slapi library [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend [yes]"
91 ac_help="$ac_help
92     --with-bdb-module     module type static|dynamic [static]"
93 ac_help="$ac_help
94     --enable-dnssrv       enable dnssrv backend [no]"
95 ac_help="$ac_help
96     --with-dnssrv-module  module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-ldap         enable ldap backend [no]"
99 ac_help="$ac_help
100     --with-ldap-module    module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldbm         enable ldbm backend [no]"
103 ac_help="$ac_help
104     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
105 ac_help="$ac_help
106     --with-ldbm-module    module type static|dynamic [static]"
107 ac_help="$ac_help
108     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
109 ac_help="$ac_help
110     --enable-meta         enable metadirectory backend [no]"
111 ac_help="$ac_help
112     --with-meta-module    module type static|dynamic [static]"
113 ac_help="$ac_help
114     --enable-monitor      enable monitor backend [no]"
115 ac_help="$ac_help
116     --with-monitor-module module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-null         enable null backend [no]"
119 ac_help="$ac_help
120     --with-null-module    module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-passwd       enable passwd backend [no]"
123 ac_help="$ac_help
124     --with-passwd-module  module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-perl         enable perl backend [no]"
127 ac_help="$ac_help
128     --with-perl-module    module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-shell        enable shell backend [no]"
131 ac_help="$ac_help
132     --with-shell-module   module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-sql          enable sql backend [no]"
135 ac_help="$ac_help
136     --with-sql-module     module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-tcl          enable tcl backend [no]"
139 ac_help="$ac_help
140     --with-tcl-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142
143 SLURPD (Replication Daemon) Options:"
144 ac_help="$ac_help
145   --enable-slurpd         enable building slurpd [auto]"
146 ac_help="$ac_help
147
148 Library Generation & Linking Options"
149 ac_help="$ac_help
150   --enable-static[=PKGS]  build static libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-shared[=PKGS]  build shared libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
155 ac_help="$ac_help
156   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
157
158 # Find the correct PATH separator.  Usually this is `:', but
159 # DJGPP uses `;' like DOS.
160 if test "X${PATH_SEPARATOR+set}" != Xset; then
161   UNAME=${UNAME-`uname 2>/dev/null`}
162   case X$UNAME in
163     *-DOS) lt_cv_sys_path_separator=';' ;;
164     *)     lt_cv_sys_path_separator=':' ;;
165   esac
166   PATH_SEPARATOR=$lt_cv_sys_path_separator
167 fi
168
169
170 # Check that we are running under the correct shell.
171 SHELL=${CONFIG_SHELL-/bin/sh}
172
173 case X$ECHO in
174 X*--fallback-echo)
175   # Remove one level of quotation (which was required for Make).
176   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
177   ;;
178 esac
179
180 echo=${ECHO-echo}
181 if test "X$1" = X--no-reexec; then
182   # Discard the --no-reexec flag, and continue.
183   shift
184 elif test "X$1" = X--fallback-echo; then
185   # Avoid inline document here, it may be left over
186   :
187 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
188   # Yippee, $echo works!
189   :
190 else
191   # Restart under the correct shell.
192   exec $SHELL "$0" --no-reexec ${1+"$@"}
193 fi
194
195 if test "X$1" = X--fallback-echo; then
196   # used as fallback echo
197   shift
198   cat <<EOF
199
200 EOF
201   exit 0
202 fi
203
204 # The HP-UX ksh and POSIX shell print the target directory to stdout
205 # if CDPATH is set.
206 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
207
208 if test -z "$ECHO"; then
209 if test "X${echo_test_string+set}" != Xset; then
210 # find a string as large as possible, as long as the shell can cope with it
211   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
212     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
213     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
214        echo_test_string="`eval $cmd`" &&
215        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
216     then
217       break
218     fi
219   done
220 fi
221
222 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
223    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
224    test "X$echo_testing_string" = "X$echo_test_string"; then
225   :
226 else
227   # The Solaris, AIX, and Digital Unix default echo programs unquote
228   # backslashes.  This makes it impossible to quote backslashes using
229   #   echo "$something" | sed 's/\\/\\\\/g'
230   #
231   # So, first we look for a working echo in the user's PATH.
232
233   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
234   for dir in $PATH /usr/ucb; do
235     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
236        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
237        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
238        test "X$echo_testing_string" = "X$echo_test_string"; then
239       echo="$dir/echo"
240       break
241     fi
242   done
243   IFS="$save_ifs"
244
245   if test "X$echo" = Xecho; then
246     # We didn't find a better echo, so look for alternatives.
247     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
248        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
249        test "X$echo_testing_string" = "X$echo_test_string"; then
250       # This shell has a builtin print -r that does the trick.
251       echo='print -r'
252     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
253          test "X$CONFIG_SHELL" != X/bin/ksh; then
254       # If we have ksh, try running configure again with it.
255       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
256       export ORIGINAL_CONFIG_SHELL
257       CONFIG_SHELL=/bin/ksh
258       export CONFIG_SHELL
259       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
260     else
261       # Try using printf.
262       echo='printf %s\n'
263       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
264          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
265          test "X$echo_testing_string" = "X$echo_test_string"; then
266         # Cool, printf works
267         :
268       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
269            test "X$echo_testing_string" = 'X\t' &&
270            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
271            test "X$echo_testing_string" = "X$echo_test_string"; then
272         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
273         export CONFIG_SHELL
274         SHELL="$CONFIG_SHELL"
275         export SHELL
276         echo="$CONFIG_SHELL $0 --fallback-echo"
277       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
278            test "X$echo_testing_string" = 'X\t' &&
279            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
280            test "X$echo_testing_string" = "X$echo_test_string"; then
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       else
283         # maybe with a smaller string...
284         prev=:
285
286         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
287           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
288           then
289             break
290           fi
291           prev="$cmd"
292         done
293
294         if test "$prev" != 'sed 50q "$0"'; then
295           echo_test_string=`eval $prev`
296           export echo_test_string
297           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
298         else
299           # Oops.  We lost completely, so just stick with echo.
300           echo=echo
301         fi
302       fi
303     fi
304   fi
305 fi
306 fi
307
308 # Copy echo and quote the copy suitably for passing to libtool from
309 # the Makefile, instead of quoting the original, which is used later.
310 ECHO=$echo
311 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
312    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
313 fi
314
315
316 ac_help="$ac_help
317   --disable-libtool-lock  avoid locking (might break parallel builds)"
318 ac_help="$ac_help
319   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
320 ac_help="$ac_help
321
322 See INSTALL file for further details."
323
324 # Initialize some variables set by options.
325 # The variables have the same names as the options, with
326 # dashes changed to underlines.
327 build=NONE
328 cache_file=./config.cache
329 exec_prefix=NONE
330 host=NONE
331 no_create=
332 nonopt=NONE
333 no_recursion=
334 prefix=NONE
335 program_prefix=NONE
336 program_suffix=NONE
337 program_transform_name=s,x,x,
338 silent=
339 site=
340 srcdir=
341 target=NONE
342 verbose=
343 x_includes=NONE
344 x_libraries=NONE
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 # Initialize some other variables.
359 subdirs=
360 MFLAGS= MAKEFLAGS=
361 SHELL=${CONFIG_SHELL-/bin/sh}
362 # Maximum number of lines to put in a shell here document.
363 ac_max_here_lines=12
364
365 ac_prev=
366 for ac_option
367 do
368
369   # If the previous option needs an argument, assign it.
370   if test -n "$ac_prev"; then
371     eval "$ac_prev=\$ac_option"
372     ac_prev=
373     continue
374   fi
375
376   case "$ac_option" in
377   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
378   *) ac_optarg= ;;
379   esac
380
381   # Accept the important Cygnus configure options, so we can diagnose typos.
382
383   case "$ac_option" in
384
385   -bindir | --bindir | --bindi | --bind | --bin | --bi)
386     ac_prev=bindir ;;
387   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
388     bindir="$ac_optarg" ;;
389
390   -build | --build | --buil | --bui | --bu)
391     ac_prev=build ;;
392   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
393     build="$ac_optarg" ;;
394
395   -cache-file | --cache-file | --cache-fil | --cache-fi \
396   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
397     ac_prev=cache_file ;;
398   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
399   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
400     cache_file="$ac_optarg" ;;
401
402   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
403     ac_prev=datadir ;;
404   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
405   | --da=*)
406     datadir="$ac_optarg" ;;
407
408   -disable-* | --disable-*)
409     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
410     # Reject names that are not valid shell variable names.
411     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
412       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
413     fi
414     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
415     eval "enable_${ac_feature}=no" ;;
416
417   -enable-* | --enable-*)
418     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
421       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
422     fi
423     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
424     case "$ac_option" in
425       *=*) ;;
426       *) ac_optarg=yes ;;
427     esac
428     eval "enable_${ac_feature}='$ac_optarg'" ;;
429
430   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
431   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
432   | --exec | --exe | --ex)
433     ac_prev=exec_prefix ;;
434   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
435   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
436   | --exec=* | --exe=* | --ex=*)
437     exec_prefix="$ac_optarg" ;;
438
439   -gas | --gas | --ga | --g)
440     # Obsolete; use --with-gas.
441     with_gas=yes ;;
442
443   -help | --help | --hel | --he)
444     # Omit some internal or obsolete options to make the list less imposing.
445     # This message is too long to be a string in the A/UX 3.1 sh.
446     cat << EOF
447 Usage: configure [options] [host]
448 Options: [defaults in brackets after descriptions]
449 Configuration:
450   --cache-file=FILE       cache test results in FILE
451   --help                  print this message
452   --no-create             do not create output files
453   --quiet, --silent       do not print \`checking...' messages
454   --version               print the version of autoconf that created configure
455 Directory and file names:
456   --prefix=PREFIX         install architecture-independent files in PREFIX
457                           [$ac_default_prefix]
458   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
459                           [same as prefix]
460   --bindir=DIR            user executables in DIR [EPREFIX/bin]
461   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
462   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
463   --datadir=DIR           read-only architecture-independent data in DIR
464                           [PREFIX/share]
465   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
466   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
467                           [PREFIX/com]
468   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
469   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
470   --includedir=DIR        C header files in DIR [PREFIX/include]
471   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
472   --infodir=DIR           info documentation in DIR [PREFIX/info]
473   --mandir=DIR            man documentation in DIR [PREFIX/man]
474   --srcdir=DIR            find the sources in DIR [configure dir or ..]
475   --program-prefix=PREFIX prepend PREFIX to installed program names
476   --program-suffix=SUFFIX append SUFFIX to installed program names
477   --program-transform-name=PROGRAM
478                           run sed PROGRAM on installed program names
479 EOF
480     cat << EOF
481 Host type:
482   --build=BUILD           configure for building on BUILD [BUILD=HOST]
483   --host=HOST             configure for HOST [guessed]
484   --target=TARGET         configure for TARGET [TARGET=HOST]
485 Features and packages:
486   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
487   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
488   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
489   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
490   --x-includes=DIR        X include files are in DIR
491   --x-libraries=DIR       X library files are in DIR
492 EOF
493     if test -n "$ac_help"; then
494       echo "--enable and --with options recognized:$ac_help"
495     fi
496     exit 0 ;;
497
498   -host | --host | --hos | --ho)
499     ac_prev=host ;;
500   -host=* | --host=* | --hos=* | --ho=*)
501     host="$ac_optarg" ;;
502
503   -includedir | --includedir | --includedi | --included | --include \
504   | --includ | --inclu | --incl | --inc)
505     ac_prev=includedir ;;
506   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
507   | --includ=* | --inclu=* | --incl=* | --inc=*)
508     includedir="$ac_optarg" ;;
509
510   -infodir | --infodir | --infodi | --infod | --info | --inf)
511     ac_prev=infodir ;;
512   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
513     infodir="$ac_optarg" ;;
514
515   -libdir | --libdir | --libdi | --libd)
516     ac_prev=libdir ;;
517   -libdir=* | --libdir=* | --libdi=* | --libd=*)
518     libdir="$ac_optarg" ;;
519
520   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
521   | --libexe | --libex | --libe)
522     ac_prev=libexecdir ;;
523   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
524   | --libexe=* | --libex=* | --libe=*)
525     libexecdir="$ac_optarg" ;;
526
527   -localstatedir | --localstatedir | --localstatedi | --localstated \
528   | --localstate | --localstat | --localsta | --localst \
529   | --locals | --local | --loca | --loc | --lo)
530     ac_prev=localstatedir ;;
531   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
532   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
533   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
534     localstatedir="$ac_optarg" ;;
535
536   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
537     ac_prev=mandir ;;
538   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
539     mandir="$ac_optarg" ;;
540
541   -nfp | --nfp | --nf)
542     # Obsolete; use --without-fp.
543     with_fp=no ;;
544
545   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
546   | --no-cr | --no-c)
547     no_create=yes ;;
548
549   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
550   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
551     no_recursion=yes ;;
552
553   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
554   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
555   | --oldin | --oldi | --old | --ol | --o)
556     ac_prev=oldincludedir ;;
557   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
558   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
559   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
560     oldincludedir="$ac_optarg" ;;
561
562   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
563     ac_prev=prefix ;;
564   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
565     prefix="$ac_optarg" ;;
566
567   -program-prefix | --program-prefix | --program-prefi | --program-pref \
568   | --program-pre | --program-pr | --program-p)
569     ac_prev=program_prefix ;;
570   -program-prefix=* | --program-prefix=* | --program-prefi=* \
571   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
572     program_prefix="$ac_optarg" ;;
573
574   -program-suffix | --program-suffix | --program-suffi | --program-suff \
575   | --program-suf | --program-su | --program-s)
576     ac_prev=program_suffix ;;
577   -program-suffix=* | --program-suffix=* | --program-suffi=* \
578   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
579     program_suffix="$ac_optarg" ;;
580
581   -program-transform-name | --program-transform-name \
582   | --program-transform-nam | --program-transform-na \
583   | --program-transform-n | --program-transform- \
584   | --program-transform | --program-transfor \
585   | --program-transfo | --program-transf \
586   | --program-trans | --program-tran \
587   | --progr-tra | --program-tr | --program-t)
588     ac_prev=program_transform_name ;;
589   -program-transform-name=* | --program-transform-name=* \
590   | --program-transform-nam=* | --program-transform-na=* \
591   | --program-transform-n=* | --program-transform-=* \
592   | --program-transform=* | --program-transfor=* \
593   | --program-transfo=* | --program-transf=* \
594   | --program-trans=* | --program-tran=* \
595   | --progr-tra=* | --program-tr=* | --program-t=*)
596     program_transform_name="$ac_optarg" ;;
597
598   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
599   | -silent | --silent | --silen | --sile | --sil)
600     silent=yes ;;
601
602   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
603     ac_prev=sbindir ;;
604   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
605   | --sbi=* | --sb=*)
606     sbindir="$ac_optarg" ;;
607
608   -sharedstatedir | --sharedstatedir | --sharedstatedi \
609   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
610   | --sharedst | --shareds | --shared | --share | --shar \
611   | --sha | --sh)
612     ac_prev=sharedstatedir ;;
613   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
614   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
615   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
616   | --sha=* | --sh=*)
617     sharedstatedir="$ac_optarg" ;;
618
619   -site | --site | --sit)
620     ac_prev=site ;;
621   -site=* | --site=* | --sit=*)
622     site="$ac_optarg" ;;
623
624   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
625     ac_prev=srcdir ;;
626   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
627     srcdir="$ac_optarg" ;;
628
629   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
630   | --syscon | --sysco | --sysc | --sys | --sy)
631     ac_prev=sysconfdir ;;
632   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
633   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
634     sysconfdir="$ac_optarg" ;;
635
636   -target | --target | --targe | --targ | --tar | --ta | --t)
637     ac_prev=target ;;
638   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
639     target="$ac_optarg" ;;
640
641   -v | -verbose | --verbose | --verbos | --verbo | --verb)
642     verbose=yes ;;
643
644   -version | --version | --versio | --versi | --vers)
645     echo "configure generated by autoconf version 2.13.1"
646     exit 0 ;;
647
648   -with-* | --with-*)
649     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
650     # Reject names that are not valid shell variable names.
651     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
652       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
653     fi
654     ac_package=`echo $ac_package| sed 's/-/_/g'`
655     case "$ac_option" in
656       *=*) ;;
657       *) ac_optarg=yes ;;
658     esac
659     eval "with_${ac_package}='$ac_optarg'" ;;
660
661   -without-* | --without-*)
662     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
663     # Reject names that are not valid shell variable names.
664     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
665       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
666     fi
667     ac_package=`echo $ac_package| sed 's/-/_/g'`
668     eval "with_${ac_package}=no" ;;
669
670   --x)
671     # Obsolete; use --with-x.
672     with_x=yes ;;
673
674   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
675   | --x-incl | --x-inc | --x-in | --x-i)
676     ac_prev=x_includes ;;
677   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
678   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
679     x_includes="$ac_optarg" ;;
680
681   -x-libraries | --x-libraries | --x-librarie | --x-librari \
682   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
683     ac_prev=x_libraries ;;
684   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
685   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
686     x_libraries="$ac_optarg" ;;
687
688   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
689     ;;
690
691   *)
692     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
693       echo "configure: warning: $ac_option: invalid host type" 1>&2
694     fi
695     if test "x$nonopt" != xNONE; then
696       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
697     fi
698     nonopt="$ac_option"
699     ;;
700
701   esac
702 done
703
704 if test -n "$ac_prev"; then
705   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
706 fi
707
708 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
709
710 # File descriptor usage:
711 # 0 standard input
712 # 1 file creation
713 # 2 errors and warnings
714 # 3 some systems may open it to /dev/tty
715 # 4 used on the Kubota Titan
716 # 6 checking for... messages and results
717 # 5 compiler messages saved in config.log
718 if test "$silent" = yes; then
719   exec 6>/dev/null
720 else
721   exec 6>&1
722 fi
723 exec 5>./config.log
724
725 echo "\
726 This file contains any messages produced by compilers while
727 running configure, to aid debugging if configure makes a mistake.
728 " 1>&5
729
730 # Strip out --no-create and --no-recursion so they do not pile up.
731 # Also quote any args containing shell metacharacters.
732 ac_configure_args=
733 for ac_arg
734 do
735   case "$ac_arg" in
736   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
737   | --no-cr | --no-c) ;;
738   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
739   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
740   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
741   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
742   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
743   esac
744 done
745
746 # NLS nuisances.
747 # Only set these to C if already set.  These must not be set unconditionally
748 # because not all systems understand e.g. LANG=C (notably SCO).
749 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
750 # Non-C LC_CTYPE values break the ctype check.
751 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
752 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
753 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
754 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
755
756 # confdefs.h avoids OS command line length limits that DEFS can exceed.
757 rm -rf conftest* confdefs.h
758 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
759 echo > confdefs.h
760
761 # A filename unique to this package, relative to the directory that
762 # configure is in, which we can look for to find out if srcdir is correct.
763 ac_unique_file=build/version.sh
764
765 # Find the source files, if location was not specified.
766 if test -z "$srcdir"; then
767   ac_srcdir_defaulted=yes
768   # Try the directory containing this script, then its parent.
769   ac_prog=$0
770   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
771   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
772   srcdir=$ac_confdir
773   if test ! -r $srcdir/$ac_unique_file; then
774     srcdir=..
775   fi
776 else
777   ac_srcdir_defaulted=no
778 fi
779 if test ! -r $srcdir/$ac_unique_file; then
780   if test "$ac_srcdir_defaulted" = yes; then
781     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
782   else
783     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
784   fi
785 fi
786 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
787
788 # Prefer explicitly selected file to automatically selected ones.
789 if test -z "$CONFIG_SITE"; then
790   if test "x$prefix" != xNONE; then
791     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
792   else
793     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
794   fi
795 fi
796 for ac_site_file in $CONFIG_SITE; do
797   if test -r "$ac_site_file"; then
798     echo "loading site script $ac_site_file"
799     . "$ac_site_file"
800   fi
801 done
802
803
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
810
811 ac_exeext=
812 ac_objext=o
813 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
814   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
815   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
816     ac_n= ac_c='
817 ' ac_t='        '
818   else
819     ac_n=-n ac_c= ac_t=
820   fi
821 else
822   ac_n= ac_c='\c' ac_t=
823 fi
824
825
826 # set unset (borrowed from autoconf 2.49c)
827 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
828   ol_unset=unset
829 else
830   ol_unset=false
831 fi
832 # unset CDPATH
833 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
834
835 ac_aux_dir=
836 for ac_dir in build $srcdir/build; do
837   if 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/install.sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install.sh -c"
844     break
845   elif test -f $ac_dir/shtool; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/shtool install -c"
848     break
849   fi
850 done
851 if test -z "$ac_aux_dir"; then
852   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
853 fi
854 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
855 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
856 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
857
858 eval `$ac_aux_dir/version.sh`
859 if test -z "$OL_STRING"; then
860         { echo "configure: error: could not determine version" 1>&2; exit 1; }
861 fi
862
863 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
864         ac_cv_shtool="$ac_aux_dir/shtool"
865 else
866         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
867 fi
868
869 SHTOOL="$ac_cv_shtool"
870
871 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
872 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
873
874 OPENLDAP_CVS=""
875 if test -d $ac_aux_dir/CVS; then
876         OPENLDAP_CVS="(from CVS sources) "
877 fi
878
879 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
880
881
882 echo $ac_n "checking host system type""... $ac_c" 1>&6
883 echo "configure:884: checking host system type" >&5
884 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
885
886 # Make sure we can run config.sub.
887   if $ac_config_sub sun4 >/dev/null 2>&1; then :
888     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
889   fi
890
891   ac_cv_host_alias=$host
892   case "$ac_cv_host_alias" in
893   NONE)
894     case $nonopt in
895     NONE)
896       if ac_cv_host_alias=`$ac_config_guess`; then :
897       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
898       fi ;;
899     *) ac_cv_host_alias=$nonopt ;;
900     esac ;;
901   esac
902
903   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
904   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
905   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
906   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
907 else
908   echo $ac_n "(cached) $ac_c" 1>&6
909 fi
910
911 echo "$ac_t""$ac_cv_host" 1>&6
912
913 host=$ac_cv_host
914 host_alias=$ac_cv_host_alias
915 host_cpu=$ac_cv_host_cpu
916 host_vendor=$ac_cv_host_vendor
917 host_os=$ac_cv_host_os
918
919
920
921
922
923 echo $ac_n "checking target system type""... $ac_c" 1>&6
924 echo "configure:925: checking target system type" >&5
925 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
926
927 # Make sure we can run config.sub.
928   if $ac_config_sub sun4 >/dev/null 2>&1; then :
929     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
930   fi
931
932   ac_cv_target_alias=$target
933   case "$ac_cv_target_alias" in
934   NONE)
935     case $nonopt in
936     NONE)
937       ac_cv_target_alias=$host_alias ;;
938
939     *) ac_cv_target_alias=$nonopt ;;
940     esac ;;
941   esac
942
943   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
944   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
945   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
946   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
947 else
948   echo $ac_n "(cached) $ac_c" 1>&6
949 fi
950
951 echo "$ac_t""$ac_cv_target" 1>&6
952
953 target=$ac_cv_target
954 target_alias=$ac_cv_target_alias
955 target_cpu=$ac_cv_target_cpu
956 target_vendor=$ac_cv_target_vendor
957 target_os=$ac_cv_target_os
958
959
960
961
962
963 echo $ac_n "checking build system type""... $ac_c" 1>&6
964 echo "configure:965: checking build system type" >&5
965 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
966
967 # Make sure we can run config.sub.
968   if $ac_config_sub sun4 >/dev/null 2>&1; then :
969     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
970   fi
971
972   ac_cv_build_alias=$build
973   case "$ac_cv_build_alias" in
974   NONE)
975     case $nonopt in
976     NONE)
977       ac_cv_build_alias=$host_alias ;;
978
979     *) ac_cv_build_alias=$nonopt ;;
980     esac ;;
981   esac
982
983   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
984   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
985   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
986   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
987 else
988   echo $ac_n "(cached) $ac_c" 1>&6
989 fi
990
991 echo "$ac_t""$ac_cv_build" 1>&6
992
993 build=$ac_cv_build
994 build_alias=$ac_cv_build_alias
995 build_cpu=$ac_cv_build_cpu
996 build_vendor=$ac_cv_build_vendor
997 build_os=$ac_cv_build_os
998
999
1000
1001
1002
1003 # Do some error checking and defaulting for the host and target type.
1004 # The inputs are:
1005 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1006 #
1007 # The rules are:
1008 # 1. You are not allowed to specify --host, --target, and nonopt at the
1009 #    same time.
1010 # 2. Host defaults to nonopt.
1011 # 3. If nonopt is not specified, then host defaults to the current host,
1012 #    as determined by config.guess.
1013 # 4. Target and build default to nonopt.
1014 # 5. If nonopt is not specified, then target and build default to host.
1015
1016 # The aliases save the names the user supplied, while $host etc.
1017 # will get canonicalized.
1018 case $host---$target---$nonopt in
1019 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1020 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1021 esac
1022
1023 test "$host_alias" != "$target_alias" &&
1024   test "$program_prefix$program_suffix$program_transform_name" = \
1025     NONENONEs,x,x, &&
1026   program_prefix=${target_alias}-
1027
1028
1029 # Find a good install program.  We prefer a C program (faster),
1030 # so one script is as good as another.  But avoid the broken or
1031 # incompatible versions:
1032 # SysV /etc/install, /usr/sbin/install
1033 # SunOS /usr/etc/install
1034 # IRIX /sbin/install
1035 # AIX /bin/install
1036 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1037 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1038 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1039 # ./install, which can be erroneously created by make from ./install.sh.
1040 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1041 echo "configure:1042: checking for a BSD compatible install" >&5
1042 if test -z "$INSTALL"; then
1043 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1044   echo $ac_n "(cached) $ac_c" 1>&6
1045 else
1046     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1047   for ac_dir in $PATH; do
1048     # Account for people who put trailing slashes in PATH elements.
1049     case "$ac_dir/" in
1050     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1051     *)
1052       # OSF1 and SCO ODT 3.0 have their own names for install.
1053       # Don't use installbsd from OSF since it installs stuff as root
1054       # by default.
1055       for ac_prog in ginstall scoinst install; do
1056         if test -f $ac_dir/$ac_prog; then
1057           if test $ac_prog = install &&
1058             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # AIX install.  It has an incompatible calling convention.
1060             :
1061           elif test $ac_prog = install &&
1062             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1063             # program-specific install script used by HP pwplus--don't use.
1064             :
1065           else
1066             ac_cv_path_install="$ac_dir/$ac_prog -c"
1067             break 2
1068           fi
1069         fi
1070       done
1071       ;;
1072     esac
1073   done
1074   IFS="$ac_save_IFS"
1075
1076 fi
1077   if test "${ac_cv_path_install+set}" = set; then
1078     INSTALL="$ac_cv_path_install"
1079   else
1080     # As a last resort, use the slow shell script.  We don't cache a
1081     # path for INSTALL within a source directory, because that will
1082     # break other packages using the cache if that directory is
1083     # removed, or if the path is relative.
1084     INSTALL="$ac_install_sh"
1085   fi
1086 fi
1087 echo "$ac_t""$INSTALL" 1>&6
1088
1089 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1090 # It thinks the first close brace ends the variable substitution.
1091 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1092
1093 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1094
1095 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1096
1097 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1098 echo "configure:1099: checking whether build environment is sane" >&5
1099 # Just in case
1100 sleep 1
1101 echo timestamp > conftestfile
1102 # Do `set' in a subshell so we don't clobber the current shell's
1103 # arguments.  Must try -L first in case configure is actually a
1104 # symlink; some systems play weird games with the mod time of symlinks
1105 # (eg FreeBSD returns the mod time of the symlink's containing
1106 # directory).
1107 if (
1108    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1109    if test "$*" = "X"; then
1110       # -L didn't work.
1111       set X `ls -t $srcdir/configure conftestfile`
1112    fi
1113    if test "$*" != "X $srcdir/configure conftestfile" \
1114       && test "$*" != "X conftestfile $srcdir/configure"; then
1115
1116       # If neither matched, then we have a broken ls.  This can happen
1117       # if, for instance, CONFIG_SHELL is bash and it inherits a
1118       # broken ls alias from the environment.  This has actually
1119       # happened.  Such a system could not be considered "sane".
1120       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1121 alias in your environment" 1>&2; exit 1; }
1122    fi
1123
1124    test "$2" = conftestfile
1125    )
1126 then
1127    # Ok.
1128    :
1129 else
1130    { echo "configure: error: newly created file is older than distributed files!
1131 Check your system clock" 1>&2; exit 1; }
1132 fi
1133 rm -f conftest*
1134 echo "$ac_t""yes" 1>&6
1135 if test "$program_transform_name" = s,x,x,; then
1136   program_transform_name=
1137 else
1138   # Double any \ or $.  echo might interpret backslashes.
1139   cat <<\EOF_SED > conftestsed
1140 s,\\,\\\\,g; s,\$,$$,g
1141 EOF_SED
1142   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1143   rm -f conftestsed
1144 fi
1145 test "$program_prefix" != NONE &&
1146   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1147 # Use a double $ so make ignores it.
1148 test "$program_suffix" != NONE &&
1149   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1150
1151 # sed with no file args requires a program.
1152 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1153
1154 for ac_prog in mawk gawk nawk awk
1155 do
1156 # Extract the first word of "$ac_prog", so it can be a program name with args.
1157 set dummy $ac_prog; ac_word=$2
1158 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1159 echo "configure:1160: checking for $ac_word" >&5
1160 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1161   echo $ac_n "(cached) $ac_c" 1>&6
1162 else
1163   if test -n "$AWK"; then
1164   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1165 else
1166   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1167   ac_dummy="$PATH"
1168   for ac_dir in $ac_dummy; do
1169     test -z "$ac_dir" && ac_dir=.
1170     if test -f $ac_dir/$ac_word; then
1171       ac_cv_prog_AWK="$ac_prog"
1172       break
1173     fi
1174   done
1175   IFS="$ac_save_ifs"
1176 fi
1177 fi
1178 AWK="$ac_cv_prog_AWK"
1179 if test -n "$AWK"; then
1180   echo "$ac_t""$AWK" 1>&6
1181 else
1182   echo "$ac_t""no" 1>&6
1183 fi
1184
1185 test -n "$AWK" && break
1186 done
1187
1188 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1189 echo "configure:1190: checking whether ${MAKE-make} sets \${MAKE}" >&5
1190 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1191 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1192   echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194   cat > conftestmake <<\EOF
1195 all:
1196         @echo 'ac_maketemp="${MAKE}"'
1197 EOF
1198 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1199 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1200 if test -n "$ac_maketemp"; then
1201   eval ac_cv_prog_make_${ac_make}_set=yes
1202 else
1203   eval ac_cv_prog_make_${ac_make}_set=no
1204 fi
1205 rm -f conftestmake
1206 fi
1207 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1208   echo "$ac_t""yes" 1>&6
1209   SET_MAKE=
1210 else
1211   echo "$ac_t""no" 1>&6
1212   SET_MAKE="MAKE=${MAKE-make}"
1213 fi
1214
1215
1216
1217 PACKAGE=$OL_PACKAGE
1218
1219 VERSION=$OL_VERSION
1220
1221 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1222   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1223 fi
1224
1225
1226
1227 missing_dir=`cd $ac_aux_dir && pwd`
1228 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1229 echo "configure:1230: checking for working aclocal" >&5
1230 # Run test in a subshell; some versions of sh will print an error if
1231 # an executable is not found, even if stderr is redirected.
1232 # Redirect stdin to placate older versions of autoconf.  Sigh.
1233 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1234    ACLOCAL=aclocal
1235    echo "$ac_t""found" 1>&6
1236 else
1237    ACLOCAL="$missing_dir/missing aclocal"
1238    echo "$ac_t""missing" 1>&6
1239 fi
1240
1241 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1242 echo "configure:1243: checking for working autoconf" >&5
1243 # Run test in a subshell; some versions of sh will print an error if
1244 # an executable is not found, even if stderr is redirected.
1245 # Redirect stdin to placate older versions of autoconf.  Sigh.
1246 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1247    AUTOCONF=autoconf
1248    echo "$ac_t""found" 1>&6
1249 else
1250    AUTOCONF="$missing_dir/missing autoconf"
1251    echo "$ac_t""missing" 1>&6
1252 fi
1253
1254 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1255 echo "configure:1256: checking for working automake" >&5
1256 # Run test in a subshell; some versions of sh will print an error if
1257 # an executable is not found, even if stderr is redirected.
1258 # Redirect stdin to placate older versions of autoconf.  Sigh.
1259 if (automake --version) < /dev/null > /dev/null 2>&1; then
1260    AUTOMAKE=automake
1261    echo "$ac_t""found" 1>&6
1262 else
1263    AUTOMAKE="$missing_dir/missing automake"
1264    echo "$ac_t""missing" 1>&6
1265 fi
1266
1267 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1268 echo "configure:1269: checking for working autoheader" >&5
1269 # Run test in a subshell; some versions of sh will print an error if
1270 # an executable is not found, even if stderr is redirected.
1271 # Redirect stdin to placate older versions of autoconf.  Sigh.
1272 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1273    AUTOHEADER=autoheader
1274    echo "$ac_t""found" 1>&6
1275 else
1276    AUTOHEADER="$missing_dir/missing autoheader"
1277    echo "$ac_t""missing" 1>&6
1278 fi
1279
1280 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1281 echo "configure:1282: checking for working makeinfo" >&5
1282 # Run test in a subshell; some versions of sh will print an error if
1283 # an executable is not found, even if stderr is redirected.
1284 # Redirect stdin to placate older versions of autoconf.  Sigh.
1285 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1286    MAKEINFO=makeinfo
1287    echo "$ac_t""found" 1>&6
1288 else
1289    MAKEINFO="$missing_dir/missing makeinfo"
1290    echo "$ac_t""missing" 1>&6
1291 fi
1292
1293 install_sh="$missing_dir/install-sh"
1294 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1295
1296 for ac_prog in gnutar gtar tar
1297 do
1298 # Extract the first word of "$ac_prog", so it can be a program name with args.
1299 set dummy $ac_prog; ac_word=$2
1300 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1301 echo "configure:1302: checking for $ac_word" >&5
1302 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1303   echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305   if test -n "$AMTAR"; then
1306   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1307 else
1308   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1309   ac_dummy="$PATH"
1310   for ac_dir in $ac_dummy; do
1311     test -z "$ac_dir" && ac_dir=.
1312     if test -f $ac_dir/$ac_word; then
1313       ac_cv_prog_AMTAR="$ac_prog"
1314       break
1315     fi
1316   done
1317   IFS="$ac_save_ifs"
1318 fi
1319 fi
1320 AMTAR="$ac_cv_prog_AMTAR"
1321 if test -n "$AMTAR"; then
1322   echo "$ac_t""$AMTAR" 1>&6
1323 else
1324   echo "$ac_t""no" 1>&6
1325 fi
1326
1327 test -n "$AMTAR" && break
1328 done
1329
1330
1331 AMTARFLAGS=
1332 if test -n "$AMTAR"; then
1333   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1334         AMTARFLAGS=o
1335   fi
1336 fi
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_PACKAGE "$PACKAGE"
1340 EOF
1341
1342 cat >> confdefs.h <<EOF
1343 #define OPENLDAP_VERSION "$VERSION"
1344 EOF
1345
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION $OL_API_INC
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1361 EOF
1362
1363
1364 OPENLDAP_LIBVERSION=$OL_API_LIB
1365
1366 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1367
1368
1369
1370 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1371 echo "configure:1372: checking configure arguments" >&5
1372
1373
1374 top_builddir=`pwd`
1375
1376 ldap_subdir="/openldap"
1377
1378 # Check whether --with-subdir or --without-subdir was given.
1379 if test "${with_subdir+set}" = set; then
1380   withval="$with_subdir"
1381   case "$withval" in
1382         no) ldap_subdir=""
1383                 ;;
1384         yes)
1385                 ;;
1386         /*|\\*)
1387                 ldap_subdir="$withval"
1388                 ;;
1389         *)
1390                 ldap_subdir="/$withval"
1391                 ;;
1392 esac
1393
1394 fi
1395
1396
1397 # OpenLDAP --enable-debug
1398         # Check whether --enable-debug or --disable-debug was given.
1399 if test "${enable_debug+set}" = set; then
1400   enableval="$enable_debug"
1401   
1402         ol_arg=invalid
1403         for ol_val in auto yes no ; do
1404                 if test "$enableval" = "$ol_val" ; then
1405                         ol_arg="$ol_val"
1406                 fi
1407         done
1408         if test "$ol_arg" = "invalid" ; then
1409                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1410         fi
1411         ol_enable_debug="$ol_arg"
1412
1413 else
1414         ol_enable_debug="yes"
1415 fi
1416 # end --enable-debug
1417 # OpenLDAP --enable-syslog
1418         # Check whether --enable-syslog or --disable-syslog was given.
1419 if test "${enable_syslog+set}" = set; then
1420   enableval="$enable_syslog"
1421   
1422         ol_arg=invalid
1423         for ol_val in auto yes no ; do
1424                 if test "$enableval" = "$ol_val" ; then
1425                         ol_arg="$ol_val"
1426                 fi
1427         done
1428         if test "$ol_arg" = "invalid" ; then
1429                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1430         fi
1431         ol_enable_syslog="$ol_arg"
1432
1433 else
1434         ol_enable_syslog="auto"
1435 fi
1436 # end --enable-syslog
1437 # OpenLDAP --enable-proctitle
1438         # Check whether --enable-proctitle or --disable-proctitle was given.
1439 if test "${enable_proctitle+set}" = set; then
1440   enableval="$enable_proctitle"
1441   
1442         ol_arg=invalid
1443         for ol_val in auto yes no ; do
1444                 if test "$enableval" = "$ol_val" ; then
1445                         ol_arg="$ol_val"
1446                 fi
1447         done
1448         if test "$ol_arg" = "invalid" ; then
1449                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1450         fi
1451         ol_enable_proctitle="$ol_arg"
1452
1453 else
1454         ol_enable_proctitle="yes"
1455 fi
1456 # end --enable-proctitle
1457 ol_enable_referrals=${ol_enable_referrals-no}
1458 ol_enable_kbind=${ol_enable_kbind-no}
1459 # OpenLDAP --enable-ipv6
1460         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1461 if test "${enable_ipv6+set}" = set; then
1462   enableval="$enable_ipv6"
1463   
1464         ol_arg=invalid
1465         for ol_val in auto yes no ; do
1466                 if test "$enableval" = "$ol_val" ; then
1467                         ol_arg="$ol_val"
1468                 fi
1469         done
1470         if test "$ol_arg" = "invalid" ; then
1471                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1472         fi
1473         ol_enable_ipv6="$ol_arg"
1474
1475 else
1476         ol_enable_ipv6="auto"
1477 fi
1478 # end --enable-ipv6
1479 # OpenLDAP --enable-local
1480         # Check whether --enable-local or --disable-local was given.
1481 if test "${enable_local+set}" = set; then
1482   enableval="$enable_local"
1483   
1484         ol_arg=invalid
1485         for ol_val in auto yes no ; do
1486                 if test "$enableval" = "$ol_val" ; then
1487                         ol_arg="$ol_val"
1488                 fi
1489         done
1490         if test "$ol_arg" = "invalid" ; then
1491                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1492         fi
1493         ol_enable_local="$ol_arg"
1494
1495 else
1496         ol_enable_local="auto"
1497 fi
1498 # end --enable-local
1499 # OpenLDAP --enable-x_compile
1500         # Check whether --enable-x_compile or --disable-x_compile was given.
1501 if test "${enable_x_compile+set}" = set; then
1502   enableval="$enable_x_compile"
1503   
1504         ol_arg=invalid
1505         for ol_val in yes no ; do
1506                 if test "$enableval" = "$ol_val" ; then
1507                         ol_arg="$ol_val"
1508                 fi
1509         done
1510         if test "$ol_arg" = "invalid" ; then
1511                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1512         fi
1513         ol_enable_x_compile="$ol_arg"
1514
1515 else
1516         ol_enable_x_compile="no"
1517 fi
1518 # end --enable-x_compile
1519
1520
1521 # OpenLDAP --with-cyrus_sasl
1522         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1523 if test "${with_cyrus_sasl+set}" = set; then
1524   withval="$with_cyrus_sasl"
1525   
1526         ol_arg=invalid
1527         for ol_val in auto yes no  ; do
1528                 if test "$withval" = "$ol_val" ; then
1529                         ol_arg="$ol_val"
1530                 fi
1531         done
1532         if test "$ol_arg" = "invalid" ; then
1533                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1534         fi
1535         ol_with_cyrus_sasl="$ol_arg"
1536
1537 else
1538         ol_with_cyrus_sasl="auto"
1539 fi
1540 # end --with-cyrus_sasl
1541
1542 # OpenLDAP --with-fetch
1543         # Check whether --with-fetch or --without-fetch was given.
1544 if test "${with_fetch+set}" = set; then
1545   withval="$with_fetch"
1546   
1547         ol_arg=invalid
1548         for ol_val in auto yes no  ; do
1549                 if test "$withval" = "$ol_val" ; then
1550                         ol_arg="$ol_val"
1551                 fi
1552         done
1553         if test "$ol_arg" = "invalid" ; then
1554                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1555         fi
1556         ol_with_fetch="$ol_arg"
1557
1558 else
1559         ol_with_fetch="auto"
1560 fi
1561 # end --with-fetch
1562
1563 # OpenLDAP --with-kerberos
1564         # Check whether --with-kerberos or --without-kerberos was given.
1565 if test "${with_kerberos+set}" = set; then
1566   withval="$with_kerberos"
1567   
1568         ol_arg=invalid
1569         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1570                 if test "$withval" = "$ol_val" ; then
1571                         ol_arg="$ol_val"
1572                 fi
1573         done
1574         if test "$ol_arg" = "invalid" ; then
1575                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1576         fi
1577         ol_with_kerberos="$ol_arg"
1578
1579 else
1580         ol_with_kerberos="auto"
1581 fi
1582 # end --with-kerberos
1583
1584 # OpenLDAP --with-readline
1585         # Check whether --with-readline or --without-readline was given.
1586 if test "${with_readline+set}" = set; then
1587   withval="$with_readline"
1588   
1589         ol_arg=invalid
1590         for ol_val in auto yes no  ; do
1591                 if test "$withval" = "$ol_val" ; then
1592                         ol_arg="$ol_val"
1593                 fi
1594         done
1595         if test "$ol_arg" = "invalid" ; then
1596                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1597         fi
1598         ol_with_readline="$ol_arg"
1599
1600 else
1601         ol_with_readline="auto"
1602 fi
1603 # end --with-readline
1604
1605 # OpenLDAP --with-threads
1606         # Check whether --with-threads or --without-threads was given.
1607 if test "${with_threads+set}" = set; then
1608   withval="$with_threads"
1609   
1610         ol_arg=invalid
1611         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1612                 if test "$withval" = "$ol_val" ; then
1613                         ol_arg="$ol_val"
1614                 fi
1615         done
1616         if test "$ol_arg" = "invalid" ; then
1617                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1618         fi
1619         ol_with_threads="$ol_arg"
1620
1621 else
1622         ol_with_threads="auto"
1623 fi
1624 # end --with-threads
1625
1626 # OpenLDAP --with-tls
1627         # Check whether --with-tls or --without-tls was given.
1628 if test "${with_tls+set}" = set; then
1629   withval="$with_tls"
1630   
1631         ol_arg=invalid
1632         for ol_val in auto ssleay openssl yes no  ; do
1633                 if test "$withval" = "$ol_val" ; then
1634                         ol_arg="$ol_val"
1635                 fi
1636         done
1637         if test "$ol_arg" = "invalid" ; then
1638                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1639         fi
1640         ol_with_tls="$ol_arg"
1641
1642 else
1643         ol_with_tls="auto"
1644 fi
1645 # end --with-tls
1646
1647 # OpenLDAP --with-yielding_select
1648         # Check whether --with-yielding_select or --without-yielding_select was given.
1649 if test "${with_yielding_select+set}" = set; then
1650   withval="$with_yielding_select"
1651   
1652         ol_arg=invalid
1653         for ol_val in auto yes no manual  ; do
1654                 if test "$withval" = "$ol_val" ; then
1655                         ol_arg="$ol_val"
1656                 fi
1657         done
1658         if test "$ol_arg" = "invalid" ; then
1659                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1660         fi
1661         ol_with_yielding_select="$ol_arg"
1662
1663 else
1664         ol_with_yielding_select="auto"
1665 fi
1666 # end --with-yielding_select
1667
1668
1669
1670 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1671 if test "${with_xxslapdoptions+set}" = set; then
1672   withval="$with_xxslapdoptions"
1673   :
1674 fi
1675
1676 # OpenLDAP --enable-slapd
1677         # Check whether --enable-slapd or --disable-slapd was given.
1678 if test "${enable_slapd+set}" = set; then
1679   enableval="$enable_slapd"
1680   
1681         ol_arg=invalid
1682         for ol_val in auto yes no ; do
1683                 if test "$enableval" = "$ol_val" ; then
1684                         ol_arg="$ol_val"
1685                 fi
1686         done
1687         if test "$ol_arg" = "invalid" ; then
1688                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1689         fi
1690         ol_enable_slapd="$ol_arg"
1691
1692 else
1693         ol_enable_slapd="yes"
1694 fi
1695 # end --enable-slapd
1696 # OpenLDAP --enable-aci
1697         # Check whether --enable-aci or --disable-aci was given.
1698 if test "${enable_aci+set}" = set; then
1699   enableval="$enable_aci"
1700   
1701         ol_arg=invalid
1702         for ol_val in auto yes no ; do
1703                 if test "$enableval" = "$ol_val" ; then
1704                         ol_arg="$ol_val"
1705                 fi
1706         done
1707         if test "$ol_arg" = "invalid" ; then
1708                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1709         fi
1710         ol_enable_aci="$ol_arg"
1711
1712 else
1713         ol_enable_aci="no"
1714 fi
1715 # end --enable-aci
1716 # OpenLDAP --enable-cleartext
1717         # Check whether --enable-cleartext or --disable-cleartext was given.
1718 if test "${enable_cleartext+set}" = set; then
1719   enableval="$enable_cleartext"
1720   
1721         ol_arg=invalid
1722         for ol_val in auto yes no ; do
1723                 if test "$enableval" = "$ol_val" ; then
1724                         ol_arg="$ol_val"
1725                 fi
1726         done
1727         if test "$ol_arg" = "invalid" ; then
1728                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1729         fi
1730         ol_enable_cleartext="$ol_arg"
1731
1732 else
1733         ol_enable_cleartext="yes"
1734 fi
1735 # end --enable-cleartext
1736 # OpenLDAP --enable-crypt
1737         # Check whether --enable-crypt or --disable-crypt was given.
1738 if test "${enable_crypt+set}" = set; then
1739   enableval="$enable_crypt"
1740   
1741         ol_arg=invalid
1742         for ol_val in auto yes no ; do
1743                 if test "$enableval" = "$ol_val" ; then
1744                         ol_arg="$ol_val"
1745                 fi
1746         done
1747         if test "$ol_arg" = "invalid" ; then
1748                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1749         fi
1750         ol_enable_crypt="$ol_arg"
1751
1752 else
1753         ol_enable_crypt="no"
1754 fi
1755 # end --enable-crypt
1756 # OpenLDAP --enable-dynamic
1757         # Check whether --enable-dynamic or --disable-dynamic was given.
1758 if test "${enable_dynamic+set}" = set; then
1759   enableval="$enable_dynamic"
1760   
1761         ol_arg=invalid
1762         for ol_val in auto yes no ; do
1763                 if test "$enableval" = "$ol_val" ; then
1764                         ol_arg="$ol_val"
1765                 fi
1766         done
1767         if test "$ol_arg" = "invalid" ; then
1768                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1769         fi
1770         ol_enable_dynamic="$ol_arg"
1771
1772 else
1773         ol_enable_dynamic="no"
1774 fi
1775 # end --enable-dynamic
1776 # OpenLDAP --enable-kpasswd
1777         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1778 if test "${enable_kpasswd+set}" = set; then
1779   enableval="$enable_kpasswd"
1780   
1781         ol_arg=invalid
1782         for ol_val in auto yes no ; do
1783                 if test "$enableval" = "$ol_val" ; then
1784                         ol_arg="$ol_val"
1785                 fi
1786         done
1787         if test "$ol_arg" = "invalid" ; then
1788                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1789         fi
1790         ol_enable_kpasswd="$ol_arg"
1791
1792 else
1793         ol_enable_kpasswd="no"
1794 fi
1795 # end --enable-kpasswd
1796 # OpenLDAP --enable-lmpasswd
1797         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1798 if test "${enable_lmpasswd+set}" = set; then
1799   enableval="$enable_lmpasswd"
1800   
1801         ol_arg=invalid
1802         for ol_val in auto yes no ; do
1803                 if test "$enableval" = "$ol_val" ; then
1804                         ol_arg="$ol_val"
1805                 fi
1806         done
1807         if test "$ol_arg" = "invalid" ; then
1808                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1809         fi
1810         ol_enable_lmpasswd="$ol_arg"
1811
1812 else
1813         ol_enable_lmpasswd="no"
1814 fi
1815 # end --enable-lmpasswd
1816 # OpenLDAP --enable-spasswd
1817         # Check whether --enable-spasswd or --disable-spasswd was given.
1818 if test "${enable_spasswd+set}" = set; then
1819   enableval="$enable_spasswd"
1820   
1821         ol_arg=invalid
1822         for ol_val in auto yes no ; do
1823                 if test "$enableval" = "$ol_val" ; then
1824                         ol_arg="$ol_val"
1825                 fi
1826         done
1827         if test "$ol_arg" = "invalid" ; then
1828                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1829         fi
1830         ol_enable_spasswd="$ol_arg"
1831
1832 else
1833         ol_enable_spasswd="no"
1834 fi
1835 # end --enable-spasswd
1836 # OpenLDAP --enable-modules
1837         # Check whether --enable-modules or --disable-modules was given.
1838 if test "${enable_modules+set}" = set; then
1839   enableval="$enable_modules"
1840   
1841         ol_arg=invalid
1842         for ol_val in auto yes no ; do
1843                 if test "$enableval" = "$ol_val" ; then
1844                         ol_arg="$ol_val"
1845                 fi
1846         done
1847         if test "$ol_arg" = "invalid" ; then
1848                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1849         fi
1850         ol_enable_modules="$ol_arg"
1851
1852 else
1853         ol_enable_modules="no"
1854 fi
1855 # end --enable-modules
1856 ol_enable_multimaster=${ol_enable_multimaster-no}
1857 # OpenLDAP --enable-phonetic
1858         # Check whether --enable-phonetic or --disable-phonetic was given.
1859 if test "${enable_phonetic+set}" = set; then
1860   enableval="$enable_phonetic"
1861   
1862         ol_arg=invalid
1863         for ol_val in auto yes no ; do
1864                 if test "$enableval" = "$ol_val" ; then
1865                         ol_arg="$ol_val"
1866                 fi
1867         done
1868         if test "$ol_arg" = "invalid" ; then
1869                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1870         fi
1871         ol_enable_phonetic="$ol_arg"
1872
1873 else
1874         ol_enable_phonetic="no"
1875 fi
1876 # end --enable-phonetic
1877 # OpenLDAP --enable-rewrite
1878         # Check whether --enable-rewrite or --disable-rewrite was given.
1879 if test "${enable_rewrite+set}" = set; then
1880   enableval="$enable_rewrite"
1881   
1882         ol_arg=invalid
1883         for ol_val in auto yes no ; do
1884                 if test "$enableval" = "$ol_val" ; then
1885                         ol_arg="$ol_val"
1886                 fi
1887         done
1888         if test "$ol_arg" = "invalid" ; then
1889                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1890         fi
1891         ol_enable_rewrite="$ol_arg"
1892
1893 else
1894         ol_enable_rewrite="no"
1895 fi
1896 # end --enable-rewrite
1897 # OpenLDAP --enable-rlookups
1898         # Check whether --enable-rlookups or --disable-rlookups was given.
1899 if test "${enable_rlookups+set}" = set; then
1900   enableval="$enable_rlookups"
1901   
1902         ol_arg=invalid
1903         for ol_val in auto yes no ; do
1904                 if test "$enableval" = "$ol_val" ; then
1905                         ol_arg="$ol_val"
1906                 fi
1907         done
1908         if test "$ol_arg" = "invalid" ; then
1909                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1910         fi
1911         ol_enable_rlookups="$ol_arg"
1912
1913 else
1914         ol_enable_rlookups="no"
1915 fi
1916 # end --enable-rlookups
1917 # OpenLDAP --enable-slp
1918         # Check whether --enable-slp or --disable-slp was given.
1919 if test "${enable_slp+set}" = set; then
1920   enableval="$enable_slp"
1921   
1922         ol_arg=invalid
1923         for ol_val in auto yes no ; do
1924                 if test "$enableval" = "$ol_val" ; then
1925                         ol_arg="$ol_val"
1926                 fi
1927         done
1928         if test "$ol_arg" = "invalid" ; then
1929                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1930         fi
1931         ol_enable_slp="$ol_arg"
1932
1933 else
1934         ol_enable_slp="no"
1935 fi
1936 # end --enable-slp
1937 # OpenLDAP --enable-wrappers
1938         # Check whether --enable-wrappers or --disable-wrappers was given.
1939 if test "${enable_wrappers+set}" = set; then
1940   enableval="$enable_wrappers"
1941   
1942         ol_arg=invalid
1943         for ol_val in auto yes no ; do
1944                 if test "$enableval" = "$ol_val" ; then
1945                         ol_arg="$ol_val"
1946                 fi
1947         done
1948         if test "$ol_arg" = "invalid" ; then
1949                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1950         fi
1951         ol_enable_wrappers="$ol_arg"
1952
1953 else
1954         ol_enable_wrappers="no"
1955 fi
1956 # end --enable-wrappers
1957
1958 # OpenLDAP --enable-slapi
1959         # Check whether --enable-slapi or --disable-slapi was given.
1960 if test "${enable_slapi+set}" = set; then
1961   enableval="$enable_slapi"
1962   
1963         ol_arg=invalid
1964         for ol_val in auto yes no ; do
1965                 if test "$enableval" = "$ol_val" ; then
1966                         ol_arg="$ol_val"
1967                 fi
1968         done
1969         if test "$ol_arg" = "invalid" ; then
1970                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1971         fi
1972         ol_enable_slapi="$ol_arg"
1973
1974 else
1975         ol_enable_slapi="no"
1976 fi
1977 # end --enable-slapi
1978
1979 # OpenLDAP --enable-bdb
1980         # Check whether --enable-bdb or --disable-bdb was given.
1981 if test "${enable_bdb+set}" = set; then
1982   enableval="$enable_bdb"
1983   
1984         ol_arg=invalid
1985         for ol_val in auto yes no ; do
1986                 if test "$enableval" = "$ol_val" ; then
1987                         ol_arg="$ol_val"
1988                 fi
1989         done
1990         if test "$ol_arg" = "invalid" ; then
1991                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1992         fi
1993         ol_enable_bdb="$ol_arg"
1994
1995 else
1996         ol_enable_bdb="yes"
1997 fi
1998 # end --enable-bdb
1999 # OpenLDAP --with-bdb_module
2000         # Check whether --with-bdb_module or --without-bdb_module was given.
2001 if test "${with_bdb_module+set}" = set; then
2002   withval="$with_bdb_module"
2003   
2004         ol_arg=invalid
2005         for ol_val in static dynamic ; do
2006                 if test "$withval" = "$ol_val" ; then
2007                         ol_arg="$ol_val"
2008                 fi
2009         done
2010         if test "$ol_arg" = "invalid" ; then
2011                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2012         fi
2013         ol_with_bdb_module="$ol_arg"
2014
2015 else
2016         ol_with_bdb_module="static"
2017 fi
2018 # end --with-bdb_module
2019
2020 # OpenLDAP --enable-dnssrv
2021         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2022 if test "${enable_dnssrv+set}" = set; then
2023   enableval="$enable_dnssrv"
2024   
2025         ol_arg=invalid
2026         for ol_val in auto yes no ; do
2027                 if test "$enableval" = "$ol_val" ; then
2028                         ol_arg="$ol_val"
2029                 fi
2030         done
2031         if test "$ol_arg" = "invalid" ; then
2032                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2033         fi
2034         ol_enable_dnssrv="$ol_arg"
2035
2036 else
2037         ol_enable_dnssrv="no"
2038 fi
2039 # end --enable-dnssrv
2040 # OpenLDAP --with-dnssrv_module
2041         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2042 if test "${with_dnssrv_module+set}" = set; then
2043   withval="$with_dnssrv_module"
2044   
2045         ol_arg=invalid
2046         for ol_val in static dynamic ; do
2047                 if test "$withval" = "$ol_val" ; then
2048                         ol_arg="$ol_val"
2049                 fi
2050         done
2051         if test "$ol_arg" = "invalid" ; then
2052                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2053         fi
2054         ol_with_dnssrv_module="$ol_arg"
2055
2056 else
2057         ol_with_dnssrv_module="static"
2058 fi
2059 # end --with-dnssrv_module
2060
2061 # OpenLDAP --enable-ldap
2062         # Check whether --enable-ldap or --disable-ldap was given.
2063 if test "${enable_ldap+set}" = set; then
2064   enableval="$enable_ldap"
2065   
2066         ol_arg=invalid
2067         for ol_val in auto yes no ; do
2068                 if test "$enableval" = "$ol_val" ; then
2069                         ol_arg="$ol_val"
2070                 fi
2071         done
2072         if test "$ol_arg" = "invalid" ; then
2073                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2074         fi
2075         ol_enable_ldap="$ol_arg"
2076
2077 else
2078         ol_enable_ldap="no"
2079 fi
2080 # end --enable-ldap
2081 # OpenLDAP --with-ldap_module
2082         # Check whether --with-ldap_module or --without-ldap_module was given.
2083 if test "${with_ldap_module+set}" = set; then
2084   withval="$with_ldap_module"
2085   
2086         ol_arg=invalid
2087         for ol_val in static dynamic ; do
2088                 if test "$withval" = "$ol_val" ; then
2089                         ol_arg="$ol_val"
2090                 fi
2091         done
2092         if test "$ol_arg" = "invalid" ; then
2093                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2094         fi
2095         ol_with_ldap_module="$ol_arg"
2096
2097 else
2098         ol_with_ldap_module="static"
2099 fi
2100 # end --with-ldap_module
2101
2102 # OpenLDAP --enable-ldbm
2103         # Check whether --enable-ldbm or --disable-ldbm was given.
2104 if test "${enable_ldbm+set}" = set; then
2105   enableval="$enable_ldbm"
2106   
2107         ol_arg=invalid
2108         for ol_val in auto yes no ; do
2109                 if test "$enableval" = "$ol_val" ; then
2110                         ol_arg="$ol_val"
2111                 fi
2112         done
2113         if test "$ol_arg" = "invalid" ; then
2114                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2115         fi
2116         ol_enable_ldbm="$ol_arg"
2117
2118 else
2119         ol_enable_ldbm="no"
2120 fi
2121 # end --enable-ldbm
2122 # OpenLDAP --with-ldbm_api
2123         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2124 if test "${with_ldbm_api+set}" = set; then
2125   withval="$with_ldbm_api"
2126   
2127         ol_arg=invalid
2128         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2129                 if test "$withval" = "$ol_val" ; then
2130                         ol_arg="$ol_val"
2131                 fi
2132         done
2133         if test "$ol_arg" = "invalid" ; then
2134                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2135         fi
2136         ol_with_ldbm_api="$ol_arg"
2137
2138 else
2139         ol_with_ldbm_api="auto"
2140 fi
2141 # end --with-ldbm_api
2142
2143 # OpenLDAP --with-ldbm_module
2144         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2145 if test "${with_ldbm_module+set}" = set; then
2146   withval="$with_ldbm_module"
2147   
2148         ol_arg=invalid
2149         for ol_val in static dynamic ; do
2150                 if test "$withval" = "$ol_val" ; then
2151                         ol_arg="$ol_val"
2152                 fi
2153         done
2154         if test "$ol_arg" = "invalid" ; then
2155                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2156         fi
2157         ol_with_ldbm_module="$ol_arg"
2158
2159 else
2160         ol_with_ldbm_module="static"
2161 fi
2162 # end --with-ldbm_module
2163
2164 # OpenLDAP --with-ldbm_type
2165         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2166 if test "${with_ldbm_type+set}" = set; then
2167   withval="$with_ldbm_type"
2168   
2169         ol_arg=invalid
2170         for ol_val in auto btree hash ; do
2171                 if test "$withval" = "$ol_val" ; then
2172                         ol_arg="$ol_val"
2173                 fi
2174         done
2175         if test "$ol_arg" = "invalid" ; then
2176                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2177         fi
2178         ol_with_ldbm_type="$ol_arg"
2179
2180 else
2181         ol_with_ldbm_type="auto"
2182 fi
2183 # end --with-ldbm_type
2184
2185 # OpenLDAP --enable-meta
2186         # Check whether --enable-meta or --disable-meta was given.
2187 if test "${enable_meta+set}" = set; then
2188   enableval="$enable_meta"
2189   
2190         ol_arg=invalid
2191         for ol_val in auto yes no ; do
2192                 if test "$enableval" = "$ol_val" ; then
2193                         ol_arg="$ol_val"
2194                 fi
2195         done
2196         if test "$ol_arg" = "invalid" ; then
2197                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2198         fi
2199         ol_enable_meta="$ol_arg"
2200
2201 else
2202         ol_enable_meta="no"
2203 fi
2204 # end --enable-meta
2205 # OpenLDAP --with-meta_module
2206         # Check whether --with-meta_module or --without-meta_module was given.
2207 if test "${with_meta_module+set}" = set; then
2208   withval="$with_meta_module"
2209   
2210         ol_arg=invalid
2211         for ol_val in static dynamic ; do
2212                 if test "$withval" = "$ol_val" ; then
2213                         ol_arg="$ol_val"
2214                 fi
2215         done
2216         if test "$ol_arg" = "invalid" ; then
2217                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2218         fi
2219         ol_with_meta_module="$ol_arg"
2220
2221 else
2222         ol_with_meta_module="static"
2223 fi
2224 # end --with-meta_module
2225
2226 # OpenLDAP --enable-monitor
2227         # Check whether --enable-monitor or --disable-monitor was given.
2228 if test "${enable_monitor+set}" = set; then
2229   enableval="$enable_monitor"
2230   
2231         ol_arg=invalid
2232         for ol_val in auto yes no ; do
2233                 if test "$enableval" = "$ol_val" ; then
2234                         ol_arg="$ol_val"
2235                 fi
2236         done
2237         if test "$ol_arg" = "invalid" ; then
2238                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2239         fi
2240         ol_enable_monitor="$ol_arg"
2241
2242 else
2243         ol_enable_monitor="no"
2244 fi
2245 # end --enable-monitor
2246 # OpenLDAP --with-monitor_module
2247         # Check whether --with-monitor_module or --without-monitor_module was given.
2248 if test "${with_monitor_module+set}" = set; then
2249   withval="$with_monitor_module"
2250   
2251         ol_arg=invalid
2252         for ol_val in static dynamic ; do
2253                 if test "$withval" = "$ol_val" ; then
2254                         ol_arg="$ol_val"
2255                 fi
2256         done
2257         if test "$ol_arg" = "invalid" ; then
2258                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2259         fi
2260         ol_with_monitor_module="$ol_arg"
2261
2262 else
2263         ol_with_monitor_module="static"
2264 fi
2265 # end --with-monitor_module
2266
2267 # OpenLDAP --enable-null
2268         # Check whether --enable-null or --disable-null was given.
2269 if test "${enable_null+set}" = set; then
2270   enableval="$enable_null"
2271   
2272         ol_arg=invalid
2273         for ol_val in auto yes no ; do
2274                 if test "$enableval" = "$ol_val" ; then
2275                         ol_arg="$ol_val"
2276                 fi
2277         done
2278         if test "$ol_arg" = "invalid" ; then
2279                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2280         fi
2281         ol_enable_null="$ol_arg"
2282
2283 else
2284         ol_enable_null="no"
2285 fi
2286 # end --enable-null
2287 # OpenLDAP --with-null_module
2288         # Check whether --with-null_module or --without-null_module was given.
2289 if test "${with_null_module+set}" = set; then
2290   withval="$with_null_module"
2291   
2292         ol_arg=invalid
2293         for ol_val in static dynamic ; do
2294                 if test "$withval" = "$ol_val" ; then
2295                         ol_arg="$ol_val"
2296                 fi
2297         done
2298         if test "$ol_arg" = "invalid" ; then
2299                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2300         fi
2301         ol_with_null_module="$ol_arg"
2302
2303 else
2304         ol_with_null_module="static"
2305 fi
2306 # end --with-null_module
2307
2308 # OpenLDAP --enable-passwd
2309         # Check whether --enable-passwd or --disable-passwd was given.
2310 if test "${enable_passwd+set}" = set; then
2311   enableval="$enable_passwd"
2312   
2313         ol_arg=invalid
2314         for ol_val in auto yes no ; do
2315                 if test "$enableval" = "$ol_val" ; then
2316                         ol_arg="$ol_val"
2317                 fi
2318         done
2319         if test "$ol_arg" = "invalid" ; then
2320                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2321         fi
2322         ol_enable_passwd="$ol_arg"
2323
2324 else
2325         ol_enable_passwd="no"
2326 fi
2327 # end --enable-passwd
2328 # OpenLDAP --with-passwd_module
2329         # Check whether --with-passwd_module or --without-passwd_module was given.
2330 if test "${with_passwd_module+set}" = set; then
2331   withval="$with_passwd_module"
2332   
2333         ol_arg=invalid
2334         for ol_val in static dynamic ; do
2335                 if test "$withval" = "$ol_val" ; then
2336                         ol_arg="$ol_val"
2337                 fi
2338         done
2339         if test "$ol_arg" = "invalid" ; then
2340                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2341         fi
2342         ol_with_passwd_module="$ol_arg"
2343
2344 else
2345         ol_with_passwd_module="static"
2346 fi
2347 # end --with-passwd_module
2348
2349 # OpenLDAP --enable-perl
2350         # Check whether --enable-perl or --disable-perl was given.
2351 if test "${enable_perl+set}" = set; then
2352   enableval="$enable_perl"
2353   
2354         ol_arg=invalid
2355         for ol_val in auto yes no ; do
2356                 if test "$enableval" = "$ol_val" ; then
2357                         ol_arg="$ol_val"
2358                 fi
2359         done
2360         if test "$ol_arg" = "invalid" ; then
2361                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2362         fi
2363         ol_enable_perl="$ol_arg"
2364
2365 else
2366         ol_enable_perl="no"
2367 fi
2368 # end --enable-perl
2369 # OpenLDAP --with-perl_module
2370         # Check whether --with-perl_module or --without-perl_module was given.
2371 if test "${with_perl_module+set}" = set; then
2372   withval="$with_perl_module"
2373   
2374         ol_arg=invalid
2375         for ol_val in static dynamic ; do
2376                 if test "$withval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2382         fi
2383         ol_with_perl_module="$ol_arg"
2384
2385 else
2386         ol_with_perl_module="static"
2387 fi
2388 # end --with-perl_module
2389
2390 # OpenLDAP --enable-shell
2391         # Check whether --enable-shell or --disable-shell was given.
2392 if test "${enable_shell+set}" = set; then
2393   enableval="$enable_shell"
2394   
2395         ol_arg=invalid
2396         for ol_val in auto yes no ; do
2397                 if test "$enableval" = "$ol_val" ; then
2398                         ol_arg="$ol_val"
2399                 fi
2400         done
2401         if test "$ol_arg" = "invalid" ; then
2402                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2403         fi
2404         ol_enable_shell="$ol_arg"
2405
2406 else
2407         ol_enable_shell="no"
2408 fi
2409 # end --enable-shell
2410 # OpenLDAP --with-shell_module
2411         # Check whether --with-shell_module or --without-shell_module was given.
2412 if test "${with_shell_module+set}" = set; then
2413   withval="$with_shell_module"
2414   
2415         ol_arg=invalid
2416         for ol_val in static dynamic ; do
2417                 if test "$withval" = "$ol_val" ; then
2418                         ol_arg="$ol_val"
2419                 fi
2420         done
2421         if test "$ol_arg" = "invalid" ; then
2422                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2423         fi
2424         ol_with_shell_module="$ol_arg"
2425
2426 else
2427         ol_with_shell_module="static"
2428 fi
2429 # end --with-shell_module
2430
2431 # OpenLDAP --enable-sql
2432         # Check whether --enable-sql or --disable-sql was given.
2433 if test "${enable_sql+set}" = set; then
2434   enableval="$enable_sql"
2435   
2436         ol_arg=invalid
2437         for ol_val in auto yes no ; do
2438                 if test "$enableval" = "$ol_val" ; then
2439                         ol_arg="$ol_val"
2440                 fi
2441         done
2442         if test "$ol_arg" = "invalid" ; then
2443                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2444         fi
2445         ol_enable_sql="$ol_arg"
2446
2447 else
2448         ol_enable_sql="no"
2449 fi
2450 # end --enable-sql
2451 # OpenLDAP --with-sql_module
2452         # Check whether --with-sql_module or --without-sql_module was given.
2453 if test "${with_sql_module+set}" = set; then
2454   withval="$with_sql_module"
2455   
2456         ol_arg=invalid
2457         for ol_val in static dynamic ; do
2458                 if test "$withval" = "$ol_val" ; then
2459                         ol_arg="$ol_val"
2460                 fi
2461         done
2462         if test "$ol_arg" = "invalid" ; then
2463                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2464         fi
2465         ol_with_sql_module="$ol_arg"
2466
2467 else
2468         ol_with_sql_module="static"
2469 fi
2470 # end --with-sql_module
2471
2472 # OpenLDAP --enable-tcl
2473         # Check whether --enable-tcl or --disable-tcl was given.
2474 if test "${enable_tcl+set}" = set; then
2475   enableval="$enable_tcl"
2476   
2477         ol_arg=invalid
2478         for ol_val in auto yes no ; do
2479                 if test "$enableval" = "$ol_val" ; then
2480                         ol_arg="$ol_val"
2481                 fi
2482         done
2483         if test "$ol_arg" = "invalid" ; then
2484                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2485         fi
2486         ol_enable_tcl="$ol_arg"
2487
2488 else
2489         ol_enable_tcl="no"
2490 fi
2491 # end --enable-tcl
2492 # OpenLDAP --with-tcl_module
2493         # Check whether --with-tcl_module or --without-tcl_module was given.
2494 if test "${with_tcl_module+set}" = set; then
2495   withval="$with_tcl_module"
2496   
2497         ol_arg=invalid
2498         for ol_val in static dynamic ; do
2499                 if test "$withval" = "$ol_val" ; then
2500                         ol_arg="$ol_val"
2501                 fi
2502         done
2503         if test "$ol_arg" = "invalid" ; then
2504                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2505         fi
2506         ol_with_tcl_module="$ol_arg"
2507
2508 else
2509         ol_with_tcl_module="static"
2510 fi
2511 # end --with-tcl_module
2512
2513
2514 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2515 if test "${with_xxslurpdoptions+set}" = set; then
2516   withval="$with_xxslurpdoptions"
2517   :
2518 fi
2519
2520 # OpenLDAP --enable-slurpd
2521         # Check whether --enable-slurpd or --disable-slurpd was given.
2522 if test "${enable_slurpd+set}" = set; then
2523   enableval="$enable_slurpd"
2524   
2525         ol_arg=invalid
2526         for ol_val in auto yes no ; do
2527                 if test "$enableval" = "$ol_val" ; then
2528                         ol_arg="$ol_val"
2529                 fi
2530         done
2531         if test "$ol_arg" = "invalid" ; then
2532                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2533         fi
2534         ol_enable_slurpd="$ol_arg"
2535
2536 else
2537         ol_enable_slurpd="auto"
2538 fi
2539 # end --enable-slurpd
2540
2541 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2542 if test "${with_xxliboptions+set}" = set; then
2543   withval="$with_xxliboptions"
2544   :
2545 fi
2546
2547 # Check whether --enable-static or --disable-static was given.
2548 if test "${enable_static+set}" = set; then
2549   enableval="$enable_static"
2550   p=${PACKAGE-default}
2551 case $enableval in
2552 yes) enable_static=yes ;;
2553 no) enable_static=no ;;
2554 *)
2555   enable_static=no
2556   # Look at the argument we got.  We use all the common list separators.
2557   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2558   for pkg in $enableval; do
2559     if test "X$pkg" = "X$p"; then
2560       enable_static=yes
2561     fi
2562   done
2563   IFS="$ac_save_ifs"
2564   ;;
2565 esac
2566 else
2567   enable_static=yes
2568 fi
2569
2570 # Check whether --enable-shared or --disable-shared was given.
2571 if test "${enable_shared+set}" = set; then
2572   enableval="$enable_shared"
2573   p=${PACKAGE-default}
2574 case $enableval in
2575 yes) enable_shared=yes ;;
2576 no) enable_shared=no ;;
2577 *)
2578   enable_shared=no
2579   # Look at the argument we got.  We use all the common list separators.
2580   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2581   for pkg in $enableval; do
2582     if test "X$pkg" = "X$p"; then
2583       enable_shared=yes
2584     fi
2585   done
2586   IFS="$ac_save_ifs"
2587   ;;
2588 esac
2589 else
2590   enable_shared=yes
2591 fi
2592
2593
2594
2595 # validate options
2596 if test $ol_enable_slapd = no ; then
2597                 if test $ol_enable_slapi = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2599         fi
2600         if test $ol_enable_bdb = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2602         fi
2603         if test $ol_enable_dnssrv = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2605         fi
2606         if test $ol_enable_ldap = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2608         fi
2609         if test $ol_enable_ldbm = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2611         fi
2612         if test $ol_enable_meta = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2614         fi
2615         if test $ol_enable_monitor = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2617         fi
2618         if test $ol_enable_null = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2620         fi
2621         if test $ol_enable_passwd = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2623         fi
2624         if test $ol_enable_perl = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2626         fi
2627         if test $ol_enable_shell = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2629         fi
2630         if test $ol_enable_tcl = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2632         fi
2633         if test $ol_enable_sql = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2635         fi
2636         if test $ol_enable_modules = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2638         fi
2639         if test $ol_enable_multimaster = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2641         fi
2642         if test $ol_enable_wrappers = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2644         fi
2645         if test $ol_enable_phonetic = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2647         fi
2648         if test $ol_enable_rlookups = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2650         fi
2651         if test $ol_enable_aci = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2653         fi
2654         if test $ol_with_ldbm_api != auto ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2656         fi
2657         if test $ol_with_ldbm_type != auto ; then
2658                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2659         fi
2660         if test $ol_with_bdb_module != static ; then
2661                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2662         fi
2663         if test $ol_with_dnssrv_module != static ; then
2664                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2665         fi
2666         if test $ol_with_ldap_module != static ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2668         fi
2669         if test $ol_with_ldbm_module != static ; then
2670                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2671         fi
2672         if test $ol_with_meta_module != static ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2674         fi
2675         if test $ol_with_monitor_module != static ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2677         fi
2678         if test $ol_with_null_module != static ; then
2679                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2680         fi
2681         if test $ol_with_passwd_module != static ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2683         fi
2684         if test $ol_with_perl_module != static ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2686         fi
2687         if test $ol_with_shell_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2689         fi
2690         if test $ol_with_tcl_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2692         fi
2693         if test $ol_with_sql_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2695         fi
2696         if test $ol_enable_slurpd = yes ; then
2697                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2698         fi
2699         if test $ol_enable_rewrite = yes ; then
2700                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2701         fi
2702
2703         # force settings to no
2704         ol_enable_slapi=no
2705         ol_enable_bdb=no
2706         ol_enable_dnssrv=no
2707         ol_enable_ldap=no
2708         ol_enable_ldbm=no
2709         ol_enable_meta=no
2710         ol_enable_monitor=no
2711         ol_enable_null=no
2712         ol_enable_passwd=no
2713         ol_enable_perl=no
2714         ol_enable_shell=no
2715         ol_enable_tcl=no
2716         ol_enable_sql=no
2717
2718         ol_enable_modules=no
2719         ol_enable_multimaster=no
2720         ol_enable_phonetic=no
2721         ol_enable_rlookups=no
2722         ol_enable_aci=no
2723         ol_enable_wrappers=no
2724         ol_enable_dynamic=no
2725
2726         ol_with_ldbm_api=no
2727         ol_with_ldbm_type=no
2728
2729         ol_with_bdb_module=static
2730         ol_with_dnssrv_module=static
2731         ol_with_ldap_module=static
2732         ol_with_ldbm_module=static
2733         ol_with_meta_module=static
2734         ol_with_monitor_module=static
2735         ol_with_null_module=static
2736         ol_with_passwd_module=static
2737         ol_with_perl_module=static
2738         ol_with_shell_module=static
2739         ol_with_tcl_module=static
2740         ol_with_sql_module=static
2741
2742         ol_enable_slurpd=no
2743
2744         ol_enable_rewrite=no
2745
2746 elif test $ol_enable_ldbm = no ; then
2747         
2748         if test $ol_with_ldbm_api != auto ; then
2749                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2750         fi
2751
2752         if test $ol_with_ldbm_type != auto ; then
2753                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2754         fi
2755
2756         if test $ol_with_ldbm_module != static ; then
2757                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2758         fi
2759
2760         if test $ol_enable_modules != yes -a \
2761                 $ol_enable_bdb = no -a \
2762                 $ol_enable_dnssrv = no -a \
2763                 $ol_enable_ldap = no -a \
2764                 $ol_enable_meta = no -a \
2765                 $ol_enable_monitor = no -a \
2766                 $ol_enable_null = no -a \
2767                 $ol_enable_passwd = no -a \
2768                 $ol_enable_perl = no -a \
2769                 $ol_enable_shell = no -a \
2770                 $ol_enable_sql = no -a \
2771                 $ol_enable_tcl = no ; then
2772
2773                 if test $ol_enable_slapd = yes ; then
2774                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2775                 else
2776                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2777                         ol_enable_slapd=no
2778                 fi
2779         fi
2780
2781         ol_with_ldbm_api=no
2782         ol_with_ldbm_type=no
2783         ol_with_ldbm_module=static
2784
2785         if test $ol_enable_bdb != no ; then
2786                 ol_with_ldbm_api=berkeley
2787         fi
2788
2789 else
2790                 if test $ol_with_ldbm_api = gdbm -a \
2791                 $ol_with_ldbm_type = btree ; then
2792                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2793         fi
2794         if test $ol_with_ldbm_api = mdbm -a \
2795                 $ol_with_ldbm_type = btree ; then
2796                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2797         fi
2798         if test $ol_with_ldbm_api = ndbm -a \
2799                 $ol_with_ldbm_type = btree ; then
2800                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2801         fi
2802
2803         if test $ol_enable_bdb = yes ; then
2804                 if test $ol_with_ldbm_api = auto ; then
2805                         ol_with_ldbm_api=berkeley
2806                 elif test $ol_with_ldbm_api != berkeley ; then
2807                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2808                 fi
2809
2810         elif test $ol_enable_bdb = auto ; then
2811                 if test $ol_with_ldbm_api != berkeley \
2812                         -o $ol_with_ldbm_api != auto ; then
2813                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2814                         ol_enable_bdb=no
2815                 fi
2816         fi
2817 fi
2818
2819 if test $ol_enable_slurpd = yes ; then
2820                 if test $ol_with_threads = no ; then
2821                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2822         fi
2823 fi
2824
2825 if test $ol_enable_lmpasswd = yes ; then
2826         if test $ol_with_tls = no ; then
2827                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2828         fi
2829 fi
2830
2831 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2832         if test $ol_with_kerberos = no ; then
2833                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2834         elif test $ol_with_kerberos = auto ; then
2835                 ol_with_kerberos=yes
2836         fi
2837
2838 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2839         if test $ol_with_kerberos = auto ; then
2840                 ol_with_kerberos=no
2841         elif test $ol_with_kerberos != no ; then
2842                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2843                 ol_with_kerberos=no
2844         fi
2845 fi
2846
2847 if test $ol_enable_spasswd = yes ; then
2848         if test $ol_with_cyrus_sasl = no ; then
2849                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2850         fi
2851         ol_with_cyrus_sasl=yes
2852 fi
2853
2854 echo "$ac_t""done" 1>&6
2855
2856 LDAP_LIBS=
2857 LDIF_LIBS=
2858 LDBM_LIBS=
2859 LTHREAD_LIBS=
2860 LUTIL_LIBS=
2861
2862 SLAPD_LIBS=
2863 SLURPD_LIBS=
2864
2865 BUILD_SLAPD=no
2866 BUILD_SLURPD=no
2867
2868 BUILD_THREAD=no
2869
2870 BUILD_SLAPI=no
2871 SLAPD_SLAPI_DEPEND=
2872
2873 BUILD_BDB=no
2874 BUILD_DNSSRV=no
2875 BUILD_LDAP=no
2876 BUILD_LDBM=no
2877 BUILD_META=no
2878 BUILD_MONITOR=no
2879 BUILD_NULL=no
2880 BUILD_PASSWD=no
2881 BUILD_PERL=no
2882 BUILD_SHELL=no
2883 BUILD_SQL=no
2884 BUILD_TCL=no
2885
2886 BUILD_BDB_DYNAMIC=static
2887 BUILD_DNSSRV_DYNAMIC=static
2888 BUILD_LDAP_DYNAMIC=static
2889 BUILD_LDBM_DYNAMIC=static
2890 BUILD_META_DYNAMIC=static
2891 BUILD_MONITOR_DYNAMIC=static
2892 BUILD_NULL_DYNAMIC=static
2893 BUILD_PASSWD_DYNAMIC=static
2894 BUILD_PERL_DYNAMIC=static
2895 BUILD_SHELL_DYNAMIC=static
2896 BUILD_TCL_DYNAMIC=static
2897 BUILD_SQL_DYNAMIC=static
2898
2899 SLAPD_MODULES_LDFLAGS=
2900 SLAPD_MODULES_CPPFLAGS=
2901
2902 SLAPD_STATIC_BACKENDS=
2903 SLAPD_DYNAMIC_BACKENDS=
2904
2905 SLAPD_PERL_LDFLAGS=
2906 MOD_PERL_LDFLAGS=
2907 PERL_CPPFLAGS=
2908
2909 SLAPD_SQL_LDFLAGS=
2910 SLAPD_SQL_LIBS=
2911 SLAPD_SQL_INCLUDES=
2912
2913 MOD_TCL_LIB=
2914 KRB4_LIBS=
2915 KRB5_LIBS=
2916 READLINE_LIBS=
2917 SASL_LIBS=
2918 TERMCAP_LIBS=
2919 TLS_LIBS=
2920 MODULES_LIBS=
2921 SLAPI_LIBS=
2922 LIBSLAPI=
2923 LIBSLAPITOOLS=
2924 AUTH_LIBS=
2925
2926 SLAPD_SLP_LIBS=
2927
2928
2929 # Find a good install program.  We prefer a C program (faster),
2930 # so one script is as good as another.  But avoid the broken or
2931 # incompatible versions:
2932 # SysV /etc/install, /usr/sbin/install
2933 # SunOS /usr/etc/install
2934 # IRIX /sbin/install
2935 # AIX /bin/install
2936 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2937 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2938 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2939 # ./install, which can be erroneously created by make from ./install.sh.
2940 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2941 echo "configure:2942: checking for a BSD compatible install" >&5
2942 if test -z "$INSTALL"; then
2943 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2944   echo $ac_n "(cached) $ac_c" 1>&6
2945 else
2946     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2947   for ac_dir in $PATH; do
2948     # Account for people who put trailing slashes in PATH elements.
2949     case "$ac_dir/" in
2950     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2951     *)
2952       # OSF1 and SCO ODT 3.0 have their own names for install.
2953       # Don't use installbsd from OSF since it installs stuff as root
2954       # by default.
2955       for ac_prog in ginstall scoinst install; do
2956         if test -f $ac_dir/$ac_prog; then
2957           if test $ac_prog = install &&
2958             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2959             # AIX install.  It has an incompatible calling convention.
2960             :
2961           elif test $ac_prog = install &&
2962             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2963             # program-specific install script used by HP pwplus--don't use.
2964             :
2965           else
2966             ac_cv_path_install="$ac_dir/$ac_prog -c"
2967             break 2
2968           fi
2969         fi
2970       done
2971       ;;
2972     esac
2973   done
2974   IFS="$ac_save_IFS"
2975
2976 fi
2977   if test "${ac_cv_path_install+set}" = set; then
2978     INSTALL="$ac_cv_path_install"
2979   else
2980     # As a last resort, use the slow shell script.  We don't cache a
2981     # path for INSTALL within a source directory, because that will
2982     # break other packages using the cache if that directory is
2983     # removed, or if the path is relative.
2984     INSTALL="$ac_install_sh"
2985   fi
2986 fi
2987 echo "$ac_t""$INSTALL" 1>&6
2988
2989 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2990 # It thinks the first close brace ends the variable substitution.
2991 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2992
2993 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2994
2995 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2996
2997
2998 cat >> confdefs.h <<\EOF
2999 #define HAVE_MKVERSION 1
3000 EOF
3001
3002
3003
3004
3005 ol_aix_threads=no
3006 case "$target" in
3007 *-*-aix*)       if test -z "$CC" ; then
3008                 case "$ol_with_threads" in
3009                 auto | yes |  posix) ol_aix_threads=yes ;;
3010                 esac
3011         fi
3012 ;;
3013 esac
3014
3015 if test $ol_aix_threads = yes ; then
3016         if test -z "${CC}" ; then
3017                 for ac_prog in cc_r xlc_r cc
3018 do
3019 # Extract the first word of "$ac_prog", so it can be a program name with args.
3020 set dummy $ac_prog; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test -n "$CC"; then
3027   ac_cv_prog_CC="$CC" # Let the user override the test.
3028 else
3029   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3030   ac_dummy="$PATH"
3031   for ac_dir in $ac_dummy; do
3032     test -z "$ac_dir" && ac_dir=.
3033     if test -f $ac_dir/$ac_word; then
3034       ac_cv_prog_CC="$ac_prog"
3035       break
3036     fi
3037   done
3038   IFS="$ac_save_ifs"
3039 fi
3040 fi
3041 CC="$ac_cv_prog_CC"
3042 if test -n "$CC"; then
3043   echo "$ac_t""$CC" 1>&6
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047
3048 test -n "$CC" && break
3049 done
3050
3051
3052                 if test "$CC" = cc ; then
3053                                                 if test $ol_with_threads != auto ; then
3054                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3055                         else
3056                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3057                         fi
3058                         ol_with_threads=no
3059                 fi
3060         fi
3061
3062         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3063                 ol_with_threads=posix
3064                 ol_cv_pthread_create=yes
3065         fi
3066 fi
3067
3068 if test -z "${CC}"; then
3069         for ac_prog in cc gcc
3070 do
3071 # Extract the first word of "$ac_prog", so it can be a program name with args.
3072 set dummy $ac_prog; ac_word=$2
3073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3074 echo "configure:3075: checking for $ac_word" >&5
3075 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3076   echo $ac_n "(cached) $ac_c" 1>&6
3077 else
3078   if test -n "$CC"; then
3079   ac_cv_prog_CC="$CC" # Let the user override the test.
3080 else
3081   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3082   ac_dummy="$PATH"
3083   for ac_dir in $ac_dummy; do
3084     test -z "$ac_dir" && ac_dir=.
3085     if test -f $ac_dir/$ac_word; then
3086       ac_cv_prog_CC="$ac_prog"
3087       break
3088     fi
3089   done
3090   IFS="$ac_save_ifs"
3091 fi
3092 fi
3093 CC="$ac_cv_prog_CC"
3094 if test -n "$CC"; then
3095   echo "$ac_t""$CC" 1>&6
3096 else
3097   echo "$ac_t""no" 1>&6
3098 fi
3099
3100 test -n "$CC" && break
3101 done
3102 test -n "$CC" || CC="missing"
3103
3104
3105         if test "${CC}" = "missing" ; then
3106                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3107         fi
3108 fi
3109
3110 if test -z "${AR}"; then
3111         for ac_prog in ar gar
3112 do
3113 # Extract the first word of "$ac_prog", so it can be a program name with args.
3114 set dummy $ac_prog; ac_word=$2
3115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3116 echo "configure:3117: checking for $ac_word" >&5
3117 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3118   echo $ac_n "(cached) $ac_c" 1>&6
3119 else
3120   if test -n "$AR"; then
3121   ac_cv_prog_AR="$AR" # Let the user override the test.
3122 else
3123   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3124   ac_dummy="$PATH"
3125   for ac_dir in $ac_dummy; do
3126     test -z "$ac_dir" && ac_dir=.
3127     if test -f $ac_dir/$ac_word; then
3128       ac_cv_prog_AR="$ac_prog"
3129       break
3130     fi
3131   done
3132   IFS="$ac_save_ifs"
3133 fi
3134 fi
3135 AR="$ac_cv_prog_AR"
3136 if test -n "$AR"; then
3137   echo "$ac_t""$AR" 1>&6
3138 else
3139   echo "$ac_t""no" 1>&6
3140 fi
3141
3142 test -n "$AR" && break
3143 done
3144 test -n "$AR" || AR="missing"
3145
3146
3147         if test "${AR}" = "missing" ; then
3148                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3149         fi
3150 fi
3151
3152
3153
3154 # Find the correct PATH separator.  Usually this is `:', but
3155 # DJGPP uses `;' like DOS.
3156 if test "X${PATH_SEPARATOR+set}" != Xset; then
3157   UNAME=${UNAME-`uname 2>/dev/null`}
3158   case X$UNAME in
3159     *-DOS) lt_cv_sys_path_separator=';' ;;
3160     *)     lt_cv_sys_path_separator=':' ;;
3161   esac
3162   PATH_SEPARATOR=$lt_cv_sys_path_separator
3163 fi
3164
3165 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3166 echo "configure:3167: checking for Cygwin environment" >&5
3167 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   cat > conftest.$ac_ext <<EOF
3171 #line 3172 "configure"
3172 #include "confdefs.h"
3173
3174 int main() {
3175
3176 #ifndef __CYGWIN__
3177 #define __CYGWIN__ __CYGWIN32__
3178 #endif
3179 return __CYGWIN__;
3180 ; return 0; }
3181 EOF
3182 if { (eval echo configure:3183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3183   rm -rf conftest*
3184   ac_cv_cygwin=yes
3185 else
3186   echo "configure: failed program was:" >&5
3187   cat conftest.$ac_ext >&5
3188   rm -rf conftest*
3189   ac_cv_cygwin=no
3190 fi
3191 rm -f conftest*
3192 fi
3193
3194 echo "$ac_t""$ac_cv_cygwin" 1>&6
3195 CYGWIN=
3196 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3197 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3198 echo "configure:3199: checking for mingw32 environment" >&5
3199 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3200   echo $ac_n "(cached) $ac_c" 1>&6
3201 else
3202   cat > conftest.$ac_ext <<EOF
3203 #line 3204 "configure"
3204 #include "confdefs.h"
3205
3206 int main() {
3207 return __MINGW32__;
3208 ; return 0; }
3209 EOF
3210 if { (eval echo configure:3211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3211   rm -rf conftest*
3212   ac_cv_mingw32=yes
3213 else
3214   echo "configure: failed program was:" >&5
3215   cat conftest.$ac_ext >&5
3216   rm -rf conftest*
3217   ac_cv_mingw32=no
3218 fi
3219 rm -f conftest*
3220 fi
3221
3222 echo "$ac_t""$ac_cv_mingw32" 1>&6
3223 MINGW32=
3224 test "$ac_cv_mingw32" = yes && MINGW32=yes
3225 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3226 echo "configure:3227: checking for EMX OS/2 environment" >&5
3227 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3228   echo $ac_n "(cached) $ac_c" 1>&6
3229 else
3230   cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233
3234 int main() {
3235 return __EMX__;
3236 ; return 0; }
3237 EOF
3238 if { (eval echo configure:3239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3239   rm -rf conftest*
3240   ac_cv_emxos2=yes
3241 else
3242   echo "configure: failed program was:" >&5
3243   cat conftest.$ac_ext >&5
3244   rm -rf conftest*
3245   ac_cv_emxos2=no
3246 fi
3247 rm -f conftest*
3248 fi
3249
3250 echo "$ac_t""$ac_cv_emxos2" 1>&6
3251 EMXOS2=
3252 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3253 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3254 echo "configure:3255: checking how to run the C preprocessor" >&5
3255 # On Suns, sometimes $CPP names a directory.
3256 if test -n "$CPP" && test -d "$CPP"; then
3257   CPP=
3258 fi
3259 if test -z "$CPP"; then
3260 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263     # This must be in double quotes, not single quotes, because CPP may get
3264   # substituted into the Makefile and "${CC-cc}" will confuse make.
3265   CPP="${CC-cc} -E"
3266   # On the NeXT, cc -E runs the code through the compiler's parser,
3267   # not just through cpp.
3268   cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3271 #include <assert.h>
3272 Syntax Error
3273 EOF
3274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3275 { (eval echo configure:3276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3277 if test -z "$ac_err"; then
3278   :
3279 else
3280   echo "$ac_err" >&5
3281   echo "configure: failed program was:" >&5
3282   cat conftest.$ac_ext >&5
3283   rm -rf conftest*
3284   CPP="${CC-cc} -E -traditional-cpp"
3285   cat > conftest.$ac_ext <<EOF
3286 #line 3287 "configure"
3287 #include "confdefs.h"
3288 #include <assert.h>
3289 Syntax Error
3290 EOF
3291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3292 { (eval echo configure:3293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3294 if test -z "$ac_err"; then
3295   :
3296 else
3297   echo "$ac_err" >&5
3298   echo "configure: failed program was:" >&5
3299   cat conftest.$ac_ext >&5
3300   rm -rf conftest*
3301   CPP="${CC-cc} -nologo -E"
3302   cat > conftest.$ac_ext <<EOF
3303 #line 3304 "configure"
3304 #include "confdefs.h"
3305 #include <assert.h>
3306 Syntax Error
3307 EOF
3308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3309 { (eval echo configure:3310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3311 if test -z "$ac_err"; then
3312   :
3313 else
3314   echo "$ac_err" >&5
3315   echo "configure: failed program was:" >&5
3316   cat conftest.$ac_ext >&5
3317   rm -rf conftest*
3318   CPP=/lib/cpp
3319 fi
3320 rm -f conftest*
3321 fi
3322 rm -f conftest*
3323 fi
3324 rm -f conftest*
3325   ac_cv_prog_CPP="$CPP"
3326 fi
3327   CPP="$ac_cv_prog_CPP"
3328 else
3329   ac_cv_prog_CPP="$CPP"
3330 fi
3331 echo "$ac_t""$CPP" 1>&6
3332
3333 # Check whether --enable-fast-install or --disable-fast-install was given.
3334 if test "${enable_fast_install+set}" = set; then
3335   enableval="$enable_fast_install"
3336   p=${PACKAGE-default}
3337 case $enableval in
3338 yes) enable_fast_install=yes ;;
3339 no) enable_fast_install=no ;;
3340 *)
3341   enable_fast_install=no
3342   # Look at the argument we got.  We use all the common list separators.
3343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3344   for pkg in $enableval; do
3345     if test "X$pkg" = "X$p"; then
3346       enable_fast_install=yes
3347     fi
3348   done
3349   IFS="$ac_save_ifs"
3350   ;;
3351 esac
3352 else
3353   enable_fast_install=yes
3354 fi
3355
3356 # Extract the first word of "gcc", so it can be a program name with args.
3357 set dummy gcc; ac_word=$2
3358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3359 echo "configure:3360: checking for $ac_word" >&5
3360 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3361   echo $ac_n "(cached) $ac_c" 1>&6
3362 else
3363   if test -n "$CC"; then
3364   ac_cv_prog_CC="$CC" # Let the user override the test.
3365 else
3366   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3367   ac_dummy="$PATH"
3368   for ac_dir in $ac_dummy; do
3369     test -z "$ac_dir" && ac_dir=.
3370     if test -f $ac_dir/$ac_word; then
3371       ac_cv_prog_CC="gcc"
3372       break
3373     fi
3374   done
3375   IFS="$ac_save_ifs"
3376 fi
3377 fi
3378 CC="$ac_cv_prog_CC"
3379 if test -n "$CC"; then
3380   echo "$ac_t""$CC" 1>&6
3381 else
3382   echo "$ac_t""no" 1>&6
3383 fi
3384
3385 if test -z "$CC"; then
3386   # Extract the first word of "cc", so it can be a program name with args.
3387 set dummy cc; ac_word=$2
3388 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3389 echo "configure:3390: checking for $ac_word" >&5
3390 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3391   echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393   if test -n "$CC"; then
3394   ac_cv_prog_CC="$CC" # Let the user override the test.
3395 else
3396   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3397   ac_prog_rejected=no
3398   ac_dummy="$PATH"
3399   for ac_dir in $ac_dummy; do
3400     test -z "$ac_dir" && ac_dir=.
3401     if test -f $ac_dir/$ac_word; then
3402       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3403         ac_prog_rejected=yes
3404         continue
3405       fi
3406       ac_cv_prog_CC="cc"
3407       break
3408     fi
3409   done
3410   IFS="$ac_save_ifs"
3411 if test $ac_prog_rejected = yes; then
3412   # We found a bogon in the path, so make sure we never use it.
3413   set dummy $ac_cv_prog_CC
3414   shift
3415   if test $# -gt 0; then
3416     # We chose a different compiler from the bogus one.
3417     # However, it has the same basename, so the bogon will be chosen
3418     # first if we set CC to just the basename; use the full file name.
3419     shift
3420     set dummy "$ac_dir/$ac_word" "$@"
3421     shift
3422     ac_cv_prog_CC="$@"
3423   fi
3424 fi
3425 fi
3426 fi
3427 CC="$ac_cv_prog_CC"
3428 if test -n "$CC"; then
3429   echo "$ac_t""$CC" 1>&6
3430 else
3431   echo "$ac_t""no" 1>&6
3432 fi
3433
3434   if test -z "$CC"; then
3435     case "`uname -s`" in
3436     *win32* | *WIN32* | *CYGWIN*)
3437       # Extract the first word of "cl", so it can be a program name with args.
3438 set dummy cl; ac_word=$2
3439 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3440 echo "configure:3441: checking for $ac_word" >&5
3441 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3442   echo $ac_n "(cached) $ac_c" 1>&6
3443 else
3444   if test -n "$CC"; then
3445   ac_cv_prog_CC="$CC" # Let the user override the test.
3446 else
3447   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3448   ac_dummy="$PATH"
3449   for ac_dir in $ac_dummy; do
3450     test -z "$ac_dir" && ac_dir=.
3451     if test -f $ac_dir/$ac_word; then
3452       ac_cv_prog_CC="cl"
3453       break
3454     fi
3455   done
3456   IFS="$ac_save_ifs"
3457 fi
3458 fi
3459 CC="$ac_cv_prog_CC"
3460 if test -n "$CC"; then
3461   echo "$ac_t""$CC" 1>&6
3462 else
3463   echo "$ac_t""no" 1>&6
3464 fi
3465  ;;
3466     esac
3467   fi
3468   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3469 fi
3470
3471 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3472 echo "configure:3473: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3473
3474 ac_ext=c
3475 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3476 ac_cpp='$CPP $CPPFLAGS'
3477 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3478 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3479 cross_compiling=$ac_cv_prog_cc_cross
3480
3481 cat > conftest.$ac_ext << EOF
3482
3483 #line 3484 "configure"
3484 #include "confdefs.h"
3485
3486 main(){return(0);}
3487 EOF
3488 if { (eval echo configure:3489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3489   ac_cv_prog_cc_works=yes
3490   # If we can't run a trivial program, we are probably using a cross compiler.
3491   if (./conftest; exit) 2>/dev/null; then
3492     ac_cv_prog_cc_cross=no
3493   else
3494     ac_cv_prog_cc_cross=yes
3495   fi
3496 else
3497   echo "configure: failed program was:" >&5
3498   cat conftest.$ac_ext >&5
3499   ac_cv_prog_cc_works=no
3500 fi
3501 rm -fr conftest*
3502 ac_ext=c
3503 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3504 ac_cpp='$CPP $CPPFLAGS'
3505 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3506 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3507 cross_compiling=$ac_cv_prog_cc_cross
3508
3509 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3510 if test $ac_cv_prog_cc_works = no; then
3511   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3512 fi
3513 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3514 echo "configure:3515: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3515 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3516 cross_compiling=$ac_cv_prog_cc_cross
3517
3518 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3519 echo "configure:3520: checking whether we are using GNU C" >&5
3520 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3521   echo $ac_n "(cached) $ac_c" 1>&6
3522 else
3523   cat > conftest.c <<EOF
3524 #ifdef __GNUC__
3525   yes;
3526 #endif
3527 EOF
3528 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3529   ac_cv_prog_gcc=yes
3530 else
3531   ac_cv_prog_gcc=no
3532 fi
3533 fi
3534
3535 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3536
3537 if test $ac_cv_prog_gcc = yes; then
3538   GCC=yes
3539 else
3540   GCC=
3541 fi
3542
3543 ac_test_CFLAGS="${CFLAGS+set}"
3544 ac_save_CFLAGS="$CFLAGS"
3545 CFLAGS=
3546 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3547 echo "configure:3548: checking whether ${CC-cc} accepts -g" >&5
3548 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3549   echo $ac_n "(cached) $ac_c" 1>&6
3550 else
3551   echo 'void f(){}' > conftest.c
3552 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3553   ac_cv_prog_cc_g=yes
3554 else
3555   ac_cv_prog_cc_g=no
3556 fi
3557 rm -f conftest*
3558
3559 fi
3560
3561 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3562 if test "$ac_test_CFLAGS" = set; then
3563   CFLAGS="$ac_save_CFLAGS"
3564 elif test $ac_cv_prog_cc_g = yes; then
3565   if test "$GCC" = yes; then
3566     CFLAGS="-g -O2"
3567   else
3568     CFLAGS="-g"
3569   fi
3570 else
3571   if test "$GCC" = yes; then
3572     CFLAGS="-O2"
3573   else
3574     CFLAGS=
3575   fi
3576 fi
3577
3578 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3579 if test "${with_gnu_ld+set}" = set; then
3580   withval="$with_gnu_ld"
3581   test "$withval" = no || with_gnu_ld=yes
3582 else
3583   with_gnu_ld=no
3584 fi
3585
3586 ac_prog=ld
3587 if test "$GCC" = yes; then
3588   # Check if gcc -print-prog-name=ld gives a path.
3589   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3590 echo "configure:3591: checking for ld used by GCC" >&5
3591   case $host in
3592   *-*-mingw*)
3593     # gcc leaves a trailing carriage return which upsets mingw
3594     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3595   *)
3596     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3597   esac
3598   case $ac_prog in
3599     # Accept absolute paths.
3600     [\\/]* | [A-Za-z]:[\\/]*)
3601       re_direlt='/[^/][^/]*/\.\./'
3602       # Canonicalize the path of ld
3603       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3604       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3605         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3606       done
3607       test -z "$LD" && LD="$ac_prog"
3608       ;;
3609   "")
3610     # If it fails, then pretend we aren't using GCC.
3611     ac_prog=ld
3612     ;;
3613   *)
3614     # If it is relative, then search for the first ld in PATH.
3615     with_gnu_ld=unknown
3616     ;;
3617   esac
3618 elif test "$with_gnu_ld" = yes; then
3619   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3620 echo "configure:3621: checking for GNU ld" >&5
3621 else
3622   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3623 echo "configure:3624: checking for non-GNU ld" >&5
3624 fi
3625 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3626   echo $ac_n "(cached) $ac_c" 1>&6
3627 else
3628   if test -z "$LD"; then
3629   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3630   for ac_dir in $PATH; do
3631     test -z "$ac_dir" && ac_dir=.
3632     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3633       lt_cv_path_LD="$ac_dir/$ac_prog"
3634       # Check to see if the program is GNU ld.  I'd rather use --version,
3635       # but apparently some GNU ld's only accept -v.
3636       # Break only if it was the GNU/non-GNU ld that we prefer.
3637       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3638         test "$with_gnu_ld" != no && break
3639       else
3640         test "$with_gnu_ld" != yes && break
3641       fi
3642     fi
3643   done
3644   IFS="$ac_save_ifs"
3645 else
3646   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3647 fi
3648 fi
3649
3650 LD="$lt_cv_path_LD"
3651 if test -n "$LD"; then
3652   echo "$ac_t""$LD" 1>&6
3653 else
3654   echo "$ac_t""no" 1>&6
3655 fi
3656 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3657 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3658 echo "configure:3659: checking if the linker ($LD) is GNU ld" >&5
3659 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3660   echo $ac_n "(cached) $ac_c" 1>&6
3661 else
3662   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3663 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3664   lt_cv_prog_gnu_ld=yes
3665 else
3666   lt_cv_prog_gnu_ld=no
3667 fi
3668 fi
3669
3670 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3671 with_gnu_ld=$lt_cv_prog_gnu_ld
3672
3673
3674 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3675 echo "configure:3676: checking for $LD option to reload object files" >&5
3676 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3677   echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679   lt_cv_ld_reload_flag='-r'
3680 fi
3681
3682 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3683 reload_flag=$lt_cv_ld_reload_flag
3684 test -n "$reload_flag" && reload_flag=" $reload_flag"
3685
3686 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3687 echo "configure:3688: checking for BSD-compatible nm" >&5
3688 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3689   echo $ac_n "(cached) $ac_c" 1>&6
3690 else
3691   if test -n "$NM"; then
3692   # Let the user override the test.
3693   lt_cv_path_NM="$NM"
3694 else
3695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3696   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3697     test -z "$ac_dir" && ac_dir=.
3698     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3699     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3700       # Check to see if the nm accepts a BSD-compat flag.
3701       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3702       #   nm: unknown option "B" ignored
3703       # Tru64's nm complains that /dev/null is an invalid object file
3704       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3705         lt_cv_path_NM="$tmp_nm -B"
3706         break
3707       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3708         lt_cv_path_NM="$tmp_nm -p"
3709         break
3710       else
3711         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3712         continue # so that we can try to find one that supports BSD flags
3713       fi
3714     fi
3715   done
3716   IFS="$ac_save_ifs"
3717   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3718 fi
3719 fi
3720
3721 NM="$lt_cv_path_NM"
3722 echo "$ac_t""$NM" 1>&6
3723
3724 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3725 echo "configure:3726: checking for a sed that does not truncate output" >&5
3726 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3727   echo $ac_n "(cached) $ac_c" 1>&6
3728 else
3729   # Loop through the user's path and test for sed and gsed.
3730 # Then use that list of sed's as ones to test for truncation.
3731 as_executable_p="test -f"
3732 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3733 for as_dir in $PATH
3734 do
3735   IFS=$as_save_IFS
3736   test -z "$as_dir" && as_dir=.
3737   for ac_prog in sed gsed; do
3738     for ac_exec_ext in '' $ac_executable_extensions; do
3739       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3740         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3741       fi
3742     done
3743   done
3744 done
3745
3746   # Create a temporary directory, and hook for its removal unless debugging.
3747 $debug ||
3748 {
3749   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3750   trap '{ (exit 1); exit 1; }' 1 2 13 15
3751 }
3752
3753 # Create a (secure) tmp directory for tmp files.
3754 : ${TMPDIR=/tmp}
3755 {
3756   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3757   test -n "$tmp" && test -d "$tmp"
3758 }  ||
3759 {
3760   tmp=$TMPDIR/sed$$-$RANDOM
3761   (umask 077 && mkdir $tmp)
3762 } ||
3763 {
3764    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3765    { (exit 1); exit 1; }
3766 }
3767   _max=0
3768   _count=0
3769   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3770   # along with /bin/sed that truncates output.
3771   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3772     test ! -f ${_sed} && break
3773     cat /dev/null > "$tmp/sed.in"
3774     _count=0
3775     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3776     # Check for GNU sed and select it if it is found.
3777     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3778       lt_cv_path_SED=${_sed}
3779       break
3780     fi
3781     while true; do
3782       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3783       mv "$tmp/sed.tmp" "$tmp/sed.in"
3784       cp "$tmp/sed.in" "$tmp/sed.nl"
3785       echo >>"$tmp/sed.nl"
3786       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3787       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3788       # 40000 chars as input seems more than enough
3789       test $_count -gt 10 && break
3790       _count=`expr $_count + 1`
3791       if test $_count -gt $_max; then
3792         _max=$_count
3793         lt_cv_path_SED=$_sed
3794       fi
3795     done
3796   done
3797   rm -rf "$tmp"
3798
3799 fi
3800
3801 if test "X$SED" != "X"; then
3802   lt_cv_path_SED=$SED
3803 else
3804   SED=$lt_cv_path_SED
3805 fi
3806 echo "$ac_t""$SED" 1>&6
3807
3808 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3809 echo "configure:3810: checking whether ln -s works" >&5
3810 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3811   echo $ac_n "(cached) $ac_c" 1>&6
3812 else
3813   rm -f conftestdata
3814 if ln -s X conftestdata 2>/dev/null
3815 then
3816   rm -f conftestdata
3817   ac_cv_prog_LN_S="ln -s"
3818 else
3819   ac_cv_prog_LN_S=ln
3820 fi
3821 fi
3822 LN_S="$ac_cv_prog_LN_S"
3823 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3824   echo "$ac_t""yes" 1>&6
3825 else
3826   echo "$ac_t""no" 1>&6
3827 fi
3828
3829 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3830 echo "configure:3831: checking how to recognise dependent libraries" >&5
3831 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3832   echo $ac_n "(cached) $ac_c" 1>&6
3833 else
3834   lt_cv_file_magic_cmd='$MAGIC_CMD'
3835 lt_cv_file_magic_test_file=
3836 lt_cv_deplibs_check_method='unknown'
3837 # Need to set the preceding variable on all platforms that support
3838 # interlibrary dependencies.
3839 # 'none' -- dependencies not supported.
3840 # `unknown' -- same as none, but documents that we really don't know.
3841 # 'pass_all' -- all dependencies passed with no checks.
3842 # 'test_compile' -- check by making test program.
3843 # 'file_magic [[regex]]' -- check by looking for files in library path
3844 # which responds to the $file_magic_cmd with a given egrep regex.
3845 # If you have `file' or equivalent on your system and you're not sure
3846 # whether `pass_all' will *always* work, you probably want this one.
3847
3848 case $host_os in
3849 aix4* | aix5*)
3850   lt_cv_deplibs_check_method=pass_all
3851   ;;
3852
3853 beos*)
3854   lt_cv_deplibs_check_method=pass_all
3855   ;;
3856
3857 bsdi4*)
3858   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3859   lt_cv_file_magic_cmd='/usr/bin/file -L'
3860   lt_cv_file_magic_test_file=/shlib/libc.so
3861   ;;
3862
3863 cygwin* | mingw* | pw32*)
3864   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3865   lt_cv_file_magic_cmd='$OBJDUMP -f'
3866   ;;
3867
3868 darwin* | rhapsody*)
3869   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3870   lt_cv_file_magic_cmd='/usr/bin/file -L'
3871   case "$host_os" in
3872   rhapsody* | darwin1.[012])
3873     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3874     ;;
3875   *) # Darwin 1.3 on
3876     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3877     ;;
3878   esac
3879   ;;
3880
3881 freebsd*)
3882   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3883     case $host_cpu in
3884     i*86 )
3885       # Not sure whether the presence of OpenBSD here was a mistake.
3886       # Let's accept both of them until this is cleared up.
3887       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3888       lt_cv_file_magic_cmd=/usr/bin/file
3889       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3890       ;;
3891     esac
3892   else
3893     lt_cv_deplibs_check_method=pass_all
3894   fi
3895   ;;
3896
3897 gnu*)
3898   lt_cv_deplibs_check_method=pass_all
3899   ;;
3900
3901 hpux10.20*|hpux11*)
3902   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3903   lt_cv_file_magic_cmd=/usr/bin/file
3904   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3905   ;;
3906
3907 irix5* | irix6* | nonstopux*)
3908   case $host_os in
3909   irix5* | nonstopux*)
3910     # this will be overridden with pass_all, but let us keep it just in case
3911     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3912     ;;
3913   *)
3914     case $LD in
3915     *-32|*"-32 ") libmagic=32-bit;;
3916     *-n32|*"-n32 ") libmagic=N32;;
3917     *-64|*"-64 ") libmagic=64-bit;;
3918     *) libmagic=never-match;;
3919     esac
3920     # this will be overridden with pass_all, but let us keep it just in case
3921     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3922     ;;
3923   esac
3924   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3925   lt_cv_deplibs_check_method=pass_all
3926   ;;
3927
3928 # This must be Linux ELF.
3929 linux-gnu*)
3930   case $host_cpu in
3931   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3932     lt_cv_deplibs_check_method=pass_all ;;
3933   *)
3934     # glibc up to 2.1.1 does not perform some relocations on ARM
3935     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3936   esac
3937   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3938   ;;
3939
3940 netbsd*)
3941   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3942     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3943   else
3944     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3945   fi
3946   ;;
3947
3948 newos6*)
3949   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3950   lt_cv_file_magic_cmd=/usr/bin/file
3951   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3952   ;;
3953
3954 openbsd*)
3955   lt_cv_file_magic_cmd=/usr/bin/file
3956   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3957   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3958     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3959   else
3960     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3961   fi
3962   ;;
3963
3964 osf3* | osf4* | osf5*)
3965   # this will be overridden with pass_all, but let us keep it just in case
3966   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3967   lt_cv_file_magic_test_file=/shlib/libc.so
3968   lt_cv_deplibs_check_method=pass_all
3969   ;;
3970
3971 sco3.2v5*)
3972   lt_cv_deplibs_check_method=pass_all
3973   ;;
3974
3975 solaris*)
3976   lt_cv_deplibs_check_method=pass_all
3977   lt_cv_file_magic_test_file=/lib/libc.so
3978   ;;
3979
3980 sysv5uw[78]* | sysv4*uw2*)
3981   lt_cv_deplibs_check_method=pass_all
3982   ;;
3983
3984 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3985   case $host_vendor in
3986   motorola)
3987     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]'
3988     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3989     ;;
3990   ncr)
3991     lt_cv_deplibs_check_method=pass_all
3992     ;;
3993   sequent)
3994     lt_cv_file_magic_cmd='/bin/file'
3995     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3996     ;;
3997   sni)
3998     lt_cv_file_magic_cmd='/bin/file'
3999     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
4000     lt_cv_file_magic_test_file=/lib/libc.so
4001     ;;
4002   siemens)
4003     lt_cv_deplibs_check_method=pass_all
4004     ;;
4005   esac
4006   ;;
4007 esac
4008
4009 fi
4010
4011 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
4012 file_magic_cmd=$lt_cv_file_magic_cmd
4013 deplibs_check_method=$lt_cv_deplibs_check_method
4014
4015 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
4016 echo "configure:4017: checking for object suffix" >&5
4017 if eval "test \"\${ac_cv_objext+set}\" = set"; then
4018   echo $ac_n "(cached) $ac_c" 1>&6
4019 else
4020   rm -f conftest*
4021 echo 'int i = 1;' > conftest.$ac_ext
4022 if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023   for ac_file in conftest.*; do
4024     case $ac_file in
4025     *.c) ;;
4026     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
4027     esac
4028   done
4029 else
4030   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
4031 fi
4032 rm -f conftest*
4033 fi
4034
4035 echo "$ac_t""$ac_cv_objext" 1>&6
4036 OBJEXT=$ac_cv_objext
4037 ac_objext=$ac_cv_objext
4038
4039
4040
4041
4042 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4043 echo "configure:4044: checking for executable suffix" >&5
4044 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4048   ac_cv_exeext=.exe
4049 else
4050   rm -f conftest*
4051   echo 'int main () { return 0; }' > conftest.$ac_ext
4052   ac_cv_exeext=
4053   if { (eval echo configure:4054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4054     for file in conftest.*; do
4055       case $file in
4056       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4057       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4058       esac
4059     done
4060   else
4061     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4062   fi
4063   rm -f conftest*
4064   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4065 fi
4066 fi
4067
4068 EXEEXT=""
4069 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4070 echo "$ac_t""${ac_cv_exeext}" 1>&6
4071 ac_exeext=$EXEEXT
4072
4073 if test $host != $build; then
4074   ac_tool_prefix=${host_alias}-
4075 else
4076   ac_tool_prefix=
4077 fi
4078
4079
4080
4081
4082 # Check for command to grab the raw symbol name followed by C symbol from nm.
4083 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4084 echo "configure:4085: checking command to parse $NM output" >&5
4085 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4086   echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088   
4089 # These are sane defaults that work on at least a few old systems.
4090 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4091
4092 # Character class describing NM global symbol codes.
4093 symcode='[BCDEGRST]'
4094
4095 # Regexp to match symbols that can be accessed directly from C.
4096 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4097
4098 # Transform the above into a raw symbol and a C symbol.
4099 symxfrm='\1 \2\3 \3'
4100
4101 # Transform an extracted symbol line into a proper C declaration
4102 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4103
4104 # Transform an extracted symbol line into symbol name and symbol address
4105 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'"
4106
4107 # Define system-specific variables.
4108 case $host_os in
4109 aix*)
4110   symcode='[BCDT]'
4111   ;;
4112 cygwin* | mingw* | pw32*)
4113   symcode='[ABCDGISTW]'
4114   ;;
4115 hpux*) # Its linker distinguishes data from code symbols
4116   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4117   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'"
4118   ;;
4119 irix* | nonstopux*)
4120   symcode='[BCDEGRST]'
4121   ;;
4122 osf*)
4123   symcode='[BCDEGQRST]'
4124   ;;
4125 solaris* | sysv5*)
4126   symcode='[BDT]'
4127   ;;
4128 sysv4)
4129   symcode='[DFNSTU]'
4130   ;;
4131 esac
4132
4133 # Handle CRLF in mingw tool chain
4134 opt_cr=
4135 case $host_os in
4136 mingw*)
4137   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4138   ;;
4139 esac
4140
4141 # If we're using GNU nm, then use its standard symbol codes.
4142 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4143   symcode='[ABCDGISTW]'
4144 fi
4145
4146 # Try without a prefix undercore, then with it.
4147 for ac_symprfx in "" "_"; do
4148
4149   # Write the raw and C identifiers.
4150 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4151
4152   # Check to see that the pipe works correctly.
4153   pipe_works=no
4154   rm -f conftest*
4155   cat > conftest.$ac_ext <<EOF
4156 #ifdef __cplusplus
4157 extern "C" {
4158 #endif
4159 char nm_test_var;
4160 void nm_test_func(){}
4161 #ifdef __cplusplus
4162 }
4163 #endif
4164 int main(){nm_test_var='a';nm_test_func();return(0);}
4165 EOF
4166
4167   if { (eval echo configure:4168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4168     # Now try to grab the symbols.
4169     nlist=conftest.nm
4170     if { (eval echo configure:4171: \"$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
4171       # Try sorting and uniquifying the output.
4172       if sort "$nlist" | uniq > "$nlist"T; then
4173         mv -f "$nlist"T "$nlist"
4174       else
4175         rm -f "$nlist"T
4176       fi
4177
4178       # Make sure that we snagged all the symbols we need.
4179       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4180         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4181           cat <<EOF > conftest.$ac_ext
4182 #ifdef __cplusplus
4183 extern "C" {
4184 #endif
4185
4186 EOF
4187           # Now generate the symbol file.
4188           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4189
4190           cat <<EOF >> conftest.$ac_ext
4191 #if defined (__STDC__) && __STDC__
4192 # define lt_ptr void *
4193 #else
4194 # define lt_ptr char *
4195 # define const
4196 #endif
4197
4198 /* The mapping between symbol names and symbols. */
4199 const struct {
4200   const char *name;
4201   lt_ptr address;
4202 }
4203 lt_preloaded_symbols[] =
4204 {
4205 EOF
4206           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4207           cat <<\EOF >> conftest.$ac_ext
4208   {0, (lt_ptr) 0}
4209 };
4210
4211 #ifdef __cplusplus
4212 }
4213 #endif
4214 EOF
4215           # Now try linking the two files.
4216           mv conftest.$ac_objext conftstm.$ac_objext
4217           save_LIBS="$LIBS"
4218           save_CFLAGS="$CFLAGS"
4219           LIBS="conftstm.$ac_objext"
4220           CFLAGS="$CFLAGS$no_builtin_flag"
4221           if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4222             pipe_works=yes
4223           fi
4224           LIBS="$save_LIBS"
4225           CFLAGS="$save_CFLAGS"
4226         else
4227           echo "cannot find nm_test_func in $nlist" >&5
4228         fi
4229       else
4230         echo "cannot find nm_test_var in $nlist" >&5
4231       fi
4232     else
4233       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4234     fi
4235   else
4236     echo "$progname: failed program was:" >&5
4237     cat conftest.$ac_ext >&5
4238   fi
4239   rm -f conftest* conftst*
4240
4241   # Do not use the global_symbol_pipe unless it works.
4242   if test "$pipe_works" = yes; then
4243     break
4244   else
4245     lt_cv_sys_global_symbol_pipe=
4246   fi
4247 done
4248
4249 fi
4250
4251 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4252 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4253   global_symbol_to_cdecl=
4254   global_symbol_to_c_name_address=
4255 else
4256   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4257   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4258 fi
4259 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4260 then
4261   echo "$ac_t""failed" 1>&6
4262 else
4263   echo "$ac_t""ok" 1>&6
4264 fi
4265
4266 for ac_hdr in dlfcn.h
4267 do
4268 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4269 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4270 echo "configure:4271: checking for $ac_hdr" >&5
4271 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4272   echo $ac_n "(cached) $ac_c" 1>&6
4273 else
4274   cat > conftest.$ac_ext <<EOF
4275 #line 4276 "configure"
4276 #include "confdefs.h"
4277 #include <$ac_hdr>
4278 EOF
4279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4280 { (eval echo configure:4281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4282 if test -z "$ac_err"; then
4283   rm -rf conftest*
4284   eval "ac_cv_header_$ac_safe=yes"
4285 else
4286   echo "$ac_err" >&5
4287   echo "configure: failed program was:" >&5
4288   cat conftest.$ac_ext >&5
4289   rm -rf conftest*
4290   eval "ac_cv_header_$ac_safe=no"
4291 fi
4292 rm -f conftest*
4293 fi
4294 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4295   echo "$ac_t""yes" 1>&6
4296     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4297   cat >> confdefs.h <<EOF
4298 #define $ac_tr_hdr 1
4299 EOF
4300  
4301 else
4302   echo "$ac_t""no" 1>&6
4303 fi
4304 done
4305
4306
4307
4308
4309
4310
4311 # Only perform the check for file, if the check method requires it
4312 case $deplibs_check_method in
4313 file_magic*)
4314   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4315     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4316 echo "configure:4317: checking for ${ac_tool_prefix}file" >&5
4317 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4318   echo $ac_n "(cached) $ac_c" 1>&6
4319 else
4320   case $MAGIC_CMD in
4321   /*)
4322   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4323   ;;
4324   ?:/*)
4325   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4326   ;;
4327   *)
4328   ac_save_MAGIC_CMD="$MAGIC_CMD"
4329   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4330   ac_dummy="/usr/bin:$PATH"
4331   for ac_dir in $ac_dummy; do
4332     test -z "$ac_dir" && ac_dir=.
4333     if test -f $ac_dir/${ac_tool_prefix}file; then
4334       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4335       if test -n "$file_magic_test_file"; then
4336         case $deplibs_check_method in
4337         "file_magic "*)
4338           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4339           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4340           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4341             egrep "$file_magic_regex" > /dev/null; then
4342             :
4343           else
4344             cat <<EOF 1>&2
4345
4346 *** Warning: the command libtool uses to detect shared libraries,
4347 *** $file_magic_cmd, produces output that libtool cannot recognize.
4348 *** The result is that libtool may fail to recognize shared libraries
4349 *** as such.  This will affect the creation of libtool libraries that
4350 *** depend on shared libraries, but programs linked with such libtool
4351 *** libraries will work regardless of this problem.  Nevertheless, you
4352 *** may want to report the problem to your system manager and/or to
4353 *** bug-libtool@gnu.org
4354
4355 EOF
4356           fi ;;
4357         esac
4358       fi
4359       break
4360     fi
4361   done
4362   IFS="$ac_save_ifs"
4363   MAGIC_CMD="$ac_save_MAGIC_CMD"
4364   ;;
4365 esac
4366 fi
4367
4368 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4369 if test -n "$MAGIC_CMD"; then
4370   echo "$ac_t""$MAGIC_CMD" 1>&6
4371 else
4372   echo "$ac_t""no" 1>&6
4373 fi
4374
4375 if test -z "$lt_cv_path_MAGIC_CMD"; then
4376   if test -n "$ac_tool_prefix"; then
4377     echo $ac_n "checking for file""... $ac_c" 1>&6
4378 echo "configure:4379: checking for file" >&5
4379 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4380   echo $ac_n "(cached) $ac_c" 1>&6
4381 else
4382   case $MAGIC_CMD in
4383   /*)
4384   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4385   ;;
4386   ?:/*)
4387   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4388   ;;
4389   *)
4390   ac_save_MAGIC_CMD="$MAGIC_CMD"
4391   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4392   ac_dummy="/usr/bin:$PATH"
4393   for ac_dir in $ac_dummy; do
4394     test -z "$ac_dir" && ac_dir=.
4395     if test -f $ac_dir/file; then
4396       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4397       if test -n "$file_magic_test_file"; then
4398         case $deplibs_check_method in
4399         "file_magic "*)
4400           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4401           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4402           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4403             egrep "$file_magic_regex" > /dev/null; then
4404             :
4405           else
4406             cat <<EOF 1>&2
4407
4408 *** Warning: the command libtool uses to detect shared libraries,
4409 *** $file_magic_cmd, produces output that libtool cannot recognize.
4410 *** The result is that libtool may fail to recognize shared libraries
4411 *** as such.  This will affect the creation of libtool libraries that
4412 *** depend on shared libraries, but programs linked with such libtool
4413 *** libraries will work regardless of this problem.  Nevertheless, you
4414 *** may want to report the problem to your system manager and/or to
4415 *** bug-libtool@gnu.org
4416
4417 EOF
4418           fi ;;
4419         esac
4420       fi
4421       break
4422     fi
4423   done
4424   IFS="$ac_save_ifs"
4425   MAGIC_CMD="$ac_save_MAGIC_CMD"
4426   ;;
4427 esac
4428 fi
4429
4430 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4431 if test -n "$MAGIC_CMD"; then
4432   echo "$ac_t""$MAGIC_CMD" 1>&6
4433 else
4434   echo "$ac_t""no" 1>&6
4435 fi
4436
4437   else
4438     MAGIC_CMD=:
4439   fi
4440 fi
4441
4442   fi
4443   ;;
4444 esac
4445
4446 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4447 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4448 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4449 echo "configure:4450: checking for $ac_word" >&5
4450 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4451   echo $ac_n "(cached) $ac_c" 1>&6
4452 else
4453   if test -n "$RANLIB"; then
4454   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4455 else
4456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4457   ac_dummy="$PATH"
4458   for ac_dir in $ac_dummy; do
4459     test -z "$ac_dir" && ac_dir=.
4460     if test -f $ac_dir/$ac_word; then
4461       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4462       break
4463     fi
4464   done
4465   IFS="$ac_save_ifs"
4466 fi
4467 fi
4468 RANLIB="$ac_cv_prog_RANLIB"
4469 if test -n "$RANLIB"; then
4470   echo "$ac_t""$RANLIB" 1>&6
4471 else
4472   echo "$ac_t""no" 1>&6
4473 fi
4474
4475
4476 if test -z "$ac_cv_prog_RANLIB"; then
4477 if test -n "$ac_tool_prefix"; then
4478   # Extract the first word of "ranlib", so it can be a program name with args.
4479 set dummy ranlib; ac_word=$2
4480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4481 echo "configure:4482: checking for $ac_word" >&5
4482 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4483   echo $ac_n "(cached) $ac_c" 1>&6
4484 else
4485   if test -n "$RANLIB"; then
4486   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4487 else
4488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4489   ac_dummy="$PATH"
4490   for ac_dir in $ac_dummy; do
4491     test -z "$ac_dir" && ac_dir=.
4492     if test -f $ac_dir/$ac_word; then
4493       ac_cv_prog_RANLIB="ranlib"
4494       break
4495     fi
4496   done
4497   IFS="$ac_save_ifs"
4498   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4499 fi
4500 fi
4501 RANLIB="$ac_cv_prog_RANLIB"
4502 if test -n "$RANLIB"; then
4503   echo "$ac_t""$RANLIB" 1>&6
4504 else
4505   echo "$ac_t""no" 1>&6
4506 fi
4507
4508 else
4509   RANLIB=":"
4510 fi
4511 fi
4512
4513 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4514 set dummy ${ac_tool_prefix}strip; ac_word=$2
4515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4516 echo "configure:4517: checking for $ac_word" >&5
4517 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4518   echo $ac_n "(cached) $ac_c" 1>&6
4519 else
4520   if test -n "$STRIP"; then
4521   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4522 else
4523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4524   ac_dummy="$PATH"
4525   for ac_dir in $ac_dummy; do
4526     test -z "$ac_dir" && ac_dir=.
4527     if test -f $ac_dir/$ac_word; then
4528       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4529       break
4530     fi
4531   done
4532   IFS="$ac_save_ifs"
4533 fi
4534 fi
4535 STRIP="$ac_cv_prog_STRIP"
4536 if test -n "$STRIP"; then
4537   echo "$ac_t""$STRIP" 1>&6
4538 else
4539   echo "$ac_t""no" 1>&6
4540 fi
4541
4542
4543 if test -z "$ac_cv_prog_STRIP"; then
4544 if test -n "$ac_tool_prefix"; then
4545   # Extract the first word of "strip", so it can be a program name with args.
4546 set dummy strip; ac_word=$2
4547 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4548 echo "configure:4549: checking for $ac_word" >&5
4549 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4550   echo $ac_n "(cached) $ac_c" 1>&6
4551 else
4552   if test -n "$STRIP"; then
4553   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4554 else
4555   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4556   ac_dummy="$PATH"
4557   for ac_dir in $ac_dummy; do
4558     test -z "$ac_dir" && ac_dir=.
4559     if test -f $ac_dir/$ac_word; then
4560       ac_cv_prog_STRIP="strip"
4561       break
4562     fi
4563   done
4564   IFS="$ac_save_ifs"
4565   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4566 fi
4567 fi
4568 STRIP="$ac_cv_prog_STRIP"
4569 if test -n "$STRIP"; then
4570   echo "$ac_t""$STRIP" 1>&6
4571 else
4572   echo "$ac_t""no" 1>&6
4573 fi
4574
4575 else
4576   STRIP=":"
4577 fi
4578 fi
4579
4580
4581 enable_dlopen=yes
4582 enable_win32_dll=yes
4583
4584 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4585 if test "${enable_libtool_lock+set}" = set; then
4586   enableval="$enable_libtool_lock"
4587   :
4588 fi
4589
4590 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4591
4592 # Some flags need to be propagated to the compiler or linker for good
4593 # libtool support.
4594 case $host in
4595 *-*-irix6*)
4596   # Find out which ABI we are using.
4597   echo '#line 4598 "configure"' > conftest.$ac_ext
4598   if { (eval echo configure:4599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4599     case `/usr/bin/file conftest.$ac_objext` in
4600     *32-bit*)
4601       LD="${LD-ld} -32"
4602       ;;
4603     *N32*)
4604       LD="${LD-ld} -n32"
4605       ;;
4606     *64-bit*)
4607       LD="${LD-ld} -64"
4608       ;;
4609     esac
4610   fi
4611   rm -rf conftest*
4612   ;;
4613
4614 *-*-sco3.2v5*)
4615   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4616   SAVE_CFLAGS="$CFLAGS"
4617   CFLAGS="$CFLAGS -belf"
4618   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4619 echo "configure:4620: checking whether the C compiler needs -belf" >&5
4620 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   
4624      ac_ext=c
4625 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4626 ac_cpp='$CPP $CPPFLAGS'
4627 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4628 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4629 cross_compiling=$ac_cv_prog_cc_cross
4630
4631      cat > conftest.$ac_ext <<EOF
4632 #line 4633 "configure"
4633 #include "confdefs.h"
4634
4635 int main() {
4636
4637 ; return 0; }
4638 EOF
4639 if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4640   rm -rf conftest*
4641   lt_cv_cc_needs_belf=yes
4642 else
4643   echo "configure: failed program was:" >&5
4644   cat conftest.$ac_ext >&5
4645   rm -rf conftest*
4646   lt_cv_cc_needs_belf=no
4647 fi
4648 rm -f conftest*
4649      ac_ext=c
4650 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4651 ac_cpp='$CPP $CPPFLAGS'
4652 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4653 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4654 cross_compiling=$ac_cv_prog_cc_cross
4655
4656 fi
4657
4658 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4659   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4660     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4661     CFLAGS="$SAVE_CFLAGS"
4662   fi
4663   ;;
4664
4665 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4666   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4667 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4669 echo "configure:4670: checking for $ac_word" >&5
4670 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   if test -n "$DLLTOOL"; then
4674   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4675 else
4676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4677   ac_dummy="$PATH"
4678   for ac_dir in $ac_dummy; do
4679     test -z "$ac_dir" && ac_dir=.
4680     if test -f $ac_dir/$ac_word; then
4681       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4682       break
4683     fi
4684   done
4685   IFS="$ac_save_ifs"
4686 fi
4687 fi
4688 DLLTOOL="$ac_cv_prog_DLLTOOL"
4689 if test -n "$DLLTOOL"; then
4690   echo "$ac_t""$DLLTOOL" 1>&6
4691 else
4692   echo "$ac_t""no" 1>&6
4693 fi
4694
4695
4696 if test -z "$ac_cv_prog_DLLTOOL"; then
4697 if test -n "$ac_tool_prefix"; then
4698   # Extract the first word of "dlltool", so it can be a program name with args.
4699 set dummy dlltool; ac_word=$2
4700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4701 echo "configure:4702: checking for $ac_word" >&5
4702 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4703   echo $ac_n "(cached) $ac_c" 1>&6
4704 else
4705   if test -n "$DLLTOOL"; then
4706   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4707 else
4708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4709   ac_dummy="$PATH"
4710   for ac_dir in $ac_dummy; do
4711     test -z "$ac_dir" && ac_dir=.
4712     if test -f $ac_dir/$ac_word; then
4713       ac_cv_prog_DLLTOOL="dlltool"
4714       break
4715     fi
4716   done
4717   IFS="$ac_save_ifs"
4718   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4719 fi
4720 fi
4721 DLLTOOL="$ac_cv_prog_DLLTOOL"
4722 if test -n "$DLLTOOL"; then
4723   echo "$ac_t""$DLLTOOL" 1>&6
4724 else
4725   echo "$ac_t""no" 1>&6
4726 fi
4727
4728 else
4729   DLLTOOL="false"
4730 fi
4731 fi
4732
4733   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4734 set dummy ${ac_tool_prefix}as; ac_word=$2
4735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4736 echo "configure:4737: checking for $ac_word" >&5
4737 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   if test -n "$AS"; then
4741   ac_cv_prog_AS="$AS" # Let the user override the test.
4742 else
4743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4744   ac_dummy="$PATH"
4745   for ac_dir in $ac_dummy; do
4746     test -z "$ac_dir" && ac_dir=.
4747     if test -f $ac_dir/$ac_word; then
4748       ac_cv_prog_AS="${ac_tool_prefix}as"
4749       break
4750     fi
4751   done
4752   IFS="$ac_save_ifs"
4753 fi
4754 fi
4755 AS="$ac_cv_prog_AS"
4756 if test -n "$AS"; then
4757   echo "$ac_t""$AS" 1>&6
4758 else
4759   echo "$ac_t""no" 1>&6
4760 fi
4761
4762
4763 if test -z "$ac_cv_prog_AS"; then
4764 if test -n "$ac_tool_prefix"; then
4765   # Extract the first word of "as", so it can be a program name with args.
4766 set dummy as; ac_word=$2
4767 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4768 echo "configure:4769: checking for $ac_word" >&5
4769 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4770   echo $ac_n "(cached) $ac_c" 1>&6
4771 else
4772   if test -n "$AS"; then
4773   ac_cv_prog_AS="$AS" # Let the user override the test.
4774 else
4775   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4776   ac_dummy="$PATH"
4777   for ac_dir in $ac_dummy; do
4778     test -z "$ac_dir" && ac_dir=.
4779     if test -f $ac_dir/$ac_word; then
4780       ac_cv_prog_AS="as"
4781       break
4782     fi
4783   done
4784   IFS="$ac_save_ifs"
4785   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4786 fi
4787 fi
4788 AS="$ac_cv_prog_AS"
4789 if test -n "$AS"; then
4790   echo "$ac_t""$AS" 1>&6
4791 else
4792   echo "$ac_t""no" 1>&6
4793 fi
4794
4795 else
4796   AS="false"
4797 fi
4798 fi
4799
4800   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4801 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4803 echo "configure:4804: checking for $ac_word" >&5
4804 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4805   echo $ac_n "(cached) $ac_c" 1>&6
4806 else
4807   if test -n "$OBJDUMP"; then
4808   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4809 else
4810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4811   ac_dummy="$PATH"
4812   for ac_dir in $ac_dummy; do
4813     test -z "$ac_dir" && ac_dir=.
4814     if test -f $ac_dir/$ac_word; then
4815       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4816       break
4817     fi
4818   done
4819   IFS="$ac_save_ifs"
4820 fi
4821 fi
4822 OBJDUMP="$ac_cv_prog_OBJDUMP"
4823 if test -n "$OBJDUMP"; then
4824   echo "$ac_t""$OBJDUMP" 1>&6
4825 else
4826   echo "$ac_t""no" 1>&6
4827 fi
4828
4829
4830 if test -z "$ac_cv_prog_OBJDUMP"; then
4831 if test -n "$ac_tool_prefix"; then
4832   # Extract the first word of "objdump", so it can be a program name with args.
4833 set dummy objdump; ac_word=$2
4834 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4835 echo "configure:4836: checking for $ac_word" >&5
4836 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4837   echo $ac_n "(cached) $ac_c" 1>&6
4838 else
4839   if test -n "$OBJDUMP"; then
4840   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4841 else
4842   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4843   ac_dummy="$PATH"
4844   for ac_dir in $ac_dummy; do
4845     test -z "$ac_dir" && ac_dir=.
4846     if test -f $ac_dir/$ac_word; then
4847       ac_cv_prog_OBJDUMP="objdump"
4848       break
4849     fi
4850   done
4851   IFS="$ac_save_ifs"
4852   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4853 fi
4854 fi
4855 OBJDUMP="$ac_cv_prog_OBJDUMP"
4856 if test -n "$OBJDUMP"; then
4857   echo "$ac_t""$OBJDUMP" 1>&6
4858 else
4859   echo "$ac_t""no" 1>&6
4860 fi
4861
4862 else
4863   OBJDUMP="false"
4864 fi
4865 fi
4866
4867
4868   # recent cygwin and mingw systems supply a stub DllMain which the user
4869   # can override, but on older systems we have to supply one
4870   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4871 echo "configure:4872: checking if libtool should supply DllMain function" >&5
4872 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4873   echo $ac_n "(cached) $ac_c" 1>&6
4874 else
4875   cat > conftest.$ac_ext <<EOF
4876 #line 4877 "configure"
4877 #include "confdefs.h"
4878
4879 int main() {
4880 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4881       DllMain (0, 0, 0);
4882 ; return 0; }
4883 EOF
4884 if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4885   rm -rf conftest*
4886   lt_cv_need_dllmain=no
4887 else
4888   echo "configure: failed program was:" >&5
4889   cat conftest.$ac_ext >&5
4890   rm -rf conftest*
4891   lt_cv_need_dllmain=yes
4892 fi
4893 rm -f conftest*
4894 fi
4895
4896 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4897
4898   case $host/$CC in
4899   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4900     # old mingw systems require "-dll" to link a DLL, while more recent ones
4901     # require "-mdll"
4902     SAVE_CFLAGS="$CFLAGS"
4903     CFLAGS="$CFLAGS -mdll"
4904     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4905 echo "configure:4906: checking how to link DLLs" >&5
4906 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4907   echo $ac_n "(cached) $ac_c" 1>&6
4908 else
4909   cat > conftest.$ac_ext <<EOF
4910 #line 4911 "configure"
4911 #include "confdefs.h"
4912
4913 int main() {
4914
4915 ; return 0; }
4916 EOF
4917 if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4918   rm -rf conftest*
4919   lt_cv_cc_dll_switch=-mdll
4920 else
4921   echo "configure: failed program was:" >&5
4922   cat conftest.$ac_ext >&5
4923   rm -rf conftest*
4924   lt_cv_cc_dll_switch=-dll
4925 fi
4926 rm -f conftest*
4927 fi
4928
4929 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4930     CFLAGS="$SAVE_CFLAGS" ;;
4931   *-*-cygwin* | *-*-pw32*)
4932     # cygwin systems need to pass --dll to the linker, and not link
4933     # crt.o which will require a WinMain@16 definition.
4934     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4935   esac
4936   ;;
4937   
4938 esac
4939
4940 # Sed substitution that helps us do robust quoting.  It backslashifies
4941 # metacharacters that are still active within double-quoted strings.
4942 Xsed='sed -e s/^X//'
4943 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4944
4945 # Same as above, but do not quote variable references.
4946 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4947
4948 # Sed substitution to delay expansion of an escaped shell variable in a
4949 # double_quote_subst'ed string.
4950 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4951
4952 # Constants:
4953 rm="rm -f"
4954
4955 # Global variables:
4956 default_ofile=libtool
4957 can_build_shared=yes
4958
4959 # All known linkers require a `.a' archive for static linking (except M$VC,
4960 # which needs '.lib').
4961 libext=a
4962 ltmain="$ac_aux_dir/ltmain.sh"
4963 ofile="$default_ofile"
4964 with_gnu_ld="$lt_cv_prog_gnu_ld"
4965 need_locks="$enable_libtool_lock"
4966
4967 old_CC="$CC"
4968 old_CFLAGS="$CFLAGS"
4969
4970 # Set sane defaults for various variables
4971 test -z "$AR" && AR=ar
4972 test -z "$AR_FLAGS" && AR_FLAGS=cru
4973 test -z "$AS" && AS=as
4974 test -z "$CC" && CC=cc
4975 test -z "$DLLTOOL" && DLLTOOL=dlltool
4976 test -z "$LD" && LD=ld
4977 test -z "$LN_S" && LN_S="ln -s"
4978 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4979 test -z "$NM" && NM=nm
4980 test -z "$OBJDUMP" && OBJDUMP=objdump
4981 test -z "$RANLIB" && RANLIB=:
4982 test -z "$STRIP" && STRIP=:
4983 test -z "$ac_objext" && ac_objext=o
4984
4985 if test x"$host" != x"$build"; then
4986   ac_tool_prefix=${host_alias}-
4987 else
4988   ac_tool_prefix=
4989 fi
4990
4991 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4992 case $host_os in
4993 linux-gnu*) ;;
4994 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4995 esac
4996
4997 case $host_os in
4998 aix3*)
4999   # AIX sometimes has problems with the GCC collect2 program.  For some
5000   # reason, if we set the COLLECT_NAMES environment variable, the problems
5001   # vanish in a puff of smoke.
5002   if test "X${COLLECT_NAMES+set}" != Xset; then
5003     COLLECT_NAMES=
5004     export COLLECT_NAMES
5005   fi
5006   ;;
5007 esac
5008
5009 # Determine commands to create old-style static archives.
5010 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
5011 old_postinstall_cmds='chmod 644 $oldlib'
5012 old_postuninstall_cmds=
5013
5014 if test -n "$RANLIB"; then
5015   case $host_os in
5016   openbsd*)
5017     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
5018     ;;
5019   *)
5020     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
5021     ;;
5022   esac
5023   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
5024 fi
5025
5026 # Allow CC to be a program name with arguments.
5027 set dummy $CC
5028 compiler="$2"
5029
5030 ## FIXME: this should be a separate macro
5031 ##
5032 echo $ac_n "checking for objdir""... $ac_c" 1>&6
5033 echo "configure:5034: checking for objdir" >&5
5034 rm -f .libs 2>/dev/null
5035 mkdir .libs 2>/dev/null
5036 if test -d .libs; then
5037   objdir=.libs
5038 else
5039   # MS-DOS does not allow filenames that begin with a dot.
5040   objdir=_libs
5041 fi
5042 rmdir .libs 2>/dev/null
5043 echo "$ac_t""$objdir" 1>&6
5044 ##
5045 ## END FIXME
5046
5047
5048 ## FIXME: this should be a separate macro
5049 ##
5050 # Check whether --with-pic or --without-pic was given.
5051 if test "${with_pic+set}" = set; then
5052   withval="$with_pic"
5053   pic_mode="$withval"
5054 else
5055   pic_mode=default
5056 fi
5057
5058 test -z "$pic_mode" && pic_mode=default
5059
5060 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5061 # in isolation, and that seeing it set (from the cache) indicates that
5062 # the associated values are set (in the cache) correctly too.
5063 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5064 echo "configure:5065: checking for $compiler option to produce PIC" >&5
5065 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068    lt_cv_prog_cc_pic=
5069   lt_cv_prog_cc_shlib=
5070   lt_cv_prog_cc_wl=
5071   lt_cv_prog_cc_static=
5072   lt_cv_prog_cc_no_builtin=
5073   lt_cv_prog_cc_can_build_shared=$can_build_shared
5074
5075   if test "$GCC" = yes; then
5076     lt_cv_prog_cc_wl='-Wl,'
5077     lt_cv_prog_cc_static='-static'
5078
5079     case $host_os in
5080     aix*)
5081       # Below there is a dirty hack to force normal static linking with -ldl
5082       # The problem is because libdl dynamically linked with both libc and
5083       # libC (AIX C++ library), which obviously doesn't included in libraries
5084       # list by gcc. This cause undefined symbols with -static flags.
5085       # This hack allows C programs to be linked with "-static -ldl", but
5086       # not sure about C++ programs.
5087       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5088       ;;
5089     amigaos*)
5090       # FIXME: we need at least 68020 code to build shared libraries, but
5091       # adding the `-m68020' flag to GCC prevents building anything better,
5092       # like `-m68040'.
5093       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5094       ;;
5095     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5096       # PIC is the default for these OSes.
5097       ;;
5098     darwin* | rhapsody*)
5099       # PIC is the default on this platform
5100       # Common symbols not allowed in MH_DYLIB files
5101       lt_cv_prog_cc_pic='-fno-common'
5102       ;;
5103     cygwin* | mingw* | pw32* | os2*)
5104       # This hack is so that the source file can tell whether it is being
5105       # built for inclusion in a dll (and should export symbols for example).
5106       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5107       ;;
5108     sysv4*MP*)
5109       if test -d /usr/nec; then
5110          lt_cv_prog_cc_pic=-Kconform_pic
5111       fi
5112       ;;
5113     *)
5114       lt_cv_prog_cc_pic='-fPIC'
5115       ;;
5116     esac
5117   else
5118     # PORTME Check for PIC flags for the system compiler.
5119     case $host_os in
5120     aix3* | aix4* | aix5*)
5121       lt_cv_prog_cc_wl='-Wl,'
5122       # All AIX code is PIC.
5123       if test "$host_cpu" = ia64; then
5124         # AIX 5 now supports IA64 processor
5125         lt_cv_prog_cc_static='-Bstatic'
5126       else
5127         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5128       fi
5129       ;;
5130
5131     hpux9* | hpux10* | hpux11*)
5132       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5133       lt_cv_prog_cc_wl='-Wl,'
5134       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5135       lt_cv_prog_cc_pic='+Z'
5136       ;;
5137
5138     irix5* | irix6* | nonstopux*)
5139       lt_cv_prog_cc_wl='-Wl,'
5140       lt_cv_prog_cc_static='-non_shared'
5141       # PIC (with -KPIC) is the default.
5142       ;;
5143
5144     cygwin* | mingw* | pw32* | os2*)
5145       # This hack is so that the source file can tell whether it is being
5146       # built for inclusion in a dll (and should export symbols for example).
5147       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5148       ;;
5149
5150     newsos6)
5151       lt_cv_prog_cc_pic='-KPIC'
5152       lt_cv_prog_cc_static='-Bstatic'
5153       ;;
5154
5155     osf3* | osf4* | osf5*)
5156       # All OSF/1 code is PIC.
5157       lt_cv_prog_cc_wl='-Wl,'
5158       lt_cv_prog_cc_static='-non_shared'
5159       ;;
5160
5161     sco3.2v5*)
5162       lt_cv_prog_cc_pic='-Kpic'
5163       lt_cv_prog_cc_static='-dn'
5164       lt_cv_prog_cc_shlib='-belf'
5165       ;;
5166
5167     solaris*)
5168       lt_cv_prog_cc_pic='-KPIC'
5169       lt_cv_prog_cc_static='-Bstatic'
5170       lt_cv_prog_cc_wl='-Wl,'
5171       ;;
5172
5173     sunos4*)
5174       lt_cv_prog_cc_pic='-PIC'
5175       lt_cv_prog_cc_static='-Bstatic'
5176       lt_cv_prog_cc_wl='-Qoption ld '
5177       ;;
5178
5179     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5180       lt_cv_prog_cc_pic='-KPIC'
5181       lt_cv_prog_cc_static='-Bstatic'
5182       lt_cv_prog_cc_wl='-Wl,'
5183       ;;
5184
5185     uts4*)
5186       lt_cv_prog_cc_pic='-pic'
5187       lt_cv_prog_cc_static='-Bstatic'
5188       ;;
5189
5190     sysv4*MP*)
5191       if test -d /usr/nec ;then
5192         lt_cv_prog_cc_pic='-Kconform_pic'
5193         lt_cv_prog_cc_static='-Bstatic'
5194       fi
5195       ;;
5196
5197     *)
5198       lt_cv_prog_cc_can_build_shared=no
5199       ;;
5200     esac
5201   fi
5202
5203 fi
5204
5205 if test -z "$lt_cv_prog_cc_pic"; then
5206   echo "$ac_t""none" 1>&6
5207 else
5208   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5209
5210   # Check to make sure the pic_flag actually works.
5211   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5212 echo "configure:5213: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5213   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5214   echo $ac_n "(cached) $ac_c" 1>&6
5215 else
5216       save_CFLAGS="$CFLAGS"
5217     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5218     cat > conftest.$ac_ext <<EOF
5219 #line 5220 "configure"
5220 #include "confdefs.h"
5221
5222 int main() {
5223
5224 ; return 0; }
5225 EOF
5226 if { (eval echo configure:5227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5227   rm -rf conftest*
5228         case $host_os in
5229       hpux9* | hpux10* | hpux11*)
5230         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5231         # they create non-PIC objects.  So, if there were any warnings, we
5232         # assume that PIC is not supported.
5233         if test -s conftest.err; then
5234           lt_cv_prog_cc_pic_works=no
5235         else
5236           lt_cv_prog_cc_pic_works=yes
5237         fi
5238         ;;
5239       *)
5240         lt_cv_prog_cc_pic_works=yes
5241         ;;
5242       esac
5243     
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248         lt_cv_prog_cc_pic_works=no
5249     
5250 fi
5251 rm -f conftest*
5252     CFLAGS="$save_CFLAGS"
5253   
5254 fi
5255
5256
5257   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5258     lt_cv_prog_cc_pic=
5259     lt_cv_prog_cc_can_build_shared=no
5260   else
5261     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5262   fi
5263
5264   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5265 fi
5266 ##
5267 ## END FIXME
5268
5269 # Check for any special shared library compilation flags.
5270 if test -n "$lt_cv_prog_cc_shlib"; then
5271   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5272   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5273   else
5274    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5275     lt_cv_prog_cc_can_build_shared=no
5276   fi
5277 fi
5278
5279 ## FIXME: this should be a separate macro
5280 ##
5281 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5282 echo "configure:5283: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5283 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5284   echo $ac_n "(cached) $ac_c" 1>&6
5285 else
5286     lt_cv_prog_cc_static_works=no
5287   save_LDFLAGS="$LDFLAGS"
5288   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5289   cat > conftest.$ac_ext <<EOF
5290 #line 5291 "configure"
5291 #include "confdefs.h"
5292
5293 int main() {
5294
5295 ; return 0; }
5296 EOF
5297 if { (eval echo configure:5298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5298   rm -rf conftest*
5299   lt_cv_prog_cc_static_works=yes
5300 else
5301   echo "configure: failed program was:" >&5
5302   cat conftest.$ac_ext >&5
5303 fi
5304 rm -f conftest*
5305   LDFLAGS="$save_LDFLAGS"
5306
5307 fi
5308
5309
5310 # Belt *and* braces to stop my trousers falling down:
5311 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5312 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5313
5314 pic_flag="$lt_cv_prog_cc_pic"
5315 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5316 wl="$lt_cv_prog_cc_wl"
5317 link_static_flag="$lt_cv_prog_cc_static"
5318 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5319 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5320 ##
5321 ## END FIXME
5322
5323
5324 ## FIXME: this should be a separate macro
5325 ##
5326 # Check to see if options -o and -c are simultaneously supported by compiler
5327 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5328 echo "configure:5329: checking if $compiler supports -c -o file.$ac_objext" >&5
5329 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5330   echo $ac_n "(cached) $ac_c" 1>&6
5331 else
5332   
5333 $rm -r conftest 2>/dev/null
5334 mkdir conftest
5335 cd conftest
5336 echo "int some_variable = 0;" > conftest.$ac_ext
5337 mkdir out
5338 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5339 # that will create temporary files in the current directory regardless of
5340 # the output directory.  Thus, making CWD read-only will cause this test
5341 # to fail, enabling locking or at least warning the user not to do parallel
5342 # builds.
5343 chmod -w .
5344 save_CFLAGS="$CFLAGS"
5345 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5346 compiler_c_o=no
5347 if { (eval echo configure:5348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5348   # The compiler can only warn and ignore the option if not recognized
5349   # So say no if there are warnings
5350   if test -s out/conftest.err; then
5351     lt_cv_compiler_c_o=no
5352   else
5353     lt_cv_compiler_c_o=yes
5354   fi
5355 else
5356   # Append any errors to the config.log.
5357   cat out/conftest.err 1>&5
5358   lt_cv_compiler_c_o=no
5359 fi
5360 CFLAGS="$save_CFLAGS"
5361 chmod u+w .
5362 $rm conftest* out/*
5363 rmdir out
5364 cd ..
5365 rmdir conftest
5366 $rm -r conftest 2>/dev/null
5367
5368 fi
5369
5370 compiler_c_o=$lt_cv_compiler_c_o
5371 echo "$ac_t""$compiler_c_o" 1>&6
5372
5373 if test x"$compiler_c_o" = x"yes"; then
5374   # Check to see if we can write to a .lo
5375   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5376 echo "configure:5377: checking if $compiler supports -c -o file.lo" >&5
5377   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   
5381   lt_cv_compiler_o_lo=no
5382   save_CFLAGS="$CFLAGS"
5383   CFLAGS="$CFLAGS -c -o conftest.lo"
5384   save_objext="$ac_objext"
5385   ac_objext=lo
5386   cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389
5390 int main() {
5391 int some_variable = 0;
5392 ; return 0; }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5395   rm -rf conftest*
5396       # The compiler can only warn and ignore the option if not recognized
5397     # So say no if there are warnings
5398     if test -s conftest.err; then
5399       lt_cv_compiler_o_lo=no
5400     else
5401       lt_cv_compiler_o_lo=yes
5402     fi
5403   
5404 else
5405   echo "configure: failed program was:" >&5
5406   cat conftest.$ac_ext >&5
5407 fi
5408 rm -f conftest*
5409   ac_objext="$save_objext"
5410   CFLAGS="$save_CFLAGS"
5411   
5412 fi
5413
5414   compiler_o_lo=$lt_cv_compiler_o_lo
5415   echo "$ac_t""$compiler_o_lo" 1>&6
5416 else
5417   compiler_o_lo=no
5418 fi
5419 ##
5420 ## END FIXME
5421
5422 ## FIXME: this should be a separate macro
5423 ##
5424 # Check to see if we can do hard links to lock some files if needed
5425 hard_links="nottested"
5426 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5427   # do not overwrite the value of need_locks provided by the user
5428   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5429 echo "configure:5430: checking if we can lock with hard links" >&5
5430   hard_links=yes
5431   $rm conftest*
5432   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5433   touch conftest.a
5434   ln conftest.a conftest.b 2>&5 || hard_links=no
5435   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5436   echo "$ac_t""$hard_links" 1>&6
5437   if test "$hard_links" = no; then
5438     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5439     need_locks=warn
5440   fi
5441 else
5442   need_locks=no
5443 fi
5444 ##
5445 ## END FIXME
5446
5447 ## FIXME: this should be a separate macro
5448 ##
5449 if test "$GCC" = yes; then
5450   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5451   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5452 echo "configure:5453: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5453   echo "int some_variable = 0;" > conftest.$ac_ext
5454   save_CFLAGS="$CFLAGS"
5455   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5456   compiler_rtti_exceptions=no
5457   cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460
5461 int main() {
5462 int some_variable = 0;
5463 ; return 0; }
5464 EOF
5465 if { (eval echo configure:5466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5466   rm -rf conftest*
5467       # The compiler can only warn and ignore the option if not recognized
5468     # So say no if there are warnings
5469     if test -s conftest.err; then
5470       compiler_rtti_exceptions=no
5471     else
5472       compiler_rtti_exceptions=yes
5473     fi
5474   
5475 else
5476   echo "configure: failed program was:" >&5
5477   cat conftest.$ac_ext >&5
5478 fi
5479 rm -f conftest*
5480   CFLAGS="$save_CFLAGS"
5481   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5482
5483   if test "$compiler_rtti_exceptions" = "yes"; then
5484     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5485   else
5486     no_builtin_flag=' -fno-builtin'
5487   fi
5488 fi
5489 ##
5490 ## END FIXME
5491
5492 ## FIXME: this should be a separate macro
5493 ##
5494 # See if the linker supports building shared libraries.
5495 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5496 echo "configure:5497: checking whether the linker ($LD) supports shared libraries" >&5
5497
5498 allow_undefined_flag=
5499 no_undefined_flag=
5500 need_lib_prefix=unknown
5501 need_version=unknown
5502 # when you set need_version to no, make sure it does not cause -set_version
5503 # flags to be left without arguments
5504 archive_cmds=
5505 archive_expsym_cmds=
5506 old_archive_from_new_cmds=
5507 old_archive_from_expsyms_cmds=
5508 export_dynamic_flag_spec=
5509 whole_archive_flag_spec=
5510 thread_safe_flag_spec=
5511 hardcode_into_libs=no
5512 hardcode_libdir_flag_spec=
5513 hardcode_libdir_separator=
5514 hardcode_direct=no
5515 hardcode_minus_L=no
5516 hardcode_shlibpath_var=unsupported
5517 runpath_var=
5518 link_all_deplibs=unknown
5519 always_export_symbols=no
5520 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5521 # include_expsyms should be a list of space-separated symbols to be *always*
5522 # included in the symbol list
5523 include_expsyms=
5524 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5525 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5526 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5527 # as well as any symbol that contains `d'.
5528 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5529 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5530 # platforms (ab)use it in PIC code, but their linkers get confused if
5531 # the symbol is explicitly referenced.  Since portable code cannot
5532 # rely on this symbol name, it's probably fine to never include it in
5533 # preloaded symbol tables.
5534 extract_expsyms_cmds=
5535
5536 case $host_os in
5537 cygwin* | mingw* | pw32*)
5538   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5539   # When not using gcc, we currently assume that we are using
5540   # Microsoft Visual C++.
5541   if test "$GCC" != yes; then
5542     with_gnu_ld=no
5543   fi
5544   ;;
5545 openbsd*)
5546   with_gnu_ld=no
5547   ;;
5548 esac
5549
5550 ld_shlibs=yes
5551 if test "$with_gnu_ld" = yes; then
5552   # If archive_cmds runs LD, not CC, wlarc should be empty
5553   wlarc='${wl}'
5554
5555   # See if GNU ld supports shared libraries.
5556   case $host_os in
5557   aix3* | aix4* | aix5*)
5558     # On AIX, the GNU linker is very broken
5559     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5560     ld_shlibs=no
5561     cat <<EOF 1>&2
5562
5563 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5564 *** to be unable to reliably create shared libraries on AIX.
5565 *** Therefore, libtool is disabling shared libraries support.  If you
5566 *** really care for shared libraries, you may want to modify your PATH
5567 *** so that a non-GNU linker is found, and then restart.
5568
5569 EOF
5570     ;;
5571
5572   amigaos*)
5573     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)'
5574     hardcode_libdir_flag_spec='-L$libdir'
5575     hardcode_minus_L=yes
5576
5577     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5578     # that the semantics of dynamic libraries on AmigaOS, at least up
5579     # to version 4, is to share data among multiple programs linked
5580     # with the same dynamic library.  Since this doesn't match the
5581     # behavior of shared libraries on other platforms, we can use
5582     # them.
5583     ld_shlibs=no
5584     ;;
5585
5586   beos*)
5587     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5588       allow_undefined_flag=unsupported
5589       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5590       # support --undefined.  This deserves some investigation.  FIXME
5591       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5592     else
5593       ld_shlibs=no
5594     fi
5595     ;;
5596
5597   cygwin* | mingw* | pw32*)
5598     # hardcode_libdir_flag_spec is actually meaningless, as there is
5599     # no search path for DLLs.
5600     hardcode_libdir_flag_spec='-L$libdir'
5601     allow_undefined_flag=unsupported
5602     always_export_symbols=yes
5603
5604     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5605       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5606       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5607       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5608       else $CC -o impgen impgen.c ; fi)~
5609       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5610
5611     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5612
5613     # cygwin and mingw dlls have different entry points and sets of symbols
5614     # to exclude.
5615     # FIXME: what about values for MSVC?
5616     dll_entry=__cygwin_dll_entry@12
5617     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5618     case $host_os in
5619     mingw*)
5620       # mingw values
5621       dll_entry=_DllMainCRTStartup@12
5622       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5623       ;;
5624     esac
5625
5626     # mingw and cygwin differ, and it's simplest to just exclude the union
5627     # of the two symbol sets.
5628     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5629
5630     # recent cygwin and mingw systems supply a stub DllMain which the user
5631     # can override, but on older systems we have to supply one (in ltdll.c)
5632     if test "x$lt_cv_need_dllmain" = "xyes"; then
5633       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5634       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~
5635         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5636     else
5637       ltdll_obj=
5638       ltdll_cmds=
5639     fi
5640
5641     # Extract the symbol export list from an `--export-all' def file,
5642     # then regenerate the def file from the symbol export list, so that
5643     # the compiled dll only exports the symbol export list.
5644     # Be careful not to strip the DATA tag left be newer dlltools.
5645     export_symbols_cmds="$ltdll_cmds"'
5646       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5647       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5648
5649     # If the export-symbols file already is a .def file (1st line
5650     # is EXPORTS), use it as is.
5651     # If DATA tags from a recent dlltool are present, honour them!
5652     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5653         cp $export_symbols $output_objdir/$soname-def;
5654       else
5655         echo EXPORTS > $output_objdir/$soname-def;
5656         _lt_hint=1;
5657         cat $export_symbols | while read symbol; do
5658          set dummy \$symbol;
5659          case \$# in
5660            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5661            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5662            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5663          esac;
5664          _lt_hint=`expr 1 + \$_lt_hint`;
5665         done;
5666       fi~
5667       '"$ltdll_cmds"'
5668       $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~
5669       $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~
5670       $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~
5671       $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~
5672       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5673     ;;
5674
5675   netbsd*)
5676     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5677       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5678       wlarc=
5679     else
5680       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5681       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5682     fi
5683     ;;
5684
5685   solaris* | sysv5*)
5686     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5687       ld_shlibs=no
5688       cat <<EOF 1>&2
5689
5690 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5691 *** create shared libraries on Solaris systems.  Therefore, libtool
5692 *** is disabling shared libraries support.  We urge you to upgrade GNU
5693 *** binutils to release 2.9.1 or newer.  Another option is to modify
5694 *** your PATH or compiler configuration so that the native linker is
5695 *** used, and then restart.
5696
5697 EOF
5698     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5699       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5700       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5701     else
5702       ld_shlibs=no
5703     fi
5704     ;;
5705
5706   sunos4*)
5707     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5708     wlarc=
5709     hardcode_direct=yes
5710     hardcode_shlibpath_var=no
5711     ;;
5712
5713   *)
5714     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5715       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5716       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5717     else
5718       ld_shlibs=no
5719     fi
5720     ;;
5721   esac
5722
5723   if test "$ld_shlibs" = yes; then
5724     runpath_var=LD_RUN_PATH
5725     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5726     export_dynamic_flag_spec='${wl}--export-dynamic'
5727     case $host_os in
5728     cygwin* | mingw* | pw32*)
5729       # dlltool doesn't understand --whole-archive et. al.
5730       whole_archive_flag_spec=
5731       ;;
5732     *)
5733       # ancient GNU ld didn't support --whole-archive et. al.
5734       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5735         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5736       else
5737         whole_archive_flag_spec=
5738       fi
5739       ;;
5740     esac
5741   fi
5742 else
5743   # PORTME fill in a description of your system's linker (not GNU ld)
5744   case $host_os in
5745   aix3*)
5746     allow_undefined_flag=unsupported
5747     always_export_symbols=yes
5748     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'
5749     # Note: this linker hardcodes the directories in LIBPATH if there
5750     # are no directories specified by -L.
5751     hardcode_minus_L=yes
5752     if test "$GCC" = yes && test -z "$link_static_flag"; then
5753       # Neither direct hardcoding nor static linking is supported with a
5754       # broken collect2.
5755       hardcode_direct=unsupported
5756     fi
5757     ;;
5758
5759   aix4* | aix5*)
5760     if test "$host_cpu" = ia64; then
5761       # On IA64, the linker does run time linking by default, so we don't
5762       # have to do anything special.
5763       aix_use_runtimelinking=no
5764       exp_sym_flag='-Bexport'
5765       no_entry_flag=""
5766     else
5767       aix_use_runtimelinking=no
5768
5769       # Test if we are trying to use run time linking or normal
5770       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5771       # need to do runtime linking.
5772       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5773         for ld_flag in $LDFLAGS; do
5774           case $ld_flag in
5775           *-brtl*)
5776             aix_use_runtimelinking=yes
5777             break
5778           ;;
5779           esac
5780         done
5781       esac
5782
5783       exp_sym_flag='-bexport'
5784       no_entry_flag='-bnoentry'
5785     fi
5786
5787     # When large executables or shared objects are built, AIX ld can
5788     # have problems creating the table of contents.  If linking a library
5789     # or program results in "error TOC overflow" add -mminimal-toc to
5790     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5791     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5792
5793     hardcode_direct=yes
5794     archive_cmds=''
5795     hardcode_libdir_separator=':'
5796     if test "$GCC" = yes; then
5797       case $host_os in aix4.[012]|aix4.[012].*)
5798         collect2name=`${CC} -print-prog-name=collect2`
5799         if test -f "$collect2name" && \
5800           strings "$collect2name" | grep resolve_lib_name >/dev/null
5801         then
5802           # We have reworked collect2
5803           hardcode_direct=yes
5804         else
5805           # We have old collect2
5806           hardcode_direct=unsupported
5807           # It fails to find uninstalled libraries when the uninstalled
5808           # path is not listed in the libpath.  Setting hardcode_minus_L
5809           # to unsupported forces relinking
5810           hardcode_minus_L=yes
5811           hardcode_libdir_flag_spec='-L$libdir'
5812           hardcode_libdir_separator=
5813         fi
5814       esac
5815
5816       shared_flag='-shared'
5817     else
5818       # not using gcc
5819       if test "$host_cpu" = ia64; then
5820         shared_flag='${wl}-G'
5821       else
5822         if test "$aix_use_runtimelinking" = yes; then
5823           shared_flag='${wl}-G'
5824         else
5825           shared_flag='${wl}-bM:SRE'
5826         fi
5827       fi
5828     fi
5829
5830     # It seems that -bexpall can do strange things, so it is better to
5831     # generate a list of symbols to export.
5832     always_export_symbols=yes
5833     if test "$aix_use_runtimelinking" = yes; then
5834       # Warning - without using the other runtime loading flags (-brtl),
5835       # -berok will link without error, but may produce a broken library.
5836       allow_undefined_flag='-berok'
5837       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5838       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"
5839     else
5840       if test "$host_cpu" = ia64; then
5841         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5842         allow_undefined_flag="-z nodefs"
5843         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"
5844       else
5845         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5846         # Warning - without using the other run time loading flags,
5847         # -berok will link without error, but may produce a broken library.
5848         allow_undefined_flag='${wl}-berok'
5849         # This is a bit strange, but is similar to how AIX traditionally builds
5850         # it's shared libraries.
5851         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'
5852       fi
5853     fi
5854     ;;
5855
5856   amigaos*)
5857     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)'
5858     hardcode_libdir_flag_spec='-L$libdir'
5859     hardcode_minus_L=yes
5860     # see comment about different semantics on the GNU ld section
5861     ld_shlibs=no
5862     ;;
5863
5864   cygwin* | mingw* | pw32*)
5865     # When not using gcc, we currently assume that we are using
5866     # Microsoft Visual C++.
5867     # hardcode_libdir_flag_spec is actually meaningless, as there is
5868     # no search path for DLLs.
5869     hardcode_libdir_flag_spec=' '
5870     allow_undefined_flag=unsupported
5871     # Tell ltmain to make .lib files, not .a files.
5872     libext=lib
5873     # FIXME: Setting linknames here is a bad hack.
5874     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5875     # The linker will automatically build a .lib file if we build a DLL.
5876     old_archive_from_new_cmds='true'
5877     # FIXME: Should let the user specify the lib program.
5878     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5879     fix_srcfile_path='`cygpath -w "$srcfile"`'
5880     ;;
5881
5882   darwin* | rhapsody*)
5883     case "$host_os" in
5884     rhapsody* | darwin1.[012])
5885       allow_undefined_flag='-undefined suppress'
5886       ;;
5887     *) # Darwin 1.3 on
5888       allow_undefined_flag='-flat_namespace -undefined suppress'
5889       ;;
5890     esac
5891     # FIXME: Relying on posixy $() will cause problems for
5892     #        cross-compilation, but unfortunately the echo tests do not
5893     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5894     #        `"' quotes if we put them in here... so don't!
5895     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)'
5896     # We need to add '_' to the symbols in $export_symbols first
5897     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5898     hardcode_direct=yes
5899     hardcode_shlibpath_var=no
5900     whole_archive_flag_spec='-all_load $convenience'
5901     ;;
5902
5903   freebsd1*)
5904     ld_shlibs=no
5905     ;;
5906
5907   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5908   # support.  Future versions do this automatically, but an explicit c++rt0.o
5909   # does not break anything, and helps significantly (at the cost of a little
5910   # extra space).
5911   freebsd2.2*)
5912     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5913     hardcode_libdir_flag_spec='-R$libdir'
5914     hardcode_direct=yes
5915     hardcode_shlibpath_var=no
5916     ;;
5917
5918   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5919   freebsd2*)
5920     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5921     hardcode_direct=yes
5922     hardcode_minus_L=yes
5923     hardcode_shlibpath_var=no
5924     ;;
5925
5926   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5927   freebsd*)
5928     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5929     hardcode_libdir_flag_spec='-R$libdir'
5930     hardcode_direct=yes
5931     hardcode_shlibpath_var=no
5932     ;;
5933
5934   hpux9* | hpux10* | hpux11*)
5935     case $host_os in
5936     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' ;;
5937     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5938     esac
5939     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5940     hardcode_libdir_separator=:
5941     hardcode_direct=yes
5942     hardcode_minus_L=yes # Not in the search PATH, but as the default
5943                          # location of the library.
5944     export_dynamic_flag_spec='${wl}-E'
5945     ;;
5946
5947   irix5* | irix6* | nonstopux*)
5948     if test "$GCC" = yes; then
5949       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'
5950       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5951     else
5952       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'
5953       hardcode_libdir_flag_spec='-rpath $libdir'
5954     fi
5955     hardcode_libdir_separator=:
5956     link_all_deplibs=yes
5957     ;;
5958
5959   netbsd*)
5960     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5961       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5962     else
5963       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5964     fi
5965     hardcode_libdir_flag_spec='-R$libdir'
5966     hardcode_direct=yes
5967     hardcode_shlibpath_var=no
5968     ;;
5969
5970   newsos6)
5971     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5972     hardcode_direct=yes
5973     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5974     hardcode_libdir_separator=:
5975     hardcode_shlibpath_var=no
5976     ;;
5977
5978   openbsd*)
5979     hardcode_direct=yes
5980     hardcode_shlibpath_var=no
5981     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5982       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5983       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5984       export_dynamic_flag_spec='${wl}-E'
5985     else
5986       case "$host_os" in
5987       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5988         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5989         hardcode_libdir_flag_spec='-R$libdir'
5990         ;;
5991       *)
5992         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5993         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5994         ;;
5995       esac
5996     fi
5997     ;;
5998
5999   os2*)
6000     hardcode_libdir_flag_spec='-L$libdir'
6001     hardcode_minus_L=yes
6002     allow_undefined_flag=unsupported
6003     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'
6004     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6005     ;;
6006
6007   osf3*)
6008     if test "$GCC" = yes; then
6009       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6010       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'
6011     else
6012       allow_undefined_flag=' -expect_unresolved \*'
6013       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'
6014     fi
6015     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6016     hardcode_libdir_separator=:
6017     ;;
6018
6019   osf4* | osf5*)        # as osf3* with the addition of -msym flag
6020     if test "$GCC" = yes; then
6021       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
6022       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'
6023       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
6024     else
6025       allow_undefined_flag=' -expect_unresolved \*'
6026       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'
6027       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6028       $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'
6029
6030       #Both c and cxx compiler support -rpath directly
6031       hardcode_libdir_flag_spec='-rpath $libdir'
6032     fi
6033     hardcode_libdir_separator=:
6034     ;;
6035
6036   sco3.2v5*)
6037     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6038     hardcode_shlibpath_var=no
6039     runpath_var=LD_RUN_PATH
6040     hardcode_runpath_var=yes
6041     export_dynamic_flag_spec='${wl}-Bexport'
6042     ;;
6043
6044   solaris*)
6045     # gcc --version < 3.0 without binutils cannot create self contained
6046     # shared libraries reliably, requiring libgcc.a to resolve some of
6047     # the object symbols generated in some cases.  Libraries that use
6048     # assert need libgcc.a to resolve __eprintf, for example.  Linking
6049     # a copy of libgcc.a into every shared library to guarantee resolving
6050     # such symbols causes other problems:  According to Tim Van Holder
6051     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
6052     # (to the application) exception stack for one thing.
6053     no_undefined_flag=' -z defs'
6054     if test "$GCC" = yes; then
6055       case `$CC --version 2>/dev/null` in
6056       [12].*)
6057         cat <<EOF 1>&2
6058
6059 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6060 *** create self contained shared libraries on Solaris systems, without
6061 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6062 *** -no-undefined support, which will at least allow you to build shared
6063 *** libraries.  However, you may find that when you link such libraries
6064 *** into an application without using GCC, you have to manually add
6065 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6066 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6067 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6068
6069 EOF
6070         no_undefined_flag=
6071         ;;
6072       esac
6073     fi
6074     # $CC -shared without GNU ld will not create a library from C++
6075     # object files and a static libstdc++, better avoid it by now
6076     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6077     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6078                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6079     hardcode_libdir_flag_spec='-R$libdir'
6080     hardcode_shlibpath_var=no
6081     case $host_os in
6082     solaris2.[0-5] | solaris2.[0-5].*) ;;
6083     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6084       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6085     esac
6086     link_all_deplibs=yes
6087     ;;
6088
6089   sunos4*)
6090     if test "x$host_vendor" = xsequent; then
6091       # Use $CC to link under sequent, because it throws in some extra .o
6092       # files that make .init and .fini sections work.
6093       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6094     else
6095       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6096     fi
6097     hardcode_libdir_flag_spec='-L$libdir'
6098     hardcode_direct=yes
6099     hardcode_minus_L=yes
6100     hardcode_shlibpath_var=no
6101     ;;
6102
6103   sysv4)
6104     case $host_vendor in
6105       sni)
6106         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6107         hardcode_direct=yes # is this really true???
6108         ;;
6109       siemens)
6110         ## LD is ld it makes a PLAMLIB
6111         ## CC just makes a GrossModule.
6112         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6113         reload_cmds='$CC -r -o $output$reload_objs'
6114         hardcode_direct=no
6115         ;;
6116       motorola)
6117         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6118         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6119         ;;
6120     esac
6121     runpath_var='LD_RUN_PATH'
6122     hardcode_shlibpath_var=no
6123     ;;
6124
6125   sysv4.3*)
6126     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6127     hardcode_shlibpath_var=no
6128     export_dynamic_flag_spec='-Bexport'
6129     ;;
6130
6131   sysv5*)
6132     no_undefined_flag=' -z text'
6133     # $CC -shared without GNU ld will not create a library from C++
6134     # object files and a static libstdc++, better avoid it by now
6135     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6136     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6137                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6138     hardcode_libdir_flag_spec=
6139     hardcode_shlibpath_var=no
6140     runpath_var='LD_RUN_PATH'
6141     ;;
6142
6143   uts4*)
6144     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6145     hardcode_libdir_flag_spec='-L$libdir'
6146     hardcode_shlibpath_var=no
6147     ;;
6148
6149   dgux*)
6150     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6151     hardcode_libdir_flag_spec='-L$libdir'
6152     hardcode_shlibpath_var=no
6153     ;;
6154
6155   sysv4*MP*)
6156     if test -d /usr/nec; then
6157       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6158       hardcode_shlibpath_var=no
6159       runpath_var=LD_RUN_PATH
6160       hardcode_runpath_var=yes
6161       ld_shlibs=yes
6162     fi
6163     ;;
6164
6165   sysv4.2uw2*)
6166     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6167     hardcode_direct=yes
6168     hardcode_minus_L=no
6169     hardcode_shlibpath_var=no
6170     hardcode_runpath_var=yes
6171     runpath_var=LD_RUN_PATH
6172     ;;
6173
6174   sysv5uw7* | unixware7*)
6175     no_undefined_flag='${wl}-z ${wl}text'
6176     if test "$GCC" = yes; then
6177       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6178     else
6179       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6180     fi
6181     runpath_var='LD_RUN_PATH'
6182     hardcode_shlibpath_var=no
6183     ;;
6184
6185   *)
6186     ld_shlibs=no
6187     ;;
6188   esac
6189 fi
6190 echo "$ac_t""$ld_shlibs" 1>&6
6191 test "$ld_shlibs" = no && can_build_shared=no
6192 ##
6193 ## END FIXME
6194
6195 ## FIXME: this should be a separate macro
6196 ##
6197 # Check hardcoding attributes.
6198 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6199 echo "configure:6200: checking how to hardcode library paths into programs" >&5
6200 hardcode_action=
6201 if test -n "$hardcode_libdir_flag_spec" || \
6202    test -n "$runpath_var"; then
6203
6204   # We can hardcode non-existant directories.
6205   if test "$hardcode_direct" != no &&
6206      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6207      # have to relink, otherwise we might link with an installed library
6208      # when we should be linking with a yet-to-be-installed one
6209      ## test "$hardcode_shlibpath_var" != no &&
6210      test "$hardcode_minus_L" != no; then
6211     # Linking always hardcodes the temporary library directory.
6212     hardcode_action=relink
6213   else
6214     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6215     hardcode_action=immediate
6216   fi
6217 else
6218   # We cannot hardcode anything, or else we can only hardcode existing
6219   # directories.
6220   hardcode_action=unsupported
6221 fi
6222 echo "$ac_t""$hardcode_action" 1>&6
6223 ##
6224 ## END FIXME
6225
6226 ## FIXME: this should be a separate macro
6227 ##
6228 striplib=
6229 old_striplib=
6230 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6231 echo "configure:6232: checking whether stripping libraries is possible" >&5
6232 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6233   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6234   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6235   echo "$ac_t""yes" 1>&6
6236 else
6237   echo "$ac_t""no" 1>&6
6238 fi
6239 ##
6240 ## END FIXME
6241
6242 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6243 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6244
6245 ## FIXME: this should be a separate macro
6246 ##
6247 # PORTME Fill in your ld.so characteristics
6248 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6249 echo "configure:6250: checking dynamic linker characteristics" >&5
6250 library_names_spec=
6251 libname_spec='lib$name'
6252 soname_spec=
6253 postinstall_cmds=
6254 postuninstall_cmds=
6255 finish_cmds=
6256 finish_eval=
6257 shlibpath_var=
6258 shlibpath_overrides_runpath=unknown
6259 version_type=none
6260 dynamic_linker="$host_os ld.so"
6261 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6262 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6263
6264 case $host_os in
6265 aix3*)
6266   version_type=linux
6267   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6268   shlibpath_var=LIBPATH
6269
6270   # AIX has no versioning support, so we append a major version to the name.
6271   soname_spec='${libname}${release}.so$major'
6272   ;;
6273
6274 aix4* | aix5*)
6275   version_type=linux
6276   need_lib_prefix=no
6277   need_version=no
6278   hardcode_into_libs=yes
6279   if test "$host_cpu" = ia64; then
6280     # AIX 5 supports IA64
6281     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6282     shlibpath_var=LD_LIBRARY_PATH
6283   else
6284     # With GCC up to 2.95.x, collect2 would create an import file
6285     # for dependence libraries.  The import file would start with
6286     # the line `#! .'.  This would cause the generated library to
6287     # depend on `.', always an invalid library.  This was fixed in
6288     # development snapshots of GCC prior to 3.0.
6289     case $host_os in
6290       aix4 | aix4.[01] | aix4.[01].*)
6291         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6292              echo ' yes '
6293              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6294           :
6295         else
6296           can_build_shared=no
6297         fi
6298         ;;
6299     esac
6300     # AIX (on Power*) has no versioning support, so currently we can
6301     # not hardcode correct soname into executable. Probably we can
6302     # add versioning support to collect2, so additional links can
6303     # be useful in future.
6304     if test "$aix_use_runtimelinking" = yes; then
6305       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6306       # instead of lib<name>.a to let people know that these are not
6307       # typical AIX shared libraries.
6308       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6309     else
6310       # We preserve .a as extension for shared libraries through AIX4.2
6311       # and later when we are not doing run time linking.
6312       library_names_spec='${libname}${release}.a $libname.a'
6313       soname_spec='${libname}${release}.so$major'
6314     fi
6315     shlibpath_var=LIBPATH
6316   fi
6317   hardcode_into_libs=yes
6318   ;;
6319
6320 amigaos*)
6321   library_names_spec='$libname.ixlibrary $libname.a'
6322   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6323   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'
6324   ;;
6325
6326 beos*)
6327   library_names_spec='${libname}.so'
6328   dynamic_linker="$host_os ld.so"
6329   shlibpath_var=LIBRARY_PATH
6330   ;;
6331
6332 bsdi4*)
6333   version_type=linux
6334   need_version=no
6335   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6336   soname_spec='${libname}${release}.so$major'
6337   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6338   shlibpath_var=LD_LIBRARY_PATH
6339   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6340   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6341   export_dynamic_flag_spec=-rdynamic
6342   # the default ld.so.conf also contains /usr/contrib/lib and
6343   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6344   # libtool to hard-code these into programs
6345   ;;
6346
6347 cygwin* | mingw* | pw32*)
6348   version_type=windows
6349   need_version=no
6350   need_lib_prefix=no
6351   case $GCC,$host_os in
6352   yes,cygwin*)
6353     library_names_spec='$libname.dll.a'
6354     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6355     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6356       dldir=$destdir/`dirname \$dlpath`~
6357       test -d \$dldir || mkdir -p \$dldir~
6358       $install_prog .libs/$dlname \$dldir/$dlname'
6359     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6360       dlpath=$dir/\$dldll~
6361        $rm \$dlpath'
6362     ;;
6363   yes,mingw*)
6364     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6365     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6366     ;;
6367   yes,pw32*)
6368     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6369     ;;
6370   *)
6371     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6372     ;;
6373   esac
6374   dynamic_linker='Win32 ld.exe'
6375   # FIXME: first we should search . and the directory the executable is in
6376   shlibpath_var=PATH
6377   ;;
6378
6379 darwin* | rhapsody*)
6380   dynamic_linker="$host_os dyld"
6381   version_type=darwin
6382   need_lib_prefix=no
6383   need_version=no
6384   # FIXME: Relying on posixy $() will cause problems for
6385   #        cross-compilation, but unfortunately the echo tests do not
6386   #        yet detect zsh echo's removal of \ escapes.
6387   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)'
6388   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6389   shlibpath_overrides_runpath=yes
6390   shlibpath_var=DYLD_LIBRARY_PATH
6391   ;;
6392
6393 freebsd1*)
6394   dynamic_linker=no
6395   ;;
6396
6397 freebsd*)
6398   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6399   version_type=freebsd-$objformat
6400   case $version_type in
6401     freebsd-elf*)
6402       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6403       need_version=no
6404       need_lib_prefix=no
6405       ;;
6406     freebsd-*)
6407       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6408       need_version=yes
6409       ;;
6410   esac
6411   shlibpath_var=LD_LIBRARY_PATH
6412   case $host_os in
6413   freebsd2*)
6414     shlibpath_overrides_runpath=yes
6415     ;;
6416   *)
6417     shlibpath_overrides_runpath=no
6418     hardcode_into_libs=yes
6419     ;;
6420   esac
6421   ;;
6422
6423 gnu*)
6424   version_type=linux
6425   need_lib_prefix=no
6426   need_version=no
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6428   soname_spec='${libname}${release}.so$major'
6429   shlibpath_var=LD_LIBRARY_PATH
6430   hardcode_into_libs=yes
6431   ;;
6432
6433 hpux9* | hpux10* | hpux11*)
6434   # Give a soname corresponding to the major version so that dld.sl refuses to
6435   # link against other versions.
6436   dynamic_linker="$host_os dld.sl"
6437   version_type=sunos
6438   need_lib_prefix=no
6439   need_version=no
6440   shlibpath_var=SHLIB_PATH
6441   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6442   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6443   soname_spec='${libname}${release}.sl$major'
6444   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6445   postinstall_cmds='chmod 555 $lib'
6446   ;;
6447
6448 irix5* | irix6* | nonstopux*)
6449   case $host_os in
6450     nonstopux*) version_type=nonstopux ;;
6451     *)          version_type=irix ;;
6452   esac
6453   need_lib_prefix=no
6454   need_version=no
6455   soname_spec='${libname}${release}.so$major'
6456   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6457   case $host_os in
6458   irix5* | nonstopux*)
6459     libsuff= shlibsuff=
6460     ;;
6461   *)
6462     case $LD in # libtool.m4 will add one of these switches to LD
6463     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6464     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6465     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6466     *) libsuff= shlibsuff= libmagic=never-match;;
6467     esac
6468     ;;
6469   esac
6470   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6471   shlibpath_overrides_runpath=no
6472   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6473   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6474   ;;
6475
6476 # No shared lib support for Linux oldld, aout, or coff.
6477 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6478   dynamic_linker=no
6479   ;;
6480
6481 # This must be Linux ELF.
6482 linux-gnu*)
6483   version_type=linux
6484   need_lib_prefix=no
6485   need_version=no
6486   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6487   soname_spec='${libname}${release}.so$major'
6488   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6489   shlibpath_var=LD_LIBRARY_PATH
6490   shlibpath_overrides_runpath=no
6491   # This implies no fast_install, which is unacceptable.
6492   # Some rework will be needed to allow for fast_install
6493   # before this can be enabled.
6494   hardcode_into_libs=yes
6495
6496   # We used to test for /lib/ld.so.1 and disable shared libraries on
6497   # powerpc, because MkLinux only supported shared libraries with the
6498   # GNU dynamic linker.  Since this was broken with cross compilers,
6499   # most powerpc-linux boxes support dynamic linking these days and
6500   # people can always --disable-shared, the test was removed, and we
6501   # assume the GNU/Linux dynamic linker is in use.
6502   dynamic_linker='GNU/Linux ld.so'
6503   ;;
6504
6505 netbsd*)
6506   version_type=sunos
6507   need_lib_prefix=no
6508   need_version=no
6509   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6510     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6511     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6512     dynamic_linker='NetBSD (a.out) ld.so'
6513   else
6514     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6515     soname_spec='${libname}${release}.so$major'
6516     dynamic_linker='NetBSD ld.elf_so'
6517   fi
6518   shlibpath_var=LD_LIBRARY_PATH
6519   shlibpath_overrides_runpath=yes
6520   hardcode_into_libs=yes
6521   ;;
6522
6523 newsos6)
6524   version_type=linux
6525   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6526   shlibpath_var=LD_LIBRARY_PATH
6527   shlibpath_overrides_runpath=yes
6528   ;;
6529
6530 openbsd*)
6531   version_type=sunos
6532   need_lib_prefix=no
6533   need_version=no
6534   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6535     case "$host_os" in
6536     openbsd2.[89] | openbsd2.[89].*)
6537       shlibpath_overrides_runpath=no
6538       ;;
6539     *)
6540       shlibpath_overrides_runpath=yes
6541       ;;
6542     esac
6543   else
6544     shlibpath_overrides_runpath=yes
6545   fi
6546   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6547   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6548   shlibpath_var=LD_LIBRARY_PATH
6549   ;;
6550
6551 os2*)
6552   libname_spec='$name'
6553   need_lib_prefix=no
6554   library_names_spec='$libname.dll $libname.a'
6555   dynamic_linker='OS/2 ld.exe'
6556   shlibpath_var=LIBPATH
6557   ;;
6558
6559 osf3* | osf4* | osf5*)
6560   version_type=osf
6561   need_version=no
6562   soname_spec='${libname}${release}.so$major'
6563   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6564   shlibpath_var=LD_LIBRARY_PATH
6565   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6566   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6567   hardcode_into_libs=yes
6568   ;;
6569
6570 sco3.2v5*)
6571   version_type=osf
6572   soname_spec='${libname}${release}.so$major'
6573   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6574   shlibpath_var=LD_LIBRARY_PATH
6575   ;;
6576
6577 solaris*)
6578   version_type=linux
6579   need_lib_prefix=no
6580   need_version=no
6581   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6582   soname_spec='${libname}${release}.so$major'
6583   shlibpath_var=LD_LIBRARY_PATH
6584   shlibpath_overrides_runpath=yes
6585   hardcode_into_libs=yes
6586   # ldd complains unless libraries are executable
6587   postinstall_cmds='chmod +x $lib'
6588   ;;
6589
6590 sunos4*)
6591   version_type=sunos
6592   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6593   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6594   shlibpath_var=LD_LIBRARY_PATH
6595   shlibpath_overrides_runpath=yes
6596   if test "$with_gnu_ld" = yes; then
6597     need_lib_prefix=no
6598   fi
6599   need_version=yes
6600   ;;
6601
6602 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6603   version_type=linux
6604   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6605   soname_spec='${libname}${release}.so$major'
6606   shlibpath_var=LD_LIBRARY_PATH
6607   case $host_vendor in
6608     sni)
6609       shlibpath_overrides_runpath=no
6610       need_lib_prefix=no
6611       export_dynamic_flag_spec='${wl}-Blargedynsym'
6612       runpath_var=LD_RUN_PATH
6613       ;;
6614     siemens)
6615       need_lib_prefix=no
6616       ;;
6617     motorola)
6618       need_lib_prefix=no
6619       need_version=no
6620       shlibpath_overrides_runpath=no
6621       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6622       ;;
6623   esac
6624   ;;
6625
6626 uts4*)
6627   version_type=linux
6628   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6629   soname_spec='${libname}${release}.so$major'
6630   shlibpath_var=LD_LIBRARY_PATH
6631   ;;
6632
6633 dgux*)
6634   version_type=linux
6635   need_lib_prefix=no
6636   need_version=no
6637   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6638   soname_spec='${libname}${release}.so$major'
6639   shlibpath_var=LD_LIBRARY_PATH
6640   ;;
6641
6642 sysv4*MP*)
6643   if test -d /usr/nec ;then
6644     version_type=linux
6645     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6646     soname_spec='$libname.so.$major'
6647     shlibpath_var=LD_LIBRARY_PATH
6648   fi
6649   ;;
6650
6651 *)
6652   dynamic_linker=no
6653   ;;
6654 esac
6655 echo "$ac_t""$dynamic_linker" 1>&6
6656 test "$dynamic_linker" = no && can_build_shared=no
6657 ##
6658 ## END FIXME
6659
6660 ## FIXME: this should be a separate macro
6661 ##
6662 # Report the final consequences.
6663 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6664 echo "configure:6665: checking if libtool supports shared libraries" >&5
6665 echo "$ac_t""$can_build_shared" 1>&6
6666 ##
6667 ## END FIXME
6668
6669 ## FIXME: this should be a separate macro
6670 ##
6671 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6672 echo "configure:6673: checking whether to build shared libraries" >&5
6673 test "$can_build_shared" = "no" && enable_shared=no
6674
6675 # On AIX, shared libraries and static libraries use the same namespace, and
6676 # are all built from PIC.
6677 case "$host_os" in
6678 aix3*)
6679   test "$enable_shared" = yes && enable_static=no
6680   if test -n "$RANLIB"; then
6681     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6682     postinstall_cmds='$RANLIB $lib'
6683   fi
6684   ;;
6685
6686 aix4*)
6687   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6688     test "$enable_shared" = yes && enable_static=no
6689   fi
6690   ;;
6691 esac
6692 echo "$ac_t""$enable_shared" 1>&6
6693 ##
6694 ## END FIXME
6695
6696 ## FIXME: this should be a separate macro
6697 ##
6698 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6699 echo "configure:6700: checking whether to build static libraries" >&5
6700 # Make sure either enable_shared or enable_static is yes.
6701 test "$enable_shared" = yes || enable_static=yes
6702 echo "$ac_t""$enable_static" 1>&6
6703 ##
6704 ## END FIXME
6705
6706 if test "$hardcode_action" = relink; then
6707   # Fast installation is not supported
6708   enable_fast_install=no
6709 elif test "$shlibpath_overrides_runpath" = yes ||
6710      test "$enable_shared" = no; then
6711   # Fast installation is not necessary
6712   enable_fast_install=needless
6713 fi
6714
6715 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6716 if test "$GCC" = yes; then
6717   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6718 fi
6719
6720 if test "x$enable_dlopen" != xyes; then
6721   enable_dlopen=unknown
6722   enable_dlopen_self=unknown
6723   enable_dlopen_self_static=unknown
6724 else
6725   lt_cv_dlopen=no
6726   lt_cv_dlopen_libs=
6727
6728   case $host_os in
6729   beos*)
6730     lt_cv_dlopen="load_add_on"
6731     lt_cv_dlopen_libs=
6732     lt_cv_dlopen_self=yes
6733     ;;
6734
6735   cygwin* | mingw* | pw32*)
6736     lt_cv_dlopen="LoadLibrary"
6737     lt_cv_dlopen_libs=
6738    ;;
6739
6740   *)
6741     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6742 echo "configure:6743: checking for shl_load" >&5
6743 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6744   echo $ac_n "(cached) $ac_c" 1>&6
6745 else
6746   cat > conftest.$ac_ext <<EOF
6747 #line 6748 "configure"
6748 #include "confdefs.h"
6749 /* System header to define __stub macros and hopefully few prototypes,
6750     which can conflict with char shl_load(); below.  */
6751 #include <assert.h>
6752 /* Override any gcc2 internal prototype to avoid an error.  */
6753 /* We use char because int might match the return type of a gcc2
6754     builtin and then its argument prototype would still apply.  */
6755 char shl_load();
6756 char (*f)();
6757
6758 int main() {
6759
6760 /* The GNU C library defines this for functions which it implements
6761     to always fail with ENOSYS.  Some functions are actually named
6762     something starting with __ and the normal name is an alias.  */
6763 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6764 choke me
6765 #else
6766 f = shl_load;
6767 #endif
6768
6769 ; return 0; }
6770 EOF
6771 if { (eval echo configure:6772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6772   rm -rf conftest*
6773   eval "ac_cv_func_shl_load=yes"
6774 else
6775   echo "configure: failed program was:" >&5
6776   cat conftest.$ac_ext >&5
6777   rm -rf conftest*
6778   eval "ac_cv_func_shl_load=no"
6779 fi
6780 rm -f conftest*
6781 fi
6782
6783 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6784   echo "$ac_t""yes" 1>&6
6785   lt_cv_dlopen="shl_load"
6786 else
6787   echo "$ac_t""no" 1>&6
6788 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6789 echo "configure:6790: checking for shl_load in -ldld" >&5
6790 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6791 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6792   echo $ac_n "(cached) $ac_c" 1>&6
6793 else
6794   ac_save_LIBS="$LIBS"
6795 LIBS="-ldld  $LIBS"
6796 cat > conftest.$ac_ext <<EOF
6797 #line 6798 "configure"
6798 #include "confdefs.h"
6799 /* Override any gcc2 internal prototype to avoid an error.  */
6800 /* We use char because int might match the return type of a gcc2
6801     builtin and then its argument prototype would still apply.  */
6802 char shl_load();
6803
6804 int main() {
6805 shl_load()
6806 ; return 0; }
6807 EOF
6808 if { (eval echo configure:6809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6809   rm -rf conftest*
6810   eval "ac_cv_lib_$ac_lib_var=yes"
6811 else
6812   echo "configure: failed program was:" >&5
6813   cat conftest.$ac_ext >&5
6814   rm -rf conftest*
6815   eval "ac_cv_lib_$ac_lib_var=no"
6816 fi
6817 rm -f conftest*
6818 LIBS="$ac_save_LIBS"
6819
6820 fi
6821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6822   echo "$ac_t""yes" 1>&6
6823   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6824 else
6825   echo "$ac_t""no" 1>&6
6826 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6827 echo "configure:6828: checking for dlopen" >&5
6828 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6829   echo $ac_n "(cached) $ac_c" 1>&6
6830 else
6831   cat > conftest.$ac_ext <<EOF
6832 #line 6833 "configure"
6833 #include "confdefs.h"
6834 /* System header to define __stub macros and hopefully few prototypes,
6835     which can conflict with char dlopen(); below.  */
6836 #include <assert.h>
6837 /* Override any gcc2 internal prototype to avoid an error.  */
6838 /* We use char because int might match the return type of a gcc2
6839     builtin and then its argument prototype would still apply.  */
6840 char dlopen();
6841 char (*f)();
6842
6843 int main() {
6844
6845 /* The GNU C library defines this for functions which it implements
6846     to always fail with ENOSYS.  Some functions are actually named
6847     something starting with __ and the normal name is an alias.  */
6848 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6849 choke me
6850 #else
6851 f = dlopen;
6852 #endif
6853
6854 ; return 0; }
6855 EOF
6856 if { (eval echo configure:6857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6857   rm -rf conftest*
6858   eval "ac_cv_func_dlopen=yes"
6859 else
6860   echo "configure: failed program was:" >&5
6861   cat conftest.$ac_ext >&5
6862   rm -rf conftest*
6863   eval "ac_cv_func_dlopen=no"
6864 fi
6865 rm -f conftest*
6866 fi
6867
6868 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6869   echo "$ac_t""yes" 1>&6
6870   lt_cv_dlopen="dlopen"
6871 else
6872   echo "$ac_t""no" 1>&6
6873 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6874 echo "configure:6875: checking for dlopen in -ldl" >&5
6875 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6876 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6877   echo $ac_n "(cached) $ac_c" 1>&6
6878 else
6879   ac_save_LIBS="$LIBS"
6880 LIBS="-ldl  $LIBS"
6881 cat > conftest.$ac_ext <<EOF
6882 #line 6883 "configure"
6883 #include "confdefs.h"
6884 /* Override any gcc2 internal prototype to avoid an error.  */
6885 /* We use char because int might match the return type of a gcc2
6886     builtin and then its argument prototype would still apply.  */
6887 char dlopen();
6888
6889 int main() {
6890 dlopen()
6891 ; return 0; }
6892 EOF
6893 if { (eval echo configure:6894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6894   rm -rf conftest*
6895   eval "ac_cv_lib_$ac_lib_var=yes"
6896 else
6897   echo "configure: failed program was:" >&5
6898   cat conftest.$ac_ext >&5
6899   rm -rf conftest*
6900   eval "ac_cv_lib_$ac_lib_var=no"
6901 fi
6902 rm -f conftest*
6903 LIBS="$ac_save_LIBS"
6904
6905 fi
6906 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6907   echo "$ac_t""yes" 1>&6
6908   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6909 else
6910   echo "$ac_t""no" 1>&6
6911 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6912 echo "configure:6913: checking for dlopen in -lsvld" >&5
6913 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6914 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6915   echo $ac_n "(cached) $ac_c" 1>&6
6916 else
6917   ac_save_LIBS="$LIBS"
6918 LIBS="-lsvld  $LIBS"
6919 cat > conftest.$ac_ext <<EOF
6920 #line 6921 "configure"
6921 #include "confdefs.h"
6922 /* Override any gcc2 internal prototype to avoid an error.  */
6923 /* We use char because int might match the return type of a gcc2
6924     builtin and then its argument prototype would still apply.  */
6925 char dlopen();
6926
6927 int main() {
6928 dlopen()
6929 ; return 0; }
6930 EOF
6931 if { (eval echo configure:6932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6932   rm -rf conftest*
6933   eval "ac_cv_lib_$ac_lib_var=yes"
6934 else
6935   echo "configure: failed program was:" >&5
6936   cat conftest.$ac_ext >&5
6937   rm -rf conftest*
6938   eval "ac_cv_lib_$ac_lib_var=no"
6939 fi
6940 rm -f conftest*
6941 LIBS="$ac_save_LIBS"
6942
6943 fi
6944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6945   echo "$ac_t""yes" 1>&6
6946   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6947 else
6948   echo "$ac_t""no" 1>&6
6949 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6950 echo "configure:6951: checking for dld_link in -ldld" >&5
6951 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6952 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6953   echo $ac_n "(cached) $ac_c" 1>&6
6954 else
6955   ac_save_LIBS="$LIBS"
6956 LIBS="-ldld  $LIBS"
6957 cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960 /* Override any gcc2 internal prototype to avoid an error.  */
6961 /* We use char because int might match the return type of a gcc2
6962     builtin and then its argument prototype would still apply.  */
6963 char dld_link();
6964
6965 int main() {
6966 dld_link()
6967 ; return 0; }
6968 EOF
6969 if { (eval echo configure:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6970   rm -rf conftest*
6971   eval "ac_cv_lib_$ac_lib_var=yes"
6972 else
6973   echo "configure: failed program was:" >&5
6974   cat conftest.$ac_ext >&5
6975   rm -rf conftest*
6976   eval "ac_cv_lib_$ac_lib_var=no"
6977 fi
6978 rm -f conftest*
6979 LIBS="$ac_save_LIBS"
6980
6981 fi
6982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6983   echo "$ac_t""yes" 1>&6
6984   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6985 else
6986   echo "$ac_t""no" 1>&6
6987 fi
6988
6989               
6990 fi
6991
6992             
6993 fi
6994
6995           
6996 fi
6997
6998         
6999 fi
7000
7001       
7002 fi
7003
7004     ;;
7005   esac
7006
7007   if test "x$lt_cv_dlopen" != xno; then
7008     enable_dlopen=yes
7009   else
7010     enable_dlopen=no
7011   fi
7012
7013   case $lt_cv_dlopen in
7014   dlopen)
7015     save_CPPFLAGS="$CPPFLAGS"
7016         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
7017
7018     save_LDFLAGS="$LDFLAGS"
7019     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
7020
7021     save_LIBS="$LIBS"
7022     LIBS="$lt_cv_dlopen_libs $LIBS"
7023
7024     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
7025 echo "configure:7026: checking whether a program can dlopen itself" >&5
7026 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
7027   echo $ac_n "(cached) $ac_c" 1>&6
7028 else
7029           if test "$cross_compiling" = yes; then :
7030   lt_cv_dlopen_self=cross
7031 else
7032     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7033   lt_status=$lt_dlunknown
7034   cat > conftest.$ac_ext <<EOF
7035 #line 7036 "configure"
7036 #include "confdefs.h"
7037
7038 #if HAVE_DLFCN_H
7039 #include <dlfcn.h>
7040 #endif
7041
7042 #include <stdio.h>
7043
7044 #ifdef RTLD_GLOBAL
7045 #  define LT_DLGLOBAL           RTLD_GLOBAL
7046 #else
7047 #  ifdef DL_GLOBAL
7048 #    define LT_DLGLOBAL         DL_GLOBAL
7049 #  else
7050 #    define LT_DLGLOBAL         0
7051 #  endif
7052 #endif
7053
7054 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7055    find out it does not work in some platform. */
7056 #ifndef LT_DLLAZY_OR_NOW
7057 #  ifdef RTLD_LAZY
7058 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7059 #  else
7060 #    ifdef DL_LAZY
7061 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7062 #    else
7063 #      ifdef RTLD_NOW
7064 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7065 #      else
7066 #        ifdef DL_NOW
7067 #          define LT_DLLAZY_OR_NOW      DL_NOW
7068 #        else
7069 #          define LT_DLLAZY_OR_NOW      0
7070 #        endif
7071 #      endif
7072 #    endif
7073 #  endif
7074 #endif
7075
7076 #ifdef __cplusplus
7077 extern "C" void exit (int);
7078 #endif
7079
7080 void fnord() { int i=42;}
7081 int main ()
7082 {
7083   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7084   int status = $lt_dlunknown;
7085
7086   if (self)
7087     {
7088       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7089       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7090       /* dlclose (self); */
7091     }
7092
7093     exit (status);
7094 }
7095 EOF
7096   if { (eval echo configure:7097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7097     (./conftest; exit; ) 2>/dev/null
7098     lt_status=$?
7099     case x$lt_status in
7100       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7101       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7102       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7103     esac
7104   else :
7105     # compilation failed
7106     lt_cv_dlopen_self=no
7107   fi
7108 fi
7109 rm -fr conftest*
7110
7111     
7112 fi
7113
7114 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7115
7116     if test "x$lt_cv_dlopen_self" = xyes; then
7117       LDFLAGS="$LDFLAGS $link_static_flag"
7118       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7119 echo "configure:7120: checking whether a statically linked program can dlopen itself" >&5
7120 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7121   echo $ac_n "(cached) $ac_c" 1>&6
7122 else
7123           if test "$cross_compiling" = yes; then :
7124   lt_cv_dlopen_self_static=cross
7125 else
7126     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7127   lt_status=$lt_dlunknown
7128   cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131
7132 #if HAVE_DLFCN_H
7133 #include <dlfcn.h>
7134 #endif
7135
7136 #include <stdio.h>
7137
7138 #ifdef RTLD_GLOBAL
7139 #  define LT_DLGLOBAL           RTLD_GLOBAL
7140 #else
7141 #  ifdef DL_GLOBAL
7142 #    define LT_DLGLOBAL         DL_GLOBAL
7143 #  else
7144 #    define LT_DLGLOBAL         0
7145 #  endif
7146 #endif
7147
7148 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7149    find out it does not work in some platform. */
7150 #ifndef LT_DLLAZY_OR_NOW
7151 #  ifdef RTLD_LAZY
7152 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7153 #  else
7154 #    ifdef DL_LAZY
7155 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7156 #    else
7157 #      ifdef RTLD_NOW
7158 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7159 #      else
7160 #        ifdef DL_NOW
7161 #          define LT_DLLAZY_OR_NOW      DL_NOW
7162 #        else
7163 #          define LT_DLLAZY_OR_NOW      0
7164 #        endif
7165 #      endif
7166 #    endif
7167 #  endif
7168 #endif
7169
7170 #ifdef __cplusplus
7171 extern "C" void exit (int);
7172 #endif
7173
7174 void fnord() { int i=42;}
7175 int main ()
7176 {
7177   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7178   int status = $lt_dlunknown;
7179
7180   if (self)
7181     {
7182       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7183       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7184       /* dlclose (self); */
7185     }
7186
7187     exit (status);
7188 }
7189 EOF
7190   if { (eval echo configure:7191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7191     (./conftest; exit; ) 2>/dev/null
7192     lt_status=$?
7193     case x$lt_status in
7194       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7195       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7196       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7197     esac
7198   else :
7199     # compilation failed
7200     lt_cv_dlopen_self_static=no
7201   fi
7202 fi
7203 rm -fr conftest*
7204
7205       
7206 fi
7207
7208 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7209     fi
7210
7211     CPPFLAGS="$save_CPPFLAGS"
7212     LDFLAGS="$save_LDFLAGS"
7213     LIBS="$save_LIBS"
7214     ;;
7215   esac
7216
7217   case $lt_cv_dlopen_self in
7218   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7219   *) enable_dlopen_self=unknown ;;
7220   esac
7221
7222   case $lt_cv_dlopen_self_static in
7223   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7224   *) enable_dlopen_self_static=unknown ;;
7225   esac
7226 fi
7227
7228
7229 ## FIXME: this should be a separate macro
7230 ##
7231 if test "$enable_shared" = yes && test "$GCC" = yes; then
7232   case $archive_cmds in
7233   *'~'*)
7234     # FIXME: we may have to deal with multi-command sequences.
7235     ;;
7236   '$CC '*)
7237     # Test whether the compiler implicitly links with -lc since on some
7238     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7239     # to ld, don't add -lc before -lgcc.
7240     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7241 echo "configure:7242: checking whether -lc should be explicitly linked in" >&5
7242     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7243   echo $ac_n "(cached) $ac_c" 1>&6
7244 else
7245   $rm conftest*
7246     echo 'static int dummy;' > conftest.$ac_ext
7247
7248     if { (eval echo configure:7249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7249       soname=conftest
7250       lib=conftest
7251       libobjs=conftest.$ac_objext
7252       deplibs=
7253       wl=$lt_cv_prog_cc_wl
7254       compiler_flags=-v
7255       linker_flags=-v
7256       verstring=
7257       output_objdir=.
7258       libname=conftest
7259       save_allow_undefined_flag=$allow_undefined_flag
7260       allow_undefined_flag=
7261       if { (eval echo configure:7262: \"$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; }
7262       then
7263         lt_cv_archive_cmds_need_lc=no
7264       else
7265         lt_cv_archive_cmds_need_lc=yes
7266       fi
7267       allow_undefined_flag=$save_allow_undefined_flag
7268     else
7269       cat conftest.err 1>&5
7270     fi
7271 fi
7272
7273     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7274     ;;
7275   esac
7276 fi
7277 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7278 ##
7279 ## END FIXME
7280
7281 ## FIXME: this should be a separate macro
7282 ##
7283 # The second clause should only fire when bootstrapping the
7284 # libtool distribution, otherwise you forgot to ship ltmain.sh
7285 # with your package, and you will get complaints that there are
7286 # no rules to generate ltmain.sh.
7287 if test -f "$ltmain"; then
7288   :
7289 else
7290   # If there is no Makefile yet, we rely on a make rule to execute
7291   # `config.status --recheck' to rerun these tests and create the
7292   # libtool script then.
7293   test -f Makefile && make "$ltmain"
7294 fi
7295
7296 if test -f "$ltmain"; then
7297   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7298   $rm -f "${ofile}T"
7299
7300   echo creating $ofile
7301
7302   # Now quote all the things that may contain metacharacters while being
7303   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7304   # variables and quote the copies for generation of the libtool script.
7305   for var in echo old_CC old_CFLAGS SED \
7306     AR AR_FLAGS CC LD LN_S NM SHELL \
7307     reload_flag reload_cmds wl \
7308     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7309     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7310     library_names_spec soname_spec \
7311     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7312     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7313     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7314     old_striplib striplib file_magic_cmd export_symbols_cmds \
7315     deplibs_check_method allow_undefined_flag no_undefined_flag \
7316     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7317     global_symbol_to_c_name_address \
7318     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7319     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7320     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7321
7322     case $var in
7323     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7324     old_postinstall_cmds | old_postuninstall_cmds | \
7325     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7326     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7327     postinstall_cmds | postuninstall_cmds | \
7328     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7329       # Double-quote double-evaled strings.
7330       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7331       ;;
7332     *)
7333       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7334       ;;
7335     esac
7336   done
7337
7338   cat <<__EOF__ > "${ofile}T"
7339 #! $SHELL
7340
7341 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7342 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7343 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7344 #
7345 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7346 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7347 #
7348 # This program is free software; you can redistribute it and/or modify
7349 # it under the terms of the GNU General Public License as published by
7350 # the Free Software Foundation; either version 2 of the License, or
7351 # (at your option) any later version.
7352 #
7353 # This program is distributed in the hope that it will be useful, but
7354 # WITHOUT ANY WARRANTY; without even the implied warranty of
7355 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7356 # General Public License for more details.
7357 #
7358 # You should have received a copy of the GNU General Public License
7359 # along with this program; if not, write to the Free Software
7360 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7361 #
7362 # As a special exception to the GNU General Public License, if you
7363 # distribute this file as part of a program that contains a
7364 # configuration script generated by Autoconf, you may include it under
7365 # the same distribution terms that you use for the rest of that program.
7366
7367 # A sed that does not truncate output.
7368 SED=$lt_SED
7369
7370 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7371 Xsed="${SED} -e s/^X//"
7372
7373 # The HP-UX ksh and POSIX shell print the target directory to stdout
7374 # if CDPATH is set.
7375 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7376
7377 # ### BEGIN LIBTOOL CONFIG
7378
7379 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7380
7381 # Shell to use when invoking shell scripts.
7382 SHELL=$lt_SHELL
7383
7384 # Whether or not to build shared libraries.
7385 build_libtool_libs=$enable_shared
7386
7387 # Whether or not to build static libraries.
7388 build_old_libs=$enable_static
7389
7390 # Whether or not to add -lc for building shared libraries.
7391 build_libtool_need_lc=$need_lc
7392
7393 # Whether or not to optimize for fast installation.
7394 fast_install=$enable_fast_install
7395
7396 # The host system.
7397 host_alias=$host_alias
7398 host=$host
7399
7400 # An echo program that does not interpret backslashes.
7401 echo=$lt_echo
7402
7403 # The archiver.
7404 AR=$lt_AR
7405 AR_FLAGS=$lt_AR_FLAGS
7406
7407 # The default C compiler.
7408 CC=$lt_CC
7409
7410 # Is the compiler the GNU C compiler?
7411 with_gcc=$GCC
7412
7413 # The linker used to build libraries.
7414 LD=$lt_LD
7415
7416 # Whether we need hard or soft links.
7417 LN_S=$lt_LN_S
7418
7419 # A BSD-compatible nm program.
7420 NM=$lt_NM
7421
7422 # A symbol stripping program
7423 STRIP=$STRIP
7424
7425 # Used to examine libraries when file_magic_cmd begins "file"
7426 MAGIC_CMD=$MAGIC_CMD
7427
7428 # Used on cygwin: DLL creation program.
7429 DLLTOOL="$DLLTOOL"
7430
7431 # Used on cygwin: object dumper.
7432 OBJDUMP="$OBJDUMP"
7433
7434 # Used on cygwin: assembler.
7435 AS="$AS"
7436
7437 # The name of the directory that contains temporary libtool files.
7438 objdir=$objdir
7439
7440 # How to create reloadable object files.
7441 reload_flag=$lt_reload_flag
7442 reload_cmds=$lt_reload_cmds
7443
7444 # How to pass a linker flag through the compiler.
7445 wl=$lt_wl
7446
7447 # Object file suffix (normally "o").
7448 objext="$ac_objext"
7449
7450 # Old archive suffix (normally "a").
7451 libext="$libext"
7452
7453 # Executable file suffix (normally "").
7454 exeext="$exeext"
7455
7456 # Additional compiler flags for building library objects.
7457 pic_flag=$lt_pic_flag
7458 pic_mode=$pic_mode
7459
7460 # Does compiler simultaneously support -c and -o options?
7461 compiler_c_o=$lt_compiler_c_o
7462
7463 # Can we write directly to a .lo ?
7464 compiler_o_lo=$lt_compiler_o_lo
7465
7466 # Must we lock files when doing compilation ?
7467 need_locks=$lt_need_locks
7468
7469 # Do we need the lib prefix for modules?
7470 need_lib_prefix=$need_lib_prefix
7471
7472 # Do we need a version for libraries?
7473 need_version=$need_version
7474
7475 # Whether dlopen is supported.
7476 dlopen_support=$enable_dlopen
7477
7478 # Whether dlopen of programs is supported.
7479 dlopen_self=$enable_dlopen_self
7480
7481 # Whether dlopen of statically linked programs is supported.
7482 dlopen_self_static=$enable_dlopen_self_static
7483
7484 # Compiler flag to prevent dynamic linking.
7485 link_static_flag=$lt_link_static_flag
7486
7487 # Compiler flag to turn off builtin functions.
7488 no_builtin_flag=$lt_no_builtin_flag
7489
7490 # Compiler flag to allow reflexive dlopens.
7491 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7492
7493 # Compiler flag to generate shared objects directly from archives.
7494 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7495
7496 # Compiler flag to generate thread-safe objects.
7497 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7498
7499 # Library versioning type.
7500 version_type=$version_type
7501
7502 # Format of library name prefix.
7503 libname_spec=$lt_libname_spec
7504
7505 # List of archive names.  First name is the real one, the rest are links.
7506 # The last name is the one that the linker finds with -lNAME.
7507 library_names_spec=$lt_library_names_spec
7508
7509 # The coded name of the library, if different from the real name.
7510 soname_spec=$lt_soname_spec
7511
7512 # Commands used to build and install an old-style archive.
7513 RANLIB=$lt_RANLIB
7514 old_archive_cmds=$lt_old_archive_cmds
7515 old_postinstall_cmds=$lt_old_postinstall_cmds
7516 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7517
7518 # Create an old-style archive from a shared archive.
7519 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7520
7521 # Create a temporary old-style archive to link instead of a shared archive.
7522 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7523
7524 # Commands used to build and install a shared archive.
7525 archive_cmds=$lt_archive_cmds
7526 archive_expsym_cmds=$lt_archive_expsym_cmds
7527 postinstall_cmds=$lt_postinstall_cmds
7528 postuninstall_cmds=$lt_postuninstall_cmds
7529
7530 # Commands to strip libraries.
7531 old_striplib=$lt_old_striplib
7532 striplib=$lt_striplib
7533
7534 # Method to check whether dependent libraries are shared objects.
7535 deplibs_check_method=$lt_deplibs_check_method
7536
7537 # Command to use when deplibs_check_method == file_magic.
7538 file_magic_cmd=$lt_file_magic_cmd
7539
7540 # Flag that allows shared libraries with undefined symbols to be built.
7541 allow_undefined_flag=$lt_allow_undefined_flag
7542
7543 # Flag that forces no undefined symbols.
7544 no_undefined_flag=$lt_no_undefined_flag
7545
7546 # Commands used to finish a libtool library installation in a directory.
7547 finish_cmds=$lt_finish_cmds
7548
7549 # Same as above, but a single script fragment to be evaled but not shown.
7550 finish_eval=$lt_finish_eval
7551
7552 # Take the output of nm and produce a listing of raw symbols and C names.
7553 global_symbol_pipe=$lt_global_symbol_pipe
7554
7555 # Transform the output of nm in a proper C declaration
7556 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7557
7558 # Transform the output of nm in a C name address pair
7559 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7560
7561 # This is the shared library runtime path variable.
7562 runpath_var=$runpath_var
7563
7564 # This is the shared library path variable.
7565 shlibpath_var=$shlibpath_var
7566
7567 # Is shlibpath searched before the hard-coded library search path?
7568 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7569
7570 # How to hardcode a shared library path into an executable.
7571 hardcode_action=$hardcode_action
7572
7573 # Whether we should hardcode library paths into libraries.
7574 hardcode_into_libs=$hardcode_into_libs
7575
7576 # Flag to hardcode \$libdir into a binary during linking.
7577 # This must work even if \$libdir does not exist.
7578 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7579
7580 # Whether we need a single -rpath flag with a separated argument.
7581 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7582
7583 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7584 # resulting binary.
7585 hardcode_direct=$hardcode_direct
7586
7587 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7588 # resulting binary.
7589 hardcode_minus_L=$hardcode_minus_L
7590
7591 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7592 # the resulting binary.
7593 hardcode_shlibpath_var=$hardcode_shlibpath_var
7594
7595 # Variables whose values should be saved in libtool wrapper scripts and
7596 # restored at relink time.
7597 variables_saved_for_relink="$variables_saved_for_relink"
7598
7599 # Whether libtool must link a program against all its dependency libraries.
7600 link_all_deplibs=$link_all_deplibs
7601
7602 # Compile-time system search path for libraries
7603 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7604
7605 # Run-time system search path for libraries
7606 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7607
7608 # Fix the shell variable \$srcfile for the compiler.
7609 fix_srcfile_path="$fix_srcfile_path"
7610
7611 # Set to yes if exported symbols are required.
7612 always_export_symbols=$always_export_symbols
7613
7614 # The commands to list exported symbols.
7615 export_symbols_cmds=$lt_export_symbols_cmds
7616
7617 # The commands to extract the exported symbol list from a shared archive.
7618 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7619
7620 # Symbols that should not be listed in the preloaded symbols.
7621 exclude_expsyms=$lt_exclude_expsyms
7622
7623 # Symbols that must always be exported.
7624 include_expsyms=$lt_include_expsyms
7625
7626 # ### END LIBTOOL CONFIG
7627
7628 __EOF__
7629
7630   case $host_os in
7631   aix3*)
7632     cat <<\EOF >> "${ofile}T"
7633
7634 # AIX sometimes has problems with the GCC collect2 program.  For some
7635 # reason, if we set the COLLECT_NAMES environment variable, the problems
7636 # vanish in a puff of smoke.
7637 if test "X${COLLECT_NAMES+set}" != Xset; then
7638   COLLECT_NAMES=
7639   export COLLECT_NAMES
7640 fi
7641 EOF
7642     ;;
7643   esac
7644
7645   case $host_os in
7646   cygwin* | mingw* | pw32* | os2*)
7647     cat <<'EOF' >> "${ofile}T"
7648       # This is a source program that is used to create dlls on Windows
7649       # Don't remove nor modify the starting and closing comments
7650 # /* ltdll.c starts here */
7651 # #define WIN32_LEAN_AND_MEAN
7652 # #include <windows.h>
7653 # #undef WIN32_LEAN_AND_MEAN
7654 # #include <stdio.h>
7655 #
7656 # #ifndef __CYGWIN__
7657 # #  ifdef __CYGWIN32__
7658 # #    define __CYGWIN__ __CYGWIN32__
7659 # #  endif
7660 # #endif
7661 #
7662 # #ifdef __cplusplus
7663 # extern "C" {
7664 # #endif
7665 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7666 # #ifdef __cplusplus
7667 # }
7668 # #endif
7669 #
7670 # #ifdef __CYGWIN__
7671 # #include <cygwin/cygwin_dll.h>
7672 # DECLARE_CYGWIN_DLL( DllMain );
7673 # #endif
7674 # HINSTANCE __hDllInstance_base;
7675 #
7676 # BOOL APIENTRY
7677 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7678 # {
7679 #   __hDllInstance_base = hInst;
7680 #   return TRUE;
7681 # }
7682 # /* ltdll.c ends here */
7683         # This is a source program that is used to create import libraries
7684         # on Windows for dlls which lack them. Don't remove nor modify the
7685         # starting and closing comments
7686 # /* impgen.c starts here */
7687 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7688 #
7689 #  This file is part of GNU libtool.
7690 #
7691 #  This program is free software; you can redistribute it and/or modify
7692 #  it under the terms of the GNU General Public License as published by
7693 #  the Free Software Foundation; either version 2 of the License, or
7694 #  (at your option) any later version.
7695 #
7696 #  This program is distributed in the hope that it will be useful,
7697 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7698 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7699 #  GNU General Public License for more details.
7700 #
7701 #  You should have received a copy of the GNU General Public License
7702 #  along with this program; if not, write to the Free Software
7703 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7704 #  */
7705 #
7706 # #include <stdio.h>            /* for printf() */
7707 # #include <unistd.h>           /* for open(), lseek(), read() */
7708 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7709 # #include <string.h>           /* for strdup() */
7710 #
7711 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7712 # #ifndef O_BINARY
7713 # #define O_BINARY 0
7714 # #endif
7715 #
7716 # static unsigned int
7717 # pe_get16 (fd, offset)
7718 #      int fd;
7719 #      int offset;
7720 # {
7721 #   unsigned char b[2];
7722 #   lseek (fd, offset, SEEK_SET);
7723 #   read (fd, b, 2);
7724 #   return b[0] + (b[1]<<8);
7725 # }
7726 #
7727 # static unsigned int
7728 # pe_get32 (fd, offset)
7729 #     int fd;
7730 #     int offset;
7731 # {
7732 #   unsigned char b[4];
7733 #   lseek (fd, offset, SEEK_SET);
7734 #   read (fd, b, 4);
7735 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7736 # }
7737 #
7738 # static unsigned int
7739 # pe_as32 (ptr)
7740 #      void *ptr;
7741 # {
7742 #   unsigned char *b = ptr;
7743 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7744 # }
7745 #
7746 # int
7747 # main (argc, argv)
7748 #     int argc;
7749 #     char *argv[];
7750 # {
7751 #     int dll;
7752 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7753 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7754 #     unsigned long name_rvas, nexp;
7755 #     unsigned char *expdata, *erva;
7756 #     char *filename, *dll_name;
7757 #
7758 #     filename = argv[1];
7759 #
7760 #     dll = open(filename, O_RDONLY|O_BINARY);
7761 #     if (dll < 1)
7762 #       return 1;
7763 #
7764 #     dll_name = filename;
7765 #
7766 #     for (i=0; filename[i]; i++)
7767 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7768 #           dll_name = filename + i +1;
7769 #
7770 #     pe_header_offset = pe_get32 (dll, 0x3c);
7771 #     opthdr_ofs = pe_header_offset + 4 + 20;
7772 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7773 #
7774 #     if (num_entries < 1) /* no exports */
7775 #       return 1;
7776 #
7777 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7778 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7779 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7780 #     secptr = (pe_header_offset + 4 + 20 +
7781 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7782 #
7783 #     expptr = 0;
7784 #     for (i = 0; i < nsections; i++)
7785 #     {
7786 #       char sname[8];
7787 #       unsigned long secptr1 = secptr + 40 * i;
7788 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7789 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7790 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7791 #       lseek(dll, secptr1, SEEK_SET);
7792 #       read(dll, sname, 8);
7793 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7794 #       {
7795 #           expptr = fptr + (export_rva - vaddr);
7796 #           if (export_rva + export_size > vaddr + vsize)
7797 #               export_size = vsize - (export_rva - vaddr);
7798 #           break;
7799 #       }
7800 #     }
7801 #
7802 #     expdata = (unsigned char*)malloc(export_size);
7803 #     lseek (dll, expptr, SEEK_SET);
7804 #     read (dll, expdata, export_size);
7805 #     erva = expdata - export_rva;
7806 #
7807 #     nexp = pe_as32 (expdata+24);
7808 #     name_rvas = pe_as32 (expdata+32);
7809 #
7810 #     printf ("EXPORTS\n");
7811 #     for (i = 0; i<nexp; i++)
7812 #     {
7813 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7814 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7815 #     }
7816 #
7817 #     return 0;
7818 # }
7819 # /* impgen.c ends here */
7820
7821 EOF
7822     ;;
7823   esac
7824
7825   # We use sed instead of cat because bash on DJGPP gets confused if
7826   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7827   # text mode, it properly converts lines to CR/LF.  This bash problem
7828   # is reportedly fixed, but why not run on old versions too?
7829   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7830
7831   mv -f "${ofile}T" "$ofile" || \
7832     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7833   chmod +x "$ofile"
7834 fi
7835 ##
7836 ## END FIXME
7837
7838
7839
7840
7841
7842 # This can be used to rebuild libtool when needed
7843 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7844
7845 # Always use our own libtool.
7846 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7847
7848 # Prevent multiple expansion
7849
7850
7851
7852 LTSTATIC=""
7853 if test -z "$LTDYNAMIC"; then
7854         LTSTATIC="-static"
7855 fi
7856
7857 # test for ln hardlink support
7858 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7859 echo "configure:7860: checking whether ln works" >&5
7860 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7861   echo $ac_n "(cached) $ac_c" 1>&6
7862 else
7863   rm -f conftest.src conftest.dst
7864 echo "conftest" > conftest.src
7865 if ln conftest.src conftest.dst 2>/dev/null
7866 then
7867   ol_cv_prog_LN_H="ln"
7868 else
7869   ol_cv_prog_LN_H="cp"
7870 fi
7871 rm -f conftest.src conftest.dst
7872
7873 fi
7874 LN_H="$ol_cv_prog_LN_H"
7875 if test "$ol_cv_prog_LN_H" = "ln"; then
7876         echo "$ac_t""yes" 1>&6
7877 else
7878         echo "$ac_t""no" 1>&6
7879 fi
7880
7881 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7882 echo "configure:7883: checking whether ln -s works" >&5
7883 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7884   echo $ac_n "(cached) $ac_c" 1>&6
7885 else
7886   rm -f conftestdata
7887 if ln -s X conftestdata 2>/dev/null
7888 then
7889   rm -f conftestdata
7890   ac_cv_prog_LN_S="ln -s"
7891 else
7892   ac_cv_prog_LN_S=ln
7893 fi
7894 fi
7895 LN_S="$ac_cv_prog_LN_S"
7896 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7897   echo "$ac_t""yes" 1>&6
7898 else
7899   echo "$ac_t""no" 1>&6
7900 fi
7901
7902
7903 ol_link_perl=no
7904 if test $ol_enable_perl != no ; then
7905         # Extract the first word of "perl", so it can be a program name with args.
7906 set dummy perl; ac_word=$2
7907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7908 echo "configure:7909: checking for $ac_word" >&5
7909 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7910   echo $ac_n "(cached) $ac_c" 1>&6
7911 else
7912   case "$PERLBIN" in
7913   /*)
7914   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7915   ;;
7916   ?:/*)
7917   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7918   ;;
7919   *)
7920   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7921   ac_dummy="$PATH"
7922   for ac_dir in $ac_dummy; do 
7923     test -z "$ac_dir" && ac_dir=.
7924     if test -f $ac_dir/$ac_word; then
7925       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7926       break
7927     fi
7928   done
7929   IFS="$ac_save_ifs"
7930   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7931   ;;
7932 esac
7933 fi
7934 PERLBIN="$ac_cv_path_PERLBIN"
7935 if test -n "$PERLBIN"; then
7936   echo "$ac_t""$PERLBIN" 1>&6
7937 else
7938   echo "$ac_t""no" 1>&6
7939 fi
7940
7941
7942         if test "no$PERLBIN" = "no" ; then
7943                 if test $ol_enable_perl = yes ; then
7944                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7945                 fi
7946
7947         else
7948                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7949                 if test x"$ol_with_perl_module" = "xstatic" ; then
7950                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7951                 else
7952                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7953                 fi
7954                                 ol_link_perl=yes
7955         fi
7956 fi
7957
7958 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7959 echo "configure:7960: checking how to run the C preprocessor" >&5
7960 # On Suns, sometimes $CPP names a directory.
7961 if test -n "$CPP" && test -d "$CPP"; then
7962   CPP=
7963 fi
7964 if test -z "$CPP"; then
7965 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7966   echo $ac_n "(cached) $ac_c" 1>&6
7967 else
7968     # This must be in double quotes, not single quotes, because CPP may get
7969   # substituted into the Makefile and "${CC-cc}" will confuse make.
7970   CPP="${CC-cc} -E"
7971   # On the NeXT, cc -E runs the code through the compiler's parser,
7972   # not just through cpp.
7973   cat > conftest.$ac_ext <<EOF
7974 #line 7975 "configure"
7975 #include "confdefs.h"
7976 #include <assert.h>
7977 Syntax Error
7978 EOF
7979 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7980 { (eval echo configure:7981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7981 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7982 if test -z "$ac_err"; then
7983   :
7984 else
7985   echo "$ac_err" >&5
7986   echo "configure: failed program was:" >&5
7987   cat conftest.$ac_ext >&5
7988   rm -rf conftest*
7989   CPP="${CC-cc} -E -traditional-cpp"
7990   cat > conftest.$ac_ext <<EOF
7991 #line 7992 "configure"
7992 #include "confdefs.h"
7993 #include <assert.h>
7994 Syntax Error
7995 EOF
7996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7997 { (eval echo configure:7998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7999 if test -z "$ac_err"; then
8000   :
8001 else
8002   echo "$ac_err" >&5
8003   echo "configure: failed program was:" >&5
8004   cat conftest.$ac_ext >&5
8005   rm -rf conftest*
8006   CPP="${CC-cc} -nologo -E"
8007   cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 #include <assert.h>
8011 Syntax Error
8012 EOF
8013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8014 { (eval echo configure:8015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8016 if test -z "$ac_err"; then
8017   :
8018 else
8019   echo "$ac_err" >&5
8020   echo "configure: failed program was:" >&5
8021   cat conftest.$ac_ext >&5
8022   rm -rf conftest*
8023   CPP=/lib/cpp
8024 fi
8025 rm -f conftest*
8026 fi
8027 rm -f conftest*
8028 fi
8029 rm -f conftest*
8030   ac_cv_prog_CPP="$CPP"
8031 fi
8032   CPP="$ac_cv_prog_CPP"
8033 else
8034   ac_cv_prog_CPP="$CPP"
8035 fi
8036 echo "$ac_t""$CPP" 1>&6
8037
8038
8039 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8040         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8041
8042 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8043         echo "configure: warning: programs compiled here do run here..." 1>&2
8044         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8045
8046 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8047         echo "configure: warning: programs compiled here do not run here..." 1>&2
8048         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8049 fi
8050
8051
8052 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8053 echo "configure:8054: checking for Cygwin environment" >&5
8054 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8055   echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057   cat > conftest.$ac_ext <<EOF
8058 #line 8059 "configure"
8059 #include "confdefs.h"
8060
8061 int main() {
8062
8063 #ifndef __CYGWIN__
8064 #define __CYGWIN__ __CYGWIN32__
8065 #endif
8066 return __CYGWIN__;
8067 ; return 0; }
8068 EOF
8069 if { (eval echo configure:8070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8070   rm -rf conftest*
8071   ac_cv_cygwin=yes
8072 else
8073   echo "configure: failed program was:" >&5
8074   cat conftest.$ac_ext >&5
8075   rm -rf conftest*
8076   ac_cv_cygwin=no
8077 fi
8078 rm -f conftest*
8079 fi
8080
8081 echo "$ac_t""$ac_cv_cygwin" 1>&6
8082 CYGWIN=
8083 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8084 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8085 echo "configure:8086: checking for mingw32 environment" >&5
8086 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8087   echo $ac_n "(cached) $ac_c" 1>&6
8088 else
8089   cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092
8093 int main() {
8094 return __MINGW32__;
8095 ; return 0; }
8096 EOF
8097 if { (eval echo configure:8098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8098   rm -rf conftest*
8099   ac_cv_mingw32=yes
8100 else
8101   echo "configure: failed program was:" >&5
8102   cat conftest.$ac_ext >&5
8103   rm -rf conftest*
8104   ac_cv_mingw32=no
8105 fi
8106 rm -f conftest*
8107 fi
8108
8109 echo "$ac_t""$ac_cv_mingw32" 1>&6
8110 MINGW32=
8111 test "$ac_cv_mingw32" = yes && MINGW32=yes
8112
8113
8114
8115 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8116 echo "configure:8117: checking for executable suffix" >&5
8117 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8118   echo $ac_n "(cached) $ac_c" 1>&6
8119 else
8120   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8121   ac_cv_exeext=.exe
8122 else
8123   rm -f conftest*
8124   echo 'int main () { return 0; }' > conftest.$ac_ext
8125   ac_cv_exeext=
8126   if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8127     for file in conftest.*; do
8128       case $file in
8129       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8130       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8131       esac
8132     done
8133   else
8134     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8135   fi
8136   rm -f conftest*
8137   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8138 fi
8139 fi
8140
8141 EXEEXT=""
8142 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8143 echo "$ac_t""${ac_cv_exeext}" 1>&6
8144 ac_exeext=$EXEEXT
8145
8146 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8147 echo "configure:8148: checking for object suffix" >&5
8148 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8149   echo $ac_n "(cached) $ac_c" 1>&6
8150 else
8151   rm -f conftest*
8152 echo 'int i = 1;' > conftest.$ac_ext
8153 if { (eval echo configure:8154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8154   for ac_file in conftest.*; do
8155     case $ac_file in
8156     *.c) ;;
8157     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8158     esac
8159   done
8160 else
8161   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8162 fi
8163 rm -f conftest*
8164 fi
8165
8166 echo "$ac_t""$ac_cv_objext" 1>&6
8167 OBJEXT=$ac_cv_objext
8168 ac_objext=$ac_cv_objext
8169
8170
8171 cat >> confdefs.h <<EOF
8172 #define EXEEXT "${EXEEXT}"
8173 EOF
8174
8175
8176 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8177 echo "configure:8178: checking for be_app in -lbe" >&5
8178 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8179 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8180   echo $ac_n "(cached) $ac_c" 1>&6
8181 else
8182   ac_save_LIBS="$LIBS"
8183 LIBS="-lbe -lroot -lnet $LIBS"
8184 cat > conftest.$ac_ext <<EOF
8185 #line 8186 "configure"
8186 #include "confdefs.h"
8187 /* Override any gcc2 internal prototype to avoid an error.  */
8188 /* We use char because int might match the return type of a gcc2
8189     builtin and then its argument prototype would still apply.  */
8190 char be_app();
8191
8192 int main() {
8193 be_app()
8194 ; return 0; }
8195 EOF
8196 if { (eval echo configure:8197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8197   rm -rf conftest*
8198   eval "ac_cv_lib_$ac_lib_var=yes"
8199 else
8200   echo "configure: failed program was:" >&5
8201   cat conftest.$ac_ext >&5
8202   rm -rf conftest*
8203   eval "ac_cv_lib_$ac_lib_var=no"
8204 fi
8205 rm -f conftest*
8206 LIBS="$ac_save_LIBS"
8207
8208 fi
8209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8210   echo "$ac_t""yes" 1>&6
8211   LIBS="$LIBS -lbe -lroot -lnet"
8212 else
8213   echo "$ac_t""no" 1>&6
8214 :
8215 fi
8216
8217
8218
8219
8220
8221 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8222 echo "configure:8223: checking for ${CC-cc} option to accept ANSI C" >&5
8223 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8224   echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226   am_cv_prog_cc_stdc=no
8227 ac_save_CC="$CC"
8228 # Don't try gcc -ansi; that turns off useful extensions and
8229 # breaks some systems' header files.
8230 # AIX                   -qlanglvl=ansi
8231 # Ultrix and OSF/1      -std1
8232 # HP-UX 10.20 and later -Ae
8233 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8234 # SVR4                  -Xc -D__EXTENSIONS__
8235 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8236 do
8237   CC="$ac_save_CC $ac_arg"
8238   cat > conftest.$ac_ext <<EOF
8239 #line 8240 "configure"
8240 #include "confdefs.h"
8241 #include <stdarg.h>
8242 #include <stdio.h>
8243 #include <sys/types.h>
8244 #include <sys/stat.h>
8245 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8246 struct buf { int x; };
8247 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8248 static char *e (p, i)
8249      char **p;
8250      int i;
8251 {
8252   return p[i];
8253 }
8254 static char *f (char * (*g) (char **, int), char **p, ...)
8255 {
8256   char *s;
8257   va_list v;
8258   va_start (v,p);
8259   s = g (p, va_arg (v,int));
8260   va_end (v);
8261   return s;
8262 }
8263 int test (int i, double x);
8264 struct s1 {int (*f) (int a);};
8265 struct s2 {int (*f) (double a);};
8266 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8267 int argc;
8268 char **argv;
8269
8270 int main() {
8271
8272 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8273
8274 ; return 0; }
8275 EOF
8276 if { (eval echo configure:8277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8277   rm -rf conftest*
8278   am_cv_prog_cc_stdc="$ac_arg"; break
8279 else
8280   echo "configure: failed program was:" >&5
8281   cat conftest.$ac_ext >&5
8282 fi
8283 rm -f conftest*
8284 done
8285 CC="$ac_save_CC"
8286
8287 fi
8288
8289 if test -z "$am_cv_prog_cc_stdc"; then
8290   echo "$ac_t""none needed" 1>&6
8291 else
8292   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8293 fi
8294 case "x$am_cv_prog_cc_stdc" in
8295   x|xno) ;;
8296   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8297 esac
8298
8299 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8300         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8301 fi
8302
8303 # test for make depend flag
8304 OL_MKDEP=
8305 OL_MKDEP_FLAGS=
8306 if test -z "${MKDEP}"; then
8307         OL_MKDEP="${CC-cc}"
8308         if test -z "${MKDEP_FLAGS}"; then
8309                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8310 echo "configure:8311: checking for ${OL_MKDEP} depend flag" >&5
8311 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8312   echo $ac_n "(cached) $ac_c" 1>&6
8313 else
8314   
8315                         ol_cv_mkdep=no
8316                         for flag in "-M" "-xM"; do
8317                                 cat > conftest.c <<EOF
8318  noCode;
8319 EOF
8320                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8321                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8322                                 then
8323                                         if test ! -f conftest."${ac_object}" ; then
8324                                                 ol_cv_mkdep=$flag
8325                                                 OL_MKDEP_FLAGS="$flag"
8326                                                 break
8327                                         fi
8328                                 fi
8329                         done
8330                         rm -f conftest*
8331                 
8332 fi
8333
8334 echo "$ac_t""$ol_cv_mkdep" 1>&6
8335         else
8336                 cc_cv_mkdep=yes
8337                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8338         fi
8339 else
8340         cc_cv_mkdep=yes
8341         OL_MKDEP="${MKDEP}"
8342         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8343 fi
8344
8345
8346
8347 if test "${ol_cv_mkdep}" = no ; then
8348         # this will soon become an error
8349         echo "configure: warning: do not know how to generate dependencies" 1>&2
8350 fi
8351
8352 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8353 echo "configure:8354: checking for afopen in -ls" >&5
8354 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8355 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8356   echo $ac_n "(cached) $ac_c" 1>&6
8357 else
8358   ac_save_LIBS="$LIBS"
8359 LIBS="-ls  $LIBS"
8360 cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363 /* Override any gcc2 internal prototype to avoid an error.  */
8364 /* We use char because int might match the return type of a gcc2
8365     builtin and then its argument prototype would still apply.  */
8366 char afopen();
8367
8368 int main() {
8369 afopen()
8370 ; return 0; }
8371 EOF
8372 if { (eval echo configure:8373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8373   rm -rf conftest*
8374   eval "ac_cv_lib_$ac_lib_var=yes"
8375 else
8376   echo "configure: failed program was:" >&5
8377   cat conftest.$ac_ext >&5
8378   rm -rf conftest*
8379   eval "ac_cv_lib_$ac_lib_var=no"
8380 fi
8381 rm -f conftest*
8382 LIBS="$ac_save_LIBS"
8383
8384 fi
8385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8386   echo "$ac_t""yes" 1>&6
8387   
8388         AUTH_LIBS=-ls
8389         cat >> confdefs.h <<\EOF
8390 #define HAVE_AIX_SECURITY 1
8391 EOF
8392
8393
8394 else
8395   echo "$ac_t""no" 1>&6
8396 fi
8397
8398
8399 case "$target" in
8400 *-ibm-openedition)
8401         ac_cv_func_getopt=no
8402         cat >> confdefs.h <<\EOF
8403 #define BOTH_STRINGS_H 1
8404 EOF
8405
8406         ;;
8407 esac
8408
8409 ol_link_modules=no
8410 if test $ol_enable_modules != no ; then
8411         for ac_hdr in ltdl.h
8412 do
8413 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8414 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8415 echo "configure:8416: checking for $ac_hdr" >&5
8416 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8417   echo $ac_n "(cached) $ac_c" 1>&6
8418 else
8419   cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 #include <$ac_hdr>
8423 EOF
8424 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8425 { (eval echo configure:8426: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8426 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8427 if test -z "$ac_err"; then
8428   rm -rf conftest*
8429   eval "ac_cv_header_$ac_safe=yes"
8430 else
8431   echo "$ac_err" >&5
8432   echo "configure: failed program was:" >&5
8433   cat conftest.$ac_ext >&5
8434   rm -rf conftest*
8435   eval "ac_cv_header_$ac_safe=no"
8436 fi
8437 rm -f conftest*
8438 fi
8439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8440   echo "$ac_t""yes" 1>&6
8441     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8442   cat >> confdefs.h <<EOF
8443 #define $ac_tr_hdr 1
8444 EOF
8445  
8446 else
8447   echo "$ac_t""no" 1>&6
8448 fi
8449 done
8450
8451
8452         if test $ac_cv_header_ltdl_h = no ; then
8453                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8454         fi
8455
8456         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8457 echo "configure:8458: checking for lt_dlinit in -lltdl" >&5
8458 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8460   echo $ac_n "(cached) $ac_c" 1>&6
8461 else
8462   ac_save_LIBS="$LIBS"
8463 LIBS="-lltdl  $LIBS"
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 /* Override any gcc2 internal prototype to avoid an error.  */
8468 /* We use char because int might match the return type of a gcc2
8469     builtin and then its argument prototype would still apply.  */
8470 char lt_dlinit();
8471
8472 int main() {
8473 lt_dlinit()
8474 ; return 0; }
8475 EOF
8476 if { (eval echo configure:8477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8477   rm -rf conftest*
8478   eval "ac_cv_lib_$ac_lib_var=yes"
8479 else
8480   echo "configure: failed program was:" >&5
8481   cat conftest.$ac_ext >&5
8482   rm -rf conftest*
8483   eval "ac_cv_lib_$ac_lib_var=no"
8484 fi
8485 rm -f conftest*
8486 LIBS="$ac_save_LIBS"
8487
8488 fi
8489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8490   echo "$ac_t""yes" 1>&6
8491   
8492                 MODULES_LIBS=-lltdl
8493                 cat >> confdefs.h <<\EOF
8494 #define HAVE_LIBLTDL 1
8495 EOF
8496
8497         
8498 else
8499   echo "$ac_t""no" 1>&6
8500 fi
8501
8502
8503         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8504                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8505         fi
8506         ol_link_modules=yes
8507 else
8508         ol_with_bdb_module=static
8509         ol_with_dnssrv_module=static
8510         ol_with_ldap_module=static
8511         ol_with_ldbm_module=static
8512         ol_with_meta_module=static
8513         ol_with_monitor_module=static
8514         ol_with_null_module=static
8515         ol_with_passwd_module=static
8516         ol_with_perl_module=static
8517         ol_with_shell_module=static
8518         ol_with_tcl_module=static
8519         ol_with_sql_module=static
8520 fi
8521
8522 # test for EBCDIC
8523 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8524 echo "configure:8525: checking for EBCDIC" >&5
8525 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8526   echo $ac_n "(cached) $ac_c" 1>&6
8527 else
8528   
8529         cat > conftest.$ac_ext <<EOF
8530 #line 8531 "configure"
8531 #include "confdefs.h"
8532
8533 #if !('M' == 0xd4)
8534 #include <__ASCII__/generate_error.h>
8535 #endif
8536
8537 EOF
8538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8539 { (eval echo configure:8540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8541 if test -z "$ac_err"; then
8542   rm -rf conftest*
8543   ol_cv_cpp_ebcdic=yes
8544 else
8545   echo "$ac_err" >&5
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -rf conftest*
8549   ol_cv_cpp_ebcdic=no
8550 fi
8551 rm -f conftest*
8552 fi
8553
8554 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8555 if test $ol_cv_cpp_ebcdic = yes ; then
8556         cat >> confdefs.h <<\EOF
8557 #define HAVE_EBCDIC 1
8558 EOF
8559
8560 fi
8561
8562 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8563 echo "configure:8564: checking for ANSI C header files" >&5
8564 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8565   echo $ac_n "(cached) $ac_c" 1>&6
8566 else
8567   cat > conftest.$ac_ext <<EOF
8568 #line 8569 "configure"
8569 #include "confdefs.h"
8570 #include <stdlib.h>
8571 #include <stdarg.h>
8572 #include <string.h>
8573 #include <float.h>
8574 EOF
8575 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8576 { (eval echo configure:8577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8577 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8578 if test -z "$ac_err"; then
8579   rm -rf conftest*
8580   ol_cv_header_stdc=yes
8581 else
8582   echo "$ac_err" >&5
8583   echo "configure: failed program was:" >&5
8584   cat conftest.$ac_ext >&5
8585   rm -rf conftest*
8586   ol_cv_header_stdc=no
8587 fi
8588 rm -f conftest*
8589
8590 if test $ol_cv_header_stdc = yes; then
8591   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8592 cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <string.h>
8596 EOF
8597 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8598   egrep "memchr" >/dev/null 2>&1; then
8599   :
8600 else
8601   rm -rf conftest*
8602   ol_cv_header_stdc=no
8603 fi
8604 rm -f conftest*
8605
8606 fi
8607
8608 if test $ol_cv_header_stdc = yes; then
8609   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8610 cat > conftest.$ac_ext <<EOF
8611 #line 8612 "configure"
8612 #include "confdefs.h"
8613 #include <stdlib.h>
8614 EOF
8615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8616   egrep "free" >/dev/null 2>&1; then
8617   :
8618 else
8619   rm -rf conftest*
8620   ol_cv_header_stdc=no
8621 fi
8622 rm -f conftest*
8623
8624 fi
8625
8626 if test $ol_cv_header_stdc = yes; then
8627   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8628 if test "$cross_compiling" = yes; then
8629   :
8630 else
8631   cat > conftest.$ac_ext <<EOF
8632 #line 8633 "configure"
8633 #include "confdefs.h"
8634 #include <ctype.h>
8635 #ifndef HAVE_EBCDIC
8636 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8637 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8638 #else
8639 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8640                 || ('j' <= (c) && (c) <= 'r') \
8641                 || ('s' <= (c) && (c) <= 'z'))
8642 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8643 #endif
8644 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8645 int main () { int i; for (i = 0; i < 256; i++)
8646 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8647 exit (0); }
8648
8649 EOF
8650 if { (eval echo configure:8651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8651 then
8652   :
8653 else
8654   echo "configure: failed program was:" >&5
8655   cat conftest.$ac_ext >&5
8656   rm -fr conftest*
8657   ol_cv_header_stdc=no
8658 fi
8659 rm -fr conftest*
8660 fi
8661
8662 fi
8663 fi
8664
8665 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8666 if test $ol_cv_header_stdc = yes; then
8667   cat >> confdefs.h <<\EOF
8668 #define STDC_HEADERS 1
8669 EOF
8670
8671 fi
8672 ac_cv_header_stdc=disable
8673
8674
8675 if test $ol_cv_header_stdc != yes; then
8676         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8677 fi
8678
8679 ac_header_dirent=no
8680 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8681 do
8682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8683 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8684 echo "configure:8685: checking for $ac_hdr that defines DIR" >&5
8685 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8686   echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688   cat > conftest.$ac_ext <<EOF
8689 #line 8690 "configure"
8690 #include "confdefs.h"
8691 #include <sys/types.h>
8692 #include <$ac_hdr>
8693 int main() {
8694 DIR *dirp = 0;
8695 ; return 0; }
8696 EOF
8697 if { (eval echo configure:8698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8698   rm -rf conftest*
8699   eval "ac_cv_header_dirent_$ac_safe=yes"
8700 else
8701   echo "configure: failed program was:" >&5
8702   cat conftest.$ac_ext >&5
8703   rm -rf conftest*
8704   eval "ac_cv_header_dirent_$ac_safe=no"
8705 fi
8706 rm -f conftest*
8707 fi
8708 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8709   echo "$ac_t""yes" 1>&6
8710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8711   cat >> confdefs.h <<EOF
8712 #define $ac_tr_hdr 1
8713 EOF
8714  ac_header_dirent=$ac_hdr; break
8715 else
8716   echo "$ac_t""no" 1>&6
8717 fi
8718 done
8719 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8720 if test $ac_header_dirent = dirent.h; then
8721 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8722 echo "configure:8723: checking for opendir in -ldir" >&5
8723 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8725   echo $ac_n "(cached) $ac_c" 1>&6
8726 else
8727   ac_save_LIBS="$LIBS"
8728 LIBS="-ldir  $LIBS"
8729 cat > conftest.$ac_ext <<EOF
8730 #line 8731 "configure"
8731 #include "confdefs.h"
8732 /* Override any gcc2 internal prototype to avoid an error.  */
8733 /* We use char because int might match the return type of a gcc2
8734     builtin and then its argument prototype would still apply.  */
8735 char opendir();
8736
8737 int main() {
8738 opendir()
8739 ; return 0; }
8740 EOF
8741 if { (eval echo configure:8742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8742   rm -rf conftest*
8743   eval "ac_cv_lib_$ac_lib_var=yes"
8744 else
8745   echo "configure: failed program was:" >&5
8746   cat conftest.$ac_ext >&5
8747   rm -rf conftest*
8748   eval "ac_cv_lib_$ac_lib_var=no"
8749 fi
8750 rm -f conftest*
8751 LIBS="$ac_save_LIBS"
8752
8753 fi
8754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8755   echo "$ac_t""yes" 1>&6
8756   LIBS="$LIBS -ldir"
8757 else
8758   echo "$ac_t""no" 1>&6
8759 fi
8760
8761 else
8762 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8763 echo "configure:8764: checking for opendir in -lx" >&5
8764 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8766   echo $ac_n "(cached) $ac_c" 1>&6
8767 else
8768   ac_save_LIBS="$LIBS"
8769 LIBS="-lx  $LIBS"
8770 cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 /* Override any gcc2 internal prototype to avoid an error.  */
8774 /* We use char because int might match the return type of a gcc2
8775     builtin and then its argument prototype would still apply.  */
8776 char opendir();
8777
8778 int main() {
8779 opendir()
8780 ; return 0; }
8781 EOF
8782 if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8783   rm -rf conftest*
8784   eval "ac_cv_lib_$ac_lib_var=yes"
8785 else
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -rf conftest*
8789   eval "ac_cv_lib_$ac_lib_var=no"
8790 fi
8791 rm -f conftest*
8792 LIBS="$ac_save_LIBS"
8793
8794 fi
8795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8796   echo "$ac_t""yes" 1>&6
8797   LIBS="$LIBS -lx"
8798 else
8799   echo "$ac_t""no" 1>&6
8800 fi
8801
8802 fi
8803
8804 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8805 echo "configure:8806: checking for sys/wait.h that is POSIX.1 compatible" >&5
8806 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8807   echo $ac_n "(cached) $ac_c" 1>&6
8808 else
8809   cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 #include <sys/types.h>
8813 #include <sys/wait.h>
8814 #ifndef WEXITSTATUS
8815 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8816 #endif
8817 #ifndef WIFEXITED
8818 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8819 #endif
8820 int main() {
8821 int s;
8822 wait (&s);
8823 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8824 ; return 0; }
8825 EOF
8826 if { (eval echo configure:8827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8827   rm -rf conftest*
8828   ac_cv_header_sys_wait_h=yes
8829 else
8830   echo "configure: failed program was:" >&5
8831   cat conftest.$ac_ext >&5
8832   rm -rf conftest*
8833   ac_cv_header_sys_wait_h=no
8834 fi
8835 rm -f conftest*
8836 fi
8837
8838 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8839 if test $ac_cv_header_sys_wait_h = yes; then
8840   cat >> confdefs.h <<\EOF
8841 #define HAVE_SYS_WAIT_H 1
8842 EOF
8843
8844 fi
8845
8846 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8847 echo "configure:8848: checking POSIX termios" >&5
8848 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8849   echo $ac_n "(cached) $ac_c" 1>&6
8850 else
8851   cat > conftest.$ac_ext <<EOF
8852 #line 8853 "configure"
8853 #include "confdefs.h"
8854 #include <sys/types.h>
8855 #include <unistd.h>
8856 #include <termios.h>
8857 int main() {
8858 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8859    tcgetattr(0, 0);
8860 ; return 0; }
8861 EOF
8862 if { (eval echo configure:8863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8863   rm -rf conftest*
8864   am_cv_sys_posix_termios=yes
8865 else
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -rf conftest*
8869   am_cv_sys_posix_termios=no
8870 fi
8871 rm -f conftest*
8872 fi
8873
8874 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8875
8876
8877  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8878 echo "configure:8879: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8879 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8880   echo $ac_n "(cached) $ac_c" 1>&6
8881 else
8882   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8883
8884   gwinsz_in_termios_h=no
8885   if test $am_cv_sys_posix_termios = yes; then
8886     cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 #include <sys/types.h>
8890 #     include <termios.h>
8891 #     ifdef TIOCGWINSZ
8892         yes
8893 #     endif
8894     
8895 EOF
8896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8897   egrep "yes" >/dev/null 2>&1; then
8898   rm -rf conftest*
8899   gwinsz_in_termios_h=yes
8900 fi
8901 rm -f conftest*
8902
8903   fi
8904
8905   if test $gwinsz_in_termios_h = no; then
8906     cat > conftest.$ac_ext <<EOF
8907 #line 8908 "configure"
8908 #include "confdefs.h"
8909 #include <sys/types.h>
8910 #     include <sys/ioctl.h>
8911 #     ifdef TIOCGWINSZ
8912         yes
8913 #     endif
8914     
8915 EOF
8916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8917   egrep "yes" >/dev/null 2>&1; then
8918   rm -rf conftest*
8919   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8920 fi
8921 rm -f conftest*
8922
8923   fi
8924   
8925 fi
8926
8927 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8928   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8929     cat >> confdefs.h <<\EOF
8930 #define GWINSZ_IN_SYS_IOCTL 1
8931 EOF
8932
8933   fi
8934
8935 if test $am_cv_sys_posix_termios = yes ; then
8936         cat >> confdefs.h <<\EOF
8937 #define HAVE_POSIX_TERMIOS 1
8938 EOF
8939
8940 fi
8941
8942 for ac_hdr in \
8943         arpa/inet.h             \
8944         arpa/nameser.h  \
8945         assert.h                \
8946         conio.h                 \
8947         crypt.h                 \
8948         direct.h                \
8949         errno.h                 \
8950         fcntl.h                 \
8951         filio.h                 \
8952         getopt.h                \
8953         grp.h                   \
8954         io.h                    \
8955         libutil.h               \
8956         limits.h                \
8957         locale.h                \
8958         netinet/tcp.h   \
8959         malloc.h                \
8960         memory.h                \
8961         psap.h                  \
8962         pwd.h                   \
8963         process.h               \
8964         resolv.h                \
8965         sgtty.h                 \
8966         shadow.h                \
8967         stddef.h                \
8968         string.h                \
8969         strings.h               \
8970         sysexits.h              \
8971         sys/file.h              \
8972         sys/filio.h             \
8973         sys/errno.h             \
8974         sys/ioctl.h             \
8975         sys/param.h             \
8976         sys/resource.h  \
8977         sys/select.h    \
8978         sys/socket.h    \
8979         sys/syslog.h    \
8980         sys/time.h              \
8981         sys/types.h             \
8982         sys/ucred.h             \
8983         syslog.h                \
8984         termios.h               \
8985         unistd.h                \
8986         winsock.h               \
8987         winsock2.h              \
8988
8989 do
8990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8992 echo "configure:8993: checking for $ac_hdr" >&5
8993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8994   echo $ac_n "(cached) $ac_c" 1>&6
8995 else
8996   cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 #include <$ac_hdr>
9000 EOF
9001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9002 { (eval echo configure:9003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9004 if test -z "$ac_err"; then
9005   rm -rf conftest*
9006   eval "ac_cv_header_$ac_safe=yes"
9007 else
9008   echo "$ac_err" >&5
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_header_$ac_safe=no"
9013 fi
9014 rm -f conftest*
9015 fi
9016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9017   echo "$ac_t""yes" 1>&6
9018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9019   cat >> confdefs.h <<EOF
9020 #define $ac_tr_hdr 1
9021 EOF
9022  
9023 else
9024   echo "$ac_t""no" 1>&6
9025 fi
9026 done
9027
9028
9029
9030
9031 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
9032 echo "configure:9033: checking for dlopen" >&5
9033 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
9034   echo $ac_n "(cached) $ac_c" 1>&6
9035 else
9036   cat > conftest.$ac_ext <<EOF
9037 #line 9038 "configure"
9038 #include "confdefs.h"
9039 /* System header to define __stub macros and hopefully few prototypes,
9040     which can conflict with char dlopen(); below.  */
9041 #include <assert.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 dlopen();
9046 char (*f)();
9047
9048 int main() {
9049
9050 /* The GNU C library defines this for functions which it implements
9051     to always fail with ENOSYS.  Some functions are actually named
9052     something starting with __ and the normal name is an alias.  */
9053 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9054 choke me
9055 #else
9056 f = dlopen;
9057 #endif
9058
9059 ; return 0; }
9060 EOF
9061 if { (eval echo configure:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9062   rm -rf conftest*
9063   eval "ac_cv_func_dlopen=yes"
9064 else
9065   echo "configure: failed program was:" >&5
9066   cat conftest.$ac_ext >&5
9067   rm -rf conftest*
9068   eval "ac_cv_func_dlopen=no"
9069 fi
9070 rm -f conftest*
9071 fi
9072
9073 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9074   echo "$ac_t""yes" 1>&6
9075   :
9076 else
9077   echo "$ac_t""no" 1>&6
9078 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9079 echo "configure:9080: checking for dlopen in -ldl" >&5
9080 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9081 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9082   echo $ac_n "(cached) $ac_c" 1>&6
9083 else
9084   ac_save_LIBS="$LIBS"
9085 LIBS="-ldl  $LIBS"
9086 cat > conftest.$ac_ext <<EOF
9087 #line 9088 "configure"
9088 #include "confdefs.h"
9089 /* Override any gcc2 internal prototype to avoid an error.  */
9090 /* We use char because int might match the return type of a gcc2
9091     builtin and then its argument prototype would still apply.  */
9092 char dlopen();
9093
9094 int main() {
9095 dlopen()
9096 ; return 0; }
9097 EOF
9098 if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9099   rm -rf conftest*
9100   eval "ac_cv_lib_$ac_lib_var=yes"
9101 else
9102   echo "configure: failed program was:" >&5
9103   cat conftest.$ac_ext >&5
9104   rm -rf conftest*
9105   eval "ac_cv_lib_$ac_lib_var=no"
9106 fi
9107 rm -f conftest*
9108 LIBS="$ac_save_LIBS"
9109
9110 fi
9111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9112   echo "$ac_t""yes" 1>&6
9113     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9114     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9115   cat >> confdefs.h <<EOF
9116 #define $ac_tr_lib 1
9117 EOF
9118
9119   LIBS="-ldl $LIBS"
9120
9121 else
9122   echo "$ac_t""no" 1>&6
9123 fi
9124
9125 fi
9126
9127
9128 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9129 echo "configure:9130: checking for sigset in -lV3" >&5
9130 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9132   echo $ac_n "(cached) $ac_c" 1>&6
9133 else
9134   ac_save_LIBS="$LIBS"
9135 LIBS="-lV3  $LIBS"
9136 cat > conftest.$ac_ext <<EOF
9137 #line 9138 "configure"
9138 #include "confdefs.h"
9139 /* Override any gcc2 internal prototype to avoid an error.  */
9140 /* We use char because int might match the return type of a gcc2
9141     builtin and then its argument prototype would still apply.  */
9142 char sigset();
9143
9144 int main() {
9145 sigset()
9146 ; return 0; }
9147 EOF
9148 if { (eval echo configure:9149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9149   rm -rf conftest*
9150   eval "ac_cv_lib_$ac_lib_var=yes"
9151 else
9152   echo "configure: failed program was:" >&5
9153   cat conftest.$ac_ext >&5
9154   rm -rf conftest*
9155   eval "ac_cv_lib_$ac_lib_var=no"
9156 fi
9157 rm -f conftest*
9158 LIBS="$ac_save_LIBS"
9159
9160 fi
9161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9162   echo "$ac_t""yes" 1>&6
9163     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9165   cat >> confdefs.h <<EOF
9166 #define $ac_tr_lib 1
9167 EOF
9168
9169   LIBS="-lV3 $LIBS"
9170
9171 else
9172   echo "$ac_t""no" 1>&6
9173 fi
9174
9175
9176 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9177 echo "configure:9178: checking for winsock" >&5
9178 save_LIBS="$LIBS"
9179 for curlib in ws2_32 wsock32; do
9180         LIBS="$LIBS -l$curlib"
9181         cat > conftest.$ac_ext <<EOF
9182 #line 9183 "configure"
9183 #include "confdefs.h"
9184
9185                         char socket@12();
9186                         char select@20();
9187                         char closesocket@4();
9188                         char gethostname@8();
9189                         
9190 int main() {
9191
9192                         socket@12();
9193                         select@20();
9194                         closesocket@4();
9195                         gethostname@8();
9196                         
9197 ; return 0; }
9198 EOF
9199 if { (eval echo configure:9200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9200   rm -rf conftest*
9201   have_winsock=yes
9202 else
9203   echo "configure: failed program was:" >&5
9204   cat conftest.$ac_ext >&5
9205   rm -rf conftest*
9206   have_winsock=no
9207 fi
9208 rm -f conftest*
9209
9210         if test $have_winsock = yes; then
9211                 cat >> confdefs.h <<\EOF
9212 #define HAVE_WINSOCK 1
9213 EOF
9214
9215                 ac_cv_func_socket=yes
9216                 ac_cv_func_select=yes
9217                 ac_cv_func_closesocket=yes
9218                 ac_cv_func_gethostname=yes
9219                 if test $curlib = ws2_32; then
9220                         have_winsock=winsock2
9221                         cat >> confdefs.h <<\EOF
9222 #define HAVE_WINSOCK2 1
9223 EOF
9224
9225                 fi
9226                 break
9227         fi
9228         LIBS="$save_LIBS"
9229 done
9230 echo "$ac_t""$have_winsock" 1>&6
9231
9232
9233 echo $ac_n "checking for socket""... $ac_c" 1>&6
9234 echo "configure:9235: checking for socket" >&5
9235 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241 /* System header to define __stub macros and hopefully few prototypes,
9242     which can conflict with char socket(); below.  */
9243 #include <assert.h>
9244 /* Override any gcc2 internal prototype to avoid an error.  */
9245 /* We use char because int might match the return type of a gcc2
9246     builtin and then its argument prototype would still apply.  */
9247 char socket();
9248 char (*f)();
9249
9250 int main() {
9251
9252 /* The GNU C library defines this for functions which it implements
9253     to always fail with ENOSYS.  Some functions are actually named
9254     something starting with __ and the normal name is an alias.  */
9255 #if defined (__stub_socket) || defined (__stub___socket)
9256 choke me
9257 #else
9258 f = socket;
9259 #endif
9260
9261 ; return 0; }
9262 EOF
9263 if { (eval echo configure:9264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9264   rm -rf conftest*
9265   eval "ac_cv_func_socket=yes"
9266 else
9267   echo "configure: failed program was:" >&5
9268   cat conftest.$ac_ext >&5
9269   rm -rf conftest*
9270   eval "ac_cv_func_socket=no"
9271 fi
9272 rm -f conftest*
9273 fi
9274
9275 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9276   echo "$ac_t""yes" 1>&6
9277   :
9278 else
9279   echo "$ac_t""no" 1>&6
9280         
9281         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9282 echo "configure:9283: checking for main in -lsocket" >&5
9283 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9285   echo $ac_n "(cached) $ac_c" 1>&6
9286 else
9287   ac_save_LIBS="$LIBS"
9288 LIBS="-lsocket  $LIBS"
9289 cat > conftest.$ac_ext <<EOF
9290 #line 9291 "configure"
9291 #include "confdefs.h"
9292
9293 int main() {
9294 main()
9295 ; return 0; }
9296 EOF
9297 if { (eval echo configure:9298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9298   rm -rf conftest*
9299   eval "ac_cv_lib_$ac_lib_var=yes"
9300 else
9301   echo "configure: failed program was:" >&5
9302   cat conftest.$ac_ext >&5
9303   rm -rf conftest*
9304   eval "ac_cv_lib_$ac_lib_var=no"
9305 fi
9306 rm -f conftest*
9307 LIBS="$ac_save_LIBS"
9308
9309 fi
9310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9311   echo "$ac_t""yes" 1>&6
9312     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9314   cat >> confdefs.h <<EOF
9315 #define $ac_tr_lib 1
9316 EOF
9317
9318   LIBS="-lsocket $LIBS"
9319
9320 else
9321   echo "$ac_t""no" 1>&6
9322 fi
9323
9324         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9325 echo "configure:9326: checking for main in -lnet" >&5
9326 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9328   echo $ac_n "(cached) $ac_c" 1>&6
9329 else
9330   ac_save_LIBS="$LIBS"
9331 LIBS="-lnet  $LIBS"
9332 cat > conftest.$ac_ext <<EOF
9333 #line 9334 "configure"
9334 #include "confdefs.h"
9335
9336 int main() {
9337 main()
9338 ; return 0; }
9339 EOF
9340 if { (eval echo configure:9341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9341   rm -rf conftest*
9342   eval "ac_cv_lib_$ac_lib_var=yes"
9343 else
9344   echo "configure: failed program was:" >&5
9345   cat conftest.$ac_ext >&5
9346   rm -rf conftest*
9347   eval "ac_cv_lib_$ac_lib_var=no"
9348 fi
9349 rm -f conftest*
9350 LIBS="$ac_save_LIBS"
9351
9352 fi
9353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9354   echo "$ac_t""yes" 1>&6
9355     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9356     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9357   cat >> confdefs.h <<EOF
9358 #define $ac_tr_lib 1
9359 EOF
9360
9361   LIBS="-lnet $LIBS"
9362
9363 else
9364   echo "$ac_t""no" 1>&6
9365 fi
9366
9367         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9368 echo "configure:9369: checking for main in -lnsl_s" >&5
9369 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9371   echo $ac_n "(cached) $ac_c" 1>&6
9372 else
9373   ac_save_LIBS="$LIBS"
9374 LIBS="-lnsl_s  $LIBS"
9375 cat > conftest.$ac_ext <<EOF
9376 #line 9377 "configure"
9377 #include "confdefs.h"
9378
9379 int main() {
9380 main()
9381 ; return 0; }
9382 EOF
9383 if { (eval echo configure:9384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9384   rm -rf conftest*
9385   eval "ac_cv_lib_$ac_lib_var=yes"
9386 else
9387   echo "configure: failed program was:" >&5
9388   cat conftest.$ac_ext >&5
9389   rm -rf conftest*
9390   eval "ac_cv_lib_$ac_lib_var=no"
9391 fi
9392 rm -f conftest*
9393 LIBS="$ac_save_LIBS"
9394
9395 fi
9396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9397   echo "$ac_t""yes" 1>&6
9398     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9399     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9400   cat >> confdefs.h <<EOF
9401 #define $ac_tr_lib 1
9402 EOF
9403
9404   LIBS="-lnsl_s $LIBS"
9405
9406 else
9407   echo "$ac_t""no" 1>&6
9408 fi
9409
9410         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9411 echo "configure:9412: checking for main in -lnsl" >&5
9412 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9413 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9414   echo $ac_n "(cached) $ac_c" 1>&6
9415 else
9416   ac_save_LIBS="$LIBS"
9417 LIBS="-lnsl  $LIBS"
9418 cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421
9422 int main() {
9423 main()
9424 ; return 0; }
9425 EOF
9426 if { (eval echo configure:9427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9427   rm -rf conftest*
9428   eval "ac_cv_lib_$ac_lib_var=yes"
9429 else
9430   echo "configure: failed program was:" >&5
9431   cat conftest.$ac_ext >&5
9432   rm -rf conftest*
9433   eval "ac_cv_lib_$ac_lib_var=no"
9434 fi
9435 rm -f conftest*
9436 LIBS="$ac_save_LIBS"
9437
9438 fi
9439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9440   echo "$ac_t""yes" 1>&6
9441     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9442     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9443   cat >> confdefs.h <<EOF
9444 #define $ac_tr_lib 1
9445 EOF
9446
9447   LIBS="-lnsl $LIBS"
9448
9449 else
9450   echo "$ac_t""no" 1>&6
9451 fi
9452
9453         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9454 echo "configure:9455: checking for socket in -linet" >&5
9455 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9456 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9457   echo $ac_n "(cached) $ac_c" 1>&6
9458 else
9459   ac_save_LIBS="$LIBS"
9460 LIBS="-linet  $LIBS"
9461 cat > conftest.$ac_ext <<EOF
9462 #line 9463 "configure"
9463 #include "confdefs.h"
9464 /* Override any gcc2 internal prototype to avoid an error.  */
9465 /* We use char because int might match the return type of a gcc2
9466     builtin and then its argument prototype would still apply.  */
9467 char socket();
9468
9469 int main() {
9470 socket()
9471 ; return 0; }
9472 EOF
9473 if { (eval echo configure:9474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9474   rm -rf conftest*
9475   eval "ac_cv_lib_$ac_lib_var=yes"
9476 else
9477   echo "configure: failed program was:" >&5
9478   cat conftest.$ac_ext >&5
9479   rm -rf conftest*
9480   eval "ac_cv_lib_$ac_lib_var=no"
9481 fi
9482 rm -f conftest*
9483 LIBS="$ac_save_LIBS"
9484
9485 fi
9486 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9487   echo "$ac_t""yes" 1>&6
9488     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9489     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9490   cat >> confdefs.h <<EOF
9491 #define $ac_tr_lib 1
9492 EOF
9493
9494   LIBS="-linet $LIBS"
9495
9496 else
9497   echo "$ac_t""no" 1>&6
9498 fi
9499
9500         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9501 echo "configure:9502: checking for main in -lgen" >&5
9502 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9504   echo $ac_n "(cached) $ac_c" 1>&6
9505 else
9506   ac_save_LIBS="$LIBS"
9507 LIBS="-lgen  $LIBS"
9508 cat > conftest.$ac_ext <<EOF
9509 #line 9510 "configure"
9510 #include "confdefs.h"
9511
9512 int main() {
9513 main()
9514 ; return 0; }
9515 EOF
9516 if { (eval echo configure:9517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9517   rm -rf conftest*
9518   eval "ac_cv_lib_$ac_lib_var=yes"
9519 else
9520   echo "configure: failed program was:" >&5
9521   cat conftest.$ac_ext >&5
9522   rm -rf conftest*
9523   eval "ac_cv_lib_$ac_lib_var=no"
9524 fi
9525 rm -f conftest*
9526 LIBS="$ac_save_LIBS"
9527
9528 fi
9529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9530   echo "$ac_t""yes" 1>&6
9531     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9532     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9533   cat >> confdefs.h <<EOF
9534 #define $ac_tr_lib 1
9535 EOF
9536
9537   LIBS="-lgen $LIBS"
9538
9539 else
9540   echo "$ac_t""no" 1>&6
9541 fi
9542
9543
9544 fi
9545
9546
9547 echo $ac_n "checking for select""... $ac_c" 1>&6
9548 echo "configure:9549: checking for select" >&5
9549 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9550   echo $ac_n "(cached) $ac_c" 1>&6
9551 else
9552   cat > conftest.$ac_ext <<EOF
9553 #line 9554 "configure"
9554 #include "confdefs.h"
9555 /* System header to define __stub macros and hopefully few prototypes,
9556     which can conflict with char select(); below.  */
9557 #include <assert.h>
9558 /* Override any gcc2 internal prototype to avoid an error.  */
9559 /* We use char because int might match the return type of a gcc2
9560     builtin and then its argument prototype would still apply.  */
9561 char select();
9562 char (*f)();
9563
9564 int main() {
9565
9566 /* The GNU C library defines this for functions which it implements
9567     to always fail with ENOSYS.  Some functions are actually named
9568     something starting with __ and the normal name is an alias.  */
9569 #if defined (__stub_select) || defined (__stub___select)
9570 choke me
9571 #else
9572 f = select;
9573 #endif
9574
9575 ; return 0; }
9576 EOF
9577 if { (eval echo configure:9578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9578   rm -rf conftest*
9579   eval "ac_cv_func_select=yes"
9580 else
9581   echo "configure: failed program was:" >&5
9582   cat conftest.$ac_ext >&5
9583   rm -rf conftest*
9584   eval "ac_cv_func_select=no"
9585 fi
9586 rm -f conftest*
9587 fi
9588
9589 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9590   echo "$ac_t""yes" 1>&6
9591   :
9592 else
9593   echo "$ac_t""no" 1>&6
9594 { echo "configure: error: select() required." 1>&2; exit 1; }
9595 fi
9596
9597
9598 if test "${ac_cv_header_winsock_h}" != yes; then
9599                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9600 echo "configure:9601: checking types of arguments for select()" >&5
9601  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9605   echo $ac_n "(cached) $ac_c" 1>&6
9606 else
9607     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9608   echo $ac_n "(cached) $ac_c" 1>&6
9609 else
9610      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9611      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9612       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9613        cat > conftest.$ac_ext <<EOF
9614 #line 9615 "configure"
9615 #include "confdefs.h"
9616 #ifdef HAVE_SYS_TYPES_H
9617 #include <sys/types.h>
9618 #endif
9619 #ifdef HAVE_SYS_TIME_H
9620 #include <sys/time.h>
9621 #endif
9622 #ifdef HAVE_SYS_SELECT_H
9623 #include <sys/select.h>
9624 #endif
9625 #ifdef HAVE_SYS_SOCKET_H
9626 #include <sys/socket.h>
9627 #endif
9628 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);
9629 int main() {
9630
9631 ; return 0; }
9632 EOF
9633 if { (eval echo configure:9634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9634   rm -rf conftest*
9635           ac_not_found=no ; break 3
9636 else
9637   echo "configure: failed program was:" >&5
9638   cat conftest.$ac_ext >&5
9639   rm -rf conftest*
9640   ac_not_found=yes
9641 fi
9642 rm -f conftest*
9643       done
9644      done
9645     done
9646    
9647 fi
9648   
9649 fi
9650  
9651 fi
9652  if test "$ac_not_found" = yes; then
9653   ac_cv_func_select_arg1=int 
9654   ac_cv_func_select_arg234='int *' 
9655   ac_cv_func_select_arg5='struct timeval *'
9656  fi
9657  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9658  cat >> confdefs.h <<EOF
9659 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9660 EOF
9661
9662  cat >> confdefs.h <<EOF
9663 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9664 EOF
9665
9666  cat >> confdefs.h <<EOF
9667 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9668 EOF
9669
9670
9671 fi
9672
9673
9674 for ac_hdr in regex.h 
9675 do
9676 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9677 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9678 echo "configure:9679: checking for $ac_hdr" >&5
9679 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9680   echo $ac_n "(cached) $ac_c" 1>&6
9681 else
9682   cat > conftest.$ac_ext <<EOF
9683 #line 9684 "configure"
9684 #include "confdefs.h"
9685 #include <$ac_hdr>
9686 EOF
9687 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9688 { (eval echo configure:9689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9689 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9690 if test -z "$ac_err"; then
9691   rm -rf conftest*
9692   eval "ac_cv_header_$ac_safe=yes"
9693 else
9694   echo "$ac_err" >&5
9695   echo "configure: failed program was:" >&5
9696   cat conftest.$ac_ext >&5
9697   rm -rf conftest*
9698   eval "ac_cv_header_$ac_safe=no"
9699 fi
9700 rm -f conftest*
9701 fi
9702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9703   echo "$ac_t""yes" 1>&6
9704     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9705   cat >> confdefs.h <<EOF
9706 #define $ac_tr_hdr 1
9707 EOF
9708  
9709 else
9710   echo "$ac_t""no" 1>&6
9711 fi
9712 done
9713
9714 if test "$ac_cv_header_regex_h" != yes ; then
9715         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9716 fi
9717
9718 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9719 echo "configure:9720: checking for library containing regfree" >&5
9720 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9721   echo $ac_n "(cached) $ac_c" 1>&6
9722 else
9723   ac_func_search_save_LIBS="$LIBS"
9724 ac_cv_search_regfree="no"
9725 cat > conftest.$ac_ext <<EOF
9726 #line 9727 "configure"
9727 #include "confdefs.h"
9728 /* Override any gcc2 internal prototype to avoid an error.  */
9729 /* We use char because int might match the return type of a gcc2
9730     builtin and then its argument prototype would still apply.  */
9731 char regfree();
9732
9733 int main() {
9734 regfree()
9735 ; return 0; }
9736 EOF
9737 if { (eval echo configure:9738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9738   rm -rf conftest*
9739   ac_cv_search_regfree="none required"
9740 else
9741   echo "configure: failed program was:" >&5
9742   cat conftest.$ac_ext >&5
9743 fi
9744 rm -f conftest*
9745 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9746 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9747 cat > conftest.$ac_ext <<EOF
9748 #line 9749 "configure"
9749 #include "confdefs.h"
9750 /* Override any gcc2 internal prototype to avoid an error.  */
9751 /* We use char because int might match the return type of a gcc2
9752     builtin and then its argument prototype would still apply.  */
9753 char regfree();
9754
9755 int main() {
9756 regfree()
9757 ; return 0; }
9758 EOF
9759 if { (eval echo configure:9760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9760   rm -rf conftest*
9761   ac_cv_search_regfree="-l$ac_lib"
9762 break
9763 else
9764   echo "configure: failed program was:" >&5
9765   cat conftest.$ac_ext >&5
9766 fi
9767 rm -f conftest*
9768 done
9769 LIBS="$ac_func_search_save_LIBS"
9770 fi
9771
9772 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9773 if test "$ac_cv_search_regfree" != "no"; then
9774   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9775   :
9776 else :
9777   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9778 fi
9779
9780
9781 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9782 echo "configure:9783: checking for compatible POSIX regex" >&5
9783 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   
9787         if test "$cross_compiling" = yes; then
9788   ol_cv_c_posix_regex=cross
9789 else
9790   cat > conftest.$ac_ext <<EOF
9791 #line 9792 "configure"
9792 #include "confdefs.h"
9793
9794 #include <sys/types.h>
9795 #include <regex.h>
9796 static char *pattern, *string;
9797 main()
9798 {
9799         int rc;
9800         regex_t re;
9801
9802         pattern = "^A";
9803
9804         if(regcomp(&re, pattern, 0)) {
9805                 return -1;
9806         }
9807         
9808         string = "ALL MATCH";
9809         
9810         rc = regexec(&re, string, 0, (void*)0, 0);
9811
9812         regfree(&re);
9813
9814         return rc;
9815 }
9816 EOF
9817 if { (eval echo configure:9818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9818 then
9819   ol_cv_c_posix_regex=yes
9820 else
9821   echo "configure: failed program was:" >&5
9822   cat conftest.$ac_ext >&5
9823   rm -fr conftest*
9824   ol_cv_c_posix_regex=no
9825 fi
9826 rm -fr conftest*
9827 fi
9828
9829 fi
9830
9831 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9832
9833 if test "$ol_cv_c_posix_regex" = no ; then
9834         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9835 fi
9836
9837
9838 have_uuid=no
9839 for ac_hdr in sys/uuid.h
9840 do
9841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9843 echo "configure:9844: checking for $ac_hdr" >&5
9844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9845   echo $ac_n "(cached) $ac_c" 1>&6
9846 else
9847   cat > conftest.$ac_ext <<EOF
9848 #line 9849 "configure"
9849 #include "confdefs.h"
9850 #include <$ac_hdr>
9851 EOF
9852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9853 { (eval echo configure:9854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9855 if test -z "$ac_err"; then
9856   rm -rf conftest*
9857   eval "ac_cv_header_$ac_safe=yes"
9858 else
9859   echo "$ac_err" >&5
9860   echo "configure: failed program was:" >&5
9861   cat conftest.$ac_ext >&5
9862   rm -rf conftest*
9863   eval "ac_cv_header_$ac_safe=no"
9864 fi
9865 rm -f conftest*
9866 fi
9867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9868   echo "$ac_t""yes" 1>&6
9869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9870   cat >> confdefs.h <<EOF
9871 #define $ac_tr_hdr 1
9872 EOF
9873  
9874 else
9875   echo "$ac_t""no" 1>&6
9876 fi
9877 done
9878
9879 if test $ac_cv_header_sys_uuid_h = yes ; then
9880         save_LIBS="$LIBS"
9881         
9882 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9883 echo "configure:9884: checking for library containing uuid_to_str" >&5
9884 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9885   echo $ac_n "(cached) $ac_c" 1>&6
9886 else
9887   ac_func_search_save_LIBS="$LIBS"
9888 ac_cv_search_uuid_to_str="no"
9889 cat > conftest.$ac_ext <<EOF
9890 #line 9891 "configure"
9891 #include "confdefs.h"
9892 /* Override any gcc2 internal prototype to avoid an error.  */
9893 /* We use char because int might match the return type of a gcc2
9894     builtin and then its argument prototype would still apply.  */
9895 char uuid_to_str();
9896
9897 int main() {
9898 uuid_to_str()
9899 ; return 0; }
9900 EOF
9901 if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9902   rm -rf conftest*
9903   ac_cv_search_uuid_to_str="none required"
9904 else
9905   echo "configure: failed program was:" >&5
9906   cat conftest.$ac_ext >&5
9907 fi
9908 rm -f conftest*
9909 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9910 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9911 cat > conftest.$ac_ext <<EOF
9912 #line 9913 "configure"
9913 #include "confdefs.h"
9914 /* Override any gcc2 internal prototype to avoid an error.  */
9915 /* We use char because int might match the return type of a gcc2
9916     builtin and then its argument prototype would still apply.  */
9917 char uuid_to_str();
9918
9919 int main() {
9920 uuid_to_str()
9921 ; return 0; }
9922 EOF
9923 if { (eval echo configure:9924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9924   rm -rf conftest*
9925   ac_cv_search_uuid_to_str="-l$ac_lib"
9926 break
9927 else
9928   echo "configure: failed program was:" >&5
9929   cat conftest.$ac_ext >&5
9930 fi
9931 rm -f conftest*
9932 done
9933 LIBS="$ac_func_search_save_LIBS"
9934 fi
9935
9936 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9937 if test "$ac_cv_search_uuid_to_str" != "no"; then
9938   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9939   have_uuid=yes
9940 else :
9941   :
9942 fi
9943         LIBS="$save_LIBS"
9944
9945         if test have_uuid = yes ; then
9946                 cat >> confdefs.h <<\EOF
9947 #define HAVE_UUID_TO_STR 1
9948 EOF
9949
9950
9951                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9952                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9953         fi
9954 fi
9955
9956 if test $have_uuid = no ; then
9957         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9958 echo "configure:9959: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9959         save_LIBS="$LIBS"
9960         LIBS="$LIBS -lrpcrt4"
9961         cat > conftest.$ac_ext <<EOF
9962 #line 9963 "configure"
9963 #include "confdefs.h"
9964
9965                 char UuidCreate@4();
9966                 char UuidToStringA@8();
9967                 
9968 int main() {
9969
9970                 UuidCreate@4();
9971                 UuidToStringA@8();
9972                 
9973 ; return 0; }
9974 EOF
9975 if { (eval echo configure:9976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9976   rm -rf conftest*
9977   need_rpcrt=yes
9978 else
9979   echo "configure: failed program was:" >&5
9980   cat conftest.$ac_ext >&5
9981   rm -rf conftest*
9982   need_rpcrt=no
9983 fi
9984 rm -f conftest*
9985         if test $need_rpcrt = yes; then
9986                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9987         fi
9988         LIBS="$save_LIBS"
9989         echo "$ac_t""$need_rpcrt" 1>&6
9990 fi
9991
9992 ol_link_dnssrv=no
9993 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9994 echo "configure:9995: checking for res_query" >&5
9995 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   cat > conftest.$ac_ext <<EOF
9999 #line 10000 "configure"
10000 #include "confdefs.h"
10001 /* System header to define __stub macros and hopefully few prototypes,
10002     which can conflict with char res_query(); below.  */
10003 #include <assert.h>
10004 /* Override any gcc2 internal prototype to avoid an error.  */
10005 /* We use char because int might match the return type of a gcc2
10006     builtin and then its argument prototype would still apply.  */
10007 char res_query();
10008 char (*f)();
10009
10010 int main() {
10011
10012 /* The GNU C library defines this for functions which it implements
10013     to always fail with ENOSYS.  Some functions are actually named
10014     something starting with __ and the normal name is an alias.  */
10015 #if defined (__stub_res_query) || defined (__stub___res_query)
10016 choke me
10017 #else
10018 f = res_query;
10019 #endif
10020
10021 ; return 0; }
10022 EOF
10023 if { (eval echo configure:10024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10024   rm -rf conftest*
10025   eval "ac_cv_func_res_query=yes"
10026 else
10027   echo "configure: failed program was:" >&5
10028   cat conftest.$ac_ext >&5
10029   rm -rf conftest*
10030   eval "ac_cv_func_res_query=no"
10031 fi
10032 rm -f conftest*
10033 fi
10034
10035 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037   :
10038 else
10039   echo "$ac_t""no" 1>&6
10040 fi
10041
10042 if test $ac_cv_func_res_query = no ; then 
10043         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10044 echo "configure:10045: checking for __res_query" >&5
10045 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10046   echo $ac_n "(cached) $ac_c" 1>&6
10047 else
10048   cat > conftest.$ac_ext <<EOF
10049 #line 10050 "configure"
10050 #include "confdefs.h"
10051 /* System header to define __stub macros and hopefully few prototypes,
10052     which can conflict with char __res_query(); below.  */
10053 #include <assert.h>
10054 /* Override any gcc2 internal prototype to avoid an error.  */
10055 /* We use char because int might match the return type of a gcc2
10056     builtin and then its argument prototype would still apply.  */
10057 char __res_query();
10058 char (*f)();
10059
10060 int main() {
10061
10062 /* The GNU C library defines this for functions which it implements
10063     to always fail with ENOSYS.  Some functions are actually named
10064     something starting with __ and the normal name is an alias.  */
10065 #if defined (__stub___res_query) || defined (__stub_____res_query)
10066 choke me
10067 #else
10068 f = __res_query;
10069 #endif
10070
10071 ; return 0; }
10072 EOF
10073 if { (eval echo configure:10074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10074   rm -rf conftest*
10075   eval "ac_cv_func___res_query=yes"
10076 else
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -rf conftest*
10080   eval "ac_cv_func___res_query=no"
10081 fi
10082 rm -f conftest*
10083 fi
10084
10085 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10086   echo "$ac_t""yes" 1>&6
10087   :
10088 else
10089   echo "$ac_t""no" 1>&6
10090 fi
10091
10092         ac_cv_func_res_query=$ac_cv_func___res_query
10093 fi
10094
10095 if test $ac_cv_func_res_query = no ; then 
10096         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10097 echo "configure:10098: checking for res_query in -lbind" >&5
10098 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10099 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10100   echo $ac_n "(cached) $ac_c" 1>&6
10101 else
10102   ac_save_LIBS="$LIBS"
10103 LIBS="-lbind  $LIBS"
10104 cat > conftest.$ac_ext <<EOF
10105 #line 10106 "configure"
10106 #include "confdefs.h"
10107 /* Override any gcc2 internal prototype to avoid an error.  */
10108 /* We use char because int might match the return type of a gcc2
10109     builtin and then its argument prototype would still apply.  */
10110 char res_query();
10111
10112 int main() {
10113 res_query()
10114 ; return 0; }
10115 EOF
10116 if { (eval echo configure:10117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10117   rm -rf conftest*
10118   eval "ac_cv_lib_$ac_lib_var=yes"
10119 else
10120   echo "configure: failed program was:" >&5
10121   cat conftest.$ac_ext >&5
10122   rm -rf conftest*
10123   eval "ac_cv_lib_$ac_lib_var=no"
10124 fi
10125 rm -f conftest*
10126 LIBS="$ac_save_LIBS"
10127
10128 fi
10129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10130   echo "$ac_t""yes" 1>&6
10131     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10132     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10133   cat >> confdefs.h <<EOF
10134 #define $ac_tr_lib 1
10135 EOF
10136
10137   LIBS="-lbind $LIBS"
10138
10139 else
10140   echo "$ac_t""no" 1>&6
10141 fi
10142
10143         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10144 fi
10145
10146 if test $ac_cv_func_res_query = no ; then 
10147         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10148 echo "configure:10149: checking for __res_query in -lbind" >&5
10149 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10151   echo $ac_n "(cached) $ac_c" 1>&6
10152 else
10153   ac_save_LIBS="$LIBS"
10154 LIBS="-lbind  $LIBS"
10155 cat > conftest.$ac_ext <<EOF
10156 #line 10157 "configure"
10157 #include "confdefs.h"
10158 /* Override any gcc2 internal prototype to avoid an error.  */
10159 /* We use char because int might match the return type of a gcc2
10160     builtin and then its argument prototype would still apply.  */
10161 char __res_query();
10162
10163 int main() {
10164 __res_query()
10165 ; return 0; }
10166 EOF
10167 if { (eval echo configure:10168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10168   rm -rf conftest*
10169   eval "ac_cv_lib_$ac_lib_var=yes"
10170 else
10171   echo "configure: failed program was:" >&5
10172   cat conftest.$ac_ext >&5
10173   rm -rf conftest*
10174   eval "ac_cv_lib_$ac_lib_var=no"
10175 fi
10176 rm -f conftest*
10177 LIBS="$ac_save_LIBS"
10178
10179 fi
10180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10181   echo "$ac_t""yes" 1>&6
10182     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10183     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10184   cat >> confdefs.h <<EOF
10185 #define $ac_tr_lib 1
10186 EOF
10187
10188   LIBS="-lbind $LIBS"
10189
10190 else
10191   echo "$ac_t""no" 1>&6
10192 fi
10193
10194         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10195 fi
10196
10197 if test $ac_cv_func_res_query = no ; then 
10198         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10199 echo "configure:10200: checking for res_query in -lresolv" >&5
10200 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10201 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10202   echo $ac_n "(cached) $ac_c" 1>&6
10203 else
10204   ac_save_LIBS="$LIBS"
10205 LIBS="-lresolv  $LIBS"
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 /* Override any gcc2 internal prototype to avoid an error.  */
10210 /* We use char because int might match the return type of a gcc2
10211     builtin and then its argument prototype would still apply.  */
10212 char res_query();
10213
10214 int main() {
10215 res_query()
10216 ; return 0; }
10217 EOF
10218 if { (eval echo configure:10219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10219   rm -rf conftest*
10220   eval "ac_cv_lib_$ac_lib_var=yes"
10221 else
10222   echo "configure: failed program was:" >&5
10223   cat conftest.$ac_ext >&5
10224   rm -rf conftest*
10225   eval "ac_cv_lib_$ac_lib_var=no"
10226 fi
10227 rm -f conftest*
10228 LIBS="$ac_save_LIBS"
10229
10230 fi
10231 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10232   echo "$ac_t""yes" 1>&6
10233     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10234     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10235   cat >> confdefs.h <<EOF
10236 #define $ac_tr_lib 1
10237 EOF
10238
10239   LIBS="-lresolv $LIBS"
10240
10241 else
10242   echo "$ac_t""no" 1>&6
10243 fi
10244
10245         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10246 fi
10247
10248 if test $ac_cv_func_res_query = no ; then 
10249         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10250 echo "configure:10251: checking for __res_query in -lresolv" >&5
10251 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10253   echo $ac_n "(cached) $ac_c" 1>&6
10254 else
10255   ac_save_LIBS="$LIBS"
10256 LIBS="-lresolv  $LIBS"
10257 cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260 /* Override any gcc2 internal prototype to avoid an error.  */
10261 /* We use char because int might match the return type of a gcc2
10262     builtin and then its argument prototype would still apply.  */
10263 char __res_query();
10264
10265 int main() {
10266 __res_query()
10267 ; return 0; }
10268 EOF
10269 if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10270   rm -rf conftest*
10271   eval "ac_cv_lib_$ac_lib_var=yes"
10272 else
10273   echo "configure: failed program was:" >&5
10274   cat conftest.$ac_ext >&5
10275   rm -rf conftest*
10276   eval "ac_cv_lib_$ac_lib_var=no"
10277 fi
10278 rm -f conftest*
10279 LIBS="$ac_save_LIBS"
10280
10281 fi
10282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10285     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10286   cat >> confdefs.h <<EOF
10287 #define $ac_tr_lib 1
10288 EOF
10289
10290   LIBS="-lresolv $LIBS"
10291
10292 else
10293   echo "$ac_t""no" 1>&6
10294 fi
10295
10296         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10297 fi
10298
10299 if test "$ac_cv_func_res_query" = yes ; then
10300         cat >> confdefs.h <<\EOF
10301 #define HAVE_RES_QUERY 1
10302 EOF
10303
10304
10305         if test $ol_enable_dnssrv != no ; then
10306                 ol_link_dnssrv=yes
10307         fi
10308 fi
10309
10310 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10311         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10312 fi
10313
10314 for ac_func in getaddrinfo gai_strerror inet_ntop 
10315 do
10316 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10317 echo "configure:10318: checking for $ac_func" >&5
10318 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   cat > conftest.$ac_ext <<EOF
10322 #line 10323 "configure"
10323 #include "confdefs.h"
10324 /* System header to define __stub macros and hopefully few prototypes,
10325     which can conflict with char $ac_func(); below.  */
10326 #include <assert.h>
10327 /* Override any gcc2 internal prototype to avoid an error.  */
10328 /* We use char because int might match the return type of a gcc2
10329     builtin and then its argument prototype would still apply.  */
10330 char $ac_func();
10331 char (*f)();
10332
10333 int main() {
10334
10335 /* The GNU C library defines this for functions which it implements
10336     to always fail with ENOSYS.  Some functions are actually named
10337     something starting with __ and the normal name is an alias.  */
10338 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10339 choke me
10340 #else
10341 f = $ac_func;
10342 #endif
10343
10344 ; return 0; }
10345 EOF
10346 if { (eval echo configure:10347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10347   rm -rf conftest*
10348   eval "ac_cv_func_$ac_func=yes"
10349 else
10350   echo "configure: failed program was:" >&5
10351   cat conftest.$ac_ext >&5
10352   rm -rf conftest*
10353   eval "ac_cv_func_$ac_func=no"
10354 fi
10355 rm -f conftest*
10356 fi
10357
10358 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10359   echo "$ac_t""yes" 1>&6
10360     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10361   cat >> confdefs.h <<EOF
10362 #define $ac_tr_func 1
10363 EOF
10364  
10365 else
10366   echo "$ac_t""no" 1>&6
10367 fi
10368 done
10369
10370
10371 ol_link_ipv6=no
10372 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10373         if test $ol_enable_ipv6 = yes ; then
10374                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10375         fi
10376 elif test $ol_enable_ipv6 != no ; then
10377         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10378 echo "configure:10379: checking INET6_ADDRSTRLEN" >&5
10379 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10380   echo $ac_n "(cached) $ac_c" 1>&6
10381 else
10382   
10383                 cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386
10387 #                       include <netinet/in.h>
10388 #                       ifdef INET6_ADDRSTRLEN
10389                                 __has_inet6_addrstrlen__;
10390 #                       endif
10391                 
10392 EOF
10393 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10394   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10395   rm -rf conftest*
10396   ol_cv_inet6_addrstrlen=yes
10397 else
10398   rm -rf conftest*
10399   ol_cv_inet6_addrstrlen=no
10400 fi
10401 rm -f conftest*
10402
10403 fi
10404
10405 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10406
10407
10408         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10409 echo "configure:10410: checking struct sockaddr_storage" >&5
10410 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10411   echo $ac_n "(cached) $ac_c" 1>&6
10412 else
10413   
10414                 cat > conftest.$ac_ext <<EOF
10415 #line 10416 "configure"
10416 #include "confdefs.h"
10417
10418 #include <sys/types.h>
10419 #include <sys/socket.h>
10420
10421 int main() {
10422
10423                         struct sockaddr_storage ss;
10424
10425 ; return 0; }
10426 EOF
10427 if { (eval echo configure:10428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10428   rm -rf conftest*
10429   ol_cv_struct_sockaddr_storage=yes
10430 else
10431   echo "configure: failed program was:" >&5
10432   cat conftest.$ac_ext >&5
10433   rm -rf conftest*
10434   ol_cv_struct_sockaddr_storage=no
10435 fi
10436 rm -f conftest*
10437 fi
10438
10439 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10440
10441         if test $ol_cv_inet6_addrstrlen = yes \
10442                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10443                 ol_link_ipv6=yes
10444         elif test $ol_enable_ipv6 = yes \
10445                         -a $ol_cv_inet6_addrstrlen = no ; then
10446                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10447         elif test $ol_enable_ipv6 = yes \
10448                         -a $ol_cv_struct_sockaddr_storage = no ; then
10449                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10450         fi
10451 fi
10452
10453 if test $ol_enable_local != no ; then
10454         for ac_hdr in sys/un.h 
10455 do
10456 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10457 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10458 echo "configure:10459: checking for $ac_hdr" >&5
10459 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   cat > conftest.$ac_ext <<EOF
10463 #line 10464 "configure"
10464 #include "confdefs.h"
10465 #include <$ac_hdr>
10466 EOF
10467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10468 { (eval echo configure:10469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10470 if test -z "$ac_err"; then
10471   rm -rf conftest*
10472   eval "ac_cv_header_$ac_safe=yes"
10473 else
10474   echo "$ac_err" >&5
10475   echo "configure: failed program was:" >&5
10476   cat conftest.$ac_ext >&5
10477   rm -rf conftest*
10478   eval "ac_cv_header_$ac_safe=no"
10479 fi
10480 rm -f conftest*
10481 fi
10482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10483   echo "$ac_t""yes" 1>&6
10484     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10485   cat >> confdefs.h <<EOF
10486 #define $ac_tr_hdr 1
10487 EOF
10488  
10489 else
10490   echo "$ac_t""no" 1>&6
10491 fi
10492 done
10493
10494
10495         if test $ol_enable_local = auto ; then
10496                 ol_enable_local=$ac_cv_header_sys_un_h
10497         elif test $ac_cv_header_sys_un_h = no ; then
10498                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10499         fi
10500 fi
10501
10502 ol_link_kbind=no
10503 ol_link_kpasswd=no
10504 ol_link_krb5=no
10505 ol_link_krb4=no
10506
10507 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10508         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10509         -o $ol_with_kerberos = k425 ; then
10510
10511         for ac_hdr in krb5.h
10512 do
10513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10515 echo "configure:10516: checking for $ac_hdr" >&5
10516 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10517   echo $ac_n "(cached) $ac_c" 1>&6
10518 else
10519   cat > conftest.$ac_ext <<EOF
10520 #line 10521 "configure"
10521 #include "confdefs.h"
10522 #include <$ac_hdr>
10523 EOF
10524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10525 { (eval echo configure:10526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10527 if test -z "$ac_err"; then
10528   rm -rf conftest*
10529   eval "ac_cv_header_$ac_safe=yes"
10530 else
10531   echo "$ac_err" >&5
10532   echo "configure: failed program was:" >&5
10533   cat conftest.$ac_ext >&5
10534   rm -rf conftest*
10535   eval "ac_cv_header_$ac_safe=no"
10536 fi
10537 rm -f conftest*
10538 fi
10539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10540   echo "$ac_t""yes" 1>&6
10541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10542   cat >> confdefs.h <<EOF
10543 #define $ac_tr_hdr 1
10544 EOF
10545  
10546 else
10547   echo "$ac_t""no" 1>&6
10548 fi
10549 done
10550
10551
10552         if test $ac_cv_header_krb5_h = yes ; then
10553                                 for ac_hdr in heim_err.h
10554 do
10555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10556 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10557 echo "configure:10558: checking for $ac_hdr" >&5
10558 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10559   echo $ac_n "(cached) $ac_c" 1>&6
10560 else
10561   cat > conftest.$ac_ext <<EOF
10562 #line 10563 "configure"
10563 #include "confdefs.h"
10564 #include <$ac_hdr>
10565 EOF
10566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10567 { (eval echo configure:10568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10569 if test -z "$ac_err"; then
10570   rm -rf conftest*
10571   eval "ac_cv_header_$ac_safe=yes"
10572 else
10573   echo "$ac_err" >&5
10574   echo "configure: failed program was:" >&5
10575   cat conftest.$ac_ext >&5
10576   rm -rf conftest*
10577   eval "ac_cv_header_$ac_safe=no"
10578 fi
10579 rm -f conftest*
10580 fi
10581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10582   echo "$ac_t""yes" 1>&6
10583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10584   cat >> confdefs.h <<EOF
10585 #define $ac_tr_hdr 1
10586 EOF
10587  
10588 else
10589   echo "$ac_t""no" 1>&6
10590 fi
10591 done
10592
10593                 if test $ac_cv_header_heim_err_h = yes ; then
10594                         krb5_impl=heimdal
10595                 else
10596                         krb5_impl=mit
10597                 fi
10598
10599                 if test $krb5_impl = mit; then
10600                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10601 echo "configure:10602: checking for main in -lk5crypto" >&5
10602 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10603 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10604   echo $ac_n "(cached) $ac_c" 1>&6
10605 else
10606   ac_save_LIBS="$LIBS"
10607 LIBS="-lk5crypto  $LIBS"
10608 cat > conftest.$ac_ext <<EOF
10609 #line 10610 "configure"
10610 #include "confdefs.h"
10611
10612 int main() {
10613 main()
10614 ; return 0; }
10615 EOF
10616 if { (eval echo configure:10617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10617   rm -rf conftest*
10618   eval "ac_cv_lib_$ac_lib_var=yes"
10619 else
10620   echo "configure: failed program was:" >&5
10621   cat conftest.$ac_ext >&5
10622   rm -rf conftest*
10623   eval "ac_cv_lib_$ac_lib_var=no"
10624 fi
10625 rm -f conftest*
10626 LIBS="$ac_save_LIBS"
10627
10628 fi
10629 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10630   echo "$ac_t""yes" 1>&6
10631   krb5crypto=k5crypto
10632 else
10633   echo "$ac_t""no" 1>&6
10634 krb5crypto=crypto
10635 fi
10636
10637
10638                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10639 echo "configure:10640: checking for main in -lkrb5" >&5
10640 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10641 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10642   echo $ac_n "(cached) $ac_c" 1>&6
10643 else
10644   ac_save_LIBS="$LIBS"
10645 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10646 cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649
10650 int main() {
10651 main()
10652 ; return 0; }
10653 EOF
10654 if { (eval echo configure:10655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10655   rm -rf conftest*
10656   eval "ac_cv_lib_$ac_lib_var=yes"
10657 else
10658   echo "configure: failed program was:" >&5
10659   cat conftest.$ac_ext >&5
10660   rm -rf conftest*
10661   eval "ac_cv_lib_$ac_lib_var=no"
10662 fi
10663 rm -f conftest*
10664 LIBS="$ac_save_LIBS"
10665
10666 fi
10667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10668   echo "$ac_t""yes" 1>&6
10669   have_krb5=yes
10670                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10671 else
10672   echo "$ac_t""no" 1>&6
10673 have_krb5=no
10674 fi
10675
10676
10677                 elif test $krb5_impl = heimdal; then
10678                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10679 echo "configure:10680: checking for main in -ldes" >&5
10680 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10682   echo $ac_n "(cached) $ac_c" 1>&6
10683 else
10684   ac_save_LIBS="$LIBS"
10685 LIBS="-ldes  $LIBS"
10686 cat > conftest.$ac_ext <<EOF
10687 #line 10688 "configure"
10688 #include "confdefs.h"
10689
10690 int main() {
10691 main()
10692 ; return 0; }
10693 EOF
10694 if { (eval echo configure:10695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10695   rm -rf conftest*
10696   eval "ac_cv_lib_$ac_lib_var=yes"
10697 else
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -rf conftest*
10701   eval "ac_cv_lib_$ac_lib_var=no"
10702 fi
10703 rm -f conftest*
10704 LIBS="$ac_save_LIBS"
10705
10706 fi
10707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10708   echo "$ac_t""yes" 1>&6
10709   krb5crypto=des
10710 else
10711   echo "$ac_t""no" 1>&6
10712 krb5crypto=crypto
10713 fi
10714
10715
10716                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10717 echo "configure:10718: checking for main in -lkrb5" >&5
10718 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10720   echo $ac_n "(cached) $ac_c" 1>&6
10721 else
10722   ac_save_LIBS="$LIBS"
10723 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10724 cat > conftest.$ac_ext <<EOF
10725 #line 10726 "configure"
10726 #include "confdefs.h"
10727
10728 int main() {
10729 main()
10730 ; return 0; }
10731 EOF
10732 if { (eval echo configure:10733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10733   rm -rf conftest*
10734   eval "ac_cv_lib_$ac_lib_var=yes"
10735 else
10736   echo "configure: failed program was:" >&5
10737   cat conftest.$ac_ext >&5
10738   rm -rf conftest*
10739   eval "ac_cv_lib_$ac_lib_var=no"
10740 fi
10741 rm -f conftest*
10742 LIBS="$ac_save_LIBS"
10743
10744 fi
10745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10746   echo "$ac_t""yes" 1>&6
10747   have_krb5=yes
10748                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10749 else
10750   echo "$ac_t""no" 1>&6
10751 have_krb5=no
10752 fi
10753
10754
10755                         cat >> confdefs.h <<\EOF
10756 #define HAVE_HEIMDAL_KERBEROS 1
10757 EOF
10758
10759
10760                 else
10761                         have_krb5=no
10762                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10763                 fi
10764
10765                 if test $have_krb5 = yes ; then
10766                         ol_link_krb5=yes
10767
10768                         cat >> confdefs.h <<\EOF
10769 #define HAVE_KRB5 1
10770 EOF
10771
10772
10773                         if test $ol_enable_kpasswd != no ; then
10774                                 ol_link_kpasswd=yes;
10775                         fi
10776
10777                         if test $ol_with_kerberos = k5only ; then
10778                                 ol_with_kerberos=found
10779                         fi
10780
10781                 elif test $ol_with_kerberos != auto ; then
10782                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10783                 fi
10784
10785         fi
10786 fi
10787
10788 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10789         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10790
10791         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10792 do
10793 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10794 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10795 echo "configure:10796: checking for $ac_hdr" >&5
10796 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10797   echo $ac_n "(cached) $ac_c" 1>&6
10798 else
10799   cat > conftest.$ac_ext <<EOF
10800 #line 10801 "configure"
10801 #include "confdefs.h"
10802 #include <$ac_hdr>
10803 EOF
10804 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10805 { (eval echo configure:10806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10806 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10807 if test -z "$ac_err"; then
10808   rm -rf conftest*
10809   eval "ac_cv_header_$ac_safe=yes"
10810 else
10811   echo "$ac_err" >&5
10812   echo "configure: failed program was:" >&5
10813   cat conftest.$ac_ext >&5
10814   rm -rf conftest*
10815   eval "ac_cv_header_$ac_safe=no"
10816 fi
10817 rm -f conftest*
10818 fi
10819 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10820   echo "$ac_t""yes" 1>&6
10821     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10822   cat >> confdefs.h <<EOF
10823 #define $ac_tr_hdr 1
10824 EOF
10825  
10826 else
10827   echo "$ac_t""no" 1>&6
10828 fi
10829 done
10830
10831
10832         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10833                 if test $krb5_impl = mit; then
10834                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10835 echo "configure:10836: checking for main in -lkrb4" >&5
10836 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10837 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10838   echo $ac_n "(cached) $ac_c" 1>&6
10839 else
10840   ac_save_LIBS="$LIBS"
10841 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10842 cat > conftest.$ac_ext <<EOF
10843 #line 10844 "configure"
10844 #include "confdefs.h"
10845
10846 int main() {
10847 main()
10848 ; return 0; }
10849 EOF
10850 if { (eval echo configure:10851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10851   rm -rf conftest*
10852   eval "ac_cv_lib_$ac_lib_var=yes"
10853 else
10854   echo "configure: failed program was:" >&5
10855   cat conftest.$ac_ext >&5
10856   rm -rf conftest*
10857   eval "ac_cv_lib_$ac_lib_var=no"
10858 fi
10859 rm -f conftest*
10860 LIBS="$ac_save_LIBS"
10861
10862 fi
10863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10864   echo "$ac_t""yes" 1>&6
10865   have_k425=yes
10866                                 KRB4_LIBS="-lkrb4 -ldes425"
10867 else
10868   echo "$ac_t""no" 1>&6
10869 have_k425=no
10870 fi
10871
10872
10873                 elif test $krb5_impl = heimdal; then
10874                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10875 echo "configure:10876: checking for main in -lkrb4" >&5
10876 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10877 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10878   echo $ac_n "(cached) $ac_c" 1>&6
10879 else
10880   ac_save_LIBS="$LIBS"
10881 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10882 cat > conftest.$ac_ext <<EOF
10883 #line 10884 "configure"
10884 #include "confdefs.h"
10885
10886 int main() {
10887 main()
10888 ; return 0; }
10889 EOF
10890 if { (eval echo configure:10891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10891   rm -rf conftest*
10892   eval "ac_cv_lib_$ac_lib_var=yes"
10893 else
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_lib_$ac_lib_var=no"
10898 fi
10899 rm -f conftest*
10900 LIBS="$ac_save_LIBS"
10901
10902 fi
10903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10904   echo "$ac_t""yes" 1>&6
10905   have_k425=yes
10906                                 KRB4_LIBS="-lkrb4"
10907 else
10908   echo "$ac_t""no" 1>&6
10909 have_k425=no
10910 fi
10911
10912
10913                 else
10914                         have_425=no
10915                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10916                 fi
10917
10918                 if test $have_k425 = yes ; then
10919                         ol_with_kerberos=found
10920                         ol_link_krb4=yes
10921
10922                         cat >> confdefs.h <<\EOF
10923 #define HAVE_KRB425 1
10924 EOF
10925
10926                         cat >> confdefs.h <<\EOF
10927 #define HAVE_KRB4 1
10928 EOF
10929
10930
10931                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10932 echo "configure:10933: checking for des_debug in Kerberos libraries" >&5
10933 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10934   echo $ac_n "(cached) $ac_c" 1>&6
10935 else
10936   
10937                                                                 save_LIBS="$LIBS"
10938                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10939                                 cat > conftest.$ac_ext <<EOF
10940 #line 10941 "configure"
10941 #include "confdefs.h"
10942
10943 #include <kerberosIV/krb.h>
10944 #include <kerberosIV/des.h>
10945 extern int des_debug;
10946
10947 int main() {
10948
10949 des_debug = 1;
10950
10951 ; return 0; }
10952 EOF
10953 if { (eval echo configure:10954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10954   rm -rf conftest*
10955   ol_cv_var_des_debug=yes
10956 else
10957   echo "configure: failed program was:" >&5
10958   cat conftest.$ac_ext >&5
10959   rm -rf conftest*
10960   ol_cv_var_des_debug=no
10961 fi
10962 rm -f conftest*
10963                                                                 LIBS="$save_LIBS"
10964                         
10965 fi
10966
10967 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10968
10969                         if test $ol_cv_var_des_debug = yes ; then
10970                                 cat >> confdefs.h <<\EOF
10971 #define HAVE_DES_DEBUG 1
10972 EOF
10973
10974                         fi
10975
10976                         LIBS="$save_LIBS"
10977                 fi
10978         fi
10979 fi
10980
10981 if test $ol_link_krb5 = yes ; then
10982         ol_with_kerberos=found
10983 fi
10984
10985 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10986         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10987
10988         for ac_hdr in krb.h des.h krb-archaeology.h 
10989 do
10990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10992 echo "configure:10993: checking for $ac_hdr" >&5
10993 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10994   echo $ac_n "(cached) $ac_c" 1>&6
10995 else
10996   cat > conftest.$ac_ext <<EOF
10997 #line 10998 "configure"
10998 #include "confdefs.h"
10999 #include <$ac_hdr>
11000 EOF
11001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11002 { (eval echo configure:11003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11004 if test -z "$ac_err"; then
11005   rm -rf conftest*
11006   eval "ac_cv_header_$ac_safe=yes"
11007 else
11008   echo "$ac_err" >&5
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -rf conftest*
11012   eval "ac_cv_header_$ac_safe=no"
11013 fi
11014 rm -f conftest*
11015 fi
11016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11017   echo "$ac_t""yes" 1>&6
11018     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11019   cat >> confdefs.h <<EOF
11020 #define $ac_tr_hdr 1
11021 EOF
11022  
11023 else
11024   echo "$ac_t""no" 1>&6
11025 fi
11026 done
11027
11028
11029         if test $ac_cv_header_krb_h = yes ; then
11030                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11031 echo "configure:11032: checking for main in -lkrb" >&5
11032 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11033 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11034   echo $ac_n "(cached) $ac_c" 1>&6
11035 else
11036   ac_save_LIBS="$LIBS"
11037 LIBS="-lkrb -ldes $LIBS"
11038 cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041
11042 int main() {
11043 main()
11044 ; return 0; }
11045 EOF
11046 if { (eval echo configure:11047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11047   rm -rf conftest*
11048   eval "ac_cv_lib_$ac_lib_var=yes"
11049 else
11050   echo "configure: failed program was:" >&5
11051   cat conftest.$ac_ext >&5
11052   rm -rf conftest*
11053   eval "ac_cv_lib_$ac_lib_var=no"
11054 fi
11055 rm -f conftest*
11056 LIBS="$ac_save_LIBS"
11057
11058 fi
11059 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11060   echo "$ac_t""yes" 1>&6
11061   have_k4=yes
11062 else
11063   echo "$ac_t""no" 1>&6
11064 have_k4=no
11065 fi
11066
11067
11068                 if test $have_k4 = yes ; then
11069                         ol_with_kerberos=found
11070                         ol_link_krb4=yes
11071
11072                         cat >> confdefs.h <<\EOF
11073 #define HAVE_KRB4 1
11074 EOF
11075
11076
11077                         KRB4_LIBS="-lkrb -ldes"
11078
11079                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11080                                 cat >> confdefs.h <<\EOF
11081 #define HAVE_KTH_KERBEROS 1
11082 EOF
11083
11084                         fi
11085                 fi
11086         fi
11087 fi
11088
11089 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11090         ol_link_kpasswd=yes
11091 fi
11092
11093 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11094         ol_link_kbind=yes
11095
11096 elif test $ol_enable_kbind = yes ; then
11097         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11098 fi
11099
11100 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11101         cat >> confdefs.h <<\EOF
11102 #define HAVE_KERBEROS 1
11103 EOF
11104
11105
11106 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11107         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11108 fi
11109
11110 ol_link_tls=no
11111 if test $ol_with_tls != no ; then
11112         for ac_hdr in openssl/ssl.h ssl.h
11113 do
11114 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11115 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11116 echo "configure:11117: checking for $ac_hdr" >&5
11117 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11118   echo $ac_n "(cached) $ac_c" 1>&6
11119 else
11120   cat > conftest.$ac_ext <<EOF
11121 #line 11122 "configure"
11122 #include "confdefs.h"
11123 #include <$ac_hdr>
11124 EOF
11125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11126 { (eval echo configure:11127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11128 if test -z "$ac_err"; then
11129   rm -rf conftest*
11130   eval "ac_cv_header_$ac_safe=yes"
11131 else
11132   echo "$ac_err" >&5
11133   echo "configure: failed program was:" >&5
11134   cat conftest.$ac_ext >&5
11135   rm -rf conftest*
11136   eval "ac_cv_header_$ac_safe=no"
11137 fi
11138 rm -f conftest*
11139 fi
11140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11141   echo "$ac_t""yes" 1>&6
11142     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11143   cat >> confdefs.h <<EOF
11144 #define $ac_tr_hdr 1
11145 EOF
11146  
11147 else
11148   echo "$ac_t""no" 1>&6
11149 fi
11150 done
11151
11152         
11153         if test $ac_cv_header_openssl_ssl_h = yes \
11154                 -o $ac_cv_header_ssl_h = yes ; then
11155                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11156 echo "configure:11157: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11157 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11159   echo $ac_n "(cached) $ac_c" 1>&6
11160 else
11161   ac_save_LIBS="$LIBS"
11162 LIBS="-lssl -lcrypto $LIBS"
11163 cat > conftest.$ac_ext <<EOF
11164 #line 11165 "configure"
11165 #include "confdefs.h"
11166 /* Override any gcc2 internal prototype to avoid an error.  */
11167 /* We use char because int might match the return type of a gcc2
11168     builtin and then its argument prototype would still apply.  */
11169 char SSLeay_add_ssl_algorithms();
11170
11171 int main() {
11172 SSLeay_add_ssl_algorithms()
11173 ; return 0; }
11174 EOF
11175 if { (eval echo configure:11176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11176   rm -rf conftest*
11177   eval "ac_cv_lib_$ac_lib_var=yes"
11178 else
11179   echo "configure: failed program was:" >&5
11180   cat conftest.$ac_ext >&5
11181   rm -rf conftest*
11182   eval "ac_cv_lib_$ac_lib_var=no"
11183 fi
11184 rm -f conftest*
11185 LIBS="$ac_save_LIBS"
11186
11187 fi
11188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11189   echo "$ac_t""yes" 1>&6
11190   have_ssleay=yes
11191                         need_rsaref=no
11192 else
11193   echo "$ac_t""no" 1>&6
11194 have_ssleay=no
11195 fi
11196
11197                         
11198                 if test $have_ssleay = no ; then
11199                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11200 echo "configure:11201: checking for SSL_library_init in -lssl" >&5
11201 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11203   echo $ac_n "(cached) $ac_c" 1>&6
11204 else
11205   ac_save_LIBS="$LIBS"
11206 LIBS="-lssl -lcrypto $LIBS"
11207 cat > conftest.$ac_ext <<EOF
11208 #line 11209 "configure"
11209 #include "confdefs.h"
11210 /* Override any gcc2 internal prototype to avoid an error.  */
11211 /* We use char because int might match the return type of a gcc2
11212     builtin and then its argument prototype would still apply.  */
11213 char SSL_library_init();
11214
11215 int main() {
11216 SSL_library_init()
11217 ; return 0; }
11218 EOF
11219 if { (eval echo configure:11220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11220   rm -rf conftest*
11221   eval "ac_cv_lib_$ac_lib_var=yes"
11222 else
11223   echo "configure: failed program was:" >&5
11224   cat conftest.$ac_ext >&5
11225   rm -rf conftest*
11226   eval "ac_cv_lib_$ac_lib_var=no"
11227 fi
11228 rm -f conftest*
11229 LIBS="$ac_save_LIBS"
11230
11231 fi
11232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11233   echo "$ac_t""yes" 1>&6
11234   have_ssleay=yes
11235                                 need_rsaref=no
11236 else
11237   echo "$ac_t""no" 1>&6
11238 have_ssleay=no
11239 fi
11240
11241                 fi
11242
11243                 if test $have_ssleay = no ; then
11244                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11245 echo "configure:11246: checking for ssl3_accept in -lssl" >&5
11246 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11247 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11248   echo $ac_n "(cached) $ac_c" 1>&6
11249 else
11250   ac_save_LIBS="$LIBS"
11251 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11252 cat > conftest.$ac_ext <<EOF
11253 #line 11254 "configure"
11254 #include "confdefs.h"
11255 /* Override any gcc2 internal prototype to avoid an error.  */
11256 /* We use char because int might match the return type of a gcc2
11257     builtin and then its argument prototype would still apply.  */
11258 char ssl3_accept();
11259
11260 int main() {
11261 ssl3_accept()
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11265   rm -rf conftest*
11266   eval "ac_cv_lib_$ac_lib_var=yes"
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   eval "ac_cv_lib_$ac_lib_var=no"
11272 fi
11273 rm -f conftest*
11274 LIBS="$ac_save_LIBS"
11275
11276 fi
11277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11278   echo "$ac_t""yes" 1>&6
11279   have_ssleay=yes
11280                                 need_rsaref=yes
11281 else
11282   echo "$ac_t""no" 1>&6
11283 have_ssleay=no
11284 fi
11285
11286                 fi
11287
11288                 if test $have_ssleay = yes ; then
11289                         ol_with_tls=found
11290                         ol_link_tls=yes
11291
11292                         cat >> confdefs.h <<\EOF
11293 #define HAVE_SSLEAY 1
11294 EOF
11295
11296
11297                         if test $need_rsaref = yes; then
11298                                 cat >> confdefs.h <<\EOF
11299 #define HAVE_RSAREF 1
11300 EOF
11301
11302
11303                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11304                         else
11305                                 TLS_LIBS="-lssl -lcrypto"
11306                         fi
11307                 fi
11308         fi
11309
11310 else
11311         echo "configure: warning: TLS data protection not supported!" 1>&2
11312 fi
11313
11314 if test $ol_link_tls = yes ; then
11315         cat >> confdefs.h <<\EOF
11316 #define HAVE_TLS 1
11317 EOF
11318
11319
11320 elif test $ol_with_tls = auto ; then
11321         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11322         echo "configure: warning: TLS data protection not supported!" 1>&2
11323
11324 elif test $ol_with_tls != no ; then
11325         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11326 fi
11327
11328 if test $ol_enable_lmpasswd != no; then
11329         if test $ol_link_tls != yes ; then
11330                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11331         fi
11332
11333         cat >> confdefs.h <<\EOF
11334 #define SLAPD_LMHASH 1
11335 EOF
11336
11337 fi
11338
11339 ol_link_threads=no
11340
11341 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11342         -o $ol_with_threads = nt ; then
11343
11344         
11345         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11346 echo "configure:11347: checking for _beginthread" >&5
11347 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11348   echo $ac_n "(cached) $ac_c" 1>&6
11349 else
11350   cat > conftest.$ac_ext <<EOF
11351 #line 11352 "configure"
11352 #include "confdefs.h"
11353 /* System header to define __stub macros and hopefully few prototypes,
11354     which can conflict with char _beginthread(); below.  */
11355 #include <assert.h>
11356 /* Override any gcc2 internal prototype to avoid an error.  */
11357 /* We use char because int might match the return type of a gcc2
11358     builtin and then its argument prototype would still apply.  */
11359 char _beginthread();
11360 char (*f)();
11361
11362 int main() {
11363
11364 /* The GNU C library defines this for functions which it implements
11365     to always fail with ENOSYS.  Some functions are actually named
11366     something starting with __ and the normal name is an alias.  */
11367 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11368 choke me
11369 #else
11370 f = _beginthread;
11371 #endif
11372
11373 ; return 0; }
11374 EOF
11375 if { (eval echo configure:11376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11376   rm -rf conftest*
11377   eval "ac_cv_func__beginthread=yes"
11378 else
11379   echo "configure: failed program was:" >&5
11380   cat conftest.$ac_ext >&5
11381   rm -rf conftest*
11382   eval "ac_cv_func__beginthread=no"
11383 fi
11384 rm -f conftest*
11385 fi
11386
11387 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11388   echo "$ac_t""yes" 1>&6
11389   :
11390 else
11391   echo "$ac_t""no" 1>&6
11392 fi
11393
11394
11395         if test $ac_cv_func__beginthread = yes ; then
11396                 cat >> confdefs.h <<\EOF
11397 #define HAVE_NT_THREADS 1
11398 EOF
11399
11400                 ol_cv_nt_threads=yes
11401         fi
11402
11403
11404         if test "$ol_cv_nt_threads" = yes ; then
11405                 ol_link_threads=nt
11406                 ol_with_threads=found
11407                 ol_with_yielding_select=yes
11408
11409                 cat >> confdefs.h <<\EOF
11410 #define HAVE_NT_SERVICE_MANAGER 1
11411 EOF
11412
11413                 cat >> confdefs.h <<\EOF
11414 #define HAVE_NT_EVENT_LOG 1
11415 EOF
11416
11417         fi
11418
11419         if test $ol_with_threads = nt ; then
11420                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11421         fi
11422 fi
11423
11424 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11425         -o $ol_with_threads = posix ; then
11426
11427         for ac_hdr in pthread.h
11428 do
11429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11431 echo "configure:11432: checking for $ac_hdr" >&5
11432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11433   echo $ac_n "(cached) $ac_c" 1>&6
11434 else
11435   cat > conftest.$ac_ext <<EOF
11436 #line 11437 "configure"
11437 #include "confdefs.h"
11438 #include <$ac_hdr>
11439 EOF
11440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11441 { (eval echo configure:11442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11443 if test -z "$ac_err"; then
11444   rm -rf conftest*
11445   eval "ac_cv_header_$ac_safe=yes"
11446 else
11447   echo "$ac_err" >&5
11448   echo "configure: failed program was:" >&5
11449   cat conftest.$ac_ext >&5
11450   rm -rf conftest*
11451   eval "ac_cv_header_$ac_safe=no"
11452 fi
11453 rm -f conftest*
11454 fi
11455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11456   echo "$ac_t""yes" 1>&6
11457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11458   cat >> confdefs.h <<EOF
11459 #define $ac_tr_hdr 1
11460 EOF
11461  
11462 else
11463   echo "$ac_t""no" 1>&6
11464 fi
11465 done
11466
11467
11468         if test $ac_cv_header_pthread_h = yes ; then
11469                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11470 echo "configure:11471: checking POSIX thread version" >&5
11471 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11472   echo $ac_n "(cached) $ac_c" 1>&6
11473 else
11474   
11475         cat > conftest.$ac_ext <<EOF
11476 #line 11477 "configure"
11477 #include "confdefs.h"
11478
11479 #               include <pthread.h>
11480         
11481 int main() {
11482
11483                 int i = PTHREAD_CREATE_JOINABLE;
11484         
11485 ; return 0; }
11486 EOF
11487 if { (eval echo configure:11488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11488   rm -rf conftest*
11489   
11490         cat > conftest.$ac_ext <<EOF
11491 #line 11492 "configure"
11492 #include "confdefs.h"
11493 #include <pthread.h>
11494 EOF
11495 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11496   egrep "pthread_detach" >/dev/null 2>&1; then
11497   rm -rf conftest*
11498   ol_cv_pthread_version=10
11499 else
11500   rm -rf conftest*
11501   ol_cv_pthread_version=8
11502 fi
11503 rm -f conftest*
11504
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   
11510         cat > conftest.$ac_ext <<EOF
11511 #line 11512 "configure"
11512 #include "confdefs.h"
11513
11514 #               include <pthread.h>
11515 #               ifdef PTHREAD_CREATE_UNDETACHED
11516                 draft7
11517 #               endif
11518         
11519 EOF
11520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11521   egrep "draft7" >/dev/null 2>&1; then
11522   rm -rf conftest*
11523   ol_cv_pthread_version=7
11524 else
11525   rm -rf conftest*
11526   
11527         cat > conftest.$ac_ext <<EOF
11528 #line 11529 "configure"
11529 #include "confdefs.h"
11530 #include <pthread.h>
11531 EOF
11532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11533   egrep "pthread_attr_init" >/dev/null 2>&1; then
11534   rm -rf conftest*
11535   ol_cv_pthread_version=6
11536 else
11537   rm -rf conftest*
11538   
11539         cat > conftest.$ac_ext <<EOF
11540 #line 11541 "configure"
11541 #include "confdefs.h"
11542
11543 #               include <pthread.h>
11544 #ifdef          PTHREAD_MUTEX_INITIALIZER
11545                 draft5
11546 #endif
11547         
11548 EOF
11549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11550   egrep "draft5" >/dev/null 2>&1; then
11551   rm -rf conftest*
11552   ol_cv_pthread_version=5
11553 else
11554   rm -rf conftest*
11555   ol_cv_pthread_version=4
11556 fi
11557 rm -f conftest*
11558  
11559 fi
11560 rm -f conftest*
11561  
11562 fi
11563 rm -f conftest*
11564  
11565 fi
11566 rm -f conftest*
11567
11568 fi
11569
11570 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11571
11572
11573                 if test $ol_cv_pthread_version != 0 ; then
11574                         cat >> confdefs.h <<EOF
11575 #define HAVE_PTHREADS $ol_cv_pthread_version
11576 EOF
11577
11578                 else
11579                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11580                 fi
11581
11582                 # consider threads found
11583                 ol_with_threads=found
11584
11585                 
11586         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11587 echo "configure:11588: checking for LinuxThreads pthread.h" >&5
11588 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11589   echo $ac_n "(cached) $ac_c" 1>&6
11590 else
11591   cat > conftest.$ac_ext <<EOF
11592 #line 11593 "configure"
11593 #include "confdefs.h"
11594 #include <pthread.h>
11595 EOF
11596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11597   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11598   rm -rf conftest*
11599   ol_cv_header_linux_threads=yes
11600 else
11601   rm -rf conftest*
11602   ol_cv_header_linux_threads=no
11603 fi
11604 rm -f conftest*
11605
11606                 
11607 fi
11608
11609 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11610         if test $ol_cv_header_linux_threads = yes; then
11611                 cat >> confdefs.h <<\EOF
11612 #define HAVE_LINUX_THREADS 1
11613 EOF
11614
11615         fi
11616
11617                 
11618         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11619 echo "configure:11620: checking for GNU Pth pthread.h" >&5
11620 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11621   echo $ac_n "(cached) $ac_c" 1>&6
11622 else
11623   cat > conftest.$ac_ext <<EOF
11624 #line 11625 "configure"
11625 #include "confdefs.h"
11626 #include <pthread.h>
11627 #ifdef _POSIX_THREAD_IS_GNU_PTH
11628         __gnu_pth__;
11629 #endif
11630
11631 EOF
11632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11633   egrep "__gnu_pth__" >/dev/null 2>&1; then
11634   rm -rf conftest*
11635   ol_cv_header_gnu_pth_pthread_h=yes
11636 else
11637   rm -rf conftest*
11638   ol_cv_header_gnu_pth_pthread_h=no
11639 fi
11640 rm -f conftest*
11641
11642                 
11643 fi
11644
11645 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11646
11647
11648                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11649                         for ac_hdr in sched.h
11650 do
11651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11653 echo "configure:11654: checking for $ac_hdr" >&5
11654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11655   echo $ac_n "(cached) $ac_c" 1>&6
11656 else
11657   cat > conftest.$ac_ext <<EOF
11658 #line 11659 "configure"
11659 #include "confdefs.h"
11660 #include <$ac_hdr>
11661 EOF
11662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11663 { (eval echo configure:11664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11665 if test -z "$ac_err"; then
11666   rm -rf conftest*
11667   eval "ac_cv_header_$ac_safe=yes"
11668 else
11669   echo "$ac_err" >&5
11670   echo "configure: failed program was:" >&5
11671   cat conftest.$ac_ext >&5
11672   rm -rf conftest*
11673   eval "ac_cv_header_$ac_safe=no"
11674 fi
11675 rm -f conftest*
11676 fi
11677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11678   echo "$ac_t""yes" 1>&6
11679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11680   cat >> confdefs.h <<EOF
11681 #define $ac_tr_hdr 1
11682 EOF
11683  
11684 else
11685   echo "$ac_t""no" 1>&6
11686 fi
11687 done
11688
11689                 fi
11690
11691                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11692                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11693 echo "configure:11694: checking for pthread_create in default libraries" >&5
11694 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11695   echo $ac_n "(cached) $ac_c" 1>&6
11696 else
11697   
11698                 if test "$cross_compiling" = yes; then
11699   cat > conftest.$ac_ext <<EOF
11700 #line 11701 "configure"
11701 #include "confdefs.h"
11702 /* pthread test headers */
11703 #include <pthread.h>
11704 #if HAVE_PTHREADS < 7
11705 #include <errno.h>
11706 #endif
11707 #ifndef NULL
11708 #define NULL (void*)0
11709 #endif
11710
11711 static void *task(p)
11712         void *p;
11713 {
11714         return (void *) (p == NULL);
11715 }
11716
11717 int main() {
11718
11719         /* pthread test function */
11720 #ifndef PTHREAD_CREATE_DETACHED
11721 #define PTHREAD_CREATE_DETACHED 1
11722 #endif
11723         pthread_t t;
11724         int status;
11725         int detach = PTHREAD_CREATE_DETACHED;
11726
11727 #if HAVE_PTHREADS > 4
11728         /* Final pthreads */
11729         pthread_attr_t attr;
11730
11731         status = pthread_attr_init(&attr);
11732         if( status ) return status;
11733
11734 #if HAVE_PTHREADS < 7
11735         status = pthread_attr_setdetachstate(&attr, &detach);
11736         if( status < 0 ) status = errno;
11737 #else
11738         status = pthread_attr_setdetachstate(&attr, detach);
11739 #endif
11740         if( status ) return status;
11741         status = pthread_create( &t, &attr, task, NULL );
11742 #if HAVE_PTHREADS < 7
11743         if( status < 0 ) status = errno;
11744 #endif
11745         if( status ) return status;
11746 #else
11747         /* Draft 4 pthreads */
11748         status = pthread_create( &t, pthread_attr_default, task, NULL );
11749         if( status ) return errno;
11750
11751         /* give thread a chance to complete */
11752         /* it should remain joinable and hence detachable */
11753         sleep( 1 );
11754
11755         status = pthread_detach( &t );
11756         if( status ) return errno;
11757 #endif
11758
11759 #ifdef HAVE_LINUX_THREADS
11760         pthread_kill_other_threads_np();
11761 #endif
11762
11763         return 0;
11764
11765 ; return 0; }
11766 EOF
11767 if { (eval echo configure:11768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11768   rm -rf conftest*
11769   ol_cv_pthread_create=yes
11770 else
11771   echo "configure: failed program was:" >&5
11772   cat conftest.$ac_ext >&5
11773   rm -rf conftest*
11774   ol_cv_pthread_create=no
11775 fi
11776 rm -f conftest*
11777 else
11778   cat > conftest.$ac_ext <<EOF
11779 #line 11780 "configure"
11780 #include "confdefs.h"
11781 /* pthread test headers */
11782 #include <pthread.h>
11783 #if HAVE_PTHREADS < 7
11784 #include <errno.h>
11785 #endif
11786 #ifndef NULL
11787 #define NULL (void*)0
11788 #endif
11789
11790 static void *task(p)
11791         void *p;
11792 {
11793         return (void *) (p == NULL);
11794 }
11795
11796
11797 int main(argc, argv)
11798         int argc;
11799         char **argv;
11800 {
11801
11802         /* pthread test function */
11803 #ifndef PTHREAD_CREATE_DETACHED
11804 #define PTHREAD_CREATE_DETACHED 1
11805 #endif
11806         pthread_t t;
11807         int status;
11808         int detach = PTHREAD_CREATE_DETACHED;
11809
11810 #if HAVE_PTHREADS > 4
11811         /* Final pthreads */
11812         pthread_attr_t attr;
11813
11814         status = pthread_attr_init(&attr);
11815         if( status ) return status;
11816
11817 #if HAVE_PTHREADS < 7
11818         status = pthread_attr_setdetachstate(&attr, &detach);
11819         if( status < 0 ) status = errno;
11820 #else
11821         status = pthread_attr_setdetachstate(&attr, detach);
11822 #endif
11823         if( status ) return status;
11824         status = pthread_create( &t, &attr, task, NULL );
11825 #if HAVE_PTHREADS < 7
11826         if( status < 0 ) status = errno;
11827 #endif
11828         if( status ) return status;
11829 #else
11830         /* Draft 4 pthreads */
11831         status = pthread_create( &t, pthread_attr_default, task, NULL );
11832         if( status ) return errno;
11833
11834         /* give thread a chance to complete */
11835         /* it should remain joinable and hence detachable */
11836         sleep( 1 );
11837
11838         status = pthread_detach( &t );
11839         if( status ) return errno;
11840 #endif
11841
11842 #ifdef HAVE_LINUX_THREADS
11843         pthread_kill_other_threads_np();
11844 #endif
11845
11846         return 0;
11847
11848 }
11849
11850 EOF
11851 if { (eval echo configure:11852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11852 then
11853   ol_cv_pthread_create=yes
11854 else
11855   echo "configure: failed program was:" >&5
11856   cat conftest.$ac_ext >&5
11857   rm -fr conftest*
11858   ol_cv_pthread_create=no
11859 fi
11860 rm -fr conftest*
11861 fi
11862
11863 fi
11864
11865 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11866
11867                 if test $ol_cv_pthread_create != no ; then
11868                         ol_link_threads=posix
11869                         ol_link_pthreads=""
11870                 fi
11871                 
11872                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11873 if test "$ol_link_threads" = no ; then
11874         # try -kthread
11875         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11876 echo "configure:11877: checking for pthread link with -kthread" >&5
11877 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11878   echo $ac_n "(cached) $ac_c" 1>&6
11879 else
11880   
11881                 # save the flags
11882                 ol_LIBS="$LIBS"
11883                 LIBS="-kthread $LIBS"
11884
11885                 if test "$cross_compiling" = yes; then
11886   cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 /* pthread test headers */
11890 #include <pthread.h>
11891 #if HAVE_PTHREADS < 7
11892 #include <errno.h>
11893 #endif
11894 #ifndef NULL
11895 #define NULL (void*)0
11896 #endif
11897
11898 static void *task(p)
11899         void *p;
11900 {
11901         return (void *) (p == NULL);
11902 }
11903
11904 int main() {
11905
11906         /* pthread test function */
11907 #ifndef PTHREAD_CREATE_DETACHED
11908 #define PTHREAD_CREATE_DETACHED 1
11909 #endif
11910         pthread_t t;
11911         int status;
11912         int detach = PTHREAD_CREATE_DETACHED;
11913
11914 #if HAVE_PTHREADS > 4
11915         /* Final pthreads */
11916         pthread_attr_t attr;
11917
11918         status = pthread_attr_init(&attr);
11919         if( status ) return status;
11920
11921 #if HAVE_PTHREADS < 7
11922         status = pthread_attr_setdetachstate(&attr, &detach);
11923         if( status < 0 ) status = errno;
11924 #else
11925         status = pthread_attr_setdetachstate(&attr, detach);
11926 #endif
11927         if( status ) return status;
11928         status = pthread_create( &t, &attr, task, NULL );
11929 #if HAVE_PTHREADS < 7
11930         if( status < 0 ) status = errno;
11931 #endif
11932         if( status ) return status;
11933 #else
11934         /* Draft 4 pthreads */
11935         status = pthread_create( &t, pthread_attr_default, task, NULL );
11936         if( status ) return errno;
11937
11938         /* give thread a chance to complete */
11939         /* it should remain joinable and hence detachable */
11940         sleep( 1 );
11941
11942         status = pthread_detach( &t );
11943         if( status ) return errno;
11944 #endif
11945
11946 #ifdef HAVE_LINUX_THREADS
11947         pthread_kill_other_threads_np();
11948 #endif
11949
11950         return 0;
11951
11952 ; return 0; }
11953 EOF
11954 if { (eval echo configure:11955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11955   rm -rf conftest*
11956   ol_cv_pthread_kthread=yes
11957 else
11958   echo "configure: failed program was:" >&5
11959   cat conftest.$ac_ext >&5
11960   rm -rf conftest*
11961   ol_cv_pthread_kthread=no
11962 fi
11963 rm -f conftest*
11964 else
11965   cat > conftest.$ac_ext <<EOF
11966 #line 11967 "configure"
11967 #include "confdefs.h"
11968 /* pthread test headers */
11969 #include <pthread.h>
11970 #if HAVE_PTHREADS < 7
11971 #include <errno.h>
11972 #endif
11973 #ifndef NULL
11974 #define NULL (void*)0
11975 #endif
11976
11977 static void *task(p)
11978         void *p;
11979 {
11980         return (void *) (p == NULL);
11981 }
11982
11983
11984 int main(argc, argv)
11985         int argc;
11986         char **argv;
11987 {
11988
11989         /* pthread test function */
11990 #ifndef PTHREAD_CREATE_DETACHED
11991 #define PTHREAD_CREATE_DETACHED 1
11992 #endif
11993         pthread_t t;
11994         int status;
11995         int detach = PTHREAD_CREATE_DETACHED;
11996
11997 #if HAVE_PTHREADS > 4
11998         /* Final pthreads */
11999         pthread_attr_t attr;
12000
12001         status = pthread_attr_init(&attr);
12002         if( status ) return status;
12003
12004 #if HAVE_PTHREADS < 7
12005         status = pthread_attr_setdetachstate(&attr, &detach);
12006         if( status < 0 ) status = errno;
12007 #else
12008         status = pthread_attr_setdetachstate(&attr, detach);
12009 #endif
12010         if( status ) return status;
12011         status = pthread_create( &t, &attr, task, NULL );
12012 #if HAVE_PTHREADS < 7
12013         if( status < 0 ) status = errno;
12014 #endif
12015         if( status ) return status;
12016 #else
12017         /* Draft 4 pthreads */
12018         status = pthread_create( &t, pthread_attr_default, task, NULL );
12019         if( status ) return errno;
12020
12021         /* give thread a chance to complete */
12022         /* it should remain joinable and hence detachable */
12023         sleep( 1 );
12024
12025         status = pthread_detach( &t );
12026         if( status ) return errno;
12027 #endif
12028
12029 #ifdef HAVE_LINUX_THREADS
12030         pthread_kill_other_threads_np();
12031 #endif
12032
12033         return 0;
12034
12035 }
12036
12037 EOF
12038 if { (eval echo configure:12039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12039 then
12040   ol_cv_pthread_kthread=yes
12041 else
12042   echo "configure: failed program was:" >&5
12043   cat conftest.$ac_ext >&5
12044   rm -fr conftest*
12045   ol_cv_pthread_kthread=no
12046 fi
12047 rm -fr conftest*
12048 fi
12049
12050
12051                 # restore the LIBS
12052                 LIBS="$ol_LIBS"
12053         
12054 fi
12055
12056 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12057
12058         if test $ol_cv_pthread_kthread = yes ; then
12059                 ol_link_pthreads="-kthread"
12060                 ol_link_threads=posix
12061         fi
12062 fi
12063
12064                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12065 if test "$ol_link_threads" = no ; then
12066         # try -pthread
12067         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12068 echo "configure:12069: checking for pthread link with -pthread" >&5
12069 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12070   echo $ac_n "(cached) $ac_c" 1>&6
12071 else
12072   
12073                 # save the flags
12074                 ol_LIBS="$LIBS"
12075                 LIBS="-pthread $LIBS"
12076
12077                 if test "$cross_compiling" = yes; then
12078   cat > conftest.$ac_ext <<EOF
12079 #line 12080 "configure"
12080 #include "confdefs.h"
12081 /* pthread test headers */
12082 #include <pthread.h>
12083 #if HAVE_PTHREADS < 7
12084 #include <errno.h>
12085 #endif
12086 #ifndef NULL
12087 #define NULL (void*)0
12088 #endif
12089
12090 static void *task(p)
12091         void *p;
12092 {
12093         return (void *) (p == NULL);
12094 }
12095
12096 int main() {
12097
12098         /* pthread test function */
12099 #ifndef PTHREAD_CREATE_DETACHED
12100 #define PTHREAD_CREATE_DETACHED 1
12101 #endif
12102         pthread_t t;
12103         int status;
12104         int detach = PTHREAD_CREATE_DETACHED;
12105
12106 #if HAVE_PTHREADS > 4
12107         /* Final pthreads */
12108         pthread_attr_t attr;
12109
12110         status = pthread_attr_init(&attr);
12111         if( status ) return status;
12112
12113 #if HAVE_PTHREADS < 7
12114         status = pthread_attr_setdetachstate(&attr, &detach);
12115         if( status < 0 ) status = errno;
12116 #else
12117         status = pthread_attr_setdetachstate(&attr, detach);
12118 #endif
12119         if( status ) return status;
12120         status = pthread_create( &t, &attr, task, NULL );
12121 #if HAVE_PTHREADS < 7
12122         if( status < 0 ) status = errno;
12123 #endif
12124         if( status ) return status;
12125 #else
12126         /* Draft 4 pthreads */
12127         status = pthread_create( &t, pthread_attr_default, task, NULL );
12128         if( status ) return errno;
12129
12130         /* give thread a chance to complete */
12131         /* it should remain joinable and hence detachable */
12132         sleep( 1 );
12133
12134         status = pthread_detach( &t );
12135         if( status ) return errno;
12136 #endif
12137
12138 #ifdef HAVE_LINUX_THREADS
12139         pthread_kill_other_threads_np();
12140 #endif
12141
12142         return 0;
12143
12144 ; return 0; }
12145 EOF
12146 if { (eval echo configure:12147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12147   rm -rf conftest*
12148   ol_cv_pthread_pthread=yes
12149 else
12150   echo "configure: failed program was:" >&5
12151   cat conftest.$ac_ext >&5
12152   rm -rf conftest*
12153   ol_cv_pthread_pthread=no
12154 fi
12155 rm -f conftest*
12156 else
12157   cat > conftest.$ac_ext <<EOF
12158 #line 12159 "configure"
12159 #include "confdefs.h"
12160 /* pthread test headers */
12161 #include <pthread.h>
12162 #if HAVE_PTHREADS < 7
12163 #include <errno.h>
12164 #endif
12165 #ifndef NULL
12166 #define NULL (void*)0
12167 #endif
12168
12169 static void *task(p)
12170         void *p;
12171 {
12172         return (void *) (p == NULL);
12173 }
12174
12175
12176 int main(argc, argv)
12177         int argc;
12178         char **argv;
12179 {
12180
12181         /* pthread test function */
12182 #ifndef PTHREAD_CREATE_DETACHED
12183 #define PTHREAD_CREATE_DETACHED 1
12184 #endif
12185         pthread_t t;
12186         int status;
12187         int detach = PTHREAD_CREATE_DETACHED;
12188
12189 #if HAVE_PTHREADS > 4
12190         /* Final pthreads */
12191         pthread_attr_t attr;
12192
12193         status = pthread_attr_init(&attr);
12194         if( status ) return status;
12195
12196 #if HAVE_PTHREADS < 7
12197         status = pthread_attr_setdetachstate(&attr, &detach);
12198         if( status < 0 ) status = errno;
12199 #else
12200         status = pthread_attr_setdetachstate(&attr, detach);
12201 #endif
12202         if( status ) return status;
12203         status = pthread_create( &t, &attr, task, NULL );
12204 #if HAVE_PTHREADS < 7
12205         if( status < 0 ) status = errno;
12206 #endif
12207         if( status ) return status;
12208 #else
12209         /* Draft 4 pthreads */
12210         status = pthread_create( &t, pthread_attr_default, task, NULL );
12211         if( status ) return errno;
12212
12213         /* give thread a chance to complete */
12214         /* it should remain joinable and hence detachable */
12215         sleep( 1 );
12216
12217         status = pthread_detach( &t );
12218         if( status ) return errno;
12219 #endif
12220
12221 #ifdef HAVE_LINUX_THREADS
12222         pthread_kill_other_threads_np();
12223 #endif
12224
12225         return 0;
12226
12227 }
12228
12229 EOF
12230 if { (eval echo configure:12231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12231 then
12232   ol_cv_pthread_pthread=yes
12233 else
12234   echo "configure: failed program was:" >&5
12235   cat conftest.$ac_ext >&5
12236   rm -fr conftest*
12237   ol_cv_pthread_pthread=no
12238 fi
12239 rm -fr conftest*
12240 fi
12241
12242
12243                 # restore the LIBS
12244                 LIBS="$ol_LIBS"
12245         
12246 fi
12247
12248 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12249
12250         if test $ol_cv_pthread_pthread = yes ; then
12251                 ol_link_pthreads="-pthread"
12252                 ol_link_threads=posix
12253         fi
12254 fi
12255
12256                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12257 if test "$ol_link_threads" = no ; then
12258         # try -pthreads
12259         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12260 echo "configure:12261: checking for pthread link with -pthreads" >&5
12261 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12262   echo $ac_n "(cached) $ac_c" 1>&6
12263 else
12264   
12265                 # save the flags
12266                 ol_LIBS="$LIBS"
12267                 LIBS="-pthreads $LIBS"
12268
12269                 if test "$cross_compiling" = yes; then
12270   cat > conftest.$ac_ext <<EOF
12271 #line 12272 "configure"
12272 #include "confdefs.h"
12273 /* pthread test headers */
12274 #include <pthread.h>
12275 #if HAVE_PTHREADS < 7
12276 #include <errno.h>
12277 #endif
12278 #ifndef NULL
12279 #define NULL (void*)0
12280 #endif
12281
12282 static void *task(p)
12283         void *p;
12284 {
12285         return (void *) (p == NULL);
12286 }
12287
12288 int main() {
12289
12290         /* pthread test function */
12291 #ifndef PTHREAD_CREATE_DETACHED
12292 #define PTHREAD_CREATE_DETACHED 1
12293 #endif
12294         pthread_t t;
12295         int status;
12296         int detach = PTHREAD_CREATE_DETACHED;
12297
12298 #if HAVE_PTHREADS > 4
12299         /* Final pthreads */
12300         pthread_attr_t attr;
12301
12302         status = pthread_attr_init(&attr);
12303         if( status ) return status;
12304
12305 #if HAVE_PTHREADS < 7
12306         status = pthread_attr_setdetachstate(&attr, &detach);
12307         if( status < 0 ) status = errno;
12308 #else
12309         status = pthread_attr_setdetachstate(&attr, detach);
12310 #endif
12311         if( status ) return status;
12312         status = pthread_create( &t, &attr, task, NULL );
12313 #if HAVE_PTHREADS < 7
12314         if( status < 0 ) status = errno;
12315 #endif
12316         if( status ) return status;
12317 #else
12318         /* Draft 4 pthreads */
12319         status = pthread_create( &t, pthread_attr_default, task, NULL );
12320         if( status ) return errno;
12321
12322         /* give thread a chance to complete */
12323         /* it should remain joinable and hence detachable */
12324         sleep( 1 );
12325
12326         status = pthread_detach( &t );
12327         if( status ) return errno;
12328 #endif
12329
12330 #ifdef HAVE_LINUX_THREADS
12331         pthread_kill_other_threads_np();
12332 #endif
12333
12334         return 0;
12335
12336 ; return 0; }
12337 EOF
12338 if { (eval echo configure:12339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12339   rm -rf conftest*
12340   ol_cv_pthread_pthreads=yes
12341 else
12342   echo "configure: failed program was:" >&5
12343   cat conftest.$ac_ext >&5
12344   rm -rf conftest*
12345   ol_cv_pthread_pthreads=no
12346 fi
12347 rm -f conftest*
12348 else
12349   cat > conftest.$ac_ext <<EOF
12350 #line 12351 "configure"
12351 #include "confdefs.h"
12352 /* pthread test headers */
12353 #include <pthread.h>
12354 #if HAVE_PTHREADS < 7
12355 #include <errno.h>
12356 #endif
12357 #ifndef NULL
12358 #define NULL (void*)0
12359 #endif
12360
12361 static void *task(p)
12362         void *p;
12363 {
12364         return (void *) (p == NULL);
12365 }
12366
12367
12368 int main(argc, argv)
12369         int argc;
12370         char **argv;
12371 {
12372
12373         /* pthread test function */
12374 #ifndef PTHREAD_CREATE_DETACHED
12375 #define PTHREAD_CREATE_DETACHED 1
12376 #endif
12377         pthread_t t;
12378         int status;
12379         int detach = PTHREAD_CREATE_DETACHED;
12380
12381 #if HAVE_PTHREADS > 4
12382         /* Final pthreads */
12383         pthread_attr_t attr;
12384
12385         status = pthread_attr_init(&attr);
12386         if( status ) return status;
12387
12388 #if HAVE_PTHREADS < 7
12389         status = pthread_attr_setdetachstate(&attr, &detach);
12390         if( status < 0 ) status = errno;
12391 #else
12392         status = pthread_attr_setdetachstate(&attr, detach);
12393 #endif
12394         if( status ) return status;
12395         status = pthread_create( &t, &attr, task, NULL );
12396 #if HAVE_PTHREADS < 7
12397         if( status < 0 ) status = errno;
12398 #endif
12399         if( status ) return status;
12400 #else
12401         /* Draft 4 pthreads */
12402         status = pthread_create( &t, pthread_attr_default, task, NULL );
12403         if( status ) return errno;
12404
12405         /* give thread a chance to complete */
12406         /* it should remain joinable and hence detachable */
12407         sleep( 1 );
12408
12409         status = pthread_detach( &t );
12410         if( status ) return errno;
12411 #endif
12412
12413 #ifdef HAVE_LINUX_THREADS
12414         pthread_kill_other_threads_np();
12415 #endif
12416
12417         return 0;
12418
12419 }
12420
12421 EOF
12422 if { (eval echo configure:12423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12423 then
12424   ol_cv_pthread_pthreads=yes
12425 else
12426   echo "configure: failed program was:" >&5
12427   cat conftest.$ac_ext >&5
12428   rm -fr conftest*
12429   ol_cv_pthread_pthreads=no
12430 fi
12431 rm -fr conftest*
12432 fi
12433
12434
12435                 # restore the LIBS
12436                 LIBS="$ol_LIBS"
12437         
12438 fi
12439
12440 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12441
12442         if test $ol_cv_pthread_pthreads = yes ; then
12443                 ol_link_pthreads="-pthreads"
12444                 ol_link_threads=posix
12445         fi
12446 fi
12447
12448                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12449 if test "$ol_link_threads" = no ; then
12450         # try -mthreads
12451         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12452 echo "configure:12453: checking for pthread link with -mthreads" >&5
12453 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12454   echo $ac_n "(cached) $ac_c" 1>&6
12455 else
12456   
12457                 # save the flags
12458                 ol_LIBS="$LIBS"
12459                 LIBS="-mthreads $LIBS"
12460
12461                 if test "$cross_compiling" = yes; then
12462   cat > conftest.$ac_ext <<EOF
12463 #line 12464 "configure"
12464 #include "confdefs.h"
12465 /* pthread test headers */
12466 #include <pthread.h>
12467 #if HAVE_PTHREADS < 7
12468 #include <errno.h>
12469 #endif
12470 #ifndef NULL
12471 #define NULL (void*)0
12472 #endif
12473
12474 static void *task(p)
12475         void *p;
12476 {
12477         return (void *) (p == NULL);
12478 }
12479
12480 int main() {
12481
12482         /* pthread test function */
12483 #ifndef PTHREAD_CREATE_DETACHED
12484 #define PTHREAD_CREATE_DETACHED 1
12485 #endif
12486         pthread_t t;
12487         int status;
12488         int detach = PTHREAD_CREATE_DETACHED;
12489
12490 #if HAVE_PTHREADS > 4
12491         /* Final pthreads */
12492         pthread_attr_t attr;
12493
12494         status = pthread_attr_init(&attr);
12495         if( status ) return status;
12496
12497 #if HAVE_PTHREADS < 7
12498         status = pthread_attr_setdetachstate(&attr, &detach);
12499         if( status < 0 ) status = errno;
12500 #else
12501         status = pthread_attr_setdetachstate(&attr, detach);
12502 #endif
12503         if( status ) return status;
12504         status = pthread_create( &t, &attr, task, NULL );
12505 #if HAVE_PTHREADS < 7
12506         if( status < 0 ) status = errno;
12507 #endif
12508         if( status ) return status;
12509 #else
12510         /* Draft 4 pthreads */
12511         status = pthread_create( &t, pthread_attr_default, task, NULL );
12512         if( status ) return errno;
12513
12514         /* give thread a chance to complete */
12515         /* it should remain joinable and hence detachable */
12516         sleep( 1 );
12517
12518         status = pthread_detach( &t );
12519         if( status ) return errno;
12520 #endif
12521
12522 #ifdef HAVE_LINUX_THREADS
12523         pthread_kill_other_threads_np();
12524 #endif
12525
12526         return 0;
12527
12528 ; return 0; }
12529 EOF
12530 if { (eval echo configure:12531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12531   rm -rf conftest*
12532   ol_cv_pthread_mthreads=yes
12533 else
12534   echo "configure: failed program was:" >&5
12535   cat conftest.$ac_ext >&5
12536   rm -rf conftest*
12537   ol_cv_pthread_mthreads=no
12538 fi
12539 rm -f conftest*
12540 else
12541   cat > conftest.$ac_ext <<EOF
12542 #line 12543 "configure"
12543 #include "confdefs.h"
12544 /* pthread test headers */
12545 #include <pthread.h>
12546 #if HAVE_PTHREADS < 7
12547 #include <errno.h>
12548 #endif
12549 #ifndef NULL
12550 #define NULL (void*)0
12551 #endif
12552
12553 static void *task(p)
12554         void *p;
12555 {
12556         return (void *) (p == NULL);
12557 }
12558
12559
12560 int main(argc, argv)
12561         int argc;
12562         char **argv;
12563 {
12564
12565         /* pthread test function */
12566 #ifndef PTHREAD_CREATE_DETACHED
12567 #define PTHREAD_CREATE_DETACHED 1
12568 #endif
12569         pthread_t t;
12570         int status;
12571         int detach = PTHREAD_CREATE_DETACHED;
12572
12573 #if HAVE_PTHREADS > 4
12574         /* Final pthreads */
12575         pthread_attr_t attr;
12576
12577         status = pthread_attr_init(&attr);
12578         if( status ) return status;
12579
12580 #if HAVE_PTHREADS < 7
12581         status = pthread_attr_setdetachstate(&attr, &detach);
12582         if( status < 0 ) status = errno;
12583 #else
12584         status = pthread_attr_setdetachstate(&attr, detach);
12585 #endif
12586         if( status ) return status;
12587         status = pthread_create( &t, &attr, task, NULL );
12588 #if HAVE_PTHREADS < 7
12589         if( status < 0 ) status = errno;
12590 #endif
12591         if( status ) return status;
12592 #else
12593         /* Draft 4 pthreads */
12594         status = pthread_create( &t, pthread_attr_default, task, NULL );
12595         if( status ) return errno;
12596
12597         /* give thread a chance to complete */
12598         /* it should remain joinable and hence detachable */
12599         sleep( 1 );
12600
12601         status = pthread_detach( &t );
12602         if( status ) return errno;
12603 #endif
12604
12605 #ifdef HAVE_LINUX_THREADS
12606         pthread_kill_other_threads_np();
12607 #endif
12608
12609         return 0;
12610
12611 }
12612
12613 EOF
12614 if { (eval echo configure:12615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12615 then
12616   ol_cv_pthread_mthreads=yes
12617 else
12618   echo "configure: failed program was:" >&5
12619   cat conftest.$ac_ext >&5
12620   rm -fr conftest*
12621   ol_cv_pthread_mthreads=no
12622 fi
12623 rm -fr conftest*
12624 fi
12625
12626
12627                 # restore the LIBS
12628                 LIBS="$ol_LIBS"
12629         
12630 fi
12631
12632 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12633
12634         if test $ol_cv_pthread_mthreads = yes ; then
12635                 ol_link_pthreads="-mthreads"
12636                 ol_link_threads=posix
12637         fi
12638 fi
12639
12640                 # Pthread try link: -thread (ol_cv_pthread_thread)
12641 if test "$ol_link_threads" = no ; then
12642         # try -thread
12643         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12644 echo "configure:12645: checking for pthread link with -thread" >&5
12645 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12646   echo $ac_n "(cached) $ac_c" 1>&6
12647 else
12648   
12649                 # save the flags
12650                 ol_LIBS="$LIBS"
12651                 LIBS="-thread $LIBS"
12652
12653                 if test "$cross_compiling" = yes; then
12654   cat > conftest.$ac_ext <<EOF
12655 #line 12656 "configure"
12656 #include "confdefs.h"
12657 /* pthread test headers */
12658 #include <pthread.h>
12659 #if HAVE_PTHREADS < 7
12660 #include <errno.h>
12661 #endif
12662 #ifndef NULL
12663 #define NULL (void*)0
12664 #endif
12665
12666 static void *task(p)
12667         void *p;
12668 {
12669         return (void *) (p == NULL);
12670 }
12671
12672 int main() {
12673
12674         /* pthread test function */
12675 #ifndef PTHREAD_CREATE_DETACHED
12676 #define PTHREAD_CREATE_DETACHED 1
12677 #endif
12678         pthread_t t;
12679         int status;
12680         int detach = PTHREAD_CREATE_DETACHED;
12681
12682 #if HAVE_PTHREADS > 4
12683         /* Final pthreads */
12684         pthread_attr_t attr;
12685
12686         status = pthread_attr_init(&attr);
12687         if( status ) return status;
12688
12689 #if HAVE_PTHREADS < 7
12690         status = pthread_attr_setdetachstate(&attr, &detach);
12691         if( status < 0 ) status = errno;
12692 #else
12693         status = pthread_attr_setdetachstate(&attr, detach);
12694 #endif
12695         if( status ) return status;
12696         status = pthread_create( &t, &attr, task, NULL );
12697 #if HAVE_PTHREADS < 7
12698         if( status < 0 ) status = errno;
12699 #endif
12700         if( status ) return status;
12701 #else
12702         /* Draft 4 pthreads */
12703         status = pthread_create( &t, pthread_attr_default, task, NULL );
12704         if( status ) return errno;
12705
12706         /* give thread a chance to complete */
12707         /* it should remain joinable and hence detachable */
12708         sleep( 1 );
12709
12710         status = pthread_detach( &t );
12711         if( status ) return errno;
12712 #endif
12713
12714 #ifdef HAVE_LINUX_THREADS
12715         pthread_kill_other_threads_np();
12716 #endif
12717
12718         return 0;
12719
12720 ; return 0; }
12721 EOF
12722 if { (eval echo configure:12723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12723   rm -rf conftest*
12724   ol_cv_pthread_thread=yes
12725 else
12726   echo "configure: failed program was:" >&5
12727   cat conftest.$ac_ext >&5
12728   rm -rf conftest*
12729   ol_cv_pthread_thread=no
12730 fi
12731 rm -f conftest*
12732 else
12733   cat > conftest.$ac_ext <<EOF
12734 #line 12735 "configure"
12735 #include "confdefs.h"
12736 /* pthread test headers */
12737 #include <pthread.h>
12738 #if HAVE_PTHREADS < 7
12739 #include <errno.h>
12740 #endif
12741 #ifndef NULL
12742 #define NULL (void*)0
12743 #endif
12744
12745 static void *task(p)
12746         void *p;
12747 {
12748         return (void *) (p == NULL);
12749 }
12750
12751
12752 int main(argc, argv)
12753         int argc;
12754         char **argv;
12755 {
12756
12757         /* pthread test function */
12758 #ifndef PTHREAD_CREATE_DETACHED
12759 #define PTHREAD_CREATE_DETACHED 1
12760 #endif
12761         pthread_t t;
12762         int status;
12763         int detach = PTHREAD_CREATE_DETACHED;
12764
12765 #if HAVE_PTHREADS > 4
12766         /* Final pthreads */
12767         pthread_attr_t attr;
12768
12769         status = pthread_attr_init(&attr);
12770         if( status ) return status;
12771
12772 #if HAVE_PTHREADS < 7
12773         status = pthread_attr_setdetachstate(&attr, &detach);
12774         if( status < 0 ) status = errno;
12775 #else
12776         status = pthread_attr_setdetachstate(&attr, detach);
12777 #endif
12778         if( status ) return status;
12779         status = pthread_create( &t, &attr, task, NULL );
12780 #if HAVE_PTHREADS < 7
12781         if( status < 0 ) status = errno;
12782 #endif
12783         if( status ) return status;
12784 #else
12785         /* Draft 4 pthreads */
12786         status = pthread_create( &t, pthread_attr_default, task, NULL );
12787         if( status ) return errno;
12788
12789         /* give thread a chance to complete */
12790         /* it should remain joinable and hence detachable */
12791         sleep( 1 );
12792
12793         status = pthread_detach( &t );
12794         if( status ) return errno;
12795 #endif
12796
12797 #ifdef HAVE_LINUX_THREADS
12798         pthread_kill_other_threads_np();
12799 #endif
12800
12801         return 0;
12802
12803 }
12804
12805 EOF
12806 if { (eval echo configure:12807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12807 then
12808   ol_cv_pthread_thread=yes
12809 else
12810   echo "configure: failed program was:" >&5
12811   cat conftest.$ac_ext >&5
12812   rm -fr conftest*
12813   ol_cv_pthread_thread=no
12814 fi
12815 rm -fr conftest*
12816 fi
12817
12818
12819                 # restore the LIBS
12820                 LIBS="$ol_LIBS"
12821         
12822 fi
12823
12824 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12825
12826         if test $ol_cv_pthread_thread = yes ; then
12827                 ol_link_pthreads="-thread"
12828                 ol_link_threads=posix
12829         fi
12830 fi
12831
12832
12833                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12834 if test "$ol_link_threads" = no ; then
12835         # try -lpthread -lmach -lexc -lc_r
12836         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12837 echo "configure:12838: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12838 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12839   echo $ac_n "(cached) $ac_c" 1>&6
12840 else
12841   
12842                 # save the flags
12843                 ol_LIBS="$LIBS"
12844                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12845
12846                 if test "$cross_compiling" = yes; then
12847   cat > conftest.$ac_ext <<EOF
12848 #line 12849 "configure"
12849 #include "confdefs.h"
12850 /* pthread test headers */
12851 #include <pthread.h>
12852 #if HAVE_PTHREADS < 7
12853 #include <errno.h>
12854 #endif
12855 #ifndef NULL
12856 #define NULL (void*)0
12857 #endif
12858
12859 static void *task(p)
12860         void *p;
12861 {
12862         return (void *) (p == NULL);
12863 }
12864
12865 int main() {
12866
12867         /* pthread test function */
12868 #ifndef PTHREAD_CREATE_DETACHED
12869 #define PTHREAD_CREATE_DETACHED 1
12870 #endif
12871         pthread_t t;
12872         int status;
12873         int detach = PTHREAD_CREATE_DETACHED;
12874
12875 #if HAVE_PTHREADS > 4
12876         /* Final pthreads */
12877         pthread_attr_t attr;
12878
12879         status = pthread_attr_init(&attr);
12880         if( status ) return status;
12881
12882 #if HAVE_PTHREADS < 7
12883         status = pthread_attr_setdetachstate(&attr, &detach);
12884         if( status < 0 ) status = errno;
12885 #else
12886         status = pthread_attr_setdetachstate(&attr, detach);
12887 #endif
12888         if( status ) return status;
12889         status = pthread_create( &t, &attr, task, NULL );
12890 #if HAVE_PTHREADS < 7
12891         if( status < 0 ) status = errno;
12892 #endif
12893         if( status ) return status;
12894 #else
12895         /* Draft 4 pthreads */
12896         status = pthread_create( &t, pthread_attr_default, task, NULL );
12897         if( status ) return errno;
12898
12899         /* give thread a chance to complete */
12900         /* it should remain joinable and hence detachable */
12901         sleep( 1 );
12902
12903         status = pthread_detach( &t );
12904         if( status ) return errno;
12905 #endif
12906
12907 #ifdef HAVE_LINUX_THREADS
12908         pthread_kill_other_threads_np();
12909 #endif
12910
12911         return 0;
12912
12913 ; return 0; }
12914 EOF
12915 if { (eval echo configure:12916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12916   rm -rf conftest*
12917   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12918 else
12919   echo "configure: failed program was:" >&5
12920   cat conftest.$ac_ext >&5
12921   rm -rf conftest*
12922   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12923 fi
12924 rm -f conftest*
12925 else
12926   cat > conftest.$ac_ext <<EOF
12927 #line 12928 "configure"
12928 #include "confdefs.h"
12929 /* pthread test headers */
12930 #include <pthread.h>
12931 #if HAVE_PTHREADS < 7
12932 #include <errno.h>
12933 #endif
12934 #ifndef NULL
12935 #define NULL (void*)0
12936 #endif
12937
12938 static void *task(p)
12939         void *p;
12940 {
12941         return (void *) (p == NULL);
12942 }
12943
12944
12945 int main(argc, argv)
12946         int argc;
12947         char **argv;
12948 {
12949
12950         /* pthread test function */
12951 #ifndef PTHREAD_CREATE_DETACHED
12952 #define PTHREAD_CREATE_DETACHED 1
12953 #endif
12954         pthread_t t;
12955         int status;
12956         int detach = PTHREAD_CREATE_DETACHED;
12957
12958 #if HAVE_PTHREADS > 4
12959         /* Final pthreads */
12960         pthread_attr_t attr;
12961
12962         status = pthread_attr_init(&attr);
12963         if( status ) return status;
12964
12965 #if HAVE_PTHREADS < 7
12966         status = pthread_attr_setdetachstate(&attr, &detach);
12967         if( status < 0 ) status = errno;
12968 #else
12969         status = pthread_attr_setdetachstate(&attr, detach);
12970 #endif
12971         if( status ) return status;
12972         status = pthread_create( &t, &attr, task, NULL );
12973 #if HAVE_PTHREADS < 7
12974         if( status < 0 ) status = errno;
12975 #endif
12976         if( status ) return status;
12977 #else
12978         /* Draft 4 pthreads */
12979         status = pthread_create( &t, pthread_attr_default, task, NULL );
12980         if( status ) return errno;
12981
12982         /* give thread a chance to complete */
12983         /* it should remain joinable and hence detachable */
12984         sleep( 1 );
12985
12986         status = pthread_detach( &t );
12987         if( status ) return errno;
12988 #endif
12989
12990 #ifdef HAVE_LINUX_THREADS
12991         pthread_kill_other_threads_np();
12992 #endif
12993
12994         return 0;
12995
12996 }
12997
12998 EOF
12999 if { (eval echo configure:13000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13000 then
13001   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13002 else
13003   echo "configure: failed program was:" >&5
13004   cat conftest.$ac_ext >&5
13005   rm -fr conftest*
13006   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13007 fi
13008 rm -fr conftest*
13009 fi
13010
13011
13012                 # restore the LIBS
13013                 LIBS="$ol_LIBS"
13014         
13015 fi
13016
13017 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13018
13019         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13020                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13021                 ol_link_threads=posix
13022         fi
13023 fi
13024
13025                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13026 if test "$ol_link_threads" = no ; then
13027         # try -lpthread -lmach -lexc
13028         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13029 echo "configure:13030: checking for pthread link with -lpthread -lmach -lexc" >&5
13030 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13031   echo $ac_n "(cached) $ac_c" 1>&6
13032 else
13033   
13034                 # save the flags
13035                 ol_LIBS="$LIBS"
13036                 LIBS="-lpthread -lmach -lexc $LIBS"
13037
13038                 if test "$cross_compiling" = yes; then
13039   cat > conftest.$ac_ext <<EOF
13040 #line 13041 "configure"
13041 #include "confdefs.h"
13042 /* pthread test headers */
13043 #include <pthread.h>
13044 #if HAVE_PTHREADS < 7
13045 #include <errno.h>
13046 #endif
13047 #ifndef NULL
13048 #define NULL (void*)0
13049 #endif
13050
13051 static void *task(p)
13052         void *p;
13053 {
13054         return (void *) (p == NULL);
13055 }
13056
13057 int main() {
13058
13059         /* pthread test function */
13060 #ifndef PTHREAD_CREATE_DETACHED
13061 #define PTHREAD_CREATE_DETACHED 1
13062 #endif
13063         pthread_t t;
13064         int status;
13065         int detach = PTHREAD_CREATE_DETACHED;
13066
13067 #if HAVE_PTHREADS > 4
13068         /* Final pthreads */
13069         pthread_attr_t attr;
13070
13071         status = pthread_attr_init(&attr);
13072         if( status ) return status;
13073
13074 #if HAVE_PTHREADS < 7
13075         status = pthread_attr_setdetachstate(&attr, &detach);
13076         if( status < 0 ) status = errno;
13077 #else
13078         status = pthread_attr_setdetachstate(&attr, detach);
13079 #endif
13080         if( status ) return status;
13081         status = pthread_create( &t, &attr, task, NULL );
13082 #if HAVE_PTHREADS < 7
13083         if( status < 0 ) status = errno;
13084 #endif
13085         if( status ) return status;
13086 #else
13087         /* Draft 4 pthreads */
13088         status = pthread_create( &t, pthread_attr_default, task, NULL );
13089         if( status ) return errno;
13090
13091         /* give thread a chance to complete */
13092         /* it should remain joinable and hence detachable */
13093         sleep( 1 );
13094
13095         status = pthread_detach( &t );
13096         if( status ) return errno;
13097 #endif
13098
13099 #ifdef HAVE_LINUX_THREADS
13100         pthread_kill_other_threads_np();
13101 #endif
13102
13103         return 0;
13104
13105 ; return 0; }
13106 EOF
13107 if { (eval echo configure:13108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13108   rm -rf conftest*
13109   ol_cv_pthread_lpthread_lmach_lexc=yes
13110 else
13111   echo "configure: failed program was:" >&5
13112   cat conftest.$ac_ext >&5
13113   rm -rf conftest*
13114   ol_cv_pthread_lpthread_lmach_lexc=no
13115 fi
13116 rm -f conftest*
13117 else
13118   cat > conftest.$ac_ext <<EOF
13119 #line 13120 "configure"
13120 #include "confdefs.h"
13121 /* pthread test headers */
13122 #include <pthread.h>
13123 #if HAVE_PTHREADS < 7
13124 #include <errno.h>
13125 #endif
13126 #ifndef NULL
13127 #define NULL (void*)0
13128 #endif
13129
13130 static void *task(p)
13131         void *p;
13132 {
13133         return (void *) (p == NULL);
13134 }
13135
13136
13137 int main(argc, argv)
13138         int argc;
13139         char **argv;
13140 {
13141
13142         /* pthread test function */
13143 #ifndef PTHREAD_CREATE_DETACHED
13144 #define PTHREAD_CREATE_DETACHED 1
13145 #endif
13146         pthread_t t;
13147         int status;
13148         int detach = PTHREAD_CREATE_DETACHED;
13149
13150 #if HAVE_PTHREADS > 4
13151         /* Final pthreads */
13152         pthread_attr_t attr;
13153
13154         status = pthread_attr_init(&attr);
13155         if( status ) return status;
13156
13157 #if HAVE_PTHREADS < 7
13158         status = pthread_attr_setdetachstate(&attr, &detach);
13159         if( status < 0 ) status = errno;
13160 #else
13161         status = pthread_attr_setdetachstate(&attr, detach);
13162 #endif
13163         if( status ) return status;
13164         status = pthread_create( &t, &attr, task, NULL );
13165 #if HAVE_PTHREADS < 7
13166         if( status < 0 ) status = errno;
13167 #endif
13168         if( status ) return status;
13169 #else
13170         /* Draft 4 pthreads */
13171         status = pthread_create( &t, pthread_attr_default, task, NULL );
13172         if( status ) return errno;
13173
13174         /* give thread a chance to complete */
13175         /* it should remain joinable and hence detachable */
13176         sleep( 1 );
13177
13178         status = pthread_detach( &t );
13179         if( status ) return errno;
13180 #endif
13181
13182 #ifdef HAVE_LINUX_THREADS
13183         pthread_kill_other_threads_np();
13184 #endif
13185
13186         return 0;
13187
13188 }
13189
13190 EOF
13191 if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13192 then
13193   ol_cv_pthread_lpthread_lmach_lexc=yes
13194 else
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -fr conftest*
13198   ol_cv_pthread_lpthread_lmach_lexc=no
13199 fi
13200 rm -fr conftest*
13201 fi
13202
13203
13204                 # restore the LIBS
13205                 LIBS="$ol_LIBS"
13206         
13207 fi
13208
13209 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13210
13211         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13212                 ol_link_pthreads="-lpthread -lmach -lexc"
13213                 ol_link_threads=posix
13214         fi
13215 fi
13216
13217
13218                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13219 if test "$ol_link_threads" = no ; then
13220         # try -lpthread -Wl,-woff,85
13221         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13222 echo "configure:13223: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13223 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13224   echo $ac_n "(cached) $ac_c" 1>&6
13225 else
13226   
13227                 # save the flags
13228                 ol_LIBS="$LIBS"
13229                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13230
13231                 if test "$cross_compiling" = yes; then
13232   cat > conftest.$ac_ext <<EOF
13233 #line 13234 "configure"
13234 #include "confdefs.h"
13235 /* pthread test headers */
13236 #include <pthread.h>
13237 #if HAVE_PTHREADS < 7
13238 #include <errno.h>
13239 #endif
13240 #ifndef NULL
13241 #define NULL (void*)0
13242 #endif
13243
13244 static void *task(p)
13245         void *p;
13246 {
13247         return (void *) (p == NULL);
13248 }
13249
13250 int main() {
13251
13252         /* pthread test function */
13253 #ifndef PTHREAD_CREATE_DETACHED
13254 #define PTHREAD_CREATE_DETACHED 1
13255 #endif
13256         pthread_t t;
13257         int status;
13258         int detach = PTHREAD_CREATE_DETACHED;
13259
13260 #if HAVE_PTHREADS > 4
13261         /* Final pthreads */
13262         pthread_attr_t attr;
13263
13264         status = pthread_attr_init(&attr);
13265         if( status ) return status;
13266
13267 #if HAVE_PTHREADS < 7
13268         status = pthread_attr_setdetachstate(&attr, &detach);
13269         if( status < 0 ) status = errno;
13270 #else
13271         status = pthread_attr_setdetachstate(&attr, detach);
13272 #endif
13273         if( status ) return status;
13274         status = pthread_create( &t, &attr, task, NULL );
13275 #if HAVE_PTHREADS < 7
13276         if( status < 0 ) status = errno;
13277 #endif
13278         if( status ) return status;
13279 #else
13280         /* Draft 4 pthreads */
13281         status = pthread_create( &t, pthread_attr_default, task, NULL );
13282         if( status ) return errno;
13283
13284         /* give thread a chance to complete */
13285         /* it should remain joinable and hence detachable */
13286         sleep( 1 );
13287
13288         status = pthread_detach( &t );
13289         if( status ) return errno;
13290 #endif
13291
13292 #ifdef HAVE_LINUX_THREADS
13293         pthread_kill_other_threads_np();
13294 #endif
13295
13296         return 0;
13297
13298 ; return 0; }
13299 EOF
13300 if { (eval echo configure:13301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13301   rm -rf conftest*
13302   ol_cv_pthread_lib_lpthread_woff=yes
13303 else
13304   echo "configure: failed program was:" >&5
13305   cat conftest.$ac_ext >&5
13306   rm -rf conftest*
13307   ol_cv_pthread_lib_lpthread_woff=no
13308 fi
13309 rm -f conftest*
13310 else
13311   cat > conftest.$ac_ext <<EOF
13312 #line 13313 "configure"
13313 #include "confdefs.h"
13314 /* pthread test headers */
13315 #include <pthread.h>
13316 #if HAVE_PTHREADS < 7
13317 #include <errno.h>
13318 #endif
13319 #ifndef NULL
13320 #define NULL (void*)0
13321 #endif
13322
13323 static void *task(p)
13324         void *p;
13325 {
13326         return (void *) (p == NULL);
13327 }
13328
13329
13330 int main(argc, argv)
13331         int argc;
13332         char **argv;
13333 {
13334
13335         /* pthread test function */
13336 #ifndef PTHREAD_CREATE_DETACHED
13337 #define PTHREAD_CREATE_DETACHED 1
13338 #endif
13339         pthread_t t;
13340         int status;
13341         int detach = PTHREAD_CREATE_DETACHED;
13342
13343 #if HAVE_PTHREADS > 4
13344         /* Final pthreads */
13345         pthread_attr_t attr;
13346
13347         status = pthread_attr_init(&attr);
13348         if( status ) return status;
13349
13350 #if HAVE_PTHREADS < 7
13351         status = pthread_attr_setdetachstate(&attr, &detach);
13352         if( status < 0 ) status = errno;
13353 #else
13354         status = pthread_attr_setdetachstate(&attr, detach);
13355 #endif
13356         if( status ) return status;
13357         status = pthread_create( &t, &attr, task, NULL );
13358 #if HAVE_PTHREADS < 7
13359         if( status < 0 ) status = errno;
13360 #endif
13361         if( status ) return status;
13362 #else
13363         /* Draft 4 pthreads */
13364         status = pthread_create( &t, pthread_attr_default, task, NULL );
13365         if( status ) return errno;
13366
13367         /* give thread a chance to complete */
13368         /* it should remain joinable and hence detachable */
13369         sleep( 1 );
13370
13371         status = pthread_detach( &t );
13372         if( status ) return errno;
13373 #endif
13374
13375 #ifdef HAVE_LINUX_THREADS
13376         pthread_kill_other_threads_np();
13377 #endif
13378
13379         return 0;
13380
13381 }
13382
13383 EOF
13384 if { (eval echo configure:13385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13385 then
13386   ol_cv_pthread_lib_lpthread_woff=yes
13387 else
13388   echo "configure: failed program was:" >&5
13389   cat conftest.$ac_ext >&5
13390   rm -fr conftest*
13391   ol_cv_pthread_lib_lpthread_woff=no
13392 fi
13393 rm -fr conftest*
13394 fi
13395
13396
13397                 # restore the LIBS
13398                 LIBS="$ol_LIBS"
13399         
13400 fi
13401
13402 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13403
13404         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13405                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13406                 ol_link_threads=posix
13407         fi
13408 fi
13409
13410
13411                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13412 if test "$ol_link_threads" = no ; then
13413         # try -lpthread
13414         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13415 echo "configure:13416: checking for pthread link with -lpthread" >&5
13416 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13417   echo $ac_n "(cached) $ac_c" 1>&6
13418 else
13419   
13420                 # save the flags
13421                 ol_LIBS="$LIBS"
13422                 LIBS="-lpthread $LIBS"
13423
13424                 if test "$cross_compiling" = yes; then
13425   cat > conftest.$ac_ext <<EOF
13426 #line 13427 "configure"
13427 #include "confdefs.h"
13428 /* pthread test headers */
13429 #include <pthread.h>
13430 #if HAVE_PTHREADS < 7
13431 #include <errno.h>
13432 #endif
13433 #ifndef NULL
13434 #define NULL (void*)0
13435 #endif
13436
13437 static void *task(p)
13438         void *p;
13439 {
13440         return (void *) (p == NULL);
13441 }
13442
13443 int main() {
13444
13445         /* pthread test function */
13446 #ifndef PTHREAD_CREATE_DETACHED
13447 #define PTHREAD_CREATE_DETACHED 1
13448 #endif
13449         pthread_t t;
13450         int status;
13451         int detach = PTHREAD_CREATE_DETACHED;
13452
13453 #if HAVE_PTHREADS > 4
13454         /* Final pthreads */
13455         pthread_attr_t attr;
13456
13457         status = pthread_attr_init(&attr);
13458         if( status ) return status;
13459
13460 #if HAVE_PTHREADS < 7
13461         status = pthread_attr_setdetachstate(&attr, &detach);
13462         if( status < 0 ) status = errno;
13463 #else
13464         status = pthread_attr_setdetachstate(&attr, detach);
13465 #endif
13466         if( status ) return status;
13467         status = pthread_create( &t, &attr, task, NULL );
13468 #if HAVE_PTHREADS < 7
13469         if( status < 0 ) status = errno;
13470 #endif
13471         if( status ) return status;
13472 #else
13473         /* Draft 4 pthreads */
13474         status = pthread_create( &t, pthread_attr_default, task, NULL );
13475         if( status ) return errno;
13476
13477         /* give thread a chance to complete */
13478         /* it should remain joinable and hence detachable */
13479         sleep( 1 );
13480
13481         status = pthread_detach( &t );
13482         if( status ) return errno;
13483 #endif
13484
13485 #ifdef HAVE_LINUX_THREADS
13486         pthread_kill_other_threads_np();
13487 #endif
13488
13489         return 0;
13490
13491 ; return 0; }
13492 EOF
13493 if { (eval echo configure:13494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13494   rm -rf conftest*
13495   ol_cv_pthread_lpthread=yes
13496 else
13497   echo "configure: failed program was:" >&5
13498   cat conftest.$ac_ext >&5
13499   rm -rf conftest*
13500   ol_cv_pthread_lpthread=no
13501 fi
13502 rm -f conftest*
13503 else
13504   cat > conftest.$ac_ext <<EOF
13505 #line 13506 "configure"
13506 #include "confdefs.h"
13507 /* pthread test headers */
13508 #include <pthread.h>
13509 #if HAVE_PTHREADS < 7
13510 #include <errno.h>
13511 #endif
13512 #ifndef NULL
13513 #define NULL (void*)0
13514 #endif
13515
13516 static void *task(p)
13517         void *p;
13518 {
13519         return (void *) (p == NULL);
13520 }
13521
13522
13523 int main(argc, argv)
13524         int argc;
13525         char **argv;
13526 {
13527
13528         /* pthread test function */
13529 #ifndef PTHREAD_CREATE_DETACHED
13530 #define PTHREAD_CREATE_DETACHED 1
13531 #endif
13532         pthread_t t;
13533         int status;
13534         int detach = PTHREAD_CREATE_DETACHED;
13535
13536 #if HAVE_PTHREADS > 4
13537         /* Final pthreads */
13538         pthread_attr_t attr;
13539
13540         status = pthread_attr_init(&attr);
13541         if( status ) return status;
13542
13543 #if HAVE_PTHREADS < 7
13544         status = pthread_attr_setdetachstate(&attr, &detach);
13545         if( status < 0 ) status = errno;
13546 #else
13547         status = pthread_attr_setdetachstate(&attr, detach);
13548 #endif
13549         if( status ) return status;
13550         status = pthread_create( &t, &attr, task, NULL );
13551 #if HAVE_PTHREADS < 7
13552         if( status < 0 ) status = errno;
13553 #endif
13554         if( status ) return status;
13555 #else
13556         /* Draft 4 pthreads */
13557         status = pthread_create( &t, pthread_attr_default, task, NULL );
13558         if( status ) return errno;
13559
13560         /* give thread a chance to complete */
13561         /* it should remain joinable and hence detachable */
13562         sleep( 1 );
13563
13564         status = pthread_detach( &t );
13565         if( status ) return errno;
13566 #endif
13567
13568 #ifdef HAVE_LINUX_THREADS
13569         pthread_kill_other_threads_np();
13570 #endif
13571
13572         return 0;
13573
13574 }
13575
13576 EOF
13577 if { (eval echo configure:13578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13578 then
13579   ol_cv_pthread_lpthread=yes
13580 else
13581   echo "configure: failed program was:" >&5
13582   cat conftest.$ac_ext >&5
13583   rm -fr conftest*
13584   ol_cv_pthread_lpthread=no
13585 fi
13586 rm -fr conftest*
13587 fi
13588
13589
13590                 # restore the LIBS
13591                 LIBS="$ol_LIBS"
13592         
13593 fi
13594
13595 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13596
13597         if test $ol_cv_pthread_lpthread = yes ; then
13598                 ol_link_pthreads="-lpthread"
13599                 ol_link_threads=posix
13600         fi
13601 fi
13602
13603                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13604 if test "$ol_link_threads" = no ; then
13605         # try -lc_r
13606         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13607 echo "configure:13608: checking for pthread link with -lc_r" >&5
13608 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13609   echo $ac_n "(cached) $ac_c" 1>&6
13610 else
13611   
13612                 # save the flags
13613                 ol_LIBS="$LIBS"
13614                 LIBS="-lc_r $LIBS"
13615
13616                 if test "$cross_compiling" = yes; then
13617   cat > conftest.$ac_ext <<EOF
13618 #line 13619 "configure"
13619 #include "confdefs.h"
13620 /* pthread test headers */
13621 #include <pthread.h>
13622 #if HAVE_PTHREADS < 7
13623 #include <errno.h>
13624 #endif
13625 #ifndef NULL
13626 #define NULL (void*)0
13627 #endif
13628
13629 static void *task(p)
13630         void *p;
13631 {
13632         return (void *) (p == NULL);
13633 }
13634
13635 int main() {
13636
13637         /* pthread test function */
13638 #ifndef PTHREAD_CREATE_DETACHED
13639 #define PTHREAD_CREATE_DETACHED 1
13640 #endif
13641         pthread_t t;
13642         int status;
13643         int detach = PTHREAD_CREATE_DETACHED;
13644
13645 #if HAVE_PTHREADS > 4
13646         /* Final pthreads */
13647         pthread_attr_t attr;
13648
13649         status = pthread_attr_init(&attr);
13650         if( status ) return status;
13651
13652 #if HAVE_PTHREADS < 7
13653         status = pthread_attr_setdetachstate(&attr, &detach);
13654         if( status < 0 ) status = errno;
13655 #else
13656         status = pthread_attr_setdetachstate(&attr, detach);
13657 #endif
13658         if( status ) return status;
13659         status = pthread_create( &t, &attr, task, NULL );
13660 #if HAVE_PTHREADS < 7
13661         if( status < 0 ) status = errno;
13662 #endif
13663         if( status ) return status;
13664 #else
13665         /* Draft 4 pthreads */
13666         status = pthread_create( &t, pthread_attr_default, task, NULL );
13667         if( status ) return errno;
13668
13669         /* give thread a chance to complete */
13670         /* it should remain joinable and hence detachable */
13671         sleep( 1 );
13672
13673         status = pthread_detach( &t );
13674         if( status ) return errno;
13675 #endif
13676
13677 #ifdef HAVE_LINUX_THREADS
13678         pthread_kill_other_threads_np();
13679 #endif
13680
13681         return 0;
13682
13683 ; return 0; }
13684 EOF
13685 if { (eval echo configure:13686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13686   rm -rf conftest*
13687   ol_cv_pthread_lc_r=yes
13688 else
13689   echo "configure: failed program was:" >&5
13690   cat conftest.$ac_ext >&5
13691   rm -rf conftest*
13692   ol_cv_pthread_lc_r=no
13693 fi
13694 rm -f conftest*
13695 else
13696   cat > conftest.$ac_ext <<EOF
13697 #line 13698 "configure"
13698 #include "confdefs.h"
13699 /* pthread test headers */
13700 #include <pthread.h>
13701 #if HAVE_PTHREADS < 7
13702 #include <errno.h>
13703 #endif
13704 #ifndef NULL
13705 #define NULL (void*)0
13706 #endif
13707
13708 static void *task(p)
13709         void *p;
13710 {
13711         return (void *) (p == NULL);
13712 }
13713
13714
13715 int main(argc, argv)
13716         int argc;
13717         char **argv;
13718 {
13719
13720         /* pthread test function */
13721 #ifndef PTHREAD_CREATE_DETACHED
13722 #define PTHREAD_CREATE_DETACHED 1
13723 #endif
13724         pthread_t t;
13725         int status;
13726         int detach = PTHREAD_CREATE_DETACHED;
13727
13728 #if HAVE_PTHREADS > 4
13729         /* Final pthreads */
13730         pthread_attr_t attr;
13731
13732         status = pthread_attr_init(&attr);
13733         if( status ) return status;
13734
13735 #if HAVE_PTHREADS < 7
13736         status = pthread_attr_setdetachstate(&attr, &detach);
13737         if( status < 0 ) status = errno;
13738 #else
13739         status = pthread_attr_setdetachstate(&attr, detach);
13740 #endif
13741         if( status ) return status;
13742         status = pthread_create( &t, &attr, task, NULL );
13743 #if HAVE_PTHREADS < 7
13744         if( status < 0 ) status = errno;
13745 #endif
13746         if( status ) return status;
13747 #else
13748         /* Draft 4 pthreads */
13749         status = pthread_create( &t, pthread_attr_default, task, NULL );
13750         if( status ) return errno;
13751
13752         /* give thread a chance to complete */
13753         /* it should remain joinable and hence detachable */
13754         sleep( 1 );
13755
13756         status = pthread_detach( &t );
13757         if( status ) return errno;
13758 #endif
13759
13760 #ifdef HAVE_LINUX_THREADS
13761         pthread_kill_other_threads_np();
13762 #endif
13763
13764         return 0;
13765
13766 }
13767
13768 EOF
13769 if { (eval echo configure:13770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13770 then
13771   ol_cv_pthread_lc_r=yes
13772 else
13773   echo "configure: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   rm -fr conftest*
13776   ol_cv_pthread_lc_r=no
13777 fi
13778 rm -fr conftest*
13779 fi
13780
13781
13782                 # restore the LIBS
13783                 LIBS="$ol_LIBS"
13784         
13785 fi
13786
13787 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13788
13789         if test $ol_cv_pthread_lc_r = yes ; then
13790                 ol_link_pthreads="-lc_r"
13791                 ol_link_threads=posix
13792         fi
13793 fi
13794
13795
13796                 # Pthread try link: -threads (ol_cv_pthread_threads)
13797 if test "$ol_link_threads" = no ; then
13798         # try -threads
13799         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13800 echo "configure:13801: checking for pthread link with -threads" >&5
13801 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13802   echo $ac_n "(cached) $ac_c" 1>&6
13803 else
13804   
13805                 # save the flags
13806                 ol_LIBS="$LIBS"
13807                 LIBS="-threads $LIBS"
13808
13809                 if test "$cross_compiling" = yes; then
13810   cat > conftest.$ac_ext <<EOF
13811 #line 13812 "configure"
13812 #include "confdefs.h"
13813 /* pthread test headers */
13814 #include <pthread.h>
13815 #if HAVE_PTHREADS < 7
13816 #include <errno.h>
13817 #endif
13818 #ifndef NULL
13819 #define NULL (void*)0
13820 #endif
13821
13822 static void *task(p)
13823         void *p;
13824 {
13825         return (void *) (p == NULL);
13826 }
13827
13828 int main() {
13829
13830         /* pthread test function */
13831 #ifndef PTHREAD_CREATE_DETACHED
13832 #define PTHREAD_CREATE_DETACHED 1
13833 #endif
13834         pthread_t t;
13835         int status;
13836         int detach = PTHREAD_CREATE_DETACHED;
13837
13838 #if HAVE_PTHREADS > 4
13839         /* Final pthreads */
13840         pthread_attr_t attr;
13841
13842         status = pthread_attr_init(&attr);
13843         if( status ) return status;
13844
13845 #if HAVE_PTHREADS < 7
13846         status = pthread_attr_setdetachstate(&attr, &detach);
13847         if( status < 0 ) status = errno;
13848 #else
13849         status = pthread_attr_setdetachstate(&attr, detach);
13850 #endif
13851         if( status ) return status;
13852         status = pthread_create( &t, &attr, task, NULL );
13853 #if HAVE_PTHREADS < 7
13854         if( status < 0 ) status = errno;
13855 #endif
13856         if( status ) return status;
13857 #else
13858         /* Draft 4 pthreads */
13859         status = pthread_create( &t, pthread_attr_default, task, NULL );
13860         if( status ) return errno;
13861
13862         /* give thread a chance to complete */
13863         /* it should remain joinable and hence detachable */
13864         sleep( 1 );
13865
13866         status = pthread_detach( &t );
13867         if( status ) return errno;
13868 #endif
13869
13870 #ifdef HAVE_LINUX_THREADS
13871         pthread_kill_other_threads_np();
13872 #endif
13873
13874         return 0;
13875
13876 ; return 0; }
13877 EOF
13878 if { (eval echo configure:13879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13879   rm -rf conftest*
13880   ol_cv_pthread_threads=yes
13881 else
13882   echo "configure: failed program was:" >&5
13883   cat conftest.$ac_ext >&5
13884   rm -rf conftest*
13885   ol_cv_pthread_threads=no
13886 fi
13887 rm -f conftest*
13888 else
13889   cat > conftest.$ac_ext <<EOF
13890 #line 13891 "configure"
13891 #include "confdefs.h"
13892 /* pthread test headers */
13893 #include <pthread.h>
13894 #if HAVE_PTHREADS < 7
13895 #include <errno.h>
13896 #endif
13897 #ifndef NULL
13898 #define NULL (void*)0
13899 #endif
13900
13901 static void *task(p)
13902         void *p;
13903 {
13904         return (void *) (p == NULL);
13905 }
13906
13907
13908 int main(argc, argv)
13909         int argc;
13910         char **argv;
13911 {
13912
13913         /* pthread test function */
13914 #ifndef PTHREAD_CREATE_DETACHED
13915 #define PTHREAD_CREATE_DETACHED 1
13916 #endif
13917         pthread_t t;
13918         int status;
13919         int detach = PTHREAD_CREATE_DETACHED;
13920
13921 #if HAVE_PTHREADS > 4
13922         /* Final pthreads */
13923         pthread_attr_t attr;
13924
13925         status = pthread_attr_init(&attr);
13926         if( status ) return status;
13927
13928 #if HAVE_PTHREADS < 7
13929         status = pthread_attr_setdetachstate(&attr, &detach);
13930         if( status < 0 ) status = errno;
13931 #else
13932         status = pthread_attr_setdetachstate(&attr, detach);
13933 #endif
13934         if( status ) return status;
13935         status = pthread_create( &t, &attr, task, NULL );
13936 #if HAVE_PTHREADS < 7
13937         if( status < 0 ) status = errno;
13938 #endif
13939         if( status ) return status;
13940 #else
13941         /* Draft 4 pthreads */
13942         status = pthread_create( &t, pthread_attr_default, task, NULL );
13943         if( status ) return errno;
13944
13945         /* give thread a chance to complete */
13946         /* it should remain joinable and hence detachable */
13947         sleep( 1 );
13948
13949         status = pthread_detach( &t );
13950         if( status ) return errno;
13951 #endif
13952
13953 #ifdef HAVE_LINUX_THREADS
13954         pthread_kill_other_threads_np();
13955 #endif
13956
13957         return 0;
13958
13959 }
13960
13961 EOF
13962 if { (eval echo configure:13963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13963 then
13964   ol_cv_pthread_threads=yes
13965 else
13966   echo "configure: failed program was:" >&5
13967   cat conftest.$ac_ext >&5
13968   rm -fr conftest*
13969   ol_cv_pthread_threads=no
13970 fi
13971 rm -fr conftest*
13972 fi
13973
13974
13975                 # restore the LIBS
13976                 LIBS="$ol_LIBS"
13977         
13978 fi
13979
13980 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13981
13982         if test $ol_cv_pthread_threads = yes ; then
13983                 ol_link_pthreads="-threads"
13984                 ol_link_threads=posix
13985         fi
13986 fi
13987
13988
13989                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13990 if test "$ol_link_threads" = no ; then
13991         # try -lpthreads -lmach -lexc -lc_r
13992         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13993 echo "configure:13994: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13994 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13995   echo $ac_n "(cached) $ac_c" 1>&6
13996 else
13997   
13998                 # save the flags
13999                 ol_LIBS="$LIBS"
14000                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14001
14002                 if test "$cross_compiling" = yes; then
14003   cat > conftest.$ac_ext <<EOF
14004 #line 14005 "configure"
14005 #include "confdefs.h"
14006 /* pthread test headers */
14007 #include <pthread.h>
14008 #if HAVE_PTHREADS < 7
14009 #include <errno.h>
14010 #endif
14011 #ifndef NULL
14012 #define NULL (void*)0
14013 #endif
14014
14015 static void *task(p)
14016         void *p;
14017 {
14018         return (void *) (p == NULL);
14019 }
14020
14021 int main() {
14022
14023         /* pthread test function */
14024 #ifndef PTHREAD_CREATE_DETACHED
14025 #define PTHREAD_CREATE_DETACHED 1
14026 #endif
14027         pthread_t t;
14028         int status;
14029         int detach = PTHREAD_CREATE_DETACHED;
14030
14031 #if HAVE_PTHREADS > 4
14032         /* Final pthreads */
14033         pthread_attr_t attr;
14034
14035         status = pthread_attr_init(&attr);
14036         if( status ) return status;
14037
14038 #if HAVE_PTHREADS < 7
14039         status = pthread_attr_setdetachstate(&attr, &detach);
14040         if( status < 0 ) status = errno;
14041 #else
14042         status = pthread_attr_setdetachstate(&attr, detach);
14043 #endif
14044         if( status ) return status;
14045         status = pthread_create( &t, &attr, task, NULL );
14046 #if HAVE_PTHREADS < 7
14047         if( status < 0 ) status = errno;
14048 #endif
14049         if( status ) return status;
14050 #else
14051         /* Draft 4 pthreads */
14052         status = pthread_create( &t, pthread_attr_default, task, NULL );
14053         if( status ) return errno;
14054
14055         /* give thread a chance to complete */
14056         /* it should remain joinable and hence detachable */
14057         sleep( 1 );
14058
14059         status = pthread_detach( &t );
14060         if( status ) return errno;
14061 #endif
14062
14063 #ifdef HAVE_LINUX_THREADS
14064         pthread_kill_other_threads_np();
14065 #endif
14066
14067         return 0;
14068
14069 ; return 0; }
14070 EOF
14071 if { (eval echo configure:14072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14072   rm -rf conftest*
14073   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14074 else
14075   echo "configure: failed program was:" >&5
14076   cat conftest.$ac_ext >&5
14077   rm -rf conftest*
14078   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14079 fi
14080 rm -f conftest*
14081 else
14082   cat > conftest.$ac_ext <<EOF
14083 #line 14084 "configure"
14084 #include "confdefs.h"
14085 /* pthread test headers */
14086 #include <pthread.h>
14087 #if HAVE_PTHREADS < 7
14088 #include <errno.h>
14089 #endif
14090 #ifndef NULL
14091 #define NULL (void*)0
14092 #endif
14093
14094 static void *task(p)
14095         void *p;
14096 {
14097         return (void *) (p == NULL);
14098 }
14099
14100
14101 int main(argc, argv)
14102         int argc;
14103         char **argv;
14104 {
14105
14106         /* pthread test function */
14107 #ifndef PTHREAD_CREATE_DETACHED
14108 #define PTHREAD_CREATE_DETACHED 1
14109 #endif
14110         pthread_t t;
14111         int status;
14112         int detach = PTHREAD_CREATE_DETACHED;
14113
14114 #if HAVE_PTHREADS > 4
14115         /* Final pthreads */
14116         pthread_attr_t attr;
14117
14118         status = pthread_attr_init(&attr);
14119         if( status ) return status;
14120
14121 #if HAVE_PTHREADS < 7
14122         status = pthread_attr_setdetachstate(&attr, &detach);
14123         if( status < 0 ) status = errno;
14124 #else
14125         status = pthread_attr_setdetachstate(&attr, detach);
14126 #endif
14127         if( status ) return status;
14128         status = pthread_create( &t, &attr, task, NULL );
14129 #if HAVE_PTHREADS < 7
14130         if( status < 0 ) status = errno;
14131 #endif
14132         if( status ) return status;
14133 #else
14134         /* Draft 4 pthreads */
14135         status = pthread_create( &t, pthread_attr_default, task, NULL );
14136         if( status ) return errno;
14137
14138         /* give thread a chance to complete */
14139         /* it should remain joinable and hence detachable */
14140         sleep( 1 );
14141
14142         status = pthread_detach( &t );
14143         if( status ) return errno;
14144 #endif
14145
14146 #ifdef HAVE_LINUX_THREADS
14147         pthread_kill_other_threads_np();
14148 #endif
14149
14150         return 0;
14151
14152 }
14153
14154 EOF
14155 if { (eval echo configure:14156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14156 then
14157   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14158 else
14159   echo "configure: failed program was:" >&5
14160   cat conftest.$ac_ext >&5
14161   rm -fr conftest*
14162   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14163 fi
14164 rm -fr conftest*
14165 fi
14166
14167
14168                 # restore the LIBS
14169                 LIBS="$ol_LIBS"
14170         
14171 fi
14172
14173 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14174
14175         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14176                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14177                 ol_link_threads=posix
14178         fi
14179 fi
14180
14181                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14182 if test "$ol_link_threads" = no ; then
14183         # try -lpthreads -lmach -lexc
14184         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14185 echo "configure:14186: checking for pthread link with -lpthreads -lmach -lexc" >&5
14186 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14187   echo $ac_n "(cached) $ac_c" 1>&6
14188 else
14189   
14190                 # save the flags
14191                 ol_LIBS="$LIBS"
14192                 LIBS="-lpthreads -lmach -lexc $LIBS"
14193
14194                 if test "$cross_compiling" = yes; then
14195   cat > conftest.$ac_ext <<EOF
14196 #line 14197 "configure"
14197 #include "confdefs.h"
14198 /* pthread test headers */
14199 #include <pthread.h>
14200 #if HAVE_PTHREADS < 7
14201 #include <errno.h>
14202 #endif
14203 #ifndef NULL
14204 #define NULL (void*)0
14205 #endif
14206
14207 static void *task(p)
14208         void *p;
14209 {
14210         return (void *) (p == NULL);
14211 }
14212
14213 int main() {
14214
14215         /* pthread test function */
14216 #ifndef PTHREAD_CREATE_DETACHED
14217 #define PTHREAD_CREATE_DETACHED 1
14218 #endif
14219         pthread_t t;
14220         int status;
14221         int detach = PTHREAD_CREATE_DETACHED;
14222
14223 #if HAVE_PTHREADS > 4
14224         /* Final pthreads */
14225         pthread_attr_t attr;
14226
14227         status = pthread_attr_init(&attr);
14228         if( status ) return status;
14229
14230 #if HAVE_PTHREADS < 7
14231         status = pthread_attr_setdetachstate(&attr, &detach);
14232         if( status < 0 ) status = errno;
14233 #else
14234         status = pthread_attr_setdetachstate(&attr, detach);
14235 #endif
14236         if( status ) return status;
14237         status = pthread_create( &t, &attr, task, NULL );
14238 #if HAVE_PTHREADS < 7
14239         if( status < 0 ) status = errno;
14240 #endif
14241         if( status ) return status;
14242 #else
14243         /* Draft 4 pthreads */
14244         status = pthread_create( &t, pthread_attr_default, task, NULL );
14245         if( status ) return errno;
14246
14247         /* give thread a chance to complete */
14248         /* it should remain joinable and hence detachable */
14249         sleep( 1 );
14250
14251         status = pthread_detach( &t );
14252         if( status ) return errno;
14253 #endif
14254
14255 #ifdef HAVE_LINUX_THREADS
14256         pthread_kill_other_threads_np();
14257 #endif
14258
14259         return 0;
14260
14261 ; return 0; }
14262 EOF
14263 if { (eval echo configure:14264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14264   rm -rf conftest*
14265   ol_cv_pthread_lpthreads_lmach_lexc=yes
14266 else
14267   echo "configure: failed program was:" >&5
14268   cat conftest.$ac_ext >&5
14269   rm -rf conftest*
14270   ol_cv_pthread_lpthreads_lmach_lexc=no
14271 fi
14272 rm -f conftest*
14273 else
14274   cat > conftest.$ac_ext <<EOF
14275 #line 14276 "configure"
14276 #include "confdefs.h"
14277 /* pthread test headers */
14278 #include <pthread.h>
14279 #if HAVE_PTHREADS < 7
14280 #include <errno.h>
14281 #endif
14282 #ifndef NULL
14283 #define NULL (void*)0
14284 #endif
14285
14286 static void *task(p)
14287         void *p;
14288 {
14289         return (void *) (p == NULL);
14290 }
14291
14292
14293 int main(argc, argv)
14294         int argc;
14295         char **argv;
14296 {
14297
14298         /* pthread test function */
14299 #ifndef PTHREAD_CREATE_DETACHED
14300 #define PTHREAD_CREATE_DETACHED 1
14301 #endif
14302         pthread_t t;
14303         int status;
14304         int detach = PTHREAD_CREATE_DETACHED;
14305
14306 #if HAVE_PTHREADS > 4
14307         /* Final pthreads */
14308         pthread_attr_t attr;
14309
14310         status = pthread_attr_init(&attr);
14311         if( status ) return status;
14312
14313 #if HAVE_PTHREADS < 7
14314         status = pthread_attr_setdetachstate(&attr, &detach);
14315         if( status < 0 ) status = errno;
14316 #else
14317         status = pthread_attr_setdetachstate(&attr, detach);
14318 #endif
14319         if( status ) return status;
14320         status = pthread_create( &t, &attr, task, NULL );
14321 #if HAVE_PTHREADS < 7
14322         if( status < 0 ) status = errno;
14323 #endif
14324         if( status ) return status;
14325 #else
14326         /* Draft 4 pthreads */
14327         status = pthread_create( &t, pthread_attr_default, task, NULL );
14328         if( status ) return errno;
14329
14330         /* give thread a chance to complete */
14331         /* it should remain joinable and hence detachable */
14332         sleep( 1 );
14333
14334         status = pthread_detach( &t );
14335         if( status ) return errno;
14336 #endif
14337
14338 #ifdef HAVE_LINUX_THREADS
14339         pthread_kill_other_threads_np();
14340 #endif
14341
14342         return 0;
14343
14344 }
14345
14346 EOF
14347 if { (eval echo configure:14348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14348 then
14349   ol_cv_pthread_lpthreads_lmach_lexc=yes
14350 else
14351   echo "configure: failed program was:" >&5
14352   cat conftest.$ac_ext >&5
14353   rm -fr conftest*
14354   ol_cv_pthread_lpthreads_lmach_lexc=no
14355 fi
14356 rm -fr conftest*
14357 fi
14358
14359
14360                 # restore the LIBS
14361                 LIBS="$ol_LIBS"
14362         
14363 fi
14364
14365 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14366
14367         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14368                 ol_link_pthreads="-lpthreads -lmach -lexc"
14369                 ol_link_threads=posix
14370         fi
14371 fi
14372
14373                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14374 if test "$ol_link_threads" = no ; then
14375         # try -lpthreads -lexc
14376         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14377 echo "configure:14378: checking for pthread link with -lpthreads -lexc" >&5
14378 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14379   echo $ac_n "(cached) $ac_c" 1>&6
14380 else
14381   
14382                 # save the flags
14383                 ol_LIBS="$LIBS"
14384                 LIBS="-lpthreads -lexc $LIBS"
14385
14386                 if test "$cross_compiling" = yes; then
14387   cat > conftest.$ac_ext <<EOF
14388 #line 14389 "configure"
14389 #include "confdefs.h"
14390 /* pthread test headers */
14391 #include <pthread.h>
14392 #if HAVE_PTHREADS < 7
14393 #include <errno.h>
14394 #endif
14395 #ifndef NULL
14396 #define NULL (void*)0
14397 #endif
14398
14399 static void *task(p)
14400         void *p;
14401 {
14402         return (void *) (p == NULL);
14403 }
14404
14405 int main() {
14406
14407         /* pthread test function */
14408 #ifndef PTHREAD_CREATE_DETACHED
14409 #define PTHREAD_CREATE_DETACHED 1
14410 #endif
14411         pthread_t t;
14412         int status;
14413         int detach = PTHREAD_CREATE_DETACHED;
14414
14415 #if HAVE_PTHREADS > 4
14416         /* Final pthreads */
14417         pthread_attr_t attr;
14418
14419         status = pthread_attr_init(&attr);
14420         if( status ) return status;
14421
14422 #if HAVE_PTHREADS < 7
14423         status = pthread_attr_setdetachstate(&attr, &detach);
14424         if( status < 0 ) status = errno;
14425 #else
14426         status = pthread_attr_setdetachstate(&attr, detach);
14427 #endif
14428         if( status ) return status;
14429         status = pthread_create( &t, &attr, task, NULL );
14430 #if HAVE_PTHREADS < 7
14431         if( status < 0 ) status = errno;
14432 #endif
14433         if( status ) return status;
14434 #else
14435         /* Draft 4 pthreads */
14436         status = pthread_create( &t, pthread_attr_default, task, NULL );
14437         if( status ) return errno;
14438
14439         /* give thread a chance to complete */
14440         /* it should remain joinable and hence detachable */
14441         sleep( 1 );
14442
14443         status = pthread_detach( &t );
14444         if( status ) return errno;
14445 #endif
14446
14447 #ifdef HAVE_LINUX_THREADS
14448         pthread_kill_other_threads_np();
14449 #endif
14450
14451         return 0;
14452
14453 ; return 0; }
14454 EOF
14455 if { (eval echo configure:14456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14456   rm -rf conftest*
14457   ol_cv_pthread_lpthreads_lexc=yes
14458 else
14459   echo "configure: failed program was:" >&5
14460   cat conftest.$ac_ext >&5
14461   rm -rf conftest*
14462   ol_cv_pthread_lpthreads_lexc=no
14463 fi
14464 rm -f conftest*
14465 else
14466   cat > conftest.$ac_ext <<EOF
14467 #line 14468 "configure"
14468 #include "confdefs.h"
14469 /* pthread test headers */
14470 #include <pthread.h>
14471 #if HAVE_PTHREADS < 7
14472 #include <errno.h>
14473 #endif
14474 #ifndef NULL
14475 #define NULL (void*)0
14476 #endif
14477
14478 static void *task(p)
14479         void *p;
14480 {
14481         return (void *) (p == NULL);
14482 }
14483
14484
14485 int main(argc, argv)
14486         int argc;
14487         char **argv;
14488 {
14489
14490         /* pthread test function */
14491 #ifndef PTHREAD_CREATE_DETACHED
14492 #define PTHREAD_CREATE_DETACHED 1
14493 #endif
14494         pthread_t t;
14495         int status;
14496         int detach = PTHREAD_CREATE_DETACHED;
14497
14498 #if HAVE_PTHREADS > 4
14499         /* Final pthreads */
14500         pthread_attr_t attr;
14501
14502         status = pthread_attr_init(&attr);
14503         if( status ) return status;
14504
14505 #if HAVE_PTHREADS < 7
14506         status = pthread_attr_setdetachstate(&attr, &detach);
14507         if( status < 0 ) status = errno;
14508 #else
14509         status = pthread_attr_setdetachstate(&attr, detach);
14510 #endif
14511         if( status ) return status;
14512         status = pthread_create( &t, &attr, task, NULL );
14513 #if HAVE_PTHREADS < 7
14514         if( status < 0 ) status = errno;
14515 #endif
14516         if( status ) return status;
14517 #else
14518         /* Draft 4 pthreads */
14519         status = pthread_create( &t, pthread_attr_default, task, NULL );
14520         if( status ) return errno;
14521
14522         /* give thread a chance to complete */
14523         /* it should remain joinable and hence detachable */
14524         sleep( 1 );
14525
14526         status = pthread_detach( &t );
14527         if( status ) return errno;
14528 #endif
14529
14530 #ifdef HAVE_LINUX_THREADS
14531         pthread_kill_other_threads_np();
14532 #endif
14533
14534         return 0;
14535
14536 }
14537
14538 EOF
14539 if { (eval echo configure:14540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14540 then
14541   ol_cv_pthread_lpthreads_lexc=yes
14542 else
14543   echo "configure: failed program was:" >&5
14544   cat conftest.$ac_ext >&5
14545   rm -fr conftest*
14546   ol_cv_pthread_lpthreads_lexc=no
14547 fi
14548 rm -fr conftest*
14549 fi
14550
14551
14552                 # restore the LIBS
14553                 LIBS="$ol_LIBS"
14554         
14555 fi
14556
14557 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14558
14559         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14560                 ol_link_pthreads="-lpthreads -lexc"
14561                 ol_link_threads=posix
14562         fi
14563 fi
14564
14565
14566                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14567 if test "$ol_link_threads" = no ; then
14568         # try -lpthreads
14569         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14570 echo "configure:14571: checking for pthread link with -lpthreads" >&5
14571 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14572   echo $ac_n "(cached) $ac_c" 1>&6
14573 else
14574   
14575                 # save the flags
14576                 ol_LIBS="$LIBS"
14577                 LIBS="-lpthreads $LIBS"
14578
14579                 if test "$cross_compiling" = yes; then
14580   cat > conftest.$ac_ext <<EOF
14581 #line 14582 "configure"
14582 #include "confdefs.h"
14583 /* pthread test headers */
14584 #include <pthread.h>
14585 #if HAVE_PTHREADS < 7
14586 #include <errno.h>
14587 #endif
14588 #ifndef NULL
14589 #define NULL (void*)0
14590 #endif
14591
14592 static void *task(p)
14593         void *p;
14594 {
14595         return (void *) (p == NULL);
14596 }
14597
14598 int main() {
14599
14600         /* pthread test function */
14601 #ifndef PTHREAD_CREATE_DETACHED
14602 #define PTHREAD_CREATE_DETACHED 1
14603 #endif
14604         pthread_t t;
14605         int status;
14606         int detach = PTHREAD_CREATE_DETACHED;
14607
14608 #if HAVE_PTHREADS > 4
14609         /* Final pthreads */
14610         pthread_attr_t attr;
14611
14612         status = pthread_attr_init(&attr);
14613         if( status ) return status;
14614
14615 #if HAVE_PTHREADS < 7
14616         status = pthread_attr_setdetachstate(&attr, &detach);
14617         if( status < 0 ) status = errno;
14618 #else
14619         status = pthread_attr_setdetachstate(&attr, detach);
14620 #endif
14621         if( status ) return status;
14622         status = pthread_create( &t, &attr, task, NULL );
14623 #if HAVE_PTHREADS < 7
14624         if( status < 0 ) status = errno;
14625 #endif
14626         if( status ) return status;
14627 #else
14628         /* Draft 4 pthreads */
14629         status = pthread_create( &t, pthread_attr_default, task, NULL );
14630         if( status ) return errno;
14631
14632         /* give thread a chance to complete */
14633         /* it should remain joinable and hence detachable */
14634         sleep( 1 );
14635
14636         status = pthread_detach( &t );
14637         if( status ) return errno;
14638 #endif
14639
14640 #ifdef HAVE_LINUX_THREADS
14641         pthread_kill_other_threads_np();
14642 #endif
14643
14644         return 0;
14645
14646 ; return 0; }
14647 EOF
14648 if { (eval echo configure:14649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14649   rm -rf conftest*
14650   ol_cv_pthread_lib_lpthreads=yes
14651 else
14652   echo "configure: failed program was:" >&5
14653   cat conftest.$ac_ext >&5
14654   rm -rf conftest*
14655   ol_cv_pthread_lib_lpthreads=no
14656 fi
14657 rm -f conftest*
14658 else
14659   cat > conftest.$ac_ext <<EOF
14660 #line 14661 "configure"
14661 #include "confdefs.h"
14662 /* pthread test headers */
14663 #include <pthread.h>
14664 #if HAVE_PTHREADS < 7
14665 #include <errno.h>
14666 #endif
14667 #ifndef NULL
14668 #define NULL (void*)0
14669 #endif
14670
14671 static void *task(p)
14672         void *p;
14673 {
14674         return (void *) (p == NULL);
14675 }
14676
14677
14678 int main(argc, argv)
14679         int argc;
14680         char **argv;
14681 {
14682
14683         /* pthread test function */
14684 #ifndef PTHREAD_CREATE_DETACHED
14685 #define PTHREAD_CREATE_DETACHED 1
14686 #endif
14687         pthread_t t;
14688         int status;
14689         int detach = PTHREAD_CREATE_DETACHED;
14690
14691 #if HAVE_PTHREADS > 4
14692         /* Final pthreads */
14693         pthread_attr_t attr;
14694
14695         status = pthread_attr_init(&attr);
14696         if( status ) return status;
14697
14698 #if HAVE_PTHREADS < 7
14699         status = pthread_attr_setdetachstate(&attr, &detach);
14700         if( status < 0 ) status = errno;
14701 #else
14702         status = pthread_attr_setdetachstate(&attr, detach);
14703 #endif
14704         if( status ) return status;
14705         status = pthread_create( &t, &attr, task, NULL );
14706 #if HAVE_PTHREADS < 7
14707         if( status < 0 ) status = errno;
14708 #endif
14709         if( status ) return status;
14710 #else
14711         /* Draft 4 pthreads */
14712         status = pthread_create( &t, pthread_attr_default, task, NULL );
14713         if( status ) return errno;
14714
14715         /* give thread a chance to complete */
14716         /* it should remain joinable and hence detachable */
14717         sleep( 1 );
14718
14719         status = pthread_detach( &t );
14720         if( status ) return errno;
14721 #endif
14722
14723 #ifdef HAVE_LINUX_THREADS
14724         pthread_kill_other_threads_np();
14725 #endif
14726
14727         return 0;
14728
14729 }
14730
14731 EOF
14732 if { (eval echo configure:14733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14733 then
14734   ol_cv_pthread_lib_lpthreads=yes
14735 else
14736   echo "configure: failed program was:" >&5
14737   cat conftest.$ac_ext >&5
14738   rm -fr conftest*
14739   ol_cv_pthread_lib_lpthreads=no
14740 fi
14741 rm -fr conftest*
14742 fi
14743
14744
14745                 # restore the LIBS
14746                 LIBS="$ol_LIBS"
14747         
14748 fi
14749
14750 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14751
14752         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14753                 ol_link_pthreads="-lpthreads"
14754                 ol_link_threads=posix
14755         fi
14756 fi
14757
14758
14759                 if test $ol_link_threads != no ; then
14760                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14761
14762                                                 save_CPPFLAGS="$CPPFLAGS"
14763                         save_LIBS="$LIBS"
14764                         LIBS="$LTHREAD_LIBS $LIBS"
14765
14766                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14767 do
14768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14769 echo "configure:14770: checking for $ac_func" >&5
14770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14771   echo $ac_n "(cached) $ac_c" 1>&6
14772 else
14773   cat > conftest.$ac_ext <<EOF
14774 #line 14775 "configure"
14775 #include "confdefs.h"
14776 /* System header to define __stub macros and hopefully few prototypes,
14777     which can conflict with char $ac_func(); below.  */
14778 #include <assert.h>
14779 /* Override any gcc2 internal prototype to avoid an error.  */
14780 /* We use char because int might match the return type of a gcc2
14781     builtin and then its argument prototype would still apply.  */
14782 char $ac_func();
14783 char (*f)();
14784
14785 int main() {
14786
14787 /* The GNU C library defines this for functions which it implements
14788     to always fail with ENOSYS.  Some functions are actually named
14789     something starting with __ and the normal name is an alias.  */
14790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14791 choke me
14792 #else
14793 f = $ac_func;
14794 #endif
14795
14796 ; return 0; }
14797 EOF
14798 if { (eval echo configure:14799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14799   rm -rf conftest*
14800   eval "ac_cv_func_$ac_func=yes"
14801 else
14802   echo "configure: failed program was:" >&5
14803   cat conftest.$ac_ext >&5
14804   rm -rf conftest*
14805   eval "ac_cv_func_$ac_func=no"
14806 fi
14807 rm -f conftest*
14808 fi
14809
14810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14811   echo "$ac_t""yes" 1>&6
14812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14813   cat >> confdefs.h <<EOF
14814 #define $ac_tr_func 1
14815 EOF
14816  
14817 else
14818   echo "$ac_t""no" 1>&6
14819 fi
14820 done
14821
14822
14823                         if test $ac_cv_func_sched_yield = no -a \
14824                                 $ac_cv_func_pthread_yield = no -a \
14825                                 $ac_cv_func_thr_yield = no ; then
14826                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14827 echo "configure:14828: checking for sched_yield in -lrt" >&5
14828 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14830   echo $ac_n "(cached) $ac_c" 1>&6
14831 else
14832   ac_save_LIBS="$LIBS"
14833 LIBS="-lrt  $LIBS"
14834 cat > conftest.$ac_ext <<EOF
14835 #line 14836 "configure"
14836 #include "confdefs.h"
14837 /* Override any gcc2 internal prototype to avoid an error.  */
14838 /* We use char because int might match the return type of a gcc2
14839     builtin and then its argument prototype would still apply.  */
14840 char sched_yield();
14841
14842 int main() {
14843 sched_yield()
14844 ; return 0; }
14845 EOF
14846 if { (eval echo configure:14847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14847   rm -rf conftest*
14848   eval "ac_cv_lib_$ac_lib_var=yes"
14849 else
14850   echo "configure: failed program was:" >&5
14851   cat conftest.$ac_ext >&5
14852   rm -rf conftest*
14853   eval "ac_cv_lib_$ac_lib_var=no"
14854 fi
14855 rm -f conftest*
14856 LIBS="$ac_save_LIBS"
14857
14858 fi
14859 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14860   echo "$ac_t""yes" 1>&6
14861   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14862                                         cat >> confdefs.h <<\EOF
14863 #define HAVE_SCHED_YIELD 1
14864 EOF
14865
14866                                         ac_cv_func_sched_yield=yes
14867 else
14868   echo "$ac_t""no" 1>&6
14869 ac_cv_func_sched_yield=no
14870 fi
14871
14872                         fi
14873                         if test $ac_cv_func_sched_yield = no -a \
14874                                 $ac_cv_func_pthread_yield = no -a \
14875                                 "$ac_cv_func_thr_yield" = no ; then
14876                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14877                         fi
14878
14879                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14880 do
14881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14882 echo "configure:14883: checking for $ac_func" >&5
14883 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14884   echo $ac_n "(cached) $ac_c" 1>&6
14885 else
14886   cat > conftest.$ac_ext <<EOF
14887 #line 14888 "configure"
14888 #include "confdefs.h"
14889 /* System header to define __stub macros and hopefully few prototypes,
14890     which can conflict with char $ac_func(); below.  */
14891 #include <assert.h>
14892 /* Override any gcc2 internal prototype to avoid an error.  */
14893 /* We use char because int might match the return type of a gcc2
14894     builtin and then its argument prototype would still apply.  */
14895 char $ac_func();
14896 char (*f)();
14897
14898 int main() {
14899
14900 /* The GNU C library defines this for functions which it implements
14901     to always fail with ENOSYS.  Some functions are actually named
14902     something starting with __ and the normal name is an alias.  */
14903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14904 choke me
14905 #else
14906 f = $ac_func;
14907 #endif
14908
14909 ; return 0; }
14910 EOF
14911 if { (eval echo configure:14912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14912   rm -rf conftest*
14913   eval "ac_cv_func_$ac_func=yes"
14914 else
14915   echo "configure: failed program was:" >&5
14916   cat conftest.$ac_ext >&5
14917   rm -rf conftest*
14918   eval "ac_cv_func_$ac_func=no"
14919 fi
14920 rm -f conftest*
14921 fi
14922
14923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14924   echo "$ac_t""yes" 1>&6
14925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14926   cat >> confdefs.h <<EOF
14927 #define $ac_tr_func 1
14928 EOF
14929  
14930 else
14931   echo "$ac_t""no" 1>&6
14932 fi
14933 done
14934
14935
14936                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14937 echo "configure:14938: checking for pthread_detach with <pthread.h>" >&5
14938 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14939   echo $ac_n "(cached) $ac_c" 1>&6
14940 else
14941   
14942                                                                 cat > conftest.$ac_ext <<EOF
14943 #line 14944 "configure"
14944 #include "confdefs.h"
14945
14946 #include <pthread.h>
14947 #ifndef NULL
14948 #define NULL (void*)0
14949 #endif
14950
14951 int main() {
14952 pthread_detach(NULL);
14953 ; return 0; }
14954 EOF
14955 if { (eval echo configure:14956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14956   rm -rf conftest*
14957   ol_cv_func_pthread_detach=yes
14958 else
14959   echo "configure: failed program was:" >&5
14960   cat conftest.$ac_ext >&5
14961   rm -rf conftest*
14962   ol_cv_func_pthread_detach=no
14963 fi
14964 rm -f conftest*
14965                         
14966 fi
14967
14968 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14969
14970                         if test $ol_cv_func_pthread_detach = no ; then
14971                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14972                         fi
14973
14974                         cat >> confdefs.h <<\EOF
14975 #define HAVE_PTHREAD_DETACH 1
14976 EOF
14977
14978
14979                                                 for ac_func in \
14980                                 pthread_setconcurrency \
14981                                 pthread_getconcurrency \
14982                                 thr_setconcurrency \
14983                                 thr_getconcurrency \
14984                         
14985 do
14986 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14987 echo "configure:14988: checking for $ac_func" >&5
14988 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14989   echo $ac_n "(cached) $ac_c" 1>&6
14990 else
14991   cat > conftest.$ac_ext <<EOF
14992 #line 14993 "configure"
14993 #include "confdefs.h"
14994 /* System header to define __stub macros and hopefully few prototypes,
14995     which can conflict with char $ac_func(); below.  */
14996 #include <assert.h>
14997 /* Override any gcc2 internal prototype to avoid an error.  */
14998 /* We use char because int might match the return type of a gcc2
14999     builtin and then its argument prototype would still apply.  */
15000 char $ac_func();
15001 char (*f)();
15002
15003 int main() {
15004
15005 /* The GNU C library defines this for functions which it implements
15006     to always fail with ENOSYS.  Some functions are actually named
15007     something starting with __ and the normal name is an alias.  */
15008 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15009 choke me
15010 #else
15011 f = $ac_func;
15012 #endif
15013
15014 ; return 0; }
15015 EOF
15016 if { (eval echo configure:15017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15017   rm -rf conftest*
15018   eval "ac_cv_func_$ac_func=yes"
15019 else
15020   echo "configure: failed program was:" >&5
15021   cat conftest.$ac_ext >&5
15022   rm -rf conftest*
15023   eval "ac_cv_func_$ac_func=no"
15024 fi
15025 rm -f conftest*
15026 fi
15027
15028 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15029   echo "$ac_t""yes" 1>&6
15030     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15031   cat >> confdefs.h <<EOF
15032 #define $ac_tr_func 1
15033 EOF
15034  
15035 else
15036   echo "$ac_t""no" 1>&6
15037 fi
15038 done
15039
15040
15041                         
15042         for ac_func in pthread_kill_other_threads_np
15043 do
15044 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15045 echo "configure:15046: checking for $ac_func" >&5
15046 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15047   echo $ac_n "(cached) $ac_c" 1>&6
15048 else
15049   cat > conftest.$ac_ext <<EOF
15050 #line 15051 "configure"
15051 #include "confdefs.h"
15052 /* System header to define __stub macros and hopefully few prototypes,
15053     which can conflict with char $ac_func(); below.  */
15054 #include <assert.h>
15055 /* Override any gcc2 internal prototype to avoid an error.  */
15056 /* We use char because int might match the return type of a gcc2
15057     builtin and then its argument prototype would still apply.  */
15058 char $ac_func();
15059 char (*f)();
15060
15061 int main() {
15062
15063 /* The GNU C library defines this for functions which it implements
15064     to always fail with ENOSYS.  Some functions are actually named
15065     something starting with __ and the normal name is an alias.  */
15066 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15067 choke me
15068 #else
15069 f = $ac_func;
15070 #endif
15071
15072 ; return 0; }
15073 EOF
15074 if { (eval echo configure:15075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15075   rm -rf conftest*
15076   eval "ac_cv_func_$ac_func=yes"
15077 else
15078   echo "configure: failed program was:" >&5
15079   cat conftest.$ac_ext >&5
15080   rm -rf conftest*
15081   eval "ac_cv_func_$ac_func=no"
15082 fi
15083 rm -f conftest*
15084 fi
15085
15086 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15087   echo "$ac_t""yes" 1>&6
15088     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15089   cat >> confdefs.h <<EOF
15090 #define $ac_tr_func 1
15091 EOF
15092  
15093 else
15094   echo "$ac_t""no" 1>&6
15095 fi
15096 done
15097
15098         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15099 echo "configure:15100: checking for LinuxThreads implementation" >&5
15100 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15101   echo $ac_n "(cached) $ac_c" 1>&6
15102 else
15103   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15104 fi
15105
15106 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15107
15108                         
15109         
15110         
15111         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15112 echo "configure:15113: checking for LinuxThreads consistency" >&5
15113 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15114   echo $ac_n "(cached) $ac_c" 1>&6
15115 else
15116   
15117                 if test $ol_cv_header_linux_threads = yes -a \
15118                         $ol_cv_sys_linux_threads = yes; then
15119                         ol_cv_linux_threads=yes
15120                 elif test $ol_cv_header_linux_threads = no -a \
15121                         $ol_cv_sys_linux_threads = no; then
15122                         ol_cv_linux_threads=no
15123                 else
15124                         ol_cv_linux_threads=error
15125                 fi
15126         
15127 fi
15128
15129 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15130
15131
15132                         if test $ol_cv_linux_threads = error; then
15133                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15134                         fi
15135
15136                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15137 echo "configure:15138: checking if pthread_create() works" >&5
15138 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15139   echo $ac_n "(cached) $ac_c" 1>&6
15140 else
15141   
15142                         if test "$cross_compiling" = yes; then
15143                                 ol_cv_pthread_create_works=yes
15144 else
15145   cat > conftest.$ac_ext <<EOF
15146 #line 15147 "configure"
15147 #include "confdefs.h"
15148 /* pthread test headers */
15149 #include <pthread.h>
15150 #if HAVE_PTHREADS < 7
15151 #include <errno.h>
15152 #endif
15153 #ifndef NULL
15154 #define NULL (void*)0
15155 #endif
15156
15157 static void *task(p)
15158         void *p;
15159 {
15160         return (void *) (p == NULL);
15161 }
15162
15163
15164 int main(argc, argv)
15165         int argc;
15166         char **argv;
15167 {
15168
15169         /* pthread test function */
15170 #ifndef PTHREAD_CREATE_DETACHED
15171 #define PTHREAD_CREATE_DETACHED 1
15172 #endif
15173         pthread_t t;
15174         int status;
15175         int detach = PTHREAD_CREATE_DETACHED;
15176
15177 #if HAVE_PTHREADS > 4
15178         /* Final pthreads */
15179         pthread_attr_t attr;
15180
15181         status = pthread_attr_init(&attr);
15182         if( status ) return status;
15183
15184 #if HAVE_PTHREADS < 7
15185         status = pthread_attr_setdetachstate(&attr, &detach);
15186         if( status < 0 ) status = errno;
15187 #else
15188         status = pthread_attr_setdetachstate(&attr, detach);
15189 #endif
15190         if( status ) return status;
15191         status = pthread_create( &t, &attr, task, NULL );
15192 #if HAVE_PTHREADS < 7
15193         if( status < 0 ) status = errno;
15194 #endif
15195         if( status ) return status;
15196 #else
15197         /* Draft 4 pthreads */
15198         status = pthread_create( &t, pthread_attr_default, task, NULL );
15199         if( status ) return errno;
15200
15201         /* give thread a chance to complete */
15202         /* it should remain joinable and hence detachable */
15203         sleep( 1 );
15204
15205         status = pthread_detach( &t );
15206         if( status ) return errno;
15207 #endif
15208
15209 #ifdef HAVE_LINUX_THREADS
15210         pthread_kill_other_threads_np();
15211 #endif
15212
15213         return 0;
15214
15215 }
15216
15217 EOF
15218 if { (eval echo configure:15219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15219 then
15220   ol_cv_pthread_create_works=yes
15221 else
15222   echo "configure: failed program was:" >&5
15223   cat conftest.$ac_ext >&5
15224   rm -fr conftest*
15225   ol_cv_pthread_create_works=no
15226 fi
15227 rm -fr conftest*
15228 fi
15229
15230 fi
15231
15232 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15233
15234                         if test $ol_cv_pthread_create_works = no ; then
15235                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15236                         fi
15237
15238                                                 if test $ol_with_yielding_select = auto ; then
15239                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15240 echo "configure:15241: checking if select yields when using pthreads" >&5
15241 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15242   echo $ac_n "(cached) $ac_c" 1>&6
15243 else
15244   
15245                                 if test "$cross_compiling" = yes; then
15246   ol_cv_pthread_select_yields=cross
15247 else
15248   cat > conftest.$ac_ext <<EOF
15249 #line 15250 "configure"
15250 #include "confdefs.h"
15251
15252 #include <sys/types.h>
15253 #include <sys/time.h>
15254 #include <unistd.h>
15255 #include <pthread.h>
15256 #ifndef NULL
15257 #define NULL (void*) 0
15258 #endif
15259
15260 static int fildes[2];
15261
15262 static void *task(p)
15263         void *p;
15264 {
15265         int i;
15266         struct timeval tv;
15267
15268         fd_set rfds;
15269
15270         tv.tv_sec=10;
15271         tv.tv_usec=0;
15272
15273         FD_ZERO(&rfds);
15274         FD_SET(fildes[0], &rfds);
15275
15276         /* we're not interested in any fds */
15277         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15278
15279         if(i < 0) {
15280                 perror("select");
15281                 exit(10);
15282         }
15283
15284         exit(0); /* if we exit here, the select blocked the whole process */
15285 }
15286
15287 int main(argc, argv)
15288         int argc;
15289         char **argv;
15290 {
15291         pthread_t t;
15292
15293         /* create a pipe to select */
15294         if(pipe(&fildes[0])) {
15295                 perror("select");
15296                 exit(1);
15297         }
15298
15299 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15300         (void) pthread_setconcurrency(2);
15301 #else
15302 #ifdef HAVE_THR_SETCONCURRENCY
15303         /* Set Solaris LWP concurrency to 2 */
15304         thr_setconcurrency(2);
15305 #endif
15306 #endif
15307
15308 #if HAVE_PTHREADS < 6
15309         pthread_create(&t, pthread_attr_default, task, NULL);
15310 #else
15311         pthread_create(&t, NULL, task, NULL);
15312 #endif
15313
15314         /* make sure task runs first */
15315 #if HAVE_THR_YIELD
15316         thr_yield();
15317 #elif defined( HAVE_SCHED_YIELD )
15318         sched_yield();
15319 #elif defined( HAVE_PTHREAD_YIELD )
15320         pthread_yield();
15321 #endif
15322
15323         exit(2);
15324 }
15325 EOF
15326 if { (eval echo configure:15327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15327 then
15328   ol_cv_pthread_select_yields=no
15329 else
15330   echo "configure: failed program was:" >&5
15331   cat conftest.$ac_ext >&5
15332   rm -fr conftest*
15333   ol_cv_pthread_select_yields=yes
15334 fi
15335 rm -fr conftest*
15336 fi
15337
15338 fi
15339
15340 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15341
15342                                 if test $ol_cv_pthread_select_yields = cross ; then
15343                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15344                                 fi
15345
15346                                 if test $ol_cv_pthread_select_yields = yes ; then
15347                                         ol_with_yielding_select=yes
15348                                 fi
15349                         fi
15350
15351                                                 CPPFLAGS="$save_CPPFLAGS"
15352                         LIBS="$save_LIBS"
15353                 else
15354                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15355                 fi
15356         fi
15357
15358         if test $ol_with_threads = posix ; then
15359                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15360         fi
15361 fi
15362
15363 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15364         -o $ol_with_threads = mach ; then
15365
15366                 for ac_hdr in mach/cthreads.h cthreads.h
15367 do
15368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15370 echo "configure:15371: checking for $ac_hdr" >&5
15371 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15372   echo $ac_n "(cached) $ac_c" 1>&6
15373 else
15374   cat > conftest.$ac_ext <<EOF
15375 #line 15376 "configure"
15376 #include "confdefs.h"
15377 #include <$ac_hdr>
15378 EOF
15379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15380 { (eval echo configure:15381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15382 if test -z "$ac_err"; then
15383   rm -rf conftest*
15384   eval "ac_cv_header_$ac_safe=yes"
15385 else
15386   echo "$ac_err" >&5
15387   echo "configure: failed program was:" >&5
15388   cat conftest.$ac_ext >&5
15389   rm -rf conftest*
15390   eval "ac_cv_header_$ac_safe=no"
15391 fi
15392 rm -f conftest*
15393 fi
15394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15395   echo "$ac_t""yes" 1>&6
15396     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15397   cat >> confdefs.h <<EOF
15398 #define $ac_tr_hdr 1
15399 EOF
15400  
15401 else
15402   echo "$ac_t""no" 1>&6
15403 fi
15404 done
15405
15406         if test $ac_cv_header_mach_cthreads_h = yes ; then
15407                 ol_with_threads=found
15408
15409                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15410 echo "configure:15411: checking for cthread_fork" >&5
15411 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15412   echo $ac_n "(cached) $ac_c" 1>&6
15413 else
15414   cat > conftest.$ac_ext <<EOF
15415 #line 15416 "configure"
15416 #include "confdefs.h"
15417 /* System header to define __stub macros and hopefully few prototypes,
15418     which can conflict with char cthread_fork(); below.  */
15419 #include <assert.h>
15420 /* Override any gcc2 internal prototype to avoid an error.  */
15421 /* We use char because int might match the return type of a gcc2
15422     builtin and then its argument prototype would still apply.  */
15423 char cthread_fork();
15424 char (*f)();
15425
15426 int main() {
15427
15428 /* The GNU C library defines this for functions which it implements
15429     to always fail with ENOSYS.  Some functions are actually named
15430     something starting with __ and the normal name is an alias.  */
15431 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15432 choke me
15433 #else
15434 f = cthread_fork;
15435 #endif
15436
15437 ; return 0; }
15438 EOF
15439 if { (eval echo configure:15440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15440   rm -rf conftest*
15441   eval "ac_cv_func_cthread_fork=yes"
15442 else
15443   echo "configure: failed program was:" >&5
15444   cat conftest.$ac_ext >&5
15445   rm -rf conftest*
15446   eval "ac_cv_func_cthread_fork=no"
15447 fi
15448 rm -f conftest*
15449 fi
15450
15451 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15452   echo "$ac_t""yes" 1>&6
15453   ol_link_threads=yes
15454 else
15455   echo "$ac_t""no" 1>&6
15456 fi
15457
15458
15459                 if test $ol_link_threads = no ; then
15460                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15461 echo "configure:15462: checking for cthread_fork with -all_load" >&5
15462 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15463   echo $ac_n "(cached) $ac_c" 1>&6
15464 else
15465   
15466                                                                 save_LIBS="$LIBS"
15467                                 LIBS="-all_load $LIBS"
15468                                 cat > conftest.$ac_ext <<EOF
15469 #line 15470 "configure"
15470 #include "confdefs.h"
15471 #include <mach/cthreads.h>
15472 int main() {
15473
15474                                         cthread_fork((void *)0, (void *)0);
15475                                         
15476 ; return 0; }
15477 EOF
15478 if { (eval echo configure:15479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15479   rm -rf conftest*
15480   ol_cv_cthread_all_load=yes
15481 else
15482   echo "configure: failed program was:" >&5
15483   cat conftest.$ac_ext >&5
15484   rm -rf conftest*
15485   ol_cv_cthread_all_load=no
15486 fi
15487 rm -f conftest*
15488                                                                 LIBS="$save_LIBS"
15489                         
15490 fi
15491
15492 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15493
15494                         if test $ol_cv_cthread_all_load = yes ; then
15495                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15496                                 ol_link_threads=mach
15497                                 ol_with_threads=found
15498                         fi
15499                 fi
15500
15501         elif test $ac_cv_header_cthreads_h = yes ; then
15502                                 
15503                 ol_with_threads=found
15504  
15505                                 save_LIBS="$LIBS"
15506                 LIBS="$LIBS -lthreads"
15507                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15508 echo "configure:15509: checking for cthread_fork" >&5
15509 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15510   echo $ac_n "(cached) $ac_c" 1>&6
15511 else
15512   cat > conftest.$ac_ext <<EOF
15513 #line 15514 "configure"
15514 #include "confdefs.h"
15515 /* System header to define __stub macros and hopefully few prototypes,
15516     which can conflict with char cthread_fork(); below.  */
15517 #include <assert.h>
15518 /* Override any gcc2 internal prototype to avoid an error.  */
15519 /* We use char because int might match the return type of a gcc2
15520     builtin and then its argument prototype would still apply.  */
15521 char cthread_fork();
15522 char (*f)();
15523
15524 int main() {
15525
15526 /* The GNU C library defines this for functions which it implements
15527     to always fail with ENOSYS.  Some functions are actually named
15528     something starting with __ and the normal name is an alias.  */
15529 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15530 choke me
15531 #else
15532 f = cthread_fork;
15533 #endif
15534
15535 ; return 0; }
15536 EOF
15537 if { (eval echo configure:15538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15538   rm -rf conftest*
15539   eval "ac_cv_func_cthread_fork=yes"
15540 else
15541   echo "configure: failed program was:" >&5
15542   cat conftest.$ac_ext >&5
15543   rm -rf conftest*
15544   eval "ac_cv_func_cthread_fork=no"
15545 fi
15546 rm -f conftest*
15547 fi
15548
15549 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15550   echo "$ac_t""yes" 1>&6
15551   ol_link_threads=yes
15552 else
15553   echo "$ac_t""no" 1>&6
15554 fi
15555
15556                 LIBS="$save_LIBS"
15557
15558                 if test $ol_link_threads = yes ; then
15559                         LTHREAD_LIBS="-lthreads"
15560                         ol_link_threads=mach
15561                         ol_with_threads=found
15562                 else
15563                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15564                 fi
15565
15566         elif test $ol_with_threads = mach ; then
15567                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15568         fi
15569
15570         if test $ol_link_threads = mach ; then
15571                 cat >> confdefs.h <<\EOF
15572 #define HAVE_MACH_CTHREADS 1
15573 EOF
15574
15575         elif test $ol_with_threads = found ; then
15576                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15577         fi
15578 fi
15579
15580 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15581         -o $ol_with_threads = pth ; then
15582
15583         for ac_hdr in pth.h
15584 do
15585 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15586 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15587 echo "configure:15588: checking for $ac_hdr" >&5
15588 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15589   echo $ac_n "(cached) $ac_c" 1>&6
15590 else
15591   cat > conftest.$ac_ext <<EOF
15592 #line 15593 "configure"
15593 #include "confdefs.h"
15594 #include <$ac_hdr>
15595 EOF
15596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15597 { (eval echo configure:15598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15599 if test -z "$ac_err"; then
15600   rm -rf conftest*
15601   eval "ac_cv_header_$ac_safe=yes"
15602 else
15603   echo "$ac_err" >&5
15604   echo "configure: failed program was:" >&5
15605   cat conftest.$ac_ext >&5
15606   rm -rf conftest*
15607   eval "ac_cv_header_$ac_safe=no"
15608 fi
15609 rm -f conftest*
15610 fi
15611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15612   echo "$ac_t""yes" 1>&6
15613     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15614   cat >> confdefs.h <<EOF
15615 #define $ac_tr_hdr 1
15616 EOF
15617  
15618 else
15619   echo "$ac_t""no" 1>&6
15620 fi
15621 done
15622
15623
15624         if test $ac_cv_header_pth_h = yes ; then
15625                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15626 echo "configure:15627: checking for pth_version in -lpth" >&5
15627 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15628 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15629   echo $ac_n "(cached) $ac_c" 1>&6
15630 else
15631   ac_save_LIBS="$LIBS"
15632 LIBS="-lpth  $LIBS"
15633 cat > conftest.$ac_ext <<EOF
15634 #line 15635 "configure"
15635 #include "confdefs.h"
15636 /* Override any gcc2 internal prototype to avoid an error.  */
15637 /* We use char because int might match the return type of a gcc2
15638     builtin and then its argument prototype would still apply.  */
15639 char pth_version();
15640
15641 int main() {
15642 pth_version()
15643 ; return 0; }
15644 EOF
15645 if { (eval echo configure:15646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15646   rm -rf conftest*
15647   eval "ac_cv_lib_$ac_lib_var=yes"
15648 else
15649   echo "configure: failed program was:" >&5
15650   cat conftest.$ac_ext >&5
15651   rm -rf conftest*
15652   eval "ac_cv_lib_$ac_lib_var=no"
15653 fi
15654 rm -f conftest*
15655 LIBS="$ac_save_LIBS"
15656
15657 fi
15658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15659   echo "$ac_t""yes" 1>&6
15660   have_pth=yes
15661 else
15662   echo "$ac_t""no" 1>&6
15663 have_pth=no
15664 fi
15665
15666
15667                 if test $have_pth = yes ; then
15668                         cat >> confdefs.h <<\EOF
15669 #define HAVE_GNU_PTH 1
15670 EOF
15671
15672                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15673                         ol_link_threads=pth
15674                         ol_with_threads=found
15675
15676                         if test $ol_with_yielding_select = auto ; then
15677                                 ol_with_yielding_select=yes
15678                         fi
15679                 fi
15680         fi
15681 fi
15682
15683 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15684         -o $ol_with_threads = lwp ; then
15685
15686                 for ac_hdr in thread.h synch.h
15687 do
15688 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15689 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15690 echo "configure:15691: checking for $ac_hdr" >&5
15691 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15692   echo $ac_n "(cached) $ac_c" 1>&6
15693 else
15694   cat > conftest.$ac_ext <<EOF
15695 #line 15696 "configure"
15696 #include "confdefs.h"
15697 #include <$ac_hdr>
15698 EOF
15699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15700 { (eval echo configure:15701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15702 if test -z "$ac_err"; then
15703   rm -rf conftest*
15704   eval "ac_cv_header_$ac_safe=yes"
15705 else
15706   echo "$ac_err" >&5
15707   echo "configure: failed program was:" >&5
15708   cat conftest.$ac_ext >&5
15709   rm -rf conftest*
15710   eval "ac_cv_header_$ac_safe=no"
15711 fi
15712 rm -f conftest*
15713 fi
15714 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15715   echo "$ac_t""yes" 1>&6
15716     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15717   cat >> confdefs.h <<EOF
15718 #define $ac_tr_hdr 1
15719 EOF
15720  
15721 else
15722   echo "$ac_t""no" 1>&6
15723 fi
15724 done
15725
15726         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15727                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15728 echo "configure:15729: checking for thr_create in -lthread" >&5
15729 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15730 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15731   echo $ac_n "(cached) $ac_c" 1>&6
15732 else
15733   ac_save_LIBS="$LIBS"
15734 LIBS="-lthread  $LIBS"
15735 cat > conftest.$ac_ext <<EOF
15736 #line 15737 "configure"
15737 #include "confdefs.h"
15738 /* Override any gcc2 internal prototype to avoid an error.  */
15739 /* We use char because int might match the return type of a gcc2
15740     builtin and then its argument prototype would still apply.  */
15741 char thr_create();
15742
15743 int main() {
15744 thr_create()
15745 ; return 0; }
15746 EOF
15747 if { (eval echo configure:15748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15748   rm -rf conftest*
15749   eval "ac_cv_lib_$ac_lib_var=yes"
15750 else
15751   echo "configure: failed program was:" >&5
15752   cat conftest.$ac_ext >&5
15753   rm -rf conftest*
15754   eval "ac_cv_lib_$ac_lib_var=no"
15755 fi
15756 rm -f conftest*
15757 LIBS="$ac_save_LIBS"
15758
15759 fi
15760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15761   echo "$ac_t""yes" 1>&6
15762   have_thr=yes
15763 else
15764   echo "$ac_t""no" 1>&6
15765 have_thr=no
15766 fi
15767
15768
15769                 if test $have_thr = yes ; then
15770                         cat >> confdefs.h <<\EOF
15771 #define HAVE_THR 1
15772 EOF
15773
15774                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15775                         ol_link_threads=thr
15776
15777                         if test $ol_with_yielding_select = auto ; then
15778                                 ol_with_yielding_select=yes
15779                         fi
15780
15781                                                 for ac_func in \
15782                                 thr_setconcurrency \
15783                                 thr_getconcurrency \
15784                         
15785 do
15786 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15787 echo "configure:15788: checking for $ac_func" >&5
15788 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15789   echo $ac_n "(cached) $ac_c" 1>&6
15790 else
15791   cat > conftest.$ac_ext <<EOF
15792 #line 15793 "configure"
15793 #include "confdefs.h"
15794 /* System header to define __stub macros and hopefully few prototypes,
15795     which can conflict with char $ac_func(); below.  */
15796 #include <assert.h>
15797 /* Override any gcc2 internal prototype to avoid an error.  */
15798 /* We use char because int might match the return type of a gcc2
15799     builtin and then its argument prototype would still apply.  */
15800 char $ac_func();
15801 char (*f)();
15802
15803 int main() {
15804
15805 /* The GNU C library defines this for functions which it implements
15806     to always fail with ENOSYS.  Some functions are actually named
15807     something starting with __ and the normal name is an alias.  */
15808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15809 choke me
15810 #else
15811 f = $ac_func;
15812 #endif
15813
15814 ; return 0; }
15815 EOF
15816 if { (eval echo configure:15817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15817   rm -rf conftest*
15818   eval "ac_cv_func_$ac_func=yes"
15819 else
15820   echo "configure: failed program was:" >&5
15821   cat conftest.$ac_ext >&5
15822   rm -rf conftest*
15823   eval "ac_cv_func_$ac_func=no"
15824 fi
15825 rm -f conftest*
15826 fi
15827
15828 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15829   echo "$ac_t""yes" 1>&6
15830     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15831   cat >> confdefs.h <<EOF
15832 #define $ac_tr_func 1
15833 EOF
15834  
15835 else
15836   echo "$ac_t""no" 1>&6
15837 fi
15838 done
15839
15840                 fi
15841         fi
15842
15843                 for ac_hdr in lwp/lwp.h
15844 do
15845 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15846 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15847 echo "configure:15848: checking for $ac_hdr" >&5
15848 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15849   echo $ac_n "(cached) $ac_c" 1>&6
15850 else
15851   cat > conftest.$ac_ext <<EOF
15852 #line 15853 "configure"
15853 #include "confdefs.h"
15854 #include <$ac_hdr>
15855 EOF
15856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15857 { (eval echo configure:15858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15859 if test -z "$ac_err"; then
15860   rm -rf conftest*
15861   eval "ac_cv_header_$ac_safe=yes"
15862 else
15863   echo "$ac_err" >&5
15864   echo "configure: failed program was:" >&5
15865   cat conftest.$ac_ext >&5
15866   rm -rf conftest*
15867   eval "ac_cv_header_$ac_safe=no"
15868 fi
15869 rm -f conftest*
15870 fi
15871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15872   echo "$ac_t""yes" 1>&6
15873     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15874   cat >> confdefs.h <<EOF
15875 #define $ac_tr_hdr 1
15876 EOF
15877  
15878 else
15879   echo "$ac_t""no" 1>&6
15880 fi
15881 done
15882
15883         if test $ac_cv_header_lwp_lwp_h = yes ; then
15884                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15885 echo "configure:15886: checking for lwp_create in -llwp" >&5
15886 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15887 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15888   echo $ac_n "(cached) $ac_c" 1>&6
15889 else
15890   ac_save_LIBS="$LIBS"
15891 LIBS="-llwp  $LIBS"
15892 cat > conftest.$ac_ext <<EOF
15893 #line 15894 "configure"
15894 #include "confdefs.h"
15895 /* Override any gcc2 internal prototype to avoid an error.  */
15896 /* We use char because int might match the return type of a gcc2
15897     builtin and then its argument prototype would still apply.  */
15898 char lwp_create();
15899
15900 int main() {
15901 lwp_create()
15902 ; return 0; }
15903 EOF
15904 if { (eval echo configure:15905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15905   rm -rf conftest*
15906   eval "ac_cv_lib_$ac_lib_var=yes"
15907 else
15908   echo "configure: failed program was:" >&5
15909   cat conftest.$ac_ext >&5
15910   rm -rf conftest*
15911   eval "ac_cv_lib_$ac_lib_var=no"
15912 fi
15913 rm -f conftest*
15914 LIBS="$ac_save_LIBS"
15915
15916 fi
15917 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15918   echo "$ac_t""yes" 1>&6
15919   have_lwp=yes
15920 else
15921   echo "$ac_t""no" 1>&6
15922 have_lwp=no
15923 fi
15924
15925
15926                 if test $have_lwp = yes ; then
15927                         cat >> confdefs.h <<\EOF
15928 #define HAVE_LWP 1
15929 EOF
15930
15931                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15932                         ol_link_threads=lwp
15933
15934                         if test $ol_with_yielding_select = auto ; then
15935                                 ol_with_yielding_select=no
15936                         fi
15937                 fi
15938         fi
15939 fi
15940
15941 if test $ol_with_yielding_select = yes ; then
15942         cat >> confdefs.h <<\EOF
15943 #define HAVE_YIELDING_SELECT 1
15944 EOF
15945
15946 fi
15947
15948 if test $ol_with_threads = manual ; then
15949                 ol_link_threads=yes
15950
15951         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15952
15953         for ac_hdr in pthread.h sched.h
15954 do
15955 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15956 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15957 echo "configure:15958: checking for $ac_hdr" >&5
15958 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15959   echo $ac_n "(cached) $ac_c" 1>&6
15960 else
15961   cat > conftest.$ac_ext <<EOF
15962 #line 15963 "configure"
15963 #include "confdefs.h"
15964 #include <$ac_hdr>
15965 EOF
15966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15967 { (eval echo configure:15968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15969 if test -z "$ac_err"; then
15970   rm -rf conftest*
15971   eval "ac_cv_header_$ac_safe=yes"
15972 else
15973   echo "$ac_err" >&5
15974   echo "configure: failed program was:" >&5
15975   cat conftest.$ac_ext >&5
15976   rm -rf conftest*
15977   eval "ac_cv_header_$ac_safe=no"
15978 fi
15979 rm -f conftest*
15980 fi
15981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15982   echo "$ac_t""yes" 1>&6
15983     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15984   cat >> confdefs.h <<EOF
15985 #define $ac_tr_hdr 1
15986 EOF
15987  
15988 else
15989   echo "$ac_t""no" 1>&6
15990 fi
15991 done
15992
15993         for ac_func in sched_yield pthread_yield
15994 do
15995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15996 echo "configure:15997: checking for $ac_func" >&5
15997 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15998   echo $ac_n "(cached) $ac_c" 1>&6
15999 else
16000   cat > conftest.$ac_ext <<EOF
16001 #line 16002 "configure"
16002 #include "confdefs.h"
16003 /* System header to define __stub macros and hopefully few prototypes,
16004     which can conflict with char $ac_func(); below.  */
16005 #include <assert.h>
16006 /* Override any gcc2 internal prototype to avoid an error.  */
16007 /* We use char because int might match the return type of a gcc2
16008     builtin and then its argument prototype would still apply.  */
16009 char $ac_func();
16010 char (*f)();
16011
16012 int main() {
16013
16014 /* The GNU C library defines this for functions which it implements
16015     to always fail with ENOSYS.  Some functions are actually named
16016     something starting with __ and the normal name is an alias.  */
16017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16018 choke me
16019 #else
16020 f = $ac_func;
16021 #endif
16022
16023 ; return 0; }
16024 EOF
16025 if { (eval echo configure:16026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16026   rm -rf conftest*
16027   eval "ac_cv_func_$ac_func=yes"
16028 else
16029   echo "configure: failed program was:" >&5
16030   cat conftest.$ac_ext >&5
16031   rm -rf conftest*
16032   eval "ac_cv_func_$ac_func=no"
16033 fi
16034 rm -f conftest*
16035 fi
16036
16037 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16038   echo "$ac_t""yes" 1>&6
16039     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16040   cat >> confdefs.h <<EOF
16041 #define $ac_tr_func 1
16042 EOF
16043  
16044 else
16045   echo "$ac_t""no" 1>&6
16046 fi
16047 done
16048
16049         
16050         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16051 echo "configure:16052: checking for LinuxThreads pthread.h" >&5
16052 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16053   echo $ac_n "(cached) $ac_c" 1>&6
16054 else
16055   cat > conftest.$ac_ext <<EOF
16056 #line 16057 "configure"
16057 #include "confdefs.h"
16058 #include <pthread.h>
16059 EOF
16060 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16061   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16062   rm -rf conftest*
16063   ol_cv_header_linux_threads=yes
16064 else
16065   rm -rf conftest*
16066   ol_cv_header_linux_threads=no
16067 fi
16068 rm -f conftest*
16069
16070                 
16071 fi
16072
16073 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16074         if test $ol_cv_header_linux_threads = yes; then
16075                 cat >> confdefs.h <<\EOF
16076 #define HAVE_LINUX_THREADS 1
16077 EOF
16078
16079         fi
16080
16081
16082         for ac_hdr in mach/cthreads.h
16083 do
16084 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16085 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16086 echo "configure:16087: checking for $ac_hdr" >&5
16087 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16088   echo $ac_n "(cached) $ac_c" 1>&6
16089 else
16090   cat > conftest.$ac_ext <<EOF
16091 #line 16092 "configure"
16092 #include "confdefs.h"
16093 #include <$ac_hdr>
16094 EOF
16095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16096 { (eval echo configure:16097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16098 if test -z "$ac_err"; then
16099   rm -rf conftest*
16100   eval "ac_cv_header_$ac_safe=yes"
16101 else
16102   echo "$ac_err" >&5
16103   echo "configure: failed program was:" >&5
16104   cat conftest.$ac_ext >&5
16105   rm -rf conftest*
16106   eval "ac_cv_header_$ac_safe=no"
16107 fi
16108 rm -f conftest*
16109 fi
16110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16111   echo "$ac_t""yes" 1>&6
16112     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16113   cat >> confdefs.h <<EOF
16114 #define $ac_tr_hdr 1
16115 EOF
16116  
16117 else
16118   echo "$ac_t""no" 1>&6
16119 fi
16120 done
16121
16122         for ac_hdr in lwp/lwp.h
16123 do
16124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16126 echo "configure:16127: checking for $ac_hdr" >&5
16127 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16128   echo $ac_n "(cached) $ac_c" 1>&6
16129 else
16130   cat > conftest.$ac_ext <<EOF
16131 #line 16132 "configure"
16132 #include "confdefs.h"
16133 #include <$ac_hdr>
16134 EOF
16135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16136 { (eval echo configure:16137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16138 if test -z "$ac_err"; then
16139   rm -rf conftest*
16140   eval "ac_cv_header_$ac_safe=yes"
16141 else
16142   echo "$ac_err" >&5
16143   echo "configure: failed program was:" >&5
16144   cat conftest.$ac_ext >&5
16145   rm -rf conftest*
16146   eval "ac_cv_header_$ac_safe=no"
16147 fi
16148 rm -f conftest*
16149 fi
16150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16151   echo "$ac_t""yes" 1>&6
16152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16153   cat >> confdefs.h <<EOF
16154 #define $ac_tr_hdr 1
16155 EOF
16156  
16157 else
16158   echo "$ac_t""no" 1>&6
16159 fi
16160 done
16161
16162         for ac_hdr in thread.h synch.h
16163 do
16164 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16165 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16166 echo "configure:16167: checking for $ac_hdr" >&5
16167 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16168   echo $ac_n "(cached) $ac_c" 1>&6
16169 else
16170   cat > conftest.$ac_ext <<EOF
16171 #line 16172 "configure"
16172 #include "confdefs.h"
16173 #include <$ac_hdr>
16174 EOF
16175 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16176 { (eval echo configure:16177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16177 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16178 if test -z "$ac_err"; then
16179   rm -rf conftest*
16180   eval "ac_cv_header_$ac_safe=yes"
16181 else
16182   echo "$ac_err" >&5
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   eval "ac_cv_header_$ac_safe=no"
16187 fi
16188 rm -f conftest*
16189 fi
16190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16191   echo "$ac_t""yes" 1>&6
16192     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16193   cat >> confdefs.h <<EOF
16194 #define $ac_tr_hdr 1
16195 EOF
16196  
16197 else
16198   echo "$ac_t""no" 1>&6
16199 fi
16200 done
16201
16202 fi
16203
16204 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16205                         cat >> confdefs.h <<\EOF
16206 #define REENTRANT 1
16207 EOF
16208
16209         cat >> confdefs.h <<\EOF
16210 #define _REENTRANT 1
16211 EOF
16212
16213         cat >> confdefs.h <<\EOF
16214 #define THREAD_SAFE 1
16215 EOF
16216
16217         cat >> confdefs.h <<\EOF
16218 #define _THREAD_SAFE 1
16219 EOF
16220
16221         cat >> confdefs.h <<\EOF
16222 #define THREADSAFE 1
16223 EOF
16224
16225         cat >> confdefs.h <<\EOF
16226 #define _THREADSAFE 1
16227 EOF
16228
16229         cat >> confdefs.h <<\EOF
16230 #define _SGI_MP_SOURCE 1
16231 EOF
16232
16233
16234                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16235 echo "configure:16236: checking for thread specific errno" >&5
16236 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16237   echo $ac_n "(cached) $ac_c" 1>&6
16238 else
16239   
16240                 cat > conftest.$ac_ext <<EOF
16241 #line 16242 "configure"
16242 #include "confdefs.h"
16243 #include <errno.h>
16244 int main() {
16245 errno = 0;
16246 ; return 0; }
16247 EOF
16248 if { (eval echo configure:16249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16249   rm -rf conftest*
16250   ol_cv_errno_thread_specific=yes
16251 else
16252   echo "configure: failed program was:" >&5
16253   cat conftest.$ac_ext >&5
16254   rm -rf conftest*
16255   ol_cv_errno_thread_specific=no
16256 fi
16257 rm -f conftest*
16258         
16259 fi
16260
16261 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16262
16263                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16264 echo "configure:16265: checking for thread specific h_errno" >&5
16265 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16266   echo $ac_n "(cached) $ac_c" 1>&6
16267 else
16268   
16269                 cat > conftest.$ac_ext <<EOF
16270 #line 16271 "configure"
16271 #include "confdefs.h"
16272 #include <netdb.h>
16273 int main() {
16274 h_errno = 0;
16275 ; return 0; }
16276 EOF
16277 if { (eval echo configure:16278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16278   rm -rf conftest*
16279   ol_cv_h_errno_thread_specific=yes
16280 else
16281   echo "configure: failed program was:" >&5
16282   cat conftest.$ac_ext >&5
16283   rm -rf conftest*
16284   ol_cv_h_errno_thread_specific=no
16285 fi
16286 rm -f conftest*
16287         
16288 fi
16289
16290 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16291
16292         if test $ol_cv_errno_thread_specific != yes \
16293                 -o $ol_cv_h_errno_thread_specific != yes ; then
16294                 LIBS="$LTHREAD_LIBS $LIBS"
16295                 LTHREAD_LIBS=""
16296         fi
16297
16298 fi  
16299
16300 if test $ol_link_threads = no ; then
16301         if test $ol_with_threads = yes ; then
16302                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16303         fi
16304
16305         if test $ol_with_threads = auto ; then
16306                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16307                 ol_with_threads=no
16308         fi
16309
16310         cat >> confdefs.h <<\EOF
16311 #define NO_THREADS 1
16312 EOF
16313
16314         LTHREAD_LIBS=""
16315 fi
16316
16317 if test $ol_link_threads != no ; then
16318         cat >> confdefs.h <<\EOF
16319 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16320 EOF
16321
16322 fi
16323
16324 for ac_func in \
16325         ctime_r                 \
16326         gethostbyname_r gethostbyaddr_r \
16327
16328 do
16329 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16330 echo "configure:16331: checking for $ac_func" >&5
16331 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16332   echo $ac_n "(cached) $ac_c" 1>&6
16333 else
16334   cat > conftest.$ac_ext <<EOF
16335 #line 16336 "configure"
16336 #include "confdefs.h"
16337 /* System header to define __stub macros and hopefully few prototypes,
16338     which can conflict with char $ac_func(); below.  */
16339 #include <assert.h>
16340 /* Override any gcc2 internal prototype to avoid an error.  */
16341 /* We use char because int might match the return type of a gcc2
16342     builtin and then its argument prototype would still apply.  */
16343 char $ac_func();
16344 char (*f)();
16345
16346 int main() {
16347
16348 /* The GNU C library defines this for functions which it implements
16349     to always fail with ENOSYS.  Some functions are actually named
16350     something starting with __ and the normal name is an alias.  */
16351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16352 choke me
16353 #else
16354 f = $ac_func;
16355 #endif
16356
16357 ; return 0; }
16358 EOF
16359 if { (eval echo configure:16360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16360   rm -rf conftest*
16361   eval "ac_cv_func_$ac_func=yes"
16362 else
16363   echo "configure: failed program was:" >&5
16364   cat conftest.$ac_ext >&5
16365   rm -rf conftest*
16366   eval "ac_cv_func_$ac_func=no"
16367 fi
16368 rm -f conftest*
16369 fi
16370
16371 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16372   echo "$ac_t""yes" 1>&6
16373     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16374   cat >> confdefs.h <<EOF
16375 #define $ac_tr_func 1
16376 EOF
16377  
16378 else
16379   echo "$ac_t""no" 1>&6
16380 fi
16381 done
16382
16383
16384 if test "$ac_cv_func_ctime_r" = no ; then
16385         ol_cv_func_ctime_r_nargs=0
16386 else
16387         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16388 echo "configure:16389: checking number of arguments of ctime_r" >&5
16389 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16390   echo $ac_n "(cached) $ac_c" 1>&6
16391 else
16392   cat > conftest.$ac_ext <<EOF
16393 #line 16394 "configure"
16394 #include "confdefs.h"
16395 #include <time.h>
16396 int main() {
16397 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16398 ; return 0; }
16399 EOF
16400 if { (eval echo configure:16401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16401   rm -rf conftest*
16402   ol_cv_func_ctime_r_nargs3=yes
16403 else
16404   echo "configure: failed program was:" >&5
16405   cat conftest.$ac_ext >&5
16406   rm -rf conftest*
16407   ol_cv_func_ctime_r_nargs3=no
16408 fi
16409 rm -f conftest*
16410
16411         cat > conftest.$ac_ext <<EOF
16412 #line 16413 "configure"
16413 #include "confdefs.h"
16414 #include <time.h>
16415 int main() {
16416 time_t ti; char *buffer; ctime_r(&ti,buffer);
16417 ; return 0; }
16418 EOF
16419 if { (eval echo configure:16420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16420   rm -rf conftest*
16421   ol_cv_func_ctime_r_nargs2=yes
16422 else
16423   echo "configure: failed program was:" >&5
16424   cat conftest.$ac_ext >&5
16425   rm -rf conftest*
16426   ol_cv_func_ctime_r_nargs2=no
16427 fi
16428 rm -f conftest*
16429
16430         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16431                 $ol_cv_func_ctime_r_nargs2 = no ; then
16432
16433                 ol_cv_func_ctime_r_nargs=3
16434
16435         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16436                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16437
16438                 ol_cv_func_ctime_r_nargs=2
16439
16440         else
16441                 ol_cv_func_ctime_r_nargs=0
16442         fi
16443   
16444 fi
16445
16446 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16447
16448   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16449         cat >> confdefs.h <<EOF
16450 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16451 EOF
16452
16453   fi
16454
16455 fi
16456
16457 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16458         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16459 echo "configure:16460: checking number of arguments of gethostbyname_r" >&5
16460 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16461   echo $ac_n "(cached) $ac_c" 1>&6
16462 else
16463   cat > conftest.$ac_ext <<EOF
16464 #line 16465 "configure"
16465 #include "confdefs.h"
16466 #include <sys/types.h>
16467 #include <sys/socket.h>
16468 #include <netinet/in.h>
16469 #include <netdb.h>
16470 #define BUFSIZE (sizeof(struct hostent)+10)
16471 int main() {
16472 struct hostent hent; char buffer[BUFSIZE];
16473                 int bufsize=BUFSIZE;int h_errno;
16474                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16475                         buffer, bufsize, &h_errno);
16476 ; return 0; }
16477 EOF
16478 if { (eval echo configure:16479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16479   rm -rf conftest*
16480   ol_cv_func_gethostbyname_r_nargs5=yes
16481 else
16482   echo "configure: failed program was:" >&5
16483   cat conftest.$ac_ext >&5
16484   rm -rf conftest*
16485   ol_cv_func_gethostbyname_r_nargs5=no
16486 fi
16487 rm -f conftest*
16488
16489         cat > conftest.$ac_ext <<EOF
16490 #line 16491 "configure"
16491 #include "confdefs.h"
16492 #include <sys/types.h>
16493 #include <sys/socket.h>
16494 #include <netinet/in.h>
16495 #include <netdb.h>
16496 #define BUFSIZE (sizeof(struct hostent)+10)
16497 int main() {
16498 struct hostent hent;struct hostent *rhent;
16499                 char buffer[BUFSIZE];
16500                 int bufsize=BUFSIZE;int h_errno;
16501                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16502                         &rhent, &h_errno);
16503 ; return 0; }
16504 EOF
16505 if { (eval echo configure:16506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16506   rm -rf conftest*
16507   ol_cv_func_gethostbyname_r_nargs6=yes
16508 else
16509   echo "configure: failed program was:" >&5
16510   cat conftest.$ac_ext >&5
16511   rm -rf conftest*
16512   ol_cv_func_gethostbyname_r_nargs6=no
16513 fi
16514 rm -f conftest*
16515
16516         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16517                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16518
16519                 ol_cv_func_gethostbyname_r_nargs=5
16520
16521         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16522                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16523
16524                 ol_cv_func_gethostbyname_r_nargs=6
16525
16526         else
16527                 ol_cv_func_gethostbyname_r_nargs=0
16528         fi
16529   
16530 fi
16531
16532 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16533   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16534         cat >> confdefs.h <<EOF
16535 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16536 EOF
16537
16538   fi
16539
16540 else
16541         ol_cv_func_gethostbyname_r_nargs=0
16542 fi
16543  
16544 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16545         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16546 echo "configure:16547: checking number of arguments of gethostbyaddr_r" >&5
16547 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16548   echo $ac_n "(cached) $ac_c" 1>&6
16549 else
16550   cat > conftest.$ac_ext <<EOF
16551 #line 16552 "configure"
16552 #include "confdefs.h"
16553 #include <sys/types.h>
16554 #include <sys/socket.h>
16555 #include <netinet/in.h>
16556 #include <netdb.h>
16557 #define BUFSIZE (sizeof(struct hostent)+10)
16558 int main() {
16559 struct hostent hent; char buffer[BUFSIZE]; 
16560             struct in_addr add;
16561             size_t alen=sizeof(struct in_addr);
16562             int bufsize=BUFSIZE;int h_errno;
16563                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16564                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16565 ; return 0; }
16566 EOF
16567 if { (eval echo configure:16568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16568   rm -rf conftest*
16569   ol_cv_func_gethostbyaddr_r_nargs7=yes
16570 else
16571   echo "configure: failed program was:" >&5
16572   cat conftest.$ac_ext >&5
16573   rm -rf conftest*
16574   ol_cv_func_gethostbyaddr_r_nargs7=no
16575 fi
16576 rm -f conftest*
16577
16578         cat > conftest.$ac_ext <<EOF
16579 #line 16580 "configure"
16580 #include "confdefs.h"
16581 #include <sys/types.h>
16582 #include <sys/socket.h>
16583 #include <netinet/in.h>
16584 #include <netdb.h>
16585 #define BUFSIZE (sizeof(struct hostent)+10)
16586 int main() {
16587 struct hostent hent;
16588                 struct hostent *rhent; char buffer[BUFSIZE]; 
16589                 struct in_addr add;
16590                 size_t alen=sizeof(struct in_addr);
16591                 int bufsize=BUFSIZE;int h_errno;
16592                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16593                         alen, AF_INET, &hent, buffer, bufsize, 
16594                         &rhent, &h_errno);
16595 ; return 0; }
16596 EOF
16597 if { (eval echo configure:16598: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16598   rm -rf conftest*
16599   ol_cv_func_gethostbyaddr_r_nargs8=yes
16600 else
16601   echo "configure: failed program was:" >&5
16602   cat conftest.$ac_ext >&5
16603   rm -rf conftest*
16604   ol_cv_func_gethostbyaddr_r_nargs8=no
16605 fi
16606 rm -f conftest*
16607
16608         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16609                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16610
16611                 ol_cv_func_gethostbyaddr_r_nargs=7
16612
16613         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16614                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16615
16616                 ol_cv_func_gethostbyaddr_r_nargs=8
16617
16618         else
16619                 ol_cv_func_gethostbyaddr_r_nargs=0
16620         fi
16621   
16622 fi
16623
16624 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16625   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16626     cat >> confdefs.h <<EOF
16627 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16628 EOF
16629
16630   fi
16631
16632 else
16633         ol_cv_func_gethostbyaddr_r_nargs=0
16634 fi
16635
16636 ol_link_ldbm=no 
16637
16638 if test $ol_with_ldbm_api = auto \
16639         -o $ol_with_ldbm_api = berkeley \
16640         -o $ol_with_ldbm_api = bcompat ; then
16641
16642         if test $ol_with_ldbm_api = bcompat; then \
16643                 for ac_hdr in db_185.h db.h
16644 do
16645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16647 echo "configure:16648: checking for $ac_hdr" >&5
16648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16649   echo $ac_n "(cached) $ac_c" 1>&6
16650 else
16651   cat > conftest.$ac_ext <<EOF
16652 #line 16653 "configure"
16653 #include "confdefs.h"
16654 #include <$ac_hdr>
16655 EOF
16656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16657 { (eval echo configure:16658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16659 if test -z "$ac_err"; then
16660   rm -rf conftest*
16661   eval "ac_cv_header_$ac_safe=yes"
16662 else
16663   echo "$ac_err" >&5
16664   echo "configure: failed program was:" >&5
16665   cat conftest.$ac_ext >&5
16666   rm -rf conftest*
16667   eval "ac_cv_header_$ac_safe=no"
16668 fi
16669 rm -f conftest*
16670 fi
16671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16672   echo "$ac_t""yes" 1>&6
16673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16674   cat >> confdefs.h <<EOF
16675 #define $ac_tr_hdr 1
16676 EOF
16677  
16678 else
16679   echo "$ac_t""no" 1>&6
16680 fi
16681 done
16682
16683 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16684         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16685 echo "configure:16686: checking if Berkeley DB header compatibility" >&5
16686 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16687   echo $ac_n "(cached) $ac_c" 1>&6
16688 else
16689   
16690                 cat > conftest.$ac_ext <<EOF
16691 #line 16692 "configure"
16692 #include "confdefs.h"
16693
16694 #if HAVE_DB_185_H
16695 #       include <db_185.h>
16696 #else
16697 #       include <db.h>
16698 #endif
16699
16700  /* this check could be improved */
16701 #ifndef DB_VERSION_MAJOR
16702 #       define DB_VERSION_MAJOR 1
16703 #endif
16704
16705 #if DB_VERSION_MAJOR == 1 
16706         __db_version_1
16707 #endif
16708
16709 EOF
16710 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16711   egrep "__db_version_1" >/dev/null 2>&1; then
16712   rm -rf conftest*
16713   ol_cv_header_db1=yes
16714 else
16715   rm -rf conftest*
16716   ol_cv_header_db1=no
16717 fi
16718 rm -f conftest*
16719
16720 fi
16721
16722 echo "$ac_t""$ol_cv_header_db1" 1>&6
16723
16724         if test $ol_cv_header_db1 = yes ; then
16725                 ol_cv_lib_db=no
16726 if test $ol_cv_lib_db = no ; then
16727         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16728 echo "configure:16729: checking for Berkeley DB link (default)" >&5
16729 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16730   echo $ac_n "(cached) $ac_c" 1>&6
16731 else
16732   
16733         ol_DB_LIB=
16734         ol_LIBS=$LIBS
16735         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16736
16737         cat > conftest.$ac_ext <<EOF
16738 #line 16739 "configure"
16739 #include "confdefs.h"
16740
16741 #ifdef HAVE_DB_185_H
16742 # include <db_185.h>
16743 #else
16744 # include <db.h>
16745 #endif
16746
16747 #ifndef DB_VERSION_MAJOR
16748 # define DB_VERSION_MAJOR 1
16749 #endif
16750
16751 #ifndef NULL
16752 #define NULL ((void*)0)
16753 #endif
16754
16755 int main() {
16756
16757 #if DB_VERSION_MAJOR > 1
16758         {
16759                 char *version;
16760                 int major, minor, patch;
16761
16762                 version = db_version( &major, &minor, &patch );
16763
16764                 if( major != DB_VERSION_MAJOR ||
16765                         minor < DB_VERSION_MINOR )
16766                 {
16767                         printf("Berkeley DB version mismatch\n"
16768                                 "\texpected: %s\n\tgot: %s\n",
16769                                 DB_VERSION_STRING, version);
16770                         return 1;
16771                 }
16772         }
16773 #endif
16774
16775 #if DB_VERSION_MAJOR > 2
16776         db_env_create( NULL, 0 );
16777 #elif DB_VERSION_MAJOR > 1
16778         db_appexit( NULL );
16779 #else
16780         (void) dbopen( NULL, 0, 0, 0, NULL);
16781 #endif
16782
16783 ; return 0; }
16784 EOF
16785 if { (eval echo configure:16786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16786   rm -rf conftest*
16787   ol_cv_db_none=yes
16788 else
16789   echo "configure: failed program was:" >&5
16790   cat conftest.$ac_ext >&5
16791   rm -rf conftest*
16792   ol_cv_db_none=no
16793 fi
16794 rm -f conftest*
16795
16796         LIBS="$ol_LIBS"
16797
16798 fi
16799
16800 echo "$ac_t""$ol_cv_db_none" 1>&6
16801
16802         if test $ol_cv_db_none = yes ; then
16803                 ol_cv_lib_db=yes
16804         fi
16805 fi
16806
16807 if test $ol_cv_lib_db = no ; then
16808         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16809 echo "configure:16810: checking for Berkeley DB link (-ldb41)" >&5
16810 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16811   echo $ac_n "(cached) $ac_c" 1>&6
16812 else
16813   
16814         ol_DB_LIB=-ldb41
16815         ol_LIBS=$LIBS
16816         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16817
16818         cat > conftest.$ac_ext <<EOF
16819 #line 16820 "configure"
16820 #include "confdefs.h"
16821
16822 #ifdef HAVE_DB_185_H
16823 # include <db_185.h>
16824 #else
16825 # include <db.h>
16826 #endif
16827
16828 #ifndef DB_VERSION_MAJOR
16829 # define DB_VERSION_MAJOR 1
16830 #endif
16831
16832 #ifndef NULL
16833 #define NULL ((void*)0)
16834 #endif
16835
16836 int main() {
16837
16838 #if DB_VERSION_MAJOR > 1
16839         {
16840                 char *version;
16841                 int major, minor, patch;
16842
16843                 version = db_version( &major, &minor, &patch );
16844
16845                 if( major != DB_VERSION_MAJOR ||
16846                         minor < DB_VERSION_MINOR )
16847                 {
16848                         printf("Berkeley DB version mismatch\n"
16849                                 "\texpected: %s\n\tgot: %s\n",
16850                                 DB_VERSION_STRING, version);
16851                         return 1;
16852                 }
16853         }
16854 #endif
16855
16856 #if DB_VERSION_MAJOR > 2
16857         db_env_create( NULL, 0 );
16858 #elif DB_VERSION_MAJOR > 1
16859         db_appexit( NULL );
16860 #else
16861         (void) dbopen( NULL, 0, 0, 0, NULL);
16862 #endif
16863
16864 ; return 0; }
16865 EOF
16866 if { (eval echo configure:16867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16867   rm -rf conftest*
16868   ol_cv_db_db41=yes
16869 else
16870   echo "configure: failed program was:" >&5
16871   cat conftest.$ac_ext >&5
16872   rm -rf conftest*
16873   ol_cv_db_db41=no
16874 fi
16875 rm -f conftest*
16876
16877         LIBS="$ol_LIBS"
16878
16879 fi
16880
16881 echo "$ac_t""$ol_cv_db_db41" 1>&6
16882
16883         if test $ol_cv_db_db41 = yes ; then
16884                 ol_cv_lib_db=-ldb41
16885         fi
16886 fi
16887
16888 if test $ol_cv_lib_db = no ; then
16889         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16890 echo "configure:16891: checking for Berkeley DB link (-ldb-41)" >&5
16891 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16892   echo $ac_n "(cached) $ac_c" 1>&6
16893 else
16894   
16895         ol_DB_LIB=-ldb-41
16896         ol_LIBS=$LIBS
16897         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16898
16899         cat > conftest.$ac_ext <<EOF
16900 #line 16901 "configure"
16901 #include "confdefs.h"
16902
16903 #ifdef HAVE_DB_185_H
16904 # include <db_185.h>
16905 #else
16906 # include <db.h>
16907 #endif
16908
16909 #ifndef DB_VERSION_MAJOR
16910 # define DB_VERSION_MAJOR 1
16911 #endif
16912
16913 #ifndef NULL
16914 #define NULL ((void*)0)
16915 #endif
16916
16917 int main() {
16918
16919 #if DB_VERSION_MAJOR > 1
16920         {
16921                 char *version;
16922                 int major, minor, patch;
16923
16924                 version = db_version( &major, &minor, &patch );
16925
16926                 if( major != DB_VERSION_MAJOR ||
16927                         minor < DB_VERSION_MINOR )
16928                 {
16929                         printf("Berkeley DB version mismatch\n"
16930                                 "\texpected: %s\n\tgot: %s\n",
16931                                 DB_VERSION_STRING, version);
16932                         return 1;
16933                 }
16934         }
16935 #endif
16936
16937 #if DB_VERSION_MAJOR > 2
16938         db_env_create( NULL, 0 );
16939 #elif DB_VERSION_MAJOR > 1
16940         db_appexit( NULL );
16941 #else
16942         (void) dbopen( NULL, 0, 0, 0, NULL);
16943 #endif
16944
16945 ; return 0; }
16946 EOF
16947 if { (eval echo configure:16948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16948   rm -rf conftest*
16949   ol_cv_db_db_41=yes
16950 else
16951   echo "configure: failed program was:" >&5
16952   cat conftest.$ac_ext >&5
16953   rm -rf conftest*
16954   ol_cv_db_db_41=no
16955 fi
16956 rm -f conftest*
16957
16958         LIBS="$ol_LIBS"
16959
16960 fi
16961
16962 echo "$ac_t""$ol_cv_db_db_41" 1>&6
16963
16964         if test $ol_cv_db_db_41 = yes ; then
16965                 ol_cv_lib_db=-ldb-41
16966         fi
16967 fi
16968
16969 if test $ol_cv_lib_db = no ; then
16970         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16971 echo "configure:16972: checking for Berkeley DB link (-ldb4)" >&5
16972 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16973   echo $ac_n "(cached) $ac_c" 1>&6
16974 else
16975   
16976         ol_DB_LIB=-ldb4
16977         ol_LIBS=$LIBS
16978         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16979
16980         cat > conftest.$ac_ext <<EOF
16981 #line 16982 "configure"
16982 #include "confdefs.h"
16983
16984 #ifdef HAVE_DB_185_H
16985 # include <db_185.h>
16986 #else
16987 # include <db.h>
16988 #endif
16989
16990 #ifndef DB_VERSION_MAJOR
16991 # define DB_VERSION_MAJOR 1
16992 #endif
16993
16994 #ifndef NULL
16995 #define NULL ((void*)0)
16996 #endif
16997
16998 int main() {
16999
17000 #if DB_VERSION_MAJOR > 1
17001         {
17002                 char *version;
17003                 int major, minor, patch;
17004
17005                 version = db_version( &major, &minor, &patch );
17006
17007                 if( major != DB_VERSION_MAJOR ||
17008                         minor < DB_VERSION_MINOR )
17009                 {
17010                         printf("Berkeley DB version mismatch\n"
17011                                 "\texpected: %s\n\tgot: %s\n",
17012                                 DB_VERSION_STRING, version);
17013                         return 1;
17014                 }
17015         }
17016 #endif
17017
17018 #if DB_VERSION_MAJOR > 2
17019         db_env_create( NULL, 0 );
17020 #elif DB_VERSION_MAJOR > 1
17021         db_appexit( NULL );
17022 #else
17023         (void) dbopen( NULL, 0, 0, 0, NULL);
17024 #endif
17025
17026 ; return 0; }
17027 EOF
17028 if { (eval echo configure:17029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17029   rm -rf conftest*
17030   ol_cv_db_db4=yes
17031 else
17032   echo "configure: failed program was:" >&5
17033   cat conftest.$ac_ext >&5
17034   rm -rf conftest*
17035   ol_cv_db_db4=no
17036 fi
17037 rm -f conftest*
17038
17039         LIBS="$ol_LIBS"
17040
17041 fi
17042
17043 echo "$ac_t""$ol_cv_db_db4" 1>&6
17044
17045         if test $ol_cv_db_db4 = yes ; then
17046                 ol_cv_lib_db=-ldb4
17047         fi
17048 fi
17049
17050 if test $ol_cv_lib_db = no ; then
17051         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17052 echo "configure:17053: checking for Berkeley DB link (-ldb-4)" >&5
17053 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17054   echo $ac_n "(cached) $ac_c" 1>&6
17055 else
17056   
17057         ol_DB_LIB=-ldb-4
17058         ol_LIBS=$LIBS
17059         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17060
17061         cat > conftest.$ac_ext <<EOF
17062 #line 17063 "configure"
17063 #include "confdefs.h"
17064
17065 #ifdef HAVE_DB_185_H
17066 # include <db_185.h>
17067 #else
17068 # include <db.h>
17069 #endif
17070
17071 #ifndef DB_VERSION_MAJOR
17072 # define DB_VERSION_MAJOR 1
17073 #endif
17074
17075 #ifndef NULL
17076 #define NULL ((void*)0)
17077 #endif
17078
17079 int main() {
17080
17081 #if DB_VERSION_MAJOR > 1
17082         {
17083                 char *version;
17084                 int major, minor, patch;
17085
17086                 version = db_version( &major, &minor, &patch );
17087
17088                 if( major != DB_VERSION_MAJOR ||
17089                         minor < DB_VERSION_MINOR )
17090                 {
17091                         printf("Berkeley DB version mismatch\n"
17092                                 "\texpected: %s\n\tgot: %s\n",
17093                                 DB_VERSION_STRING, version);
17094                         return 1;
17095                 }
17096         }
17097 #endif
17098
17099 #if DB_VERSION_MAJOR > 2
17100         db_env_create( NULL, 0 );
17101 #elif DB_VERSION_MAJOR > 1
17102         db_appexit( NULL );
17103 #else
17104         (void) dbopen( NULL, 0, 0, 0, NULL);
17105 #endif
17106
17107 ; return 0; }
17108 EOF
17109 if { (eval echo configure:17110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17110   rm -rf conftest*
17111   ol_cv_db_db_4=yes
17112 else
17113   echo "configure: failed program was:" >&5
17114   cat conftest.$ac_ext >&5
17115   rm -rf conftest*
17116   ol_cv_db_db_4=no
17117 fi
17118 rm -f conftest*
17119
17120         LIBS="$ol_LIBS"
17121
17122 fi
17123
17124 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17125
17126         if test $ol_cv_db_db_4 = yes ; then
17127                 ol_cv_lib_db=-ldb-4
17128         fi
17129 fi
17130
17131 if test $ol_cv_lib_db = no ; then
17132         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17133 echo "configure:17134: checking for Berkeley DB link (-ldb)" >&5
17134 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17135   echo $ac_n "(cached) $ac_c" 1>&6
17136 else
17137   
17138         ol_DB_LIB=-ldb
17139         ol_LIBS=$LIBS
17140         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17141
17142         cat > conftest.$ac_ext <<EOF
17143 #line 17144 "configure"
17144 #include "confdefs.h"
17145
17146 #ifdef HAVE_DB_185_H
17147 # include <db_185.h>
17148 #else
17149 # include <db.h>
17150 #endif
17151
17152 #ifndef DB_VERSION_MAJOR
17153 # define DB_VERSION_MAJOR 1
17154 #endif
17155
17156 #ifndef NULL
17157 #define NULL ((void*)0)
17158 #endif
17159
17160 int main() {
17161
17162 #if DB_VERSION_MAJOR > 1
17163         {
17164                 char *version;
17165                 int major, minor, patch;
17166
17167                 version = db_version( &major, &minor, &patch );
17168
17169                 if( major != DB_VERSION_MAJOR ||
17170                         minor < DB_VERSION_MINOR )
17171                 {
17172                         printf("Berkeley DB version mismatch\n"
17173                                 "\texpected: %s\n\tgot: %s\n",
17174                                 DB_VERSION_STRING, version);
17175                         return 1;
17176                 }
17177         }
17178 #endif
17179
17180 #if DB_VERSION_MAJOR > 2
17181         db_env_create( NULL, 0 );
17182 #elif DB_VERSION_MAJOR > 1
17183         db_appexit( NULL );
17184 #else
17185         (void) dbopen( NULL, 0, 0, 0, NULL);
17186 #endif
17187
17188 ; return 0; }
17189 EOF
17190 if { (eval echo configure:17191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17191   rm -rf conftest*
17192   ol_cv_db_db=yes
17193 else
17194   echo "configure: failed program was:" >&5
17195   cat conftest.$ac_ext >&5
17196   rm -rf conftest*
17197   ol_cv_db_db=no
17198 fi
17199 rm -f conftest*
17200
17201         LIBS="$ol_LIBS"
17202
17203 fi
17204
17205 echo "$ac_t""$ol_cv_db_db" 1>&6
17206
17207         if test $ol_cv_db_db = yes ; then
17208                 ol_cv_lib_db=-ldb
17209         fi
17210 fi
17211
17212 if test $ol_cv_lib_db = no ; then
17213         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17214 echo "configure:17215: checking for Berkeley DB link (-ldb3)" >&5
17215 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17216   echo $ac_n "(cached) $ac_c" 1>&6
17217 else
17218   
17219         ol_DB_LIB=-ldb3
17220         ol_LIBS=$LIBS
17221         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17222
17223         cat > conftest.$ac_ext <<EOF
17224 #line 17225 "configure"
17225 #include "confdefs.h"
17226
17227 #ifdef HAVE_DB_185_H
17228 # include <db_185.h>
17229 #else
17230 # include <db.h>
17231 #endif
17232
17233 #ifndef DB_VERSION_MAJOR
17234 # define DB_VERSION_MAJOR 1
17235 #endif
17236
17237 #ifndef NULL
17238 #define NULL ((void*)0)
17239 #endif
17240
17241 int main() {
17242
17243 #if DB_VERSION_MAJOR > 1
17244         {
17245                 char *version;
17246                 int major, minor, patch;
17247
17248                 version = db_version( &major, &minor, &patch );
17249
17250                 if( major != DB_VERSION_MAJOR ||
17251                         minor < DB_VERSION_MINOR )
17252                 {
17253                         printf("Berkeley DB version mismatch\n"
17254                                 "\texpected: %s\n\tgot: %s\n",
17255                                 DB_VERSION_STRING, version);
17256                         return 1;
17257                 }
17258         }
17259 #endif
17260
17261 #if DB_VERSION_MAJOR > 2
17262         db_env_create( NULL, 0 );
17263 #elif DB_VERSION_MAJOR > 1
17264         db_appexit( NULL );
17265 #else
17266         (void) dbopen( NULL, 0, 0, 0, NULL);
17267 #endif
17268
17269 ; return 0; }
17270 EOF
17271 if { (eval echo configure:17272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17272   rm -rf conftest*
17273   ol_cv_db_db3=yes
17274 else
17275   echo "configure: failed program was:" >&5
17276   cat conftest.$ac_ext >&5
17277   rm -rf conftest*
17278   ol_cv_db_db3=no
17279 fi
17280 rm -f conftest*
17281
17282         LIBS="$ol_LIBS"
17283
17284 fi
17285
17286 echo "$ac_t""$ol_cv_db_db3" 1>&6
17287
17288         if test $ol_cv_db_db3 = yes ; then
17289                 ol_cv_lib_db=-ldb3
17290         fi
17291 fi
17292
17293 if test $ol_cv_lib_db = no ; then
17294         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17295 echo "configure:17296: checking for Berkeley DB link (-ldb-3)" >&5
17296 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17297   echo $ac_n "(cached) $ac_c" 1>&6
17298 else
17299   
17300         ol_DB_LIB=-ldb-3
17301         ol_LIBS=$LIBS
17302         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17303
17304         cat > conftest.$ac_ext <<EOF
17305 #line 17306 "configure"
17306 #include "confdefs.h"
17307
17308 #ifdef HAVE_DB_185_H
17309 # include <db_185.h>
17310 #else
17311 # include <db.h>
17312 #endif
17313
17314 #ifndef DB_VERSION_MAJOR
17315 # define DB_VERSION_MAJOR 1
17316 #endif
17317
17318 #ifndef NULL
17319 #define NULL ((void*)0)
17320 #endif
17321
17322 int main() {
17323
17324 #if DB_VERSION_MAJOR > 1
17325         {
17326                 char *version;
17327                 int major, minor, patch;
17328
17329                 version = db_version( &major, &minor, &patch );
17330
17331                 if( major != DB_VERSION_MAJOR ||
17332                         minor < DB_VERSION_MINOR )
17333                 {
17334                         printf("Berkeley DB version mismatch\n"
17335                                 "\texpected: %s\n\tgot: %s\n",
17336                                 DB_VERSION_STRING, version);
17337                         return 1;
17338                 }
17339         }
17340 #endif
17341
17342 #if DB_VERSION_MAJOR > 2
17343         db_env_create( NULL, 0 );
17344 #elif DB_VERSION_MAJOR > 1
17345         db_appexit( NULL );
17346 #else
17347         (void) dbopen( NULL, 0, 0, 0, NULL);
17348 #endif
17349
17350 ; return 0; }
17351 EOF
17352 if { (eval echo configure:17353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17353   rm -rf conftest*
17354   ol_cv_db_db_3=yes
17355 else
17356   echo "configure: failed program was:" >&5
17357   cat conftest.$ac_ext >&5
17358   rm -rf conftest*
17359   ol_cv_db_db_3=no
17360 fi
17361 rm -f conftest*
17362
17363         LIBS="$ol_LIBS"
17364
17365 fi
17366
17367 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17368
17369         if test $ol_cv_db_db_3 = yes ; then
17370                 ol_cv_lib_db=-ldb-3
17371         fi
17372 fi
17373
17374 if test $ol_cv_lib_db = no ; then
17375         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17376 echo "configure:17377: checking for Berkeley DB link (-ldb2)" >&5
17377 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17378   echo $ac_n "(cached) $ac_c" 1>&6
17379 else
17380   
17381         ol_DB_LIB=-ldb2
17382         ol_LIBS=$LIBS
17383         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17384
17385         cat > conftest.$ac_ext <<EOF
17386 #line 17387 "configure"
17387 #include "confdefs.h"
17388
17389 #ifdef HAVE_DB_185_H
17390 # include <db_185.h>
17391 #else
17392 # include <db.h>
17393 #endif
17394
17395 #ifndef DB_VERSION_MAJOR
17396 # define DB_VERSION_MAJOR 1
17397 #endif
17398
17399 #ifndef NULL
17400 #define NULL ((void*)0)
17401 #endif
17402
17403 int main() {
17404
17405 #if DB_VERSION_MAJOR > 1
17406         {
17407                 char *version;
17408                 int major, minor, patch;
17409
17410                 version = db_version( &major, &minor, &patch );
17411
17412                 if( major != DB_VERSION_MAJOR ||
17413                         minor < DB_VERSION_MINOR )
17414                 {
17415                         printf("Berkeley DB version mismatch\n"
17416                                 "\texpected: %s\n\tgot: %s\n",
17417                                 DB_VERSION_STRING, version);
17418                         return 1;
17419                 }
17420         }
17421 #endif
17422
17423 #if DB_VERSION_MAJOR > 2
17424         db_env_create( NULL, 0 );
17425 #elif DB_VERSION_MAJOR > 1
17426         db_appexit( NULL );
17427 #else
17428         (void) dbopen( NULL, 0, 0, 0, NULL);
17429 #endif
17430
17431 ; return 0; }
17432 EOF
17433 if { (eval echo configure:17434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17434   rm -rf conftest*
17435   ol_cv_db_db2=yes
17436 else
17437   echo "configure: failed program was:" >&5
17438   cat conftest.$ac_ext >&5
17439   rm -rf conftest*
17440   ol_cv_db_db2=no
17441 fi
17442 rm -f conftest*
17443
17444         LIBS="$ol_LIBS"
17445
17446 fi
17447
17448 echo "$ac_t""$ol_cv_db_db2" 1>&6
17449
17450         if test $ol_cv_db_db2 = yes ; then
17451                 ol_cv_lib_db=-ldb2
17452         fi
17453 fi
17454
17455 if test $ol_cv_lib_db = no ; then
17456         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17457 echo "configure:17458: checking for Berkeley DB link (-ldb-2)" >&5
17458 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17459   echo $ac_n "(cached) $ac_c" 1>&6
17460 else
17461   
17462         ol_DB_LIB=-ldb-2
17463         ol_LIBS=$LIBS
17464         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17465
17466         cat > conftest.$ac_ext <<EOF
17467 #line 17468 "configure"
17468 #include "confdefs.h"
17469
17470 #ifdef HAVE_DB_185_H
17471 # include <db_185.h>
17472 #else
17473 # include <db.h>
17474 #endif
17475
17476 #ifndef DB_VERSION_MAJOR
17477 # define DB_VERSION_MAJOR 1
17478 #endif
17479
17480 #ifndef NULL
17481 #define NULL ((void*)0)
17482 #endif
17483
17484 int main() {
17485
17486 #if DB_VERSION_MAJOR > 1
17487         {
17488                 char *version;
17489                 int major, minor, patch;
17490
17491                 version = db_version( &major, &minor, &patch );
17492
17493                 if( major != DB_VERSION_MAJOR ||
17494                         minor < DB_VERSION_MINOR )
17495                 {
17496                         printf("Berkeley DB version mismatch\n"
17497                                 "\texpected: %s\n\tgot: %s\n",
17498                                 DB_VERSION_STRING, version);
17499                         return 1;
17500                 }
17501         }
17502 #endif
17503
17504 #if DB_VERSION_MAJOR > 2
17505         db_env_create( NULL, 0 );
17506 #elif DB_VERSION_MAJOR > 1
17507         db_appexit( NULL );
17508 #else
17509         (void) dbopen( NULL, 0, 0, 0, NULL);
17510 #endif
17511
17512 ; return 0; }
17513 EOF
17514 if { (eval echo configure:17515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17515   rm -rf conftest*
17516   ol_cv_db_db_2=yes
17517 else
17518   echo "configure: failed program was:" >&5
17519   cat conftest.$ac_ext >&5
17520   rm -rf conftest*
17521   ol_cv_db_db_2=no
17522 fi
17523 rm -f conftest*
17524
17525         LIBS="$ol_LIBS"
17526
17527 fi
17528
17529 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17530
17531         if test $ol_cv_db_db_2 = yes ; then
17532                 ol_cv_lib_db=-ldb-2
17533         fi
17534 fi
17535
17536 if test $ol_cv_lib_db = no ; then
17537         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17538 echo "configure:17539: checking for Berkeley DB link (-ldb1)" >&5
17539 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17540   echo $ac_n "(cached) $ac_c" 1>&6
17541 else
17542   
17543         ol_DB_LIB=-ldb1
17544         ol_LIBS=$LIBS
17545         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17546
17547         cat > conftest.$ac_ext <<EOF
17548 #line 17549 "configure"
17549 #include "confdefs.h"
17550
17551 #ifdef HAVE_DB_185_H
17552 # include <db_185.h>
17553 #else
17554 # include <db.h>
17555 #endif
17556
17557 #ifndef DB_VERSION_MAJOR
17558 # define DB_VERSION_MAJOR 1
17559 #endif
17560
17561 #ifndef NULL
17562 #define NULL ((void*)0)
17563 #endif
17564
17565 int main() {
17566
17567 #if DB_VERSION_MAJOR > 1
17568         {
17569                 char *version;
17570                 int major, minor, patch;
17571
17572                 version = db_version( &major, &minor, &patch );
17573
17574                 if( major != DB_VERSION_MAJOR ||
17575                         minor < DB_VERSION_MINOR )
17576                 {
17577                         printf("Berkeley DB version mismatch\n"
17578                                 "\texpected: %s\n\tgot: %s\n",
17579                                 DB_VERSION_STRING, version);
17580                         return 1;
17581                 }
17582         }
17583 #endif
17584
17585 #if DB_VERSION_MAJOR > 2
17586         db_env_create( NULL, 0 );
17587 #elif DB_VERSION_MAJOR > 1
17588         db_appexit( NULL );
17589 #else
17590         (void) dbopen( NULL, 0, 0, 0, NULL);
17591 #endif
17592
17593 ; return 0; }
17594 EOF
17595 if { (eval echo configure:17596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17596   rm -rf conftest*
17597   ol_cv_db_db1=yes
17598 else
17599   echo "configure: failed program was:" >&5
17600   cat conftest.$ac_ext >&5
17601   rm -rf conftest*
17602   ol_cv_db_db1=no
17603 fi
17604 rm -f conftest*
17605
17606         LIBS="$ol_LIBS"
17607
17608 fi
17609
17610 echo "$ac_t""$ol_cv_db_db1" 1>&6
17611
17612         if test $ol_cv_db_db1 = yes ; then
17613                 ol_cv_lib_db=-ldb1
17614         fi
17615 fi
17616
17617 if test $ol_cv_lib_db = no ; then
17618         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17619 echo "configure:17620: checking for Berkeley DB link (-ldb-1)" >&5
17620 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17621   echo $ac_n "(cached) $ac_c" 1>&6
17622 else
17623   
17624         ol_DB_LIB=-ldb-1
17625         ol_LIBS=$LIBS
17626         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17627
17628         cat > conftest.$ac_ext <<EOF
17629 #line 17630 "configure"
17630 #include "confdefs.h"
17631
17632 #ifdef HAVE_DB_185_H
17633 # include <db_185.h>
17634 #else
17635 # include <db.h>
17636 #endif
17637
17638 #ifndef DB_VERSION_MAJOR
17639 # define DB_VERSION_MAJOR 1
17640 #endif
17641
17642 #ifndef NULL
17643 #define NULL ((void*)0)
17644 #endif
17645
17646 int main() {
17647
17648 #if DB_VERSION_MAJOR > 1
17649         {
17650                 char *version;
17651                 int major, minor, patch;
17652
17653                 version = db_version( &major, &minor, &patch );
17654
17655                 if( major != DB_VERSION_MAJOR ||
17656                         minor < DB_VERSION_MINOR )
17657                 {
17658                         printf("Berkeley DB version mismatch\n"
17659                                 "\texpected: %s\n\tgot: %s\n",
17660                                 DB_VERSION_STRING, version);
17661                         return 1;
17662                 }
17663         }
17664 #endif
17665
17666 #if DB_VERSION_MAJOR > 2
17667         db_env_create( NULL, 0 );
17668 #elif DB_VERSION_MAJOR > 1
17669         db_appexit( NULL );
17670 #else
17671         (void) dbopen( NULL, 0, 0, 0, NULL);
17672 #endif
17673
17674 ; return 0; }
17675 EOF
17676 if { (eval echo configure:17677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17677   rm -rf conftest*
17678   ol_cv_db_db_1=yes
17679 else
17680   echo "configure: failed program was:" >&5
17681   cat conftest.$ac_ext >&5
17682   rm -rf conftest*
17683   ol_cv_db_db_1=no
17684 fi
17685 rm -f conftest*
17686
17687         LIBS="$ol_LIBS"
17688
17689 fi
17690
17691 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17692
17693         if test $ol_cv_db_db_1 = yes ; then
17694                 ol_cv_lib_db=-ldb-1
17695         fi
17696 fi
17697
17698
17699                 if test "$ol_cv_lib_db" != no ; then
17700                         ol_cv_berkeley_db=yes
17701                 fi
17702         fi
17703 fi
17704
17705         else
17706                 ol_cv_berkeley_db=no
17707 for ac_hdr in db.h
17708 do
17709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17711 echo "configure:17712: checking for $ac_hdr" >&5
17712 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17713   echo $ac_n "(cached) $ac_c" 1>&6
17714 else
17715   cat > conftest.$ac_ext <<EOF
17716 #line 17717 "configure"
17717 #include "confdefs.h"
17718 #include <$ac_hdr>
17719 EOF
17720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17721 { (eval echo configure:17722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17723 if test -z "$ac_err"; then
17724   rm -rf conftest*
17725   eval "ac_cv_header_$ac_safe=yes"
17726 else
17727   echo "$ac_err" >&5
17728   echo "configure: failed program was:" >&5
17729   cat conftest.$ac_ext >&5
17730   rm -rf conftest*
17731   eval "ac_cv_header_$ac_safe=no"
17732 fi
17733 rm -f conftest*
17734 fi
17735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17736   echo "$ac_t""yes" 1>&6
17737     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17738   cat >> confdefs.h <<EOF
17739 #define $ac_tr_hdr 1
17740 EOF
17741  
17742 else
17743   echo "$ac_t""no" 1>&6
17744 fi
17745 done
17746
17747 if test $ac_cv_header_db_h = yes; then
17748         ol_cv_lib_db=no
17749 if test $ol_cv_lib_db = no ; then
17750         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17751 echo "configure:17752: checking for Berkeley DB link (default)" >&5
17752 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17753   echo $ac_n "(cached) $ac_c" 1>&6
17754 else
17755   
17756         ol_DB_LIB=
17757         ol_LIBS=$LIBS
17758         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17759
17760         cat > conftest.$ac_ext <<EOF
17761 #line 17762 "configure"
17762 #include "confdefs.h"
17763
17764 #ifdef HAVE_DB_185_H
17765 # include <db_185.h>
17766 #else
17767 # include <db.h>
17768 #endif
17769
17770 #ifndef DB_VERSION_MAJOR
17771 # define DB_VERSION_MAJOR 1
17772 #endif
17773
17774 #ifndef NULL
17775 #define NULL ((void*)0)
17776 #endif
17777
17778 int main() {
17779
17780 #if DB_VERSION_MAJOR > 1
17781         {
17782                 char *version;
17783                 int major, minor, patch;
17784
17785                 version = db_version( &major, &minor, &patch );
17786
17787                 if( major != DB_VERSION_MAJOR ||
17788                         minor < DB_VERSION_MINOR )
17789                 {
17790                         printf("Berkeley DB version mismatch\n"
17791                                 "\texpected: %s\n\tgot: %s\n",
17792                                 DB_VERSION_STRING, version);
17793                         return 1;
17794                 }
17795         }
17796 #endif
17797
17798 #if DB_VERSION_MAJOR > 2
17799         db_env_create( NULL, 0 );
17800 #elif DB_VERSION_MAJOR > 1
17801         db_appexit( NULL );
17802 #else
17803         (void) dbopen( NULL, 0, 0, 0, NULL);
17804 #endif
17805
17806 ; return 0; }
17807 EOF
17808 if { (eval echo configure:17809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17809   rm -rf conftest*
17810   ol_cv_db_none=yes
17811 else
17812   echo "configure: failed program was:" >&5
17813   cat conftest.$ac_ext >&5
17814   rm -rf conftest*
17815   ol_cv_db_none=no
17816 fi
17817 rm -f conftest*
17818
17819         LIBS="$ol_LIBS"
17820
17821 fi
17822
17823 echo "$ac_t""$ol_cv_db_none" 1>&6
17824
17825         if test $ol_cv_db_none = yes ; then
17826                 ol_cv_lib_db=yes
17827         fi
17828 fi
17829
17830 if test $ol_cv_lib_db = no ; then
17831         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17832 echo "configure:17833: checking for Berkeley DB link (-ldb41)" >&5
17833 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17834   echo $ac_n "(cached) $ac_c" 1>&6
17835 else
17836   
17837         ol_DB_LIB=-ldb41
17838         ol_LIBS=$LIBS
17839         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17840
17841         cat > conftest.$ac_ext <<EOF
17842 #line 17843 "configure"
17843 #include "confdefs.h"
17844
17845 #ifdef HAVE_DB_185_H
17846 # include <db_185.h>
17847 #else
17848 # include <db.h>
17849 #endif
17850
17851 #ifndef DB_VERSION_MAJOR
17852 # define DB_VERSION_MAJOR 1
17853 #endif
17854
17855 #ifndef NULL
17856 #define NULL ((void*)0)
17857 #endif
17858
17859 int main() {
17860
17861 #if DB_VERSION_MAJOR > 1
17862         {
17863                 char *version;
17864                 int major, minor, patch;
17865
17866                 version = db_version( &major, &minor, &patch );
17867
17868                 if( major != DB_VERSION_MAJOR ||
17869                         minor < DB_VERSION_MINOR )
17870                 {
17871                         printf("Berkeley DB version mismatch\n"
17872                                 "\texpected: %s\n\tgot: %s\n",
17873                                 DB_VERSION_STRING, version);
17874                         return 1;
17875                 }
17876         }
17877 #endif
17878
17879 #if DB_VERSION_MAJOR > 2
17880         db_env_create( NULL, 0 );
17881 #elif DB_VERSION_MAJOR > 1
17882         db_appexit( NULL );
17883 #else
17884         (void) dbopen( NULL, 0, 0, 0, NULL);
17885 #endif
17886
17887 ; return 0; }
17888 EOF
17889 if { (eval echo configure:17890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17890   rm -rf conftest*
17891   ol_cv_db_db41=yes
17892 else
17893   echo "configure: failed program was:" >&5
17894   cat conftest.$ac_ext >&5
17895   rm -rf conftest*
17896   ol_cv_db_db41=no
17897 fi
17898 rm -f conftest*
17899
17900         LIBS="$ol_LIBS"
17901
17902 fi
17903
17904 echo "$ac_t""$ol_cv_db_db41" 1>&6
17905
17906         if test $ol_cv_db_db41 = yes ; then
17907                 ol_cv_lib_db=-ldb41
17908         fi
17909 fi
17910
17911 if test $ol_cv_lib_db = no ; then
17912         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17913 echo "configure:17914: checking for Berkeley DB link (-ldb-41)" >&5
17914 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17915   echo $ac_n "(cached) $ac_c" 1>&6
17916 else
17917   
17918         ol_DB_LIB=-ldb-41
17919         ol_LIBS=$LIBS
17920         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17921
17922         cat > conftest.$ac_ext <<EOF
17923 #line 17924 "configure"
17924 #include "confdefs.h"
17925
17926 #ifdef HAVE_DB_185_H
17927 # include <db_185.h>
17928 #else
17929 # include <db.h>
17930 #endif
17931
17932 #ifndef DB_VERSION_MAJOR
17933 # define DB_VERSION_MAJOR 1
17934 #endif
17935
17936 #ifndef NULL
17937 #define NULL ((void*)0)
17938 #endif
17939
17940 int main() {
17941
17942 #if DB_VERSION_MAJOR > 1
17943         {
17944                 char *version;
17945                 int major, minor, patch;
17946
17947                 version = db_version( &major, &minor, &patch );
17948
17949                 if( major != DB_VERSION_MAJOR ||
17950                         minor < DB_VERSION_MINOR )
17951                 {
17952                         printf("Berkeley DB version mismatch\n"
17953                                 "\texpected: %s\n\tgot: %s\n",
17954                                 DB_VERSION_STRING, version);
17955                         return 1;
17956                 }
17957         }
17958 #endif
17959
17960 #if DB_VERSION_MAJOR > 2
17961         db_env_create( NULL, 0 );
17962 #elif DB_VERSION_MAJOR > 1
17963         db_appexit( NULL );
17964 #else
17965         (void) dbopen( NULL, 0, 0, 0, NULL);
17966 #endif
17967
17968 ; return 0; }
17969 EOF
17970 if { (eval echo configure:17971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17971   rm -rf conftest*
17972   ol_cv_db_db_41=yes
17973 else
17974   echo "configure: failed program was:" >&5
17975   cat conftest.$ac_ext >&5
17976   rm -rf conftest*
17977   ol_cv_db_db_41=no
17978 fi
17979 rm -f conftest*
17980
17981         LIBS="$ol_LIBS"
17982
17983 fi
17984
17985 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17986
17987         if test $ol_cv_db_db_41 = yes ; then
17988                 ol_cv_lib_db=-ldb-41
17989         fi
17990 fi
17991
17992 if test $ol_cv_lib_db = no ; then
17993         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17994 echo "configure:17995: checking for Berkeley DB link (-ldb4)" >&5
17995 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17996   echo $ac_n "(cached) $ac_c" 1>&6
17997 else
17998   
17999         ol_DB_LIB=-ldb4
18000         ol_LIBS=$LIBS
18001         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18002
18003         cat > conftest.$ac_ext <<EOF
18004 #line 18005 "configure"
18005 #include "confdefs.h"
18006
18007 #ifdef HAVE_DB_185_H
18008 # include <db_185.h>
18009 #else
18010 # include <db.h>
18011 #endif
18012
18013 #ifndef DB_VERSION_MAJOR
18014 # define DB_VERSION_MAJOR 1
18015 #endif
18016
18017 #ifndef NULL
18018 #define NULL ((void*)0)
18019 #endif
18020
18021 int main() {
18022
18023 #if DB_VERSION_MAJOR > 1
18024         {
18025                 char *version;
18026                 int major, minor, patch;
18027
18028                 version = db_version( &major, &minor, &patch );
18029
18030                 if( major != DB_VERSION_MAJOR ||
18031                         minor < DB_VERSION_MINOR )
18032                 {
18033                         printf("Berkeley DB version mismatch\n"
18034                                 "\texpected: %s\n\tgot: %s\n",
18035                                 DB_VERSION_STRING, version);
18036                         return 1;
18037                 }
18038         }
18039 #endif
18040
18041 #if DB_VERSION_MAJOR > 2
18042         db_env_create( NULL, 0 );
18043 #elif DB_VERSION_MAJOR > 1
18044         db_appexit( NULL );
18045 #else
18046         (void) dbopen( NULL, 0, 0, 0, NULL);
18047 #endif
18048
18049 ; return 0; }
18050 EOF
18051 if { (eval echo configure:18052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18052   rm -rf conftest*
18053   ol_cv_db_db4=yes
18054 else
18055   echo "configure: failed program was:" >&5
18056   cat conftest.$ac_ext >&5
18057   rm -rf conftest*
18058   ol_cv_db_db4=no
18059 fi
18060 rm -f conftest*
18061
18062         LIBS="$ol_LIBS"
18063
18064 fi
18065
18066 echo "$ac_t""$ol_cv_db_db4" 1>&6
18067
18068         if test $ol_cv_db_db4 = yes ; then
18069                 ol_cv_lib_db=-ldb4
18070         fi
18071 fi
18072
18073 if test $ol_cv_lib_db = no ; then
18074         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18075 echo "configure:18076: checking for Berkeley DB link (-ldb-4)" >&5
18076 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18077   echo $ac_n "(cached) $ac_c" 1>&6
18078 else
18079   
18080         ol_DB_LIB=-ldb-4
18081         ol_LIBS=$LIBS
18082         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18083
18084         cat > conftest.$ac_ext <<EOF
18085 #line 18086 "configure"
18086 #include "confdefs.h"
18087
18088 #ifdef HAVE_DB_185_H
18089 # include <db_185.h>
18090 #else
18091 # include <db.h>
18092 #endif
18093
18094 #ifndef DB_VERSION_MAJOR
18095 # define DB_VERSION_MAJOR 1
18096 #endif
18097
18098 #ifndef NULL
18099 #define NULL ((void*)0)
18100 #endif
18101
18102 int main() {
18103
18104 #if DB_VERSION_MAJOR > 1
18105         {
18106                 char *version;
18107                 int major, minor, patch;
18108
18109                 version = db_version( &major, &minor, &patch );
18110
18111                 if( major != DB_VERSION_MAJOR ||
18112                         minor < DB_VERSION_MINOR )
18113                 {
18114                         printf("Berkeley DB version mismatch\n"
18115                                 "\texpected: %s\n\tgot: %s\n",
18116                                 DB_VERSION_STRING, version);
18117                         return 1;
18118                 }
18119         }
18120 #endif
18121
18122 #if DB_VERSION_MAJOR > 2
18123         db_env_create( NULL, 0 );
18124 #elif DB_VERSION_MAJOR > 1
18125         db_appexit( NULL );
18126 #else
18127         (void) dbopen( NULL, 0, 0, 0, NULL);
18128 #endif
18129
18130 ; return 0; }
18131 EOF
18132 if { (eval echo configure:18133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18133   rm -rf conftest*
18134   ol_cv_db_db_4=yes
18135 else
18136   echo "configure: failed program was:" >&5
18137   cat conftest.$ac_ext >&5
18138   rm -rf conftest*
18139   ol_cv_db_db_4=no
18140 fi
18141 rm -f conftest*
18142
18143         LIBS="$ol_LIBS"
18144
18145 fi
18146
18147 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18148
18149         if test $ol_cv_db_db_4 = yes ; then
18150                 ol_cv_lib_db=-ldb-4
18151         fi
18152 fi
18153
18154 if test $ol_cv_lib_db = no ; then
18155         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18156 echo "configure:18157: checking for Berkeley DB link (-ldb)" >&5
18157 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18158   echo $ac_n "(cached) $ac_c" 1>&6
18159 else
18160   
18161         ol_DB_LIB=-ldb
18162         ol_LIBS=$LIBS
18163         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18164
18165         cat > conftest.$ac_ext <<EOF
18166 #line 18167 "configure"
18167 #include "confdefs.h"
18168
18169 #ifdef HAVE_DB_185_H
18170 # include <db_185.h>
18171 #else
18172 # include <db.h>
18173 #endif
18174
18175 #ifndef DB_VERSION_MAJOR
18176 # define DB_VERSION_MAJOR 1
18177 #endif
18178
18179 #ifndef NULL
18180 #define NULL ((void*)0)
18181 #endif
18182
18183 int main() {
18184
18185 #if DB_VERSION_MAJOR > 1
18186         {
18187                 char *version;
18188                 int major, minor, patch;
18189
18190                 version = db_version( &major, &minor, &patch );
18191
18192                 if( major != DB_VERSION_MAJOR ||
18193                         minor < DB_VERSION_MINOR )
18194                 {
18195                         printf("Berkeley DB version mismatch\n"
18196                                 "\texpected: %s\n\tgot: %s\n",
18197                                 DB_VERSION_STRING, version);
18198                         return 1;
18199                 }
18200         }
18201 #endif
18202
18203 #if DB_VERSION_MAJOR > 2
18204         db_env_create( NULL, 0 );
18205 #elif DB_VERSION_MAJOR > 1
18206         db_appexit( NULL );
18207 #else
18208         (void) dbopen( NULL, 0, 0, 0, NULL);
18209 #endif
18210
18211 ; return 0; }
18212 EOF
18213 if { (eval echo configure:18214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18214   rm -rf conftest*
18215   ol_cv_db_db=yes
18216 else
18217   echo "configure: failed program was:" >&5
18218   cat conftest.$ac_ext >&5
18219   rm -rf conftest*
18220   ol_cv_db_db=no
18221 fi
18222 rm -f conftest*
18223
18224         LIBS="$ol_LIBS"
18225
18226 fi
18227
18228 echo "$ac_t""$ol_cv_db_db" 1>&6
18229
18230         if test $ol_cv_db_db = yes ; then
18231                 ol_cv_lib_db=-ldb
18232         fi
18233 fi
18234
18235 if test $ol_cv_lib_db = no ; then
18236         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18237 echo "configure:18238: checking for Berkeley DB link (-ldb3)" >&5
18238 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18239   echo $ac_n "(cached) $ac_c" 1>&6
18240 else
18241   
18242         ol_DB_LIB=-ldb3
18243         ol_LIBS=$LIBS
18244         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18245
18246         cat > conftest.$ac_ext <<EOF
18247 #line 18248 "configure"
18248 #include "confdefs.h"
18249
18250 #ifdef HAVE_DB_185_H
18251 # include <db_185.h>
18252 #else
18253 # include <db.h>
18254 #endif
18255
18256 #ifndef DB_VERSION_MAJOR
18257 # define DB_VERSION_MAJOR 1
18258 #endif
18259
18260 #ifndef NULL
18261 #define NULL ((void*)0)
18262 #endif
18263
18264 int main() {
18265
18266 #if DB_VERSION_MAJOR > 1
18267         {
18268                 char *version;
18269                 int major, minor, patch;
18270
18271                 version = db_version( &major, &minor, &patch );
18272
18273                 if( major != DB_VERSION_MAJOR ||
18274                         minor < DB_VERSION_MINOR )
18275                 {
18276                         printf("Berkeley DB version mismatch\n"
18277                                 "\texpected: %s\n\tgot: %s\n",
18278                                 DB_VERSION_STRING, version);
18279                         return 1;
18280                 }
18281         }
18282 #endif
18283
18284 #if DB_VERSION_MAJOR > 2
18285         db_env_create( NULL, 0 );
18286 #elif DB_VERSION_MAJOR > 1
18287         db_appexit( NULL );
18288 #else
18289         (void) dbopen( NULL, 0, 0, 0, NULL);
18290 #endif
18291
18292 ; return 0; }
18293 EOF
18294 if { (eval echo configure:18295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18295   rm -rf conftest*
18296   ol_cv_db_db3=yes
18297 else
18298   echo "configure: failed program was:" >&5
18299   cat conftest.$ac_ext >&5
18300   rm -rf conftest*
18301   ol_cv_db_db3=no
18302 fi
18303 rm -f conftest*
18304
18305         LIBS="$ol_LIBS"
18306
18307 fi
18308
18309 echo "$ac_t""$ol_cv_db_db3" 1>&6
18310
18311         if test $ol_cv_db_db3 = yes ; then
18312                 ol_cv_lib_db=-ldb3
18313         fi
18314 fi
18315
18316 if test $ol_cv_lib_db = no ; then
18317         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18318 echo "configure:18319: checking for Berkeley DB link (-ldb-3)" >&5
18319 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18320   echo $ac_n "(cached) $ac_c" 1>&6
18321 else
18322   
18323         ol_DB_LIB=-ldb-3
18324         ol_LIBS=$LIBS
18325         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18326
18327         cat > conftest.$ac_ext <<EOF
18328 #line 18329 "configure"
18329 #include "confdefs.h"
18330
18331 #ifdef HAVE_DB_185_H
18332 # include <db_185.h>
18333 #else
18334 # include <db.h>
18335 #endif
18336
18337 #ifndef DB_VERSION_MAJOR
18338 # define DB_VERSION_MAJOR 1
18339 #endif
18340
18341 #ifndef NULL
18342 #define NULL ((void*)0)
18343 #endif
18344
18345 int main() {
18346
18347 #if DB_VERSION_MAJOR > 1
18348         {
18349                 char *version;
18350                 int major, minor, patch;
18351
18352                 version = db_version( &major, &minor, &patch );
18353
18354                 if( major != DB_VERSION_MAJOR ||
18355                         minor < DB_VERSION_MINOR )
18356                 {
18357                         printf("Berkeley DB version mismatch\n"
18358                                 "\texpected: %s\n\tgot: %s\n",
18359                                 DB_VERSION_STRING, version);
18360                         return 1;
18361                 }
18362         }
18363 #endif
18364
18365 #if DB_VERSION_MAJOR > 2
18366         db_env_create( NULL, 0 );
18367 #elif DB_VERSION_MAJOR > 1
18368         db_appexit( NULL );
18369 #else
18370         (void) dbopen( NULL, 0, 0, 0, NULL);
18371 #endif
18372
18373 ; return 0; }
18374 EOF
18375 if { (eval echo configure:18376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18376   rm -rf conftest*
18377   ol_cv_db_db_3=yes
18378 else
18379   echo "configure: failed program was:" >&5
18380   cat conftest.$ac_ext >&5
18381   rm -rf conftest*
18382   ol_cv_db_db_3=no
18383 fi
18384 rm -f conftest*
18385
18386         LIBS="$ol_LIBS"
18387
18388 fi
18389
18390 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18391
18392         if test $ol_cv_db_db_3 = yes ; then
18393                 ol_cv_lib_db=-ldb-3
18394         fi
18395 fi
18396
18397 if test $ol_cv_lib_db = no ; then
18398         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18399 echo "configure:18400: checking for Berkeley DB link (-ldb2)" >&5
18400 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18401   echo $ac_n "(cached) $ac_c" 1>&6
18402 else
18403   
18404         ol_DB_LIB=-ldb2
18405         ol_LIBS=$LIBS
18406         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18407
18408         cat > conftest.$ac_ext <<EOF
18409 #line 18410 "configure"
18410 #include "confdefs.h"
18411
18412 #ifdef HAVE_DB_185_H
18413 # include <db_185.h>
18414 #else
18415 # include <db.h>
18416 #endif
18417
18418 #ifndef DB_VERSION_MAJOR
18419 # define DB_VERSION_MAJOR 1
18420 #endif
18421
18422 #ifndef NULL
18423 #define NULL ((void*)0)
18424 #endif
18425
18426 int main() {
18427
18428 #if DB_VERSION_MAJOR > 1
18429         {
18430                 char *version;
18431                 int major, minor, patch;
18432
18433                 version = db_version( &major, &minor, &patch );
18434
18435                 if( major != DB_VERSION_MAJOR ||
18436                         minor < DB_VERSION_MINOR )
18437                 {
18438                         printf("Berkeley DB version mismatch\n"
18439                                 "\texpected: %s\n\tgot: %s\n",
18440                                 DB_VERSION_STRING, version);
18441                         return 1;
18442                 }
18443         }
18444 #endif
18445
18446 #if DB_VERSION_MAJOR > 2
18447         db_env_create( NULL, 0 );
18448 #elif DB_VERSION_MAJOR > 1
18449         db_appexit( NULL );
18450 #else
18451         (void) dbopen( NULL, 0, 0, 0, NULL);
18452 #endif
18453
18454 ; return 0; }
18455 EOF
18456 if { (eval echo configure:18457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18457   rm -rf conftest*
18458   ol_cv_db_db2=yes
18459 else
18460   echo "configure: failed program was:" >&5
18461   cat conftest.$ac_ext >&5
18462   rm -rf conftest*
18463   ol_cv_db_db2=no
18464 fi
18465 rm -f conftest*
18466
18467         LIBS="$ol_LIBS"
18468
18469 fi
18470
18471 echo "$ac_t""$ol_cv_db_db2" 1>&6
18472
18473         if test $ol_cv_db_db2 = yes ; then
18474                 ol_cv_lib_db=-ldb2
18475         fi
18476 fi
18477
18478 if test $ol_cv_lib_db = no ; then
18479         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18480 echo "configure:18481: checking for Berkeley DB link (-ldb-2)" >&5
18481 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18482   echo $ac_n "(cached) $ac_c" 1>&6
18483 else
18484   
18485         ol_DB_LIB=-ldb-2
18486         ol_LIBS=$LIBS
18487         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18488
18489         cat > conftest.$ac_ext <<EOF
18490 #line 18491 "configure"
18491 #include "confdefs.h"
18492
18493 #ifdef HAVE_DB_185_H
18494 # include <db_185.h>
18495 #else
18496 # include <db.h>
18497 #endif
18498
18499 #ifndef DB_VERSION_MAJOR
18500 # define DB_VERSION_MAJOR 1
18501 #endif
18502
18503 #ifndef NULL
18504 #define NULL ((void*)0)
18505 #endif
18506
18507 int main() {
18508
18509 #if DB_VERSION_MAJOR > 1
18510         {
18511                 char *version;
18512                 int major, minor, patch;
18513
18514                 version = db_version( &major, &minor, &patch );
18515
18516                 if( major != DB_VERSION_MAJOR ||
18517                         minor < DB_VERSION_MINOR )
18518                 {
18519                         printf("Berkeley DB version mismatch\n"
18520                                 "\texpected: %s\n\tgot: %s\n",
18521                                 DB_VERSION_STRING, version);
18522                         return 1;
18523                 }
18524         }
18525 #endif
18526
18527 #if DB_VERSION_MAJOR > 2
18528         db_env_create( NULL, 0 );
18529 #elif DB_VERSION_MAJOR > 1
18530         db_appexit( NULL );
18531 #else
18532         (void) dbopen( NULL, 0, 0, 0, NULL);
18533 #endif
18534
18535 ; return 0; }
18536 EOF
18537 if { (eval echo configure:18538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18538   rm -rf conftest*
18539   ol_cv_db_db_2=yes
18540 else
18541   echo "configure: failed program was:" >&5
18542   cat conftest.$ac_ext >&5
18543   rm -rf conftest*
18544   ol_cv_db_db_2=no
18545 fi
18546 rm -f conftest*
18547
18548         LIBS="$ol_LIBS"
18549
18550 fi
18551
18552 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18553
18554         if test $ol_cv_db_db_2 = yes ; then
18555                 ol_cv_lib_db=-ldb-2
18556         fi
18557 fi
18558
18559 if test $ol_cv_lib_db = no ; then
18560         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18561 echo "configure:18562: checking for Berkeley DB link (-ldb1)" >&5
18562 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18563   echo $ac_n "(cached) $ac_c" 1>&6
18564 else
18565   
18566         ol_DB_LIB=-ldb1
18567         ol_LIBS=$LIBS
18568         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18569
18570         cat > conftest.$ac_ext <<EOF
18571 #line 18572 "configure"
18572 #include "confdefs.h"
18573
18574 #ifdef HAVE_DB_185_H
18575 # include <db_185.h>
18576 #else
18577 # include <db.h>
18578 #endif
18579
18580 #ifndef DB_VERSION_MAJOR
18581 # define DB_VERSION_MAJOR 1
18582 #endif
18583
18584 #ifndef NULL
18585 #define NULL ((void*)0)
18586 #endif
18587
18588 int main() {
18589
18590 #if DB_VERSION_MAJOR > 1
18591         {
18592                 char *version;
18593                 int major, minor, patch;
18594
18595                 version = db_version( &major, &minor, &patch );
18596
18597                 if( major != DB_VERSION_MAJOR ||
18598                         minor < DB_VERSION_MINOR )
18599                 {
18600                         printf("Berkeley DB version mismatch\n"
18601                                 "\texpected: %s\n\tgot: %s\n",
18602                                 DB_VERSION_STRING, version);
18603                         return 1;
18604                 }
18605         }
18606 #endif
18607
18608 #if DB_VERSION_MAJOR > 2
18609         db_env_create( NULL, 0 );
18610 #elif DB_VERSION_MAJOR > 1
18611         db_appexit( NULL );
18612 #else
18613         (void) dbopen( NULL, 0, 0, 0, NULL);
18614 #endif
18615
18616 ; return 0; }
18617 EOF
18618 if { (eval echo configure:18619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18619   rm -rf conftest*
18620   ol_cv_db_db1=yes
18621 else
18622   echo "configure: failed program was:" >&5
18623   cat conftest.$ac_ext >&5
18624   rm -rf conftest*
18625   ol_cv_db_db1=no
18626 fi
18627 rm -f conftest*
18628
18629         LIBS="$ol_LIBS"
18630
18631 fi
18632
18633 echo "$ac_t""$ol_cv_db_db1" 1>&6
18634
18635         if test $ol_cv_db_db1 = yes ; then
18636                 ol_cv_lib_db=-ldb1
18637         fi
18638 fi
18639
18640 if test $ol_cv_lib_db = no ; then
18641         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18642 echo "configure:18643: checking for Berkeley DB link (-ldb-1)" >&5
18643 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18644   echo $ac_n "(cached) $ac_c" 1>&6
18645 else
18646   
18647         ol_DB_LIB=-ldb-1
18648         ol_LIBS=$LIBS
18649         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18650
18651         cat > conftest.$ac_ext <<EOF
18652 #line 18653 "configure"
18653 #include "confdefs.h"
18654
18655 #ifdef HAVE_DB_185_H
18656 # include <db_185.h>
18657 #else
18658 # include <db.h>
18659 #endif
18660
18661 #ifndef DB_VERSION_MAJOR
18662 # define DB_VERSION_MAJOR 1
18663 #endif
18664
18665 #ifndef NULL
18666 #define NULL ((void*)0)
18667 #endif
18668
18669 int main() {
18670
18671 #if DB_VERSION_MAJOR > 1
18672         {
18673                 char *version;
18674                 int major, minor, patch;
18675
18676                 version = db_version( &major, &minor, &patch );
18677
18678                 if( major != DB_VERSION_MAJOR ||
18679                         minor < DB_VERSION_MINOR )
18680                 {
18681                         printf("Berkeley DB version mismatch\n"
18682                                 "\texpected: %s\n\tgot: %s\n",
18683                                 DB_VERSION_STRING, version);
18684                         return 1;
18685                 }
18686         }
18687 #endif
18688
18689 #if DB_VERSION_MAJOR > 2
18690         db_env_create( NULL, 0 );
18691 #elif DB_VERSION_MAJOR > 1
18692         db_appexit( NULL );
18693 #else
18694         (void) dbopen( NULL, 0, 0, 0, NULL);
18695 #endif
18696
18697 ; return 0; }
18698 EOF
18699 if { (eval echo configure:18700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18700   rm -rf conftest*
18701   ol_cv_db_db_1=yes
18702 else
18703   echo "configure: failed program was:" >&5
18704   cat conftest.$ac_ext >&5
18705   rm -rf conftest*
18706   ol_cv_db_db_1=no
18707 fi
18708 rm -f conftest*
18709
18710         LIBS="$ol_LIBS"
18711
18712 fi
18713
18714 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18715
18716         if test $ol_cv_db_db_1 = yes ; then
18717                 ol_cv_lib_db=-ldb-1
18718         fi
18719 fi
18720
18721
18722         if test "$ol_cv_lib_db" != no ; then
18723                 ol_cv_berkeley_db=yes
18724                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18725 echo "configure:18726: checking for Berkeley DB thread support" >&5
18726 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18727   echo $ac_n "(cached) $ac_c" 1>&6
18728 else
18729   
18730         ol_LIBS="$LIBS"
18731         LIBS="$LTHREAD_LIBS $LIBS"
18732         if test $ol_cv_lib_db != yes ; then
18733                 LIBS="$ol_cv_lib_db $LIBS"
18734         fi
18735
18736         if test "$cross_compiling" = yes; then
18737   ol_cv_berkeley_db_thread=cross
18738 else
18739   cat > conftest.$ac_ext <<EOF
18740 #line 18741 "configure"
18741 #include "confdefs.h"
18742
18743 #ifdef HAVE_DB_185_H
18744         choke me;
18745 #else
18746 #include <db.h>
18747 #endif
18748 #ifndef NULL
18749 #define NULL ((void *)0)
18750 #endif
18751 main()
18752 {
18753         int rc;
18754         u_int32_t flags = DB_CREATE |
18755 #ifdef DB_PRIVATE
18756                 DB_PRIVATE |
18757 #endif
18758                 DB_THREAD;
18759
18760 #if DB_VERSION_MAJOR > 2
18761         DB_ENV *env = NULL;
18762
18763         rc = db_env_create( &env, 0 );
18764
18765         flags |= DB_INIT_MPOOL;
18766 #ifdef DB_MPOOL_PRIVATE
18767         flags |= DB_MPOOL_PRIVATE;
18768 #endif
18769
18770         if( rc ) {
18771                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18772                 return rc;
18773         }
18774
18775 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18776         rc = env->open( env, NULL, flags, 0 );
18777 #else
18778         rc = env->open( env, NULL, NULL, flags, 0 );
18779 #endif
18780
18781         if ( rc == 0 ) {
18782                 rc = env->close( env, 0 );
18783         }
18784
18785         if( rc ) {
18786                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18787                 return rc;
18788         }
18789
18790 #else
18791         DB_ENV env;
18792         memset( &env, '\0', sizeof(env) );
18793
18794         rc = db_appinit( NULL, NULL, &env, flags );
18795
18796         if( rc == 0 ) {
18797                 db_appexit( &env );
18798         }
18799
18800         unlink("__db_mpool.share");
18801         unlink("__db_lock.share");
18802 #endif
18803
18804         return rc;
18805 }
18806 EOF
18807 if { (eval echo configure:18808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18808 then
18809   ol_cv_berkeley_db_thread=yes
18810 else
18811   echo "configure: failed program was:" >&5
18812   cat conftest.$ac_ext >&5
18813   rm -fr conftest*
18814   ol_cv_berkeley_db_thread=no
18815 fi
18816 rm -fr conftest*
18817 fi
18818
18819
18820         LIBS="$ol_LIBS"
18821
18822 fi
18823
18824 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18825
18826         if test $ol_cv_berkeley_db_thread != no ; then
18827                 cat >> confdefs.h <<\EOF
18828 #define HAVE_BERKELEY_DB_THREAD 1
18829 EOF
18830
18831         fi
18832
18833         fi
18834 fi
18835
18836         fi
18837
18838         if test $ol_cv_berkeley_db != no ; then
18839                 cat >> confdefs.h <<\EOF
18840 #define HAVE_BERKELEY_DB 1
18841 EOF
18842
18843
18844                 ol_link_ldbm=berkeley
18845                 ol_with_ldbm_api=berkeley
18846
18847                 if test $ol_with_ldbm_type = hash ; then
18848                         cat >> confdefs.h <<\EOF
18849 #define LDBM_USE_DBHASH 1
18850 EOF
18851
18852                 else
18853                         cat >> confdefs.h <<\EOF
18854 #define LDBM_USE_DBBTREE 1
18855 EOF
18856
18857                 fi
18858
18859                                                 if test $ol_cv_lib_db != yes ; then
18860                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18861                 fi
18862         fi
18863 fi
18864
18865 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18866         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18867 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18868         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18869 echo "configure:18870: checking Berkeley DB version for BDB backend" >&5
18870 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18871   echo $ac_n "(cached) $ac_c" 1>&6
18872 else
18873   
18874         cat > conftest.$ac_ext <<EOF
18875 #line 18876 "configure"
18876 #include "confdefs.h"
18877
18878 #include <db.h>
18879
18880  /* this check could be improved */
18881 #ifndef DB_VERSION_MAJOR
18882 #       define DB_VERSION_MAJOR 1
18883 #endif
18884 #ifndef DB_VERSION_MINOR
18885 #       define DB_VERSION_MINOR 0
18886 #endif
18887
18888 /* require 4.0 or later */
18889 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 1)
18890         __db_version_compat
18891 #endif
18892         
18893 EOF
18894 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18895   egrep "__db_version_compat" >/dev/null 2>&1; then
18896   rm -rf conftest*
18897   ol_cv_bdb_compat=yes
18898 else
18899   rm -rf conftest*
18900   ol_cv_bdb_compat=no
18901 fi
18902 rm -f conftest*
18903
18904 fi
18905
18906 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18907
18908
18909         if test $ol_cv_bdb_compat = yes ; then
18910                 ol_enable_bdb=yes
18911         elif test $ol_enable_bdb = yes ; then
18912                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18913         else
18914                 ol_enable_bdb=no
18915         fi
18916 fi
18917
18918 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18919         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18920         ol_with_ldbm_api=none
18921 fi
18922
18923 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18924         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18925 echo "configure:18926: checking for MDBM library" >&5
18926 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18927   echo $ac_n "(cached) $ac_c" 1>&6
18928 else
18929         ol_LIBS="$LIBS"
18930         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18931 echo "configure:18932: checking for mdbm_set_chain" >&5
18932 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18933   echo $ac_n "(cached) $ac_c" 1>&6
18934 else
18935   cat > conftest.$ac_ext <<EOF
18936 #line 18937 "configure"
18937 #include "confdefs.h"
18938 /* System header to define __stub macros and hopefully few prototypes,
18939     which can conflict with char mdbm_set_chain(); below.  */
18940 #include <assert.h>
18941 /* Override any gcc2 internal prototype to avoid an error.  */
18942 /* We use char because int might match the return type of a gcc2
18943     builtin and then its argument prototype would still apply.  */
18944 char mdbm_set_chain();
18945 char (*f)();
18946
18947 int main() {
18948
18949 /* The GNU C library defines this for functions which it implements
18950     to always fail with ENOSYS.  Some functions are actually named
18951     something starting with __ and the normal name is an alias.  */
18952 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18953 choke me
18954 #else
18955 f = mdbm_set_chain;
18956 #endif
18957
18958 ; return 0; }
18959 EOF
18960 if { (eval echo configure:18961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18961   rm -rf conftest*
18962   eval "ac_cv_func_mdbm_set_chain=yes"
18963 else
18964   echo "configure: failed program was:" >&5
18965   cat conftest.$ac_ext >&5
18966   rm -rf conftest*
18967   eval "ac_cv_func_mdbm_set_chain=no"
18968 fi
18969 rm -f conftest*
18970 fi
18971
18972 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18973   echo "$ac_t""yes" 1>&6
18974   ol_cv_lib_mdbm=yes
18975 else
18976   echo "$ac_t""no" 1>&6
18977
18978                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18979 echo "configure:18980: checking for mdbm_set_chain in -lmdbm" >&5
18980 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18982   echo $ac_n "(cached) $ac_c" 1>&6
18983 else
18984   ac_save_LIBS="$LIBS"
18985 LIBS="-lmdbm  $LIBS"
18986 cat > conftest.$ac_ext <<EOF
18987 #line 18988 "configure"
18988 #include "confdefs.h"
18989 /* Override any gcc2 internal prototype to avoid an error.  */
18990 /* We use char because int might match the return type of a gcc2
18991     builtin and then its argument prototype would still apply.  */
18992 char mdbm_set_chain();
18993
18994 int main() {
18995 mdbm_set_chain()
18996 ; return 0; }
18997 EOF
18998 if { (eval echo configure:18999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18999   rm -rf conftest*
19000   eval "ac_cv_lib_$ac_lib_var=yes"
19001 else
19002   echo "configure: failed program was:" >&5
19003   cat conftest.$ac_ext >&5
19004   rm -rf conftest*
19005   eval "ac_cv_lib_$ac_lib_var=no"
19006 fi
19007 rm -f conftest*
19008 LIBS="$ac_save_LIBS"
19009
19010 fi
19011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19012   echo "$ac_t""yes" 1>&6
19013   ol_cv_lib_mdbm=-lmdbm
19014 else
19015   echo "$ac_t""no" 1>&6
19016 ol_cv_lib_mdbm=no
19017 fi
19018
19019         
19020 fi
19021
19022         LIBS="$ol_LIBS"
19023
19024 fi
19025
19026 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19027
19028
19029  for ac_hdr in mdbm.h
19030 do
19031 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19032 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19033 echo "configure:19034: checking for $ac_hdr" >&5
19034 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19035   echo $ac_n "(cached) $ac_c" 1>&6
19036 else
19037   cat > conftest.$ac_ext <<EOF
19038 #line 19039 "configure"
19039 #include "confdefs.h"
19040 #include <$ac_hdr>
19041 EOF
19042 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19043 { (eval echo configure:19044: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19044 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19045 if test -z "$ac_err"; then
19046   rm -rf conftest*
19047   eval "ac_cv_header_$ac_safe=yes"
19048 else
19049   echo "$ac_err" >&5
19050   echo "configure: failed program was:" >&5
19051   cat conftest.$ac_ext >&5
19052   rm -rf conftest*
19053   eval "ac_cv_header_$ac_safe=no"
19054 fi
19055 rm -f conftest*
19056 fi
19057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19058   echo "$ac_t""yes" 1>&6
19059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19060   cat >> confdefs.h <<EOF
19061 #define $ac_tr_hdr 1
19062 EOF
19063  
19064 else
19065   echo "$ac_t""no" 1>&6
19066 fi
19067 done
19068
19069  echo $ac_n "checking for db""... $ac_c" 1>&6
19070 echo "configure:19071: checking for db" >&5
19071 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19072   echo $ac_n "(cached) $ac_c" 1>&6
19073 else
19074   
19075         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19076                 ol_cv_mdbm=no
19077         else
19078                 ol_cv_mdbm=yes
19079         fi
19080
19081 fi
19082
19083 echo "$ac_t""$ol_cv_mdbm" 1>&6
19084  if test $ol_cv_mdbm = yes ; then
19085         cat >> confdefs.h <<\EOF
19086 #define HAVE_MDBM 1
19087 EOF
19088
19089  fi
19090
19091
19092         if test $ol_cv_mdbm = yes ; then
19093                 ol_link_ldbm=mdbm
19094                 ol_with_ldbm_api=mdbm
19095                 if test $ol_cv_lib_mdbm != yes ; then
19096                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19097                 fi
19098         fi
19099 fi
19100
19101 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19102         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19103 echo "configure:19104: checking for GDBM library" >&5
19104 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19105   echo $ac_n "(cached) $ac_c" 1>&6
19106 else
19107         ol_LIBS="$LIBS"
19108         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19109 echo "configure:19110: checking for gdbm_open" >&5
19110 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19111   echo $ac_n "(cached) $ac_c" 1>&6
19112 else
19113   cat > conftest.$ac_ext <<EOF
19114 #line 19115 "configure"
19115 #include "confdefs.h"
19116 /* System header to define __stub macros and hopefully few prototypes,
19117     which can conflict with char gdbm_open(); below.  */
19118 #include <assert.h>
19119 /* Override any gcc2 internal prototype to avoid an error.  */
19120 /* We use char because int might match the return type of a gcc2
19121     builtin and then its argument prototype would still apply.  */
19122 char gdbm_open();
19123 char (*f)();
19124
19125 int main() {
19126
19127 /* The GNU C library defines this for functions which it implements
19128     to always fail with ENOSYS.  Some functions are actually named
19129     something starting with __ and the normal name is an alias.  */
19130 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19131 choke me
19132 #else
19133 f = gdbm_open;
19134 #endif
19135
19136 ; return 0; }
19137 EOF
19138 if { (eval echo configure:19139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19139   rm -rf conftest*
19140   eval "ac_cv_func_gdbm_open=yes"
19141 else
19142   echo "configure: failed program was:" >&5
19143   cat conftest.$ac_ext >&5
19144   rm -rf conftest*
19145   eval "ac_cv_func_gdbm_open=no"
19146 fi
19147 rm -f conftest*
19148 fi
19149
19150 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19151   echo "$ac_t""yes" 1>&6
19152   ol_cv_lib_gdbm=yes
19153 else
19154   echo "$ac_t""no" 1>&6
19155
19156                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19157 echo "configure:19158: checking for gdbm_open in -lgdbm" >&5
19158 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19160   echo $ac_n "(cached) $ac_c" 1>&6
19161 else
19162   ac_save_LIBS="$LIBS"
19163 LIBS="-lgdbm  $LIBS"
19164 cat > conftest.$ac_ext <<EOF
19165 #line 19166 "configure"
19166 #include "confdefs.h"
19167 /* Override any gcc2 internal prototype to avoid an error.  */
19168 /* We use char because int might match the return type of a gcc2
19169     builtin and then its argument prototype would still apply.  */
19170 char gdbm_open();
19171
19172 int main() {
19173 gdbm_open()
19174 ; return 0; }
19175 EOF
19176 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19177   rm -rf conftest*
19178   eval "ac_cv_lib_$ac_lib_var=yes"
19179 else
19180   echo "configure: failed program was:" >&5
19181   cat conftest.$ac_ext >&5
19182   rm -rf conftest*
19183   eval "ac_cv_lib_$ac_lib_var=no"
19184 fi
19185 rm -f conftest*
19186 LIBS="$ac_save_LIBS"
19187
19188 fi
19189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19190   echo "$ac_t""yes" 1>&6
19191   ol_cv_lib_gdbm=-lgdbm
19192 else
19193   echo "$ac_t""no" 1>&6
19194 ol_cv_lib_gdbm=no
19195 fi
19196
19197         
19198 fi
19199
19200         LIBS="$ol_LIBS"
19201
19202 fi
19203
19204 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19205
19206
19207  for ac_hdr in gdbm.h
19208 do
19209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19211 echo "configure:19212: checking for $ac_hdr" >&5
19212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19213   echo $ac_n "(cached) $ac_c" 1>&6
19214 else
19215   cat > conftest.$ac_ext <<EOF
19216 #line 19217 "configure"
19217 #include "confdefs.h"
19218 #include <$ac_hdr>
19219 EOF
19220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19221 { (eval echo configure:19222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19223 if test -z "$ac_err"; then
19224   rm -rf conftest*
19225   eval "ac_cv_header_$ac_safe=yes"
19226 else
19227   echo "$ac_err" >&5
19228   echo "configure: failed program was:" >&5
19229   cat conftest.$ac_ext >&5
19230   rm -rf conftest*
19231   eval "ac_cv_header_$ac_safe=no"
19232 fi
19233 rm -f conftest*
19234 fi
19235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19236   echo "$ac_t""yes" 1>&6
19237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19238   cat >> confdefs.h <<EOF
19239 #define $ac_tr_hdr 1
19240 EOF
19241  
19242 else
19243   echo "$ac_t""no" 1>&6
19244 fi
19245 done
19246
19247  echo $ac_n "checking for db""... $ac_c" 1>&6
19248 echo "configure:19249: checking for db" >&5
19249 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19250   echo $ac_n "(cached) $ac_c" 1>&6
19251 else
19252   
19253         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19254                 ol_cv_gdbm=no
19255         else
19256                 ol_cv_gdbm=yes
19257         fi
19258
19259 fi
19260
19261 echo "$ac_t""$ol_cv_gdbm" 1>&6
19262  if test $ol_cv_gdbm = yes ; then
19263         cat >> confdefs.h <<\EOF
19264 #define HAVE_GDBM 1
19265 EOF
19266
19267  fi
19268
19269
19270         if test $ol_cv_gdbm = yes ; then
19271                 ol_link_ldbm=gdbm
19272                 ol_with_ldbm_api=gdbm
19273
19274                 if test $ol_cv_lib_gdbm != yes ; then
19275                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19276                 fi
19277         fi
19278 fi
19279
19280 if test $ol_with_ldbm_api = ndbm ; then
19281         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19282 echo "configure:19283: checking for NDBM library" >&5
19283 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19284   echo $ac_n "(cached) $ac_c" 1>&6
19285 else
19286         ol_LIBS="$LIBS"
19287         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19288 echo "configure:19289: checking for dbm_open" >&5
19289 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19290   echo $ac_n "(cached) $ac_c" 1>&6
19291 else
19292   cat > conftest.$ac_ext <<EOF
19293 #line 19294 "configure"
19294 #include "confdefs.h"
19295 /* System header to define __stub macros and hopefully few prototypes,
19296     which can conflict with char dbm_open(); below.  */
19297 #include <assert.h>
19298 /* Override any gcc2 internal prototype to avoid an error.  */
19299 /* We use char because int might match the return type of a gcc2
19300     builtin and then its argument prototype would still apply.  */
19301 char dbm_open();
19302 char (*f)();
19303
19304 int main() {
19305
19306 /* The GNU C library defines this for functions which it implements
19307     to always fail with ENOSYS.  Some functions are actually named
19308     something starting with __ and the normal name is an alias.  */
19309 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19310 choke me
19311 #else
19312 f = dbm_open;
19313 #endif
19314
19315 ; return 0; }
19316 EOF
19317 if { (eval echo configure:19318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19318   rm -rf conftest*
19319   eval "ac_cv_func_dbm_open=yes"
19320 else
19321   echo "configure: failed program was:" >&5
19322   cat conftest.$ac_ext >&5
19323   rm -rf conftest*
19324   eval "ac_cv_func_dbm_open=no"
19325 fi
19326 rm -f conftest*
19327 fi
19328
19329 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19330   echo "$ac_t""yes" 1>&6
19331   ol_cv_lib_ndbm=yes
19332 else
19333   echo "$ac_t""no" 1>&6
19334
19335                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19336 echo "configure:19337: checking for dbm_open in -lndbm" >&5
19337 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19338 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19339   echo $ac_n "(cached) $ac_c" 1>&6
19340 else
19341   ac_save_LIBS="$LIBS"
19342 LIBS="-lndbm  $LIBS"
19343 cat > conftest.$ac_ext <<EOF
19344 #line 19345 "configure"
19345 #include "confdefs.h"
19346 /* Override any gcc2 internal prototype to avoid an error.  */
19347 /* We use char because int might match the return type of a gcc2
19348     builtin and then its argument prototype would still apply.  */
19349 char dbm_open();
19350
19351 int main() {
19352 dbm_open()
19353 ; return 0; }
19354 EOF
19355 if { (eval echo configure:19356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19356   rm -rf conftest*
19357   eval "ac_cv_lib_$ac_lib_var=yes"
19358 else
19359   echo "configure: failed program was:" >&5
19360   cat conftest.$ac_ext >&5
19361   rm -rf conftest*
19362   eval "ac_cv_lib_$ac_lib_var=no"
19363 fi
19364 rm -f conftest*
19365 LIBS="$ac_save_LIBS"
19366
19367 fi
19368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19369   echo "$ac_t""yes" 1>&6
19370   ol_cv_lib_ndbm=-lndbm
19371 else
19372   echo "$ac_t""no" 1>&6
19373
19374                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19375 echo "configure:19376: checking for dbm_open in -ldbm" >&5
19376 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19378   echo $ac_n "(cached) $ac_c" 1>&6
19379 else
19380   ac_save_LIBS="$LIBS"
19381 LIBS="-ldbm  $LIBS"
19382 cat > conftest.$ac_ext <<EOF
19383 #line 19384 "configure"
19384 #include "confdefs.h"
19385 /* Override any gcc2 internal prototype to avoid an error.  */
19386 /* We use char because int might match the return type of a gcc2
19387     builtin and then its argument prototype would still apply.  */
19388 char dbm_open();
19389
19390 int main() {
19391 dbm_open()
19392 ; return 0; }
19393 EOF
19394 if { (eval echo configure:19395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19395   rm -rf conftest*
19396   eval "ac_cv_lib_$ac_lib_var=yes"
19397 else
19398   echo "configure: failed program was:" >&5
19399   cat conftest.$ac_ext >&5
19400   rm -rf conftest*
19401   eval "ac_cv_lib_$ac_lib_var=no"
19402 fi
19403 rm -f conftest*
19404 LIBS="$ac_save_LIBS"
19405
19406 fi
19407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19408   echo "$ac_t""yes" 1>&6
19409   ol_cv_lib_ndbm=-ldbm
19410 else
19411   echo "$ac_t""no" 1>&6
19412 ol_cv_lib_ndbm=no
19413 fi
19414                 
19415 fi
19416
19417         
19418 fi
19419
19420         LIBS="$ol_LIBS"
19421
19422 fi
19423
19424 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19425
19426
19427  for ac_hdr in ndbm.h
19428 do
19429 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19430 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19431 echo "configure:19432: checking for $ac_hdr" >&5
19432 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19433   echo $ac_n "(cached) $ac_c" 1>&6
19434 else
19435   cat > conftest.$ac_ext <<EOF
19436 #line 19437 "configure"
19437 #include "confdefs.h"
19438 #include <$ac_hdr>
19439 EOF
19440 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19441 { (eval echo configure:19442: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19442 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19443 if test -z "$ac_err"; then
19444   rm -rf conftest*
19445   eval "ac_cv_header_$ac_safe=yes"
19446 else
19447   echo "$ac_err" >&5
19448   echo "configure: failed program was:" >&5
19449   cat conftest.$ac_ext >&5
19450   rm -rf conftest*
19451   eval "ac_cv_header_$ac_safe=no"
19452 fi
19453 rm -f conftest*
19454 fi
19455 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19456   echo "$ac_t""yes" 1>&6
19457     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19458   cat >> confdefs.h <<EOF
19459 #define $ac_tr_hdr 1
19460 EOF
19461  
19462 else
19463   echo "$ac_t""no" 1>&6
19464 fi
19465 done
19466
19467  echo $ac_n "checking for db""... $ac_c" 1>&6
19468 echo "configure:19469: checking for db" >&5
19469 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19470   echo $ac_n "(cached) $ac_c" 1>&6
19471 else
19472   
19473         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19474                 ol_cv_ndbm=no
19475         else
19476                 ol_cv_ndbm=yes
19477         fi
19478
19479 fi
19480
19481 echo "$ac_t""$ol_cv_ndbm" 1>&6
19482  if test $ol_cv_ndbm = yes ; then
19483         cat >> confdefs.h <<\EOF
19484 #define HAVE_NDBM 1
19485 EOF
19486
19487  fi
19488
19489
19490         if test $ol_cv_ndbm = yes ; then
19491                 ol_link_ldbm=ndbm
19492                 ol_with_ldbm_api=ndbm
19493
19494                 if test $ol_cv_lib_ndbm != yes ; then
19495                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19496                 fi
19497         fi
19498 fi
19499
19500 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19501         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19502         if test $ol_enable_ldbm = yes ; then
19503                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19504         fi
19505
19506         echo "configure: warning: disabling LDBM" 1>&2
19507         ol_enable_ldbm=no
19508 fi
19509
19510 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19511         BUILD_LIBS_DYNAMIC=shared
19512         cat >> confdefs.h <<\EOF
19513 #define LDAP_LIBS_DYNAMIC 1
19514 EOF
19515
19516 else
19517         BUILD_LIBS_DYNAMIC=static
19518 fi
19519
19520 if test $ol_enable_wrappers != no ; then
19521         for ac_hdr in tcpd.h
19522 do
19523 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19524 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19525 echo "configure:19526: checking for $ac_hdr" >&5
19526 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19527   echo $ac_n "(cached) $ac_c" 1>&6
19528 else
19529   cat > conftest.$ac_ext <<EOF
19530 #line 19531 "configure"
19531 #include "confdefs.h"
19532 #include <$ac_hdr>
19533 EOF
19534 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19535 { (eval echo configure:19536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19536 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19537 if test -z "$ac_err"; then
19538   rm -rf conftest*
19539   eval "ac_cv_header_$ac_safe=yes"
19540 else
19541   echo "$ac_err" >&5
19542   echo "configure: failed program was:" >&5
19543   cat conftest.$ac_ext >&5
19544   rm -rf conftest*
19545   eval "ac_cv_header_$ac_safe=no"
19546 fi
19547 rm -f conftest*
19548 fi
19549 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19550   echo "$ac_t""yes" 1>&6
19551     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19552   cat >> confdefs.h <<EOF
19553 #define $ac_tr_hdr 1
19554 EOF
19555  
19556                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19557 echo "configure:19558: checking for TCP wrappers library" >&5
19558                 save_LIBS="$LIBS"
19559                 LIBS="$LIBS -lwrap"
19560                 cat > conftest.$ac_ext <<EOF
19561 #line 19562 "configure"
19562 #include "confdefs.h"
19563
19564 #include <tcpd.h>
19565 int allow_severity = 0;
19566 int deny_severity  = 0;
19567
19568 struct request_info *req;
19569                 
19570 int main() {
19571
19572 hosts_access(req)
19573                 
19574 ; return 0; }
19575 EOF
19576 if { (eval echo configure:19577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19577   rm -rf conftest*
19578   echo "$ac_t""-lwrap" 1>&6
19579                 have_wrappers=yes
19580                 LIBS="$save_LIBS"
19581 else
19582   echo "configure: failed program was:" >&5
19583   cat conftest.$ac_ext >&5
19584   rm -rf conftest*
19585   
19586                                 LIBS="$LIBS -lnsl"
19587                 cat > conftest.$ac_ext <<EOF
19588 #line 19589 "configure"
19589 #include "confdefs.h"
19590
19591 #include <tcpd.h>
19592 int allow_severity = 0;
19593 int deny_severity  = 0;
19594
19595 struct request_info *req;
19596                 
19597 int main() {
19598
19599 hosts_access(req)
19600                 
19601 ; return 0; }
19602 EOF
19603 if { (eval echo configure:19604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19604   rm -rf conftest*
19605   echo "$ac_t""-lwrap -lnsl" 1>&6
19606                 have_wrappers=yes
19607                 LIBS="$save_LIBS -lnsl"
19608 else
19609   echo "configure: failed program was:" >&5
19610   cat conftest.$ac_ext >&5
19611   rm -rf conftest*
19612   
19613                 echo "$ac_t""no" 1>&6
19614                 have_wrappers=no
19615                 LIBS=$save_LIBS
19616 fi
19617 rm -f conftest*
19618 fi
19619 rm -f conftest*
19620 else
19621   echo "$ac_t""no" 1>&6
19622 have_wrappers=no
19623 fi
19624 done
19625
19626
19627         if test $have_wrappers = yes ; then
19628                 cat >> confdefs.h <<\EOF
19629 #define HAVE_TCPD 1
19630 EOF
19631
19632                 WRAP_LIBS="-lwrap"
19633         elif test $ol_enable_wrappers = yes ; then
19634                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19635         else
19636                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19637                 WRAP_LIBS=""
19638         fi
19639 fi
19640
19641 if test $ol_enable_syslog != no ; then
19642         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19643 echo "configure:19644: checking for openlog" >&5
19644 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19645   echo $ac_n "(cached) $ac_c" 1>&6
19646 else
19647   cat > conftest.$ac_ext <<EOF
19648 #line 19649 "configure"
19649 #include "confdefs.h"
19650 /* System header to define __stub macros and hopefully few prototypes,
19651     which can conflict with char openlog(); below.  */
19652 #include <assert.h>
19653 /* Override any gcc2 internal prototype to avoid an error.  */
19654 /* We use char because int might match the return type of a gcc2
19655     builtin and then its argument prototype would still apply.  */
19656 char openlog();
19657 char (*f)();
19658
19659 int main() {
19660
19661 /* The GNU C library defines this for functions which it implements
19662     to always fail with ENOSYS.  Some functions are actually named
19663     something starting with __ and the normal name is an alias.  */
19664 #if defined (__stub_openlog) || defined (__stub___openlog)
19665 choke me
19666 #else
19667 f = openlog;
19668 #endif
19669
19670 ; return 0; }
19671 EOF
19672 if { (eval echo configure:19673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19673   rm -rf conftest*
19674   eval "ac_cv_func_openlog=yes"
19675 else
19676   echo "configure: failed program was:" >&5
19677   cat conftest.$ac_ext >&5
19678   rm -rf conftest*
19679   eval "ac_cv_func_openlog=no"
19680 fi
19681 rm -f conftest*
19682 fi
19683
19684 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19685   echo "$ac_t""yes" 1>&6
19686   :
19687 else
19688   echo "$ac_t""no" 1>&6
19689 fi
19690
19691         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19692                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19693         fi
19694         ol_enable_syslog=$ac_cv_func_openlog
19695 fi
19696
19697
19698 ol_link_sql=no
19699 if test $ol_enable_sql != no ; then
19700         for ac_hdr in sql.h sqlext.h
19701 do
19702 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19703 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19704 echo "configure:19705: checking for $ac_hdr" >&5
19705 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19706   echo $ac_n "(cached) $ac_c" 1>&6
19707 else
19708   cat > conftest.$ac_ext <<EOF
19709 #line 19710 "configure"
19710 #include "confdefs.h"
19711 #include <$ac_hdr>
19712 EOF
19713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19714 { (eval echo configure:19715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19716 if test -z "$ac_err"; then
19717   rm -rf conftest*
19718   eval "ac_cv_header_$ac_safe=yes"
19719 else
19720   echo "$ac_err" >&5
19721   echo "configure: failed program was:" >&5
19722   cat conftest.$ac_ext >&5
19723   rm -rf conftest*
19724   eval "ac_cv_header_$ac_safe=no"
19725 fi
19726 rm -f conftest*
19727 fi
19728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19729   echo "$ac_t""yes" 1>&6
19730     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19731   cat >> confdefs.h <<EOF
19732 #define $ac_tr_hdr 1
19733 EOF
19734  
19735 else
19736   echo "$ac_t""no" 1>&6
19737 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19738         
19739 fi
19740 done
19741
19742
19743         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19744 echo "configure:19745: checking for SQLDriverConnect in -liodbc" >&5
19745 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19747   echo $ac_n "(cached) $ac_c" 1>&6
19748 else
19749   ac_save_LIBS="$LIBS"
19750 LIBS="-liodbc  $LIBS"
19751 cat > conftest.$ac_ext <<EOF
19752 #line 19753 "configure"
19753 #include "confdefs.h"
19754 /* Override any gcc2 internal prototype to avoid an error.  */
19755 /* We use char because int might match the return type of a gcc2
19756     builtin and then its argument prototype would still apply.  */
19757 char SQLDriverConnect();
19758
19759 int main() {
19760 SQLDriverConnect()
19761 ; return 0; }
19762 EOF
19763 if { (eval echo configure:19764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19764   rm -rf conftest*
19765   eval "ac_cv_lib_$ac_lib_var=yes"
19766 else
19767   echo "configure: failed program was:" >&5
19768   cat conftest.$ac_ext >&5
19769   rm -rf conftest*
19770   eval "ac_cv_lib_$ac_lib_var=no"
19771 fi
19772 rm -f conftest*
19773 LIBS="$ac_save_LIBS"
19774
19775 fi
19776 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19777   echo "$ac_t""yes" 1>&6
19778   have_iodbc=yes
19779 else
19780   echo "$ac_t""no" 1>&6
19781 have_iodbc=no
19782 fi
19783
19784         if test $have_iodbc = yes ; then
19785                 ol_link_sql="-liodbc"
19786         else
19787                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19788 echo "configure:19789: checking for SQLDriverConnect in -lodbc" >&5
19789 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19791   echo $ac_n "(cached) $ac_c" 1>&6
19792 else
19793   ac_save_LIBS="$LIBS"
19794 LIBS="-lodbc  $LIBS"
19795 cat > conftest.$ac_ext <<EOF
19796 #line 19797 "configure"
19797 #include "confdefs.h"
19798 /* Override any gcc2 internal prototype to avoid an error.  */
19799 /* We use char because int might match the return type of a gcc2
19800     builtin and then its argument prototype would still apply.  */
19801 char SQLDriverConnect();
19802
19803 int main() {
19804 SQLDriverConnect()
19805 ; return 0; }
19806 EOF
19807 if { (eval echo configure:19808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19808   rm -rf conftest*
19809   eval "ac_cv_lib_$ac_lib_var=yes"
19810 else
19811   echo "configure: failed program was:" >&5
19812   cat conftest.$ac_ext >&5
19813   rm -rf conftest*
19814   eval "ac_cv_lib_$ac_lib_var=no"
19815 fi
19816 rm -f conftest*
19817 LIBS="$ac_save_LIBS"
19818
19819 fi
19820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19821   echo "$ac_t""yes" 1>&6
19822   have_odbc=yes
19823 else
19824   echo "$ac_t""no" 1>&6
19825 have_odbc=no
19826 fi
19827
19828                 if test $have_odbc = yes ; then
19829                         ol_link_sql="-lodbc"
19830                 fi
19831         fi
19832
19833         if test $ol_link_sql != no ; then
19834                 SLAPD_SQL_LIBS="$ol_link_sql"
19835
19836         elif test $ol_enable_sql != auto ; then
19837                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19838         fi
19839 fi
19840
19841 if test $ol_enable_tcl != no ; then
19842         for ac_hdr in tcl.h
19843 do
19844 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19845 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19846 echo "configure:19847: checking for $ac_hdr" >&5
19847 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19848   echo $ac_n "(cached) $ac_c" 1>&6
19849 else
19850   cat > conftest.$ac_ext <<EOF
19851 #line 19852 "configure"
19852 #include "confdefs.h"
19853 #include <$ac_hdr>
19854 EOF
19855 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19856 { (eval echo configure:19857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19857 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19858 if test -z "$ac_err"; then
19859   rm -rf conftest*
19860   eval "ac_cv_header_$ac_safe=yes"
19861 else
19862   echo "$ac_err" >&5
19863   echo "configure: failed program was:" >&5
19864   cat conftest.$ac_ext >&5
19865   rm -rf conftest*
19866   eval "ac_cv_header_$ac_safe=no"
19867 fi
19868 rm -f conftest*
19869 fi
19870 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19871   echo "$ac_t""yes" 1>&6
19872     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19873   cat >> confdefs.h <<EOF
19874 #define $ac_tr_hdr 1
19875 EOF
19876  
19877 else
19878   echo "$ac_t""no" 1>&6
19879 fi
19880 done
19881
19882
19883         if test $ac_cv_header_tcl_h != yes ; then
19884                 have_tcl=no
19885         else
19886                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19887                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19888 echo "configure:19889: checking for main in -l$lib" >&5
19889 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19891   echo $ac_n "(cached) $ac_c" 1>&6
19892 else
19893   ac_save_LIBS="$LIBS"
19894 LIBS="-l$lib  $LIBS"
19895 cat > conftest.$ac_ext <<EOF
19896 #line 19897 "configure"
19897 #include "confdefs.h"
19898
19899 int main() {
19900 main()
19901 ; return 0; }
19902 EOF
19903 if { (eval echo configure:19904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19904   rm -rf conftest*
19905   eval "ac_cv_lib_$ac_lib_var=yes"
19906 else
19907   echo "configure: failed program was:" >&5
19908   cat conftest.$ac_ext >&5
19909   rm -rf conftest*
19910   eval "ac_cv_lib_$ac_lib_var=no"
19911 fi
19912 rm -f conftest*
19913 LIBS="$ac_save_LIBS"
19914
19915 fi
19916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19917   echo "$ac_t""yes" 1>&6
19918   have_tcl=yes
19919                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19920                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19921                            else
19922                                         MOD_TCL_LIB="-l${lib}"
19923                            fi;break
19924 else
19925   echo "$ac_t""no" 1>&6
19926 have_tcl=no
19927 fi
19928
19929                 done
19930         fi
19931
19932         if test $have_tcl != yes ; then
19933                 echo "configure: warning: could not find -ltcl" 1>&2
19934                 if test $ol_enable_tcl = yes ; then
19935                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19936                 fi
19937
19938                 ol_enable_tcl=no
19939         fi
19940 fi
19941
19942 ol_link_termcap=no
19943 for ac_hdr in termcap.h ncurses.h
19944 do
19945 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19946 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19947 echo "configure:19948: checking for $ac_hdr" >&5
19948 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19949   echo $ac_n "(cached) $ac_c" 1>&6
19950 else
19951   cat > conftest.$ac_ext <<EOF
19952 #line 19953 "configure"
19953 #include "confdefs.h"
19954 #include <$ac_hdr>
19955 EOF
19956 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19957 { (eval echo configure:19958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19958 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19959 if test -z "$ac_err"; then
19960   rm -rf conftest*
19961   eval "ac_cv_header_$ac_safe=yes"
19962 else
19963   echo "$ac_err" >&5
19964   echo "configure: failed program was:" >&5
19965   cat conftest.$ac_ext >&5
19966   rm -rf conftest*
19967   eval "ac_cv_header_$ac_safe=no"
19968 fi
19969 rm -f conftest*
19970 fi
19971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19972   echo "$ac_t""yes" 1>&6
19973     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19974   cat >> confdefs.h <<EOF
19975 #define $ac_tr_hdr 1
19976 EOF
19977  
19978 else
19979   echo "$ac_t""no" 1>&6
19980 fi
19981 done
19982
19983
19984 if test $ol_link_termcap = no ; then
19985         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19986 echo "configure:19987: checking for tputs in -ltermcap" >&5
19987 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19989   echo $ac_n "(cached) $ac_c" 1>&6
19990 else
19991   ac_save_LIBS="$LIBS"
19992 LIBS="-ltermcap  $LIBS"
19993 cat > conftest.$ac_ext <<EOF
19994 #line 19995 "configure"
19995 #include "confdefs.h"
19996 /* Override any gcc2 internal prototype to avoid an error.  */
19997 /* We use char because int might match the return type of a gcc2
19998     builtin and then its argument prototype would still apply.  */
19999 char tputs();
20000
20001 int main() {
20002 tputs()
20003 ; return 0; }
20004 EOF
20005 if { (eval echo configure:20006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20006   rm -rf conftest*
20007   eval "ac_cv_lib_$ac_lib_var=yes"
20008 else
20009   echo "configure: failed program was:" >&5
20010   cat conftest.$ac_ext >&5
20011   rm -rf conftest*
20012   eval "ac_cv_lib_$ac_lib_var=no"
20013 fi
20014 rm -f conftest*
20015 LIBS="$ac_save_LIBS"
20016
20017 fi
20018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20019   echo "$ac_t""yes" 1>&6
20020   have_termcap=yes
20021 else
20022   echo "$ac_t""no" 1>&6
20023 have_termcap=no
20024 fi
20025
20026         if test $have_termcap = yes ; then
20027                 cat >> confdefs.h <<\EOF
20028 #define HAVE_TERMCAP 1
20029 EOF
20030
20031                 ol_link_termcap=yes
20032                 TERMCAP_LIBS=-ltermcap
20033         fi
20034 fi
20035
20036 if test $ol_link_termcap = no ; then
20037         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20038 echo "configure:20039: checking for initscr in -lncurses" >&5
20039 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20040 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20041   echo $ac_n "(cached) $ac_c" 1>&6
20042 else
20043   ac_save_LIBS="$LIBS"
20044 LIBS="-lncurses  $LIBS"
20045 cat > conftest.$ac_ext <<EOF
20046 #line 20047 "configure"
20047 #include "confdefs.h"
20048 /* Override any gcc2 internal prototype to avoid an error.  */
20049 /* We use char because int might match the return type of a gcc2
20050     builtin and then its argument prototype would still apply.  */
20051 char initscr();
20052
20053 int main() {
20054 initscr()
20055 ; return 0; }
20056 EOF
20057 if { (eval echo configure:20058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20058   rm -rf conftest*
20059   eval "ac_cv_lib_$ac_lib_var=yes"
20060 else
20061   echo "configure: failed program was:" >&5
20062   cat conftest.$ac_ext >&5
20063   rm -rf conftest*
20064   eval "ac_cv_lib_$ac_lib_var=no"
20065 fi
20066 rm -f conftest*
20067 LIBS="$ac_save_LIBS"
20068
20069 fi
20070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20071   echo "$ac_t""yes" 1>&6
20072   have_ncurses=yes
20073 else
20074   echo "$ac_t""no" 1>&6
20075 have_ncurses=no
20076 fi
20077
20078         if test $have_ncurses = yes ; then
20079                 cat >> confdefs.h <<\EOF
20080 #define HAVE_NCURSES 1
20081 EOF
20082
20083                 ol_link_termcap=yes
20084                 TERMCAP_LIBS=-lncurses
20085         fi
20086 fi
20087
20088 if test $ol_link_termcap = no ; then
20089         cat >> confdefs.h <<\EOF
20090 #define NO_TERMCAP 1
20091 EOF
20092
20093         TERMCAP_LIBS=
20094 fi
20095
20096 ol_link_sasl=no
20097 ol_link_spasswd=no
20098 if test $ol_with_cyrus_sasl != no ; then
20099         for ac_hdr in sasl/sasl.h sasl.h
20100 do
20101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20102 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20103 echo "configure:20104: checking for $ac_hdr" >&5
20104 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20105   echo $ac_n "(cached) $ac_c" 1>&6
20106 else
20107   cat > conftest.$ac_ext <<EOF
20108 #line 20109 "configure"
20109 #include "confdefs.h"
20110 #include <$ac_hdr>
20111 EOF
20112 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20113 { (eval echo configure:20114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20114 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20115 if test -z "$ac_err"; then
20116   rm -rf conftest*
20117   eval "ac_cv_header_$ac_safe=yes"
20118 else
20119   echo "$ac_err" >&5
20120   echo "configure: failed program was:" >&5
20121   cat conftest.$ac_ext >&5
20122   rm -rf conftest*
20123   eval "ac_cv_header_$ac_safe=no"
20124 fi
20125 rm -f conftest*
20126 fi
20127 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20128   echo "$ac_t""yes" 1>&6
20129     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20130   cat >> confdefs.h <<EOF
20131 #define $ac_tr_hdr 1
20132 EOF
20133  
20134 else
20135   echo "$ac_t""no" 1>&6
20136 fi
20137 done
20138
20139
20140         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20141                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20142 echo "configure:20143: checking for sasl_client_init in -lsasl2" >&5
20143 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20144 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20145   echo $ac_n "(cached) $ac_c" 1>&6
20146 else
20147   ac_save_LIBS="$LIBS"
20148 LIBS="-lsasl2  $LIBS"
20149 cat > conftest.$ac_ext <<EOF
20150 #line 20151 "configure"
20151 #include "confdefs.h"
20152 /* Override any gcc2 internal prototype to avoid an error.  */
20153 /* We use char because int might match the return type of a gcc2
20154     builtin and then its argument prototype would still apply.  */
20155 char sasl_client_init();
20156
20157 int main() {
20158 sasl_client_init()
20159 ; return 0; }
20160 EOF
20161 if { (eval echo configure:20162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20162   rm -rf conftest*
20163   eval "ac_cv_lib_$ac_lib_var=yes"
20164 else
20165   echo "configure: failed program was:" >&5
20166   cat conftest.$ac_ext >&5
20167   rm -rf conftest*
20168   eval "ac_cv_lib_$ac_lib_var=no"
20169 fi
20170 rm -f conftest*
20171 LIBS="$ac_save_LIBS"
20172
20173 fi
20174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20175   echo "$ac_t""yes" 1>&6
20176   ol_link_sasl="-lsasl2"
20177 else
20178   echo "$ac_t""no" 1>&6
20179 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20180 echo "configure:20181: checking for sasl_client_init in -lsasl" >&5
20181 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20182 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20183   echo $ac_n "(cached) $ac_c" 1>&6
20184 else
20185   ac_save_LIBS="$LIBS"
20186 LIBS="-lsasl  $LIBS"
20187 cat > conftest.$ac_ext <<EOF
20188 #line 20189 "configure"
20189 #include "confdefs.h"
20190 /* Override any gcc2 internal prototype to avoid an error.  */
20191 /* We use char because int might match the return type of a gcc2
20192     builtin and then its argument prototype would still apply.  */
20193 char sasl_client_init();
20194
20195 int main() {
20196 sasl_client_init()
20197 ; return 0; }
20198 EOF
20199 if { (eval echo configure:20200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20200   rm -rf conftest*
20201   eval "ac_cv_lib_$ac_lib_var=yes"
20202 else
20203   echo "configure: failed program was:" >&5
20204   cat conftest.$ac_ext >&5
20205   rm -rf conftest*
20206   eval "ac_cv_lib_$ac_lib_var=no"
20207 fi
20208 rm -f conftest*
20209 LIBS="$ac_save_LIBS"
20210
20211 fi
20212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20213   echo "$ac_t""yes" 1>&6
20214   ol_link_sasl="-lsasl"
20215 else
20216   echo "$ac_t""no" 1>&6
20217 fi
20218
20219 fi
20220
20221         fi
20222
20223         if test $ol_link_sasl = no ; then
20224                 if test $ol_with_cyrus_sasl != auto ; then
20225                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20226                 else
20227                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20228                         echo "configure: warning: SASL authentication not supported!" 1>&2
20229                         if test $ol_link_tls = no ; then
20230                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20231                         fi
20232                 fi
20233         else
20234                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20235 echo "configure:20236: checking Cyrus SASL library version" >&5
20236 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20237   echo $ac_n "(cached) $ac_c" 1>&6
20238 else
20239   
20240         cat > conftest.$ac_ext <<EOF
20241 #line 20242 "configure"
20242 #include "confdefs.h"
20243
20244 #ifdef HAVE_SASL_SASL_H
20245 #include <sasl/sasl.h>
20246 #else
20247 #include <sasl.h>
20248 #endif
20249
20250 /* require 2.1.3 or later */
20251 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20252         char *__sasl_compat = "1.5.x okay";
20253 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20254         __sasl_compat "2.2+ or better okay (we guess)";
20255 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20256         && SASL_VERSION_STEP >=3
20257         __sasl_compat = "2.1.3+ or better okay";
20258 #endif
20259         
20260 EOF
20261 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20262   egrep "__sasl_compat" >/dev/null 2>&1; then
20263   rm -rf conftest*
20264   ol_cv_sasl_compat=yes
20265 else
20266   rm -rf conftest*
20267   ol_cv_sasl_compat=no
20268 fi
20269 rm -f conftest*
20270
20271 fi
20272
20273 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20274
20275                 if test $ol_cv_sasl_compat = no ; then
20276                         ol_link_sasl=no
20277                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20278                 fi
20279
20280                 cat >> confdefs.h <<\EOF
20281 #define HAVE_CYRUS_SASL 1
20282 EOF
20283
20284                 SASL_LIBS="$ol_link_sasl"
20285                 if test $ol_enable_spasswd != no ; then
20286                         ol_link_spasswd=yes
20287                 fi
20288
20289                 ac_save_LIBS="$LIBS"
20290                 LIBS="$LIBS $ol_link_sasl"
20291                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20292 echo "configure:20293: checking for sasl_version" >&5
20293 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20294   echo $ac_n "(cached) $ac_c" 1>&6
20295 else
20296   cat > conftest.$ac_ext <<EOF
20297 #line 20298 "configure"
20298 #include "confdefs.h"
20299 /* System header to define __stub macros and hopefully few prototypes,
20300     which can conflict with char sasl_version(); below.  */
20301 #include <assert.h>
20302 /* Override any gcc2 internal prototype to avoid an error.  */
20303 /* We use char because int might match the return type of a gcc2
20304     builtin and then its argument prototype would still apply.  */
20305 char sasl_version();
20306 char (*f)();
20307
20308 int main() {
20309
20310 /* The GNU C library defines this for functions which it implements
20311     to always fail with ENOSYS.  Some functions are actually named
20312     something starting with __ and the normal name is an alias.  */
20313 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20314 choke me
20315 #else
20316 f = sasl_version;
20317 #endif
20318
20319 ; return 0; }
20320 EOF
20321 if { (eval echo configure:20322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20322   rm -rf conftest*
20323   eval "ac_cv_func_sasl_version=yes"
20324 else
20325   echo "configure: failed program was:" >&5
20326   cat conftest.$ac_ext >&5
20327   rm -rf conftest*
20328   eval "ac_cv_func_sasl_version=no"
20329 fi
20330 rm -f conftest*
20331 fi
20332
20333 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20334   echo "$ac_t""yes" 1>&6
20335   cat >> confdefs.h <<\EOF
20336 #define HAVE_SASL_VERSION 1
20337 EOF
20338
20339 else
20340   echo "$ac_t""no" 1>&6
20341 fi
20342
20343                 LIBS="$ac_save_LIBS"
20344         fi
20345
20346 else
20347         echo "configure: warning: SASL authentication not supported!" 1>&2
20348         if test $ol_link_tls = no ; then
20349                 echo "configure: warning: Strong authentication not supported!" 1>&2
20350         fi
20351 fi
20352
20353 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20354         dev=no
20355         if test -r /dev/urandom ; then
20356                 dev="/dev/urandom";
20357         elif test -r /idev/urandom ; then
20358                 dev="/idev/urandom";
20359         elif test -r /dev/srandom ; then
20360                 dev="/dev/srandom";
20361         elif test -r /dev/random ; then
20362                 dev="/dev/random";
20363         elif test -r /idev/random ; then
20364                 dev="/idev/random";
20365         fi
20366
20367         if test $dev != no ; then
20368                 cat >> confdefs.h <<EOF
20369 #define URANDOM_DEVICE "$dev"
20370 EOF
20371
20372         fi
20373 fi
20374
20375 ol_link_fetch=no
20376 if test $ol_with_fetch != no ; then
20377         ol_LIBS=$LIBS
20378 LIBS="-lfetch -lcom_err $LIBS"
20379 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20380 echo "configure:20381: checking fetch(3) library" >&5
20381 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20382   echo $ac_n "(cached) $ac_c" 1>&6
20383 else
20384   
20385         cat > conftest.$ac_ext <<EOF
20386 #line 20387 "configure"
20387 #include "confdefs.h"
20388
20389 #include <sys/param.h>
20390 #include <stdio.h>
20391 #include <fetch.h>
20392 int main() {
20393 struct url *u = fetchParseURL("file:///"); 
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   ol_cv_lib_fetch=yes
20399 else
20400   echo "configure: failed program was:" >&5
20401   cat conftest.$ac_ext >&5
20402   rm -rf conftest*
20403   ol_cv_lib_fetch=no
20404 fi
20405 rm -f conftest*
20406 fi
20407
20408 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20409 LIBS=$ol_LIBS
20410 if test $ol_cv_lib_fetch != no ; then
20411         ol_link_fetch="-lfetch -lcom_err"
20412         cat >> confdefs.h <<\EOF
20413 #define HAVE_FETCH 1
20414 EOF
20415
20416 fi
20417
20418
20419         if test $ol_cv_lib_fetch != no ; then
20420                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20421                 ol_link_fetch=freebsd
20422
20423         elif test $ol_with_fetch != auto ; then
20424                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20425         fi 
20426 fi
20427
20428 ol_link_readline=no
20429 if test $ol_with_readline != no ; then
20430         for ac_hdr in readline/readline.h readline/history.h
20431 do
20432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20434 echo "configure:20435: checking for $ac_hdr" >&5
20435 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20436   echo $ac_n "(cached) $ac_c" 1>&6
20437 else
20438   cat > conftest.$ac_ext <<EOF
20439 #line 20440 "configure"
20440 #include "confdefs.h"
20441 #include <$ac_hdr>
20442 EOF
20443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20444 { (eval echo configure:20445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20446 if test -z "$ac_err"; then
20447   rm -rf conftest*
20448   eval "ac_cv_header_$ac_safe=yes"
20449 else
20450   echo "$ac_err" >&5
20451   echo "configure: failed program was:" >&5
20452   cat conftest.$ac_ext >&5
20453   rm -rf conftest*
20454   eval "ac_cv_header_$ac_safe=no"
20455 fi
20456 rm -f conftest*
20457 fi
20458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20459   echo "$ac_t""yes" 1>&6
20460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20461   cat >> confdefs.h <<EOF
20462 #define $ac_tr_hdr 1
20463 EOF
20464  
20465 else
20466   echo "$ac_t""no" 1>&6
20467 fi
20468 done
20469
20470
20471         if test $ac_cv_header_readline_readline_h = yes ; then
20472                 save_LIBS="$LIBS"
20473                 LIBS="$TERMCAP_LIBS $LIBS"
20474                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20475 echo "configure:20476: checking for readline in -lreadline" >&5
20476 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20477 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20478   echo $ac_n "(cached) $ac_c" 1>&6
20479 else
20480   ac_save_LIBS="$LIBS"
20481 LIBS="-lreadline  $LIBS"
20482 cat > conftest.$ac_ext <<EOF
20483 #line 20484 "configure"
20484 #include "confdefs.h"
20485 /* Override any gcc2 internal prototype to avoid an error.  */
20486 /* We use char because int might match the return type of a gcc2
20487     builtin and then its argument prototype would still apply.  */
20488 char readline();
20489
20490 int main() {
20491 readline()
20492 ; return 0; }
20493 EOF
20494 if { (eval echo configure:20495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20495   rm -rf conftest*
20496   eval "ac_cv_lib_$ac_lib_var=yes"
20497 else
20498   echo "configure: failed program was:" >&5
20499   cat conftest.$ac_ext >&5
20500   rm -rf conftest*
20501   eval "ac_cv_lib_$ac_lib_var=no"
20502 fi
20503 rm -f conftest*
20504 LIBS="$ac_save_LIBS"
20505
20506 fi
20507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20508   echo "$ac_t""yes" 1>&6
20509   have_readline=yes
20510 else
20511   echo "$ac_t""no" 1>&6
20512 have_readline=no
20513 fi
20514
20515                 LIBS="$save_LIBS"
20516                         
20517                 if test $have_readline = yes ; then
20518                         ol_with_readline=found
20519                         ol_link_readline=yes
20520
20521                         READLINE_LIBS="-lreadline"
20522                 fi
20523         fi
20524 fi
20525
20526 if test $ol_link_readline = yes ; then
20527         cat >> confdefs.h <<\EOF
20528 #define HAVE_READLINE 1
20529 EOF
20530
20531 fi
20532
20533
20534 if test $ol_enable_crypt != no ; then
20535         save_LIBS="$LIBS"
20536         LIBS="$TLS_LIBS $LIBS"
20537
20538         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20539 echo "configure:20540: checking for crypt" >&5
20540 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20541   echo $ac_n "(cached) $ac_c" 1>&6
20542 else
20543   cat > conftest.$ac_ext <<EOF
20544 #line 20545 "configure"
20545 #include "confdefs.h"
20546 /* System header to define __stub macros and hopefully few prototypes,
20547     which can conflict with char crypt(); below.  */
20548 #include <assert.h>
20549 /* Override any gcc2 internal prototype to avoid an error.  */
20550 /* We use char because int might match the return type of a gcc2
20551     builtin and then its argument prototype would still apply.  */
20552 char crypt();
20553 char (*f)();
20554
20555 int main() {
20556
20557 /* The GNU C library defines this for functions which it implements
20558     to always fail with ENOSYS.  Some functions are actually named
20559     something starting with __ and the normal name is an alias.  */
20560 #if defined (__stub_crypt) || defined (__stub___crypt)
20561 choke me
20562 #else
20563 f = crypt;
20564 #endif
20565
20566 ; return 0; }
20567 EOF
20568 if { (eval echo configure:20569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20569   rm -rf conftest*
20570   eval "ac_cv_func_crypt=yes"
20571 else
20572   echo "configure: failed program was:" >&5
20573   cat conftest.$ac_ext >&5
20574   rm -rf conftest*
20575   eval "ac_cv_func_crypt=no"
20576 fi
20577 rm -f conftest*
20578 fi
20579
20580 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20581   echo "$ac_t""yes" 1>&6
20582   have_crypt=yes
20583 else
20584   echo "$ac_t""no" 1>&6
20585
20586                 LIBS="$save_LIBS"
20587                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20588 echo "configure:20589: checking for crypt in -lcrypt" >&5
20589 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20590 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20591   echo $ac_n "(cached) $ac_c" 1>&6
20592 else
20593   ac_save_LIBS="$LIBS"
20594 LIBS="-lcrypt  $LIBS"
20595 cat > conftest.$ac_ext <<EOF
20596 #line 20597 "configure"
20597 #include "confdefs.h"
20598 /* Override any gcc2 internal prototype to avoid an error.  */
20599 /* We use char because int might match the return type of a gcc2
20600     builtin and then its argument prototype would still apply.  */
20601 char crypt();
20602
20603 int main() {
20604 crypt()
20605 ; return 0; }
20606 EOF
20607 if { (eval echo configure:20608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20608   rm -rf conftest*
20609   eval "ac_cv_lib_$ac_lib_var=yes"
20610 else
20611   echo "configure: failed program was:" >&5
20612   cat conftest.$ac_ext >&5
20613   rm -rf conftest*
20614   eval "ac_cv_lib_$ac_lib_var=no"
20615 fi
20616 rm -f conftest*
20617 LIBS="$ac_save_LIBS"
20618
20619 fi
20620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20621   echo "$ac_t""yes" 1>&6
20622   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20623                         have_crypt=yes
20624 else
20625   echo "$ac_t""no" 1>&6
20626 have_crypt=no
20627 fi
20628
20629 fi
20630
20631
20632         LIBS="$save_LIBS"
20633
20634         if test $have_crypt = yes ; then
20635                 cat >> confdefs.h <<\EOF
20636 #define HAVE_CRYPT 1
20637 EOF
20638
20639         else
20640                 echo "configure: warning: could not find crypt" 1>&2
20641                 if test $ol_enable_crypt = yes ; then
20642                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20643                 fi
20644
20645                 echo "configure: warning: disabling crypt support" 1>&2
20646                 ol_enable_crypt=no
20647         fi
20648 fi
20649
20650 if test $ol_enable_proctitle != no ; then
20651         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20652 echo "configure:20653: checking for setproctitle" >&5
20653 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20654   echo $ac_n "(cached) $ac_c" 1>&6
20655 else
20656   cat > conftest.$ac_ext <<EOF
20657 #line 20658 "configure"
20658 #include "confdefs.h"
20659 /* System header to define __stub macros and hopefully few prototypes,
20660     which can conflict with char setproctitle(); below.  */
20661 #include <assert.h>
20662 /* Override any gcc2 internal prototype to avoid an error.  */
20663 /* We use char because int might match the return type of a gcc2
20664     builtin and then its argument prototype would still apply.  */
20665 char setproctitle();
20666 char (*f)();
20667
20668 int main() {
20669
20670 /* The GNU C library defines this for functions which it implements
20671     to always fail with ENOSYS.  Some functions are actually named
20672     something starting with __ and the normal name is an alias.  */
20673 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20674 choke me
20675 #else
20676 f = setproctitle;
20677 #endif
20678
20679 ; return 0; }
20680 EOF
20681 if { (eval echo configure:20682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20682   rm -rf conftest*
20683   eval "ac_cv_func_setproctitle=yes"
20684 else
20685   echo "configure: failed program was:" >&5
20686   cat conftest.$ac_ext >&5
20687   rm -rf conftest*
20688   eval "ac_cv_func_setproctitle=no"
20689 fi
20690 rm -f conftest*
20691 fi
20692
20693 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20694   echo "$ac_t""yes" 1>&6
20695   have_setproctitle=yes
20696 else
20697   echo "$ac_t""no" 1>&6
20698
20699                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20700 echo "configure:20701: checking for setproctitle in -lutil" >&5
20701 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20703   echo $ac_n "(cached) $ac_c" 1>&6
20704 else
20705   ac_save_LIBS="$LIBS"
20706 LIBS="-lutil  $LIBS"
20707 cat > conftest.$ac_ext <<EOF
20708 #line 20709 "configure"
20709 #include "confdefs.h"
20710 /* Override any gcc2 internal prototype to avoid an error.  */
20711 /* We use char because int might match the return type of a gcc2
20712     builtin and then its argument prototype would still apply.  */
20713 char setproctitle();
20714
20715 int main() {
20716 setproctitle()
20717 ; return 0; }
20718 EOF
20719 if { (eval echo configure:20720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20720   rm -rf conftest*
20721   eval "ac_cv_lib_$ac_lib_var=yes"
20722 else
20723   echo "configure: failed program was:" >&5
20724   cat conftest.$ac_ext >&5
20725   rm -rf conftest*
20726   eval "ac_cv_lib_$ac_lib_var=no"
20727 fi
20728 rm -f conftest*
20729 LIBS="$ac_save_LIBS"
20730
20731 fi
20732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20733   echo "$ac_t""yes" 1>&6
20734   have_setproctitle=yes
20735                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20736 else
20737   echo "$ac_t""no" 1>&6
20738 have_setproctitle=no
20739                         LIBOBJS="$LIBOBJS setproctitle.o"
20740                         LIBSRCS="$LIBSRCS setproctitle.c"
20741 fi
20742
20743 fi
20744
20745
20746         if test $have_setproctitle = yes ; then
20747                 cat >> confdefs.h <<\EOF
20748 #define HAVE_SETPROCTITLE 1
20749 EOF
20750
20751         fi
20752 fi
20753
20754 if test $ol_enable_slp != no ; then
20755         for ac_hdr in slp.h 
20756 do
20757 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20758 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20759 echo "configure:20760: checking for $ac_hdr" >&5
20760 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20761   echo $ac_n "(cached) $ac_c" 1>&6
20762 else
20763   cat > conftest.$ac_ext <<EOF
20764 #line 20765 "configure"
20765 #include "confdefs.h"
20766 #include <$ac_hdr>
20767 EOF
20768 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20769 { (eval echo configure:20770: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20770 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20771 if test -z "$ac_err"; then
20772   rm -rf conftest*
20773   eval "ac_cv_header_$ac_safe=yes"
20774 else
20775   echo "$ac_err" >&5
20776   echo "configure: failed program was:" >&5
20777   cat conftest.$ac_ext >&5
20778   rm -rf conftest*
20779   eval "ac_cv_header_$ac_safe=no"
20780 fi
20781 rm -f conftest*
20782 fi
20783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20784   echo "$ac_t""yes" 1>&6
20785     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20786   cat >> confdefs.h <<EOF
20787 #define $ac_tr_hdr 1
20788 EOF
20789  
20790 else
20791   echo "$ac_t""no" 1>&6
20792 fi
20793 done
20794
20795
20796         if test $ac_cv_header_slp_h = yes ; then
20797                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20798 echo "configure:20799: checking for SLPOpen in -lslp" >&5
20799 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20801   echo $ac_n "(cached) $ac_c" 1>&6
20802 else
20803   ac_save_LIBS="$LIBS"
20804 LIBS="-lslp  $LIBS"
20805 cat > conftest.$ac_ext <<EOF
20806 #line 20807 "configure"
20807 #include "confdefs.h"
20808 /* Override any gcc2 internal prototype to avoid an error.  */
20809 /* We use char because int might match the return type of a gcc2
20810     builtin and then its argument prototype would still apply.  */
20811 char SLPOpen();
20812
20813 int main() {
20814 SLPOpen()
20815 ; return 0; }
20816 EOF
20817 if { (eval echo configure:20818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20818   rm -rf conftest*
20819   eval "ac_cv_lib_$ac_lib_var=yes"
20820 else
20821   echo "configure: failed program was:" >&5
20822   cat conftest.$ac_ext >&5
20823   rm -rf conftest*
20824   eval "ac_cv_lib_$ac_lib_var=no"
20825 fi
20826 rm -f conftest*
20827 LIBS="$ac_save_LIBS"
20828
20829 fi
20830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20831   echo "$ac_t""yes" 1>&6
20832   have_slp=yes
20833 else
20834   echo "$ac_t""no" 1>&6
20835 have_slp=no
20836 fi
20837
20838                 if test $have_slp = yes ; then
20839                         cat >> confdefs.h <<\EOF
20840 #define HAVE_SLP 1
20841 EOF
20842
20843                         SLAPD_SLP_LIBS=-lslp
20844                 fi
20845
20846         elif test $ol_enable_slp = yes ; then
20847                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20848         fi
20849 fi
20850
20851 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20852 echo "configure:20853: checking for ANSI C header files" >&5
20853 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20854   echo $ac_n "(cached) $ac_c" 1>&6
20855 else
20856   cat > conftest.$ac_ext <<EOF
20857 #line 20858 "configure"
20858 #include "confdefs.h"
20859 #include <stdlib.h>
20860 #include <stdarg.h>
20861 #include <string.h>
20862 #include <float.h>
20863 EOF
20864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20865 { (eval echo configure:20866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20867 if test -z "$ac_err"; then
20868   rm -rf conftest*
20869   ac_cv_header_stdc=yes
20870 else
20871   echo "$ac_err" >&5
20872   echo "configure: failed program was:" >&5
20873   cat conftest.$ac_ext >&5
20874   rm -rf conftest*
20875   ac_cv_header_stdc=no
20876 fi
20877 rm -f conftest*
20878
20879 if test $ac_cv_header_stdc = yes; then
20880   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20881 cat > conftest.$ac_ext <<EOF
20882 #line 20883 "configure"
20883 #include "confdefs.h"
20884 #include <string.h>
20885 EOF
20886 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20887   egrep "memchr" >/dev/null 2>&1; then
20888   :
20889 else
20890   rm -rf conftest*
20891   ac_cv_header_stdc=no
20892 fi
20893 rm -f conftest*
20894
20895 fi
20896
20897 if test $ac_cv_header_stdc = yes; then
20898   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20899 cat > conftest.$ac_ext <<EOF
20900 #line 20901 "configure"
20901 #include "confdefs.h"
20902 #include <stdlib.h>
20903 EOF
20904 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20905   egrep "free" >/dev/null 2>&1; then
20906   :
20907 else
20908   rm -rf conftest*
20909   ac_cv_header_stdc=no
20910 fi
20911 rm -f conftest*
20912
20913 fi
20914
20915 if test $ac_cv_header_stdc = yes; then
20916   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20917 if test "$cross_compiling" = yes; then
20918   :
20919 else
20920   cat > conftest.$ac_ext <<EOF
20921 #line 20922 "configure"
20922 #include "confdefs.h"
20923 #include <ctype.h>
20924 #if ((' ' & 0x0FF) == 0x020)
20925 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20926 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20927 #else
20928 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20929  || ('j' <= (c) && (c) <= 'r') \
20930  || ('s' <= (c) && (c) <= 'z'))
20931 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20932 #endif
20933 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20934 int main () { int i; for (i = 0; i < 256; i++)
20935 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20936 exit (0); }
20937
20938 EOF
20939 if { (eval echo configure:20940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20940 then
20941   :
20942 else
20943   echo "configure: failed program was:" >&5
20944   cat conftest.$ac_ext >&5
20945   rm -fr conftest*
20946   ac_cv_header_stdc=no
20947 fi
20948 rm -fr conftest*
20949 fi
20950
20951 fi
20952 fi
20953
20954 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20955 if test $ac_cv_header_stdc = yes; then
20956   cat >> confdefs.h <<\EOF
20957 #define STDC_HEADERS 1
20958 EOF
20959
20960 fi
20961
20962 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20963 echo "configure:20964: checking for mode_t" >&5
20964 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20965   echo $ac_n "(cached) $ac_c" 1>&6
20966 else
20967   cat > conftest.$ac_ext <<EOF
20968 #line 20969 "configure"
20969 #include "confdefs.h"
20970 #include <sys/types.h>
20971 #if STDC_HEADERS
20972 #include <stdlib.h>
20973 #include <stddef.h>
20974 #endif
20975
20976 EOF
20977 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20978   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20979   rm -rf conftest*
20980   eval "ac_cv_type_mode_t=yes"
20981 else
20982   rm -rf conftest*
20983   eval "ac_cv_type_mode_t=no"
20984 fi
20985 rm -f conftest*
20986
20987 fi
20988 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20989   echo "$ac_t""yes" 1>&6
20990 else
20991   echo "$ac_t""no" 1>&6
20992   cat >> confdefs.h <<EOF
20993 #define mode_t int
20994 EOF
20995
20996 fi
20997
20998 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20999 echo "configure:21000: checking for off_t" >&5
21000 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21001   echo $ac_n "(cached) $ac_c" 1>&6
21002 else
21003   cat > conftest.$ac_ext <<EOF
21004 #line 21005 "configure"
21005 #include "confdefs.h"
21006 #include <sys/types.h>
21007 #if STDC_HEADERS
21008 #include <stdlib.h>
21009 #include <stddef.h>
21010 #endif
21011
21012 EOF
21013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21014   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21015   rm -rf conftest*
21016   eval "ac_cv_type_off_t=yes"
21017 else
21018   rm -rf conftest*
21019   eval "ac_cv_type_off_t=no"
21020 fi
21021 rm -f conftest*
21022
21023 fi
21024 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21025   echo "$ac_t""yes" 1>&6
21026 else
21027   echo "$ac_t""no" 1>&6
21028   cat >> confdefs.h <<EOF
21029 #define off_t long
21030 EOF
21031
21032 fi
21033
21034 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21035 echo "configure:21036: checking for pid_t" >&5
21036 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21037   echo $ac_n "(cached) $ac_c" 1>&6
21038 else
21039   cat > conftest.$ac_ext <<EOF
21040 #line 21041 "configure"
21041 #include "confdefs.h"
21042 #include <sys/types.h>
21043 #if STDC_HEADERS
21044 #include <stdlib.h>
21045 #include <stddef.h>
21046 #endif
21047
21048 EOF
21049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21050   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21051   rm -rf conftest*
21052   eval "ac_cv_type_pid_t=yes"
21053 else
21054   rm -rf conftest*
21055   eval "ac_cv_type_pid_t=no"
21056 fi
21057 rm -f conftest*
21058
21059 fi
21060 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21061   echo "$ac_t""yes" 1>&6
21062 else
21063   echo "$ac_t""no" 1>&6
21064   cat >> confdefs.h <<EOF
21065 #define pid_t int
21066 EOF
21067
21068 fi
21069
21070 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21071 echo "configure:21072: checking for ptrdiff_t" >&5
21072 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21073   echo $ac_n "(cached) $ac_c" 1>&6
21074 else
21075   cat > conftest.$ac_ext <<EOF
21076 #line 21077 "configure"
21077 #include "confdefs.h"
21078 #include <stddef.h>
21079 int main() {
21080 ptrdiff_t p
21081 ; return 0; }
21082 EOF
21083 if { (eval echo configure:21084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21084   rm -rf conftest*
21085   am_cv_type_ptrdiff_t=yes
21086 else
21087   echo "configure: failed program was:" >&5
21088   cat conftest.$ac_ext >&5
21089   rm -rf conftest*
21090   am_cv_type_ptrdiff_t=no
21091 fi
21092 rm -f conftest*
21093 fi
21094
21095 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21096    if test $am_cv_type_ptrdiff_t = yes; then
21097      cat >> confdefs.h <<\EOF
21098 #define HAVE_PTRDIFF_T 1
21099 EOF
21100
21101    fi
21102
21103 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21104 echo "configure:21105: checking return type of signal handlers" >&5
21105 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21106   echo $ac_n "(cached) $ac_c" 1>&6
21107 else
21108   cat > conftest.$ac_ext <<EOF
21109 #line 21110 "configure"
21110 #include "confdefs.h"
21111 #include <sys/types.h>
21112 #include <signal.h>
21113 #ifdef signal
21114 #undef signal
21115 #endif
21116 #ifdef __cplusplus
21117 extern "C" void (*signal (int, void (*)(int)))(int);
21118 #else
21119 void (*signal ()) ();
21120 #endif
21121
21122 int main() {
21123 int i;
21124 ; return 0; }
21125 EOF
21126 if { (eval echo configure:21127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21127   rm -rf conftest*
21128   ac_cv_type_signal=void
21129 else
21130   echo "configure: failed program was:" >&5
21131   cat conftest.$ac_ext >&5
21132   rm -rf conftest*
21133   ac_cv_type_signal=int
21134 fi
21135 rm -f conftest*
21136 fi
21137
21138 echo "$ac_t""$ac_cv_type_signal" 1>&6
21139 cat >> confdefs.h <<EOF
21140 #define RETSIGTYPE $ac_cv_type_signal
21141 EOF
21142
21143
21144 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21145 echo "configure:21146: checking for size_t" >&5
21146 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21147   echo $ac_n "(cached) $ac_c" 1>&6
21148 else
21149   cat > conftest.$ac_ext <<EOF
21150 #line 21151 "configure"
21151 #include "confdefs.h"
21152 #include <sys/types.h>
21153 #if STDC_HEADERS
21154 #include <stdlib.h>
21155 #include <stddef.h>
21156 #endif
21157
21158 EOF
21159 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21160   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21161   rm -rf conftest*
21162   eval "ac_cv_type_size_t=yes"
21163 else
21164   rm -rf conftest*
21165   eval "ac_cv_type_size_t=no"
21166 fi
21167 rm -f conftest*
21168
21169 fi
21170 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21171   echo "$ac_t""yes" 1>&6
21172 else
21173   echo "$ac_t""no" 1>&6
21174   cat >> confdefs.h <<EOF
21175 #define size_t unsigned
21176 EOF
21177
21178 fi
21179
21180
21181 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21182 echo "configure:21183: checking for ssize_t" >&5
21183 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21184   echo $ac_n "(cached) $ac_c" 1>&6
21185 else
21186   cat > conftest.$ac_ext <<EOF
21187 #line 21188 "configure"
21188 #include "confdefs.h"
21189 #include <sys/types.h>
21190 #if STDC_HEADERS
21191 #include <stdlib.h>
21192 #include <stddef.h>
21193 #endif
21194
21195 EOF
21196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21197   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21198   rm -rf conftest*
21199   eval "ac_cv_type_ssize_t=yes"
21200 else
21201   rm -rf conftest*
21202   eval "ac_cv_type_ssize_t=no"
21203 fi
21204 rm -f conftest*
21205
21206 fi
21207 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21208   echo "$ac_t""yes" 1>&6
21209 else
21210   echo "$ac_t""no" 1>&6
21211   cat >> confdefs.h <<EOF
21212 #define ssize_t signed int
21213 EOF
21214
21215 fi
21216
21217 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21218 echo "configure:21219: checking for caddr_t" >&5
21219 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21220   echo $ac_n "(cached) $ac_c" 1>&6
21221 else
21222   cat > conftest.$ac_ext <<EOF
21223 #line 21224 "configure"
21224 #include "confdefs.h"
21225 #include <sys/types.h>
21226 #if STDC_HEADERS
21227 #include <stdlib.h>
21228 #include <stddef.h>
21229 #endif
21230
21231 EOF
21232 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21233   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21234   rm -rf conftest*
21235   eval "ac_cv_type_caddr_t=yes"
21236 else
21237   rm -rf conftest*
21238   eval "ac_cv_type_caddr_t=no"
21239 fi
21240 rm -f conftest*
21241
21242 fi
21243 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21244   echo "$ac_t""yes" 1>&6
21245 else
21246   echo "$ac_t""no" 1>&6
21247   cat >> confdefs.h <<EOF
21248 #define caddr_t char *
21249 EOF
21250
21251 fi
21252
21253
21254 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21255 echo "configure:21256: checking for socklen_t" >&5
21256 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21257   echo $ac_n "(cached) $ac_c" 1>&6
21258 else
21259   cat > conftest.$ac_ext <<EOF
21260 #line 21261 "configure"
21261 #include "confdefs.h"
21262
21263 #ifdef HAVE_SYS_TYPES_H
21264 #include <sys/types.h>
21265 #endif
21266 #ifdef HAVE_SYS_SOCKET_H
21267 #include <sys/socket.h>
21268 #endif
21269
21270 int main() {
21271 socklen_t len;
21272 ; return 0; }
21273 EOF
21274 if { (eval echo configure:21275: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21275   rm -rf conftest*
21276   ol_cv_type_socklen_t=yes
21277 else
21278   echo "configure: failed program was:" >&5
21279   cat conftest.$ac_ext >&5
21280   rm -rf conftest*
21281   ol_cv_type_socklen_t=no
21282 fi
21283 rm -f conftest*
21284 fi
21285
21286 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21287   if test $ol_cv_type_socklen_t = no; then
21288     cat >> confdefs.h <<\EOF
21289 #define socklen_t int
21290 EOF
21291
21292   fi
21293  
21294 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21295 echo "configure:21296: checking for member st_blksize in aggregate type struct stat" >&5
21296 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21297   echo $ac_n "(cached) $ac_c" 1>&6
21298 else
21299   cat > conftest.$ac_ext <<EOF
21300 #line 21301 "configure"
21301 #include "confdefs.h"
21302 #include <sys/types.h>
21303 #include <sys/stat.h>
21304 int main() {
21305 struct stat foo; foo.st_blksize;
21306 ; return 0; }
21307 EOF
21308 if { (eval echo configure:21309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21309   rm -rf conftest*
21310   ac_cv_c_struct_member_st_blksize=yes
21311 else
21312   echo "configure: failed program was:" >&5
21313   cat conftest.$ac_ext >&5
21314   rm -rf conftest*
21315   ac_cv_c_struct_member_st_blksize=no
21316 fi
21317 rm -f conftest*
21318 fi
21319
21320 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21321 st_blksize="$ac_cv_c_struct_member_st_blksize"
21322 if test $ac_cv_c_struct_member_st_blksize = yes; then
21323   cat >> confdefs.h <<\EOF
21324 #define HAVE_ST_BLKSIZE 1
21325 EOF
21326
21327 fi
21328
21329 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21330 echo "configure:21331: checking whether time.h and sys/time.h may both be included" >&5
21331 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21332   echo $ac_n "(cached) $ac_c" 1>&6
21333 else
21334   cat > conftest.$ac_ext <<EOF
21335 #line 21336 "configure"
21336 #include "confdefs.h"
21337 #include <sys/types.h>
21338 #include <sys/time.h>
21339 #include <time.h>
21340 int main() {
21341 struct tm *tp;
21342 ; return 0; }
21343 EOF
21344 if { (eval echo configure:21345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21345   rm -rf conftest*
21346   ac_cv_header_time=yes
21347 else
21348   echo "configure: failed program was:" >&5
21349   cat conftest.$ac_ext >&5
21350   rm -rf conftest*
21351   ac_cv_header_time=no
21352 fi
21353 rm -f conftest*
21354 fi
21355
21356 echo "$ac_t""$ac_cv_header_time" 1>&6
21357 if test $ac_cv_header_time = yes; then
21358   cat >> confdefs.h <<\EOF
21359 #define TIME_WITH_SYS_TIME 1
21360 EOF
21361
21362 fi
21363
21364 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21365 echo "configure:21366: checking whether struct tm is in sys/time.h or time.h" >&5
21366 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21367   echo $ac_n "(cached) $ac_c" 1>&6
21368 else
21369   cat > conftest.$ac_ext <<EOF
21370 #line 21371 "configure"
21371 #include "confdefs.h"
21372 #include <sys/types.h>
21373 #include <time.h>
21374 int main() {
21375 struct tm *tp; tp->tm_sec;
21376 ; return 0; }
21377 EOF
21378 if { (eval echo configure:21379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21379   rm -rf conftest*
21380   ac_cv_struct_tm=time.h
21381 else
21382   echo "configure: failed program was:" >&5
21383   cat conftest.$ac_ext >&5
21384   rm -rf conftest*
21385   ac_cv_struct_tm=sys/time.h
21386 fi
21387 rm -f conftest*
21388 fi
21389
21390 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21391 if test $ac_cv_struct_tm = sys/time.h; then
21392   cat >> confdefs.h <<\EOF
21393 #define TM_IN_SYS_TIME 1
21394 EOF
21395
21396 fi
21397
21398 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21399 echo "configure:21400: checking for uid_t in sys/types.h" >&5
21400 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21401   echo $ac_n "(cached) $ac_c" 1>&6
21402 else
21403   cat > conftest.$ac_ext <<EOF
21404 #line 21405 "configure"
21405 #include "confdefs.h"
21406 #include <sys/types.h>
21407 EOF
21408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21409   egrep "uid_t" >/dev/null 2>&1; then
21410   rm -rf conftest*
21411   ac_cv_type_uid_t=yes
21412 else
21413   rm -rf conftest*
21414   ac_cv_type_uid_t=no
21415 fi
21416 rm -f conftest*
21417
21418 fi
21419
21420 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21421 if test $ac_cv_type_uid_t = no; then
21422   cat >> confdefs.h <<\EOF
21423 #define uid_t int
21424 EOF
21425
21426   cat >> confdefs.h <<\EOF
21427 #define gid_t int
21428 EOF
21429
21430 fi
21431
21432 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21433 echo "configure:21434: checking for sig_atomic_t" >&5
21434 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21435   echo $ac_n "(cached) $ac_c" 1>&6
21436 else
21437   cat > conftest.$ac_ext <<EOF
21438 #line 21439 "configure"
21439 #include "confdefs.h"
21440 #include <signal.h>
21441 int main() {
21442 sig_atomic_t atomic;
21443 ; return 0; }
21444 EOF
21445 if { (eval echo configure:21446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21446   rm -rf conftest*
21447   ol_cv_type_sig_atomic_t=yes
21448 else
21449   echo "configure: failed program was:" >&5
21450   cat conftest.$ac_ext >&5
21451   rm -rf conftest*
21452   ol_cv_type_sig_atomic_t=no
21453 fi
21454 rm -f conftest*
21455 fi
21456
21457 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21458   if test $ol_cv_type_sig_atomic_t = no; then
21459     cat >> confdefs.h <<\EOF
21460 #define sig_atomic_t int
21461 EOF
21462
21463   fi
21464  
21465
21466
21467 # test for pw_gecos in struct passwd
21468 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21469 echo "configure:21470: checking struct passwd for pw_gecos" >&5
21470 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21471   echo $ac_n "(cached) $ac_c" 1>&6
21472 else
21473   
21474         cat > conftest.$ac_ext <<EOF
21475 #line 21476 "configure"
21476 #include "confdefs.h"
21477 #include <pwd.h>
21478 int main() {
21479
21480         struct passwd pwd;
21481         pwd.pw_gecos = pwd.pw_name;
21482
21483 ; return 0; }
21484 EOF
21485 if { (eval echo configure:21486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21486   rm -rf conftest*
21487   ol_cv_struct_passwd_pw_gecos=yes
21488 else
21489   echo "configure: failed program was:" >&5
21490   cat conftest.$ac_ext >&5
21491   rm -rf conftest*
21492   ol_cv_struct_passwd_pw_gecos=no
21493 fi
21494 rm -f conftest*
21495 fi
21496
21497 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21498 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21499         cat >> confdefs.h <<\EOF
21500 #define HAVE_PW_GECOS 1
21501 EOF
21502
21503 fi
21504
21505 # test for pw_passwd in struct passwd
21506 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21507 echo "configure:21508: checking struct passwd for pw_passwd" >&5
21508 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21509   echo $ac_n "(cached) $ac_c" 1>&6
21510 else
21511   
21512         cat > conftest.$ac_ext <<EOF
21513 #line 21514 "configure"
21514 #include "confdefs.h"
21515 #include <pwd.h>
21516 int main() {
21517
21518         struct passwd pwd;
21519         pwd.pw_passwd = pwd.pw_name;
21520
21521 ; return 0; }
21522 EOF
21523 if { (eval echo configure:21524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21524   rm -rf conftest*
21525   ol_cv_struct_passwd_pw_passwd=yes
21526 else
21527   echo "configure: failed program was:" >&5
21528   cat conftest.$ac_ext >&5
21529   rm -rf conftest*
21530   ol_cv_struct_passwd_pw_passwd=no
21531 fi
21532 rm -f conftest*
21533 fi
21534
21535 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21536 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21537         cat >> confdefs.h <<\EOF
21538 #define HAVE_PW_PASSWD 1
21539 EOF
21540
21541 fi
21542
21543
21544 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21545 echo "configure:21546: checking if toupper() requires islower()" >&5
21546 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21547   echo $ac_n "(cached) $ac_c" 1>&6
21548 else
21549   
21550         if test "$cross_compiling" = yes; then
21551   ol_cv_c_upper_lower=safe
21552 else
21553   cat > conftest.$ac_ext <<EOF
21554 #line 21555 "configure"
21555 #include "confdefs.h"
21556
21557 #include <ctype.h>
21558 main()
21559 {
21560         if ('C' == toupper('C'))
21561                 exit(0);
21562         else
21563                 exit(1);
21564 }
21565 EOF
21566 if { (eval echo configure:21567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21567 then
21568   ol_cv_c_upper_lower=no
21569 else
21570   echo "configure: failed program was:" >&5
21571   cat conftest.$ac_ext >&5
21572   rm -fr conftest*
21573   ol_cv_c_upper_lower=yes
21574 fi
21575 rm -fr conftest*
21576 fi
21577
21578 fi
21579
21580 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21581 if test $ol_cv_c_upper_lower != no ; then
21582         cat >> confdefs.h <<\EOF
21583 #define C_UPPER_LOWER 1
21584 EOF
21585
21586 fi
21587
21588 echo $ac_n "checking for working const""... $ac_c" 1>&6
21589 echo "configure:21590: checking for working const" >&5
21590 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21591   echo $ac_n "(cached) $ac_c" 1>&6
21592 else
21593   cat > conftest.$ac_ext <<EOF
21594 #line 21595 "configure"
21595 #include "confdefs.h"
21596
21597 int main() {
21598
21599 /* Ultrix mips cc rejects this.  */
21600 typedef int charset[2]; const charset x;
21601 /* SunOS 4.1.1 cc rejects this.  */
21602 char const *const *ccp;
21603 char **p;
21604 /* NEC SVR4.0.2 mips cc rejects this.  */
21605 struct point {int x, y;};
21606 static struct point const zero = {0,0};
21607 /* AIX XL C 1.02.0.0 rejects this.
21608    It does not let you subtract one const X* pointer from another in an arm
21609    of an if-expression whose if-part is not a constant expression */
21610 const char *g = "string";
21611 ccp = &g + (g ? g-g : 0);
21612 /* HPUX 7.0 cc rejects these. */
21613 ++ccp;
21614 p = (char**) ccp;
21615 ccp = (char const *const *) p;
21616 { /* SCO 3.2v4 cc rejects this.  */
21617   char *t;
21618   char const *s = 0 ? (char *) 0 : (char const *) 0;
21619
21620   *t++ = 0;
21621 }
21622 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21623   int x[] = {25, 17};
21624   const int *foo = &x[0];
21625   ++foo;
21626 }
21627 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21628   typedef const int *iptr;
21629   iptr p = 0;
21630   ++p;
21631 }
21632 { /* AIX XL C 1.02.0.0 rejects this saying
21633      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21634   struct s { int j; const int *ap[3]; };
21635   struct s *b; b->j = 5;
21636 }
21637 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21638   const int foo = 10;
21639 }
21640
21641 ; return 0; }
21642 EOF
21643 if { (eval echo configure:21644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21644   rm -rf conftest*
21645   ac_cv_c_const=yes
21646 else
21647   echo "configure: failed program was:" >&5
21648   cat conftest.$ac_ext >&5
21649   rm -rf conftest*
21650   ac_cv_c_const=no
21651 fi
21652 rm -f conftest*
21653 fi
21654
21655 echo "$ac_t""$ac_cv_c_const" 1>&6
21656 if test $ac_cv_c_const = no; then
21657   cat >> confdefs.h <<\EOF
21658 #define const 
21659 EOF
21660
21661 fi
21662
21663 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21664 echo "configure:21665: checking if compiler understands volatile" >&5
21665 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21666   echo $ac_n "(cached) $ac_c" 1>&6
21667 else
21668   cat > conftest.$ac_ext <<EOF
21669 #line 21670 "configure"
21670 #include "confdefs.h"
21671 int x, y, z;
21672 int main() {
21673 volatile int a; int * volatile b = x ? &y : &z;
21674       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21675       *b = 0;
21676 ; return 0; }
21677 EOF
21678 if { (eval echo configure:21679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21679   rm -rf conftest*
21680   ol_cv_c_volatile=yes
21681 else
21682   echo "configure: failed program was:" >&5
21683   cat conftest.$ac_ext >&5
21684   rm -rf conftest*
21685   ol_cv_c_volatile=no
21686 fi
21687 rm -f conftest*
21688 fi
21689
21690 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21691   if test $ol_cv_c_volatile = yes; then
21692     : 
21693   else
21694     cat >> confdefs.h <<\EOF
21695 #define volatile 
21696 EOF
21697
21698   fi
21699  
21700
21701 if test $cross_compiling = yes ; then
21702         cat >> confdefs.h <<\EOF
21703 #define CROSS_COMPILING 1
21704 EOF
21705
21706 else
21707         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21708 echo "configure:21709: checking whether byte ordering is bigendian" >&5
21709 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21710   echo $ac_n "(cached) $ac_c" 1>&6
21711 else
21712   ac_cv_c_bigendian=unknown
21713 # See if sys/param.h defines the BYTE_ORDER macro.
21714 cat > conftest.$ac_ext <<EOF
21715 #line 21716 "configure"
21716 #include "confdefs.h"
21717 #include <sys/types.h>
21718 #include <sys/param.h>
21719 int main() {
21720
21721 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21722  bogus endian macros
21723 #endif
21724 ; return 0; }
21725 EOF
21726 if { (eval echo configure:21727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21727   rm -rf conftest*
21728   # It does; now see whether it defined to BIG_ENDIAN or not.
21729 cat > conftest.$ac_ext <<EOF
21730 #line 21731 "configure"
21731 #include "confdefs.h"
21732 #include <sys/types.h>
21733 #include <sys/param.h>
21734 int main() {
21735
21736 #if BYTE_ORDER != BIG_ENDIAN
21737  not big endian
21738 #endif
21739 ; return 0; }
21740 EOF
21741 if { (eval echo configure:21742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21742   rm -rf conftest*
21743   ac_cv_c_bigendian=yes
21744 else
21745   echo "configure: failed program was:" >&5
21746   cat conftest.$ac_ext >&5
21747   rm -rf conftest*
21748   ac_cv_c_bigendian=no
21749 fi
21750 rm -f conftest*
21751 else
21752   echo "configure: failed program was:" >&5
21753   cat conftest.$ac_ext >&5
21754 fi
21755 rm -f conftest*
21756 if test $ac_cv_c_bigendian = unknown; then
21757 if test "$cross_compiling" = yes; then
21758     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21759 else
21760   cat > conftest.$ac_ext <<EOF
21761 #line 21762 "configure"
21762 #include "confdefs.h"
21763 main () {
21764   /* Are we little or big endian?  From Harbison&Steele.  */
21765   union
21766   {
21767     long l;
21768     char c[sizeof (long)];
21769   } u;
21770   u.l = 1;
21771   exit (u.c[sizeof (long) - 1] == 1);
21772 }
21773 EOF
21774 if { (eval echo configure:21775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21775 then
21776   ac_cv_c_bigendian=no
21777 else
21778   echo "configure: failed program was:" >&5
21779   cat conftest.$ac_ext >&5
21780   rm -fr conftest*
21781   ac_cv_c_bigendian=yes
21782 fi
21783 rm -fr conftest*
21784 fi
21785
21786 fi
21787 fi
21788
21789 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21790 if test $ac_cv_c_bigendian = yes; then
21791   cat >> confdefs.h <<\EOF
21792 #define WORDS_BIGENDIAN 1
21793 EOF
21794
21795 fi
21796
21797 fi
21798
21799 echo $ac_n "checking size of short""... $ac_c" 1>&6
21800 echo "configure:21801: checking size of short" >&5 
21801 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21802   echo $ac_n "(cached) $ac_c" 1>&6
21803 else
21804   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21805   cat > conftest.$ac_ext <<EOF
21806 #line 21807 "configure"
21807 #include "confdefs.h"
21808 #include "confdefs.h" 
21809 #include <sys/types.h> 
21810  
21811
21812 int main() {
21813 switch (0) case 0: case (sizeof (short) == $ac_size):;
21814 ; return 0; }
21815 EOF
21816 if { (eval echo configure:21817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21817   rm -rf conftest*
21818   ac_cv_sizeof_short=$ac_size
21819 else
21820   echo "configure: failed program was:" >&5
21821   cat conftest.$ac_ext >&5
21822 fi
21823 rm -f conftest* 
21824   if test x$ac_cv_sizeof_short != x ; then break; fi 
21825 done 
21826
21827 fi
21828  
21829 if test x$ac_cv_sizeof_short = x ; then 
21830   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21831 fi 
21832 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21833 cat >> confdefs.h <<EOF
21834 #define SIZEOF_SHORT $ac_cv_sizeof_short
21835 EOF
21836  
21837  
21838 echo $ac_n "checking size of int""... $ac_c" 1>&6
21839 echo "configure:21840: checking size of int" >&5 
21840 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21841   echo $ac_n "(cached) $ac_c" 1>&6
21842 else
21843   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21844   cat > conftest.$ac_ext <<EOF
21845 #line 21846 "configure"
21846 #include "confdefs.h"
21847 #include "confdefs.h" 
21848 #include <sys/types.h> 
21849  
21850
21851 int main() {
21852 switch (0) case 0: case (sizeof (int) == $ac_size):;
21853 ; return 0; }
21854 EOF
21855 if { (eval echo configure:21856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21856   rm -rf conftest*
21857   ac_cv_sizeof_int=$ac_size
21858 else
21859   echo "configure: failed program was:" >&5
21860   cat conftest.$ac_ext >&5
21861 fi
21862 rm -f conftest* 
21863   if test x$ac_cv_sizeof_int != x ; then break; fi 
21864 done 
21865
21866 fi
21867  
21868 if test x$ac_cv_sizeof_int = x ; then 
21869   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21870 fi 
21871 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21872 cat >> confdefs.h <<EOF
21873 #define SIZEOF_INT $ac_cv_sizeof_int
21874 EOF
21875  
21876  
21877 echo $ac_n "checking size of long""... $ac_c" 1>&6
21878 echo "configure:21879: checking size of long" >&5 
21879 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21880   echo $ac_n "(cached) $ac_c" 1>&6
21881 else
21882   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21883   cat > conftest.$ac_ext <<EOF
21884 #line 21885 "configure"
21885 #include "confdefs.h"
21886 #include "confdefs.h" 
21887 #include <sys/types.h> 
21888  
21889
21890 int main() {
21891 switch (0) case 0: case (sizeof (long) == $ac_size):;
21892 ; return 0; }
21893 EOF
21894 if { (eval echo configure:21895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21895   rm -rf conftest*
21896   ac_cv_sizeof_long=$ac_size
21897 else
21898   echo "configure: failed program was:" >&5
21899   cat conftest.$ac_ext >&5
21900 fi
21901 rm -f conftest* 
21902   if test x$ac_cv_sizeof_long != x ; then break; fi 
21903 done 
21904
21905 fi
21906  
21907 if test x$ac_cv_sizeof_long = x ; then 
21908   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21909 fi 
21910 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21911 cat >> confdefs.h <<EOF
21912 #define SIZEOF_LONG $ac_cv_sizeof_long
21913 EOF
21914  
21915
21916
21917 if test "$ac_cv_sizeof_int" -lt 4 ; then
21918         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21919
21920         cat >> confdefs.h <<\EOF
21921 #define LBER_INT_T long
21922 EOF
21923
21924 else
21925         cat >> confdefs.h <<\EOF
21926 #define LBER_INT_T int
21927 EOF
21928
21929 fi
21930
21931 cat >> confdefs.h <<\EOF
21932 #define LBER_LEN_T long
21933 EOF
21934
21935 cat >> confdefs.h <<\EOF
21936 #define LBER_SOCKET_T int
21937 EOF
21938
21939 cat >> confdefs.h <<\EOF
21940 #define LBER_TAG_T long
21941 EOF
21942
21943
21944 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21945 echo "configure:21946: checking for 8-bit clean memcmp" >&5
21946 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21947   echo $ac_n "(cached) $ac_c" 1>&6
21948 else
21949   if test "$cross_compiling" = yes; then
21950   ac_cv_func_memcmp_clean=no
21951 else
21952   cat > conftest.$ac_ext <<EOF
21953 #line 21954 "configure"
21954 #include "confdefs.h"
21955
21956 main()
21957 {
21958   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21959   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21960 }
21961
21962 EOF
21963 if { (eval echo configure:21964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21964 then
21965   ac_cv_func_memcmp_clean=yes
21966 else
21967   echo "configure: failed program was:" >&5
21968   cat conftest.$ac_ext >&5
21969   rm -fr conftest*
21970   ac_cv_func_memcmp_clean=no
21971 fi
21972 rm -fr conftest*
21973 fi
21974
21975 fi
21976
21977 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21978 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21979
21980 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21981 echo "configure:21982: checking for strftime" >&5
21982 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21983   echo $ac_n "(cached) $ac_c" 1>&6
21984 else
21985   cat > conftest.$ac_ext <<EOF
21986 #line 21987 "configure"
21987 #include "confdefs.h"
21988 /* System header to define __stub macros and hopefully few prototypes,
21989     which can conflict with char strftime(); below.  */
21990 #include <assert.h>
21991 /* Override any gcc2 internal prototype to avoid an error.  */
21992 /* We use char because int might match the return type of a gcc2
21993     builtin and then its argument prototype would still apply.  */
21994 char strftime();
21995 char (*f)();
21996
21997 int main() {
21998
21999 /* The GNU C library defines this for functions which it implements
22000     to always fail with ENOSYS.  Some functions are actually named
22001     something starting with __ and the normal name is an alias.  */
22002 #if defined (__stub_strftime) || defined (__stub___strftime)
22003 choke me
22004 #else
22005 f = strftime;
22006 #endif
22007
22008 ; return 0; }
22009 EOF
22010 if { (eval echo configure:22011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22011   rm -rf conftest*
22012   eval "ac_cv_func_strftime=yes"
22013 else
22014   echo "configure: failed program was:" >&5
22015   cat conftest.$ac_ext >&5
22016   rm -rf conftest*
22017   eval "ac_cv_func_strftime=no"
22018 fi
22019 rm -f conftest*
22020 fi
22021
22022 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22023   echo "$ac_t""yes" 1>&6
22024   cat >> confdefs.h <<\EOF
22025 #define HAVE_STRFTIME 1
22026 EOF
22027
22028 else
22029   echo "$ac_t""no" 1>&6
22030 # strftime is in -lintl on SCO UNIX.
22031 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22032 echo "configure:22033: checking for strftime in -lintl" >&5
22033 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22034 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22035   echo $ac_n "(cached) $ac_c" 1>&6
22036 else
22037   ac_save_LIBS="$LIBS"
22038 LIBS="-lintl  $LIBS"
22039 cat > conftest.$ac_ext <<EOF
22040 #line 22041 "configure"
22041 #include "confdefs.h"
22042 /* Override any gcc2 internal prototype to avoid an error.  */
22043 /* We use char because int might match the return type of a gcc2
22044     builtin and then its argument prototype would still apply.  */
22045 char strftime();
22046
22047 int main() {
22048 strftime()
22049 ; return 0; }
22050 EOF
22051 if { (eval echo configure:22052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22052   rm -rf conftest*
22053   eval "ac_cv_lib_$ac_lib_var=yes"
22054 else
22055   echo "configure: failed program was:" >&5
22056   cat conftest.$ac_ext >&5
22057   rm -rf conftest*
22058   eval "ac_cv_lib_$ac_lib_var=no"
22059 fi
22060 rm -f conftest*
22061 LIBS="$ac_save_LIBS"
22062
22063 fi
22064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22065   echo "$ac_t""yes" 1>&6
22066   cat >> confdefs.h <<\EOF
22067 #define HAVE_STRFTIME 1
22068 EOF
22069
22070 LIBS="-lintl $LIBS"
22071 else
22072   echo "$ac_t""no" 1>&6
22073 fi
22074
22075 fi
22076
22077
22078 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22079 echo "configure:22080: checking for inet_aton()" >&5
22080 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22081   echo $ac_n "(cached) $ac_c" 1>&6
22082 else
22083   cat > conftest.$ac_ext <<EOF
22084 #line 22085 "configure"
22085 #include "confdefs.h"
22086
22087 #ifdef HAVE_SYS_TYPES_H
22088 #       include <sys/types.h>
22089 #endif
22090 #ifdef HAVE_SYS_SOCKET_H
22091 #       include <sys/socket.h>
22092 #       ifdef HAVE_SYS_SELECT_H
22093 #               include <sys/select.h>
22094 #       endif
22095 #       include <netinet/in.h>
22096 #       ifdef HAVE_ARPA_INET_H
22097 #               include <arpa/inet.h>
22098 #       endif
22099 #endif
22100
22101 int main() {
22102 struct in_addr in;
22103 int rc = inet_aton( "255.255.255.255", &in );
22104 ; return 0; }
22105 EOF
22106 if { (eval echo configure:22107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22107   rm -rf conftest*
22108   ol_cv_func_inet_aton=yes
22109 else
22110   echo "configure: failed program was:" >&5
22111   cat conftest.$ac_ext >&5
22112   rm -rf conftest*
22113   ol_cv_func_inet_aton=no
22114 fi
22115 rm -f conftest*
22116 fi
22117
22118 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22119   if test $ol_cv_func_inet_aton != no; then
22120     cat >> confdefs.h <<\EOF
22121 #define HAVE_INET_ATON 1
22122 EOF
22123
22124   fi
22125  
22126
22127 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22128 echo "configure:22129: checking for _spawnlp" >&5
22129 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22130   echo $ac_n "(cached) $ac_c" 1>&6
22131 else
22132   cat > conftest.$ac_ext <<EOF
22133 #line 22134 "configure"
22134 #include "confdefs.h"
22135 /* System header to define __stub macros and hopefully few prototypes,
22136     which can conflict with char _spawnlp(); below.  */
22137 #include <assert.h>
22138 /* Override any gcc2 internal prototype to avoid an error.  */
22139 /* We use char because int might match the return type of a gcc2
22140     builtin and then its argument prototype would still apply.  */
22141 char _spawnlp();
22142 char (*f)();
22143
22144 int main() {
22145
22146 /* The GNU C library defines this for functions which it implements
22147     to always fail with ENOSYS.  Some functions are actually named
22148     something starting with __ and the normal name is an alias.  */
22149 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22150 choke me
22151 #else
22152 f = _spawnlp;
22153 #endif
22154
22155 ; return 0; }
22156 EOF
22157 if { (eval echo configure:22158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22158   rm -rf conftest*
22159   eval "ac_cv_func__spawnlp=yes"
22160 else
22161   echo "configure: failed program was:" >&5
22162   cat conftest.$ac_ext >&5
22163   rm -rf conftest*
22164   eval "ac_cv_func__spawnlp=no"
22165 fi
22166 rm -f conftest*
22167 fi
22168
22169 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22170   echo "$ac_t""yes" 1>&6
22171   cat >> confdefs.h <<\EOF
22172 #define HAVE_SPAWNLP 1
22173 EOF
22174
22175 else
22176   echo "$ac_t""no" 1>&6
22177 fi
22178
22179
22180 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22181 echo "configure:22182: checking for _snprintf" >&5
22182 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22183   echo $ac_n "(cached) $ac_c" 1>&6
22184 else
22185   cat > conftest.$ac_ext <<EOF
22186 #line 22187 "configure"
22187 #include "confdefs.h"
22188 /* System header to define __stub macros and hopefully few prototypes,
22189     which can conflict with char _snprintf(); below.  */
22190 #include <assert.h>
22191 /* Override any gcc2 internal prototype to avoid an error.  */
22192 /* We use char because int might match the return type of a gcc2
22193     builtin and then its argument prototype would still apply.  */
22194 char _snprintf();
22195 char (*f)();
22196
22197 int main() {
22198
22199 /* The GNU C library defines this for functions which it implements
22200     to always fail with ENOSYS.  Some functions are actually named
22201     something starting with __ and the normal name is an alias.  */
22202 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22203 choke me
22204 #else
22205 f = _snprintf;
22206 #endif
22207
22208 ; return 0; }
22209 EOF
22210 if { (eval echo configure:22211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22211   rm -rf conftest*
22212   eval "ac_cv_func__snprintf=yes"
22213 else
22214   echo "configure: failed program was:" >&5
22215   cat conftest.$ac_ext >&5
22216   rm -rf conftest*
22217   eval "ac_cv_func__snprintf=no"
22218 fi
22219 rm -f conftest*
22220 fi
22221
22222 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22223   echo "$ac_t""yes" 1>&6
22224   ac_cv_func_snprintf=yes
22225         cat >> confdefs.h <<\EOF
22226 #define snprintf _snprintf
22227 EOF
22228
22229
22230 else
22231   echo "$ac_t""no" 1>&6
22232 fi
22233
22234
22235 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22236 echo "configure:22237: checking for _vsnprintf" >&5
22237 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22238   echo $ac_n "(cached) $ac_c" 1>&6
22239 else
22240   cat > conftest.$ac_ext <<EOF
22241 #line 22242 "configure"
22242 #include "confdefs.h"
22243 /* System header to define __stub macros and hopefully few prototypes,
22244     which can conflict with char _vsnprintf(); below.  */
22245 #include <assert.h>
22246 /* Override any gcc2 internal prototype to avoid an error.  */
22247 /* We use char because int might match the return type of a gcc2
22248     builtin and then its argument prototype would still apply.  */
22249 char _vsnprintf();
22250 char (*f)();
22251
22252 int main() {
22253
22254 /* The GNU C library defines this for functions which it implements
22255     to always fail with ENOSYS.  Some functions are actually named
22256     something starting with __ and the normal name is an alias.  */
22257 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22258 choke me
22259 #else
22260 f = _vsnprintf;
22261 #endif
22262
22263 ; return 0; }
22264 EOF
22265 if { (eval echo configure:22266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22266   rm -rf conftest*
22267   eval "ac_cv_func__vsnprintf=yes"
22268 else
22269   echo "configure: failed program was:" >&5
22270   cat conftest.$ac_ext >&5
22271   rm -rf conftest*
22272   eval "ac_cv_func__vsnprintf=no"
22273 fi
22274 rm -f conftest*
22275 fi
22276
22277 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22278   echo "$ac_t""yes" 1>&6
22279   ac_cv_func_vsnprintf=yes
22280         cat >> confdefs.h <<\EOF
22281 #define vsnprintf _vsnprintf
22282 EOF
22283
22284
22285 else
22286   echo "$ac_t""no" 1>&6
22287 fi
22288
22289
22290 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22291 echo "configure:22292: checking for vprintf" >&5
22292 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22293   echo $ac_n "(cached) $ac_c" 1>&6
22294 else
22295   cat > conftest.$ac_ext <<EOF
22296 #line 22297 "configure"
22297 #include "confdefs.h"
22298 /* System header to define __stub macros and hopefully few prototypes,
22299     which can conflict with char vprintf(); below.  */
22300 #include <assert.h>
22301 /* Override any gcc2 internal prototype to avoid an error.  */
22302 /* We use char because int might match the return type of a gcc2
22303     builtin and then its argument prototype would still apply.  */
22304 char vprintf();
22305 char (*f)();
22306
22307 int main() {
22308
22309 /* The GNU C library defines this for functions which it implements
22310     to always fail with ENOSYS.  Some functions are actually named
22311     something starting with __ and the normal name is an alias.  */
22312 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22313 choke me
22314 #else
22315 f = vprintf;
22316 #endif
22317
22318 ; return 0; }
22319 EOF
22320 if { (eval echo configure:22321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22321   rm -rf conftest*
22322   eval "ac_cv_func_vprintf=yes"
22323 else
22324   echo "configure: failed program was:" >&5
22325   cat conftest.$ac_ext >&5
22326   rm -rf conftest*
22327   eval "ac_cv_func_vprintf=no"
22328 fi
22329 rm -f conftest*
22330 fi
22331
22332 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22333   echo "$ac_t""yes" 1>&6
22334   cat >> confdefs.h <<\EOF
22335 #define HAVE_VPRINTF 1
22336 EOF
22337
22338 else
22339   echo "$ac_t""no" 1>&6
22340 fi
22341
22342 if test "$ac_cv_func_vprintf" != yes; then
22343 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22344 echo "configure:22345: checking for _doprnt" >&5
22345 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22346   echo $ac_n "(cached) $ac_c" 1>&6
22347 else
22348   cat > conftest.$ac_ext <<EOF
22349 #line 22350 "configure"
22350 #include "confdefs.h"
22351 /* System header to define __stub macros and hopefully few prototypes,
22352     which can conflict with char _doprnt(); below.  */
22353 #include <assert.h>
22354 /* Override any gcc2 internal prototype to avoid an error.  */
22355 /* We use char because int might match the return type of a gcc2
22356     builtin and then its argument prototype would still apply.  */
22357 char _doprnt();
22358 char (*f)();
22359
22360 int main() {
22361
22362 /* The GNU C library defines this for functions which it implements
22363     to always fail with ENOSYS.  Some functions are actually named
22364     something starting with __ and the normal name is an alias.  */
22365 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22366 choke me
22367 #else
22368 f = _doprnt;
22369 #endif
22370
22371 ; return 0; }
22372 EOF
22373 if { (eval echo configure:22374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22374   rm -rf conftest*
22375   eval "ac_cv_func__doprnt=yes"
22376 else
22377   echo "configure: failed program was:" >&5
22378   cat conftest.$ac_ext >&5
22379   rm -rf conftest*
22380   eval "ac_cv_func__doprnt=no"
22381 fi
22382 rm -f conftest*
22383 fi
22384
22385 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22386   echo "$ac_t""yes" 1>&6
22387   cat >> confdefs.h <<\EOF
22388 #define HAVE_DOPRNT 1
22389 EOF
22390
22391 else
22392   echo "$ac_t""no" 1>&6
22393 fi
22394
22395 fi
22396
22397
22398 if test $ac_cv_func_vprintf = yes ; then
22399                 for ac_func in snprintf vsnprintf
22400 do
22401 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22402 echo "configure:22403: checking for $ac_func" >&5
22403 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22404   echo $ac_n "(cached) $ac_c" 1>&6
22405 else
22406   cat > conftest.$ac_ext <<EOF
22407 #line 22408 "configure"
22408 #include "confdefs.h"
22409 /* System header to define __stub macros and hopefully few prototypes,
22410     which can conflict with char $ac_func(); below.  */
22411 #include <assert.h>
22412 /* Override any gcc2 internal prototype to avoid an error.  */
22413 /* We use char because int might match the return type of a gcc2
22414     builtin and then its argument prototype would still apply.  */
22415 char $ac_func();
22416 char (*f)();
22417
22418 int main() {
22419
22420 /* The GNU C library defines this for functions which it implements
22421     to always fail with ENOSYS.  Some functions are actually named
22422     something starting with __ and the normal name is an alias.  */
22423 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22424 choke me
22425 #else
22426 f = $ac_func;
22427 #endif
22428
22429 ; return 0; }
22430 EOF
22431 if { (eval echo configure:22432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22432   rm -rf conftest*
22433   eval "ac_cv_func_$ac_func=yes"
22434 else
22435   echo "configure: failed program was:" >&5
22436   cat conftest.$ac_ext >&5
22437   rm -rf conftest*
22438   eval "ac_cv_func_$ac_func=no"
22439 fi
22440 rm -f conftest*
22441 fi
22442
22443 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22444   echo "$ac_t""yes" 1>&6
22445     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22446   cat >> confdefs.h <<EOF
22447 #define $ac_tr_func 1
22448 EOF
22449  
22450 else
22451   echo "$ac_t""no" 1>&6
22452 fi
22453 done
22454
22455 fi
22456
22457 for ac_func in \
22458         bcopy                   \
22459         closesocket             \
22460         chroot                  \
22461         endgrent                \
22462         endpwent                \
22463         fcntl                   \
22464         flock                   \
22465         fstat                   \
22466         getdtablesize   \
22467         getgrgid                \
22468         gethostname             \
22469         getpass                 \
22470         getpassphrase   \
22471         getpwuid                \
22472         getpwnam                \
22473         getspnam                \
22474         gettimeofday    \
22475         initgroups              \
22476         lockf                   \
22477         memcpy                  \
22478         memmove                 \
22479         mkstemp                 \
22480         mktemp                  \
22481         pipe                    \
22482         read                    \
22483         recv                    \
22484         recvfrom                \
22485         setpwfile               \
22486         setgid                  \
22487         setegid                 \
22488         setsid                  \
22489         setuid                  \
22490         seteuid                 \
22491         sigaction               \
22492         signal                  \
22493         sigset                  \
22494         strdup                  \
22495         strerror                \
22496         strpbrk                 \
22497         strrchr                 \
22498         strsep                  \
22499         strstr                  \
22500         strtol                  \
22501         strtoul                 \
22502         strspn                  \
22503         sysconf                 \
22504         usleep                  \
22505         waitpid                 \
22506         wait4                   \
22507         write                   \
22508         send                    \
22509         sendmsg                 \
22510         sendto                  \
22511
22512 do
22513 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22514 echo "configure:22515: checking for $ac_func" >&5
22515 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22516   echo $ac_n "(cached) $ac_c" 1>&6
22517 else
22518   cat > conftest.$ac_ext <<EOF
22519 #line 22520 "configure"
22520 #include "confdefs.h"
22521 /* System header to define __stub macros and hopefully few prototypes,
22522     which can conflict with char $ac_func(); below.  */
22523 #include <assert.h>
22524 /* Override any gcc2 internal prototype to avoid an error.  */
22525 /* We use char because int might match the return type of a gcc2
22526     builtin and then its argument prototype would still apply.  */
22527 char $ac_func();
22528 char (*f)();
22529
22530 int main() {
22531
22532 /* The GNU C library defines this for functions which it implements
22533     to always fail with ENOSYS.  Some functions are actually named
22534     something starting with __ and the normal name is an alias.  */
22535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22536 choke me
22537 #else
22538 f = $ac_func;
22539 #endif
22540
22541 ; return 0; }
22542 EOF
22543 if { (eval echo configure:22544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22544   rm -rf conftest*
22545   eval "ac_cv_func_$ac_func=yes"
22546 else
22547   echo "configure: failed program was:" >&5
22548   cat conftest.$ac_ext >&5
22549   rm -rf conftest*
22550   eval "ac_cv_func_$ac_func=no"
22551 fi
22552 rm -f conftest*
22553 fi
22554
22555 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22556   echo "$ac_t""yes" 1>&6
22557     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22558   cat >> confdefs.h <<EOF
22559 #define $ac_tr_func 1
22560 EOF
22561  
22562 else
22563   echo "$ac_t""no" 1>&6
22564 fi
22565 done
22566
22567
22568 for ac_func in getopt getpeereid
22569 do
22570 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22571 echo "configure:22572: checking for $ac_func" >&5
22572 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22573   echo $ac_n "(cached) $ac_c" 1>&6
22574 else
22575   cat > conftest.$ac_ext <<EOF
22576 #line 22577 "configure"
22577 #include "confdefs.h"
22578 /* System header to define __stub macros and hopefully few prototypes,
22579     which can conflict with char $ac_func(); below.  */
22580 #include <assert.h>
22581 /* Override any gcc2 internal prototype to avoid an error.  */
22582 /* We use char because int might match the return type of a gcc2
22583     builtin and then its argument prototype would still apply.  */
22584 char $ac_func();
22585 char (*f)();
22586
22587 int main() {
22588
22589 /* The GNU C library defines this for functions which it implements
22590     to always fail with ENOSYS.  Some functions are actually named
22591     something starting with __ and the normal name is an alias.  */
22592 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22593 choke me
22594 #else
22595 f = $ac_func;
22596 #endif
22597
22598 ; return 0; }
22599 EOF
22600 if { (eval echo configure:22601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22601   rm -rf conftest*
22602   eval "ac_cv_func_$ac_func=yes"
22603 else
22604   echo "configure: failed program was:" >&5
22605   cat conftest.$ac_ext >&5
22606   rm -rf conftest*
22607   eval "ac_cv_func_$ac_func=no"
22608 fi
22609 rm -f conftest*
22610 fi
22611
22612 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22613   echo "$ac_t""yes" 1>&6
22614     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22615   cat >> confdefs.h <<EOF
22616 #define $ac_tr_func 1
22617 EOF
22618  
22619 else
22620   echo "$ac_t""no" 1>&6
22621 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22622 fi
22623 done
22624
22625
22626
22627 if test "$ac_cv_func_getopt" != yes; then
22628         LIBSRCS="$LIBSRCS getopt.c"
22629 fi
22630 if test "$ac_cv_func_getpeereid" != yes; then
22631         LIBSRCS="$LIBSRCS getpeereid.c"
22632 fi
22633 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22634         if test "$ac_cv_func_snprintf" != yes; then
22635                 cat >> confdefs.h <<\EOF
22636 #define snprintf ber_pvt_snprintf
22637 EOF
22638
22639         fi
22640         if test "$ac_cv_func_vsnprintf" != yes; then
22641                 cat >> confdefs.h <<\EOF
22642 #define vsnprintf ber_pvt_vsnprintf
22643 EOF
22644
22645         fi
22646 fi
22647
22648 # Check Configuration
22649 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22650 echo "configure:22651: checking declaration of sys_errlist" >&5
22651 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22652   echo $ac_n "(cached) $ac_c" 1>&6
22653 else
22654   
22655         cat > conftest.$ac_ext <<EOF
22656 #line 22657 "configure"
22657 #include "confdefs.h"
22658
22659 #include <stdio.h>
22660 #include <sys/types.h>
22661 #include <errno.h>
22662 #ifdef WINNT
22663 #include <stdlib.h>
22664 #endif 
22665 int main() {
22666 char *c = (char *) *sys_errlist
22667 ; return 0; }
22668 EOF
22669 if { (eval echo configure:22670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22670   rm -rf conftest*
22671   ol_cv_dcl_sys_errlist=yes
22672         ol_cv_have_sys_errlist=yes
22673 else
22674   echo "configure: failed program was:" >&5
22675   cat conftest.$ac_ext >&5
22676   rm -rf conftest*
22677   ol_cv_dcl_sys_errlist=no
22678 fi
22679 rm -f conftest*
22680 fi
22681
22682 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22683 #
22684 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22685 if test $ol_cv_dcl_sys_errlist = no ; then
22686         cat >> confdefs.h <<\EOF
22687 #define DECL_SYS_ERRLIST 1
22688 EOF
22689
22690
22691         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22692 echo "configure:22693: checking existence of sys_errlist" >&5
22693 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22694   echo $ac_n "(cached) $ac_c" 1>&6
22695 else
22696   
22697                 cat > conftest.$ac_ext <<EOF
22698 #line 22699 "configure"
22699 #include "confdefs.h"
22700 #include <errno.h>
22701 int main() {
22702 char *c = (char *) *sys_errlist
22703 ; return 0; }
22704 EOF
22705 if { (eval echo configure:22706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22706   rm -rf conftest*
22707   ol_cv_have_sys_errlist=yes
22708 else
22709   echo "configure: failed program was:" >&5
22710   cat conftest.$ac_ext >&5
22711   rm -rf conftest*
22712   ol_cv_have_sys_errlist=no
22713 fi
22714 rm -f conftest*
22715 fi
22716
22717 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22718 fi
22719 if test $ol_cv_have_sys_errlist = yes ; then
22720         cat >> confdefs.h <<\EOF
22721 #define HAVE_SYS_ERRLIST 1
22722 EOF
22723
22724 fi
22725
22726
22727
22728 if test "$ol_enable_slapi" != no ; then
22729                         for ac_hdr in ltdl.h
22730 do
22731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22733 echo "configure:22734: checking for $ac_hdr" >&5
22734 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22735   echo $ac_n "(cached) $ac_c" 1>&6
22736 else
22737   cat > conftest.$ac_ext <<EOF
22738 #line 22739 "configure"
22739 #include "confdefs.h"
22740 #include <$ac_hdr>
22741 EOF
22742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22743 { (eval echo configure:22744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22745 if test -z "$ac_err"; then
22746   rm -rf conftest*
22747   eval "ac_cv_header_$ac_safe=yes"
22748 else
22749   echo "$ac_err" >&5
22750   echo "configure: failed program was:" >&5
22751   cat conftest.$ac_ext >&5
22752   rm -rf conftest*
22753   eval "ac_cv_header_$ac_safe=no"
22754 fi
22755 rm -f conftest*
22756 fi
22757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22758   echo "$ac_t""yes" 1>&6
22759     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22760   cat >> confdefs.h <<EOF
22761 #define $ac_tr_hdr 1
22762 EOF
22763  
22764 else
22765   echo "$ac_t""no" 1>&6
22766 fi
22767 done
22768
22769
22770         if test $ac_cv_header_ltdl_h != yes ; then
22771                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22772         fi
22773         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22774 echo "configure:22775: checking for lt_dlinit in -lltdl" >&5
22775 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22777   echo $ac_n "(cached) $ac_c" 1>&6
22778 else
22779   ac_save_LIBS="$LIBS"
22780 LIBS="-lltdl  $LIBS"
22781 cat > conftest.$ac_ext <<EOF
22782 #line 22783 "configure"
22783 #include "confdefs.h"
22784 /* Override any gcc2 internal prototype to avoid an error.  */
22785 /* We use char because int might match the return type of a gcc2
22786     builtin and then its argument prototype would still apply.  */
22787 char lt_dlinit();
22788
22789 int main() {
22790 lt_dlinit()
22791 ; return 0; }
22792 EOF
22793 if { (eval echo configure:22794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22794   rm -rf conftest*
22795   eval "ac_cv_lib_$ac_lib_var=yes"
22796 else
22797   echo "configure: failed program was:" >&5
22798   cat conftest.$ac_ext >&5
22799   rm -rf conftest*
22800   eval "ac_cv_lib_$ac_lib_var=no"
22801 fi
22802 rm -f conftest*
22803 LIBS="$ac_save_LIBS"
22804
22805 fi
22806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22807   echo "$ac_t""yes" 1>&6
22808   
22809                 SLAPI_LIBS=-lltdl
22810                 LIBSLAPI=./libslapi.a
22811                 LIBSLAPITOOLS=../libslapi.a
22812                 cat >> confdefs.h <<\EOF
22813 #define HAVE_LIBLTDL 1
22814 EOF
22815
22816         
22817 else
22818   echo "$ac_t""no" 1>&6
22819 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
22820 fi
22821
22822
22823         cat >> confdefs.h <<\EOF
22824 #define LDAP_SLAPI 1
22825 EOF
22826
22827 fi
22828
22829 if test "$ol_enable_debug" != no ; then
22830         cat >> confdefs.h <<\EOF
22831 #define LDAP_DEBUG 1
22832 EOF
22833
22834 fi
22835 if test "$ol_enable_syslog" = yes ; then
22836         cat >> confdefs.h <<\EOF
22837 #define LDAP_SYSLOG 1
22838 EOF
22839
22840 fi
22841 if test "$ol_link_kbind" != no ; then
22842         cat >> confdefs.h <<\EOF
22843 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22844 EOF
22845
22846 fi
22847 if test "$ol_enable_proctitle" != no ; then
22848         cat >> confdefs.h <<\EOF
22849 #define LDAP_PROCTITLE 1
22850 EOF
22851
22852 fi
22853 if test "$ol_enable_referrals" != no ; then
22854         cat >> confdefs.h <<\EOF
22855 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22856 EOF
22857
22858 fi
22859 if test "$ol_enable_local" != no; then
22860         cat >> confdefs.h <<\EOF
22861 #define LDAP_PF_LOCAL 1
22862 EOF
22863
22864 fi
22865 if test "$ol_link_ipv6" != no; then
22866         cat >> confdefs.h <<\EOF
22867 #define LDAP_PF_INET6 1
22868 EOF
22869
22870 fi
22871 if test "$ol_enable_cleartext" != no ; then
22872         cat >> confdefs.h <<\EOF
22873 #define SLAPD_CLEARTEXT 1
22874 EOF
22875
22876 fi
22877 if test "$ol_enable_crypt" != no ; then
22878         cat >> confdefs.h <<\EOF
22879 #define SLAPD_CRYPT 1
22880 EOF
22881
22882 fi
22883 if test "$ol_link_kpasswd" != no ; then
22884         cat >> confdefs.h <<\EOF
22885 #define SLAPD_KPASSWD 1
22886 EOF
22887
22888 fi
22889 if test "$ol_link_spasswd" != no ; then
22890         cat >> confdefs.h <<\EOF
22891 #define SLAPD_SPASSWD 1
22892 EOF
22893
22894 fi
22895 if test "$ol_enable_multimaster" != no ; then
22896         cat >> confdefs.h <<\EOF
22897 #define SLAPD_MULTIMASTER 1
22898 EOF
22899
22900 fi
22901 if test "$ol_enable_phonetic" != no ; then
22902         cat >> confdefs.h <<\EOF
22903 #define SLAPD_PHONETIC 1
22904 EOF
22905
22906 fi
22907 if test "$ol_enable_rlookups" != no ; then
22908         cat >> confdefs.h <<\EOF
22909 #define SLAPD_RLOOKUPS 1
22910 EOF
22911
22912 fi
22913 if test "$ol_enable_aci" != no ; then
22914         cat >> confdefs.h <<\EOF
22915 #define SLAPD_ACI_ENABLED 1
22916 EOF
22917
22918 fi
22919
22920 if test "$ol_link_modules" != no ; then
22921         cat >> confdefs.h <<\EOF
22922 #define SLAPD_MODULES 1
22923 EOF
22924
22925         BUILD_SLAPD=yes
22926         SLAPD_MODULES_LDFLAGS="-dlopen self"
22927 fi
22928
22929 if test "$ol_enable_bdb" != no ; then
22930         cat >> confdefs.h <<\EOF
22931 #define SLAPD_BDB 1
22932 EOF
22933
22934         BUILD_SLAPD=yes
22935         BUILD_BDB=yes
22936         if test "$ol_with_bdb_module" != static ; then
22937                 cat >> confdefs.h <<\EOF
22938 #define SLAPD_BDB_DYNAMIC 1
22939 EOF
22940
22941                 BUILD_BDB=mod
22942                 BUILD_BDB_DYNAMIC=shared
22943                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22944         else
22945                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22946         fi
22947 fi
22948
22949 if test "$ol_link_dnssrv" != no ; then
22950         cat >> confdefs.h <<\EOF
22951 #define SLAPD_DNSSRV 1
22952 EOF
22953
22954         BUILD_SLAPD=yes
22955         BUILD_DNSSRV=yes
22956         if test "$ol_with_dnssrv_module" != static ; then
22957                 cat >> confdefs.h <<\EOF
22958 #define SLAPD_DNSSRV_DYNAMIC 1
22959 EOF
22960
22961                 BUILD_DNSSRV=mod
22962                 BUILD_DNSSRV_DYNAMIC=shared
22963                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22964         else
22965                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22966         fi
22967 fi
22968
22969 if test "$ol_enable_ldap" != no ; then
22970         cat >> confdefs.h <<\EOF
22971 #define SLAPD_LDAP 1
22972 EOF
22973
22974         BUILD_SLAPD=yes
22975         BUILD_LDAP=yes
22976         if test "$ol_with_ldap_module" != static ; then
22977                 cat >> confdefs.h <<\EOF
22978 #define SLAPD_LDAP_DYNAMIC 1
22979 EOF
22980
22981                 BUILD_LDAP=mod
22982                 BUILD_LDAP_DYNAMIC=shared
22983                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22984         else
22985                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22986         fi
22987 fi
22988
22989 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22990         cat >> confdefs.h <<\EOF
22991 #define SLAPD_LDBM 1
22992 EOF
22993
22994         BUILD_SLAPD=yes
22995         BUILD_LDBM=yes
22996         if test "$ol_with_ldbm_module" != static ; then
22997                 cat >> confdefs.h <<\EOF
22998 #define SLAPD_LDBM_DYNAMIC 1
22999 EOF
23000
23001                 BUILD_LDBM=mod
23002                 BUILD_LDBM_DYNAMIC=shared
23003                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23004         else
23005                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23006         fi
23007 fi
23008
23009 if test "$ol_enable_meta" != no ; then
23010         if test "$ol_enable_ldap" = no ; then
23011                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
23012         fi
23013         if test "$ol_enable_rewrite" = no ; then
23014                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
23015         fi
23016         cat >> confdefs.h <<\EOF
23017 #define SLAPD_META 1
23018 EOF
23019
23020         BUILD_SLAPD=yes
23021         BUILD_META=yes
23022         BUILD_LDAP=yes
23023         BUILD_REWRITE=yes
23024         if test "$ol_with_meta_module" != static ; then
23025                 cat >> confdefs.h <<\EOF
23026 #define SLAPD_META_DYNAMIC 1
23027 EOF
23028
23029                 BUILD_META=mod
23030                 BUILD_META_DYNAMIC=shared
23031                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23032         else
23033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23034         fi
23035 fi
23036
23037 if test "$ol_enable_monitor" != no ; then
23038         cat >> confdefs.h <<\EOF
23039 #define SLAPD_MONITOR 1
23040 EOF
23041
23042         BUILD_SLAPD=yes
23043         BUILD_MONITOR=yes
23044         if test "$ol_with_monitor_module" != static ; then
23045                 cat >> confdefs.h <<\EOF
23046 #define SLAPD_MONITOR_DYNAMIC 1
23047 EOF
23048
23049                 BUILD_MONITOR=mod
23050                 BUILD_MONITOR_DYNAMIC=shared
23051                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23052         else
23053                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23054         fi
23055 fi
23056
23057 if test "$ol_enable_null" != no ; then
23058         cat >> confdefs.h <<\EOF
23059 #define SLAPD_NULL 1
23060 EOF
23061
23062         BUILD_SLAPD=yes
23063         BUILD_NULL=yes
23064         if test "$ol_with_null_module" != static ; then
23065                 cat >> confdefs.h <<\EOF
23066 #define SLAPD_NULL_DYNAMIC 1
23067 EOF
23068
23069                 BUILD_NULL=mod
23070                 BUILD_NULL_DYNAMIC=shared
23071                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23072         else
23073                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23074         fi
23075 fi
23076
23077 if test "$ol_enable_passwd" != no ; then
23078         cat >> confdefs.h <<\EOF
23079 #define SLAPD_PASSWD 1
23080 EOF
23081
23082         BUILD_SLAPD=yes
23083         BUILD_PASSWD=yes
23084         if test "$ol_with_passwd_module" != static ; then
23085                 cat >> confdefs.h <<\EOF
23086 #define SLAPD_PASSWD_DYNAMIC 1
23087 EOF
23088
23089                 BUILD_PASSWD=mod
23090                 BUILD_PASSWD_DYNAMIC=shared
23091                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23092         else
23093                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23094         fi
23095 fi
23096
23097 if test "$ol_link_perl" != no ; then
23098         cat >> confdefs.h <<\EOF
23099 #define SLAPD_PERL 1
23100 EOF
23101
23102         BUILD_SLAPD=yes
23103         BUILD_PERL=yes
23104         if test "$ol_with_perl_module" != static ; then
23105                 cat >> confdefs.h <<\EOF
23106 #define SLAPD_PERL_DYNAMIC 1
23107 EOF
23108
23109                 BUILD_PERL=mod
23110                 BUILD_PERL_DYNAMIC=shared
23111                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23112         else
23113                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23114         fi
23115 fi
23116
23117 if test "$ol_enable_shell" != no ; then
23118         if test "$ol_link_thread" != no ; then
23119                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23120         fi
23121         cat >> confdefs.h <<\EOF
23122 #define SLAPD_SHELL 1
23123 EOF
23124
23125         BUILD_SLAPD=yes
23126         BUILD_SHELL=yes
23127         if test "$ol_with_shell_module" != static ; then
23128                 cat >> confdefs.h <<\EOF
23129 #define SLAPD_SHELL_DYNAMIC 1
23130 EOF
23131
23132                 BUILD_SHELL=mod
23133                 BUILD_SHELL_DYNAMIC=shared
23134                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23135         else
23136                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23137         fi
23138 fi
23139
23140 if test "$ol_enable_tcl" != no ; then
23141         cat >> confdefs.h <<\EOF
23142 #define SLAPD_TCL 1
23143 EOF
23144
23145         BUILD_SLAPD=yes
23146         BUILD_TCL=yes
23147         if test "$ol_with_tcl_module" != static; then
23148                 cat >> confdefs.h <<\EOF
23149 #define SLAPD_TCL_DYNAMIC 1
23150 EOF
23151
23152                 BUILD_TCL=mod
23153                 BUILD_TCL_DYNAMIC=shared
23154                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
23155         else
23156                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
23157         fi
23158 fi
23159
23160 if test "$ol_link_sql" != no ; then
23161         cat >> confdefs.h <<\EOF
23162 #define SLAPD_SQL 1
23163 EOF
23164
23165         BUILD_SLAPD=yes
23166         BUILD_SQL=yes
23167         if test "$ol_with_sql_module" != static; then
23168                 cat >> confdefs.h <<\EOF
23169 #define SLAPD_SQL_DYNAMIC 1
23170 EOF
23171
23172                 BUILD_SQL=mod
23173                 BUILD_SQL_DYNAMIC=shared
23174                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23175         else
23176                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23177         fi
23178 fi
23179
23180 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23181         $BUILD_SLAPD = yes ; then
23182         BUILD_SLURPD=yes
23183 fi
23184
23185 if test "$ol_enable_rewrite" != no ; then
23186         cat >> confdefs.h <<\EOF
23187 #define ENABLE_REWRITE 1
23188 EOF
23189
23190         BUILD_REWRITE=yes
23191 fi
23192
23193 if test "$ol_enable_slapi" != no ; then
23194         cat >> confdefs.h <<\EOF
23195 #define ENABLE_SLAPI 1
23196 EOF
23197
23198         BUILD_SLAPI=yes
23199         SLAPD_SLAPI_DEPEND=libslapi.a
23200 fi
23201
23202
23203
23204 if test "$ac_cv_mingw32" = yes ; then
23205         PLAT=NT
23206         SLAPD_MODULES_LDFLAGS=
23207 else
23208         PLAT=UNIX
23209 fi
23210
23211 if test -z "$SLAPD_STATIC_BACKENDS"; then
23212         SLAPD_NO_STATIC='#'
23213 else
23214         SLAPD_NO_STATIC=
23215 fi
23216
23217
23218
23219
23220
23221
23222   
23223   
23224   
23225   
23226   
23227   
23228   
23229   
23230   
23231   
23232   
23233   
23234   
23235   
23236   
23237   
23238   
23239   
23240   
23241   
23242   
23243   
23244   
23245   
23246   
23247   
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289 # Check whether --with-xxinstall or --without-xxinstall was given.
23290 if test "${with_xxinstall+set}" = set; then
23291   withval="$with_xxinstall"
23292   :
23293 fi
23294
23295
23296
23297 trap '' 1 2 15
23298
23299 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23300
23301 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23302 # Let make expand exec_prefix.
23303 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23304
23305 # Any assignment to VPATH causes Sun make to only execute
23306 # the first set of double-colon rules, so remove it if not needed.
23307 # If there is a colon in the path, we need to keep it.
23308 if test "x$srcdir" = x.; then
23309   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23310 fi
23311
23312 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23313
23314 DEFS=-DHAVE_CONFIG_H
23315
23316 # Without the "./", some shells look in PATH for config.status.
23317 : ${CONFIG_STATUS=./config.status}
23318
23319 echo creating $CONFIG_STATUS
23320 rm -f $CONFIG_STATUS
23321 cat > $CONFIG_STATUS <<EOF
23322 #! /bin/sh
23323 # Generated automatically by configure.
23324 # Run this file to recreate the current configuration.
23325 # This directory was configured as follows,
23326 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23327 #
23328 # $0 $ac_configure_args
23329 #
23330 # Compiler output produced by configure, useful for debugging
23331 # configure, is in ./config.log if it exists.
23332
23333 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23334 for ac_option
23335 do
23336   case "\$ac_option" in
23337   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23338     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23339     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23340   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23341     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23342     exit 0 ;;
23343   -help | --help | --hel | --he | --h)
23344     echo "\$ac_cs_usage"; exit 0 ;;
23345   *) echo "\$ac_cs_usage"; exit 1 ;;
23346   esac
23347 done
23348
23349 ac_given_srcdir=$srcdir
23350 ac_given_INSTALL="$INSTALL"
23351
23352 trap 'rm -fr `echo "\
23353 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23354 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23355 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23356 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23357 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23358 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23359 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23360 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23361 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23362 include/Makefile:build/top.mk:include/Makefile.in \
23363 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23364 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23365 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23366 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23367 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23368 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23369 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23370 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23371 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23372 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23373 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23374 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23375 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23376 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23377 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23378 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23379 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23380 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23381 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23382 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23383 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23384 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23385 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23386 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23387 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23388 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23389 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23390 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23391 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23392 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23393  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23394 EOF
23395 cat >> $CONFIG_STATUS <<EOF
23396
23397 # Protect against being on the right side of a sed subst in config.status.
23398 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23399  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23400 $ac_vpsub
23401 $extrasub
23402 s%@SHELL@%$SHELL%g
23403 s%@CFLAGS@%$CFLAGS%g
23404 s%@CPPFLAGS@%$CPPFLAGS%g
23405 s%@CXXFLAGS@%$CXXFLAGS%g
23406 s%@FFLAGS@%$FFLAGS%g
23407 s%@DEFS@%$DEFS%g
23408 s%@LDFLAGS@%$LDFLAGS%g
23409 s%@LIBS@%$LIBS%g
23410 s%@exec_prefix@%$exec_prefix%g
23411 s%@prefix@%$prefix%g
23412 s%@program_transform_name@%$program_transform_name%g
23413 s%@bindir@%$bindir%g
23414 s%@sbindir@%$sbindir%g
23415 s%@libexecdir@%$libexecdir%g
23416 s%@datadir@%$datadir%g
23417 s%@sysconfdir@%$sysconfdir%g
23418 s%@sharedstatedir@%$sharedstatedir%g
23419 s%@localstatedir@%$localstatedir%g
23420 s%@libdir@%$libdir%g
23421 s%@includedir@%$includedir%g
23422 s%@oldincludedir@%$oldincludedir%g
23423 s%@infodir@%$infodir%g
23424 s%@mandir@%$mandir%g
23425 s%@host@%$host%g
23426 s%@host_alias@%$host_alias%g
23427 s%@host_cpu@%$host_cpu%g
23428 s%@host_vendor@%$host_vendor%g
23429 s%@host_os@%$host_os%g
23430 s%@target@%$target%g
23431 s%@target_alias@%$target_alias%g
23432 s%@target_cpu@%$target_cpu%g
23433 s%@target_vendor@%$target_vendor%g
23434 s%@target_os@%$target_os%g
23435 s%@build@%$build%g
23436 s%@build_alias@%$build_alias%g
23437 s%@build_cpu@%$build_cpu%g
23438 s%@build_vendor@%$build_vendor%g
23439 s%@build_os@%$build_os%g
23440 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23441 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23442 s%@INSTALL_DATA@%$INSTALL_DATA%g
23443 s%@PACKAGE@%$PACKAGE%g
23444 s%@VERSION@%$VERSION%g
23445 s%@ACLOCAL@%$ACLOCAL%g
23446 s%@AUTOCONF@%$AUTOCONF%g
23447 s%@AUTOMAKE@%$AUTOMAKE%g
23448 s%@AUTOHEADER@%$AUTOHEADER%g
23449 s%@MAKEINFO@%$MAKEINFO%g
23450 s%@install_sh@%$install_sh%g
23451 s%@AMTAR@%$AMTAR%g
23452 s%@AWK@%$AWK%g
23453 s%@AMTARFLAGS@%$AMTARFLAGS%g
23454 s%@SET_MAKE@%$SET_MAKE%g
23455 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23456 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23457 s%@top_builddir@%$top_builddir%g
23458 s%@ldap_subdir@%$ldap_subdir%g
23459 s%@CC@%$CC%g
23460 s%@AR@%$AR%g
23461 s%@LN_S@%$LN_S%g
23462 s%@OBJEXT@%$OBJEXT%g
23463 s%@EXEEXT@%$EXEEXT%g
23464 s%@ECHO@%$ECHO%g
23465 s%@RANLIB@%$RANLIB%g
23466 s%@STRIP@%$STRIP%g
23467 s%@DLLTOOL@%$DLLTOOL%g
23468 s%@AS@%$AS%g
23469 s%@OBJDUMP@%$OBJDUMP%g
23470 s%@CPP@%$CPP%g
23471 s%@LIBTOOL@%$LIBTOOL%g
23472 s%@LTSTATIC@%$LTSTATIC%g
23473 s%@LN_H@%$LN_H%g
23474 s%@PERLBIN@%$PERLBIN%g
23475 s%@OL_MKDEP@%$OL_MKDEP%g
23476 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23477 s%@LIBOBJS@%$LIBOBJS%g
23478 s%@LIBSRCS@%$LIBSRCS%g
23479 s%@PLAT@%$PLAT%g
23480 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23481 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23482 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23483 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23484 s%@BUILD_BDB@%$BUILD_BDB%g
23485 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23486 s%@BUILD_LDAP@%$BUILD_LDAP%g
23487 s%@BUILD_LDBM@%$BUILD_LDBM%g
23488 s%@BUILD_META@%$BUILD_META%g
23489 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23490 s%@BUILD_NULL@%$BUILD_NULL%g
23491 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23492 s%@BUILD_PERL@%$BUILD_PERL%g
23493 s%@BUILD_SHELL@%$BUILD_SHELL%g
23494 s%@BUILD_SQL@%$BUILD_SQL%g
23495 s%@BUILD_TCL@%$BUILD_TCL%g
23496 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23497 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23498 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23499 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23500 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23501 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23502 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23503 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23504 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23505 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23506 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23507 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23508 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23509 s%@LDAP_LIBS@%$LDAP_LIBS%g
23510 s%@LDIF_LIBS@%$LDIF_LIBS%g
23511 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23512 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23513 s%@LDBM_LIBS@%$LDBM_LIBS%g
23514 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23515 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23516 s%@WRAP_LIBS@%$WRAP_LIBS%g
23517 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23518 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23519 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23520 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23521 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23522 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23523 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23524 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23525 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23526 s%@KRB4_LIBS@%$KRB4_LIBS%g
23527 s%@KRB5_LIBS@%$KRB5_LIBS%g
23528 s%@READLINE_LIBS@%$READLINE_LIBS%g
23529 s%@SASL_LIBS@%$SASL_LIBS%g
23530 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23531 s%@TLS_LIBS@%$TLS_LIBS%g
23532 s%@MODULES_LIBS@%$MODULES_LIBS%g
23533 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23534 s%@LIBSLAPI@%$LIBSLAPI%g
23535 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23536 s%@AUTH_LIBS@%$AUTH_LIBS%g
23537 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23538 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23539 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23540 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23541
23542 CEOF
23543 EOF
23544
23545 cat >> $CONFIG_STATUS <<\EOF
23546
23547 # Split the substitutions into bite-sized pieces for seds with
23548 # small command number limits, like on Digital OSF/1 and HP-UX.
23549 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23550 ac_file=1 # Number of current file.
23551 ac_beg=1 # First line for current file.
23552 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23553 ac_more_lines=:
23554 ac_sed_cmds=""
23555 while $ac_more_lines; do
23556   if test $ac_beg -gt 1; then
23557     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23558   else
23559     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23560   fi
23561   if test ! -s conftest.s$ac_file; then
23562     ac_more_lines=false
23563     rm -f conftest.s$ac_file
23564   else
23565     if test -z "$ac_sed_cmds"; then
23566       ac_sed_cmds="sed -f conftest.s$ac_file"
23567     else
23568       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23569     fi
23570     ac_file=`expr $ac_file + 1`
23571     ac_beg=$ac_end
23572     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23573   fi
23574 done
23575 if test -z "$ac_sed_cmds"; then
23576   ac_sed_cmds=cat
23577 fi
23578 EOF
23579
23580 cat >> $CONFIG_STATUS <<EOF
23581
23582 CONFIG_FILES=\${CONFIG_FILES-"\
23583 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23584 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23585 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23586 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23587 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23588 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23589 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23590 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23591 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23592 include/Makefile:build/top.mk:include/Makefile.in \
23593 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23594 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23595 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23596 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23597 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23598 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23599 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23600 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23601 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23602 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23603 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23604 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23605 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23606 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23607 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23608 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23609 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23610 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23611 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23612 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23613 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23614 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23615 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23616 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23617 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23618 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23619 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23620 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23621 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23622 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23623 "}
23624 EOF
23625 cat >> $CONFIG_STATUS <<\EOF
23626 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23627   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23628   case "$ac_file" in
23629   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23630        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23631   *) ac_file_in="${ac_file}.in" ;;
23632   esac
23633
23634   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23635
23636   # Remove last slash and all that follows it.  Not all systems have dirname.
23637   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23638   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23639     # The file is in a subdirectory.
23640     test ! -d "$ac_dir" && mkdir "$ac_dir"
23641     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23642     # A "../" for each directory in $ac_dir_suffix.
23643     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23644   else
23645     ac_dir_suffix= ac_dots=
23646   fi
23647
23648   case "$ac_given_srcdir" in
23649   .)  srcdir=.
23650       if test -z "$ac_dots"; then top_srcdir=.
23651       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23652   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23653   *) # Relative path.
23654     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23655     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23656   esac
23657
23658   case "$ac_given_INSTALL" in
23659   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23660   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23661   esac
23662
23663   echo creating "$ac_file"
23664   rm -f "$ac_file"
23665   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23666   case "$ac_file" in
23667   *[Mm]akefile*) ac_comsub="1i\\
23668 # $configure_input" ;;
23669   *) ac_comsub= ;;
23670   esac
23671
23672   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23673   sed -e "$ac_comsub
23674 s%@configure_input@%$configure_input%g
23675 s%@srcdir@%$srcdir%g
23676 s%@top_srcdir@%$top_srcdir%g
23677 s%@INSTALL@%$INSTALL%g
23678 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23679 fi; done
23680 rm -f conftest.s*
23681
23682 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23683 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23684 #
23685 # ac_d sets the value in "#define NAME VALUE" lines.
23686 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23687 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23688 ac_dC='\3'
23689 ac_dD='%g'
23690 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23691 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23692 ac_uB='\([      ]\)%\1#\2define\3'
23693 ac_uC=' '
23694 ac_uD='\4%g'
23695 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23696 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23697 ac_eB='$%\1#\2define\3'
23698 ac_eC=' '
23699 ac_eD='%g'
23700
23701 if test "${CONFIG_HEADERS+set}" != set; then
23702 EOF
23703 cat >> $CONFIG_STATUS <<EOF
23704   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23705 EOF
23706 cat >> $CONFIG_STATUS <<\EOF
23707 fi
23708 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23709   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23710   case "$ac_file" in
23711   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23712        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23713   *) ac_file_in="${ac_file}.in" ;;
23714   esac
23715
23716   echo creating $ac_file
23717
23718   rm -f conftest.frag conftest.in conftest.out
23719   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23720   cat $ac_file_inputs > conftest.in
23721
23722 EOF
23723
23724 # Transform confdefs.h into a sed script conftest.vals that substitutes
23725 # the proper values into config.h.in to produce config.h.  And first:
23726 # Protect against being on the right side of a sed subst in config.status.
23727 # Protect against being in an unquoted here document in config.status.
23728 rm -f conftest.vals
23729 cat > conftest.hdr <<\EOF
23730 s/[\\&%]/\\&/g
23731 s%[\\$`]%\\&%g
23732 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23733 s%ac_d%ac_u%gp
23734 s%ac_u%ac_e%gp
23735 EOF
23736 sed -n -f conftest.hdr confdefs.h > conftest.vals
23737 rm -f conftest.hdr
23738
23739 # This sed command replaces #undef with comments.  This is necessary, for
23740 # example, in the case of _POSIX_SOURCE, which is predefined and required
23741 # on some systems where configure will not decide to define it.
23742 cat >> conftest.vals <<\EOF
23743 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23744 EOF
23745
23746 # Break up conftest.vals because some shells have a limit on
23747 # the size of here documents, and old seds have small limits too.
23748
23749 rm -f conftest.tail
23750 while :
23751 do
23752   ac_lines=`grep -c . conftest.vals`
23753   # grep -c gives empty output for an empty file on some AIX systems.
23754   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23755   # Write a limited-size here document to conftest.frag.
23756   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23757   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23758   echo 'CEOF
23759   sed -f conftest.frag conftest.in > conftest.out
23760   rm -f conftest.in
23761   mv conftest.out conftest.in
23762 ' >> $CONFIG_STATUS
23763   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23764   rm -f conftest.vals
23765   mv conftest.tail conftest.vals
23766 done
23767 rm -f conftest.vals
23768
23769 cat >> $CONFIG_STATUS <<\EOF
23770   rm -f conftest.frag conftest.h
23771   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23772   cat conftest.in >> conftest.h
23773   rm -f conftest.in
23774   if cmp -s $ac_file conftest.h 2>/dev/null; then
23775     echo "$ac_file is unchanged"
23776     rm -f conftest.h
23777   else
23778     # Remove last slash and all that follows it.  Not all systems have dirname.
23779       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23780       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23781       # The file is in a subdirectory.
23782       test ! -d "$ac_dir" && mkdir "$ac_dir"
23783     fi
23784     rm -f $ac_file
23785     mv conftest.h $ac_file
23786   fi
23787 fi; done
23788
23789 EOF
23790 cat >> $CONFIG_STATUS <<EOF
23791
23792 EOF
23793 cat >> $CONFIG_STATUS <<\EOF
23794
23795 date > stamp-h
23796 echo Please run \"make depend\" to build dependencies
23797
23798 exit 0
23799 EOF
23800 chmod +x $CONFIG_STATUS
23801 rm -fr confdefs* $ac_clean_files
23802 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23803