]> git.sur5r.net Git - openldap/blob - configure
Use ldap_whoami_s(3)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.444 2002/11/09 16:03:07 ando Exp  
4
5 # Copyright 1998-2002 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-2002 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-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-ipv6           enable IPv6 support [auto]"
42 ac_help="$ac_help
43   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
44 ac_help="$ac_help
45   --enable-x-compile      enable cross compiling [no]"
46 ac_help="$ac_help
47   --with-cyrus-sasl       with Cyrus SASL support [auto]"
48 ac_help="$ac_help
49   --with-fetch            with freeBSD fetch URL support [auto]"
50 ac_help="$ac_help
51   --with-kerberos         with Kerberos support [auto]"
52 ac_help="$ac_help
53   --with-readline         with readline support [auto]"
54 ac_help="$ac_help
55   --with-threads          with threads [auto]"
56 ac_help="$ac_help
57   --with-tls              with TLS/SSL support [auto]"
58 ac_help="$ac_help
59   --with-yielding-select  with implicitly yielding select [auto]"
60 ac_help="$ac_help
61
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd [yes]"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
85 ac_help="$ac_help
86     --enable-rlookups     enable reverse lookups of client hostnames [no]"
87 ac_help="$ac_help
88     --enable-slp          enable SLPv2 support [no]"
89 ac_help="$ac_help
90     --enable-wrappers     enable tcp wrapper support [no]"
91 ac_help="$ac_help
92     --enable-bdb          enable Berkeley DB backend [yes]"
93 ac_help="$ac_help
94     --with-bdb-module     module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend [no]"
97 ac_help="$ac_help
98     --with-dnssrv-module  module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend [no]"
101 ac_help="$ac_help
102     --with-ldap-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --enable-ldbm         enable ldbm backend [no]"
105 ac_help="$ac_help
106     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
107 ac_help="$ac_help
108     --with-ldbm-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
111 ac_help="$ac_help
112     --enable-meta         enable metadirectory backend [no]"
113 ac_help="$ac_help
114     --with-meta-module    module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-monitor      enable monitor backend [no]"
117 ac_help="$ac_help
118     --with-monitor-module module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-null         enable null backend [no]"
121 ac_help="$ac_help
122     --with-null-module    module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-passwd       enable passwd backend [no]"
125 ac_help="$ac_help
126     --with-passwd-module  module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-perl         enable perl backend [no]"
129 ac_help="$ac_help
130     --with-perl-module    module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-shell        enable shell backend [no]"
133 ac_help="$ac_help
134     --with-shell-module   module type static|dynamic [static]"
135 ac_help="$ac_help
136     --enable-sql          enable sql backend [no]"
137 ac_help="$ac_help
138     --with-sql-module     module type static|dynamic [static]"
139 ac_help="$ac_help
140     --enable-tcl          enable tcl backend [no]"
141 ac_help="$ac_help
142     --with-tcl-module     module type static|dynamic [static]"
143 ac_help="$ac_help
144
145 SLURPD (Replication Daemon) Options:"
146 ac_help="$ac_help
147   --enable-slurpd         enable building slurpd [auto]"
148 ac_help="$ac_help
149
150 Library Generation & Linking Options"
151 ac_help="$ac_help
152   --enable-static[=PKGS]  build static libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-shared[=PKGS]  build shared libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
157 ac_help="$ac_help
158   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
159
160 # Find the correct PATH separator.  Usually this is `:', but
161 # DJGPP uses `;' like DOS.
162 if test "X${PATH_SEPARATOR+set}" != Xset; then
163   UNAME=${UNAME-`uname 2>/dev/null`}
164   case X$UNAME in
165     *-DOS) lt_cv_sys_path_separator=';' ;;
166     *)     lt_cv_sys_path_separator=':' ;;
167   esac
168   PATH_SEPARATOR=$lt_cv_sys_path_separator
169 fi
170
171
172 # Check that we are running under the correct shell.
173 SHELL=${CONFIG_SHELL-/bin/sh}
174
175 case X$ECHO in
176 X*--fallback-echo)
177   # Remove one level of quotation (which was required for Make).
178   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
179   ;;
180 esac
181
182 echo=${ECHO-echo}
183 if test "X$1" = X--no-reexec; then
184   # Discard the --no-reexec flag, and continue.
185   shift
186 elif test "X$1" = X--fallback-echo; then
187   # Avoid inline document here, it may be left over
188   :
189 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
190   # Yippee, $echo works!
191   :
192 else
193   # Restart under the correct shell.
194   exec $SHELL "$0" --no-reexec ${1+"$@"}
195 fi
196
197 if test "X$1" = X--fallback-echo; then
198   # used as fallback echo
199   shift
200   cat <<EOF
201
202 EOF
203   exit 0
204 fi
205
206 # The HP-UX ksh and POSIX shell print the target directory to stdout
207 # if CDPATH is set.
208 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
209
210 if test -z "$ECHO"; then
211 if test "X${echo_test_string+set}" != Xset; then
212 # find a string as large as possible, as long as the shell can cope with it
213   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
214     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
215     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
216        echo_test_string="`eval $cmd`" &&
217        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
218     then
219       break
220     fi
221   done
222 fi
223
224 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
225    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
226    test "X$echo_testing_string" = "X$echo_test_string"; then
227   :
228 else
229   # The Solaris, AIX, and Digital Unix default echo programs unquote
230   # backslashes.  This makes it impossible to quote backslashes using
231   #   echo "$something" | sed 's/\\/\\\\/g'
232   #
233   # So, first we look for a working echo in the user's PATH.
234
235   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236   for dir in $PATH /usr/ucb; do
237     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
238        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
239        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
240        test "X$echo_testing_string" = "X$echo_test_string"; then
241       echo="$dir/echo"
242       break
243     fi
244   done
245   IFS="$save_ifs"
246
247   if test "X$echo" = Xecho; then
248     # We didn't find a better echo, so look for alternatives.
249     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       # This shell has a builtin print -r that does the trick.
253       echo='print -r'
254     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
255          test "X$CONFIG_SHELL" != X/bin/ksh; then
256       # If we have ksh, try running configure again with it.
257       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
258       export ORIGINAL_CONFIG_SHELL
259       CONFIG_SHELL=/bin/ksh
260       export CONFIG_SHELL
261       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
262     else
263       # Try using printf.
264       echo='printf %s\n'
265       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
266          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
267          test "X$echo_testing_string" = "X$echo_test_string"; then
268         # Cool, printf works
269         :
270       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
275         export CONFIG_SHELL
276         SHELL="$CONFIG_SHELL"
277         export SHELL
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       else
285         # maybe with a smaller string...
286         prev=:
287
288         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
289           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
290           then
291             break
292           fi
293           prev="$cmd"
294         done
295
296         if test "$prev" != 'sed 50q "$0"'; then
297           echo_test_string=`eval $prev`
298           export echo_test_string
299           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
300         else
301           # Oops.  We lost completely, so just stick with echo.
302           echo=echo
303         fi
304       fi
305     fi
306   fi
307 fi
308 fi
309
310 # Copy echo and quote the copy suitably for passing to libtool from
311 # the Makefile, instead of quoting the original, which is used later.
312 ECHO=$echo
313 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
314    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
315 fi
316
317
318 ac_help="$ac_help
319   --disable-libtool-lock  avoid locking (might break parallel builds)"
320 ac_help="$ac_help
321   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
322 ac_help="$ac_help
323
324 See INSTALL file for further details."
325
326 # Initialize some variables set by options.
327 # The variables have the same names as the options, with
328 # dashes changed to underlines.
329 build=NONE
330 cache_file=./config.cache
331 exec_prefix=NONE
332 host=NONE
333 no_create=
334 nonopt=NONE
335 no_recursion=
336 prefix=NONE
337 program_prefix=NONE
338 program_suffix=NONE
339 program_transform_name=s,x,x,
340 silent=
341 site=
342 srcdir=
343 target=NONE
344 verbose=
345 x_includes=NONE
346 x_libraries=NONE
347 bindir='${exec_prefix}/bin'
348 sbindir='${exec_prefix}/sbin'
349 libexecdir='${exec_prefix}/libexec'
350 datadir='${prefix}/share'
351 sysconfdir='${prefix}/etc'
352 sharedstatedir='${prefix}/com'
353 localstatedir='${prefix}/var'
354 libdir='${exec_prefix}/lib'
355 includedir='${prefix}/include'
356 oldincludedir='/usr/include'
357 infodir='${prefix}/info'
358 mandir='${prefix}/man'
359
360 # Initialize some other variables.
361 subdirs=
362 MFLAGS= MAKEFLAGS=
363 SHELL=${CONFIG_SHELL-/bin/sh}
364 # Maximum number of lines to put in a shell here document.
365 ac_max_here_lines=12
366
367 ac_prev=
368 for ac_option
369 do
370
371   # If the previous option needs an argument, assign it.
372   if test -n "$ac_prev"; then
373     eval "$ac_prev=\$ac_option"
374     ac_prev=
375     continue
376   fi
377
378   case "$ac_option" in
379   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
380   *) ac_optarg= ;;
381   esac
382
383   # Accept the important Cygnus configure options, so we can diagnose typos.
384
385   case "$ac_option" in
386
387   -bindir | --bindir | --bindi | --bind | --bin | --bi)
388     ac_prev=bindir ;;
389   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
390     bindir="$ac_optarg" ;;
391
392   -build | --build | --buil | --bui | --bu)
393     ac_prev=build ;;
394   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
395     build="$ac_optarg" ;;
396
397   -cache-file | --cache-file | --cache-fil | --cache-fi \
398   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
399     ac_prev=cache_file ;;
400   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
401   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
402     cache_file="$ac_optarg" ;;
403
404   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
405     ac_prev=datadir ;;
406   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
407   | --da=*)
408     datadir="$ac_optarg" ;;
409
410   -disable-* | --disable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     eval "enable_${ac_feature}=no" ;;
418
419   -enable-* | --enable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     case "$ac_option" in
427       *=*) ;;
428       *) ac_optarg=yes ;;
429     esac
430     eval "enable_${ac_feature}='$ac_optarg'" ;;
431
432   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
433   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
434   | --exec | --exe | --ex)
435     ac_prev=exec_prefix ;;
436   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
437   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
438   | --exec=* | --exe=* | --ex=*)
439     exec_prefix="$ac_optarg" ;;
440
441   -gas | --gas | --ga | --g)
442     # Obsolete; use --with-gas.
443     with_gas=yes ;;
444
445   -help | --help | --hel | --he)
446     # Omit some internal or obsolete options to make the list less imposing.
447     # This message is too long to be a string in the A/UX 3.1 sh.
448     cat << EOF
449 Usage: configure [options] [host]
450 Options: [defaults in brackets after descriptions]
451 Configuration:
452   --cache-file=FILE       cache test results in FILE
453   --help                  print this message
454   --no-create             do not create output files
455   --quiet, --silent       do not print \`checking...' messages
456   --version               print the version of autoconf that created configure
457 Directory and file names:
458   --prefix=PREFIX         install architecture-independent files in PREFIX
459                           [$ac_default_prefix]
460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
461                           [same as prefix]
462   --bindir=DIR            user executables in DIR [EPREFIX/bin]
463   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
464   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
465   --datadir=DIR           read-only architecture-independent data in DIR
466                           [PREFIX/share]
467   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
468   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
469                           [PREFIX/com]
470   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
471   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
472   --includedir=DIR        C header files in DIR [PREFIX/include]
473   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
474   --infodir=DIR           info documentation in DIR [PREFIX/info]
475   --mandir=DIR            man documentation in DIR [PREFIX/man]
476   --srcdir=DIR            find the sources in DIR [configure dir or ..]
477   --program-prefix=PREFIX prepend PREFIX to installed program names
478   --program-suffix=SUFFIX append SUFFIX to installed program names
479   --program-transform-name=PROGRAM
480                           run sed PROGRAM on installed program names
481 EOF
482     cat << EOF
483 Host type:
484   --build=BUILD           configure for building on BUILD [BUILD=HOST]
485   --host=HOST             configure for HOST [guessed]
486   --target=TARGET         configure for TARGET [TARGET=HOST]
487 Features and packages:
488   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
489   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
492   --x-includes=DIR        X include files are in DIR
493   --x-libraries=DIR       X library files are in DIR
494 EOF
495     if test -n "$ac_help"; then
496       echo "--enable and --with options recognized:$ac_help"
497     fi
498     exit 0 ;;
499
500   -host | --host | --hos | --ho)
501     ac_prev=host ;;
502   -host=* | --host=* | --hos=* | --ho=*)
503     host="$ac_optarg" ;;
504
505   -includedir | --includedir | --includedi | --included | --include \
506   | --includ | --inclu | --incl | --inc)
507     ac_prev=includedir ;;
508   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
509   | --includ=* | --inclu=* | --incl=* | --inc=*)
510     includedir="$ac_optarg" ;;
511
512   -infodir | --infodir | --infodi | --infod | --info | --inf)
513     ac_prev=infodir ;;
514   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
515     infodir="$ac_optarg" ;;
516
517   -libdir | --libdir | --libdi | --libd)
518     ac_prev=libdir ;;
519   -libdir=* | --libdir=* | --libdi=* | --libd=*)
520     libdir="$ac_optarg" ;;
521
522   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
523   | --libexe | --libex | --libe)
524     ac_prev=libexecdir ;;
525   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
526   | --libexe=* | --libex=* | --libe=*)
527     libexecdir="$ac_optarg" ;;
528
529   -localstatedir | --localstatedir | --localstatedi | --localstated \
530   | --localstate | --localstat | --localsta | --localst \
531   | --locals | --local | --loca | --loc | --lo)
532     ac_prev=localstatedir ;;
533   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
534   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
535   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
536     localstatedir="$ac_optarg" ;;
537
538   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
539     ac_prev=mandir ;;
540   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
541     mandir="$ac_optarg" ;;
542
543   -nfp | --nfp | --nf)
544     # Obsolete; use --without-fp.
545     with_fp=no ;;
546
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c)
549     no_create=yes ;;
550
551   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
552   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
553     no_recursion=yes ;;
554
555   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
556   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
557   | --oldin | --oldi | --old | --ol | --o)
558     ac_prev=oldincludedir ;;
559   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
560   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
561   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
562     oldincludedir="$ac_optarg" ;;
563
564   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
565     ac_prev=prefix ;;
566   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
567     prefix="$ac_optarg" ;;
568
569   -program-prefix | --program-prefix | --program-prefi | --program-pref \
570   | --program-pre | --program-pr | --program-p)
571     ac_prev=program_prefix ;;
572   -program-prefix=* | --program-prefix=* | --program-prefi=* \
573   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
574     program_prefix="$ac_optarg" ;;
575
576   -program-suffix | --program-suffix | --program-suffi | --program-suff \
577   | --program-suf | --program-su | --program-s)
578     ac_prev=program_suffix ;;
579   -program-suffix=* | --program-suffix=* | --program-suffi=* \
580   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
581     program_suffix="$ac_optarg" ;;
582
583   -program-transform-name | --program-transform-name \
584   | --program-transform-nam | --program-transform-na \
585   | --program-transform-n | --program-transform- \
586   | --program-transform | --program-transfor \
587   | --program-transfo | --program-transf \
588   | --program-trans | --program-tran \
589   | --progr-tra | --program-tr | --program-t)
590     ac_prev=program_transform_name ;;
591   -program-transform-name=* | --program-transform-name=* \
592   | --program-transform-nam=* | --program-transform-na=* \
593   | --program-transform-n=* | --program-transform-=* \
594   | --program-transform=* | --program-transfor=* \
595   | --program-transfo=* | --program-transf=* \
596   | --program-trans=* | --program-tran=* \
597   | --progr-tra=* | --program-tr=* | --program-t=*)
598     program_transform_name="$ac_optarg" ;;
599
600   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
601   | -silent | --silent | --silen | --sile | --sil)
602     silent=yes ;;
603
604   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
605     ac_prev=sbindir ;;
606   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
607   | --sbi=* | --sb=*)
608     sbindir="$ac_optarg" ;;
609
610   -sharedstatedir | --sharedstatedir | --sharedstatedi \
611   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
612   | --sharedst | --shareds | --shared | --share | --shar \
613   | --sha | --sh)
614     ac_prev=sharedstatedir ;;
615   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
616   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
617   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
618   | --sha=* | --sh=*)
619     sharedstatedir="$ac_optarg" ;;
620
621   -site | --site | --sit)
622     ac_prev=site ;;
623   -site=* | --site=* | --sit=*)
624     site="$ac_optarg" ;;
625
626   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
627     ac_prev=srcdir ;;
628   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
629     srcdir="$ac_optarg" ;;
630
631   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
632   | --syscon | --sysco | --sysc | --sys | --sy)
633     ac_prev=sysconfdir ;;
634   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
635   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
636     sysconfdir="$ac_optarg" ;;
637
638   -target | --target | --targe | --targ | --tar | --ta | --t)
639     ac_prev=target ;;
640   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
641     target="$ac_optarg" ;;
642
643   -v | -verbose | --verbose | --verbos | --verbo | --verb)
644     verbose=yes ;;
645
646   -version | --version | --versio | --versi | --vers)
647     echo "configure generated by autoconf version 2.13.1"
648     exit 0 ;;
649
650   -with-* | --with-*)
651     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
652     # Reject names that are not valid shell variable names.
653     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
654       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
655     fi
656     ac_package=`echo $ac_package| sed 's/-/_/g'`
657     case "$ac_option" in
658       *=*) ;;
659       *) ac_optarg=yes ;;
660     esac
661     eval "with_${ac_package}='$ac_optarg'" ;;
662
663   -without-* | --without-*)
664     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     eval "with_${ac_package}=no" ;;
671
672   --x)
673     # Obsolete; use --with-x.
674     with_x=yes ;;
675
676   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
677   | --x-incl | --x-inc | --x-in | --x-i)
678     ac_prev=x_includes ;;
679   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
680   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
681     x_includes="$ac_optarg" ;;
682
683   -x-libraries | --x-libraries | --x-librarie | --x-librari \
684   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
685     ac_prev=x_libraries ;;
686   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
687   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
688     x_libraries="$ac_optarg" ;;
689
690   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
691     ;;
692
693   *)
694     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
695       echo "configure: warning: $ac_option: invalid host type" 1>&2
696     fi
697     if test "x$nonopt" != xNONE; then
698       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
699     fi
700     nonopt="$ac_option"
701     ;;
702
703   esac
704 done
705
706 if test -n "$ac_prev"; then
707   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
708 fi
709
710 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
711
712 # File descriptor usage:
713 # 0 standard input
714 # 1 file creation
715 # 2 errors and warnings
716 # 3 some systems may open it to /dev/tty
717 # 4 used on the Kubota Titan
718 # 6 checking for... messages and results
719 # 5 compiler messages saved in config.log
720 if test "$silent" = yes; then
721   exec 6>/dev/null
722 else
723   exec 6>&1
724 fi
725 exec 5>./config.log
726
727 echo "\
728 This file contains any messages produced by compilers while
729 running configure, to aid debugging if configure makes a mistake.
730 " 1>&5
731
732 # Strip out --no-create and --no-recursion so they do not pile up.
733 # Also quote any args containing shell metacharacters.
734 ac_configure_args=
735 for ac_arg
736 do
737   case "$ac_arg" in
738   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
739   | --no-cr | --no-c) ;;
740   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
741   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
742   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
743   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
744   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
745   esac
746 done
747
748 # NLS nuisances.
749 # Only set these to C if already set.  These must not be set unconditionally
750 # because not all systems understand e.g. LANG=C (notably SCO).
751 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
752 # Non-C LC_CTYPE values break the ctype check.
753 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
754 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
755 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
756 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
757
758 # confdefs.h avoids OS command line length limits that DEFS can exceed.
759 rm -rf conftest* confdefs.h
760 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
761 echo > confdefs.h
762
763 # A filename unique to this package, relative to the directory that
764 # configure is in, which we can look for to find out if srcdir is correct.
765 ac_unique_file=build/version.sh
766
767 # Find the source files, if location was not specified.
768 if test -z "$srcdir"; then
769   ac_srcdir_defaulted=yes
770   # Try the directory containing this script, then its parent.
771   ac_prog=$0
772   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
773   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
774   srcdir=$ac_confdir
775   if test ! -r $srcdir/$ac_unique_file; then
776     srcdir=..
777   fi
778 else
779   ac_srcdir_defaulted=no
780 fi
781 if test ! -r $srcdir/$ac_unique_file; then
782   if test "$ac_srcdir_defaulted" = yes; then
783     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
784   else
785     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
786   fi
787 fi
788 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
789
790 # Prefer explicitly selected file to automatically selected ones.
791 if test -z "$CONFIG_SITE"; then
792   if test "x$prefix" != xNONE; then
793     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
794   else
795     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
796   fi
797 fi
798 for ac_site_file in $CONFIG_SITE; do
799   if test -r "$ac_site_file"; then
800     echo "loading site script $ac_site_file"
801     . "$ac_site_file"
802   fi
803 done
804
805
806 ac_ext=c
807 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808 ac_cpp='$CPP $CPPFLAGS'
809 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811 cross_compiling=$ac_cv_prog_cc_cross
812
813 ac_exeext=
814 ac_objext=o
815 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
816   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
817   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
818     ac_n= ac_c='
819 ' ac_t='        '
820   else
821     ac_n=-n ac_c= ac_t=
822   fi
823 else
824   ac_n= ac_c='\c' ac_t=
825 fi
826
827
828 # set unset (borrowed from autoconf 2.49c)
829 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
830   ol_unset=unset
831 else
832   ol_unset=false
833 fi
834 # unset CDPATH
835 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
836
837 ac_aux_dir=
838 for ac_dir in build $srcdir/build; do
839   if test -f $ac_dir/install-sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install-sh -c"
842     break
843   elif test -f $ac_dir/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   elif test -f $ac_dir/shtool; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/shtool install -c"
850     break
851   fi
852 done
853 if test -z "$ac_aux_dir"; then
854   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
855 fi
856 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
857 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
858 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
859
860 eval `$ac_aux_dir/version.sh`
861 if test -z "$OL_STRING"; then
862         { echo "configure: error: could not determine version" 1>&2; exit 1; }
863 fi
864
865 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
866         ac_cv_shtool="$ac_aux_dir/shtool"
867 else
868         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
869 fi
870
871 SHTOOL="$ac_cv_shtool"
872
873 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
874 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
875
876 OPENLDAP_CVS=""
877 if test -d $ac_aux_dir/CVS; then
878         OPENLDAP_CVS="(from CVS sources) "
879 fi
880
881 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
882
883
884 echo $ac_n "checking host system type""... $ac_c" 1>&6
885 echo "configure:886: checking host system type" >&5
886 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
887
888 # Make sure we can run config.sub.
889   if $ac_config_sub sun4 >/dev/null 2>&1; then :
890     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
891   fi
892
893   ac_cv_host_alias=$host
894   case "$ac_cv_host_alias" in
895   NONE)
896     case $nonopt in
897     NONE)
898       if ac_cv_host_alias=`$ac_config_guess`; then :
899       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
900       fi ;;
901     *) ac_cv_host_alias=$nonopt ;;
902     esac ;;
903   esac
904
905   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
906   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
907   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
908   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
909 else
910   echo $ac_n "(cached) $ac_c" 1>&6
911 fi
912
913 echo "$ac_t""$ac_cv_host" 1>&6
914
915 host=$ac_cv_host
916 host_alias=$ac_cv_host_alias
917 host_cpu=$ac_cv_host_cpu
918 host_vendor=$ac_cv_host_vendor
919 host_os=$ac_cv_host_os
920
921
922
923
924
925 echo $ac_n "checking target system type""... $ac_c" 1>&6
926 echo "configure:927: checking target system type" >&5
927 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
928
929 # Make sure we can run config.sub.
930   if $ac_config_sub sun4 >/dev/null 2>&1; then :
931     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
932   fi
933
934   ac_cv_target_alias=$target
935   case "$ac_cv_target_alias" in
936   NONE)
937     case $nonopt in
938     NONE)
939       ac_cv_target_alias=$host_alias ;;
940
941     *) ac_cv_target_alias=$nonopt ;;
942     esac ;;
943   esac
944
945   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
946   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
947   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
948   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
949 else
950   echo $ac_n "(cached) $ac_c" 1>&6
951 fi
952
953 echo "$ac_t""$ac_cv_target" 1>&6
954
955 target=$ac_cv_target
956 target_alias=$ac_cv_target_alias
957 target_cpu=$ac_cv_target_cpu
958 target_vendor=$ac_cv_target_vendor
959 target_os=$ac_cv_target_os
960
961
962
963
964
965 echo $ac_n "checking build system type""... $ac_c" 1>&6
966 echo "configure:967: checking build system type" >&5
967 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
968
969 # Make sure we can run config.sub.
970   if $ac_config_sub sun4 >/dev/null 2>&1; then :
971     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
972   fi
973
974   ac_cv_build_alias=$build
975   case "$ac_cv_build_alias" in
976   NONE)
977     case $nonopt in
978     NONE)
979       ac_cv_build_alias=$host_alias ;;
980
981     *) ac_cv_build_alias=$nonopt ;;
982     esac ;;
983   esac
984
985   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
986   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
987   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
988   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
989 else
990   echo $ac_n "(cached) $ac_c" 1>&6
991 fi
992
993 echo "$ac_t""$ac_cv_build" 1>&6
994
995 build=$ac_cv_build
996 build_alias=$ac_cv_build_alias
997 build_cpu=$ac_cv_build_cpu
998 build_vendor=$ac_cv_build_vendor
999 build_os=$ac_cv_build_os
1000
1001
1002
1003
1004
1005 # Do some error checking and defaulting for the host and target type.
1006 # The inputs are:
1007 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1008 #
1009 # The rules are:
1010 # 1. You are not allowed to specify --host, --target, and nonopt at the
1011 #    same time.
1012 # 2. Host defaults to nonopt.
1013 # 3. If nonopt is not specified, then host defaults to the current host,
1014 #    as determined by config.guess.
1015 # 4. Target and build default to nonopt.
1016 # 5. If nonopt is not specified, then target and build default to host.
1017
1018 # The aliases save the names the user supplied, while $host etc.
1019 # will get canonicalized.
1020 case $host---$target---$nonopt in
1021 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1022 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1023 esac
1024
1025 test "$host_alias" != "$target_alias" &&
1026   test "$program_prefix$program_suffix$program_transform_name" = \
1027     NONENONEs,x,x, &&
1028   program_prefix=${target_alias}-
1029
1030
1031 # Find a good install program.  We prefer a C program (faster),
1032 # so one script is as good as another.  But avoid the broken or
1033 # incompatible versions:
1034 # SysV /etc/install, /usr/sbin/install
1035 # SunOS /usr/etc/install
1036 # IRIX /sbin/install
1037 # AIX /bin/install
1038 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1039 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1040 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1041 # ./install, which can be erroneously created by make from ./install.sh.
1042 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1043 echo "configure:1044: checking for a BSD compatible install" >&5
1044 if test -z "$INSTALL"; then
1045 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1046   echo $ac_n "(cached) $ac_c" 1>&6
1047 else
1048     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1049   for ac_dir in $PATH; do
1050     # Account for people who put trailing slashes in PATH elements.
1051     case "$ac_dir/" in
1052     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1053     *)
1054       # OSF1 and SCO ODT 3.0 have their own names for install.
1055       # Don't use installbsd from OSF since it installs stuff as root
1056       # by default.
1057       for ac_prog in ginstall scoinst install; do
1058         if test -f $ac_dir/$ac_prog; then
1059           if test $ac_prog = install &&
1060             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1061             # AIX install.  It has an incompatible calling convention.
1062             :
1063           elif test $ac_prog = install &&
1064             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1065             # program-specific install script used by HP pwplus--don't use.
1066             :
1067           else
1068             ac_cv_path_install="$ac_dir/$ac_prog -c"
1069             break 2
1070           fi
1071         fi
1072       done
1073       ;;
1074     esac
1075   done
1076   IFS="$ac_save_IFS"
1077
1078 fi
1079   if test "${ac_cv_path_install+set}" = set; then
1080     INSTALL="$ac_cv_path_install"
1081   else
1082     # As a last resort, use the slow shell script.  We don't cache a
1083     # path for INSTALL within a source directory, because that will
1084     # break other packages using the cache if that directory is
1085     # removed, or if the path is relative.
1086     INSTALL="$ac_install_sh"
1087   fi
1088 fi
1089 echo "$ac_t""$INSTALL" 1>&6
1090
1091 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1092 # It thinks the first close brace ends the variable substitution.
1093 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1094
1095 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1096
1097 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1098
1099 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1100 echo "configure:1101: checking whether build environment is sane" >&5
1101 # Just in case
1102 sleep 1
1103 echo timestamp > conftestfile
1104 # Do `set' in a subshell so we don't clobber the current shell's
1105 # arguments.  Must try -L first in case configure is actually a
1106 # symlink; some systems play weird games with the mod time of symlinks
1107 # (eg FreeBSD returns the mod time of the symlink's containing
1108 # directory).
1109 if (
1110    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1111    if test "$*" = "X"; then
1112       # -L didn't work.
1113       set X `ls -t $srcdir/configure conftestfile`
1114    fi
1115    if test "$*" != "X $srcdir/configure conftestfile" \
1116       && test "$*" != "X conftestfile $srcdir/configure"; then
1117
1118       # If neither matched, then we have a broken ls.  This can happen
1119       # if, for instance, CONFIG_SHELL is bash and it inherits a
1120       # broken ls alias from the environment.  This has actually
1121       # happened.  Such a system could not be considered "sane".
1122       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1123 alias in your environment" 1>&2; exit 1; }
1124    fi
1125
1126    test "$2" = conftestfile
1127    )
1128 then
1129    # Ok.
1130    :
1131 else
1132    { echo "configure: error: newly created file is older than distributed files!
1133 Check your system clock" 1>&2; exit 1; }
1134 fi
1135 rm -f conftest*
1136 echo "$ac_t""yes" 1>&6
1137 if test "$program_transform_name" = s,x,x,; then
1138   program_transform_name=
1139 else
1140   # Double any \ or $.  echo might interpret backslashes.
1141   cat <<\EOF_SED > conftestsed
1142 s,\\,\\\\,g; s,\$,$$,g
1143 EOF_SED
1144   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1145   rm -f conftestsed
1146 fi
1147 test "$program_prefix" != NONE &&
1148   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1149 # Use a double $ so make ignores it.
1150 test "$program_suffix" != NONE &&
1151   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1152
1153 # sed with no file args requires a program.
1154 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1155
1156 for ac_prog in mawk gawk nawk awk
1157 do
1158 # Extract the first word of "$ac_prog", so it can be a program name with args.
1159 set dummy $ac_prog; ac_word=$2
1160 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1161 echo "configure:1162: checking for $ac_word" >&5
1162 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1163   echo $ac_n "(cached) $ac_c" 1>&6
1164 else
1165   if test -n "$AWK"; then
1166   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1167 else
1168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1169   ac_dummy="$PATH"
1170   for ac_dir in $ac_dummy; do
1171     test -z "$ac_dir" && ac_dir=.
1172     if test -f $ac_dir/$ac_word; then
1173       ac_cv_prog_AWK="$ac_prog"
1174       break
1175     fi
1176   done
1177   IFS="$ac_save_ifs"
1178 fi
1179 fi
1180 AWK="$ac_cv_prog_AWK"
1181 if test -n "$AWK"; then
1182   echo "$ac_t""$AWK" 1>&6
1183 else
1184   echo "$ac_t""no" 1>&6
1185 fi
1186
1187 test -n "$AWK" && break
1188 done
1189
1190 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1191 echo "configure:1192: checking whether ${MAKE-make} sets \${MAKE}" >&5
1192 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1193 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1194   echo $ac_n "(cached) $ac_c" 1>&6
1195 else
1196   cat > conftestmake <<\EOF
1197 all:
1198         @echo 'ac_maketemp="${MAKE}"'
1199 EOF
1200 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1201 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1202 if test -n "$ac_maketemp"; then
1203   eval ac_cv_prog_make_${ac_make}_set=yes
1204 else
1205   eval ac_cv_prog_make_${ac_make}_set=no
1206 fi
1207 rm -f conftestmake
1208 fi
1209 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1210   echo "$ac_t""yes" 1>&6
1211   SET_MAKE=
1212 else
1213   echo "$ac_t""no" 1>&6
1214   SET_MAKE="MAKE=${MAKE-make}"
1215 fi
1216
1217
1218
1219 PACKAGE=$OL_PACKAGE
1220
1221 VERSION=$OL_VERSION
1222
1223 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1224   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1225 fi
1226
1227
1228
1229 missing_dir=`cd $ac_aux_dir && pwd`
1230 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1231 echo "configure:1232: checking for working aclocal" >&5
1232 # Run test in a subshell; some versions of sh will print an error if
1233 # an executable is not found, even if stderr is redirected.
1234 # Redirect stdin to placate older versions of autoconf.  Sigh.
1235 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1236    ACLOCAL=aclocal
1237    echo "$ac_t""found" 1>&6
1238 else
1239    ACLOCAL="$missing_dir/missing aclocal"
1240    echo "$ac_t""missing" 1>&6
1241 fi
1242
1243 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1244 echo "configure:1245: checking for working autoconf" >&5
1245 # Run test in a subshell; some versions of sh will print an error if
1246 # an executable is not found, even if stderr is redirected.
1247 # Redirect stdin to placate older versions of autoconf.  Sigh.
1248 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1249    AUTOCONF=autoconf
1250    echo "$ac_t""found" 1>&6
1251 else
1252    AUTOCONF="$missing_dir/missing autoconf"
1253    echo "$ac_t""missing" 1>&6
1254 fi
1255
1256 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1257 echo "configure:1258: checking for working automake" >&5
1258 # Run test in a subshell; some versions of sh will print an error if
1259 # an executable is not found, even if stderr is redirected.
1260 # Redirect stdin to placate older versions of autoconf.  Sigh.
1261 if (automake --version) < /dev/null > /dev/null 2>&1; then
1262    AUTOMAKE=automake
1263    echo "$ac_t""found" 1>&6
1264 else
1265    AUTOMAKE="$missing_dir/missing automake"
1266    echo "$ac_t""missing" 1>&6
1267 fi
1268
1269 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working autoheader" >&5
1271 # Run test in a subshell; some versions of sh will print an error if
1272 # an executable is not found, even if stderr is redirected.
1273 # Redirect stdin to placate older versions of autoconf.  Sigh.
1274 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1275    AUTOHEADER=autoheader
1276    echo "$ac_t""found" 1>&6
1277 else
1278    AUTOHEADER="$missing_dir/missing autoheader"
1279    echo "$ac_t""missing" 1>&6
1280 fi
1281
1282 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1283 echo "configure:1284: checking for working makeinfo" >&5
1284 # Run test in a subshell; some versions of sh will print an error if
1285 # an executable is not found, even if stderr is redirected.
1286 # Redirect stdin to placate older versions of autoconf.  Sigh.
1287 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1288    MAKEINFO=makeinfo
1289    echo "$ac_t""found" 1>&6
1290 else
1291    MAKEINFO="$missing_dir/missing makeinfo"
1292    echo "$ac_t""missing" 1>&6
1293 fi
1294
1295 install_sh="$missing_dir/install-sh"
1296 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1297
1298 for ac_prog in gnutar gtar tar
1299 do
1300 # Extract the first word of "$ac_prog", so it can be a program name with args.
1301 set dummy $ac_prog; ac_word=$2
1302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1303 echo "configure:1304: checking for $ac_word" >&5
1304 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1305   echo $ac_n "(cached) $ac_c" 1>&6
1306 else
1307   if test -n "$AMTAR"; then
1308   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1309 else
1310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1311   ac_dummy="$PATH"
1312   for ac_dir in $ac_dummy; do
1313     test -z "$ac_dir" && ac_dir=.
1314     if test -f $ac_dir/$ac_word; then
1315       ac_cv_prog_AMTAR="$ac_prog"
1316       break
1317     fi
1318   done
1319   IFS="$ac_save_ifs"
1320 fi
1321 fi
1322 AMTAR="$ac_cv_prog_AMTAR"
1323 if test -n "$AMTAR"; then
1324   echo "$ac_t""$AMTAR" 1>&6
1325 else
1326   echo "$ac_t""no" 1>&6
1327 fi
1328
1329 test -n "$AMTAR" && break
1330 done
1331
1332
1333 AMTARFLAGS=
1334 if test -n "$AMTAR"; then
1335   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1336         AMTARFLAGS=o
1337   fi
1338 fi
1339
1340 cat >> confdefs.h <<EOF
1341 #define OPENLDAP_PACKAGE "$PACKAGE"
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define OPENLDAP_VERSION "$VERSION"
1346 EOF
1347
1348
1349 cat >> confdefs.h <<EOF
1350 #define LDAP_VENDOR_VERSION $OL_API_INC
1351 EOF
1352
1353 cat >> confdefs.h <<EOF
1354 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1355 EOF
1356
1357 cat >> confdefs.h <<EOF
1358 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1359 EOF
1360
1361 cat >> confdefs.h <<EOF
1362 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1363 EOF
1364
1365
1366 OPENLDAP_LIBVERSION=$OL_API_LIB
1367
1368 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1369
1370
1371
1372 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1373 echo "configure:1374: checking configure arguments" >&5
1374
1375
1376 top_builddir=`pwd`
1377
1378 ldap_subdir="/openldap"
1379
1380 # Check whether --with-subdir or --without-subdir was given.
1381 if test "${with_subdir+set}" = set; then
1382   withval="$with_subdir"
1383   case "$withval" in
1384         no) ldap_subdir=""
1385                 ;;
1386         yes)
1387                 ;;
1388         /*|\\*)
1389                 ldap_subdir="$withval"
1390                 ;;
1391         *)
1392                 ldap_subdir="/$withval"
1393                 ;;
1394 esac
1395
1396 fi
1397
1398
1399 # OpenLDAP --enable-debug
1400         # Check whether --enable-debug or --disable-debug was given.
1401 if test "${enable_debug+set}" = set; then
1402   enableval="$enable_debug"
1403   
1404         ol_arg=invalid
1405         for ol_val in auto yes no ; do
1406                 if test "$enableval" = "$ol_val" ; then
1407                         ol_arg="$ol_val"
1408                 fi
1409         done
1410         if test "$ol_arg" = "invalid" ; then
1411                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1412         fi
1413         ol_enable_debug="$ol_arg"
1414
1415 else
1416         ol_enable_debug="yes"
1417 fi
1418 # end --enable-debug
1419 # OpenLDAP --enable-syslog
1420         # Check whether --enable-syslog or --disable-syslog was given.
1421 if test "${enable_syslog+set}" = set; then
1422   enableval="$enable_syslog"
1423   
1424         ol_arg=invalid
1425         for ol_val in auto yes no ; do
1426                 if test "$enableval" = "$ol_val" ; then
1427                         ol_arg="$ol_val"
1428                 fi
1429         done
1430         if test "$ol_arg" = "invalid" ; then
1431                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1432         fi
1433         ol_enable_syslog="$ol_arg"
1434
1435 else
1436         ol_enable_syslog="auto"
1437 fi
1438 # end --enable-syslog
1439 # OpenLDAP --enable-proctitle
1440         # Check whether --enable-proctitle or --disable-proctitle was given.
1441 if test "${enable_proctitle+set}" = set; then
1442   enableval="$enable_proctitle"
1443   
1444         ol_arg=invalid
1445         for ol_val in auto yes no ; do
1446                 if test "$enableval" = "$ol_val" ; then
1447                         ol_arg="$ol_val"
1448                 fi
1449         done
1450         if test "$ol_arg" = "invalid" ; then
1451                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1452         fi
1453         ol_enable_proctitle="$ol_arg"
1454
1455 else
1456         ol_enable_proctitle="yes"
1457 fi
1458 # end --enable-proctitle
1459 # OpenLDAP --enable-cache
1460         # Check whether --enable-cache or --disable-cache was given.
1461 if test "${enable_cache+set}" = set; then
1462   enableval="$enable_cache"
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-cache" 1>&2; exit 1; }
1472         fi
1473         ol_enable_cache="$ol_arg"
1474
1475 else
1476         ol_enable_cache="no"
1477 fi
1478 # end --enable-cache
1479 # OpenLDAP --enable-referrals
1480         # Check whether --enable-referrals or --disable-referrals was given.
1481 if test "${enable_referrals+set}" = set; then
1482   enableval="$enable_referrals"
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-referrals" 1>&2; exit 1; }
1492         fi
1493         ol_enable_referrals="$ol_arg"
1494
1495 else
1496         ol_enable_referrals="no"
1497 fi
1498 # end --enable-referrals
1499 ol_enable_kbind=${ol_enable_kbind-no}
1500 # OpenLDAP --enable-ipv6
1501         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1502 if test "${enable_ipv6+set}" = set; then
1503   enableval="$enable_ipv6"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1513         fi
1514         ol_enable_ipv6="$ol_arg"
1515
1516 else
1517         ol_enable_ipv6="auto"
1518 fi
1519 # end --enable-ipv6
1520 # OpenLDAP --enable-local
1521         # Check whether --enable-local or --disable-local was given.
1522 if test "${enable_local+set}" = set; then
1523   enableval="$enable_local"
1524   
1525         ol_arg=invalid
1526         for ol_val in auto yes no ; do
1527                 if test "$enableval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1533         fi
1534         ol_enable_local="$ol_arg"
1535
1536 else
1537         ol_enable_local="auto"
1538 fi
1539 # end --enable-local
1540 # OpenLDAP --enable-x_compile
1541         # Check whether --enable-x_compile or --disable-x_compile was given.
1542 if test "${enable_x_compile+set}" = set; then
1543   enableval="$enable_x_compile"
1544   
1545         ol_arg=invalid
1546         for ol_val in yes no ; do
1547                 if test "$enableval" = "$ol_val" ; then
1548                         ol_arg="$ol_val"
1549                 fi
1550         done
1551         if test "$ol_arg" = "invalid" ; then
1552                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1553         fi
1554         ol_enable_x_compile="$ol_arg"
1555
1556 else
1557         ol_enable_x_compile="no"
1558 fi
1559 # end --enable-x_compile
1560
1561
1562 # OpenLDAP --with-cyrus_sasl
1563         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1564 if test "${with_cyrus_sasl+set}" = set; then
1565   withval="$with_cyrus_sasl"
1566   
1567         ol_arg=invalid
1568         for ol_val in auto yes no  ; do
1569                 if test "$withval" = "$ol_val" ; then
1570                         ol_arg="$ol_val"
1571                 fi
1572         done
1573         if test "$ol_arg" = "invalid" ; then
1574                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1575         fi
1576         ol_with_cyrus_sasl="$ol_arg"
1577
1578 else
1579         ol_with_cyrus_sasl="auto"
1580 fi
1581 # end --with-cyrus_sasl
1582
1583 # OpenLDAP --with-fetch
1584         # Check whether --with-fetch or --without-fetch was given.
1585 if test "${with_fetch+set}" = set; then
1586   withval="$with_fetch"
1587   
1588         ol_arg=invalid
1589         for ol_val in auto yes no  ; do
1590                 if test "$withval" = "$ol_val" ; then
1591                         ol_arg="$ol_val"
1592                 fi
1593         done
1594         if test "$ol_arg" = "invalid" ; then
1595                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1596         fi
1597         ol_with_fetch="$ol_arg"
1598
1599 else
1600         ol_with_fetch="auto"
1601 fi
1602 # end --with-fetch
1603
1604 # OpenLDAP --with-kerberos
1605         # Check whether --with-kerberos or --without-kerberos was given.
1606 if test "${with_kerberos+set}" = set; then
1607   withval="$with_kerberos"
1608   
1609         ol_arg=invalid
1610         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1611                 if test "$withval" = "$ol_val" ; then
1612                         ol_arg="$ol_val"
1613                 fi
1614         done
1615         if test "$ol_arg" = "invalid" ; then
1616                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1617         fi
1618         ol_with_kerberos="$ol_arg"
1619
1620 else
1621         ol_with_kerberos="auto"
1622 fi
1623 # end --with-kerberos
1624
1625 # OpenLDAP --with-readline
1626         # Check whether --with-readline or --without-readline was given.
1627 if test "${with_readline+set}" = set; then
1628   withval="$with_readline"
1629   
1630         ol_arg=invalid
1631         for ol_val in auto yes no  ; do
1632                 if test "$withval" = "$ol_val" ; then
1633                         ol_arg="$ol_val"
1634                 fi
1635         done
1636         if test "$ol_arg" = "invalid" ; then
1637                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1638         fi
1639         ol_with_readline="$ol_arg"
1640
1641 else
1642         ol_with_readline="auto"
1643 fi
1644 # end --with-readline
1645
1646 # OpenLDAP --with-threads
1647         # Check whether --with-threads or --without-threads was given.
1648 if test "${with_threads+set}" = set; then
1649   withval="$with_threads"
1650   
1651         ol_arg=invalid
1652         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1653                 if test "$withval" = "$ol_val" ; then
1654                         ol_arg="$ol_val"
1655                 fi
1656         done
1657         if test "$ol_arg" = "invalid" ; then
1658                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1659         fi
1660         ol_with_threads="$ol_arg"
1661
1662 else
1663         ol_with_threads="auto"
1664 fi
1665 # end --with-threads
1666
1667 # OpenLDAP --with-tls
1668         # Check whether --with-tls or --without-tls was given.
1669 if test "${with_tls+set}" = set; then
1670   withval="$with_tls"
1671   
1672         ol_arg=invalid
1673         for ol_val in auto ssleay openssl yes no  ; do
1674                 if test "$withval" = "$ol_val" ; then
1675                         ol_arg="$ol_val"
1676                 fi
1677         done
1678         if test "$ol_arg" = "invalid" ; then
1679                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1680         fi
1681         ol_with_tls="$ol_arg"
1682
1683 else
1684         ol_with_tls="auto"
1685 fi
1686 # end --with-tls
1687
1688 # OpenLDAP --with-yielding_select
1689         # Check whether --with-yielding_select or --without-yielding_select was given.
1690 if test "${with_yielding_select+set}" = set; then
1691   withval="$with_yielding_select"
1692   
1693         ol_arg=invalid
1694         for ol_val in auto yes no manual  ; do
1695                 if test "$withval" = "$ol_val" ; then
1696                         ol_arg="$ol_val"
1697                 fi
1698         done
1699         if test "$ol_arg" = "invalid" ; then
1700                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1701         fi
1702         ol_with_yielding_select="$ol_arg"
1703
1704 else
1705         ol_with_yielding_select="auto"
1706 fi
1707 # end --with-yielding_select
1708
1709
1710
1711 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1712 if test "${with_xxslapdoptions+set}" = set; then
1713   withval="$with_xxslapdoptions"
1714   :
1715 fi
1716
1717 # OpenLDAP --enable-slapd
1718         # Check whether --enable-slapd or --disable-slapd was given.
1719 if test "${enable_slapd+set}" = set; then
1720   enableval="$enable_slapd"
1721   
1722         ol_arg=invalid
1723         for ol_val in auto yes no ; do
1724                 if test "$enableval" = "$ol_val" ; then
1725                         ol_arg="$ol_val"
1726                 fi
1727         done
1728         if test "$ol_arg" = "invalid" ; then
1729                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1730         fi
1731         ol_enable_slapd="$ol_arg"
1732
1733 else
1734         ol_enable_slapd="yes"
1735 fi
1736 # end --enable-slapd
1737 # OpenLDAP --enable-aci
1738         # Check whether --enable-aci or --disable-aci was given.
1739 if test "${enable_aci+set}" = set; then
1740   enableval="$enable_aci"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1750         fi
1751         ol_enable_aci="$ol_arg"
1752
1753 else
1754         ol_enable_aci="no"
1755 fi
1756 # end --enable-aci
1757 # OpenLDAP --enable-cleartext
1758         # Check whether --enable-cleartext or --disable-cleartext was given.
1759 if test "${enable_cleartext+set}" = set; then
1760   enableval="$enable_cleartext"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1770         fi
1771         ol_enable_cleartext="$ol_arg"
1772
1773 else
1774         ol_enable_cleartext="yes"
1775 fi
1776 # end --enable-cleartext
1777 # OpenLDAP --enable-crypt
1778         # Check whether --enable-crypt or --disable-crypt was given.
1779 if test "${enable_crypt+set}" = set; then
1780   enableval="$enable_crypt"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1790         fi
1791         ol_enable_crypt="$ol_arg"
1792
1793 else
1794         ol_enable_crypt="no"
1795 fi
1796 # end --enable-crypt
1797 # OpenLDAP --enable-dynamic
1798         # Check whether --enable-dynamic or --disable-dynamic was given.
1799 if test "${enable_dynamic+set}" = set; then
1800   enableval="$enable_dynamic"
1801   
1802         ol_arg=invalid
1803         for ol_val in auto yes no ; do
1804                 if test "$enableval" = "$ol_val" ; then
1805                         ol_arg="$ol_val"
1806                 fi
1807         done
1808         if test "$ol_arg" = "invalid" ; then
1809                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1810         fi
1811         ol_enable_dynamic="$ol_arg"
1812
1813 else
1814         ol_enable_dynamic="no"
1815 fi
1816 # end --enable-dynamic
1817 # OpenLDAP --enable-kpasswd
1818         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1819 if test "${enable_kpasswd+set}" = set; then
1820   enableval="$enable_kpasswd"
1821   
1822         ol_arg=invalid
1823         for ol_val in auto yes no ; do
1824                 if test "$enableval" = "$ol_val" ; then
1825                         ol_arg="$ol_val"
1826                 fi
1827         done
1828         if test "$ol_arg" = "invalid" ; then
1829                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1830         fi
1831         ol_enable_kpasswd="$ol_arg"
1832
1833 else
1834         ol_enable_kpasswd="no"
1835 fi
1836 # end --enable-kpasswd
1837 # OpenLDAP --enable-lmpasswd
1838         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1839 if test "${enable_lmpasswd+set}" = set; then
1840   enableval="$enable_lmpasswd"
1841   
1842         ol_arg=invalid
1843         for ol_val in auto yes no ; do
1844                 if test "$enableval" = "$ol_val" ; then
1845                         ol_arg="$ol_val"
1846                 fi
1847         done
1848         if test "$ol_arg" = "invalid" ; then
1849                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1850         fi
1851         ol_enable_lmpasswd="$ol_arg"
1852
1853 else
1854         ol_enable_lmpasswd="no"
1855 fi
1856 # end --enable-lmpasswd
1857 # OpenLDAP --enable-spasswd
1858         # Check whether --enable-spasswd or --disable-spasswd was given.
1859 if test "${enable_spasswd+set}" = set; then
1860   enableval="$enable_spasswd"
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-spasswd" 1>&2; exit 1; }
1870         fi
1871         ol_enable_spasswd="$ol_arg"
1872
1873 else
1874         ol_enable_spasswd="no"
1875 fi
1876 # end --enable-spasswd
1877 # OpenLDAP --enable-modules
1878         # Check whether --enable-modules or --disable-modules was given.
1879 if test "${enable_modules+set}" = set; then
1880   enableval="$enable_modules"
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-modules" 1>&2; exit 1; }
1890         fi
1891         ol_enable_modules="$ol_arg"
1892
1893 else
1894         ol_enable_modules="no"
1895 fi
1896 # end --enable-modules
1897 ol_enable_multimaster=${ol_enable_multimaster-no}
1898 # OpenLDAP --enable-phonetic
1899         # Check whether --enable-phonetic or --disable-phonetic was given.
1900 if test "${enable_phonetic+set}" = set; then
1901   enableval="$enable_phonetic"
1902   
1903         ol_arg=invalid
1904         for ol_val in auto yes no ; do
1905                 if test "$enableval" = "$ol_val" ; then
1906                         ol_arg="$ol_val"
1907                 fi
1908         done
1909         if test "$ol_arg" = "invalid" ; then
1910                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1911         fi
1912         ol_enable_phonetic="$ol_arg"
1913
1914 else
1915         ol_enable_phonetic="no"
1916 fi
1917 # end --enable-phonetic
1918 # OpenLDAP --enable-rewrite
1919         # Check whether --enable-rewrite or --disable-rewrite was given.
1920 if test "${enable_rewrite+set}" = set; then
1921   enableval="$enable_rewrite"
1922   
1923         ol_arg=invalid
1924         for ol_val in auto yes no ; do
1925                 if test "$enableval" = "$ol_val" ; then
1926                         ol_arg="$ol_val"
1927                 fi
1928         done
1929         if test "$ol_arg" = "invalid" ; then
1930                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1931         fi
1932         ol_enable_rewrite="$ol_arg"
1933
1934 else
1935         ol_enable_rewrite="no"
1936 fi
1937 # end --enable-rewrite
1938 # OpenLDAP --enable-rlookups
1939         # Check whether --enable-rlookups or --disable-rlookups was given.
1940 if test "${enable_rlookups+set}" = set; then
1941   enableval="$enable_rlookups"
1942   
1943         ol_arg=invalid
1944         for ol_val in auto yes no ; do
1945                 if test "$enableval" = "$ol_val" ; then
1946                         ol_arg="$ol_val"
1947                 fi
1948         done
1949         if test "$ol_arg" = "invalid" ; then
1950                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1951         fi
1952         ol_enable_rlookups="$ol_arg"
1953
1954 else
1955         ol_enable_rlookups="no"
1956 fi
1957 # end --enable-rlookups
1958 # OpenLDAP --enable-slp
1959         # Check whether --enable-slp or --disable-slp was given.
1960 if test "${enable_slp+set}" = set; then
1961   enableval="$enable_slp"
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-slp" 1>&2; exit 1; }
1971         fi
1972         ol_enable_slp="$ol_arg"
1973
1974 else
1975         ol_enable_slp="no"
1976 fi
1977 # end --enable-slp
1978 # OpenLDAP --enable-wrappers
1979         # Check whether --enable-wrappers or --disable-wrappers was given.
1980 if test "${enable_wrappers+set}" = set; then
1981   enableval="$enable_wrappers"
1982   
1983         ol_arg=invalid
1984         for ol_val in auto yes no ; do
1985                 if test "$enableval" = "$ol_val" ; then
1986                         ol_arg="$ol_val"
1987                 fi
1988         done
1989         if test "$ol_arg" = "invalid" ; then
1990                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1991         fi
1992         ol_enable_wrappers="$ol_arg"
1993
1994 else
1995         ol_enable_wrappers="no"
1996 fi
1997 # end --enable-wrappers
1998
1999 # OpenLDAP --enable-bdb
2000         # Check whether --enable-bdb or --disable-bdb was given.
2001 if test "${enable_bdb+set}" = set; then
2002   enableval="$enable_bdb"
2003   
2004         ol_arg=invalid
2005         for ol_val in auto yes no ; do
2006                 if test "$enableval" = "$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 $enableval for --enable-bdb" 1>&2; exit 1; }
2012         fi
2013         ol_enable_bdb="$ol_arg"
2014
2015 else
2016         ol_enable_bdb="yes"
2017 fi
2018 # end --enable-bdb
2019 # OpenLDAP --with-bdb_module
2020         # Check whether --with-bdb_module or --without-bdb_module was given.
2021 if test "${with_bdb_module+set}" = set; then
2022   withval="$with_bdb_module"
2023   
2024         ol_arg=invalid
2025         for ol_val in static dynamic ; do
2026                 if test "$withval" = "$ol_val" ; then
2027                         ol_arg="$ol_val"
2028                 fi
2029         done
2030         if test "$ol_arg" = "invalid" ; then
2031                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2032         fi
2033         ol_with_bdb_module="$ol_arg"
2034
2035 else
2036         ol_with_bdb_module="static"
2037 fi
2038 # end --with-bdb_module
2039
2040 # OpenLDAP --enable-dnssrv
2041         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2042 if test "${enable_dnssrv+set}" = set; then
2043   enableval="$enable_dnssrv"
2044   
2045         ol_arg=invalid
2046         for ol_val in auto yes no ; do
2047                 if test "$enableval" = "$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 $enableval for --enable-dnssrv" 1>&2; exit 1; }
2053         fi
2054         ol_enable_dnssrv="$ol_arg"
2055
2056 else
2057         ol_enable_dnssrv="no"
2058 fi
2059 # end --enable-dnssrv
2060 # OpenLDAP --with-dnssrv_module
2061         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2062 if test "${with_dnssrv_module+set}" = set; then
2063   withval="$with_dnssrv_module"
2064   
2065         ol_arg=invalid
2066         for ol_val in static dynamic ; do
2067                 if test "$withval" = "$ol_val" ; then
2068                         ol_arg="$ol_val"
2069                 fi
2070         done
2071         if test "$ol_arg" = "invalid" ; then
2072                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2073         fi
2074         ol_with_dnssrv_module="$ol_arg"
2075
2076 else
2077         ol_with_dnssrv_module="static"
2078 fi
2079 # end --with-dnssrv_module
2080
2081 # OpenLDAP --enable-ldap
2082         # Check whether --enable-ldap or --disable-ldap was given.
2083 if test "${enable_ldap+set}" = set; then
2084   enableval="$enable_ldap"
2085   
2086         ol_arg=invalid
2087         for ol_val in auto yes no ; do
2088                 if test "$enableval" = "$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 $enableval for --enable-ldap" 1>&2; exit 1; }
2094         fi
2095         ol_enable_ldap="$ol_arg"
2096
2097 else
2098         ol_enable_ldap="no"
2099 fi
2100 # end --enable-ldap
2101 # OpenLDAP --with-ldap_module
2102         # Check whether --with-ldap_module or --without-ldap_module was given.
2103 if test "${with_ldap_module+set}" = set; then
2104   withval="$with_ldap_module"
2105   
2106         ol_arg=invalid
2107         for ol_val in static dynamic ; do
2108                 if test "$withval" = "$ol_val" ; then
2109                         ol_arg="$ol_val"
2110                 fi
2111         done
2112         if test "$ol_arg" = "invalid" ; then
2113                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2114         fi
2115         ol_with_ldap_module="$ol_arg"
2116
2117 else
2118         ol_with_ldap_module="static"
2119 fi
2120 # end --with-ldap_module
2121
2122 # OpenLDAP --enable-ldbm
2123         # Check whether --enable-ldbm or --disable-ldbm was given.
2124 if test "${enable_ldbm+set}" = set; then
2125   enableval="$enable_ldbm"
2126   
2127         ol_arg=invalid
2128         for ol_val in auto yes no ; do
2129                 if test "$enableval" = "$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 $enableval for --enable-ldbm" 1>&2; exit 1; }
2135         fi
2136         ol_enable_ldbm="$ol_arg"
2137
2138 else
2139         ol_enable_ldbm="no"
2140 fi
2141 # end --enable-ldbm
2142 # OpenLDAP --with-ldbm_api
2143         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2144 if test "${with_ldbm_api+set}" = set; then
2145   withval="$with_ldbm_api"
2146   
2147         ol_arg=invalid
2148         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2149                 if test "$withval" = "$ol_val" ; then
2150                         ol_arg="$ol_val"
2151                 fi
2152         done
2153         if test "$ol_arg" = "invalid" ; then
2154                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2155         fi
2156         ol_with_ldbm_api="$ol_arg"
2157
2158 else
2159         ol_with_ldbm_api="auto"
2160 fi
2161 # end --with-ldbm_api
2162
2163 # OpenLDAP --with-ldbm_module
2164         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2165 if test "${with_ldbm_module+set}" = set; then
2166   withval="$with_ldbm_module"
2167   
2168         ol_arg=invalid
2169         for ol_val in static dynamic ; do
2170                 if test "$withval" = "$ol_val" ; then
2171                         ol_arg="$ol_val"
2172                 fi
2173         done
2174         if test "$ol_arg" = "invalid" ; then
2175                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2176         fi
2177         ol_with_ldbm_module="$ol_arg"
2178
2179 else
2180         ol_with_ldbm_module="static"
2181 fi
2182 # end --with-ldbm_module
2183
2184 # OpenLDAP --with-ldbm_type
2185         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2186 if test "${with_ldbm_type+set}" = set; then
2187   withval="$with_ldbm_type"
2188   
2189         ol_arg=invalid
2190         for ol_val in auto btree hash ; do
2191                 if test "$withval" = "$ol_val" ; then
2192                         ol_arg="$ol_val"
2193                 fi
2194         done
2195         if test "$ol_arg" = "invalid" ; then
2196                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2197         fi
2198         ol_with_ldbm_type="$ol_arg"
2199
2200 else
2201         ol_with_ldbm_type="auto"
2202 fi
2203 # end --with-ldbm_type
2204
2205 # OpenLDAP --enable-meta
2206         # Check whether --enable-meta or --disable-meta was given.
2207 if test "${enable_meta+set}" = set; then
2208   enableval="$enable_meta"
2209   
2210         ol_arg=invalid
2211         for ol_val in auto yes no ; do
2212                 if test "$enableval" = "$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 $enableval for --enable-meta" 1>&2; exit 1; }
2218         fi
2219         ol_enable_meta="$ol_arg"
2220
2221 else
2222         ol_enable_meta="no"
2223 fi
2224 # end --enable-meta
2225 # OpenLDAP --with-meta_module
2226         # Check whether --with-meta_module or --without-meta_module was given.
2227 if test "${with_meta_module+set}" = set; then
2228   withval="$with_meta_module"
2229   
2230         ol_arg=invalid
2231         for ol_val in static dynamic ; do
2232                 if test "$withval" = "$ol_val" ; then
2233                         ol_arg="$ol_val"
2234                 fi
2235         done
2236         if test "$ol_arg" = "invalid" ; then
2237                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2238         fi
2239         ol_with_meta_module="$ol_arg"
2240
2241 else
2242         ol_with_meta_module="static"
2243 fi
2244 # end --with-meta_module
2245
2246 # OpenLDAP --enable-monitor
2247         # Check whether --enable-monitor or --disable-monitor was given.
2248 if test "${enable_monitor+set}" = set; then
2249   enableval="$enable_monitor"
2250   
2251         ol_arg=invalid
2252         for ol_val in auto yes no ; do
2253                 if test "$enableval" = "$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 $enableval for --enable-monitor" 1>&2; exit 1; }
2259         fi
2260         ol_enable_monitor="$ol_arg"
2261
2262 else
2263         ol_enable_monitor="no"
2264 fi
2265 # end --enable-monitor
2266 # OpenLDAP --with-monitor_module
2267         # Check whether --with-monitor_module or --without-monitor_module was given.
2268 if test "${with_monitor_module+set}" = set; then
2269   withval="$with_monitor_module"
2270   
2271         ol_arg=invalid
2272         for ol_val in static dynamic ; do
2273                 if test "$withval" = "$ol_val" ; then
2274                         ol_arg="$ol_val"
2275                 fi
2276         done
2277         if test "$ol_arg" = "invalid" ; then
2278                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2279         fi
2280         ol_with_monitor_module="$ol_arg"
2281
2282 else
2283         ol_with_monitor_module="static"
2284 fi
2285 # end --with-monitor_module
2286
2287 # OpenLDAP --enable-null
2288         # Check whether --enable-null or --disable-null was given.
2289 if test "${enable_null+set}" = set; then
2290   enableval="$enable_null"
2291   
2292         ol_arg=invalid
2293         for ol_val in auto yes no ; do
2294                 if test "$enableval" = "$ol_val" ; then
2295                         ol_arg="$ol_val"
2296                 fi
2297         done
2298         if test "$ol_arg" = "invalid" ; then
2299                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2300         fi
2301         ol_enable_null="$ol_arg"
2302
2303 else
2304         ol_enable_null="no"
2305 fi
2306 # end --enable-null
2307 # OpenLDAP --with-null_module
2308         # Check whether --with-null_module or --without-null_module was given.
2309 if test "${with_null_module+set}" = set; then
2310   withval="$with_null_module"
2311   
2312         ol_arg=invalid
2313         for ol_val in static dynamic ; do
2314                 if test "$withval" = "$ol_val" ; then
2315                         ol_arg="$ol_val"
2316                 fi
2317         done
2318         if test "$ol_arg" = "invalid" ; then
2319                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2320         fi
2321         ol_with_null_module="$ol_arg"
2322
2323 else
2324         ol_with_null_module="static"
2325 fi
2326 # end --with-null_module
2327
2328 # OpenLDAP --enable-passwd
2329         # Check whether --enable-passwd or --disable-passwd was given.
2330 if test "${enable_passwd+set}" = set; then
2331   enableval="$enable_passwd"
2332   
2333         ol_arg=invalid
2334         for ol_val in auto yes no ; do
2335                 if test "$enableval" = "$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 $enableval for --enable-passwd" 1>&2; exit 1; }
2341         fi
2342         ol_enable_passwd="$ol_arg"
2343
2344 else
2345         ol_enable_passwd="no"
2346 fi
2347 # end --enable-passwd
2348 # OpenLDAP --with-passwd_module
2349         # Check whether --with-passwd_module or --without-passwd_module was given.
2350 if test "${with_passwd_module+set}" = set; then
2351   withval="$with_passwd_module"
2352   
2353         ol_arg=invalid
2354         for ol_val in static dynamic ; do
2355                 if test "$withval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2361         fi
2362         ol_with_passwd_module="$ol_arg"
2363
2364 else
2365         ol_with_passwd_module="static"
2366 fi
2367 # end --with-passwd_module
2368
2369 # OpenLDAP --enable-perl
2370         # Check whether --enable-perl or --disable-perl was given.
2371 if test "${enable_perl+set}" = set; then
2372   enableval="$enable_perl"
2373   
2374         ol_arg=invalid
2375         for ol_val in auto yes no ; do
2376                 if test "$enableval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2382         fi
2383         ol_enable_perl="$ol_arg"
2384
2385 else
2386         ol_enable_perl="no"
2387 fi
2388 # end --enable-perl
2389 # OpenLDAP --with-perl_module
2390         # Check whether --with-perl_module or --without-perl_module was given.
2391 if test "${with_perl_module+set}" = set; then
2392   withval="$with_perl_module"
2393   
2394         ol_arg=invalid
2395         for ol_val in static dynamic ; do
2396                 if test "$withval" = "$ol_val" ; then
2397                         ol_arg="$ol_val"
2398                 fi
2399         done
2400         if test "$ol_arg" = "invalid" ; then
2401                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2402         fi
2403         ol_with_perl_module="$ol_arg"
2404
2405 else
2406         ol_with_perl_module="static"
2407 fi
2408 # end --with-perl_module
2409
2410 # OpenLDAP --enable-shell
2411         # Check whether --enable-shell or --disable-shell was given.
2412 if test "${enable_shell+set}" = set; then
2413   enableval="$enable_shell"
2414   
2415         ol_arg=invalid
2416         for ol_val in auto yes no ; do
2417                 if test "$enableval" = "$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 $enableval for --enable-shell" 1>&2; exit 1; }
2423         fi
2424         ol_enable_shell="$ol_arg"
2425
2426 else
2427         ol_enable_shell="no"
2428 fi
2429 # end --enable-shell
2430 # OpenLDAP --with-shell_module
2431         # Check whether --with-shell_module or --without-shell_module was given.
2432 if test "${with_shell_module+set}" = set; then
2433   withval="$with_shell_module"
2434   
2435         ol_arg=invalid
2436         for ol_val in static dynamic ; do
2437                 if test "$withval" = "$ol_val" ; then
2438                         ol_arg="$ol_val"
2439                 fi
2440         done
2441         if test "$ol_arg" = "invalid" ; then
2442                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2443         fi
2444         ol_with_shell_module="$ol_arg"
2445
2446 else
2447         ol_with_shell_module="static"
2448 fi
2449 # end --with-shell_module
2450
2451 # OpenLDAP --enable-sql
2452         # Check whether --enable-sql or --disable-sql was given.
2453 if test "${enable_sql+set}" = set; then
2454   enableval="$enable_sql"
2455   
2456         ol_arg=invalid
2457         for ol_val in auto yes no ; do
2458                 if test "$enableval" = "$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 $enableval for --enable-sql" 1>&2; exit 1; }
2464         fi
2465         ol_enable_sql="$ol_arg"
2466
2467 else
2468         ol_enable_sql="no"
2469 fi
2470 # end --enable-sql
2471 # OpenLDAP --with-sql_module
2472         # Check whether --with-sql_module or --without-sql_module was given.
2473 if test "${with_sql_module+set}" = set; then
2474   withval="$with_sql_module"
2475   
2476         ol_arg=invalid
2477         for ol_val in static dynamic ; do
2478                 if test "$withval" = "$ol_val" ; then
2479                         ol_arg="$ol_val"
2480                 fi
2481         done
2482         if test "$ol_arg" = "invalid" ; then
2483                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2484         fi
2485         ol_with_sql_module="$ol_arg"
2486
2487 else
2488         ol_with_sql_module="static"
2489 fi
2490 # end --with-sql_module
2491
2492 # OpenLDAP --enable-tcl
2493         # Check whether --enable-tcl or --disable-tcl was given.
2494 if test "${enable_tcl+set}" = set; then
2495   enableval="$enable_tcl"
2496   
2497         ol_arg=invalid
2498         for ol_val in auto yes no ; do
2499                 if test "$enableval" = "$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 $enableval for --enable-tcl" 1>&2; exit 1; }
2505         fi
2506         ol_enable_tcl="$ol_arg"
2507
2508 else
2509         ol_enable_tcl="no"
2510 fi
2511 # end --enable-tcl
2512 # OpenLDAP --with-tcl_module
2513         # Check whether --with-tcl_module or --without-tcl_module was given.
2514 if test "${with_tcl_module+set}" = set; then
2515   withval="$with_tcl_module"
2516   
2517         ol_arg=invalid
2518         for ol_val in static dynamic ; do
2519                 if test "$withval" = "$ol_val" ; then
2520                         ol_arg="$ol_val"
2521                 fi
2522         done
2523         if test "$ol_arg" = "invalid" ; then
2524                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2525         fi
2526         ol_with_tcl_module="$ol_arg"
2527
2528 else
2529         ol_with_tcl_module="static"
2530 fi
2531 # end --with-tcl_module
2532
2533
2534 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2535 if test "${with_xxslurpdoptions+set}" = set; then
2536   withval="$with_xxslurpdoptions"
2537   :
2538 fi
2539
2540 # OpenLDAP --enable-slurpd
2541         # Check whether --enable-slurpd or --disable-slurpd was given.
2542 if test "${enable_slurpd+set}" = set; then
2543   enableval="$enable_slurpd"
2544   
2545         ol_arg=invalid
2546         for ol_val in auto yes no ; do
2547                 if test "$enableval" = "$ol_val" ; then
2548                         ol_arg="$ol_val"
2549                 fi
2550         done
2551         if test "$ol_arg" = "invalid" ; then
2552                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2553         fi
2554         ol_enable_slurpd="$ol_arg"
2555
2556 else
2557         ol_enable_slurpd="auto"
2558 fi
2559 # end --enable-slurpd
2560
2561 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2562 if test "${with_xxliboptions+set}" = set; then
2563   withval="$with_xxliboptions"
2564   :
2565 fi
2566
2567 # Check whether --enable-static or --disable-static was given.
2568 if test "${enable_static+set}" = set; then
2569   enableval="$enable_static"
2570   p=${PACKAGE-default}
2571 case $enableval in
2572 yes) enable_static=yes ;;
2573 no) enable_static=no ;;
2574 *)
2575   enable_static=no
2576   # Look at the argument we got.  We use all the common list separators.
2577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2578   for pkg in $enableval; do
2579     if test "X$pkg" = "X$p"; then
2580       enable_static=yes
2581     fi
2582   done
2583   IFS="$ac_save_ifs"
2584   ;;
2585 esac
2586 else
2587   enable_static=yes
2588 fi
2589
2590 # Check whether --enable-shared or --disable-shared was given.
2591 if test "${enable_shared+set}" = set; then
2592   enableval="$enable_shared"
2593   p=${PACKAGE-default}
2594 case $enableval in
2595 yes) enable_shared=yes ;;
2596 no) enable_shared=no ;;
2597 *)
2598   enable_shared=no
2599   # Look at the argument we got.  We use all the common list separators.
2600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2601   for pkg in $enableval; do
2602     if test "X$pkg" = "X$p"; then
2603       enable_shared=yes
2604     fi
2605   done
2606   IFS="$ac_save_ifs"
2607   ;;
2608 esac
2609 else
2610   enable_shared=yes
2611 fi
2612
2613
2614
2615 # validate options
2616 if test $ol_enable_slapd = no ; then
2617                 if test $ol_enable_bdb = yes ; then
2618                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2619         fi
2620         if test $ol_enable_dnssrv = yes ; then
2621                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2622         fi
2623         if test $ol_enable_ldap = yes ; then
2624                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2625         fi
2626         if test $ol_enable_ldbm = yes ; then
2627                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2628         fi
2629         if test $ol_enable_meta = yes ; then
2630                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2631         fi
2632         if test $ol_enable_monitor = yes ; then
2633                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2634         fi
2635         if test $ol_enable_null = yes ; then
2636                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2637         fi
2638         if test $ol_enable_passwd = yes ; then
2639                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2640         fi
2641         if test $ol_enable_perl = yes ; then
2642                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2643         fi
2644         if test $ol_enable_shell = yes ; then
2645                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2646         fi
2647         if test $ol_enable_tcl = yes ; then
2648                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2649         fi
2650         if test $ol_enable_sql = yes ; then
2651                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2652         fi
2653         if test $ol_enable_modules = yes ; then
2654                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2655         fi
2656         if test $ol_enable_multimaster = yes ; then
2657                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2658         fi
2659         if test $ol_enable_wrappers = yes ; then
2660                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2661         fi
2662         if test $ol_enable_phonetic = yes ; then
2663                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2664         fi
2665         if test $ol_enable_rlookups = yes ; then
2666                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2667         fi
2668         if test $ol_enable_aci = yes ; then
2669                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2670         fi
2671         if test $ol_with_ldbm_api != auto ; then
2672                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2673         fi
2674         if test $ol_with_ldbm_type != auto ; then
2675                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2676         fi
2677         if test $ol_with_bdb_module != static ; then
2678                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2679         fi
2680         if test $ol_with_dnssrv_module != static ; then
2681                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2682         fi
2683         if test $ol_with_ldap_module != static ; then
2684                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2685         fi
2686         if test $ol_with_ldbm_module != static ; then
2687                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2688         fi
2689         if test $ol_with_meta_module != static ; then
2690                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2691         fi
2692         if test $ol_with_monitor_module != static ; then
2693                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2694         fi
2695         if test $ol_with_null_module != static ; then
2696                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2697         fi
2698         if test $ol_with_passwd_module != static ; then
2699                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2700         fi
2701         if test $ol_with_perl_module != static ; then
2702                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2703         fi
2704         if test $ol_with_shell_module != static ; then
2705                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2706         fi
2707         if test $ol_with_tcl_module != static ; then
2708                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2709         fi
2710         if test $ol_with_sql_module != static ; then
2711                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2712         fi
2713         if test $ol_enable_slurpd = yes ; then
2714                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2715         fi
2716         if test $ol_enable_rewrite = yes ; then
2717                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2718         fi
2719
2720         # force settings to no
2721         ol_enable_bdb=no
2722         ol_enable_dnssrv=no
2723         ol_enable_ldap=no
2724         ol_enable_ldbm=no
2725         ol_enable_meta=no
2726         ol_enable_monitor=no
2727         ol_enable_null=no
2728         ol_enable_passwd=no
2729         ol_enable_perl=no
2730         ol_enable_shell=no
2731         ol_enable_tcl=no
2732         ol_enable_sql=no
2733
2734         ol_enable_modules=no
2735         ol_enable_multimaster=no
2736         ol_enable_phonetic=no
2737         ol_enable_rlookups=no
2738         ol_enable_aci=no
2739         ol_enable_wrappers=no
2740         ol_enable_dynamic=no
2741
2742         ol_with_ldbm_api=no
2743         ol_with_ldbm_type=no
2744
2745         ol_with_bdb_module=static
2746         ol_with_dnssrv_module=static
2747         ol_with_ldap_module=static
2748         ol_with_ldbm_module=static
2749         ol_with_meta_module=static
2750         ol_with_monitor_module=static
2751         ol_with_null_module=static
2752         ol_with_passwd_module=static
2753         ol_with_perl_module=static
2754         ol_with_shell_module=static
2755         ol_with_tcl_module=static
2756         ol_with_sql_module=static
2757
2758         ol_enable_slurpd=no
2759
2760         ol_enable_rewrite=no
2761
2762 elif test $ol_enable_ldbm = no ; then
2763         
2764         if test $ol_with_ldbm_api != auto ; then
2765                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2766         fi
2767
2768         if test $ol_with_ldbm_type != auto ; then
2769                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2770         fi
2771
2772         if test $ol_with_ldbm_module != static ; then
2773                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2774         fi
2775
2776         if test $ol_enable_modules != yes -a \
2777                 $ol_enable_bdb = no -a \
2778                 $ol_enable_dnssrv = no -a \
2779                 $ol_enable_ldap = no -a \
2780                 $ol_enable_meta = no -a \
2781                 $ol_enable_monitor = no -a \
2782                 $ol_enable_null = no -a \
2783                 $ol_enable_passwd = no -a \
2784                 $ol_enable_perl = no -a \
2785                 $ol_enable_shell = no -a \
2786                 $ol_enable_sql = no -a \
2787                 $ol_enable_tcl = no ; then
2788
2789                 if test $ol_enable_slapd = yes ; then
2790                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2791                 else
2792                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2793                         ol_enable_slapd=no
2794                 fi
2795         fi
2796
2797         ol_with_ldbm_api=no
2798         ol_with_ldbm_type=no
2799         ol_with_ldbm_module=static
2800
2801         if test $ol_enable_bdb != no ; then
2802                 ol_with_ldbm_api=berkeley
2803         fi
2804
2805 else
2806                 if test $ol_with_ldbm_api = gdbm -a \
2807                 $ol_with_ldbm_type = btree ; then
2808                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2809         fi
2810         if test $ol_with_ldbm_api = mdbm -a \
2811                 $ol_with_ldbm_type = btree ; then
2812                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2813         fi
2814         if test $ol_with_ldbm_api = ndbm -a \
2815                 $ol_with_ldbm_type = btree ; then
2816                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2817         fi
2818
2819         if test $ol_enable_bdb = yes ; then
2820                 if test $ol_with_ldbm_api = auto ; then
2821                         ol_with_ldbm_api=berkeley
2822                 elif test $ol_with_ldbm_api != berkeley ; then
2823                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2824                 fi
2825
2826         elif test $ol_enable_bdb = auto ; then
2827                 if test $ol_with_ldbm_api != berkeley \
2828                         -o $ol_with_ldbm_api != auto ; then
2829                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2830                         ol_enable_bdb=no
2831                 fi
2832         fi
2833 fi
2834
2835 if test $ol_enable_slurpd = yes ; then
2836                 if test $ol_with_threads = no ; then
2837                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2838         fi
2839 fi
2840
2841 if test $ol_enable_lmpasswd = yes ; then
2842         if test $ol_with_tls = no ; then
2843                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2844         fi
2845 fi
2846
2847 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2848         if test $ol_with_kerberos = no ; then
2849                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2850         elif test $ol_with_kerberos = auto ; then
2851                 ol_with_kerberos=yes
2852         fi
2853
2854 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2855         if test $ol_with_kerberos = auto ; then
2856                 ol_with_kerberos=no
2857         elif test $ol_with_kerberos != no ; then
2858                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2859                 ol_with_kerberos=no
2860         fi
2861 fi
2862
2863 if test $ol_enable_spasswd = yes ; then
2864         if test $ol_with_cyrus_sasl = no ; then
2865                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2866         fi
2867         ol_with_cyrus_sasl=yes
2868 fi
2869
2870 echo "$ac_t""done" 1>&6
2871
2872 LDAP_LIBS=
2873 LDIF_LIBS=
2874 LDBM_LIBS=
2875 LTHREAD_LIBS=
2876 LUTIL_LIBS=
2877
2878 SLAPD_LIBS=
2879 SLURPD_LIBS=
2880
2881 BUILD_SLAPD=no
2882 BUILD_SLURPD=no
2883
2884 BUILD_THREAD=no
2885
2886 BUILD_BDB=no
2887 BUILD_DNSSRV=no
2888 BUILD_LDAP=no
2889 BUILD_LDBM=no
2890 BUILD_META=no
2891 BUILD_MONITOR=no
2892 BUILD_NULL=no
2893 BUILD_PASSWD=no
2894 BUILD_PERL=no
2895 BUILD_SHELL=no
2896 BUILD_SQL=no
2897 BUILD_TCL=no
2898
2899 BUILD_BDB_DYNAMIC=static
2900 BUILD_DNSSRV_DYNAMIC=static
2901 BUILD_LDAP_DYNAMIC=static
2902 BUILD_LDBM_DYNAMIC=static
2903 BUILD_META_DYNAMIC=static
2904 BUILD_MONITOR_DYNAMIC=static
2905 BUILD_NULL_DYNAMIC=static
2906 BUILD_PASSWD_DYNAMIC=static
2907 BUILD_PERL_DYNAMIC=static
2908 BUILD_SHELL_DYNAMIC=static
2909 BUILD_TCL_DYNAMIC=static
2910 BUILD_SQL_DYNAMIC=static
2911
2912 SLAPD_MODULES_LDFLAGS=
2913 SLAPD_MODULES_CPPFLAGS=
2914
2915 SLAPD_STATIC_BACKENDS=
2916 SLAPD_DYNAMIC_BACKENDS=
2917
2918 SLAPD_PERL_LDFLAGS=
2919 MOD_PERL_LDFLAGS=
2920 PERL_CPPFLAGS=
2921
2922 SLAPD_SQL_LDFLAGS=
2923 SLAPD_SQL_LIBS=
2924 SLAPD_SQL_INCLUDES=
2925
2926 MOD_TCL_LIB=
2927 KRB4_LIBS=
2928 KRB5_LIBS=
2929 READLINE_LIBS=
2930 SASL_LIBS=
2931 TERMCAP_LIBS=
2932 TLS_LIBS=
2933 MODULES_LIBS=
2934 AUTH_LIBS=
2935
2936 SLAPD_SLP_LIBS=
2937
2938
2939 # Find a good install program.  We prefer a C program (faster),
2940 # so one script is as good as another.  But avoid the broken or
2941 # incompatible versions:
2942 # SysV /etc/install, /usr/sbin/install
2943 # SunOS /usr/etc/install
2944 # IRIX /sbin/install
2945 # AIX /bin/install
2946 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2947 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2948 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2949 # ./install, which can be erroneously created by make from ./install.sh.
2950 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2951 echo "configure:2952: checking for a BSD compatible install" >&5
2952 if test -z "$INSTALL"; then
2953 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2954   echo $ac_n "(cached) $ac_c" 1>&6
2955 else
2956     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2957   for ac_dir in $PATH; do
2958     # Account for people who put trailing slashes in PATH elements.
2959     case "$ac_dir/" in
2960     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2961     *)
2962       # OSF1 and SCO ODT 3.0 have their own names for install.
2963       # Don't use installbsd from OSF since it installs stuff as root
2964       # by default.
2965       for ac_prog in ginstall scoinst install; do
2966         if test -f $ac_dir/$ac_prog; then
2967           if test $ac_prog = install &&
2968             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # AIX install.  It has an incompatible calling convention.
2970             :
2971           elif test $ac_prog = install &&
2972             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2973             # program-specific install script used by HP pwplus--don't use.
2974             :
2975           else
2976             ac_cv_path_install="$ac_dir/$ac_prog -c"
2977             break 2
2978           fi
2979         fi
2980       done
2981       ;;
2982     esac
2983   done
2984   IFS="$ac_save_IFS"
2985
2986 fi
2987   if test "${ac_cv_path_install+set}" = set; then
2988     INSTALL="$ac_cv_path_install"
2989   else
2990     # As a last resort, use the slow shell script.  We don't cache a
2991     # path for INSTALL within a source directory, because that will
2992     # break other packages using the cache if that directory is
2993     # removed, or if the path is relative.
2994     INSTALL="$ac_install_sh"
2995   fi
2996 fi
2997 echo "$ac_t""$INSTALL" 1>&6
2998
2999 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3000 # It thinks the first close brace ends the variable substitution.
3001 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3002
3003 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3004
3005 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3006
3007
3008 cat >> confdefs.h <<\EOF
3009 #define HAVE_MKVERSION 1
3010 EOF
3011
3012
3013
3014
3015 ol_aix_threads=no
3016 case "$target" in
3017 *-*-aix*)       if test -z "$CC" ; then
3018                 case "$ol_with_threads" in
3019                 auto | yes |  posix) ol_aix_threads=yes ;;
3020                 esac
3021         fi
3022 ;;
3023 esac
3024
3025 if test $ol_aix_threads = yes ; then
3026         if test -z "${CC}" ; then
3027                 for ac_prog in cc_r xlc_r cc
3028 do
3029 # Extract the first word of "$ac_prog", so it can be a program name with args.
3030 set dummy $ac_prog; ac_word=$2
3031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3032 echo "configure:3033: checking for $ac_word" >&5
3033 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3034   echo $ac_n "(cached) $ac_c" 1>&6
3035 else
3036   if test -n "$CC"; then
3037   ac_cv_prog_CC="$CC" # Let the user override the test.
3038 else
3039   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3040   ac_dummy="$PATH"
3041   for ac_dir in $ac_dummy; do
3042     test -z "$ac_dir" && ac_dir=.
3043     if test -f $ac_dir/$ac_word; then
3044       ac_cv_prog_CC="$ac_prog"
3045       break
3046     fi
3047   done
3048   IFS="$ac_save_ifs"
3049 fi
3050 fi
3051 CC="$ac_cv_prog_CC"
3052 if test -n "$CC"; then
3053   echo "$ac_t""$CC" 1>&6
3054 else
3055   echo "$ac_t""no" 1>&6
3056 fi
3057
3058 test -n "$CC" && break
3059 done
3060
3061
3062                 if test "$CC" = cc ; then
3063                                                 if test $ol_with_threads != auto ; then
3064                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3065                         else
3066                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3067                         fi
3068                         ol_with_threads=no
3069                 fi
3070         fi
3071
3072         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3073                 ol_with_threads=posix
3074                 ol_cv_pthread_create=yes
3075         fi
3076 fi
3077
3078 if test -z "${CC}"; then
3079         for ac_prog in cc gcc
3080 do
3081 # Extract the first word of "$ac_prog", so it can be a program name with args.
3082 set dummy $ac_prog; ac_word=$2
3083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3084 echo "configure:3085: checking for $ac_word" >&5
3085 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   if test -n "$CC"; then
3089   ac_cv_prog_CC="$CC" # Let the user override the test.
3090 else
3091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3092   ac_dummy="$PATH"
3093   for ac_dir in $ac_dummy; do
3094     test -z "$ac_dir" && ac_dir=.
3095     if test -f $ac_dir/$ac_word; then
3096       ac_cv_prog_CC="$ac_prog"
3097       break
3098     fi
3099   done
3100   IFS="$ac_save_ifs"
3101 fi
3102 fi
3103 CC="$ac_cv_prog_CC"
3104 if test -n "$CC"; then
3105   echo "$ac_t""$CC" 1>&6
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109
3110 test -n "$CC" && break
3111 done
3112 test -n "$CC" || CC="missing"
3113
3114
3115         if test "${CC}" = "missing" ; then
3116                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3117         fi
3118 fi
3119
3120 if test -z "${AR}"; then
3121         for ac_prog in ar gar
3122 do
3123 # Extract the first word of "$ac_prog", so it can be a program name with args.
3124 set dummy $ac_prog; ac_word=$2
3125 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3126 echo "configure:3127: checking for $ac_word" >&5
3127 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3128   echo $ac_n "(cached) $ac_c" 1>&6
3129 else
3130   if test -n "$AR"; then
3131   ac_cv_prog_AR="$AR" # Let the user override the test.
3132 else
3133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3134   ac_dummy="$PATH"
3135   for ac_dir in $ac_dummy; do
3136     test -z "$ac_dir" && ac_dir=.
3137     if test -f $ac_dir/$ac_word; then
3138       ac_cv_prog_AR="$ac_prog"
3139       break
3140     fi
3141   done
3142   IFS="$ac_save_ifs"
3143 fi
3144 fi
3145 AR="$ac_cv_prog_AR"
3146 if test -n "$AR"; then
3147   echo "$ac_t""$AR" 1>&6
3148 else
3149   echo "$ac_t""no" 1>&6
3150 fi
3151
3152 test -n "$AR" && break
3153 done
3154 test -n "$AR" || AR="missing"
3155
3156
3157         if test "${AR}" = "missing" ; then
3158                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3159         fi
3160 fi
3161
3162
3163
3164 # Find the correct PATH separator.  Usually this is `:', but
3165 # DJGPP uses `;' like DOS.
3166 if test "X${PATH_SEPARATOR+set}" != Xset; then
3167   UNAME=${UNAME-`uname 2>/dev/null`}
3168   case X$UNAME in
3169     *-DOS) lt_cv_sys_path_separator=';' ;;
3170     *)     lt_cv_sys_path_separator=':' ;;
3171   esac
3172   PATH_SEPARATOR=$lt_cv_sys_path_separator
3173 fi
3174
3175 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3176 echo "configure:3177: checking for Cygwin environment" >&5
3177 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3178   echo $ac_n "(cached) $ac_c" 1>&6
3179 else
3180   cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183
3184 int main() {
3185
3186 #ifndef __CYGWIN__
3187 #define __CYGWIN__ __CYGWIN32__
3188 #endif
3189 return __CYGWIN__;
3190 ; return 0; }
3191 EOF
3192 if { (eval echo configure:3193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3193   rm -rf conftest*
3194   ac_cv_cygwin=yes
3195 else
3196   echo "configure: failed program was:" >&5
3197   cat conftest.$ac_ext >&5
3198   rm -rf conftest*
3199   ac_cv_cygwin=no
3200 fi
3201 rm -f conftest*
3202 fi
3203
3204 echo "$ac_t""$ac_cv_cygwin" 1>&6
3205 CYGWIN=
3206 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3207 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3208 echo "configure:3209: checking for mingw32 environment" >&5
3209 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3210   echo $ac_n "(cached) $ac_c" 1>&6
3211 else
3212   cat > conftest.$ac_ext <<EOF
3213 #line 3214 "configure"
3214 #include "confdefs.h"
3215
3216 int main() {
3217 return __MINGW32__;
3218 ; return 0; }
3219 EOF
3220 if { (eval echo configure:3221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3221   rm -rf conftest*
3222   ac_cv_mingw32=yes
3223 else
3224   echo "configure: failed program was:" >&5
3225   cat conftest.$ac_ext >&5
3226   rm -rf conftest*
3227   ac_cv_mingw32=no
3228 fi
3229 rm -f conftest*
3230 fi
3231
3232 echo "$ac_t""$ac_cv_mingw32" 1>&6
3233 MINGW32=
3234 test "$ac_cv_mingw32" = yes && MINGW32=yes
3235 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3236 echo "configure:3237: checking for EMX OS/2 environment" >&5
3237 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3238   echo $ac_n "(cached) $ac_c" 1>&6
3239 else
3240   cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243
3244 int main() {
3245 return __EMX__;
3246 ; return 0; }
3247 EOF
3248 if { (eval echo configure:3249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3249   rm -rf conftest*
3250   ac_cv_emxos2=yes
3251 else
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   ac_cv_emxos2=no
3256 fi
3257 rm -f conftest*
3258 fi
3259
3260 echo "$ac_t""$ac_cv_emxos2" 1>&6
3261 EMXOS2=
3262 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3263 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3264 echo "configure:3265: checking how to run the C preprocessor" >&5
3265 # On Suns, sometimes $CPP names a directory.
3266 if test -n "$CPP" && test -d "$CPP"; then
3267   CPP=
3268 fi
3269 if test -z "$CPP"; then
3270 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3271   echo $ac_n "(cached) $ac_c" 1>&6
3272 else
3273     # This must be in double quotes, not single quotes, because CPP may get
3274   # substituted into the Makefile and "${CC-cc}" will confuse make.
3275   CPP="${CC-cc} -E"
3276   # On the NeXT, cc -E runs the code through the compiler's parser,
3277   # not just through cpp.
3278   cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 #include <assert.h>
3282 Syntax Error
3283 EOF
3284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3285 { (eval echo configure:3286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3287 if test -z "$ac_err"; then
3288   :
3289 else
3290   echo "$ac_err" >&5
3291   echo "configure: failed program was:" >&5
3292   cat conftest.$ac_ext >&5
3293   rm -rf conftest*
3294   CPP="${CC-cc} -E -traditional-cpp"
3295   cat > conftest.$ac_ext <<EOF
3296 #line 3297 "configure"
3297 #include "confdefs.h"
3298 #include <assert.h>
3299 Syntax Error
3300 EOF
3301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3302 { (eval echo configure:3303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3304 if test -z "$ac_err"; then
3305   :
3306 else
3307   echo "$ac_err" >&5
3308   echo "configure: failed program was:" >&5
3309   cat conftest.$ac_ext >&5
3310   rm -rf conftest*
3311   CPP="${CC-cc} -nologo -E"
3312   cat > conftest.$ac_ext <<EOF
3313 #line 3314 "configure"
3314 #include "confdefs.h"
3315 #include <assert.h>
3316 Syntax Error
3317 EOF
3318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3319 { (eval echo configure:3320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3321 if test -z "$ac_err"; then
3322   :
3323 else
3324   echo "$ac_err" >&5
3325   echo "configure: failed program was:" >&5
3326   cat conftest.$ac_ext >&5
3327   rm -rf conftest*
3328   CPP=/lib/cpp
3329 fi
3330 rm -f conftest*
3331 fi
3332 rm -f conftest*
3333 fi
3334 rm -f conftest*
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337   CPP="$ac_cv_prog_CPP"
3338 else
3339   ac_cv_prog_CPP="$CPP"
3340 fi
3341 echo "$ac_t""$CPP" 1>&6
3342
3343 # Check whether --enable-fast-install or --disable-fast-install was given.
3344 if test "${enable_fast_install+set}" = set; then
3345   enableval="$enable_fast_install"
3346   p=${PACKAGE-default}
3347 case $enableval in
3348 yes) enable_fast_install=yes ;;
3349 no) enable_fast_install=no ;;
3350 *)
3351   enable_fast_install=no
3352   # Look at the argument we got.  We use all the common list separators.
3353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3354   for pkg in $enableval; do
3355     if test "X$pkg" = "X$p"; then
3356       enable_fast_install=yes
3357     fi
3358   done
3359   IFS="$ac_save_ifs"
3360   ;;
3361 esac
3362 else
3363   enable_fast_install=yes
3364 fi
3365
3366 # Extract the first word of "gcc", so it can be a program name with args.
3367 set dummy gcc; ac_word=$2
3368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3369 echo "configure:3370: checking for $ac_word" >&5
3370 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3371   echo $ac_n "(cached) $ac_c" 1>&6
3372 else
3373   if test -n "$CC"; then
3374   ac_cv_prog_CC="$CC" # Let the user override the test.
3375 else
3376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3377   ac_dummy="$PATH"
3378   for ac_dir in $ac_dummy; do
3379     test -z "$ac_dir" && ac_dir=.
3380     if test -f $ac_dir/$ac_word; then
3381       ac_cv_prog_CC="gcc"
3382       break
3383     fi
3384   done
3385   IFS="$ac_save_ifs"
3386 fi
3387 fi
3388 CC="$ac_cv_prog_CC"
3389 if test -n "$CC"; then
3390   echo "$ac_t""$CC" 1>&6
3391 else
3392   echo "$ac_t""no" 1>&6
3393 fi
3394
3395 if test -z "$CC"; then
3396   # Extract the first word of "cc", so it can be a program name with args.
3397 set dummy cc; ac_word=$2
3398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3399 echo "configure:3400: checking for $ac_word" >&5
3400 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   if test -n "$CC"; then
3404   ac_cv_prog_CC="$CC" # Let the user override the test.
3405 else
3406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3407   ac_prog_rejected=no
3408   ac_dummy="$PATH"
3409   for ac_dir in $ac_dummy; do
3410     test -z "$ac_dir" && ac_dir=.
3411     if test -f $ac_dir/$ac_word; then
3412       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3413         ac_prog_rejected=yes
3414         continue
3415       fi
3416       ac_cv_prog_CC="cc"
3417       break
3418     fi
3419   done
3420   IFS="$ac_save_ifs"
3421 if test $ac_prog_rejected = yes; then
3422   # We found a bogon in the path, so make sure we never use it.
3423   set dummy $ac_cv_prog_CC
3424   shift
3425   if test $# -gt 0; then
3426     # We chose a different compiler from the bogus one.
3427     # However, it has the same basename, so the bogon will be chosen
3428     # first if we set CC to just the basename; use the full file name.
3429     shift
3430     set dummy "$ac_dir/$ac_word" "$@"
3431     shift
3432     ac_cv_prog_CC="$@"
3433   fi
3434 fi
3435 fi
3436 fi
3437 CC="$ac_cv_prog_CC"
3438 if test -n "$CC"; then
3439   echo "$ac_t""$CC" 1>&6
3440 else
3441   echo "$ac_t""no" 1>&6
3442 fi
3443
3444   if test -z "$CC"; then
3445     case "`uname -s`" in
3446     *win32* | *WIN32* | *CYGWIN*)
3447       # Extract the first word of "cl", so it can be a program name with args.
3448 set dummy cl; ac_word=$2
3449 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3450 echo "configure:3451: checking for $ac_word" >&5
3451 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3452   echo $ac_n "(cached) $ac_c" 1>&6
3453 else
3454   if test -n "$CC"; then
3455   ac_cv_prog_CC="$CC" # Let the user override the test.
3456 else
3457   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3458   ac_dummy="$PATH"
3459   for ac_dir in $ac_dummy; do
3460     test -z "$ac_dir" && ac_dir=.
3461     if test -f $ac_dir/$ac_word; then
3462       ac_cv_prog_CC="cl"
3463       break
3464     fi
3465   done
3466   IFS="$ac_save_ifs"
3467 fi
3468 fi
3469 CC="$ac_cv_prog_CC"
3470 if test -n "$CC"; then
3471   echo "$ac_t""$CC" 1>&6
3472 else
3473   echo "$ac_t""no" 1>&6
3474 fi
3475  ;;
3476     esac
3477   fi
3478   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3479 fi
3480
3481 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3482 echo "configure:3483: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3483
3484 ac_ext=c
3485 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3486 ac_cpp='$CPP $CPPFLAGS'
3487 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3488 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3489 cross_compiling=$ac_cv_prog_cc_cross
3490
3491 cat > conftest.$ac_ext << EOF
3492
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495
3496 main(){return(0);}
3497 EOF
3498 if { (eval echo configure:3499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3499   ac_cv_prog_cc_works=yes
3500   # If we can't run a trivial program, we are probably using a cross compiler.
3501   if (./conftest; exit) 2>/dev/null; then
3502     ac_cv_prog_cc_cross=no
3503   else
3504     ac_cv_prog_cc_cross=yes
3505   fi
3506 else
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   ac_cv_prog_cc_works=no
3510 fi
3511 rm -fr conftest*
3512 ac_ext=c
3513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3514 ac_cpp='$CPP $CPPFLAGS'
3515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3517 cross_compiling=$ac_cv_prog_cc_cross
3518
3519 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3520 if test $ac_cv_prog_cc_works = no; then
3521   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3522 fi
3523 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3524 echo "configure:3525: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3525 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3526 cross_compiling=$ac_cv_prog_cc_cross
3527
3528 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3529 echo "configure:3530: checking whether we are using GNU C" >&5
3530 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3531   echo $ac_n "(cached) $ac_c" 1>&6
3532 else
3533   cat > conftest.c <<EOF
3534 #ifdef __GNUC__
3535   yes;
3536 #endif
3537 EOF
3538 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3539   ac_cv_prog_gcc=yes
3540 else
3541   ac_cv_prog_gcc=no
3542 fi
3543 fi
3544
3545 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3546
3547 if test $ac_cv_prog_gcc = yes; then
3548   GCC=yes
3549 else
3550   GCC=
3551 fi
3552
3553 ac_test_CFLAGS="${CFLAGS+set}"
3554 ac_save_CFLAGS="$CFLAGS"
3555 CFLAGS=
3556 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3557 echo "configure:3558: checking whether ${CC-cc} accepts -g" >&5
3558 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3559   echo $ac_n "(cached) $ac_c" 1>&6
3560 else
3561   echo 'void f(){}' > conftest.c
3562 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3563   ac_cv_prog_cc_g=yes
3564 else
3565   ac_cv_prog_cc_g=no
3566 fi
3567 rm -f conftest*
3568
3569 fi
3570
3571 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3572 if test "$ac_test_CFLAGS" = set; then
3573   CFLAGS="$ac_save_CFLAGS"
3574 elif test $ac_cv_prog_cc_g = yes; then
3575   if test "$GCC" = yes; then
3576     CFLAGS="-g -O2"
3577   else
3578     CFLAGS="-g"
3579   fi
3580 else
3581   if test "$GCC" = yes; then
3582     CFLAGS="-O2"
3583   else
3584     CFLAGS=
3585   fi
3586 fi
3587
3588 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3589 if test "${with_gnu_ld+set}" = set; then
3590   withval="$with_gnu_ld"
3591   test "$withval" = no || with_gnu_ld=yes
3592 else
3593   with_gnu_ld=no
3594 fi
3595
3596 ac_prog=ld
3597 if test "$GCC" = yes; then
3598   # Check if gcc -print-prog-name=ld gives a path.
3599   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3600 echo "configure:3601: checking for ld used by GCC" >&5
3601   case $host in
3602   *-*-mingw*)
3603     # gcc leaves a trailing carriage return which upsets mingw
3604     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3605   *)
3606     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3607   esac
3608   case $ac_prog in
3609     # Accept absolute paths.
3610     [\\/]* | [A-Za-z]:[\\/]*)
3611       re_direlt='/[^/][^/]*/\.\./'
3612       # Canonicalize the path of ld
3613       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3614       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3615         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3616       done
3617       test -z "$LD" && LD="$ac_prog"
3618       ;;
3619   "")
3620     # If it fails, then pretend we aren't using GCC.
3621     ac_prog=ld
3622     ;;
3623   *)
3624     # If it is relative, then search for the first ld in PATH.
3625     with_gnu_ld=unknown
3626     ;;
3627   esac
3628 elif test "$with_gnu_ld" = yes; then
3629   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3630 echo "configure:3631: checking for GNU ld" >&5
3631 else
3632   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3633 echo "configure:3634: checking for non-GNU ld" >&5
3634 fi
3635 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3636   echo $ac_n "(cached) $ac_c" 1>&6
3637 else
3638   if test -z "$LD"; then
3639   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3640   for ac_dir in $PATH; do
3641     test -z "$ac_dir" && ac_dir=.
3642     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3643       lt_cv_path_LD="$ac_dir/$ac_prog"
3644       # Check to see if the program is GNU ld.  I'd rather use --version,
3645       # but apparently some GNU ld's only accept -v.
3646       # Break only if it was the GNU/non-GNU ld that we prefer.
3647       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3648         test "$with_gnu_ld" != no && break
3649       else
3650         test "$with_gnu_ld" != yes && break
3651       fi
3652     fi
3653   done
3654   IFS="$ac_save_ifs"
3655 else
3656   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3657 fi
3658 fi
3659
3660 LD="$lt_cv_path_LD"
3661 if test -n "$LD"; then
3662   echo "$ac_t""$LD" 1>&6
3663 else
3664   echo "$ac_t""no" 1>&6
3665 fi
3666 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3667 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3668 echo "configure:3669: checking if the linker ($LD) is GNU ld" >&5
3669 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3670   echo $ac_n "(cached) $ac_c" 1>&6
3671 else
3672   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3673 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3674   lt_cv_prog_gnu_ld=yes
3675 else
3676   lt_cv_prog_gnu_ld=no
3677 fi
3678 fi
3679
3680 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3681 with_gnu_ld=$lt_cv_prog_gnu_ld
3682
3683
3684 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3685 echo "configure:3686: checking for $LD option to reload object files" >&5
3686 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3687   echo $ac_n "(cached) $ac_c" 1>&6
3688 else
3689   lt_cv_ld_reload_flag='-r'
3690 fi
3691
3692 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3693 reload_flag=$lt_cv_ld_reload_flag
3694 test -n "$reload_flag" && reload_flag=" $reload_flag"
3695
3696 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3697 echo "configure:3698: checking for BSD-compatible nm" >&5
3698 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3699   echo $ac_n "(cached) $ac_c" 1>&6
3700 else
3701   if test -n "$NM"; then
3702   # Let the user override the test.
3703   lt_cv_path_NM="$NM"
3704 else
3705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3706   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3707     test -z "$ac_dir" && ac_dir=.
3708     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3709     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3710       # Check to see if the nm accepts a BSD-compat flag.
3711       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3712       #   nm: unknown option "B" ignored
3713       # Tru64's nm complains that /dev/null is an invalid object file
3714       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3715         lt_cv_path_NM="$tmp_nm -B"
3716         break
3717       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3718         lt_cv_path_NM="$tmp_nm -p"
3719         break
3720       else
3721         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3722         continue # so that we can try to find one that supports BSD flags
3723       fi
3724     fi
3725   done
3726   IFS="$ac_save_ifs"
3727   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3728 fi
3729 fi
3730
3731 NM="$lt_cv_path_NM"
3732 echo "$ac_t""$NM" 1>&6
3733
3734 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3735 echo "configure:3736: checking whether ln -s works" >&5
3736 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3737   echo $ac_n "(cached) $ac_c" 1>&6
3738 else
3739   rm -f conftestdata
3740 if ln -s X conftestdata 2>/dev/null
3741 then
3742   rm -f conftestdata
3743   ac_cv_prog_LN_S="ln -s"
3744 else
3745   ac_cv_prog_LN_S=ln
3746 fi
3747 fi
3748 LN_S="$ac_cv_prog_LN_S"
3749 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3750   echo "$ac_t""yes" 1>&6
3751 else
3752   echo "$ac_t""no" 1>&6
3753 fi
3754
3755 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3756 echo "configure:3757: checking how to recognise dependant libraries" >&5
3757 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3758   echo $ac_n "(cached) $ac_c" 1>&6
3759 else
3760   lt_cv_file_magic_cmd='$MAGIC_CMD'
3761 lt_cv_file_magic_test_file=
3762 lt_cv_deplibs_check_method='unknown'
3763 # Need to set the preceding variable on all platforms that support
3764 # interlibrary dependencies.
3765 # 'none' -- dependencies not supported.
3766 # `unknown' -- same as none, but documents that we really don't know.
3767 # 'pass_all' -- all dependencies passed with no checks.
3768 # 'test_compile' -- check by making test program.
3769 # 'file_magic [[regex]]' -- check by looking for files in library path
3770 # which responds to the $file_magic_cmd with a given egrep regex.
3771 # If you have `file' or equivalent on your system and you're not sure
3772 # whether `pass_all' will *always* work, you probably want this one.
3773
3774 case $host_os in
3775 aix4* | aix5*)
3776   lt_cv_deplibs_check_method=pass_all
3777   ;;
3778
3779 beos*)
3780   lt_cv_deplibs_check_method=pass_all
3781   ;;
3782
3783 bsdi4*)
3784   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3785   lt_cv_file_magic_cmd='/usr/bin/file -L'
3786   lt_cv_file_magic_test_file=/shlib/libc.so
3787   ;;
3788
3789 cygwin* | mingw* | pw32*)
3790   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3791   lt_cv_file_magic_cmd='$OBJDUMP -f'
3792   ;;
3793
3794 darwin* | rhapsody*)
3795   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3796   lt_cv_file_magic_cmd='/usr/bin/file -L'
3797   case "$host_os" in
3798   rhapsody* | darwin1.[012])
3799     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3800     ;;
3801   *) # Darwin 1.3 on
3802     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3803     ;;
3804   esac
3805   ;;
3806
3807 freebsd*)
3808   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3809     case $host_cpu in
3810     i*86 )
3811       # Not sure whether the presence of OpenBSD here was a mistake.
3812       # Let's accept both of them until this is cleared up.
3813       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3814       lt_cv_file_magic_cmd=/usr/bin/file
3815       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3816       ;;
3817     esac
3818   else
3819     lt_cv_deplibs_check_method=pass_all
3820   fi
3821   ;;
3822
3823 gnu*)
3824   lt_cv_deplibs_check_method=pass_all
3825   ;;
3826
3827 hpux10.20*|hpux11*)
3828   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3829   lt_cv_file_magic_cmd=/usr/bin/file
3830   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3831   ;;
3832
3833 irix5* | irix6*)
3834   case $host_os in
3835   irix5*)
3836     # this will be overridden with pass_all, but let us keep it just in case
3837     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3838     ;;
3839   *)
3840     case $LD in
3841     *-32|*"-32 ") libmagic=32-bit;;
3842     *-n32|*"-n32 ") libmagic=N32;;
3843     *-64|*"-64 ") libmagic=64-bit;;
3844     *) libmagic=never-match;;
3845     esac
3846     # this will be overridden with pass_all, but let us keep it just in case
3847     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3848     ;;
3849   esac
3850   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3851   lt_cv_deplibs_check_method=pass_all
3852   ;;
3853
3854 # This must be Linux ELF.
3855 linux-gnu*)
3856   case $host_cpu in
3857   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3858     lt_cv_deplibs_check_method=pass_all ;;
3859   *)
3860     # glibc up to 2.1.1 does not perform some relocations on ARM
3861     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3862   esac
3863   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3864   ;;
3865
3866 netbsd*)
3867   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3868     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3869   else
3870     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3871   fi
3872   ;;
3873
3874 newos6*)
3875   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3876   lt_cv_file_magic_cmd=/usr/bin/file
3877   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3878   ;;
3879
3880 openbsd*)
3881   lt_cv_file_magic_cmd=/usr/bin/file
3882   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3883   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3884     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3885   else
3886     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3887   fi
3888   ;;
3889
3890 osf3* | osf4* | osf5*)
3891   # this will be overridden with pass_all, but let us keep it just in case
3892   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3893   lt_cv_file_magic_test_file=/shlib/libc.so
3894   lt_cv_deplibs_check_method=pass_all
3895   ;;
3896
3897 sco3.2v5*)
3898   lt_cv_deplibs_check_method=pass_all
3899   ;;
3900
3901 solaris*)
3902   lt_cv_deplibs_check_method=pass_all
3903   lt_cv_file_magic_test_file=/lib/libc.so
3904   ;;
3905
3906 sysv5uw[78]* | sysv4*uw2*)
3907   lt_cv_deplibs_check_method=pass_all
3908   ;;
3909
3910 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3911   case $host_vendor in
3912   motorola)
3913     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]'
3914     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3915     ;;
3916   ncr)
3917     lt_cv_deplibs_check_method=pass_all
3918     ;;
3919   sequent)
3920     lt_cv_file_magic_cmd='/bin/file'
3921     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3922     ;;
3923   sni)
3924     lt_cv_file_magic_cmd='/bin/file'
3925     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3926     lt_cv_file_magic_test_file=/lib/libc.so
3927     ;;
3928   esac
3929   ;;
3930 esac
3931
3932 fi
3933
3934 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3935 file_magic_cmd=$lt_cv_file_magic_cmd
3936 deplibs_check_method=$lt_cv_deplibs_check_method
3937
3938 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3939 echo "configure:3940: checking for object suffix" >&5
3940 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3941   echo $ac_n "(cached) $ac_c" 1>&6
3942 else
3943   rm -f conftest*
3944 echo 'int i = 1;' > conftest.$ac_ext
3945 if { (eval echo configure:3946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3946   for ac_file in conftest.*; do
3947     case $ac_file in
3948     *.c) ;;
3949     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3950     esac
3951   done
3952 else
3953   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3954 fi
3955 rm -f conftest*
3956 fi
3957
3958 echo "$ac_t""$ac_cv_objext" 1>&6
3959 OBJEXT=$ac_cv_objext
3960 ac_objext=$ac_cv_objext
3961
3962
3963
3964
3965 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3966 echo "configure:3967: checking for executable suffix" >&5
3967 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3968   echo $ac_n "(cached) $ac_c" 1>&6
3969 else
3970   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3971   ac_cv_exeext=.exe
3972 else
3973   rm -f conftest*
3974   echo 'int main () { return 0; }' > conftest.$ac_ext
3975   ac_cv_exeext=
3976   if { (eval echo configure:3977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3977     for file in conftest.*; do
3978       case $file in
3979       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3980       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3981       esac
3982     done
3983   else
3984     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3985   fi
3986   rm -f conftest*
3987   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3988 fi
3989 fi
3990
3991 EXEEXT=""
3992 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3993 echo "$ac_t""${ac_cv_exeext}" 1>&6
3994 ac_exeext=$EXEEXT
3995
3996 if test $host != $build; then
3997   ac_tool_prefix=${host_alias}-
3998 else
3999   ac_tool_prefix=
4000 fi
4001
4002
4003
4004
4005 # Check for command to grab the raw symbol name followed by C symbol from nm.
4006 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4007 echo "configure:4008: checking command to parse $NM output" >&5
4008 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4009   echo $ac_n "(cached) $ac_c" 1>&6
4010 else
4011   
4012 # These are sane defaults that work on at least a few old systems.
4013 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4014
4015 # Character class describing NM global symbol codes.
4016 symcode='[BCDEGRST]'
4017
4018 # Regexp to match symbols that can be accessed directly from C.
4019 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4020
4021 # Transform the above into a raw symbol and a C symbol.
4022 symxfrm='\1 \2\3 \3'
4023
4024 # Transform an extracted symbol line into a proper C declaration
4025 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4026
4027 # Transform an extracted symbol line into symbol name and symbol address
4028 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'"
4029
4030 # Define system-specific variables.
4031 case $host_os in
4032 aix*)
4033   symcode='[BCDT]'
4034   ;;
4035 cygwin* | mingw* | pw32*)
4036   symcode='[ABCDGISTW]'
4037   ;;
4038 hpux*) # Its linker distinguishes data from code symbols
4039   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4040   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'"
4041   ;;
4042 irix*)
4043   symcode='[BCDEGRST]'
4044   ;;
4045 solaris* | sysv5*)
4046   symcode='[BDT]'
4047   ;;
4048 sysv4)
4049   symcode='[DFNSTU]'
4050   ;;
4051 esac
4052
4053 # Handle CRLF in mingw tool chain
4054 opt_cr=
4055 case $host_os in
4056 mingw*)
4057   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4058   ;;
4059 esac
4060
4061 # If we're using GNU nm, then use its standard symbol codes.
4062 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4063   symcode='[ABCDGISTW]'
4064 fi
4065
4066 # Try without a prefix undercore, then with it.
4067 for ac_symprfx in "" "_"; do
4068
4069   # Write the raw and C identifiers.
4070 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4071
4072   # Check to see that the pipe works correctly.
4073   pipe_works=no
4074   rm -f conftest*
4075   cat > conftest.$ac_ext <<EOF
4076 #ifdef __cplusplus
4077 extern "C" {
4078 #endif
4079 char nm_test_var;
4080 void nm_test_func(){}
4081 #ifdef __cplusplus
4082 }
4083 #endif
4084 int main(){nm_test_var='a';nm_test_func();return(0);}
4085 EOF
4086
4087   if { (eval echo configure:4088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4088     # Now try to grab the symbols.
4089     nlist=conftest.nm
4090     if { (eval echo configure:4091: \"$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
4091       # Try sorting and uniquifying the output.
4092       if sort "$nlist" | uniq > "$nlist"T; then
4093         mv -f "$nlist"T "$nlist"
4094       else
4095         rm -f "$nlist"T
4096       fi
4097
4098       # Make sure that we snagged all the symbols we need.
4099       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4100         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4101           cat <<EOF > conftest.$ac_ext
4102 #ifdef __cplusplus
4103 extern "C" {
4104 #endif
4105
4106 EOF
4107           # Now generate the symbol file.
4108           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4109
4110           cat <<EOF >> conftest.$ac_ext
4111 #if defined (__STDC__) && __STDC__
4112 # define lt_ptr void *
4113 #else
4114 # define lt_ptr char *
4115 # define const
4116 #endif
4117
4118 /* The mapping between symbol names and symbols. */
4119 const struct {
4120   const char *name;
4121   lt_ptr address;
4122 }
4123 lt_preloaded_symbols[] =
4124 {
4125 EOF
4126           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4127           cat <<\EOF >> conftest.$ac_ext
4128   {0, (lt_ptr) 0}
4129 };
4130
4131 #ifdef __cplusplus
4132 }
4133 #endif
4134 EOF
4135           # Now try linking the two files.
4136           mv conftest.$ac_objext conftstm.$ac_objext
4137           save_LIBS="$LIBS"
4138           save_CFLAGS="$CFLAGS"
4139           LIBS="conftstm.$ac_objext"
4140           CFLAGS="$CFLAGS$no_builtin_flag"
4141           if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4142             pipe_works=yes
4143           fi
4144           LIBS="$save_LIBS"
4145           CFLAGS="$save_CFLAGS"
4146         else
4147           echo "cannot find nm_test_func in $nlist" >&5
4148         fi
4149       else
4150         echo "cannot find nm_test_var in $nlist" >&5
4151       fi
4152     else
4153       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4154     fi
4155   else
4156     echo "$progname: failed program was:" >&5
4157     cat conftest.$ac_ext >&5
4158   fi
4159   rm -f conftest* conftst*
4160
4161   # Do not use the global_symbol_pipe unless it works.
4162   if test "$pipe_works" = yes; then
4163     break
4164   else
4165     lt_cv_sys_global_symbol_pipe=
4166   fi
4167 done
4168
4169 fi
4170
4171 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4172 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4173   global_symbol_to_cdecl=
4174   global_symbol_to_c_name_address=
4175 else
4176   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4177   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4178 fi
4179 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4180 then
4181   echo "$ac_t""failed" 1>&6
4182 else
4183   echo "$ac_t""ok" 1>&6
4184 fi
4185
4186 for ac_hdr in dlfcn.h
4187 do
4188 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4189 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_hdr" >&5
4191 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4192   echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194   cat > conftest.$ac_ext <<EOF
4195 #line 4196 "configure"
4196 #include "confdefs.h"
4197 #include <$ac_hdr>
4198 EOF
4199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4200 { (eval echo configure:4201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4201 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4202 if test -z "$ac_err"; then
4203   rm -rf conftest*
4204   eval "ac_cv_header_$ac_safe=yes"
4205 else
4206   echo "$ac_err" >&5
4207   echo "configure: failed program was:" >&5
4208   cat conftest.$ac_ext >&5
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=no"
4211 fi
4212 rm -f conftest*
4213 fi
4214 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4215   echo "$ac_t""yes" 1>&6
4216     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4217   cat >> confdefs.h <<EOF
4218 #define $ac_tr_hdr 1
4219 EOF
4220  
4221 else
4222   echo "$ac_t""no" 1>&6
4223 fi
4224 done
4225
4226
4227
4228
4229
4230 # Only perform the check for file, if the check method requires it
4231 case $deplibs_check_method in
4232 file_magic*)
4233   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4234     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for ${ac_tool_prefix}file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/${ac_tool_prefix}file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294 if test -z "$lt_cv_path_MAGIC_CMD"; then
4295   if test -n "$ac_tool_prefix"; then
4296     echo $ac_n "checking for file""... $ac_c" 1>&6
4297 echo "configure:4298: checking for file" >&5
4298 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4299   echo $ac_n "(cached) $ac_c" 1>&6
4300 else
4301   case $MAGIC_CMD in
4302   /*)
4303   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4304   ;;
4305   ?:/*)
4306   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4307   ;;
4308   *)
4309   ac_save_MAGIC_CMD="$MAGIC_CMD"
4310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4311   ac_dummy="/usr/bin:$PATH"
4312   for ac_dir in $ac_dummy; do
4313     test -z "$ac_dir" && ac_dir=.
4314     if test -f $ac_dir/file; then
4315       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4316       if test -n "$file_magic_test_file"; then
4317         case $deplibs_check_method in
4318         "file_magic "*)
4319           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4320           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4321           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4322             egrep "$file_magic_regex" > /dev/null; then
4323             :
4324           else
4325             cat <<EOF 1>&2
4326
4327 *** Warning: the command libtool uses to detect shared libraries,
4328 *** $file_magic_cmd, produces output that libtool cannot recognize.
4329 *** The result is that libtool may fail to recognize shared libraries
4330 *** as such.  This will affect the creation of libtool libraries that
4331 *** depend on shared libraries, but programs linked with such libtool
4332 *** libraries will work regardless of this problem.  Nevertheless, you
4333 *** may want to report the problem to your system manager and/or to
4334 *** bug-libtool@gnu.org
4335
4336 EOF
4337           fi ;;
4338         esac
4339       fi
4340       break
4341     fi
4342   done
4343   IFS="$ac_save_ifs"
4344   MAGIC_CMD="$ac_save_MAGIC_CMD"
4345   ;;
4346 esac
4347 fi
4348
4349 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4350 if test -n "$MAGIC_CMD"; then
4351   echo "$ac_t""$MAGIC_CMD" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356   else
4357     MAGIC_CMD=:
4358   fi
4359 fi
4360
4361   fi
4362   ;;
4363 esac
4364
4365 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4366 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4368 echo "configure:4369: checking for $ac_word" >&5
4369 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4370   echo $ac_n "(cached) $ac_c" 1>&6
4371 else
4372   if test -n "$RANLIB"; then
4373   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4374 else
4375   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4376   ac_dummy="$PATH"
4377   for ac_dir in $ac_dummy; do
4378     test -z "$ac_dir" && ac_dir=.
4379     if test -f $ac_dir/$ac_word; then
4380       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4381       break
4382     fi
4383   done
4384   IFS="$ac_save_ifs"
4385 fi
4386 fi
4387 RANLIB="$ac_cv_prog_RANLIB"
4388 if test -n "$RANLIB"; then
4389   echo "$ac_t""$RANLIB" 1>&6
4390 else
4391   echo "$ac_t""no" 1>&6
4392 fi
4393
4394
4395 if test -z "$ac_cv_prog_RANLIB"; then
4396 if test -n "$ac_tool_prefix"; then
4397   # Extract the first word of "ranlib", so it can be a program name with args.
4398 set dummy ranlib; ac_word=$2
4399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4400 echo "configure:4401: checking for $ac_word" >&5
4401 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4402   echo $ac_n "(cached) $ac_c" 1>&6
4403 else
4404   if test -n "$RANLIB"; then
4405   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4406 else
4407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4408   ac_dummy="$PATH"
4409   for ac_dir in $ac_dummy; do
4410     test -z "$ac_dir" && ac_dir=.
4411     if test -f $ac_dir/$ac_word; then
4412       ac_cv_prog_RANLIB="ranlib"
4413       break
4414     fi
4415   done
4416   IFS="$ac_save_ifs"
4417   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4418 fi
4419 fi
4420 RANLIB="$ac_cv_prog_RANLIB"
4421 if test -n "$RANLIB"; then
4422   echo "$ac_t""$RANLIB" 1>&6
4423 else
4424   echo "$ac_t""no" 1>&6
4425 fi
4426
4427 else
4428   RANLIB=":"
4429 fi
4430 fi
4431
4432 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4433 set dummy ${ac_tool_prefix}strip; ac_word=$2
4434 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4435 echo "configure:4436: checking for $ac_word" >&5
4436 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4437   echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439   if test -n "$STRIP"; then
4440   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4441 else
4442   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4443   ac_dummy="$PATH"
4444   for ac_dir in $ac_dummy; do
4445     test -z "$ac_dir" && ac_dir=.
4446     if test -f $ac_dir/$ac_word; then
4447       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4448       break
4449     fi
4450   done
4451   IFS="$ac_save_ifs"
4452 fi
4453 fi
4454 STRIP="$ac_cv_prog_STRIP"
4455 if test -n "$STRIP"; then
4456   echo "$ac_t""$STRIP" 1>&6
4457 else
4458   echo "$ac_t""no" 1>&6
4459 fi
4460
4461
4462 if test -z "$ac_cv_prog_STRIP"; then
4463 if test -n "$ac_tool_prefix"; then
4464   # Extract the first word of "strip", so it can be a program name with args.
4465 set dummy strip; ac_word=$2
4466 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4467 echo "configure:4468: checking for $ac_word" >&5
4468 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4469   echo $ac_n "(cached) $ac_c" 1>&6
4470 else
4471   if test -n "$STRIP"; then
4472   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4473 else
4474   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4475   ac_dummy="$PATH"
4476   for ac_dir in $ac_dummy; do
4477     test -z "$ac_dir" && ac_dir=.
4478     if test -f $ac_dir/$ac_word; then
4479       ac_cv_prog_STRIP="strip"
4480       break
4481     fi
4482   done
4483   IFS="$ac_save_ifs"
4484   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4485 fi
4486 fi
4487 STRIP="$ac_cv_prog_STRIP"
4488 if test -n "$STRIP"; then
4489   echo "$ac_t""$STRIP" 1>&6
4490 else
4491   echo "$ac_t""no" 1>&6
4492 fi
4493
4494 else
4495   STRIP=":"
4496 fi
4497 fi
4498
4499
4500 enable_dlopen=yes
4501 enable_win32_dll=yes
4502
4503 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4504 if test "${enable_libtool_lock+set}" = set; then
4505   enableval="$enable_libtool_lock"
4506   :
4507 fi
4508
4509 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4510
4511 # Some flags need to be propagated to the compiler or linker for good
4512 # libtool support.
4513 case $host in
4514 *-*-irix6*)
4515   # Find out which ABI we are using.
4516   echo '#line 4517 "configure"' > conftest.$ac_ext
4517   if { (eval echo configure:4518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4518     case `/usr/bin/file conftest.$ac_objext` in
4519     *32-bit*)
4520       LD="${LD-ld} -32"
4521       ;;
4522     *N32*)
4523       LD="${LD-ld} -n32"
4524       ;;
4525     *64-bit*)
4526       LD="${LD-ld} -64"
4527       ;;
4528     esac
4529   fi
4530   rm -rf conftest*
4531   ;;
4532
4533 *-*-sco3.2v5*)
4534   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4535   SAVE_CFLAGS="$CFLAGS"
4536   CFLAGS="$CFLAGS -belf"
4537   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4538 echo "configure:4539: checking whether the C compiler needs -belf" >&5
4539 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4540   echo $ac_n "(cached) $ac_c" 1>&6
4541 else
4542   
4543      ac_ext=c
4544 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4545 ac_cpp='$CPP $CPPFLAGS'
4546 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4547 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4548 cross_compiling=$ac_cv_prog_cc_cross
4549
4550      cat > conftest.$ac_ext <<EOF
4551 #line 4552 "configure"
4552 #include "confdefs.h"
4553
4554 int main() {
4555
4556 ; return 0; }
4557 EOF
4558 if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4559   rm -rf conftest*
4560   lt_cv_cc_needs_belf=yes
4561 else
4562   echo "configure: failed program was:" >&5
4563   cat conftest.$ac_ext >&5
4564   rm -rf conftest*
4565   lt_cv_cc_needs_belf=no
4566 fi
4567 rm -f conftest*
4568      ac_ext=c
4569 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4570 ac_cpp='$CPP $CPPFLAGS'
4571 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4572 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4573 cross_compiling=$ac_cv_prog_cc_cross
4574
4575 fi
4576
4577 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4578   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4579     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4580     CFLAGS="$SAVE_CFLAGS"
4581   fi
4582   ;;
4583
4584 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4585   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4586 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4587 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4588 echo "configure:4589: checking for $ac_word" >&5
4589 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4590   echo $ac_n "(cached) $ac_c" 1>&6
4591 else
4592   if test -n "$DLLTOOL"; then
4593   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4594 else
4595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4596   ac_dummy="$PATH"
4597   for ac_dir in $ac_dummy; do
4598     test -z "$ac_dir" && ac_dir=.
4599     if test -f $ac_dir/$ac_word; then
4600       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4601       break
4602     fi
4603   done
4604   IFS="$ac_save_ifs"
4605 fi
4606 fi
4607 DLLTOOL="$ac_cv_prog_DLLTOOL"
4608 if test -n "$DLLTOOL"; then
4609   echo "$ac_t""$DLLTOOL" 1>&6
4610 else
4611   echo "$ac_t""no" 1>&6
4612 fi
4613
4614
4615 if test -z "$ac_cv_prog_DLLTOOL"; then
4616 if test -n "$ac_tool_prefix"; then
4617   # Extract the first word of "dlltool", so it can be a program name with args.
4618 set dummy dlltool; ac_word=$2
4619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4620 echo "configure:4621: checking for $ac_word" >&5
4621 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   if test -n "$DLLTOOL"; then
4625   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4626 else
4627   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4628   ac_dummy="$PATH"
4629   for ac_dir in $ac_dummy; do
4630     test -z "$ac_dir" && ac_dir=.
4631     if test -f $ac_dir/$ac_word; then
4632       ac_cv_prog_DLLTOOL="dlltool"
4633       break
4634     fi
4635   done
4636   IFS="$ac_save_ifs"
4637   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4638 fi
4639 fi
4640 DLLTOOL="$ac_cv_prog_DLLTOOL"
4641 if test -n "$DLLTOOL"; then
4642   echo "$ac_t""$DLLTOOL" 1>&6
4643 else
4644   echo "$ac_t""no" 1>&6
4645 fi
4646
4647 else
4648   DLLTOOL="false"
4649 fi
4650 fi
4651
4652   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4653 set dummy ${ac_tool_prefix}as; ac_word=$2
4654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4655 echo "configure:4656: checking for $ac_word" >&5
4656 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4657   echo $ac_n "(cached) $ac_c" 1>&6
4658 else
4659   if test -n "$AS"; then
4660   ac_cv_prog_AS="$AS" # Let the user override the test.
4661 else
4662   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4663   ac_dummy="$PATH"
4664   for ac_dir in $ac_dummy; do
4665     test -z "$ac_dir" && ac_dir=.
4666     if test -f $ac_dir/$ac_word; then
4667       ac_cv_prog_AS="${ac_tool_prefix}as"
4668       break
4669     fi
4670   done
4671   IFS="$ac_save_ifs"
4672 fi
4673 fi
4674 AS="$ac_cv_prog_AS"
4675 if test -n "$AS"; then
4676   echo "$ac_t""$AS" 1>&6
4677 else
4678   echo "$ac_t""no" 1>&6
4679 fi
4680
4681
4682 if test -z "$ac_cv_prog_AS"; then
4683 if test -n "$ac_tool_prefix"; then
4684   # Extract the first word of "as", so it can be a program name with args.
4685 set dummy as; ac_word=$2
4686 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4687 echo "configure:4688: checking for $ac_word" >&5
4688 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4689   echo $ac_n "(cached) $ac_c" 1>&6
4690 else
4691   if test -n "$AS"; then
4692   ac_cv_prog_AS="$AS" # Let the user override the test.
4693 else
4694   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4695   ac_dummy="$PATH"
4696   for ac_dir in $ac_dummy; do
4697     test -z "$ac_dir" && ac_dir=.
4698     if test -f $ac_dir/$ac_word; then
4699       ac_cv_prog_AS="as"
4700       break
4701     fi
4702   done
4703   IFS="$ac_save_ifs"
4704   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4705 fi
4706 fi
4707 AS="$ac_cv_prog_AS"
4708 if test -n "$AS"; then
4709   echo "$ac_t""$AS" 1>&6
4710 else
4711   echo "$ac_t""no" 1>&6
4712 fi
4713
4714 else
4715   AS="false"
4716 fi
4717 fi
4718
4719   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4720 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4722 echo "configure:4723: checking for $ac_word" >&5
4723 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4724   echo $ac_n "(cached) $ac_c" 1>&6
4725 else
4726   if test -n "$OBJDUMP"; then
4727   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4728 else
4729   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4730   ac_dummy="$PATH"
4731   for ac_dir in $ac_dummy; do
4732     test -z "$ac_dir" && ac_dir=.
4733     if test -f $ac_dir/$ac_word; then
4734       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4735       break
4736     fi
4737   done
4738   IFS="$ac_save_ifs"
4739 fi
4740 fi
4741 OBJDUMP="$ac_cv_prog_OBJDUMP"
4742 if test -n "$OBJDUMP"; then
4743   echo "$ac_t""$OBJDUMP" 1>&6
4744 else
4745   echo "$ac_t""no" 1>&6
4746 fi
4747
4748
4749 if test -z "$ac_cv_prog_OBJDUMP"; then
4750 if test -n "$ac_tool_prefix"; then
4751   # Extract the first word of "objdump", so it can be a program name with args.
4752 set dummy objdump; ac_word=$2
4753 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4754 echo "configure:4755: checking for $ac_word" >&5
4755 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4756   echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758   if test -n "$OBJDUMP"; then
4759   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4760 else
4761   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4762   ac_dummy="$PATH"
4763   for ac_dir in $ac_dummy; do
4764     test -z "$ac_dir" && ac_dir=.
4765     if test -f $ac_dir/$ac_word; then
4766       ac_cv_prog_OBJDUMP="objdump"
4767       break
4768     fi
4769   done
4770   IFS="$ac_save_ifs"
4771   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4772 fi
4773 fi
4774 OBJDUMP="$ac_cv_prog_OBJDUMP"
4775 if test -n "$OBJDUMP"; then
4776   echo "$ac_t""$OBJDUMP" 1>&6
4777 else
4778   echo "$ac_t""no" 1>&6
4779 fi
4780
4781 else
4782   OBJDUMP="false"
4783 fi
4784 fi
4785
4786
4787   # recent cygwin and mingw systems supply a stub DllMain which the user
4788   # can override, but on older systems we have to supply one
4789   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4790 echo "configure:4791: checking if libtool should supply DllMain function" >&5
4791 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4792   echo $ac_n "(cached) $ac_c" 1>&6
4793 else
4794   cat > conftest.$ac_ext <<EOF
4795 #line 4796 "configure"
4796 #include "confdefs.h"
4797
4798 int main() {
4799 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4800       DllMain (0, 0, 0);
4801 ; return 0; }
4802 EOF
4803 if { (eval echo configure:4804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4804   rm -rf conftest*
4805   lt_cv_need_dllmain=no
4806 else
4807   echo "configure: failed program was:" >&5
4808   cat conftest.$ac_ext >&5
4809   rm -rf conftest*
4810   lt_cv_need_dllmain=yes
4811 fi
4812 rm -f conftest*
4813 fi
4814
4815 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4816
4817   case $host/$CC in
4818   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4819     # old mingw systems require "-dll" to link a DLL, while more recent ones
4820     # require "-mdll"
4821     SAVE_CFLAGS="$CFLAGS"
4822     CFLAGS="$CFLAGS -mdll"
4823     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4824 echo "configure:4825: checking how to link DLLs" >&5
4825 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4826   echo $ac_n "(cached) $ac_c" 1>&6
4827 else
4828   cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831
4832 int main() {
4833
4834 ; return 0; }
4835 EOF
4836 if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4837   rm -rf conftest*
4838   lt_cv_cc_dll_switch=-mdll
4839 else
4840   echo "configure: failed program was:" >&5
4841   cat conftest.$ac_ext >&5
4842   rm -rf conftest*
4843   lt_cv_cc_dll_switch=-dll
4844 fi
4845 rm -f conftest*
4846 fi
4847
4848 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4849     CFLAGS="$SAVE_CFLAGS" ;;
4850   *-*-cygwin* | *-*-pw32*)
4851     # cygwin systems need to pass --dll to the linker, and not link
4852     # crt.o which will require a WinMain@16 definition.
4853     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4854   esac
4855   ;;
4856   
4857 esac
4858
4859 # Sed substitution that helps us do robust quoting.  It backslashifies
4860 # metacharacters that are still active within double-quoted strings.
4861 Xsed='sed -e s/^X//'
4862 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4863
4864 # Same as above, but do not quote variable references.
4865 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4866
4867 # Sed substitution to delay expansion of an escaped shell variable in a
4868 # double_quote_subst'ed string.
4869 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4870
4871 # Constants:
4872 rm="rm -f"
4873
4874 # Global variables:
4875 default_ofile=libtool
4876 can_build_shared=yes
4877
4878 # All known linkers require a `.a' archive for static linking (except M$VC,
4879 # which needs '.lib').
4880 libext=a
4881 ltmain="$ac_aux_dir/ltmain.sh"
4882 ofile="$default_ofile"
4883 with_gnu_ld="$lt_cv_prog_gnu_ld"
4884 need_locks="$enable_libtool_lock"
4885
4886 old_CC="$CC"
4887 old_CFLAGS="$CFLAGS"
4888
4889 # Set sane defaults for various variables
4890 test -z "$AR" && AR=ar
4891 test -z "$AR_FLAGS" && AR_FLAGS=cru
4892 test -z "$AS" && AS=as
4893 test -z "$CC" && CC=cc
4894 test -z "$DLLTOOL" && DLLTOOL=dlltool
4895 test -z "$LD" && LD=ld
4896 test -z "$LN_S" && LN_S="ln -s"
4897 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4898 test -z "$NM" && NM=nm
4899 test -z "$OBJDUMP" && OBJDUMP=objdump
4900 test -z "$RANLIB" && RANLIB=:
4901 test -z "$STRIP" && STRIP=:
4902 test -z "$ac_objext" && ac_objext=o
4903
4904 if test x"$host" != x"$build"; then
4905   ac_tool_prefix=${host_alias}-
4906 else
4907   ac_tool_prefix=
4908 fi
4909
4910 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4911 case $host_os in
4912 linux-gnu*) ;;
4913 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4914 esac
4915
4916 case $host_os in
4917 aix3*)
4918   # AIX sometimes has problems with the GCC collect2 program.  For some
4919   # reason, if we set the COLLECT_NAMES environment variable, the problems
4920   # vanish in a puff of smoke.
4921   if test "X${COLLECT_NAMES+set}" != Xset; then
4922     COLLECT_NAMES=
4923     export COLLECT_NAMES
4924   fi
4925   ;;
4926 esac
4927
4928 # Determine commands to create old-style static archives.
4929 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4930 old_postinstall_cmds='chmod 644 $oldlib'
4931 old_postuninstall_cmds=
4932
4933 if test -n "$RANLIB"; then
4934   case $host_os in
4935   openbsd*)
4936     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4937     ;;
4938   *)
4939     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4940     ;;
4941   esac
4942   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4943 fi
4944
4945 # Allow CC to be a program name with arguments.
4946 set dummy $CC
4947 compiler="$2"
4948
4949 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4950 echo "configure:4951: checking for objdir" >&5
4951 rm -f .libs 2>/dev/null
4952 mkdir .libs 2>/dev/null
4953 if test -d .libs; then
4954   objdir=.libs
4955 else
4956   # MS-DOS does not allow filenames that begin with a dot.
4957   objdir=_libs
4958 fi
4959 rmdir .libs 2>/dev/null
4960 echo "$ac_t""$objdir" 1>&6
4961
4962
4963 # Check whether --with-pic or --without-pic was given.
4964 if test "${with_pic+set}" = set; then
4965   withval="$with_pic"
4966   pic_mode="$withval"
4967 else
4968   pic_mode=default
4969 fi
4970
4971 test -z "$pic_mode" && pic_mode=default
4972
4973 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4974 # in isolation, and that seeing it set (from the cache) indicates that
4975 # the associated values are set (in the cache) correctly too.
4976 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4977 echo "configure:4978: checking for $compiler option to produce PIC" >&5
4978 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4979   echo $ac_n "(cached) $ac_c" 1>&6
4980 else
4981    lt_cv_prog_cc_pic=
4982   lt_cv_prog_cc_shlib=
4983   lt_cv_prog_cc_wl=
4984   lt_cv_prog_cc_static=
4985   lt_cv_prog_cc_no_builtin=
4986   lt_cv_prog_cc_can_build_shared=$can_build_shared
4987
4988   if test "$GCC" = yes; then
4989     lt_cv_prog_cc_wl='-Wl,'
4990     lt_cv_prog_cc_static='-static'
4991
4992     case $host_os in
4993     aix*)
4994       # Below there is a dirty hack to force normal static linking with -ldl
4995       # The problem is because libdl dynamically linked with both libc and
4996       # libC (AIX C++ library), which obviously doesn't included in libraries
4997       # list by gcc. This cause undefined symbols with -static flags.
4998       # This hack allows C programs to be linked with "-static -ldl", but
4999       # not sure about C++ programs.
5000       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5001       ;;
5002     amigaos*)
5003       # FIXME: we need at least 68020 code to build shared libraries, but
5004       # adding the `-m68020' flag to GCC prevents building anything better,
5005       # like `-m68040'.
5006       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5007       ;;
5008     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5009       # PIC is the default for these OSes.
5010       ;;
5011     darwin* | rhapsody*)
5012       # PIC is the default on this platform
5013       # Common symbols not allowed in MH_DYLIB files
5014       lt_cv_prog_cc_pic='-fno-common'
5015       ;;
5016     cygwin* | mingw* | pw32* | os2*)
5017       # This hack is so that the source file can tell whether it is being
5018       # built for inclusion in a dll (and should export symbols for example).
5019       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5020       ;;
5021     sysv4*MP*)
5022       if test -d /usr/nec; then
5023          lt_cv_prog_cc_pic=-Kconform_pic
5024       fi
5025       ;;
5026     *)
5027       lt_cv_prog_cc_pic='-fPIC'
5028       ;;
5029     esac
5030   else
5031     # PORTME Check for PIC flags for the system compiler.
5032     case $host_os in
5033     aix3* | aix4* | aix5*)
5034       lt_cv_prog_cc_wl='-Wl,'
5035       # All AIX code is PIC.
5036       if test "$host_cpu" = ia64; then
5037         # AIX 5 now supports IA64 processor
5038         lt_cv_prog_cc_static='-Bstatic'
5039       else
5040         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5041       fi
5042       ;;
5043
5044     hpux9* | hpux10* | hpux11*)
5045       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5046       lt_cv_prog_cc_wl='-Wl,'
5047       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5048       lt_cv_prog_cc_pic='+Z'
5049       ;;
5050
5051     irix5* | irix6*)
5052       lt_cv_prog_cc_wl='-Wl,'
5053       lt_cv_prog_cc_static='-non_shared'
5054       # PIC (with -KPIC) is the default.
5055       ;;
5056
5057     cygwin* | mingw* | pw32* | os2*)
5058       # This hack is so that the source file can tell whether it is being
5059       # built for inclusion in a dll (and should export symbols for example).
5060       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5061       ;;
5062
5063     newsos6)
5064       lt_cv_prog_cc_pic='-KPIC'
5065       lt_cv_prog_cc_static='-Bstatic'
5066       ;;
5067
5068     osf3* | osf4* | osf5*)
5069       # All OSF/1 code is PIC.
5070       lt_cv_prog_cc_wl='-Wl,'
5071       lt_cv_prog_cc_static='-non_shared'
5072       ;;
5073
5074     sco3.2v5*)
5075       lt_cv_prog_cc_pic='-Kpic'
5076       lt_cv_prog_cc_static='-dn'
5077       lt_cv_prog_cc_shlib='-belf'
5078       ;;
5079
5080     solaris*)
5081       lt_cv_prog_cc_pic='-KPIC'
5082       lt_cv_prog_cc_static='-Bstatic'
5083       lt_cv_prog_cc_wl='-Wl,'
5084       ;;
5085
5086     sunos4*)
5087       lt_cv_prog_cc_pic='-PIC'
5088       lt_cv_prog_cc_static='-Bstatic'
5089       lt_cv_prog_cc_wl='-Qoption ld '
5090       ;;
5091
5092     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5093       lt_cv_prog_cc_pic='-KPIC'
5094       lt_cv_prog_cc_static='-Bstatic'
5095       if test "x$host_vendor" = xsni; then
5096         lt_cv_prog_cc_wl='-LD'
5097       else
5098         lt_cv_prog_cc_wl='-Wl,'
5099       fi
5100       ;;
5101
5102     uts4*)
5103       lt_cv_prog_cc_pic='-pic'
5104       lt_cv_prog_cc_static='-Bstatic'
5105       ;;
5106
5107     sysv4*MP*)
5108       if test -d /usr/nec ;then
5109         lt_cv_prog_cc_pic='-Kconform_pic'
5110         lt_cv_prog_cc_static='-Bstatic'
5111       fi
5112       ;;
5113
5114     *)
5115       lt_cv_prog_cc_can_build_shared=no
5116       ;;
5117     esac
5118   fi
5119
5120 fi
5121
5122 if test -z "$lt_cv_prog_cc_pic"; then
5123   echo "$ac_t""none" 1>&6
5124 else
5125   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5126
5127   # Check to make sure the pic_flag actually works.
5128   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5129 echo "configure:5130: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5130   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5131   echo $ac_n "(cached) $ac_c" 1>&6
5132 else
5133       save_CFLAGS="$CFLAGS"
5134     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5135     cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138
5139 int main() {
5140
5141 ; return 0; }
5142 EOF
5143 if { (eval echo configure:5144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5144   rm -rf conftest*
5145         case $host_os in
5146       hpux9* | hpux10* | hpux11*)
5147         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5148         # they create non-PIC objects.  So, if there were any warnings, we
5149         # assume that PIC is not supported.
5150         if test -s conftest.err; then
5151           lt_cv_prog_cc_pic_works=no
5152         else
5153           lt_cv_prog_cc_pic_works=yes
5154         fi
5155         ;;
5156       *)
5157         lt_cv_prog_cc_pic_works=yes
5158         ;;
5159       esac
5160     
5161 else
5162   echo "configure: failed program was:" >&5
5163   cat conftest.$ac_ext >&5
5164   rm -rf conftest*
5165         lt_cv_prog_cc_pic_works=no
5166     
5167 fi
5168 rm -f conftest*
5169     CFLAGS="$save_CFLAGS"
5170   
5171 fi
5172
5173
5174   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5175     lt_cv_prog_cc_pic=
5176     lt_cv_prog_cc_can_build_shared=no
5177   else
5178     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5179   fi
5180
5181   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5182 fi
5183
5184 # Check for any special shared library compilation flags.
5185 if test -n "$lt_cv_prog_cc_shlib"; then
5186   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5187   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5188   else
5189    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5190     lt_cv_prog_cc_can_build_shared=no
5191   fi
5192 fi
5193
5194 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5195 echo "configure:5196: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5196 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5197   echo $ac_n "(cached) $ac_c" 1>&6
5198 else
5199     lt_cv_prog_cc_static_works=no
5200   save_LDFLAGS="$LDFLAGS"
5201   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5202   cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205
5206 int main() {
5207
5208 ; return 0; }
5209 EOF
5210 if { (eval echo configure:5211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5211   rm -rf conftest*
5212   lt_cv_prog_cc_static_works=yes
5213 else
5214   echo "configure: failed program was:" >&5
5215   cat conftest.$ac_ext >&5
5216 fi
5217 rm -f conftest*
5218   LDFLAGS="$save_LDFLAGS"
5219
5220 fi
5221
5222
5223 # Belt *and* braces to stop my trousers falling down:
5224 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5225 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5226
5227 pic_flag="$lt_cv_prog_cc_pic"
5228 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5229 wl="$lt_cv_prog_cc_wl"
5230 link_static_flag="$lt_cv_prog_cc_static"
5231 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5232 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5233
5234
5235 # Check to see if options -o and -c are simultaneously supported by compiler
5236 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5237 echo "configure:5238: checking if $compiler supports -c -o file.$ac_objext" >&5
5238 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5239   echo $ac_n "(cached) $ac_c" 1>&6
5240 else
5241   
5242 $rm -r conftest 2>/dev/null
5243 mkdir conftest
5244 cd conftest
5245 echo "int some_variable = 0;" > conftest.$ac_ext
5246 mkdir out
5247 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5248 # that will create temporary files in the current directory regardless of
5249 # the output directory.  Thus, making CWD read-only will cause this test
5250 # to fail, enabling locking or at least warning the user not to do parallel
5251 # builds.
5252 chmod -w .
5253 save_CFLAGS="$CFLAGS"
5254 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5255 compiler_c_o=no
5256 if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5257   # The compiler can only warn and ignore the option if not recognized
5258   # So say no if there are warnings
5259   if test -s out/conftest.err; then
5260     lt_cv_compiler_c_o=no
5261   else
5262     lt_cv_compiler_c_o=yes
5263   fi
5264 else
5265   # Append any errors to the config.log.
5266   cat out/conftest.err 1>&5
5267   lt_cv_compiler_c_o=no
5268 fi
5269 CFLAGS="$save_CFLAGS"
5270 chmod u+w .
5271 $rm conftest* out/*
5272 rmdir out
5273 cd ..
5274 rmdir conftest
5275 $rm -r conftest 2>/dev/null
5276
5277 fi
5278
5279 compiler_c_o=$lt_cv_compiler_c_o
5280 echo "$ac_t""$compiler_c_o" 1>&6
5281
5282 if test x"$compiler_c_o" = x"yes"; then
5283   # Check to see if we can write to a .lo
5284   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5285 echo "configure:5286: checking if $compiler supports -c -o file.lo" >&5
5286   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5287   echo $ac_n "(cached) $ac_c" 1>&6
5288 else
5289   
5290   lt_cv_compiler_o_lo=no
5291   save_CFLAGS="$CFLAGS"
5292   CFLAGS="$CFLAGS -c -o conftest.lo"
5293   save_objext="$ac_objext"
5294   ac_objext=lo
5295   cat > conftest.$ac_ext <<EOF
5296 #line 5297 "configure"
5297 #include "confdefs.h"
5298
5299 int main() {
5300 int some_variable = 0;
5301 ; return 0; }
5302 EOF
5303 if { (eval echo configure:5304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5304   rm -rf conftest*
5305       # The compiler can only warn and ignore the option if not recognized
5306     # So say no if there are warnings
5307     if test -s conftest.err; then
5308       lt_cv_compiler_o_lo=no
5309     else
5310       lt_cv_compiler_o_lo=yes
5311     fi
5312   
5313 else
5314   echo "configure: failed program was:" >&5
5315   cat conftest.$ac_ext >&5
5316 fi
5317 rm -f conftest*
5318   ac_objext="$save_objext"
5319   CFLAGS="$save_CFLAGS"
5320   
5321 fi
5322
5323   compiler_o_lo=$lt_cv_compiler_o_lo
5324   echo "$ac_t""$compiler_o_lo" 1>&6
5325 else
5326   compiler_o_lo=no
5327 fi
5328
5329 # Check to see if we can do hard links to lock some files if needed
5330 hard_links="nottested"
5331 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5332   # do not overwrite the value of need_locks provided by the user
5333   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5334 echo "configure:5335: checking if we can lock with hard links" >&5
5335   hard_links=yes
5336   $rm conftest*
5337   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5338   touch conftest.a
5339   ln conftest.a conftest.b 2>&5 || hard_links=no
5340   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5341   echo "$ac_t""$hard_links" 1>&6
5342   if test "$hard_links" = no; then
5343     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5344     need_locks=warn
5345   fi
5346 else
5347   need_locks=no
5348 fi
5349
5350 if test "$GCC" = yes; then
5351   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5352   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5353 echo "configure:5354: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5354   echo "int some_variable = 0;" > conftest.$ac_ext
5355   save_CFLAGS="$CFLAGS"
5356   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5357   compiler_rtti_exceptions=no
5358   cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361
5362 int main() {
5363 int some_variable = 0;
5364 ; return 0; }
5365 EOF
5366 if { (eval echo configure:5367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5367   rm -rf conftest*
5368       # The compiler can only warn and ignore the option if not recognized
5369     # So say no if there are warnings
5370     if test -s conftest.err; then
5371       compiler_rtti_exceptions=no
5372     else
5373       compiler_rtti_exceptions=yes
5374     fi
5375   
5376 else
5377   echo "configure: failed program was:" >&5
5378   cat conftest.$ac_ext >&5
5379 fi
5380 rm -f conftest*
5381   CFLAGS="$save_CFLAGS"
5382   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5383
5384   if test "$compiler_rtti_exceptions" = "yes"; then
5385     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5386   else
5387     no_builtin_flag=' -fno-builtin'
5388   fi
5389 fi
5390
5391 # See if the linker supports building shared libraries.
5392 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5393 echo "configure:5394: checking whether the linker ($LD) supports shared libraries" >&5
5394
5395 allow_undefined_flag=
5396 no_undefined_flag=
5397 need_lib_prefix=unknown
5398 need_version=unknown
5399 # when you set need_version to no, make sure it does not cause -set_version
5400 # flags to be left without arguments
5401 archive_cmds=
5402 archive_expsym_cmds=
5403 old_archive_from_new_cmds=
5404 old_archive_from_expsyms_cmds=
5405 export_dynamic_flag_spec=
5406 whole_archive_flag_spec=
5407 thread_safe_flag_spec=
5408 hardcode_into_libs=no
5409 hardcode_libdir_flag_spec=
5410 hardcode_libdir_separator=
5411 hardcode_direct=no
5412 hardcode_minus_L=no
5413 hardcode_shlibpath_var=unsupported
5414 runpath_var=
5415 link_all_deplibs=unknown
5416 always_export_symbols=no
5417 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5418 # include_expsyms should be a list of space-separated symbols to be *always*
5419 # included in the symbol list
5420 include_expsyms=
5421 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5422 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5423 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5424 # as well as any symbol that contains `d'.
5425 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5426 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5427 # platforms (ab)use it in PIC code, but their linkers get confused if
5428 # the symbol is explicitly referenced.  Since portable code cannot
5429 # rely on this symbol name, it's probably fine to never include it in
5430 # preloaded symbol tables.
5431 extract_expsyms_cmds=
5432
5433 case $host_os in
5434 cygwin* | mingw* | pw32*)
5435   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5436   # When not using gcc, we currently assume that we are using
5437   # Microsoft Visual C++.
5438   if test "$GCC" != yes; then
5439     with_gnu_ld=no
5440   fi
5441   ;;
5442 openbsd*)
5443   with_gnu_ld=no
5444   ;;
5445 esac
5446
5447 ld_shlibs=yes
5448 if test "$with_gnu_ld" = yes; then
5449   # If archive_cmds runs LD, not CC, wlarc should be empty
5450   wlarc='${wl}'
5451
5452   # See if GNU ld supports shared libraries.
5453   case $host_os in
5454   aix3* | aix4* | aix5*)
5455     # On AIX, the GNU linker is very broken
5456     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5457     ld_shlibs=no
5458     cat <<EOF 1>&2
5459
5460 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5461 *** to be unable to reliably create shared libraries on AIX.
5462 *** Therefore, libtool is disabling shared libraries support.  If you
5463 *** really care for shared libraries, you may want to modify your PATH
5464 *** so that a non-GNU linker is found, and then restart.
5465
5466 EOF
5467     ;;
5468
5469   amigaos*)
5470     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)'
5471     hardcode_libdir_flag_spec='-L$libdir'
5472     hardcode_minus_L=yes
5473
5474     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5475     # that the semantics of dynamic libraries on AmigaOS, at least up
5476     # to version 4, is to share data among multiple programs linked
5477     # with the same dynamic library.  Since this doesn't match the
5478     # behavior of shared libraries on other platforms, we can use
5479     # them.
5480     ld_shlibs=no
5481     ;;
5482
5483   beos*)
5484     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5485       allow_undefined_flag=unsupported
5486       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5487       # support --undefined.  This deserves some investigation.  FIXME
5488       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5489     else
5490       ld_shlibs=no
5491     fi
5492     ;;
5493
5494   cygwin* | mingw* | pw32*)
5495     # hardcode_libdir_flag_spec is actually meaningless, as there is
5496     # no search path for DLLs.
5497     hardcode_libdir_flag_spec='-L$libdir'
5498     allow_undefined_flag=unsupported
5499     always_export_symbols=yes
5500
5501     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5502       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5503       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5504       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5505       else $CC -o impgen impgen.c ; fi)~
5506       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5507
5508     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5509
5510     # cygwin and mingw dlls have different entry points and sets of symbols
5511     # to exclude.
5512     # FIXME: what about values for MSVC?
5513     dll_entry=__cygwin_dll_entry@12
5514     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5515     case $host_os in
5516     mingw*)
5517       # mingw values
5518       dll_entry=_DllMainCRTStartup@12
5519       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5520       ;;
5521     esac
5522
5523     # mingw and cygwin differ, and it's simplest to just exclude the union
5524     # of the two symbol sets.
5525     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5526
5527     # recent cygwin and mingw systems supply a stub DllMain which the user
5528     # can override, but on older systems we have to supply one (in ltdll.c)
5529     if test "x$lt_cv_need_dllmain" = "xyes"; then
5530       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5531       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~
5532         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5533     else
5534       ltdll_obj=
5535       ltdll_cmds=
5536     fi
5537
5538     # Extract the symbol export list from an `--export-all' def file,
5539     # then regenerate the def file from the symbol export list, so that
5540     # the compiled dll only exports the symbol export list.
5541     # Be careful not to strip the DATA tag left be newer dlltools.
5542     export_symbols_cmds="$ltdll_cmds"'
5543       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5544       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5545
5546     # If the export-symbols file already is a .def file (1st line
5547     # is EXPORTS), use it as is.
5548     # If DATA tags from a recent dlltool are present, honour them!
5549     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5550         cp $export_symbols $output_objdir/$soname-def;
5551       else
5552         echo EXPORTS > $output_objdir/$soname-def;
5553         _lt_hint=1;
5554         cat $export_symbols | while read symbol; do
5555          set dummy \$symbol;
5556          case \$# in
5557            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5558            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5559          esac;
5560          _lt_hint=`expr 1 + \$_lt_hint`;
5561         done;
5562       fi~
5563       '"$ltdll_cmds"'
5564       $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~
5565       $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~
5566       $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~
5567       $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~
5568       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5569     ;;
5570
5571   netbsd*)
5572     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5573       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5574       wlarc=
5575     else
5576       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5577       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5578     fi
5579     ;;
5580
5581   solaris* | sysv5*)
5582     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5583       ld_shlibs=no
5584       cat <<EOF 1>&2
5585
5586 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5587 *** create shared libraries on Solaris systems.  Therefore, libtool
5588 *** is disabling shared libraries support.  We urge you to upgrade GNU
5589 *** binutils to release 2.9.1 or newer.  Another option is to modify
5590 *** your PATH or compiler configuration so that the native linker is
5591 *** used, and then restart.
5592
5593 EOF
5594     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5595       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5596       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5597     else
5598       ld_shlibs=no
5599     fi
5600     ;;
5601
5602   sunos4*)
5603     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5604     wlarc=
5605     hardcode_direct=yes
5606     hardcode_shlibpath_var=no
5607     ;;
5608
5609   *)
5610     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5611       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5612       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5613     else
5614       ld_shlibs=no
5615     fi
5616     ;;
5617   esac
5618
5619   if test "$ld_shlibs" = yes; then
5620     runpath_var=LD_RUN_PATH
5621     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5622     export_dynamic_flag_spec='${wl}--export-dynamic'
5623     case $host_os in
5624     cygwin* | mingw* | pw32*)
5625       # dlltool doesn't understand --whole-archive et. al.
5626       whole_archive_flag_spec=
5627       ;;
5628     *)
5629       # ancient GNU ld didn't support --whole-archive et. al.
5630       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5631         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5632       else
5633         whole_archive_flag_spec=
5634       fi
5635       ;;
5636     esac
5637   fi
5638 else
5639   # PORTME fill in a description of your system's linker (not GNU ld)
5640   case $host_os in
5641   aix3*)
5642     allow_undefined_flag=unsupported
5643     always_export_symbols=yes
5644     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'
5645     # Note: this linker hardcodes the directories in LIBPATH if there
5646     # are no directories specified by -L.
5647     hardcode_minus_L=yes
5648     if test "$GCC" = yes && test -z "$link_static_flag"; then
5649       # Neither direct hardcoding nor static linking is supported with a
5650       # broken collect2.
5651       hardcode_direct=unsupported
5652     fi
5653     ;;
5654
5655   aix4* | aix5*)
5656     if test "$host_cpu" = ia64; then
5657       # On IA64, the linker does run time linking by default, so we don't
5658       # have to do anything special.
5659       aix_use_runtimelinking=no
5660       exp_sym_flag='-Bexport'
5661       no_entry_flag=""
5662     else
5663       aix_use_runtimelinking=no
5664
5665       # Test if we are trying to use run time linking or normal
5666       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5667       # need to do runtime linking.
5668       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5669         for ld_flag in $LDFLAGS; do
5670           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5671             aix_use_runtimelinking=yes
5672             break
5673           fi
5674         done
5675       esac
5676
5677       exp_sym_flag='-bexport'
5678       no_entry_flag='-bnoentry'
5679     fi
5680
5681     # When large executables or shared objects are built, AIX ld can
5682     # have problems creating the table of contents.  If linking a library
5683     # or program results in "error TOC overflow" add -mminimal-toc to
5684     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5685     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5686
5687     hardcode_direct=yes
5688     archive_cmds=''
5689     hardcode_libdir_separator=':'
5690     if test "$GCC" = yes; then
5691       case $host_os in aix4.[012]|aix4.[012].*)
5692         collect2name=`${CC} -print-prog-name=collect2`
5693         if test -f "$collect2name" && \
5694           strings "$collect2name" | grep resolve_lib_name >/dev/null
5695         then
5696           # We have reworked collect2
5697           hardcode_direct=yes
5698         else
5699           # We have old collect2
5700           hardcode_direct=unsupported
5701           # It fails to find uninstalled libraries when the uninstalled
5702           # path is not listed in the libpath.  Setting hardcode_minus_L
5703           # to unsupported forces relinking
5704           hardcode_minus_L=yes
5705           hardcode_libdir_flag_spec='-L$libdir'
5706           hardcode_libdir_separator=
5707         fi
5708       esac
5709
5710       shared_flag='-shared'
5711     else
5712       # not using gcc
5713       if test "$host_cpu" = ia64; then
5714         shared_flag='${wl}-G'
5715       else
5716         if test "$aix_use_runtimelinking" = yes; then
5717           shared_flag='${wl}-G'
5718         else
5719           shared_flag='${wl}-bM:SRE'
5720         fi
5721       fi
5722     fi
5723
5724     # It seems that -bexpall can do strange things, so it is better to
5725     # generate a list of symbols to export.
5726     always_export_symbols=yes
5727     if test "$aix_use_runtimelinking" = yes; then
5728       # Warning - without using the other runtime loading flags (-brtl),
5729       # -berok will link without error, but may produce a broken library.
5730       allow_undefined_flag='-berok'
5731       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5732       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"
5733     else
5734       if test "$host_cpu" = ia64; then
5735         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5736         allow_undefined_flag="-z nodefs"
5737         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"
5738       else
5739         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5740         # Warning - without using the other run time loading flags,
5741         # -berok will link without error, but may produce a broken library.
5742         allow_undefined_flag='${wl}-berok'
5743         # This is a bit strange, but is similar to how AIX traditionally builds
5744         # it's shared libraries.
5745         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'
5746       fi
5747     fi
5748     ;;
5749
5750   amigaos*)
5751     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)'
5752     hardcode_libdir_flag_spec='-L$libdir'
5753     hardcode_minus_L=yes
5754     # see comment about different semantics on the GNU ld section
5755     ld_shlibs=no
5756     ;;
5757
5758   cygwin* | mingw* | pw32*)
5759     # When not using gcc, we currently assume that we are using
5760     # Microsoft Visual C++.
5761     # hardcode_libdir_flag_spec is actually meaningless, as there is
5762     # no search path for DLLs.
5763     hardcode_libdir_flag_spec=' '
5764     allow_undefined_flag=unsupported
5765     # Tell ltmain to make .lib files, not .a files.
5766     libext=lib
5767     # FIXME: Setting linknames here is a bad hack.
5768     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5769     # The linker will automatically build a .lib file if we build a DLL.
5770     old_archive_from_new_cmds='true'
5771     # FIXME: Should let the user specify the lib program.
5772     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5773     fix_srcfile_path='`cygpath -w "$srcfile"`'
5774     ;;
5775
5776   darwin* | rhapsody*)
5777     case "$host_os" in
5778     rhapsody* | darwin1.[012])
5779       allow_undefined_flag='-undefined suppress'
5780       ;;
5781     *) # Darwin 1.3 on
5782       allow_undefined_flag='-flat_namespace -undefined suppress'
5783       ;;
5784     esac
5785     # FIXME: Relying on posixy $() will cause problems for
5786     #        cross-compilation, but unfortunately the echo tests do not
5787     #        yet detect zsh echo's removal of \ escapes.
5788     archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
5789     # We need to add '_' to the symbols in $export_symbols first
5790     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5791     hardcode_direct=yes
5792     hardcode_shlibpath_var=no
5793     whole_archive_flag_spec='-all_load $convenience'
5794     ;;
5795
5796   freebsd1*)
5797     ld_shlibs=no
5798     ;;
5799
5800   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5801   # support.  Future versions do this automatically, but an explicit c++rt0.o
5802   # does not break anything, and helps significantly (at the cost of a little
5803   # extra space).
5804   freebsd2.2*)
5805     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5806     hardcode_libdir_flag_spec='-R$libdir'
5807     hardcode_direct=yes
5808     hardcode_shlibpath_var=no
5809     ;;
5810
5811   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5812   freebsd2*)
5813     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5814     hardcode_direct=yes
5815     hardcode_minus_L=yes
5816     hardcode_shlibpath_var=no
5817     ;;
5818
5819   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5820   freebsd*)
5821     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5822     hardcode_libdir_flag_spec='-R$libdir'
5823     hardcode_direct=yes
5824     hardcode_shlibpath_var=no
5825     ;;
5826
5827   hpux9* | hpux10* | hpux11*)
5828     case $host_os in
5829     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' ;;
5830     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5831     esac
5832     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5833     hardcode_libdir_separator=:
5834     hardcode_direct=yes
5835     hardcode_minus_L=yes # Not in the search PATH, but as the default
5836                          # location of the library.
5837     export_dynamic_flag_spec='${wl}-E'
5838     ;;
5839
5840   irix5* | irix6*)
5841     if test "$GCC" = yes; then
5842       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'
5843     else
5844       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'
5845     fi
5846     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5847     hardcode_libdir_separator=:
5848     link_all_deplibs=yes
5849     ;;
5850
5851   netbsd*)
5852     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5853       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5854     else
5855       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5856     fi
5857     hardcode_libdir_flag_spec='-R$libdir'
5858     hardcode_direct=yes
5859     hardcode_shlibpath_var=no
5860     ;;
5861
5862   newsos6)
5863     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5864     hardcode_direct=yes
5865     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5866     hardcode_libdir_separator=:
5867     hardcode_shlibpath_var=no
5868     ;;
5869
5870   openbsd*)
5871     hardcode_direct=yes
5872     hardcode_shlibpath_var=no
5873     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5874       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5875       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5876       export_dynamic_flag_spec='${wl}-E'
5877     else
5878       case "$host_os" in
5879       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5880         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5881         hardcode_libdir_flag_spec='-R$libdir'
5882         ;;
5883       *)
5884         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5885         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5886         ;;
5887       esac
5888     fi
5889     ;;
5890
5891   os2*)
5892     hardcode_libdir_flag_spec='-L$libdir'
5893     hardcode_minus_L=yes
5894     allow_undefined_flag=unsupported
5895     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'
5896     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5897     ;;
5898
5899   osf3*)
5900     if test "$GCC" = yes; then
5901       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5902       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'
5903     else
5904       allow_undefined_flag=' -expect_unresolved \*'
5905       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'
5906     fi
5907     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5908     hardcode_libdir_separator=:
5909     ;;
5910
5911   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5912     if test "$GCC" = yes; then
5913       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5914       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'
5915       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5916     else
5917       allow_undefined_flag=' -expect_unresolved \*'
5918       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'
5919       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5920       $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'
5921
5922       #Both c and cxx compiler support -rpath directly
5923       hardcode_libdir_flag_spec='-rpath $libdir'
5924     fi
5925     hardcode_libdir_separator=:
5926     ;;
5927
5928   sco3.2v5*)
5929     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5930     hardcode_shlibpath_var=no
5931     runpath_var=LD_RUN_PATH
5932     hardcode_runpath_var=yes
5933     export_dynamic_flag_spec='${wl}-Bexport'
5934     ;;
5935
5936   solaris*)
5937     # gcc --version < 3.0 without binutils cannot create self contained
5938     # shared libraries reliably, requiring libgcc.a to resolve some of
5939     # the object symbols generated in some cases.  Libraries that use
5940     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5941     # a copy of libgcc.a into every shared library to guarantee resolving
5942     # such symbols causes other problems:  According to Tim Van Holder
5943     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5944     # (to the application) exception stack for one thing.
5945     no_undefined_flag=' -z defs'
5946     if test "$GCC" = yes; then
5947       case `$CC --version 2>/dev/null` in
5948       [12].*)
5949         cat <<EOF 1>&2
5950
5951 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5952 *** create self contained shared libraries on Solaris systems, without
5953 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5954 *** -no-undefined support, which will at least allow you to build shared
5955 *** libraries.  However, you may find that when you link such libraries
5956 *** into an application without using GCC, you have to manually add
5957 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5958 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5959 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5960
5961 EOF
5962         no_undefined_flag=
5963         ;;
5964       esac
5965     fi
5966     # $CC -shared without GNU ld will not create a library from C++
5967     # object files and a static libstdc++, better avoid it by now
5968     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5969     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5970                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5971     hardcode_libdir_flag_spec='-R$libdir'
5972     hardcode_shlibpath_var=no
5973     case $host_os in
5974     solaris2.[0-5] | solaris2.[0-5].*) ;;
5975     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5976       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5977     esac
5978     link_all_deplibs=yes
5979     ;;
5980
5981   sunos4*)
5982     if test "x$host_vendor" = xsequent; then
5983       # Use $CC to link under sequent, because it throws in some extra .o
5984       # files that make .init and .fini sections work.
5985       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5986     else
5987       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5988     fi
5989     hardcode_libdir_flag_spec='-L$libdir'
5990     hardcode_direct=yes
5991     hardcode_minus_L=yes
5992     hardcode_shlibpath_var=no
5993     ;;
5994
5995   sysv4)
5996     if test "x$host_vendor" = xsno; then
5997       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5998       hardcode_direct=yes # is this really true???
5999     else
6000       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6001       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6002     fi
6003     runpath_var='LD_RUN_PATH'
6004     hardcode_shlibpath_var=no
6005     ;;
6006
6007   sysv4.3*)
6008     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6009     hardcode_shlibpath_var=no
6010     export_dynamic_flag_spec='-Bexport'
6011     ;;
6012
6013   sysv5*)
6014     no_undefined_flag=' -z text'
6015     # $CC -shared without GNU ld will not create a library from C++
6016     # object files and a static libstdc++, better avoid it by now
6017     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6018     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6019                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6020     hardcode_libdir_flag_spec=
6021     hardcode_shlibpath_var=no
6022     runpath_var='LD_RUN_PATH'
6023     ;;
6024
6025   uts4*)
6026     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6027     hardcode_libdir_flag_spec='-L$libdir'
6028     hardcode_shlibpath_var=no
6029     ;;
6030
6031   dgux*)
6032     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6033     hardcode_libdir_flag_spec='-L$libdir'
6034     hardcode_shlibpath_var=no
6035     ;;
6036
6037   sysv4*MP*)
6038     if test -d /usr/nec; then
6039       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6040       hardcode_shlibpath_var=no
6041       runpath_var=LD_RUN_PATH
6042       hardcode_runpath_var=yes
6043       ld_shlibs=yes
6044     fi
6045     ;;
6046
6047   sysv4.2uw2*)
6048     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6049     hardcode_direct=yes
6050     hardcode_minus_L=no
6051     hardcode_shlibpath_var=no
6052     hardcode_runpath_var=yes
6053     runpath_var=LD_RUN_PATH
6054     ;;
6055
6056   sysv5uw7* | unixware7*)
6057     no_undefined_flag='${wl}-z ${wl}text'
6058     if test "$GCC" = yes; then
6059       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6060     else
6061       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6062     fi
6063     runpath_var='LD_RUN_PATH'
6064     hardcode_shlibpath_var=no
6065     ;;
6066
6067   *)
6068     ld_shlibs=no
6069     ;;
6070   esac
6071 fi
6072 echo "$ac_t""$ld_shlibs" 1>&6
6073 test "$ld_shlibs" = no && can_build_shared=no
6074
6075 # Check hardcoding attributes.
6076 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6077 echo "configure:6078: checking how to hardcode library paths into programs" >&5
6078 hardcode_action=
6079 if test -n "$hardcode_libdir_flag_spec" || \
6080    test -n "$runpath_var"; then
6081
6082   # We can hardcode non-existant directories.
6083   if test "$hardcode_direct" != no &&
6084      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6085      # have to relink, otherwise we might link with an installed library
6086      # when we should be linking with a yet-to-be-installed one
6087      ## test "$hardcode_shlibpath_var" != no &&
6088      test "$hardcode_minus_L" != no; then
6089     # Linking always hardcodes the temporary library directory.
6090     hardcode_action=relink
6091   else
6092     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6093     hardcode_action=immediate
6094   fi
6095 else
6096   # We cannot hardcode anything, or else we can only hardcode existing
6097   # directories.
6098   hardcode_action=unsupported
6099 fi
6100 echo "$ac_t""$hardcode_action" 1>&6
6101
6102 striplib=
6103 old_striplib=
6104 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6105 echo "configure:6106: checking whether stripping libraries is possible" >&5
6106 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6107   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6108   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6109   echo "$ac_t""yes" 1>&6
6110 else
6111   echo "$ac_t""no" 1>&6
6112 fi
6113
6114 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6115 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6116
6117 # PORTME Fill in your ld.so characteristics
6118 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6119 echo "configure:6120: checking dynamic linker characteristics" >&5
6120 library_names_spec=
6121 libname_spec='lib$name'
6122 soname_spec=
6123 postinstall_cmds=
6124 postuninstall_cmds=
6125 finish_cmds=
6126 finish_eval=
6127 shlibpath_var=
6128 shlibpath_overrides_runpath=unknown
6129 version_type=none
6130 dynamic_linker="$host_os ld.so"
6131 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6132 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6133
6134 case $host_os in
6135 aix3*)
6136   version_type=linux
6137   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6138   shlibpath_var=LIBPATH
6139
6140   # AIX has no versioning support, so we append a major version to the name.
6141   soname_spec='${libname}${release}.so$major'
6142   ;;
6143
6144 aix4* | aix5*)
6145   version_type=linux
6146   if test "$host_cpu" = ia64; then
6147     # AIX 5 supports IA64
6148     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6149     shlibpath_var=LD_LIBRARY_PATH
6150   else
6151     # With GCC up to 2.95.x, collect2 would create an import file
6152     # for dependence libraries.  The import file would start with
6153     # the line `#! .'.  This would cause the generated library to
6154     # depend on `.', always an invalid library.  This was fixed in
6155     # development snapshots of GCC prior to 3.0.
6156     case $host_os in
6157       aix4 | aix4.[01] | aix4.[01].*)
6158         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6159              echo ' yes '
6160              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6161           :
6162         else
6163           can_build_shared=no
6164         fi
6165         ;;
6166     esac
6167     # AIX (on Power*) has no versioning support, so currently we can
6168     # not hardcode correct soname into executable. Probably we can
6169     # add versioning support to collect2, so additional links can
6170     # be useful in future.
6171     if test "$aix_use_runtimelinking" = yes; then
6172       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6173       # instead of lib<name>.a to let people know that these are not
6174       # typical AIX shared libraries.
6175       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6176     else
6177       # We preserve .a as extension for shared libraries through AIX4.2
6178       # and later when we are not doing run time linking.
6179       library_names_spec='${libname}${release}.a $libname.a'
6180       soname_spec='${libname}${release}.so$major'
6181     fi
6182     shlibpath_var=LIBPATH
6183   fi
6184   ;;
6185
6186 amigaos*)
6187   library_names_spec='$libname.ixlibrary $libname.a'
6188   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6189   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'
6190   ;;
6191
6192 beos*)
6193   library_names_spec='${libname}.so'
6194   dynamic_linker="$host_os ld.so"
6195   shlibpath_var=LIBRARY_PATH
6196   ;;
6197
6198 bsdi4*)
6199   version_type=linux
6200   need_version=no
6201   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6202   soname_spec='${libname}${release}.so$major'
6203   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6204   shlibpath_var=LD_LIBRARY_PATH
6205   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6206   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6207   export_dynamic_flag_spec=-rdynamic
6208   # the default ld.so.conf also contains /usr/contrib/lib and
6209   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6210   # libtool to hard-code these into programs
6211   ;;
6212
6213 cygwin* | mingw* | pw32*)
6214   version_type=windows
6215   need_version=no
6216   need_lib_prefix=no
6217   case $GCC,$host_os in
6218   yes,cygwin*)
6219     library_names_spec='$libname.dll.a'
6220     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6221     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6222       dldir=$destdir/`dirname \$dlpath`~
6223       test -d \$dldir || mkdir -p \$dldir~
6224       $install_prog .libs/$dlname \$dldir/$dlname'
6225     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6226       dlpath=$dir/\$dldll~
6227        $rm \$dlpath'
6228     ;;
6229   yes,mingw*)
6230     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6231     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6232     ;;
6233   yes,pw32*)
6234     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6235     ;;
6236   *)
6237     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6238     ;;
6239   esac
6240   dynamic_linker='Win32 ld.exe'
6241   # FIXME: first we should search . and the directory the executable is in
6242   shlibpath_var=PATH
6243   ;;
6244
6245 darwin* | rhapsody*)
6246   dynamic_linker="$host_os dyld"
6247   version_type=darwin
6248   need_lib_prefix=no
6249   need_version=no
6250   # FIXME: Relying on posixy $() will cause problems for
6251   #        cross-compilation, but unfortunately the echo tests do not
6252   #        yet detect zsh echo's removal of \ escapes.
6253   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)'
6254   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6255   shlibpath_overrides_runpath=yes
6256   shlibpath_var=DYLD_LIBRARY_PATH
6257   ;;
6258
6259 freebsd1*)
6260   dynamic_linker=no
6261   ;;
6262
6263 freebsd*)
6264   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6265   version_type=freebsd-$objformat
6266   case $version_type in
6267     freebsd-elf*)
6268       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6269       need_version=no
6270       need_lib_prefix=no
6271       ;;
6272     freebsd-*)
6273       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6274       need_version=yes
6275       ;;
6276   esac
6277   shlibpath_var=LD_LIBRARY_PATH
6278   case $host_os in
6279   freebsd2*)
6280     shlibpath_overrides_runpath=yes
6281     ;;
6282   *)
6283     shlibpath_overrides_runpath=no
6284     hardcode_into_libs=yes
6285     ;;
6286   esac
6287   ;;
6288
6289 gnu*)
6290   version_type=linux
6291   need_lib_prefix=no
6292   need_version=no
6293   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6294   soname_spec='${libname}${release}.so$major'
6295   shlibpath_var=LD_LIBRARY_PATH
6296   hardcode_into_libs=yes
6297   ;;
6298
6299 hpux9* | hpux10* | hpux11*)
6300   # Give a soname corresponding to the major version so that dld.sl refuses to
6301   # link against other versions.
6302   dynamic_linker="$host_os dld.sl"
6303   version_type=sunos
6304   need_lib_prefix=no
6305   need_version=no
6306   shlibpath_var=SHLIB_PATH
6307   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6308   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6309   soname_spec='${libname}${release}.sl$major'
6310   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6311   postinstall_cmds='chmod 555 $lib'
6312   ;;
6313
6314 irix5* | irix6*)
6315   version_type=irix
6316   need_lib_prefix=no
6317   need_version=no
6318   soname_spec='${libname}${release}.so$major'
6319   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6320   case $host_os in
6321   irix5*)
6322     libsuff= shlibsuff=
6323     ;;
6324   *)
6325     case $LD in # libtool.m4 will add one of these switches to LD
6326     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6327     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6328     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6329     *) libsuff= shlibsuff= libmagic=never-match;;
6330     esac
6331     ;;
6332   esac
6333   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6334   shlibpath_overrides_runpath=no
6335   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6336   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6337   ;;
6338
6339 # No shared lib support for Linux oldld, aout, or coff.
6340 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6341   dynamic_linker=no
6342   ;;
6343
6344 # This must be Linux ELF.
6345 linux-gnu*)
6346   version_type=linux
6347   need_lib_prefix=no
6348   need_version=no
6349   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6350   soname_spec='${libname}${release}.so$major'
6351   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6352   shlibpath_var=LD_LIBRARY_PATH
6353   shlibpath_overrides_runpath=no
6354   # This implies no fast_install, which is unacceptable.
6355   # Some rework will be needed to allow for fast_install
6356   # before this can be enabled.
6357   hardcode_into_libs=yes
6358
6359   # We used to test for /lib/ld.so.1 and disable shared libraries on
6360   # powerpc, because MkLinux only supported shared libraries with the
6361   # GNU dynamic linker.  Since this was broken with cross compilers,
6362   # most powerpc-linux boxes support dynamic linking these days and
6363   # people can always --disable-shared, the test was removed, and we
6364   # assume the GNU/Linux dynamic linker is in use.
6365   dynamic_linker='GNU/Linux ld.so'
6366   ;;
6367
6368 netbsd*)
6369   version_type=sunos
6370   need_lib_prefix=no
6371   need_version=no
6372   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6373     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6374     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6375     dynamic_linker='NetBSD (a.out) ld.so'
6376   else
6377     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6378     soname_spec='${libname}${release}.so$major'
6379     dynamic_linker='NetBSD ld.elf_so'
6380   fi
6381   shlibpath_var=LD_LIBRARY_PATH
6382   shlibpath_overrides_runpath=yes
6383   hardcode_into_libs=yes
6384   ;;
6385
6386 newsos6)
6387   version_type=linux
6388   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6389   shlibpath_var=LD_LIBRARY_PATH
6390   shlibpath_overrides_runpath=yes
6391   ;;
6392
6393 openbsd*)
6394   version_type=sunos
6395   need_lib_prefix=no
6396   need_version=no
6397   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6398     case "$host_os" in
6399     openbsd2.[89] | openbsd2.[89].*)
6400       shlibpath_overrides_runpath=no
6401       ;;
6402     *)
6403       shlibpath_overrides_runpath=yes
6404       ;;
6405     esac
6406   else
6407     shlibpath_overrides_runpath=yes
6408   fi
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6410   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6411   shlibpath_var=LD_LIBRARY_PATH
6412   ;;
6413
6414 os2*)
6415   libname_spec='$name'
6416   need_lib_prefix=no
6417   library_names_spec='$libname.dll $libname.a'
6418   dynamic_linker='OS/2 ld.exe'
6419   shlibpath_var=LIBPATH
6420   ;;
6421
6422 osf3* | osf4* | osf5*)
6423   version_type=osf
6424   need_version=no
6425   soname_spec='${libname}${release}.so'
6426   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6427   shlibpath_var=LD_LIBRARY_PATH
6428   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6429   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6430   ;;
6431
6432 sco3.2v5*)
6433   version_type=osf
6434   soname_spec='${libname}${release}.so$major'
6435   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6436   shlibpath_var=LD_LIBRARY_PATH
6437   ;;
6438
6439 solaris*)
6440   version_type=linux
6441   need_lib_prefix=no
6442   need_version=no
6443   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6444   soname_spec='${libname}${release}.so$major'
6445   shlibpath_var=LD_LIBRARY_PATH
6446   shlibpath_overrides_runpath=yes
6447   hardcode_into_libs=yes
6448   # ldd complains unless libraries are executable
6449   postinstall_cmds='chmod +x $lib'
6450   ;;
6451
6452 sunos4*)
6453   version_type=sunos
6454   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6455   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6456   shlibpath_var=LD_LIBRARY_PATH
6457   shlibpath_overrides_runpath=yes
6458   if test "$with_gnu_ld" = yes; then
6459     need_lib_prefix=no
6460   fi
6461   need_version=yes
6462   ;;
6463
6464 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6465   version_type=linux
6466   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6467   soname_spec='${libname}${release}.so$major'
6468   shlibpath_var=LD_LIBRARY_PATH
6469   case $host_vendor in
6470     sni)
6471       shlibpath_overrides_runpath=no
6472       ;;
6473     motorola)
6474       need_lib_prefix=no
6475       need_version=no
6476       shlibpath_overrides_runpath=no
6477       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6478       ;;
6479   esac
6480   ;;
6481
6482 uts4*)
6483   version_type=linux
6484   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6485   soname_spec='${libname}${release}.so$major'
6486   shlibpath_var=LD_LIBRARY_PATH
6487   ;;
6488
6489 dgux*)
6490   version_type=linux
6491   need_lib_prefix=no
6492   need_version=no
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   soname_spec='${libname}${release}.so$major'
6495   shlibpath_var=LD_LIBRARY_PATH
6496   ;;
6497
6498 sysv4*MP*)
6499   if test -d /usr/nec ;then
6500     version_type=linux
6501     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6502     soname_spec='$libname.so.$major'
6503     shlibpath_var=LD_LIBRARY_PATH
6504   fi
6505   ;;
6506
6507 *)
6508   dynamic_linker=no
6509   ;;
6510 esac
6511 echo "$ac_t""$dynamic_linker" 1>&6
6512 test "$dynamic_linker" = no && can_build_shared=no
6513
6514 # Report the final consequences.
6515 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6516 echo "configure:6517: checking if libtool supports shared libraries" >&5
6517 echo "$ac_t""$can_build_shared" 1>&6
6518
6519 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6520 echo "configure:6521: checking whether to build shared libraries" >&5
6521 test "$can_build_shared" = "no" && enable_shared=no
6522
6523 # On AIX, shared libraries and static libraries use the same namespace, and
6524 # are all built from PIC.
6525 case "$host_os" in
6526 aix3*)
6527   test "$enable_shared" = yes && enable_static=no
6528   if test -n "$RANLIB"; then
6529     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6530     postinstall_cmds='$RANLIB $lib'
6531   fi
6532   ;;
6533
6534 aix4*)
6535   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6536     test "$enable_shared" = yes && enable_static=no
6537   fi
6538   ;;
6539 esac
6540 echo "$ac_t""$enable_shared" 1>&6
6541
6542 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6543 echo "configure:6544: checking whether to build static libraries" >&5
6544 # Make sure either enable_shared or enable_static is yes.
6545 test "$enable_shared" = yes || enable_static=yes
6546 echo "$ac_t""$enable_static" 1>&6
6547
6548 if test "$hardcode_action" = relink; then
6549   # Fast installation is not supported
6550   enable_fast_install=no
6551 elif test "$shlibpath_overrides_runpath" = yes ||
6552      test "$enable_shared" = no; then
6553   # Fast installation is not necessary
6554   enable_fast_install=needless
6555 fi
6556
6557 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6558 if test "$GCC" = yes; then
6559   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6560 fi
6561
6562 if test "x$enable_dlopen" != xyes; then
6563   enable_dlopen=unknown
6564   enable_dlopen_self=unknown
6565   enable_dlopen_self_static=unknown
6566 else
6567   lt_cv_dlopen=no
6568   lt_cv_dlopen_libs=
6569
6570   case $host_os in
6571   beos*)
6572     lt_cv_dlopen="load_add_on"
6573     lt_cv_dlopen_libs=
6574     lt_cv_dlopen_self=yes
6575     ;;
6576
6577   cygwin* | mingw* | pw32*)
6578     lt_cv_dlopen="LoadLibrary"
6579     lt_cv_dlopen_libs=
6580    ;;
6581
6582   *)
6583     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6584 echo "configure:6585: checking for shl_load" >&5
6585 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6586   echo $ac_n "(cached) $ac_c" 1>&6
6587 else
6588   cat > conftest.$ac_ext <<EOF
6589 #line 6590 "configure"
6590 #include "confdefs.h"
6591 /* System header to define __stub macros and hopefully few prototypes,
6592     which can conflict with char shl_load(); below.  */
6593 #include <assert.h>
6594 /* Override any gcc2 internal prototype to avoid an error.  */
6595 /* We use char because int might match the return type of a gcc2
6596     builtin and then its argument prototype would still apply.  */
6597 char shl_load();
6598 char (*f)();
6599
6600 int main() {
6601
6602 /* The GNU C library defines this for functions which it implements
6603     to always fail with ENOSYS.  Some functions are actually named
6604     something starting with __ and the normal name is an alias.  */
6605 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6606 choke me
6607 #else
6608 f = shl_load;
6609 #endif
6610
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_func_shl_load=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_func_shl_load=no"
6621 fi
6622 rm -f conftest*
6623 fi
6624
6625 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6626   echo "$ac_t""yes" 1>&6
6627   lt_cv_dlopen="shl_load"
6628 else
6629   echo "$ac_t""no" 1>&6
6630 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6631 echo "configure:6632: checking for shl_load in -ldld" >&5
6632 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6633 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   ac_save_LIBS="$LIBS"
6637 LIBS="-ldld  $LIBS"
6638 cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char shl_load();
6645
6646 int main() {
6647 shl_load()
6648 ; return 0; }
6649 EOF
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6651   rm -rf conftest*
6652   eval "ac_cv_lib_$ac_lib_var=yes"
6653 else
6654   echo "configure: failed program was:" >&5
6655   cat conftest.$ac_ext >&5
6656   rm -rf conftest*
6657   eval "ac_cv_lib_$ac_lib_var=no"
6658 fi
6659 rm -f conftest*
6660 LIBS="$ac_save_LIBS"
6661
6662 fi
6663 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6664   echo "$ac_t""yes" 1>&6
6665   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6666 else
6667   echo "$ac_t""no" 1>&6
6668 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6669 echo "configure:6670: checking for dlopen" >&5
6670 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6671   echo $ac_n "(cached) $ac_c" 1>&6
6672 else
6673   cat > conftest.$ac_ext <<EOF
6674 #line 6675 "configure"
6675 #include "confdefs.h"
6676 /* System header to define __stub macros and hopefully few prototypes,
6677     which can conflict with char dlopen(); below.  */
6678 #include <assert.h>
6679 /* Override any gcc2 internal prototype to avoid an error.  */
6680 /* We use char because int might match the return type of a gcc2
6681     builtin and then its argument prototype would still apply.  */
6682 char dlopen();
6683 char (*f)();
6684
6685 int main() {
6686
6687 /* The GNU C library defines this for functions which it implements
6688     to always fail with ENOSYS.  Some functions are actually named
6689     something starting with __ and the normal name is an alias.  */
6690 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6691 choke me
6692 #else
6693 f = dlopen;
6694 #endif
6695
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_func_dlopen=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_func_dlopen=no"
6706 fi
6707 rm -f conftest*
6708 fi
6709
6710 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712   lt_cv_dlopen="dlopen"
6713 else
6714   echo "$ac_t""no" 1>&6
6715 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6716 echo "configure:6717: checking for dlopen in -ldl" >&5
6717 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   ac_save_LIBS="$LIBS"
6722 LIBS="-ldl  $LIBS"
6723 cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* Override any gcc2 internal prototype to avoid an error.  */
6727 /* We use char because int might match the return type of a gcc2
6728     builtin and then its argument prototype would still apply.  */
6729 char dlopen();
6730
6731 int main() {
6732 dlopen()
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   eval "ac_cv_lib_$ac_lib_var=yes"
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_lib_$ac_lib_var=no"
6743 fi
6744 rm -f conftest*
6745 LIBS="$ac_save_LIBS"
6746
6747 fi
6748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6749   echo "$ac_t""yes" 1>&6
6750   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6751 else
6752   echo "$ac_t""no" 1>&6
6753 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6754 echo "configure:6755: checking for dlopen in -lsvld" >&5
6755 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6757   echo $ac_n "(cached) $ac_c" 1>&6
6758 else
6759   ac_save_LIBS="$LIBS"
6760 LIBS="-lsvld  $LIBS"
6761 cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char dlopen();
6768
6769 int main() {
6770 dlopen()
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=yes"
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_lib_$ac_lib_var=no"
6781 fi
6782 rm -f conftest*
6783 LIBS="$ac_save_LIBS"
6784
6785 fi
6786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6787   echo "$ac_t""yes" 1>&6
6788   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6789 else
6790   echo "$ac_t""no" 1>&6
6791 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6792 echo "configure:6793: checking for dld_link in -ldld" >&5
6793 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6795   echo $ac_n "(cached) $ac_c" 1>&6
6796 else
6797   ac_save_LIBS="$LIBS"
6798 LIBS="-ldld  $LIBS"
6799 cat > conftest.$ac_ext <<EOF
6800 #line 6801 "configure"
6801 #include "confdefs.h"
6802 /* Override any gcc2 internal prototype to avoid an error.  */
6803 /* We use char because int might match the return type of a gcc2
6804     builtin and then its argument prototype would still apply.  */
6805 char dld_link();
6806
6807 int main() {
6808 dld_link()
6809 ; return 0; }
6810 EOF
6811 if { (eval echo configure:6812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812   rm -rf conftest*
6813   eval "ac_cv_lib_$ac_lib_var=yes"
6814 else
6815   echo "configure: failed program was:" >&5
6816   cat conftest.$ac_ext >&5
6817   rm -rf conftest*
6818   eval "ac_cv_lib_$ac_lib_var=no"
6819 fi
6820 rm -f conftest*
6821 LIBS="$ac_save_LIBS"
6822
6823 fi
6824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6825   echo "$ac_t""yes" 1>&6
6826   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6827 else
6828   echo "$ac_t""no" 1>&6
6829 fi
6830
6831               
6832 fi
6833
6834             
6835 fi
6836
6837           
6838 fi
6839
6840         
6841 fi
6842
6843       
6844 fi
6845
6846     ;;
6847   esac
6848
6849   if test "x$lt_cv_dlopen" != xno; then
6850     enable_dlopen=yes
6851   else
6852     enable_dlopen=no
6853   fi
6854
6855   case $lt_cv_dlopen in
6856   dlopen)
6857     save_CPPFLAGS="$CPPFLAGS"
6858         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6859
6860     save_LDFLAGS="$LDFLAGS"
6861     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6862
6863     save_LIBS="$LIBS"
6864     LIBS="$lt_cv_dlopen_libs $LIBS"
6865
6866     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6867 echo "configure:6868: checking whether a program can dlopen itself" >&5
6868 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871           if test "$cross_compiling" = yes; then :
6872   lt_cv_dlopen_self=cross
6873 else
6874     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6875   lt_status=$lt_dlunknown
6876   cat > conftest.$ac_ext <<EOF
6877 #line 6878 "configure"
6878 #include "confdefs.h"
6879
6880 #if HAVE_DLFCN_H
6881 #include <dlfcn.h>
6882 #endif
6883
6884 #include <stdio.h>
6885
6886 #ifdef RTLD_GLOBAL
6887 #  define LT_DLGLOBAL           RTLD_GLOBAL
6888 #else
6889 #  ifdef DL_GLOBAL
6890 #    define LT_DLGLOBAL         DL_GLOBAL
6891 #  else
6892 #    define LT_DLGLOBAL         0
6893 #  endif
6894 #endif
6895
6896 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6897    find out it does not work in some platform. */
6898 #ifndef LT_DLLAZY_OR_NOW
6899 #  ifdef RTLD_LAZY
6900 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6901 #  else
6902 #    ifdef DL_LAZY
6903 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6904 #    else
6905 #      ifdef RTLD_NOW
6906 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6907 #      else
6908 #        ifdef DL_NOW
6909 #          define LT_DLLAZY_OR_NOW      DL_NOW
6910 #        else
6911 #          define LT_DLLAZY_OR_NOW      0
6912 #        endif
6913 #      endif
6914 #    endif
6915 #  endif
6916 #endif
6917
6918 #ifdef __cplusplus
6919 extern "C" void exit (int);
6920 #endif
6921
6922 void fnord() { int i=42;}
6923 int main ()
6924 {
6925   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6926   int status = $lt_dlunknown;
6927
6928   if (self)
6929     {
6930       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6931       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6932       /* dlclose (self); */
6933     }
6934
6935     exit (status);
6936 }
6937 EOF
6938   if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6939     (./conftest; exit; ) 2>/dev/null
6940     lt_status=$?
6941     case x$lt_status in
6942       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6943       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6944       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6945     esac
6946   else :
6947     # compilation failed
6948     lt_cv_dlopen_self=no
6949   fi
6950 fi
6951 rm -fr conftest*
6952
6953     
6954 fi
6955
6956 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6957
6958     if test "x$lt_cv_dlopen_self" = xyes; then
6959       LDFLAGS="$LDFLAGS $link_static_flag"
6960       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6961 echo "configure:6962: checking whether a statically linked program can dlopen itself" >&5
6962 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6963   echo $ac_n "(cached) $ac_c" 1>&6
6964 else
6965           if test "$cross_compiling" = yes; then :
6966   lt_cv_dlopen_self_static=cross
6967 else
6968     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6969   lt_status=$lt_dlunknown
6970   cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973
6974 #if HAVE_DLFCN_H
6975 #include <dlfcn.h>
6976 #endif
6977
6978 #include <stdio.h>
6979
6980 #ifdef RTLD_GLOBAL
6981 #  define LT_DLGLOBAL           RTLD_GLOBAL
6982 #else
6983 #  ifdef DL_GLOBAL
6984 #    define LT_DLGLOBAL         DL_GLOBAL
6985 #  else
6986 #    define LT_DLGLOBAL         0
6987 #  endif
6988 #endif
6989
6990 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6991    find out it does not work in some platform. */
6992 #ifndef LT_DLLAZY_OR_NOW
6993 #  ifdef RTLD_LAZY
6994 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6995 #  else
6996 #    ifdef DL_LAZY
6997 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6998 #    else
6999 #      ifdef RTLD_NOW
7000 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7001 #      else
7002 #        ifdef DL_NOW
7003 #          define LT_DLLAZY_OR_NOW      DL_NOW
7004 #        else
7005 #          define LT_DLLAZY_OR_NOW      0
7006 #        endif
7007 #      endif
7008 #    endif
7009 #  endif
7010 #endif
7011
7012 #ifdef __cplusplus
7013 extern "C" void exit (int);
7014 #endif
7015
7016 void fnord() { int i=42;}
7017 int main ()
7018 {
7019   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7020   int status = $lt_dlunknown;
7021
7022   if (self)
7023     {
7024       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7025       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7026       /* dlclose (self); */
7027     }
7028
7029     exit (status);
7030 }
7031 EOF
7032   if { (eval echo configure:7033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7033     (./conftest; exit; ) 2>/dev/null
7034     lt_status=$?
7035     case x$lt_status in
7036       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7037       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7038       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7039     esac
7040   else :
7041     # compilation failed
7042     lt_cv_dlopen_self_static=no
7043   fi
7044 fi
7045 rm -fr conftest*
7046
7047       
7048 fi
7049
7050 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7051     fi
7052
7053     CPPFLAGS="$save_CPPFLAGS"
7054     LDFLAGS="$save_LDFLAGS"
7055     LIBS="$save_LIBS"
7056     ;;
7057   esac
7058
7059   case $lt_cv_dlopen_self in
7060   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7061   *) enable_dlopen_self=unknown ;;
7062   esac
7063
7064   case $lt_cv_dlopen_self_static in
7065   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7066   *) enable_dlopen_self_static=unknown ;;
7067   esac
7068 fi
7069
7070
7071 if test "$enable_shared" = yes && test "$GCC" = yes; then
7072   case $archive_cmds in
7073   *'~'*)
7074     # FIXME: we may have to deal with multi-command sequences.
7075     ;;
7076   '$CC '*)
7077     # Test whether the compiler implicitly links with -lc since on some
7078     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7079     # to ld, don't add -lc before -lgcc.
7080     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7081 echo "configure:7082: checking whether -lc should be explicitly linked in" >&5
7082     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7083   echo $ac_n "(cached) $ac_c" 1>&6
7084 else
7085   $rm conftest*
7086     echo 'static int dummy;' > conftest.$ac_ext
7087
7088     if { (eval echo configure:7089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7089       soname=conftest
7090       lib=conftest
7091       libobjs=conftest.$ac_objext
7092       deplibs=
7093       wl=$lt_cv_prog_cc_wl
7094       compiler_flags=-v
7095       linker_flags=-v
7096       verstring=
7097       output_objdir=.
7098       libname=conftest
7099       save_allow_undefined_flag=$allow_undefined_flag
7100       allow_undefined_flag=
7101       if { (eval echo configure:7102: \"$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; }
7102       then
7103         lt_cv_archive_cmds_need_lc=no
7104       else
7105         lt_cv_archive_cmds_need_lc=yes
7106       fi
7107       allow_undefined_flag=$save_allow_undefined_flag
7108     else
7109       cat conftest.err 1>&5
7110     fi
7111 fi
7112
7113     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7114     ;;
7115   esac
7116 fi
7117 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7118
7119 # The second clause should only fire when bootstrapping the
7120 # libtool distribution, otherwise you forgot to ship ltmain.sh
7121 # with your package, and you will get complaints that there are
7122 # no rules to generate ltmain.sh.
7123 if test -f "$ltmain"; then
7124   :
7125 else
7126   # If there is no Makefile yet, we rely on a make rule to execute
7127   # `config.status --recheck' to rerun these tests and create the
7128   # libtool script then.
7129   test -f Makefile && make "$ltmain"
7130 fi
7131
7132 if test -f "$ltmain"; then
7133   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7134   $rm -f "${ofile}T"
7135
7136   echo creating $ofile
7137
7138   # Now quote all the things that may contain metacharacters while being
7139   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7140   # variables and quote the copies for generation of the libtool script.
7141   for var in echo old_CC old_CFLAGS \
7142     AR AR_FLAGS CC LD LN_S NM SHELL \
7143     reload_flag reload_cmds wl \
7144     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7145     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7146     library_names_spec soname_spec \
7147     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7148     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7149     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7150     old_striplib striplib file_magic_cmd export_symbols_cmds \
7151     deplibs_check_method allow_undefined_flag no_undefined_flag \
7152     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7153     global_symbol_to_c_name_address \
7154     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7155     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7156     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7157
7158     case $var in
7159     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7160     old_postinstall_cmds | old_postuninstall_cmds | \
7161     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7162     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7163     postinstall_cmds | postuninstall_cmds | \
7164     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7165       # Double-quote double-evaled strings.
7166       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7167       ;;
7168     *)
7169       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7170       ;;
7171     esac
7172   done
7173
7174   cat <<__EOF__ > "${ofile}T"
7175 #! $SHELL
7176
7177 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7178 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7179 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7180 #
7181 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7182 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7183 #
7184 # This program is free software; you can redistribute it and/or modify
7185 # it under the terms of the GNU General Public License as published by
7186 # the Free Software Foundation; either version 2 of the License, or
7187 # (at your option) any later version.
7188 #
7189 # This program is distributed in the hope that it will be useful, but
7190 # WITHOUT ANY WARRANTY; without even the implied warranty of
7191 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7192 # General Public License for more details.
7193 #
7194 # You should have received a copy of the GNU General Public License
7195 # along with this program; if not, write to the Free Software
7196 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7197 #
7198 # As a special exception to the GNU General Public License, if you
7199 # distribute this file as part of a program that contains a
7200 # configuration script generated by Autoconf, you may include it under
7201 # the same distribution terms that you use for the rest of that program.
7202
7203 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7204 Xsed="sed -e s/^X//"
7205
7206 # The HP-UX ksh and POSIX shell print the target directory to stdout
7207 # if CDPATH is set.
7208 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7209
7210 # ### BEGIN LIBTOOL CONFIG
7211
7212 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7213
7214 # Shell to use when invoking shell scripts.
7215 SHELL=$lt_SHELL
7216
7217 # Whether or not to build shared libraries.
7218 build_libtool_libs=$enable_shared
7219
7220 # Whether or not to build static libraries.
7221 build_old_libs=$enable_static
7222
7223 # Whether or not to add -lc for building shared libraries.
7224 build_libtool_need_lc=$need_lc
7225
7226 # Whether or not to optimize for fast installation.
7227 fast_install=$enable_fast_install
7228
7229 # The host system.
7230 host_alias=$host_alias
7231 host=$host
7232
7233 # An echo program that does not interpret backslashes.
7234 echo=$lt_echo
7235
7236 # The archiver.
7237 AR=$lt_AR
7238 AR_FLAGS=$lt_AR_FLAGS
7239
7240 # The default C compiler.
7241 CC=$lt_CC
7242
7243 # Is the compiler the GNU C compiler?
7244 with_gcc=$GCC
7245
7246 # The linker used to build libraries.
7247 LD=$lt_LD
7248
7249 # Whether we need hard or soft links.
7250 LN_S=$lt_LN_S
7251
7252 # A BSD-compatible nm program.
7253 NM=$lt_NM
7254
7255 # A symbol stripping program
7256 STRIP=$STRIP
7257
7258 # Used to examine libraries when file_magic_cmd begins "file"
7259 MAGIC_CMD=$MAGIC_CMD
7260
7261 # Used on cygwin: DLL creation program.
7262 DLLTOOL="$DLLTOOL"
7263
7264 # Used on cygwin: object dumper.
7265 OBJDUMP="$OBJDUMP"
7266
7267 # Used on cygwin: assembler.
7268 AS="$AS"
7269
7270 # The name of the directory that contains temporary libtool files.
7271 objdir=$objdir
7272
7273 # How to create reloadable object files.
7274 reload_flag=$lt_reload_flag
7275 reload_cmds=$lt_reload_cmds
7276
7277 # How to pass a linker flag through the compiler.
7278 wl=$lt_wl
7279
7280 # Object file suffix (normally "o").
7281 objext="$ac_objext"
7282
7283 # Old archive suffix (normally "a").
7284 libext="$libext"
7285
7286 # Executable file suffix (normally "").
7287 exeext="$exeext"
7288
7289 # Additional compiler flags for building library objects.
7290 pic_flag=$lt_pic_flag
7291 pic_mode=$pic_mode
7292
7293 # Does compiler simultaneously support -c and -o options?
7294 compiler_c_o=$lt_compiler_c_o
7295
7296 # Can we write directly to a .lo ?
7297 compiler_o_lo=$lt_compiler_o_lo
7298
7299 # Must we lock files when doing compilation ?
7300 need_locks=$lt_need_locks
7301
7302 # Do we need the lib prefix for modules?
7303 need_lib_prefix=$need_lib_prefix
7304
7305 # Do we need a version for libraries?
7306 need_version=$need_version
7307
7308 # Whether dlopen is supported.
7309 dlopen_support=$enable_dlopen
7310
7311 # Whether dlopen of programs is supported.
7312 dlopen_self=$enable_dlopen_self
7313
7314 # Whether dlopen of statically linked programs is supported.
7315 dlopen_self_static=$enable_dlopen_self_static
7316
7317 # Compiler flag to prevent dynamic linking.
7318 link_static_flag=$lt_link_static_flag
7319
7320 # Compiler flag to turn off builtin functions.
7321 no_builtin_flag=$lt_no_builtin_flag
7322
7323 # Compiler flag to allow reflexive dlopens.
7324 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7325
7326 # Compiler flag to generate shared objects directly from archives.
7327 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7328
7329 # Compiler flag to generate thread-safe objects.
7330 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7331
7332 # Library versioning type.
7333 version_type=$version_type
7334
7335 # Format of library name prefix.
7336 libname_spec=$lt_libname_spec
7337
7338 # List of archive names.  First name is the real one, the rest are links.
7339 # The last name is the one that the linker finds with -lNAME.
7340 library_names_spec=$lt_library_names_spec
7341
7342 # The coded name of the library, if different from the real name.
7343 soname_spec=$lt_soname_spec
7344
7345 # Commands used to build and install an old-style archive.
7346 RANLIB=$lt_RANLIB
7347 old_archive_cmds=$lt_old_archive_cmds
7348 old_postinstall_cmds=$lt_old_postinstall_cmds
7349 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7350
7351 # Create an old-style archive from a shared archive.
7352 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7353
7354 # Create a temporary old-style archive to link instead of a shared archive.
7355 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7356
7357 # Commands used to build and install a shared archive.
7358 archive_cmds=$lt_archive_cmds
7359 archive_expsym_cmds=$lt_archive_expsym_cmds
7360 postinstall_cmds=$lt_postinstall_cmds
7361 postuninstall_cmds=$lt_postuninstall_cmds
7362
7363 # Commands to strip libraries.
7364 old_striplib=$lt_old_striplib
7365 striplib=$lt_striplib
7366
7367 # Method to check whether dependent libraries are shared objects.
7368 deplibs_check_method=$lt_deplibs_check_method
7369
7370 # Command to use when deplibs_check_method == file_magic.
7371 file_magic_cmd=$lt_file_magic_cmd
7372
7373 # Flag that allows shared libraries with undefined symbols to be built.
7374 allow_undefined_flag=$lt_allow_undefined_flag
7375
7376 # Flag that forces no undefined symbols.
7377 no_undefined_flag=$lt_no_undefined_flag
7378
7379 # Commands used to finish a libtool library installation in a directory.
7380 finish_cmds=$lt_finish_cmds
7381
7382 # Same as above, but a single script fragment to be evaled but not shown.
7383 finish_eval=$lt_finish_eval
7384
7385 # Take the output of nm and produce a listing of raw symbols and C names.
7386 global_symbol_pipe=$lt_global_symbol_pipe
7387
7388 # Transform the output of nm in a proper C declaration
7389 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7390
7391 # Transform the output of nm in a C name address pair
7392 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7393
7394 # This is the shared library runtime path variable.
7395 runpath_var=$runpath_var
7396
7397 # This is the shared library path variable.
7398 shlibpath_var=$shlibpath_var
7399
7400 # Is shlibpath searched before the hard-coded library search path?
7401 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7402
7403 # How to hardcode a shared library path into an executable.
7404 hardcode_action=$hardcode_action
7405
7406 # Whether we should hardcode library paths into libraries.
7407 hardcode_into_libs=$hardcode_into_libs
7408
7409 # Flag to hardcode \$libdir into a binary during linking.
7410 # This must work even if \$libdir does not exist.
7411 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7412
7413 # Whether we need a single -rpath flag with a separated argument.
7414 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7415
7416 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7417 # resulting binary.
7418 hardcode_direct=$hardcode_direct
7419
7420 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7421 # resulting binary.
7422 hardcode_minus_L=$hardcode_minus_L
7423
7424 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7425 # the resulting binary.
7426 hardcode_shlibpath_var=$hardcode_shlibpath_var
7427
7428 # Variables whose values should be saved in libtool wrapper scripts and
7429 # restored at relink time.
7430 variables_saved_for_relink="$variables_saved_for_relink"
7431
7432 # Whether libtool must link a program against all its dependency libraries.
7433 link_all_deplibs=$link_all_deplibs
7434
7435 # Compile-time system search path for libraries
7436 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7437
7438 # Run-time system search path for libraries
7439 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7440
7441 # Fix the shell variable \$srcfile for the compiler.
7442 fix_srcfile_path="$fix_srcfile_path"
7443
7444 # Set to yes if exported symbols are required.
7445 always_export_symbols=$always_export_symbols
7446
7447 # The commands to list exported symbols.
7448 export_symbols_cmds=$lt_export_symbols_cmds
7449
7450 # The commands to extract the exported symbol list from a shared archive.
7451 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7452
7453 # Symbols that should not be listed in the preloaded symbols.
7454 exclude_expsyms=$lt_exclude_expsyms
7455
7456 # Symbols that must always be exported.
7457 include_expsyms=$lt_include_expsyms
7458
7459 # ### END LIBTOOL CONFIG
7460
7461 __EOF__
7462
7463   case $host_os in
7464   aix3*)
7465     cat <<\EOF >> "${ofile}T"
7466
7467 # AIX sometimes has problems with the GCC collect2 program.  For some
7468 # reason, if we set the COLLECT_NAMES environment variable, the problems
7469 # vanish in a puff of smoke.
7470 if test "X${COLLECT_NAMES+set}" != Xset; then
7471   COLLECT_NAMES=
7472   export COLLECT_NAMES
7473 fi
7474 EOF
7475     ;;
7476   esac
7477
7478   case $host_os in
7479   cygwin* | mingw* | pw32* | os2*)
7480     cat <<'EOF' >> "${ofile}T"
7481       # This is a source program that is used to create dlls on Windows
7482       # Don't remove nor modify the starting and closing comments
7483 # /* ltdll.c starts here */
7484 # #define WIN32_LEAN_AND_MEAN
7485 # #include <windows.h>
7486 # #undef WIN32_LEAN_AND_MEAN
7487 # #include <stdio.h>
7488 #
7489 # #ifndef __CYGWIN__
7490 # #  ifdef __CYGWIN32__
7491 # #    define __CYGWIN__ __CYGWIN32__
7492 # #  endif
7493 # #endif
7494 #
7495 # #ifdef __cplusplus
7496 # extern "C" {
7497 # #endif
7498 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7499 # #ifdef __cplusplus
7500 # }
7501 # #endif
7502 #
7503 # #ifdef __CYGWIN__
7504 # #include <cygwin/cygwin_dll.h>
7505 # DECLARE_CYGWIN_DLL( DllMain );
7506 # #endif
7507 # HINSTANCE __hDllInstance_base;
7508 #
7509 # BOOL APIENTRY
7510 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7511 # {
7512 #   __hDllInstance_base = hInst;
7513 #   return TRUE;
7514 # }
7515 # /* ltdll.c ends here */
7516         # This is a source program that is used to create import libraries
7517         # on Windows for dlls which lack them. Don't remove nor modify the
7518         # starting and closing comments
7519 # /* impgen.c starts here */
7520 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7521 #
7522 #  This file is part of GNU libtool.
7523 #
7524 #  This program is free software; you can redistribute it and/or modify
7525 #  it under the terms of the GNU General Public License as published by
7526 #  the Free Software Foundation; either version 2 of the License, or
7527 #  (at your option) any later version.
7528 #
7529 #  This program is distributed in the hope that it will be useful,
7530 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7531 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7532 #  GNU General Public License for more details.
7533 #
7534 #  You should have received a copy of the GNU General Public License
7535 #  along with this program; if not, write to the Free Software
7536 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7537 #  */
7538 #
7539 # #include <stdio.h>            /* for printf() */
7540 # #include <unistd.h>           /* for open(), lseek(), read() */
7541 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7542 # #include <string.h>           /* for strdup() */
7543 #
7544 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7545 # #ifndef O_BINARY
7546 # #define O_BINARY 0
7547 # #endif
7548 #
7549 # static unsigned int
7550 # pe_get16 (fd, offset)
7551 #      int fd;
7552 #      int offset;
7553 # {
7554 #   unsigned char b[2];
7555 #   lseek (fd, offset, SEEK_SET);
7556 #   read (fd, b, 2);
7557 #   return b[0] + (b[1]<<8);
7558 # }
7559 #
7560 # static unsigned int
7561 # pe_get32 (fd, offset)
7562 #     int fd;
7563 #     int offset;
7564 # {
7565 #   unsigned char b[4];
7566 #   lseek (fd, offset, SEEK_SET);
7567 #   read (fd, b, 4);
7568 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7569 # }
7570 #
7571 # static unsigned int
7572 # pe_as32 (ptr)
7573 #      void *ptr;
7574 # {
7575 #   unsigned char *b = ptr;
7576 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7577 # }
7578 #
7579 # int
7580 # main (argc, argv)
7581 #     int argc;
7582 #     char *argv[];
7583 # {
7584 #     int dll;
7585 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7586 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7587 #     unsigned long name_rvas, nexp;
7588 #     unsigned char *expdata, *erva;
7589 #     char *filename, *dll_name;
7590 #
7591 #     filename = argv[1];
7592 #
7593 #     dll = open(filename, O_RDONLY|O_BINARY);
7594 #     if (dll < 1)
7595 #       return 1;
7596 #
7597 #     dll_name = filename;
7598 #
7599 #     for (i=0; filename[i]; i++)
7600 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7601 #           dll_name = filename + i +1;
7602 #
7603 #     pe_header_offset = pe_get32 (dll, 0x3c);
7604 #     opthdr_ofs = pe_header_offset + 4 + 20;
7605 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7606 #
7607 #     if (num_entries < 1) /* no exports */
7608 #       return 1;
7609 #
7610 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7611 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7612 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7613 #     secptr = (pe_header_offset + 4 + 20 +
7614 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7615 #
7616 #     expptr = 0;
7617 #     for (i = 0; i < nsections; i++)
7618 #     {
7619 #       char sname[8];
7620 #       unsigned long secptr1 = secptr + 40 * i;
7621 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7622 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7623 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7624 #       lseek(dll, secptr1, SEEK_SET);
7625 #       read(dll, sname, 8);
7626 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7627 #       {
7628 #           expptr = fptr + (export_rva - vaddr);
7629 #           if (export_rva + export_size > vaddr + vsize)
7630 #               export_size = vsize - (export_rva - vaddr);
7631 #           break;
7632 #       }
7633 #     }
7634 #
7635 #     expdata = (unsigned char*)malloc(export_size);
7636 #     lseek (dll, expptr, SEEK_SET);
7637 #     read (dll, expdata, export_size);
7638 #     erva = expdata - export_rva;
7639 #
7640 #     nexp = pe_as32 (expdata+24);
7641 #     name_rvas = pe_as32 (expdata+32);
7642 #
7643 #     printf ("EXPORTS\n");
7644 #     for (i = 0; i<nexp; i++)
7645 #     {
7646 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7647 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7648 #     }
7649 #
7650 #     return 0;
7651 # }
7652 # /* impgen.c ends here */
7653
7654 EOF
7655     ;;
7656   esac
7657
7658   # We use sed instead of cat because bash on DJGPP gets confused if
7659   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7660   # text mode, it properly converts lines to CR/LF.  This bash problem
7661   # is reportedly fixed, but why not run on old versions too?
7662   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7663
7664   mv -f "${ofile}T" "$ofile" || \
7665     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7666   chmod +x "$ofile"
7667 fi
7668
7669
7670
7671
7672
7673 # This can be used to rebuild libtool when needed
7674 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7675
7676 # Always use our own libtool.
7677 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7678
7679 # Prevent multiple expansion
7680
7681
7682
7683 LTSTATIC=""
7684 if test "${OPENLDAP_CVS}"; then
7685         LTSTATIC="-static"
7686 fi
7687
7688 # test for ln hardlink support
7689 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7690 echo "configure:7691: checking whether ln works" >&5
7691 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7692   echo $ac_n "(cached) $ac_c" 1>&6
7693 else
7694   rm -f conftest.src conftest.dst
7695 echo "conftest" > conftest.src
7696 if ln conftest.src conftest.dst 2>/dev/null
7697 then
7698   ol_cv_prog_LN_H="ln"
7699 else
7700   ol_cv_prog_LN_H="cp"
7701 fi
7702 rm -f conftest.src conftest.dst
7703
7704 fi
7705 LN_H="$ol_cv_prog_LN_H"
7706 if test "$ol_cv_prog_LN_H" = "ln"; then
7707         echo "$ac_t""yes" 1>&6
7708 else
7709         echo "$ac_t""no" 1>&6
7710 fi
7711
7712 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7713 echo "configure:7714: checking whether ln -s works" >&5
7714 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7715   echo $ac_n "(cached) $ac_c" 1>&6
7716 else
7717   rm -f conftestdata
7718 if ln -s X conftestdata 2>/dev/null
7719 then
7720   rm -f conftestdata
7721   ac_cv_prog_LN_S="ln -s"
7722 else
7723   ac_cv_prog_LN_S=ln
7724 fi
7725 fi
7726 LN_S="$ac_cv_prog_LN_S"
7727 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7728   echo "$ac_t""yes" 1>&6
7729 else
7730   echo "$ac_t""no" 1>&6
7731 fi
7732
7733
7734 ol_link_perl=no
7735 if test $ol_enable_perl != no ; then
7736         # Extract the first word of "perl", so it can be a program name with args.
7737 set dummy perl; ac_word=$2
7738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_word" >&5
7740 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   case "$PERLBIN" in
7744   /*)
7745   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7746   ;;
7747   ?:/*)
7748   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7749   ;;
7750   *)
7751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7752   ac_dummy="$PATH"
7753   for ac_dir in $ac_dummy; do 
7754     test -z "$ac_dir" && ac_dir=.
7755     if test -f $ac_dir/$ac_word; then
7756       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7757       break
7758     fi
7759   done
7760   IFS="$ac_save_ifs"
7761   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7762   ;;
7763 esac
7764 fi
7765 PERLBIN="$ac_cv_path_PERLBIN"
7766 if test -n "$PERLBIN"; then
7767   echo "$ac_t""$PERLBIN" 1>&6
7768 else
7769   echo "$ac_t""no" 1>&6
7770 fi
7771
7772
7773         if test "no$PERLBIN" = "no" ; then
7774                 if test $ol_enable_perl = yes ; then
7775                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7776                 fi
7777
7778         else
7779                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7780                 if test x"$ol_with_perl_module" = "xstatic" ; then
7781                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7782                 else
7783                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7784                 fi
7785                                 ol_link_perl=yes
7786         fi
7787 fi
7788
7789 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7790 echo "configure:7791: checking how to run the C preprocessor" >&5
7791 # On Suns, sometimes $CPP names a directory.
7792 if test -n "$CPP" && test -d "$CPP"; then
7793   CPP=
7794 fi
7795 if test -z "$CPP"; then
7796 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7797   echo $ac_n "(cached) $ac_c" 1>&6
7798 else
7799     # This must be in double quotes, not single quotes, because CPP may get
7800   # substituted into the Makefile and "${CC-cc}" will confuse make.
7801   CPP="${CC-cc} -E"
7802   # On the NeXT, cc -E runs the code through the compiler's parser,
7803   # not just through cpp.
7804   cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807 #include <assert.h>
7808 Syntax Error
7809 EOF
7810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7811 { (eval echo configure:7812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7813 if test -z "$ac_err"; then
7814   :
7815 else
7816   echo "$ac_err" >&5
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   CPP="${CC-cc} -E -traditional-cpp"
7821   cat > conftest.$ac_ext <<EOF
7822 #line 7823 "configure"
7823 #include "confdefs.h"
7824 #include <assert.h>
7825 Syntax Error
7826 EOF
7827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7828 { (eval echo configure:7829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7830 if test -z "$ac_err"; then
7831   :
7832 else
7833   echo "$ac_err" >&5
7834   echo "configure: failed program was:" >&5
7835   cat conftest.$ac_ext >&5
7836   rm -rf conftest*
7837   CPP="${CC-cc} -nologo -E"
7838   cat > conftest.$ac_ext <<EOF
7839 #line 7840 "configure"
7840 #include "confdefs.h"
7841 #include <assert.h>
7842 Syntax Error
7843 EOF
7844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7845 { (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7847 if test -z "$ac_err"; then
7848   :
7849 else
7850   echo "$ac_err" >&5
7851   echo "configure: failed program was:" >&5
7852   cat conftest.$ac_ext >&5
7853   rm -rf conftest*
7854   CPP=/lib/cpp
7855 fi
7856 rm -f conftest*
7857 fi
7858 rm -f conftest*
7859 fi
7860 rm -f conftest*
7861   ac_cv_prog_CPP="$CPP"
7862 fi
7863   CPP="$ac_cv_prog_CPP"
7864 else
7865   ac_cv_prog_CPP="$CPP"
7866 fi
7867 echo "$ac_t""$CPP" 1>&6
7868
7869
7870 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7871         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7872
7873 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7874         echo "configure: warning: programs compiled here do run here..." 1>&2
7875         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7876
7877 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7878         echo "configure: warning: programs compiled here do not run here..." 1>&2
7879         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7880 fi
7881
7882
7883 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7884 echo "configure:7885: checking for Cygwin environment" >&5
7885 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7886   echo $ac_n "(cached) $ac_c" 1>&6
7887 else
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891
7892 int main() {
7893
7894 #ifndef __CYGWIN__
7895 #define __CYGWIN__ __CYGWIN32__
7896 #endif
7897 return __CYGWIN__;
7898 ; return 0; }
7899 EOF
7900 if { (eval echo configure:7901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7901   rm -rf conftest*
7902   ac_cv_cygwin=yes
7903 else
7904   echo "configure: failed program was:" >&5
7905   cat conftest.$ac_ext >&5
7906   rm -rf conftest*
7907   ac_cv_cygwin=no
7908 fi
7909 rm -f conftest*
7910 fi
7911
7912 echo "$ac_t""$ac_cv_cygwin" 1>&6
7913 CYGWIN=
7914 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7915 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7916 echo "configure:7917: checking for mingw32 environment" >&5
7917 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7918   echo $ac_n "(cached) $ac_c" 1>&6
7919 else
7920   cat > conftest.$ac_ext <<EOF
7921 #line 7922 "configure"
7922 #include "confdefs.h"
7923
7924 int main() {
7925 return __MINGW32__;
7926 ; return 0; }
7927 EOF
7928 if { (eval echo configure:7929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7929   rm -rf conftest*
7930   ac_cv_mingw32=yes
7931 else
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   ac_cv_mingw32=no
7936 fi
7937 rm -f conftest*
7938 fi
7939
7940 echo "$ac_t""$ac_cv_mingw32" 1>&6
7941 MINGW32=
7942 test "$ac_cv_mingw32" = yes && MINGW32=yes
7943
7944
7945
7946 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7947 echo "configure:7948: checking for executable suffix" >&5
7948 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7949   echo $ac_n "(cached) $ac_c" 1>&6
7950 else
7951   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7952   ac_cv_exeext=.exe
7953 else
7954   rm -f conftest*
7955   echo 'int main () { return 0; }' > conftest.$ac_ext
7956   ac_cv_exeext=
7957   if { (eval echo configure:7958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7958     for file in conftest.*; do
7959       case $file in
7960       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7961       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7962       esac
7963     done
7964   else
7965     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7966   fi
7967   rm -f conftest*
7968   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7969 fi
7970 fi
7971
7972 EXEEXT=""
7973 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7974 echo "$ac_t""${ac_cv_exeext}" 1>&6
7975 ac_exeext=$EXEEXT
7976
7977 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7978 echo "configure:7979: checking for object suffix" >&5
7979 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7980   echo $ac_n "(cached) $ac_c" 1>&6
7981 else
7982   rm -f conftest*
7983 echo 'int i = 1;' > conftest.$ac_ext
7984 if { (eval echo configure:7985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7985   for ac_file in conftest.*; do
7986     case $ac_file in
7987     *.c) ;;
7988     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7989     esac
7990   done
7991 else
7992   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7993 fi
7994 rm -f conftest*
7995 fi
7996
7997 echo "$ac_t""$ac_cv_objext" 1>&6
7998 OBJEXT=$ac_cv_objext
7999 ac_objext=$ac_cv_objext
8000
8001
8002 cat >> confdefs.h <<EOF
8003 #define EXEEXT "${EXEEXT}"
8004 EOF
8005
8006
8007 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8008 echo "configure:8009: checking for be_app in -lbe" >&5
8009 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8011   echo $ac_n "(cached) $ac_c" 1>&6
8012 else
8013   ac_save_LIBS="$LIBS"
8014 LIBS="-lbe -lroot -lnet $LIBS"
8015 cat > conftest.$ac_ext <<EOF
8016 #line 8017 "configure"
8017 #include "confdefs.h"
8018 /* Override any gcc2 internal prototype to avoid an error.  */
8019 /* We use char because int might match the return type of a gcc2
8020     builtin and then its argument prototype would still apply.  */
8021 char be_app();
8022
8023 int main() {
8024 be_app()
8025 ; return 0; }
8026 EOF
8027 if { (eval echo configure:8028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8028   rm -rf conftest*
8029   eval "ac_cv_lib_$ac_lib_var=yes"
8030 else
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_lib_$ac_lib_var=no"
8035 fi
8036 rm -f conftest*
8037 LIBS="$ac_save_LIBS"
8038
8039 fi
8040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8041   echo "$ac_t""yes" 1>&6
8042   LIBS="$LIBS -lbe -lroot -lnet"
8043 else
8044   echo "$ac_t""no" 1>&6
8045 :
8046 fi
8047
8048
8049
8050
8051
8052 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8053 echo "configure:8054: checking for ${CC-cc} option to accept ANSI C" >&5
8054 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8055   echo $ac_n "(cached) $ac_c" 1>&6
8056 else
8057   am_cv_prog_cc_stdc=no
8058 ac_save_CC="$CC"
8059 # Don't try gcc -ansi; that turns off useful extensions and
8060 # breaks some systems' header files.
8061 # AIX                   -qlanglvl=ansi
8062 # Ultrix and OSF/1      -std1
8063 # HP-UX 10.20 and later -Ae
8064 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8065 # SVR4                  -Xc -D__EXTENSIONS__
8066 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8067 do
8068   CC="$ac_save_CC $ac_arg"
8069   cat > conftest.$ac_ext <<EOF
8070 #line 8071 "configure"
8071 #include "confdefs.h"
8072 #include <stdarg.h>
8073 #include <stdio.h>
8074 #include <sys/types.h>
8075 #include <sys/stat.h>
8076 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8077 struct buf { int x; };
8078 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8079 static char *e (p, i)
8080      char **p;
8081      int i;
8082 {
8083   return p[i];
8084 }
8085 static char *f (char * (*g) (char **, int), char **p, ...)
8086 {
8087   char *s;
8088   va_list v;
8089   va_start (v,p);
8090   s = g (p, va_arg (v,int));
8091   va_end (v);
8092   return s;
8093 }
8094 int test (int i, double x);
8095 struct s1 {int (*f) (int a);};
8096 struct s2 {int (*f) (double a);};
8097 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8098 int argc;
8099 char **argv;
8100
8101 int main() {
8102
8103 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8104
8105 ; return 0; }
8106 EOF
8107 if { (eval echo configure:8108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8108   rm -rf conftest*
8109   am_cv_prog_cc_stdc="$ac_arg"; break
8110 else
8111   echo "configure: failed program was:" >&5
8112   cat conftest.$ac_ext >&5
8113 fi
8114 rm -f conftest*
8115 done
8116 CC="$ac_save_CC"
8117
8118 fi
8119
8120 if test -z "$am_cv_prog_cc_stdc"; then
8121   echo "$ac_t""none needed" 1>&6
8122 else
8123   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8124 fi
8125 case "x$am_cv_prog_cc_stdc" in
8126   x|xno) ;;
8127   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8128 esac
8129
8130 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8131         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8132 fi
8133
8134 # test for make depend flag
8135 OL_MKDEP=
8136 OL_MKDEP_FLAGS=
8137 if test -z "${MKDEP}"; then
8138         OL_MKDEP="${CC-cc}"
8139         if test -z "${MKDEP_FLAGS}"; then
8140                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8141 echo "configure:8142: checking for ${OL_MKDEP} depend flag" >&5
8142 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8143   echo $ac_n "(cached) $ac_c" 1>&6
8144 else
8145   
8146                         ol_cv_mkdep=no
8147                         for flag in "-M" "-xM"; do
8148                                 cat > conftest.c <<EOF
8149  noCode;
8150 EOF
8151                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8152                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8153                                 then
8154                                         if test ! -f conftest."${ac_object}" ; then
8155                                                 ol_cv_mkdep=$flag
8156                                                 OL_MKDEP_FLAGS="$flag"
8157                                                 break
8158                                         fi
8159                                 fi
8160                         done
8161                         rm -f conftest*
8162                 
8163 fi
8164
8165 echo "$ac_t""$ol_cv_mkdep" 1>&6
8166         else
8167                 cc_cv_mkdep=yes
8168                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8169         fi
8170 else
8171         cc_cv_mkdep=yes
8172         OL_MKDEP="${MKDEP}"
8173         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8174 fi
8175
8176
8177
8178 if test "${ol_cv_mkdep}" = no ; then
8179         # this will soon become an error
8180         echo "configure: warning: do not know how to generate dependencies" 1>&2
8181 fi
8182
8183 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8184 echo "configure:8185: checking for afopen in -ls" >&5
8185 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8187   echo $ac_n "(cached) $ac_c" 1>&6
8188 else
8189   ac_save_LIBS="$LIBS"
8190 LIBS="-ls  $LIBS"
8191 cat > conftest.$ac_ext <<EOF
8192 #line 8193 "configure"
8193 #include "confdefs.h"
8194 /* Override any gcc2 internal prototype to avoid an error.  */
8195 /* We use char because int might match the return type of a gcc2
8196     builtin and then its argument prototype would still apply.  */
8197 char afopen();
8198
8199 int main() {
8200 afopen()
8201 ; return 0; }
8202 EOF
8203 if { (eval echo configure:8204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8204   rm -rf conftest*
8205   eval "ac_cv_lib_$ac_lib_var=yes"
8206 else
8207   echo "configure: failed program was:" >&5
8208   cat conftest.$ac_ext >&5
8209   rm -rf conftest*
8210   eval "ac_cv_lib_$ac_lib_var=no"
8211 fi
8212 rm -f conftest*
8213 LIBS="$ac_save_LIBS"
8214
8215 fi
8216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8217   echo "$ac_t""yes" 1>&6
8218   
8219         AUTH_LIBS=-ls
8220         cat >> confdefs.h <<\EOF
8221 #define HAVE_AIX_SECURITY 1
8222 EOF
8223
8224
8225 else
8226   echo "$ac_t""no" 1>&6
8227 fi
8228
8229
8230 case "$target" in
8231 *-ibm-openedition)
8232         ac_cv_func_getopt=no
8233         cat >> confdefs.h <<\EOF
8234 #define BOTH_STRINGS_H 1
8235 EOF
8236
8237         ;;
8238 esac
8239
8240 ol_link_modules=no
8241 if test $ol_enable_modules != no ; then
8242         for ac_hdr in ltdl.h
8243 do
8244 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8245 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8246 echo "configure:8247: checking for $ac_hdr" >&5
8247 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8248   echo $ac_n "(cached) $ac_c" 1>&6
8249 else
8250   cat > conftest.$ac_ext <<EOF
8251 #line 8252 "configure"
8252 #include "confdefs.h"
8253 #include <$ac_hdr>
8254 EOF
8255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8256 { (eval echo configure:8257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8258 if test -z "$ac_err"; then
8259   rm -rf conftest*
8260   eval "ac_cv_header_$ac_safe=yes"
8261 else
8262   echo "$ac_err" >&5
8263   echo "configure: failed program was:" >&5
8264   cat conftest.$ac_ext >&5
8265   rm -rf conftest*
8266   eval "ac_cv_header_$ac_safe=no"
8267 fi
8268 rm -f conftest*
8269 fi
8270 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8271   echo "$ac_t""yes" 1>&6
8272     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8273   cat >> confdefs.h <<EOF
8274 #define $ac_tr_hdr 1
8275 EOF
8276  
8277 else
8278   echo "$ac_t""no" 1>&6
8279 fi
8280 done
8281
8282
8283         if test $ac_cv_header_ltdl_h = no ; then
8284                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8285         fi
8286
8287         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8288 echo "configure:8289: checking for lt_dlinit in -lltdl" >&5
8289 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8290 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8291   echo $ac_n "(cached) $ac_c" 1>&6
8292 else
8293   ac_save_LIBS="$LIBS"
8294 LIBS="-lltdl  $LIBS"
8295 cat > conftest.$ac_ext <<EOF
8296 #line 8297 "configure"
8297 #include "confdefs.h"
8298 /* Override any gcc2 internal prototype to avoid an error.  */
8299 /* We use char because int might match the return type of a gcc2
8300     builtin and then its argument prototype would still apply.  */
8301 char lt_dlinit();
8302
8303 int main() {
8304 lt_dlinit()
8305 ; return 0; }
8306 EOF
8307 if { (eval echo configure:8308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8308   rm -rf conftest*
8309   eval "ac_cv_lib_$ac_lib_var=yes"
8310 else
8311   echo "configure: failed program was:" >&5
8312   cat conftest.$ac_ext >&5
8313   rm -rf conftest*
8314   eval "ac_cv_lib_$ac_lib_var=no"
8315 fi
8316 rm -f conftest*
8317 LIBS="$ac_save_LIBS"
8318
8319 fi
8320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8321   echo "$ac_t""yes" 1>&6
8322   
8323                 MODULES_LIBS=-lltdl
8324                 cat >> confdefs.h <<\EOF
8325 #define HAVE_LIBLTDL 1
8326 EOF
8327
8328         
8329 else
8330   echo "$ac_t""no" 1>&6
8331 fi
8332
8333
8334         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8335                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8336         fi
8337         ol_link_modules=yes
8338 else
8339         ol_with_bdb_module=static
8340         ol_with_dnssrv_module=static
8341         ol_with_ldap_module=static
8342         ol_with_ldbm_module=static
8343         ol_with_meta_module=static
8344         ol_with_monitor_module=static
8345         ol_with_null_module=static
8346         ol_with_passwd_module=static
8347         ol_with_perl_module=static
8348         ol_with_shell_module=static
8349         ol_with_tcl_module=static
8350         ol_with_sql_module=static
8351 fi
8352
8353 # test for EBCDIC
8354 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8355 echo "configure:8356: checking for EBCDIC" >&5
8356 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8357   echo $ac_n "(cached) $ac_c" 1>&6
8358 else
8359   
8360         cat > conftest.$ac_ext <<EOF
8361 #line 8362 "configure"
8362 #include "confdefs.h"
8363
8364 #if !('M' == 0xd4)
8365 #include <__ASCII__/generate_error.h>
8366 #endif
8367
8368 EOF
8369 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8370 { (eval echo configure:8371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8371 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8372 if test -z "$ac_err"; then
8373   rm -rf conftest*
8374   ol_cv_cpp_ebcdic=yes
8375 else
8376   echo "$ac_err" >&5
8377   echo "configure: failed program was:" >&5
8378   cat conftest.$ac_ext >&5
8379   rm -rf conftest*
8380   ol_cv_cpp_ebcdic=no
8381 fi
8382 rm -f conftest*
8383 fi
8384
8385 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8386 if test $ol_cv_cpp_ebcdic = yes ; then
8387         cat >> confdefs.h <<\EOF
8388 #define HAVE_EBCDIC 1
8389 EOF
8390
8391 fi
8392
8393 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8394 echo "configure:8395: checking for ANSI C header files" >&5
8395 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8396   echo $ac_n "(cached) $ac_c" 1>&6
8397 else
8398   cat > conftest.$ac_ext <<EOF
8399 #line 8400 "configure"
8400 #include "confdefs.h"
8401 #include <stdlib.h>
8402 #include <stdarg.h>
8403 #include <string.h>
8404 #include <float.h>
8405 EOF
8406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8407 { (eval echo configure:8408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8409 if test -z "$ac_err"; then
8410   rm -rf conftest*
8411   ol_cv_header_stdc=yes
8412 else
8413   echo "$ac_err" >&5
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   ol_cv_header_stdc=no
8418 fi
8419 rm -f conftest*
8420
8421 if test $ol_cv_header_stdc = yes; then
8422   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8423 cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8426 #include <string.h>
8427 EOF
8428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8429   egrep "memchr" >/dev/null 2>&1; then
8430   :
8431 else
8432   rm -rf conftest*
8433   ol_cv_header_stdc=no
8434 fi
8435 rm -f conftest*
8436
8437 fi
8438
8439 if test $ol_cv_header_stdc = yes; then
8440   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8441 cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 #include <stdlib.h>
8445 EOF
8446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8447   egrep "free" >/dev/null 2>&1; then
8448   :
8449 else
8450   rm -rf conftest*
8451   ol_cv_header_stdc=no
8452 fi
8453 rm -f conftest*
8454
8455 fi
8456
8457 if test $ol_cv_header_stdc = yes; then
8458   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8459 if test "$cross_compiling" = yes; then
8460   :
8461 else
8462   cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 #include <ctype.h>
8466 #ifndef HAVE_EBCDIC
8467 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8468 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8469 #else
8470 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8471                 || ('j' <= (c) && (c) <= 'r') \
8472                 || ('s' <= (c) && (c) <= 'z'))
8473 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8474 #endif
8475 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8476 int main () { int i; for (i = 0; i < 256; i++)
8477 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8478 exit (0); }
8479
8480 EOF
8481 if { (eval echo configure:8482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8482 then
8483   :
8484 else
8485   echo "configure: failed program was:" >&5
8486   cat conftest.$ac_ext >&5
8487   rm -fr conftest*
8488   ol_cv_header_stdc=no
8489 fi
8490 rm -fr conftest*
8491 fi
8492
8493 fi
8494 fi
8495
8496 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8497 if test $ol_cv_header_stdc = yes; then
8498   cat >> confdefs.h <<\EOF
8499 #define STDC_HEADERS 1
8500 EOF
8501
8502 fi
8503 ac_cv_header_stdc=disable
8504
8505
8506 if test $ol_cv_header_stdc != yes; then
8507         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8508 fi
8509
8510 ac_header_dirent=no
8511 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8512 do
8513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8514 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8515 echo "configure:8516: checking for $ac_hdr that defines DIR" >&5
8516 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8517   echo $ac_n "(cached) $ac_c" 1>&6
8518 else
8519   cat > conftest.$ac_ext <<EOF
8520 #line 8521 "configure"
8521 #include "confdefs.h"
8522 #include <sys/types.h>
8523 #include <$ac_hdr>
8524 int main() {
8525 DIR *dirp = 0;
8526 ; return 0; }
8527 EOF
8528 if { (eval echo configure:8529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8529   rm -rf conftest*
8530   eval "ac_cv_header_dirent_$ac_safe=yes"
8531 else
8532   echo "configure: failed program was:" >&5
8533   cat conftest.$ac_ext >&5
8534   rm -rf conftest*
8535   eval "ac_cv_header_dirent_$ac_safe=no"
8536 fi
8537 rm -f conftest*
8538 fi
8539 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8540   echo "$ac_t""yes" 1>&6
8541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8542   cat >> confdefs.h <<EOF
8543 #define $ac_tr_hdr 1
8544 EOF
8545  ac_header_dirent=$ac_hdr; break
8546 else
8547   echo "$ac_t""no" 1>&6
8548 fi
8549 done
8550 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8551 if test $ac_header_dirent = dirent.h; then
8552 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8553 echo "configure:8554: checking for opendir in -ldir" >&5
8554 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8555 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   ac_save_LIBS="$LIBS"
8559 LIBS="-ldir  $LIBS"
8560 cat > conftest.$ac_ext <<EOF
8561 #line 8562 "configure"
8562 #include "confdefs.h"
8563 /* Override any gcc2 internal prototype to avoid an error.  */
8564 /* We use char because int might match the return type of a gcc2
8565     builtin and then its argument prototype would still apply.  */
8566 char opendir();
8567
8568 int main() {
8569 opendir()
8570 ; return 0; }
8571 EOF
8572 if { (eval echo configure:8573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8573   rm -rf conftest*
8574   eval "ac_cv_lib_$ac_lib_var=yes"
8575 else
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   eval "ac_cv_lib_$ac_lib_var=no"
8580 fi
8581 rm -f conftest*
8582 LIBS="$ac_save_LIBS"
8583
8584 fi
8585 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587   LIBS="$LIBS -ldir"
8588 else
8589   echo "$ac_t""no" 1>&6
8590 fi
8591
8592 else
8593 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8594 echo "configure:8595: checking for opendir in -lx" >&5
8595 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8597   echo $ac_n "(cached) $ac_c" 1>&6
8598 else
8599   ac_save_LIBS="$LIBS"
8600 LIBS="-lx  $LIBS"
8601 cat > conftest.$ac_ext <<EOF
8602 #line 8603 "configure"
8603 #include "confdefs.h"
8604 /* Override any gcc2 internal prototype to avoid an error.  */
8605 /* We use char because int might match the return type of a gcc2
8606     builtin and then its argument prototype would still apply.  */
8607 char opendir();
8608
8609 int main() {
8610 opendir()
8611 ; return 0; }
8612 EOF
8613 if { (eval echo configure:8614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8614   rm -rf conftest*
8615   eval "ac_cv_lib_$ac_lib_var=yes"
8616 else
8617   echo "configure: failed program was:" >&5
8618   cat conftest.$ac_ext >&5
8619   rm -rf conftest*
8620   eval "ac_cv_lib_$ac_lib_var=no"
8621 fi
8622 rm -f conftest*
8623 LIBS="$ac_save_LIBS"
8624
8625 fi
8626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8627   echo "$ac_t""yes" 1>&6
8628   LIBS="$LIBS -lx"
8629 else
8630   echo "$ac_t""no" 1>&6
8631 fi
8632
8633 fi
8634
8635 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8636 echo "configure:8637: checking for sys/wait.h that is POSIX.1 compatible" >&5
8637 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8638   echo $ac_n "(cached) $ac_c" 1>&6
8639 else
8640   cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 #include <sys/types.h>
8644 #include <sys/wait.h>
8645 #ifndef WEXITSTATUS
8646 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8647 #endif
8648 #ifndef WIFEXITED
8649 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8650 #endif
8651 int main() {
8652 int s;
8653 wait (&s);
8654 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8655 ; return 0; }
8656 EOF
8657 if { (eval echo configure:8658: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8658   rm -rf conftest*
8659   ac_cv_header_sys_wait_h=yes
8660 else
8661   echo "configure: failed program was:" >&5
8662   cat conftest.$ac_ext >&5
8663   rm -rf conftest*
8664   ac_cv_header_sys_wait_h=no
8665 fi
8666 rm -f conftest*
8667 fi
8668
8669 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8670 if test $ac_cv_header_sys_wait_h = yes; then
8671   cat >> confdefs.h <<\EOF
8672 #define HAVE_SYS_WAIT_H 1
8673 EOF
8674
8675 fi
8676
8677 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8678 echo "configure:8679: checking POSIX termios" >&5
8679 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8680   echo $ac_n "(cached) $ac_c" 1>&6
8681 else
8682   cat > conftest.$ac_ext <<EOF
8683 #line 8684 "configure"
8684 #include "confdefs.h"
8685 #include <sys/types.h>
8686 #include <unistd.h>
8687 #include <termios.h>
8688 int main() {
8689 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8690    tcgetattr(0, 0);
8691 ; return 0; }
8692 EOF
8693 if { (eval echo configure:8694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8694   rm -rf conftest*
8695   am_cv_sys_posix_termios=yes
8696 else
8697   echo "configure: failed program was:" >&5
8698   cat conftest.$ac_ext >&5
8699   rm -rf conftest*
8700   am_cv_sys_posix_termios=no
8701 fi
8702 rm -f conftest*
8703 fi
8704
8705 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8706
8707
8708  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8709 echo "configure:8710: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8710 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8714
8715   gwinsz_in_termios_h=no
8716   if test $am_cv_sys_posix_termios = yes; then
8717     cat > conftest.$ac_ext <<EOF
8718 #line 8719 "configure"
8719 #include "confdefs.h"
8720 #include <sys/types.h>
8721 #     include <termios.h>
8722 #     ifdef TIOCGWINSZ
8723         yes
8724 #     endif
8725     
8726 EOF
8727 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8728   egrep "yes" >/dev/null 2>&1; then
8729   rm -rf conftest*
8730   gwinsz_in_termios_h=yes
8731 fi
8732 rm -f conftest*
8733
8734   fi
8735
8736   if test $gwinsz_in_termios_h = no; then
8737     cat > conftest.$ac_ext <<EOF
8738 #line 8739 "configure"
8739 #include "confdefs.h"
8740 #include <sys/types.h>
8741 #     include <sys/ioctl.h>
8742 #     ifdef TIOCGWINSZ
8743         yes
8744 #     endif
8745     
8746 EOF
8747 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8748   egrep "yes" >/dev/null 2>&1; then
8749   rm -rf conftest*
8750   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8751 fi
8752 rm -f conftest*
8753
8754   fi
8755   
8756 fi
8757
8758 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8759   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8760     cat >> confdefs.h <<\EOF
8761 #define GWINSZ_IN_SYS_IOCTL 1
8762 EOF
8763
8764   fi
8765
8766 if test $am_cv_sys_posix_termios = yes ; then
8767         cat >> confdefs.h <<\EOF
8768 #define HAVE_POSIX_TERMIOS 1
8769 EOF
8770
8771 fi
8772
8773 for ac_hdr in \
8774         arpa/inet.h             \
8775         arpa/nameser.h  \
8776         assert.h                \
8777         conio.h                 \
8778         crypt.h                 \
8779         direct.h                \
8780         errno.h                 \
8781         fcntl.h                 \
8782         filio.h                 \
8783         getopt.h                \
8784         grp.h                   \
8785         io.h                    \
8786         libutil.h               \
8787         limits.h                \
8788         locale.h                \
8789         netinet/tcp.h   \
8790         malloc.h                \
8791         memory.h                \
8792         psap.h                  \
8793         pwd.h                   \
8794         process.h               \
8795         resolv.h                \
8796         sgtty.h                 \
8797         shadow.h                \
8798         stddef.h                \
8799         string.h                \
8800         strings.h               \
8801         sysexits.h              \
8802         sys/file.h              \
8803         sys/filio.h             \
8804         sys/errno.h             \
8805         sys/ioctl.h             \
8806         sys/param.h             \
8807         sys/resource.h  \
8808         sys/select.h    \
8809         sys/socket.h    \
8810         sys/syslog.h    \
8811         sys/time.h              \
8812         sys/types.h             \
8813         syslog.h                \
8814         termios.h               \
8815         unistd.h                \
8816         winsock.h               \
8817         winsock2.h              \
8818
8819 do
8820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8822 echo "configure:8823: checking for $ac_hdr" >&5
8823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8824   echo $ac_n "(cached) $ac_c" 1>&6
8825 else
8826   cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829 #include <$ac_hdr>
8830 EOF
8831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8832 { (eval echo configure:8833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8834 if test -z "$ac_err"; then
8835   rm -rf conftest*
8836   eval "ac_cv_header_$ac_safe=yes"
8837 else
8838   echo "$ac_err" >&5
8839   echo "configure: failed program was:" >&5
8840   cat conftest.$ac_ext >&5
8841   rm -rf conftest*
8842   eval "ac_cv_header_$ac_safe=no"
8843 fi
8844 rm -f conftest*
8845 fi
8846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8847   echo "$ac_t""yes" 1>&6
8848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8849   cat >> confdefs.h <<EOF
8850 #define $ac_tr_hdr 1
8851 EOF
8852  
8853 else
8854   echo "$ac_t""no" 1>&6
8855 fi
8856 done
8857
8858
8859
8860
8861 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8862 echo "configure:8863: checking for dlopen" >&5
8863 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8864   echo $ac_n "(cached) $ac_c" 1>&6
8865 else
8866   cat > conftest.$ac_ext <<EOF
8867 #line 8868 "configure"
8868 #include "confdefs.h"
8869 /* System header to define __stub macros and hopefully few prototypes,
8870     which can conflict with char dlopen(); below.  */
8871 #include <assert.h>
8872 /* Override any gcc2 internal prototype to avoid an error.  */
8873 /* We use char because int might match the return type of a gcc2
8874     builtin and then its argument prototype would still apply.  */
8875 char dlopen();
8876 char (*f)();
8877
8878 int main() {
8879
8880 /* The GNU C library defines this for functions which it implements
8881     to always fail with ENOSYS.  Some functions are actually named
8882     something starting with __ and the normal name is an alias.  */
8883 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8884 choke me
8885 #else
8886 f = dlopen;
8887 #endif
8888
8889 ; return 0; }
8890 EOF
8891 if { (eval echo configure:8892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8892   rm -rf conftest*
8893   eval "ac_cv_func_dlopen=yes"
8894 else
8895   echo "configure: failed program was:" >&5
8896   cat conftest.$ac_ext >&5
8897   rm -rf conftest*
8898   eval "ac_cv_func_dlopen=no"
8899 fi
8900 rm -f conftest*
8901 fi
8902
8903 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8904   echo "$ac_t""yes" 1>&6
8905   :
8906 else
8907   echo "$ac_t""no" 1>&6
8908 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8909 echo "configure:8910: checking for dlopen in -ldl" >&5
8910 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8911 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8912   echo $ac_n "(cached) $ac_c" 1>&6
8913 else
8914   ac_save_LIBS="$LIBS"
8915 LIBS="-ldl  $LIBS"
8916 cat > conftest.$ac_ext <<EOF
8917 #line 8918 "configure"
8918 #include "confdefs.h"
8919 /* Override any gcc2 internal prototype to avoid an error.  */
8920 /* We use char because int might match the return type of a gcc2
8921     builtin and then its argument prototype would still apply.  */
8922 char dlopen();
8923
8924 int main() {
8925 dlopen()
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   eval "ac_cv_lib_$ac_lib_var=yes"
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   eval "ac_cv_lib_$ac_lib_var=no"
8936 fi
8937 rm -f conftest*
8938 LIBS="$ac_save_LIBS"
8939
8940 fi
8941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8945   cat >> confdefs.h <<EOF
8946 #define $ac_tr_lib 1
8947 EOF
8948
8949   LIBS="-ldl $LIBS"
8950
8951 else
8952   echo "$ac_t""no" 1>&6
8953 fi
8954
8955 fi
8956
8957
8958 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8959 echo "configure:8960: checking for sigset in -lV3" >&5
8960 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8962   echo $ac_n "(cached) $ac_c" 1>&6
8963 else
8964   ac_save_LIBS="$LIBS"
8965 LIBS="-lV3  $LIBS"
8966 cat > conftest.$ac_ext <<EOF
8967 #line 8968 "configure"
8968 #include "confdefs.h"
8969 /* Override any gcc2 internal prototype to avoid an error.  */
8970 /* We use char because int might match the return type of a gcc2
8971     builtin and then its argument prototype would still apply.  */
8972 char sigset();
8973
8974 int main() {
8975 sigset()
8976 ; return 0; }
8977 EOF
8978 if { (eval echo configure:8979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8979   rm -rf conftest*
8980   eval "ac_cv_lib_$ac_lib_var=yes"
8981 else
8982   echo "configure: failed program was:" >&5
8983   cat conftest.$ac_ext >&5
8984   rm -rf conftest*
8985   eval "ac_cv_lib_$ac_lib_var=no"
8986 fi
8987 rm -f conftest*
8988 LIBS="$ac_save_LIBS"
8989
8990 fi
8991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8992   echo "$ac_t""yes" 1>&6
8993     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8995   cat >> confdefs.h <<EOF
8996 #define $ac_tr_lib 1
8997 EOF
8998
8999   LIBS="-lV3 $LIBS"
9000
9001 else
9002   echo "$ac_t""no" 1>&6
9003 fi
9004
9005
9006 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9007 echo "configure:9008: checking for winsock" >&5
9008 save_LIBS="$LIBS"
9009 for curlib in ws2_32 wsock32; do
9010         LIBS="$LIBS -l$curlib"
9011         cat > conftest.$ac_ext <<EOF
9012 #line 9013 "configure"
9013 #include "confdefs.h"
9014
9015                         char socket@12();
9016                         char select@20();
9017                         char closesocket@4();
9018                         char gethostname@8();
9019                         
9020 int main() {
9021
9022                         socket@12();
9023                         select@20();
9024                         closesocket@4();
9025                         gethostname@8();
9026                         
9027 ; return 0; }
9028 EOF
9029 if { (eval echo configure:9030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9030   rm -rf conftest*
9031   have_winsock=yes
9032 else
9033   echo "configure: failed program was:" >&5
9034   cat conftest.$ac_ext >&5
9035   rm -rf conftest*
9036   have_winsock=no
9037 fi
9038 rm -f conftest*
9039
9040         if test $have_winsock = yes; then
9041                 cat >> confdefs.h <<\EOF
9042 #define HAVE_WINSOCK 1
9043 EOF
9044
9045                 ac_cv_func_socket=yes
9046                 ac_cv_func_select=yes
9047                 ac_cv_func_closesocket=yes
9048                 ac_cv_func_gethostname=yes
9049                 if test $curlib = ws2_32; then
9050                         have_winsock=winsock2
9051                         cat >> confdefs.h <<\EOF
9052 #define HAVE_WINSOCK2 1
9053 EOF
9054
9055                 fi
9056                 break
9057         fi
9058         LIBS="$save_LIBS"
9059 done
9060 echo "$ac_t""$have_winsock" 1>&6
9061
9062
9063 echo $ac_n "checking for socket""... $ac_c" 1>&6
9064 echo "configure:9065: checking for socket" >&5
9065 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9066   echo $ac_n "(cached) $ac_c" 1>&6
9067 else
9068   cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071 /* System header to define __stub macros and hopefully few prototypes,
9072     which can conflict with char socket(); below.  */
9073 #include <assert.h>
9074 /* Override any gcc2 internal prototype to avoid an error.  */
9075 /* We use char because int might match the return type of a gcc2
9076     builtin and then its argument prototype would still apply.  */
9077 char socket();
9078 char (*f)();
9079
9080 int main() {
9081
9082 /* The GNU C library defines this for functions which it implements
9083     to always fail with ENOSYS.  Some functions are actually named
9084     something starting with __ and the normal name is an alias.  */
9085 #if defined (__stub_socket) || defined (__stub___socket)
9086 choke me
9087 #else
9088 f = socket;
9089 #endif
9090
9091 ; return 0; }
9092 EOF
9093 if { (eval echo configure:9094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9094   rm -rf conftest*
9095   eval "ac_cv_func_socket=yes"
9096 else
9097   echo "configure: failed program was:" >&5
9098   cat conftest.$ac_ext >&5
9099   rm -rf conftest*
9100   eval "ac_cv_func_socket=no"
9101 fi
9102 rm -f conftest*
9103 fi
9104
9105 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9106   echo "$ac_t""yes" 1>&6
9107   :
9108 else
9109   echo "$ac_t""no" 1>&6
9110         
9111         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9112 echo "configure:9113: checking for main in -lsocket" >&5
9113 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9115   echo $ac_n "(cached) $ac_c" 1>&6
9116 else
9117   ac_save_LIBS="$LIBS"
9118 LIBS="-lsocket  $LIBS"
9119 cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122
9123 int main() {
9124 main()
9125 ; return 0; }
9126 EOF
9127 if { (eval echo configure:9128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9128   rm -rf conftest*
9129   eval "ac_cv_lib_$ac_lib_var=yes"
9130 else
9131   echo "configure: failed program was:" >&5
9132   cat conftest.$ac_ext >&5
9133   rm -rf conftest*
9134   eval "ac_cv_lib_$ac_lib_var=no"
9135 fi
9136 rm -f conftest*
9137 LIBS="$ac_save_LIBS"
9138
9139 fi
9140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9141   echo "$ac_t""yes" 1>&6
9142     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9144   cat >> confdefs.h <<EOF
9145 #define $ac_tr_lib 1
9146 EOF
9147
9148   LIBS="-lsocket $LIBS"
9149
9150 else
9151   echo "$ac_t""no" 1>&6
9152 fi
9153
9154         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9155 echo "configure:9156: checking for main in -lnet" >&5
9156 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9157 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9158   echo $ac_n "(cached) $ac_c" 1>&6
9159 else
9160   ac_save_LIBS="$LIBS"
9161 LIBS="-lnet  $LIBS"
9162 cat > conftest.$ac_ext <<EOF
9163 #line 9164 "configure"
9164 #include "confdefs.h"
9165
9166 int main() {
9167 main()
9168 ; return 0; }
9169 EOF
9170 if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9171   rm -rf conftest*
9172   eval "ac_cv_lib_$ac_lib_var=yes"
9173 else
9174   echo "configure: failed program was:" >&5
9175   cat conftest.$ac_ext >&5
9176   rm -rf conftest*
9177   eval "ac_cv_lib_$ac_lib_var=no"
9178 fi
9179 rm -f conftest*
9180 LIBS="$ac_save_LIBS"
9181
9182 fi
9183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9184   echo "$ac_t""yes" 1>&6
9185     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9187   cat >> confdefs.h <<EOF
9188 #define $ac_tr_lib 1
9189 EOF
9190
9191   LIBS="-lnet $LIBS"
9192
9193 else
9194   echo "$ac_t""no" 1>&6
9195 fi
9196
9197         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9198 echo "configure:9199: checking for main in -lnsl_s" >&5
9199 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9200 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   ac_save_LIBS="$LIBS"
9204 LIBS="-lnsl_s  $LIBS"
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208
9209 int main() {
9210 main()
9211 ; return 0; }
9212 EOF
9213 if { (eval echo configure:9214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9214   rm -rf conftest*
9215   eval "ac_cv_lib_$ac_lib_var=yes"
9216 else
9217   echo "configure: failed program was:" >&5
9218   cat conftest.$ac_ext >&5
9219   rm -rf conftest*
9220   eval "ac_cv_lib_$ac_lib_var=no"
9221 fi
9222 rm -f conftest*
9223 LIBS="$ac_save_LIBS"
9224
9225 fi
9226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9227   echo "$ac_t""yes" 1>&6
9228     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9229     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9230   cat >> confdefs.h <<EOF
9231 #define $ac_tr_lib 1
9232 EOF
9233
9234   LIBS="-lnsl_s $LIBS"
9235
9236 else
9237   echo "$ac_t""no" 1>&6
9238 fi
9239
9240         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9241 echo "configure:9242: checking for main in -lnsl" >&5
9242 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9243 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9244   echo $ac_n "(cached) $ac_c" 1>&6
9245 else
9246   ac_save_LIBS="$LIBS"
9247 LIBS="-lnsl  $LIBS"
9248 cat > conftest.$ac_ext <<EOF
9249 #line 9250 "configure"
9250 #include "confdefs.h"
9251
9252 int main() {
9253 main()
9254 ; return 0; }
9255 EOF
9256 if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9257   rm -rf conftest*
9258   eval "ac_cv_lib_$ac_lib_var=yes"
9259 else
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -rf conftest*
9263   eval "ac_cv_lib_$ac_lib_var=no"
9264 fi
9265 rm -f conftest*
9266 LIBS="$ac_save_LIBS"
9267
9268 fi
9269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9270   echo "$ac_t""yes" 1>&6
9271     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9272     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9273   cat >> confdefs.h <<EOF
9274 #define $ac_tr_lib 1
9275 EOF
9276
9277   LIBS="-lnsl $LIBS"
9278
9279 else
9280   echo "$ac_t""no" 1>&6
9281 fi
9282
9283         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9284 echo "configure:9285: checking for socket in -linet" >&5
9285 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9286 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9287   echo $ac_n "(cached) $ac_c" 1>&6
9288 else
9289   ac_save_LIBS="$LIBS"
9290 LIBS="-linet  $LIBS"
9291 cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294 /* Override any gcc2 internal prototype to avoid an error.  */
9295 /* We use char because int might match the return type of a gcc2
9296     builtin and then its argument prototype would still apply.  */
9297 char socket();
9298
9299 int main() {
9300 socket()
9301 ; return 0; }
9302 EOF
9303 if { (eval echo configure:9304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9304   rm -rf conftest*
9305   eval "ac_cv_lib_$ac_lib_var=yes"
9306 else
9307   echo "configure: failed program was:" >&5
9308   cat conftest.$ac_ext >&5
9309   rm -rf conftest*
9310   eval "ac_cv_lib_$ac_lib_var=no"
9311 fi
9312 rm -f conftest*
9313 LIBS="$ac_save_LIBS"
9314
9315 fi
9316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9317   echo "$ac_t""yes" 1>&6
9318     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9319     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9320   cat >> confdefs.h <<EOF
9321 #define $ac_tr_lib 1
9322 EOF
9323
9324   LIBS="-linet $LIBS"
9325
9326 else
9327   echo "$ac_t""no" 1>&6
9328 fi
9329
9330         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9331 echo "configure:9332: checking for main in -lgen" >&5
9332 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9333 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9334   echo $ac_n "(cached) $ac_c" 1>&6
9335 else
9336   ac_save_LIBS="$LIBS"
9337 LIBS="-lgen  $LIBS"
9338 cat > conftest.$ac_ext <<EOF
9339 #line 9340 "configure"
9340 #include "confdefs.h"
9341
9342 int main() {
9343 main()
9344 ; return 0; }
9345 EOF
9346 if { (eval echo configure:9347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9347   rm -rf conftest*
9348   eval "ac_cv_lib_$ac_lib_var=yes"
9349 else
9350   echo "configure: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   rm -rf conftest*
9353   eval "ac_cv_lib_$ac_lib_var=no"
9354 fi
9355 rm -f conftest*
9356 LIBS="$ac_save_LIBS"
9357
9358 fi
9359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9360   echo "$ac_t""yes" 1>&6
9361     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9362     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9363   cat >> confdefs.h <<EOF
9364 #define $ac_tr_lib 1
9365 EOF
9366
9367   LIBS="-lgen $LIBS"
9368
9369 else
9370   echo "$ac_t""no" 1>&6
9371 fi
9372
9373
9374 fi
9375
9376
9377 echo $ac_n "checking for select""... $ac_c" 1>&6
9378 echo "configure:9379: checking for select" >&5
9379 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9380   echo $ac_n "(cached) $ac_c" 1>&6
9381 else
9382   cat > conftest.$ac_ext <<EOF
9383 #line 9384 "configure"
9384 #include "confdefs.h"
9385 /* System header to define __stub macros and hopefully few prototypes,
9386     which can conflict with char select(); below.  */
9387 #include <assert.h>
9388 /* Override any gcc2 internal prototype to avoid an error.  */
9389 /* We use char because int might match the return type of a gcc2
9390     builtin and then its argument prototype would still apply.  */
9391 char select();
9392 char (*f)();
9393
9394 int main() {
9395
9396 /* The GNU C library defines this for functions which it implements
9397     to always fail with ENOSYS.  Some functions are actually named
9398     something starting with __ and the normal name is an alias.  */
9399 #if defined (__stub_select) || defined (__stub___select)
9400 choke me
9401 #else
9402 f = select;
9403 #endif
9404
9405 ; return 0; }
9406 EOF
9407 if { (eval echo configure:9408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9408   rm -rf conftest*
9409   eval "ac_cv_func_select=yes"
9410 else
9411   echo "configure: failed program was:" >&5
9412   cat conftest.$ac_ext >&5
9413   rm -rf conftest*
9414   eval "ac_cv_func_select=no"
9415 fi
9416 rm -f conftest*
9417 fi
9418
9419 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9420   echo "$ac_t""yes" 1>&6
9421   :
9422 else
9423   echo "$ac_t""no" 1>&6
9424 { echo "configure: error: select() required." 1>&2; exit 1; }
9425 fi
9426
9427
9428 if test "${ac_cv_header_winsock_h}" != yes; then
9429                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9430 echo "configure:9431: checking types of arguments for select()" >&5
9431  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9432   echo $ac_n "(cached) $ac_c" 1>&6
9433 else
9434    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9435   echo $ac_n "(cached) $ac_c" 1>&6
9436 else
9437     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9438   echo $ac_n "(cached) $ac_c" 1>&6
9439 else
9440      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9441      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9442       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9443        cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #ifdef HAVE_SYS_TYPES_H
9447 #include <sys/types.h>
9448 #endif
9449 #ifdef HAVE_SYS_TIME_H
9450 #include <sys/time.h>
9451 #endif
9452 #ifdef HAVE_SYS_SELECT_H
9453 #include <sys/select.h>
9454 #endif
9455 #ifdef HAVE_SYS_SOCKET_H
9456 #include <sys/socket.h>
9457 #endif
9458 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);
9459 int main() {
9460
9461 ; return 0; }
9462 EOF
9463 if { (eval echo configure:9464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9464   rm -rf conftest*
9465           ac_not_found=no ; break 3
9466 else
9467   echo "configure: failed program was:" >&5
9468   cat conftest.$ac_ext >&5
9469   rm -rf conftest*
9470   ac_not_found=yes
9471 fi
9472 rm -f conftest*
9473       done
9474      done
9475     done
9476    
9477 fi
9478   
9479 fi
9480  
9481 fi
9482  if test "$ac_not_found" = yes; then
9483   ac_cv_func_select_arg1=int 
9484   ac_cv_func_select_arg234='int *' 
9485   ac_cv_func_select_arg5='struct timeval *'
9486  fi
9487  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9488  cat >> confdefs.h <<EOF
9489 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9490 EOF
9491
9492  cat >> confdefs.h <<EOF
9493 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9494 EOF
9495
9496  cat >> confdefs.h <<EOF
9497 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9498 EOF
9499
9500
9501 fi
9502
9503
9504 for ac_hdr in regex.h 
9505 do
9506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9508 echo "configure:9509: checking for $ac_hdr" >&5
9509 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512   cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 #include <$ac_hdr>
9516 EOF
9517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9518 { (eval echo configure:9519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9520 if test -z "$ac_err"; then
9521   rm -rf conftest*
9522   eval "ac_cv_header_$ac_safe=yes"
9523 else
9524   echo "$ac_err" >&5
9525   echo "configure: failed program was:" >&5
9526   cat conftest.$ac_ext >&5
9527   rm -rf conftest*
9528   eval "ac_cv_header_$ac_safe=no"
9529 fi
9530 rm -f conftest*
9531 fi
9532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9533   echo "$ac_t""yes" 1>&6
9534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9535   cat >> confdefs.h <<EOF
9536 #define $ac_tr_hdr 1
9537 EOF
9538  
9539 else
9540   echo "$ac_t""no" 1>&6
9541 fi
9542 done
9543
9544 if test "$ac_cv_header_regex_h" != yes ; then
9545         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9546 fi
9547
9548 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9549 echo "configure:9550: checking for library containing regfree" >&5
9550 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9551   echo $ac_n "(cached) $ac_c" 1>&6
9552 else
9553   ac_func_search_save_LIBS="$LIBS"
9554 ac_cv_search_regfree="no"
9555 cat > conftest.$ac_ext <<EOF
9556 #line 9557 "configure"
9557 #include "confdefs.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 regfree();
9562
9563 int main() {
9564 regfree()
9565 ; return 0; }
9566 EOF
9567 if { (eval echo configure:9568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9568   rm -rf conftest*
9569   ac_cv_search_regfree="none required"
9570 else
9571   echo "configure: failed program was:" >&5
9572   cat conftest.$ac_ext >&5
9573 fi
9574 rm -f conftest*
9575 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9576 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9577 cat > conftest.$ac_ext <<EOF
9578 #line 9579 "configure"
9579 #include "confdefs.h"
9580 /* Override any gcc2 internal prototype to avoid an error.  */
9581 /* We use char because int might match the return type of a gcc2
9582     builtin and then its argument prototype would still apply.  */
9583 char regfree();
9584
9585 int main() {
9586 regfree()
9587 ; return 0; }
9588 EOF
9589 if { (eval echo configure:9590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9590   rm -rf conftest*
9591   ac_cv_search_regfree="-l$ac_lib"
9592 break
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596 fi
9597 rm -f conftest*
9598 done
9599 LIBS="$ac_func_search_save_LIBS"
9600 fi
9601
9602 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9603 if test "$ac_cv_search_regfree" != "no"; then
9604   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9605   :
9606 else :
9607   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9608 fi
9609
9610
9611 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9612 echo "configure:9613: checking for compatible POSIX regex" >&5
9613 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9614   echo $ac_n "(cached) $ac_c" 1>&6
9615 else
9616   
9617         if test "$cross_compiling" = yes; then
9618   ol_cv_c_posix_regex=cross
9619 else
9620   cat > conftest.$ac_ext <<EOF
9621 #line 9622 "configure"
9622 #include "confdefs.h"
9623
9624 #include <sys/types.h>
9625 #include <regex.h>
9626 static char *pattern, *string;
9627 main()
9628 {
9629         int rc;
9630         regex_t re;
9631
9632         pattern = "^A";
9633
9634         if(regcomp(&re, pattern, 0)) {
9635                 return -1;
9636         }
9637         
9638         string = "ALL MATCH";
9639         
9640         rc = regexec(&re, string, 0, (void*)0, 0);
9641
9642         regfree(&re);
9643
9644         return rc;
9645 }
9646 EOF
9647 if { (eval echo configure:9648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9648 then
9649   ol_cv_c_posix_regex=yes
9650 else
9651   echo "configure: failed program was:" >&5
9652   cat conftest.$ac_ext >&5
9653   rm -fr conftest*
9654   ol_cv_c_posix_regex=no
9655 fi
9656 rm -fr conftest*
9657 fi
9658
9659 fi
9660
9661 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9662
9663 if test "$ol_cv_c_posix_regex" = no ; then
9664         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9665 fi
9666
9667
9668 have_uuid=no
9669 for ac_hdr in sys/uuid.h
9670 do
9671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9673 echo "configure:9674: checking for $ac_hdr" >&5
9674 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9675   echo $ac_n "(cached) $ac_c" 1>&6
9676 else
9677   cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9680 #include <$ac_hdr>
9681 EOF
9682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9683 { (eval echo configure:9684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9685 if test -z "$ac_err"; then
9686   rm -rf conftest*
9687   eval "ac_cv_header_$ac_safe=yes"
9688 else
9689   echo "$ac_err" >&5
9690   echo "configure: failed program was:" >&5
9691   cat conftest.$ac_ext >&5
9692   rm -rf conftest*
9693   eval "ac_cv_header_$ac_safe=no"
9694 fi
9695 rm -f conftest*
9696 fi
9697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9698   echo "$ac_t""yes" 1>&6
9699     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9700   cat >> confdefs.h <<EOF
9701 #define $ac_tr_hdr 1
9702 EOF
9703  
9704 else
9705   echo "$ac_t""no" 1>&6
9706 fi
9707 done
9708
9709 if test $ac_cv_header_sys_uuid_h = yes ; then
9710         save_LIBS="$LIBS"
9711         
9712 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9713 echo "configure:9714: checking for library containing uuid_to_str" >&5
9714 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9715   echo $ac_n "(cached) $ac_c" 1>&6
9716 else
9717   ac_func_search_save_LIBS="$LIBS"
9718 ac_cv_search_uuid_to_str="no"
9719 cat > conftest.$ac_ext <<EOF
9720 #line 9721 "configure"
9721 #include "confdefs.h"
9722 /* Override any gcc2 internal prototype to avoid an error.  */
9723 /* We use char because int might match the return type of a gcc2
9724     builtin and then its argument prototype would still apply.  */
9725 char uuid_to_str();
9726
9727 int main() {
9728 uuid_to_str()
9729 ; return 0; }
9730 EOF
9731 if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9732   rm -rf conftest*
9733   ac_cv_search_uuid_to_str="none required"
9734 else
9735   echo "configure: failed program was:" >&5
9736   cat conftest.$ac_ext >&5
9737 fi
9738 rm -f conftest*
9739 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9740 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9741 cat > conftest.$ac_ext <<EOF
9742 #line 9743 "configure"
9743 #include "confdefs.h"
9744 /* Override any gcc2 internal prototype to avoid an error.  */
9745 /* We use char because int might match the return type of a gcc2
9746     builtin and then its argument prototype would still apply.  */
9747 char uuid_to_str();
9748
9749 int main() {
9750 uuid_to_str()
9751 ; return 0; }
9752 EOF
9753 if { (eval echo configure:9754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9754   rm -rf conftest*
9755   ac_cv_search_uuid_to_str="-l$ac_lib"
9756 break
9757 else
9758   echo "configure: failed program was:" >&5
9759   cat conftest.$ac_ext >&5
9760 fi
9761 rm -f conftest*
9762 done
9763 LIBS="$ac_func_search_save_LIBS"
9764 fi
9765
9766 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9767 if test "$ac_cv_search_uuid_to_str" != "no"; then
9768   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9769   have_uuid=yes
9770 else :
9771   :
9772 fi
9773         LIBS="$save_LIBS"
9774
9775         if test have_uuid = yes ; then
9776                 cat >> confdefs.h <<\EOF
9777 #define HAVE_UUID_TO_STR 1
9778 EOF
9779
9780
9781                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9782                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9783         fi
9784 fi
9785
9786 if test $have_uuid = no ; then
9787         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9788 echo "configure:9789: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9789         save_LIBS="$LIBS"
9790         LIBS="$LIBS -lrpcrt4"
9791         cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794
9795                 char UuidCreate@4();
9796                 char UuidToStringA@8();
9797                 
9798 int main() {
9799
9800                 UuidCreate@4();
9801                 UuidToStringA@8();
9802                 
9803 ; return 0; }
9804 EOF
9805 if { (eval echo configure:9806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9806   rm -rf conftest*
9807   need_rpcrt=yes
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811   rm -rf conftest*
9812   need_rpcrt=no
9813 fi
9814 rm -f conftest*
9815         if test $need_rpcrt = yes; then
9816                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9817         fi
9818         LIBS="$save_LIBS"
9819         echo "$ac_t""$need_rpcrt" 1>&6
9820 fi
9821
9822 ol_link_dnssrv=no
9823 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9824 echo "configure:9825: checking for res_query" >&5
9825 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9826   echo $ac_n "(cached) $ac_c" 1>&6
9827 else
9828   cat > conftest.$ac_ext <<EOF
9829 #line 9830 "configure"
9830 #include "confdefs.h"
9831 /* System header to define __stub macros and hopefully few prototypes,
9832     which can conflict with char res_query(); below.  */
9833 #include <assert.h>
9834 /* Override any gcc2 internal prototype to avoid an error.  */
9835 /* We use char because int might match the return type of a gcc2
9836     builtin and then its argument prototype would still apply.  */
9837 char res_query();
9838 char (*f)();
9839
9840 int main() {
9841
9842 /* The GNU C library defines this for functions which it implements
9843     to always fail with ENOSYS.  Some functions are actually named
9844     something starting with __ and the normal name is an alias.  */
9845 #if defined (__stub_res_query) || defined (__stub___res_query)
9846 choke me
9847 #else
9848 f = res_query;
9849 #endif
9850
9851 ; return 0; }
9852 EOF
9853 if { (eval echo configure:9854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9854   rm -rf conftest*
9855   eval "ac_cv_func_res_query=yes"
9856 else
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859   rm -rf conftest*
9860   eval "ac_cv_func_res_query=no"
9861 fi
9862 rm -f conftest*
9863 fi
9864
9865 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9866   echo "$ac_t""yes" 1>&6
9867   :
9868 else
9869   echo "$ac_t""no" 1>&6
9870 fi
9871
9872 if test $ac_cv_func_res_query = no ; then 
9873         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9874 echo "configure:9875: checking for __res_query" >&5
9875 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9876   echo $ac_n "(cached) $ac_c" 1>&6
9877 else
9878   cat > conftest.$ac_ext <<EOF
9879 #line 9880 "configure"
9880 #include "confdefs.h"
9881 /* System header to define __stub macros and hopefully few prototypes,
9882     which can conflict with char __res_query(); below.  */
9883 #include <assert.h>
9884 /* Override any gcc2 internal prototype to avoid an error.  */
9885 /* We use char because int might match the return type of a gcc2
9886     builtin and then its argument prototype would still apply.  */
9887 char __res_query();
9888 char (*f)();
9889
9890 int main() {
9891
9892 /* The GNU C library defines this for functions which it implements
9893     to always fail with ENOSYS.  Some functions are actually named
9894     something starting with __ and the normal name is an alias.  */
9895 #if defined (__stub___res_query) || defined (__stub_____res_query)
9896 choke me
9897 #else
9898 f = __res_query;
9899 #endif
9900
9901 ; return 0; }
9902 EOF
9903 if { (eval echo configure:9904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9904   rm -rf conftest*
9905   eval "ac_cv_func___res_query=yes"
9906 else
9907   echo "configure: failed program was:" >&5
9908   cat conftest.$ac_ext >&5
9909   rm -rf conftest*
9910   eval "ac_cv_func___res_query=no"
9911 fi
9912 rm -f conftest*
9913 fi
9914
9915 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9916   echo "$ac_t""yes" 1>&6
9917   :
9918 else
9919   echo "$ac_t""no" 1>&6
9920 fi
9921
9922         ac_cv_func_res_query=$ac_cv_func___res_query
9923 fi
9924
9925 if test $ac_cv_func_res_query = no ; then 
9926         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9927 echo "configure:9928: checking for res_query in -lbind" >&5
9928 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9929 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9930   echo $ac_n "(cached) $ac_c" 1>&6
9931 else
9932   ac_save_LIBS="$LIBS"
9933 LIBS="-lbind  $LIBS"
9934 cat > conftest.$ac_ext <<EOF
9935 #line 9936 "configure"
9936 #include "confdefs.h"
9937 /* Override any gcc2 internal prototype to avoid an error.  */
9938 /* We use char because int might match the return type of a gcc2
9939     builtin and then its argument prototype would still apply.  */
9940 char res_query();
9941
9942 int main() {
9943 res_query()
9944 ; return 0; }
9945 EOF
9946 if { (eval echo configure:9947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9947   rm -rf conftest*
9948   eval "ac_cv_lib_$ac_lib_var=yes"
9949 else
9950   echo "configure: failed program was:" >&5
9951   cat conftest.$ac_ext >&5
9952   rm -rf conftest*
9953   eval "ac_cv_lib_$ac_lib_var=no"
9954 fi
9955 rm -f conftest*
9956 LIBS="$ac_save_LIBS"
9957
9958 fi
9959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9960   echo "$ac_t""yes" 1>&6
9961     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9962     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9963   cat >> confdefs.h <<EOF
9964 #define $ac_tr_lib 1
9965 EOF
9966
9967   LIBS="-lbind $LIBS"
9968
9969 else
9970   echo "$ac_t""no" 1>&6
9971 fi
9972
9973         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9974 fi
9975
9976 if test $ac_cv_func_res_query = no ; then 
9977         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9978 echo "configure:9979: checking for __res_query in -lbind" >&5
9979 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9981   echo $ac_n "(cached) $ac_c" 1>&6
9982 else
9983   ac_save_LIBS="$LIBS"
9984 LIBS="-lbind  $LIBS"
9985 cat > conftest.$ac_ext <<EOF
9986 #line 9987 "configure"
9987 #include "confdefs.h"
9988 /* Override any gcc2 internal prototype to avoid an error.  */
9989 /* We use char because int might match the return type of a gcc2
9990     builtin and then its argument prototype would still apply.  */
9991 char __res_query();
9992
9993 int main() {
9994 __res_query()
9995 ; return 0; }
9996 EOF
9997 if { (eval echo configure:9998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9998   rm -rf conftest*
9999   eval "ac_cv_lib_$ac_lib_var=yes"
10000 else
10001   echo "configure: failed program was:" >&5
10002   cat conftest.$ac_ext >&5
10003   rm -rf conftest*
10004   eval "ac_cv_lib_$ac_lib_var=no"
10005 fi
10006 rm -f conftest*
10007 LIBS="$ac_save_LIBS"
10008
10009 fi
10010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10011   echo "$ac_t""yes" 1>&6
10012     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10013     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10014   cat >> confdefs.h <<EOF
10015 #define $ac_tr_lib 1
10016 EOF
10017
10018   LIBS="-lbind $LIBS"
10019
10020 else
10021   echo "$ac_t""no" 1>&6
10022 fi
10023
10024         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10025 fi
10026
10027 if test $ac_cv_func_res_query = no ; then 
10028         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10029 echo "configure:10030: checking for res_query in -lresolv" >&5
10030 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10031 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10032   echo $ac_n "(cached) $ac_c" 1>&6
10033 else
10034   ac_save_LIBS="$LIBS"
10035 LIBS="-lresolv  $LIBS"
10036 cat > conftest.$ac_ext <<EOF
10037 #line 10038 "configure"
10038 #include "confdefs.h"
10039 /* Override any gcc2 internal prototype to avoid an error.  */
10040 /* We use char because int might match the return type of a gcc2
10041     builtin and then its argument prototype would still apply.  */
10042 char res_query();
10043
10044 int main() {
10045 res_query()
10046 ; return 0; }
10047 EOF
10048 if { (eval echo configure:10049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10049   rm -rf conftest*
10050   eval "ac_cv_lib_$ac_lib_var=yes"
10051 else
10052   echo "configure: failed program was:" >&5
10053   cat conftest.$ac_ext >&5
10054   rm -rf conftest*
10055   eval "ac_cv_lib_$ac_lib_var=no"
10056 fi
10057 rm -f conftest*
10058 LIBS="$ac_save_LIBS"
10059
10060 fi
10061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10062   echo "$ac_t""yes" 1>&6
10063     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10064     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10065   cat >> confdefs.h <<EOF
10066 #define $ac_tr_lib 1
10067 EOF
10068
10069   LIBS="-lresolv $LIBS"
10070
10071 else
10072   echo "$ac_t""no" 1>&6
10073 fi
10074
10075         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10076 fi
10077
10078 if test $ac_cv_func_res_query = no ; then 
10079         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10080 echo "configure:10081: checking for __res_query in -lresolv" >&5
10081 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10082 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10083   echo $ac_n "(cached) $ac_c" 1>&6
10084 else
10085   ac_save_LIBS="$LIBS"
10086 LIBS="-lresolv  $LIBS"
10087 cat > conftest.$ac_ext <<EOF
10088 #line 10089 "configure"
10089 #include "confdefs.h"
10090 /* Override any gcc2 internal prototype to avoid an error.  */
10091 /* We use char because int might match the return type of a gcc2
10092     builtin and then its argument prototype would still apply.  */
10093 char __res_query();
10094
10095 int main() {
10096 __res_query()
10097 ; return 0; }
10098 EOF
10099 if { (eval echo configure:10100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10100   rm -rf conftest*
10101   eval "ac_cv_lib_$ac_lib_var=yes"
10102 else
10103   echo "configure: failed program was:" >&5
10104   cat conftest.$ac_ext >&5
10105   rm -rf conftest*
10106   eval "ac_cv_lib_$ac_lib_var=no"
10107 fi
10108 rm -f conftest*
10109 LIBS="$ac_save_LIBS"
10110
10111 fi
10112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10113   echo "$ac_t""yes" 1>&6
10114     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10115     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10116   cat >> confdefs.h <<EOF
10117 #define $ac_tr_lib 1
10118 EOF
10119
10120   LIBS="-lresolv $LIBS"
10121
10122 else
10123   echo "$ac_t""no" 1>&6
10124 fi
10125
10126         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10127 fi
10128
10129 if test "$ac_cv_func_res_query" = yes ; then
10130         cat >> confdefs.h <<\EOF
10131 #define HAVE_RES_QUERY 1
10132 EOF
10133
10134
10135         if test $ol_enable_dnssrv != no ; then
10136                 ol_link_dnssrv=yes
10137         fi
10138 fi
10139
10140 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10141         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10142 fi
10143
10144 for ac_func in getaddrinfo gai_strerror inet_ntop 
10145 do
10146 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10147 echo "configure:10148: checking for $ac_func" >&5
10148 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10149   echo $ac_n "(cached) $ac_c" 1>&6
10150 else
10151   cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 /* System header to define __stub macros and hopefully few prototypes,
10155     which can conflict with char $ac_func(); below.  */
10156 #include <assert.h>
10157 /* Override any gcc2 internal prototype to avoid an error.  */
10158 /* We use char because int might match the return type of a gcc2
10159     builtin and then its argument prototype would still apply.  */
10160 char $ac_func();
10161 char (*f)();
10162
10163 int main() {
10164
10165 /* The GNU C library defines this for functions which it implements
10166     to always fail with ENOSYS.  Some functions are actually named
10167     something starting with __ and the normal name is an alias.  */
10168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10169 choke me
10170 #else
10171 f = $ac_func;
10172 #endif
10173
10174 ; return 0; }
10175 EOF
10176 if { (eval echo configure:10177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10177   rm -rf conftest*
10178   eval "ac_cv_func_$ac_func=yes"
10179 else
10180   echo "configure: failed program was:" >&5
10181   cat conftest.$ac_ext >&5
10182   rm -rf conftest*
10183   eval "ac_cv_func_$ac_func=no"
10184 fi
10185 rm -f conftest*
10186 fi
10187
10188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10191   cat >> confdefs.h <<EOF
10192 #define $ac_tr_func 1
10193 EOF
10194  
10195 else
10196   echo "$ac_t""no" 1>&6
10197 fi
10198 done
10199
10200
10201 ol_link_ipv6=no
10202 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10203         if test $ol_enable_ipv6 = yes ; then
10204                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10205         fi
10206 elif test $ol_enable_ipv6 != no ; then
10207         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10208 echo "configure:10209: checking INET6_ADDRSTRLEN" >&5
10209 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10210   echo $ac_n "(cached) $ac_c" 1>&6
10211 else
10212   
10213                 cat > conftest.$ac_ext <<EOF
10214 #line 10215 "configure"
10215 #include "confdefs.h"
10216
10217 #                       include <netinet/in.h>
10218 #                       ifdef INET6_ADDRSTRLEN
10219                                 __has_inet6_addrstrlen__;
10220 #                       endif
10221                 
10222 EOF
10223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10224   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10225   rm -rf conftest*
10226   ol_cv_inet6_addrstrlen=yes
10227 else
10228   rm -rf conftest*
10229   ol_cv_inet6_addrstrlen=no
10230 fi
10231 rm -f conftest*
10232
10233 fi
10234
10235 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10236
10237
10238         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10239 echo "configure:10240: checking struct sockaddr_storage" >&5
10240 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10241   echo $ac_n "(cached) $ac_c" 1>&6
10242 else
10243   
10244                 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247
10248 #include <sys/types.h>
10249 #include <sys/socket.h>
10250
10251 int main() {
10252
10253                         struct sockaddr_storage ss;
10254
10255 ; return 0; }
10256 EOF
10257 if { (eval echo configure:10258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10258   rm -rf conftest*
10259   ol_cv_struct_sockaddr_storage=yes
10260 else
10261   echo "configure: failed program was:" >&5
10262   cat conftest.$ac_ext >&5
10263   rm -rf conftest*
10264   ol_cv_struct_sockaddr_storage=no
10265 fi
10266 rm -f conftest*
10267 fi
10268
10269 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10270
10271         if test $ol_cv_inet6_addrstrlen = yes \
10272                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10273                 ol_link_ipv6=yes
10274         elif test $ol_enable_ipv6 = yes \
10275                         -a $ol_cv_inet6_addrstrlen = no ; then
10276                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10277         elif test $ol_enable_ipv6 = yes \
10278                         -a $ol_cv_struct_sockaddr_storage = no ; then
10279                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10280         fi
10281 fi
10282
10283 if test $ol_enable_local != no ; then
10284         for ac_hdr in sys/un.h 
10285 do
10286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10288 echo "configure:10289: checking for $ac_hdr" >&5
10289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10290   echo $ac_n "(cached) $ac_c" 1>&6
10291 else
10292   cat > conftest.$ac_ext <<EOF
10293 #line 10294 "configure"
10294 #include "confdefs.h"
10295 #include <$ac_hdr>
10296 EOF
10297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10298 { (eval echo configure:10299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10300 if test -z "$ac_err"; then
10301   rm -rf conftest*
10302   eval "ac_cv_header_$ac_safe=yes"
10303 else
10304   echo "$ac_err" >&5
10305   echo "configure: failed program was:" >&5
10306   cat conftest.$ac_ext >&5
10307   rm -rf conftest*
10308   eval "ac_cv_header_$ac_safe=no"
10309 fi
10310 rm -f conftest*
10311 fi
10312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10313   echo "$ac_t""yes" 1>&6
10314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10315   cat >> confdefs.h <<EOF
10316 #define $ac_tr_hdr 1
10317 EOF
10318  
10319 else
10320   echo "$ac_t""no" 1>&6
10321 fi
10322 done
10323
10324
10325         if test $ol_enable_local = auto ; then
10326                 ol_enable_local=$ac_cv_header_sys_un_h
10327         elif test $ac_cv_header_sys_un_h = no ; then
10328                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10329         fi
10330 fi
10331
10332 ol_link_kbind=no
10333 ol_link_kpasswd=no
10334 ol_link_krb5=no
10335 ol_link_krb4=no
10336
10337 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10338         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10339         -o $ol_with_kerberos = k425 ; then
10340
10341         for ac_hdr in krb5.h
10342 do
10343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10345 echo "configure:10346: checking for $ac_hdr" >&5
10346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10347   echo $ac_n "(cached) $ac_c" 1>&6
10348 else
10349   cat > conftest.$ac_ext <<EOF
10350 #line 10351 "configure"
10351 #include "confdefs.h"
10352 #include <$ac_hdr>
10353 EOF
10354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10355 { (eval echo configure:10356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10357 if test -z "$ac_err"; then
10358   rm -rf conftest*
10359   eval "ac_cv_header_$ac_safe=yes"
10360 else
10361   echo "$ac_err" >&5
10362   echo "configure: failed program was:" >&5
10363   cat conftest.$ac_ext >&5
10364   rm -rf conftest*
10365   eval "ac_cv_header_$ac_safe=no"
10366 fi
10367 rm -f conftest*
10368 fi
10369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10370   echo "$ac_t""yes" 1>&6
10371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10372   cat >> confdefs.h <<EOF
10373 #define $ac_tr_hdr 1
10374 EOF
10375  
10376 else
10377   echo "$ac_t""no" 1>&6
10378 fi
10379 done
10380
10381
10382         if test $ac_cv_header_krb5_h = yes ; then
10383                                 for ac_hdr in heim_err.h
10384 do
10385 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10386 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10387 echo "configure:10388: checking for $ac_hdr" >&5
10388 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10389   echo $ac_n "(cached) $ac_c" 1>&6
10390 else
10391   cat > conftest.$ac_ext <<EOF
10392 #line 10393 "configure"
10393 #include "confdefs.h"
10394 #include <$ac_hdr>
10395 EOF
10396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10397 { (eval echo configure:10398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10399 if test -z "$ac_err"; then
10400   rm -rf conftest*
10401   eval "ac_cv_header_$ac_safe=yes"
10402 else
10403   echo "$ac_err" >&5
10404   echo "configure: failed program was:" >&5
10405   cat conftest.$ac_ext >&5
10406   rm -rf conftest*
10407   eval "ac_cv_header_$ac_safe=no"
10408 fi
10409 rm -f conftest*
10410 fi
10411 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10412   echo "$ac_t""yes" 1>&6
10413     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10414   cat >> confdefs.h <<EOF
10415 #define $ac_tr_hdr 1
10416 EOF
10417  
10418 else
10419   echo "$ac_t""no" 1>&6
10420 fi
10421 done
10422
10423                 if test $ac_cv_header_heim_err_h = yes ; then
10424                         krb5_impl=heimdal
10425                 else
10426                         krb5_impl=mit
10427                 fi
10428
10429                 if test $krb5_impl = mit; then
10430                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10431 echo "configure:10432: checking for main in -lk5crypto" >&5
10432 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10434   echo $ac_n "(cached) $ac_c" 1>&6
10435 else
10436   ac_save_LIBS="$LIBS"
10437 LIBS="-lk5crypto  $LIBS"
10438 cat > conftest.$ac_ext <<EOF
10439 #line 10440 "configure"
10440 #include "confdefs.h"
10441
10442 int main() {
10443 main()
10444 ; return 0; }
10445 EOF
10446 if { (eval echo configure:10447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10447   rm -rf conftest*
10448   eval "ac_cv_lib_$ac_lib_var=yes"
10449 else
10450   echo "configure: failed program was:" >&5
10451   cat conftest.$ac_ext >&5
10452   rm -rf conftest*
10453   eval "ac_cv_lib_$ac_lib_var=no"
10454 fi
10455 rm -f conftest*
10456 LIBS="$ac_save_LIBS"
10457
10458 fi
10459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10460   echo "$ac_t""yes" 1>&6
10461   krb5crypto=k5crypto
10462 else
10463   echo "$ac_t""no" 1>&6
10464 krb5crypto=crypto
10465 fi
10466
10467
10468                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10469 echo "configure:10470: checking for main in -lkrb5" >&5
10470 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10471 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10472   echo $ac_n "(cached) $ac_c" 1>&6
10473 else
10474   ac_save_LIBS="$LIBS"
10475 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10476 cat > conftest.$ac_ext <<EOF
10477 #line 10478 "configure"
10478 #include "confdefs.h"
10479
10480 int main() {
10481 main()
10482 ; return 0; }
10483 EOF
10484 if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10485   rm -rf conftest*
10486   eval "ac_cv_lib_$ac_lib_var=yes"
10487 else
10488   echo "configure: failed program was:" >&5
10489   cat conftest.$ac_ext >&5
10490   rm -rf conftest*
10491   eval "ac_cv_lib_$ac_lib_var=no"
10492 fi
10493 rm -f conftest*
10494 LIBS="$ac_save_LIBS"
10495
10496 fi
10497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10498   echo "$ac_t""yes" 1>&6
10499   have_krb5=yes
10500                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10501 else
10502   echo "$ac_t""no" 1>&6
10503 have_krb5=no
10504 fi
10505
10506
10507                 elif test $krb5_impl = heimdal; then
10508                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10509 echo "configure:10510: checking for main in -ldes" >&5
10510 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10511 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10512   echo $ac_n "(cached) $ac_c" 1>&6
10513 else
10514   ac_save_LIBS="$LIBS"
10515 LIBS="-ldes  $LIBS"
10516 cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519
10520 int main() {
10521 main()
10522 ; return 0; }
10523 EOF
10524 if { (eval echo configure:10525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=yes"
10527 else
10528   echo "configure: failed program was:" >&5
10529   cat conftest.$ac_ext >&5
10530   rm -rf conftest*
10531   eval "ac_cv_lib_$ac_lib_var=no"
10532 fi
10533 rm -f conftest*
10534 LIBS="$ac_save_LIBS"
10535
10536 fi
10537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10538   echo "$ac_t""yes" 1>&6
10539   krb5crypto=des
10540 else
10541   echo "$ac_t""no" 1>&6
10542 krb5crypto=crypto
10543 fi
10544
10545
10546                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10547 echo "configure:10548: checking for main in -lkrb5" >&5
10548 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10550   echo $ac_n "(cached) $ac_c" 1>&6
10551 else
10552   ac_save_LIBS="$LIBS"
10553 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10554 cat > conftest.$ac_ext <<EOF
10555 #line 10556 "configure"
10556 #include "confdefs.h"
10557
10558 int main() {
10559 main()
10560 ; return 0; }
10561 EOF
10562 if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10563   rm -rf conftest*
10564   eval "ac_cv_lib_$ac_lib_var=yes"
10565 else
10566   echo "configure: failed program was:" >&5
10567   cat conftest.$ac_ext >&5
10568   rm -rf conftest*
10569   eval "ac_cv_lib_$ac_lib_var=no"
10570 fi
10571 rm -f conftest*
10572 LIBS="$ac_save_LIBS"
10573
10574 fi
10575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10576   echo "$ac_t""yes" 1>&6
10577   have_krb5=yes
10578                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10579 else
10580   echo "$ac_t""no" 1>&6
10581 have_krb5=no
10582 fi
10583
10584
10585                         cat >> confdefs.h <<\EOF
10586 #define HAVE_HEIMDAL_KERBEROS 1
10587 EOF
10588
10589
10590                 else
10591                         have_krb5=no
10592                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10593                 fi
10594
10595                 if test $have_krb5 = yes ; then
10596                         ol_link_krb5=yes
10597
10598                         cat >> confdefs.h <<\EOF
10599 #define HAVE_KRB5 1
10600 EOF
10601
10602
10603                         if test $ol_enable_kpasswd != no ; then
10604                                 ol_link_kpasswd=yes;
10605                         fi
10606
10607                         if test $ol_with_kerberos = k5only ; then
10608                                 ol_with_kerberos=found
10609                         fi
10610
10611                 elif test $ol_with_kerberos != auto ; then
10612                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10613                 fi
10614
10615         fi
10616 fi
10617
10618 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10619         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10620
10621         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10622 do
10623 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10624 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10625 echo "configure:10626: checking for $ac_hdr" >&5
10626 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10627   echo $ac_n "(cached) $ac_c" 1>&6
10628 else
10629   cat > conftest.$ac_ext <<EOF
10630 #line 10631 "configure"
10631 #include "confdefs.h"
10632 #include <$ac_hdr>
10633 EOF
10634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10635 { (eval echo configure:10636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10637 if test -z "$ac_err"; then
10638   rm -rf conftest*
10639   eval "ac_cv_header_$ac_safe=yes"
10640 else
10641   echo "$ac_err" >&5
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -rf conftest*
10645   eval "ac_cv_header_$ac_safe=no"
10646 fi
10647 rm -f conftest*
10648 fi
10649 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10650   echo "$ac_t""yes" 1>&6
10651     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10652   cat >> confdefs.h <<EOF
10653 #define $ac_tr_hdr 1
10654 EOF
10655  
10656 else
10657   echo "$ac_t""no" 1>&6
10658 fi
10659 done
10660
10661
10662         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10663                 if test $krb5_impl = mit; then
10664                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10665 echo "configure:10666: checking for main in -lkrb4" >&5
10666 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10667 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10668   echo $ac_n "(cached) $ac_c" 1>&6
10669 else
10670   ac_save_LIBS="$LIBS"
10671 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10672 cat > conftest.$ac_ext <<EOF
10673 #line 10674 "configure"
10674 #include "confdefs.h"
10675
10676 int main() {
10677 main()
10678 ; return 0; }
10679 EOF
10680 if { (eval echo configure:10681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10681   rm -rf conftest*
10682   eval "ac_cv_lib_$ac_lib_var=yes"
10683 else
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -rf conftest*
10687   eval "ac_cv_lib_$ac_lib_var=no"
10688 fi
10689 rm -f conftest*
10690 LIBS="$ac_save_LIBS"
10691
10692 fi
10693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10694   echo "$ac_t""yes" 1>&6
10695   have_k425=yes
10696                                 KRB4_LIBS="-lkrb4 -ldes425"
10697 else
10698   echo "$ac_t""no" 1>&6
10699 have_k425=no
10700 fi
10701
10702
10703                 elif test $krb5_impl = heimdal; then
10704                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10705 echo "configure:10706: checking for main in -lkrb4" >&5
10706 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10708   echo $ac_n "(cached) $ac_c" 1>&6
10709 else
10710   ac_save_LIBS="$LIBS"
10711 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10712 cat > conftest.$ac_ext <<EOF
10713 #line 10714 "configure"
10714 #include "confdefs.h"
10715
10716 int main() {
10717 main()
10718 ; return 0; }
10719 EOF
10720 if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10721   rm -rf conftest*
10722   eval "ac_cv_lib_$ac_lib_var=yes"
10723 else
10724   echo "configure: failed program was:" >&5
10725   cat conftest.$ac_ext >&5
10726   rm -rf conftest*
10727   eval "ac_cv_lib_$ac_lib_var=no"
10728 fi
10729 rm -f conftest*
10730 LIBS="$ac_save_LIBS"
10731
10732 fi
10733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10734   echo "$ac_t""yes" 1>&6
10735   have_k425=yes
10736                                 KRB4_LIBS="-lkrb4"
10737 else
10738   echo "$ac_t""no" 1>&6
10739 have_k425=no
10740 fi
10741
10742
10743                 else
10744                         have_425=no
10745                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10746                 fi
10747
10748                 if test $have_k425 = yes ; then
10749                         ol_with_kerberos=found
10750                         ol_link_krb4=yes
10751
10752                         cat >> confdefs.h <<\EOF
10753 #define HAVE_KRB425 1
10754 EOF
10755
10756                         cat >> confdefs.h <<\EOF
10757 #define HAVE_KRB4 1
10758 EOF
10759
10760
10761                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10762 echo "configure:10763: checking for des_debug in Kerberos libraries" >&5
10763 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10764   echo $ac_n "(cached) $ac_c" 1>&6
10765 else
10766   
10767                                                                 save_LIBS="$LIBS"
10768                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10769                                 cat > conftest.$ac_ext <<EOF
10770 #line 10771 "configure"
10771 #include "confdefs.h"
10772
10773 #include <kerberosIV/krb.h>
10774 #include <kerberosIV/des.h>
10775 extern int des_debug;
10776
10777 int main() {
10778
10779 des_debug = 1;
10780
10781 ; return 0; }
10782 EOF
10783 if { (eval echo configure:10784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10784   rm -rf conftest*
10785   ol_cv_var_des_debug=yes
10786 else
10787   echo "configure: failed program was:" >&5
10788   cat conftest.$ac_ext >&5
10789   rm -rf conftest*
10790   ol_cv_var_des_debug=no
10791 fi
10792 rm -f conftest*
10793                                                                 LIBS="$save_LIBS"
10794                         
10795 fi
10796
10797 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10798
10799                         if test $ol_cv_var_des_debug = yes ; then
10800                                 cat >> confdefs.h <<\EOF
10801 #define HAVE_DES_DEBUG 1
10802 EOF
10803
10804                         fi
10805
10806                         LIBS="$save_LIBS"
10807                 fi
10808         fi
10809 fi
10810
10811 if test $ol_link_krb5 = yes ; then
10812         ol_with_kerberos=found
10813 fi
10814
10815 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10816         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10817
10818         for ac_hdr in krb.h des.h krb-archaeology.h 
10819 do
10820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10822 echo "configure:10823: checking for $ac_hdr" >&5
10823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829 #include <$ac_hdr>
10830 EOF
10831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10832 { (eval echo configure:10833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10834 if test -z "$ac_err"; then
10835   rm -rf conftest*
10836   eval "ac_cv_header_$ac_safe=yes"
10837 else
10838   echo "$ac_err" >&5
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_header_$ac_safe=no"
10843 fi
10844 rm -f conftest*
10845 fi
10846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10847   echo "$ac_t""yes" 1>&6
10848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10849   cat >> confdefs.h <<EOF
10850 #define $ac_tr_hdr 1
10851 EOF
10852  
10853 else
10854   echo "$ac_t""no" 1>&6
10855 fi
10856 done
10857
10858
10859         if test $ac_cv_header_krb_h = yes ; then
10860                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10861 echo "configure:10862: checking for main in -lkrb" >&5
10862 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   ac_save_LIBS="$LIBS"
10867 LIBS="-lkrb -ldes $LIBS"
10868 cat > conftest.$ac_ext <<EOF
10869 #line 10870 "configure"
10870 #include "confdefs.h"
10871
10872 int main() {
10873 main()
10874 ; return 0; }
10875 EOF
10876 if { (eval echo configure:10877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10877   rm -rf conftest*
10878   eval "ac_cv_lib_$ac_lib_var=yes"
10879 else
10880   echo "configure: failed program was:" >&5
10881   cat conftest.$ac_ext >&5
10882   rm -rf conftest*
10883   eval "ac_cv_lib_$ac_lib_var=no"
10884 fi
10885 rm -f conftest*
10886 LIBS="$ac_save_LIBS"
10887
10888 fi
10889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10890   echo "$ac_t""yes" 1>&6
10891   have_k4=yes
10892 else
10893   echo "$ac_t""no" 1>&6
10894 have_k4=no
10895 fi
10896
10897
10898                 if test $have_k4 = yes ; then
10899                         ol_with_kerberos=found
10900                         ol_link_krb4=yes
10901
10902                         cat >> confdefs.h <<\EOF
10903 #define HAVE_KRB4 1
10904 EOF
10905
10906
10907                         KRB4_LIBS="-lkrb -ldes"
10908
10909                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10910                                 cat >> confdefs.h <<\EOF
10911 #define HAVE_KTH_KERBEROS 1
10912 EOF
10913
10914                         fi
10915                 fi
10916         fi
10917 fi
10918
10919 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10920         ol_link_kpasswd=yes
10921 fi
10922
10923 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10924         ol_link_kbind=yes
10925
10926 elif test $ol_enable_kbind = yes ; then
10927         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10928 fi
10929
10930 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10931         cat >> confdefs.h <<\EOF
10932 #define HAVE_KERBEROS 1
10933 EOF
10934
10935
10936 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10937         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10938 fi
10939
10940 ol_link_tls=no
10941 if test $ol_with_tls != no ; then
10942         for ac_hdr in openssl/ssl.h ssl.h
10943 do
10944 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10945 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10946 echo "configure:10947: checking for $ac_hdr" >&5
10947 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10948   echo $ac_n "(cached) $ac_c" 1>&6
10949 else
10950   cat > conftest.$ac_ext <<EOF
10951 #line 10952 "configure"
10952 #include "confdefs.h"
10953 #include <$ac_hdr>
10954 EOF
10955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10956 { (eval echo configure:10957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10958 if test -z "$ac_err"; then
10959   rm -rf conftest*
10960   eval "ac_cv_header_$ac_safe=yes"
10961 else
10962   echo "$ac_err" >&5
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -rf conftest*
10966   eval "ac_cv_header_$ac_safe=no"
10967 fi
10968 rm -f conftest*
10969 fi
10970 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10971   echo "$ac_t""yes" 1>&6
10972     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10973   cat >> confdefs.h <<EOF
10974 #define $ac_tr_hdr 1
10975 EOF
10976  
10977 else
10978   echo "$ac_t""no" 1>&6
10979 fi
10980 done
10981
10982         
10983         if test $ac_cv_header_openssl_ssl_h = yes \
10984                 -o $ac_cv_header_ssl_h = yes ; then
10985                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10986 echo "configure:10987: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10987 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10989   echo $ac_n "(cached) $ac_c" 1>&6
10990 else
10991   ac_save_LIBS="$LIBS"
10992 LIBS="-lssl -lcrypto $LIBS"
10993 cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996 /* Override any gcc2 internal prototype to avoid an error.  */
10997 /* We use char because int might match the return type of a gcc2
10998     builtin and then its argument prototype would still apply.  */
10999 char SSLeay_add_ssl_algorithms();
11000
11001 int main() {
11002 SSLeay_add_ssl_algorithms()
11003 ; return 0; }
11004 EOF
11005 if { (eval echo configure:11006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11006   rm -rf conftest*
11007   eval "ac_cv_lib_$ac_lib_var=yes"
11008 else
11009   echo "configure: failed program was:" >&5
11010   cat conftest.$ac_ext >&5
11011   rm -rf conftest*
11012   eval "ac_cv_lib_$ac_lib_var=no"
11013 fi
11014 rm -f conftest*
11015 LIBS="$ac_save_LIBS"
11016
11017 fi
11018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11019   echo "$ac_t""yes" 1>&6
11020   have_ssleay=yes
11021                         need_rsaref=no
11022 else
11023   echo "$ac_t""no" 1>&6
11024 have_ssleay=no
11025 fi
11026
11027                         
11028                 if test $have_ssleay = no ; then
11029                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11030 echo "configure:11031: checking for SSL_library_init in -lssl" >&5
11031 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11032 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11033   echo $ac_n "(cached) $ac_c" 1>&6
11034 else
11035   ac_save_LIBS="$LIBS"
11036 LIBS="-lssl -lcrypto $LIBS"
11037 cat > conftest.$ac_ext <<EOF
11038 #line 11039 "configure"
11039 #include "confdefs.h"
11040 /* Override any gcc2 internal prototype to avoid an error.  */
11041 /* We use char because int might match the return type of a gcc2
11042     builtin and then its argument prototype would still apply.  */
11043 char SSL_library_init();
11044
11045 int main() {
11046 SSL_library_init()
11047 ; return 0; }
11048 EOF
11049 if { (eval echo configure:11050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11050   rm -rf conftest*
11051   eval "ac_cv_lib_$ac_lib_var=yes"
11052 else
11053   echo "configure: failed program was:" >&5
11054   cat conftest.$ac_ext >&5
11055   rm -rf conftest*
11056   eval "ac_cv_lib_$ac_lib_var=no"
11057 fi
11058 rm -f conftest*
11059 LIBS="$ac_save_LIBS"
11060
11061 fi
11062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11063   echo "$ac_t""yes" 1>&6
11064   have_ssleay=yes
11065                                 need_rsaref=no
11066 else
11067   echo "$ac_t""no" 1>&6
11068 have_ssleay=no
11069 fi
11070
11071                 fi
11072
11073                 if test $have_ssleay = no ; then
11074                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11075 echo "configure:11076: checking for ssl3_accept in -lssl" >&5
11076 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11077 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11078   echo $ac_n "(cached) $ac_c" 1>&6
11079 else
11080   ac_save_LIBS="$LIBS"
11081 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11082 cat > conftest.$ac_ext <<EOF
11083 #line 11084 "configure"
11084 #include "confdefs.h"
11085 /* Override any gcc2 internal prototype to avoid an error.  */
11086 /* We use char because int might match the return type of a gcc2
11087     builtin and then its argument prototype would still apply.  */
11088 char ssl3_accept();
11089
11090 int main() {
11091 ssl3_accept()
11092 ; return 0; }
11093 EOF
11094 if { (eval echo configure:11095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11095   rm -rf conftest*
11096   eval "ac_cv_lib_$ac_lib_var=yes"
11097 else
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   eval "ac_cv_lib_$ac_lib_var=no"
11102 fi
11103 rm -f conftest*
11104 LIBS="$ac_save_LIBS"
11105
11106 fi
11107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11108   echo "$ac_t""yes" 1>&6
11109   have_ssleay=yes
11110                                 need_rsaref=yes
11111 else
11112   echo "$ac_t""no" 1>&6
11113 have_ssleay=no
11114 fi
11115
11116                 fi
11117
11118                 if test $have_ssleay = yes ; then
11119                         ol_with_tls=found
11120                         ol_link_tls=yes
11121
11122                         cat >> confdefs.h <<\EOF
11123 #define HAVE_SSLEAY 1
11124 EOF
11125
11126
11127                         if test $need_rsaref = yes; then
11128                                 cat >> confdefs.h <<\EOF
11129 #define HAVE_RSAREF 1
11130 EOF
11131
11132
11133                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11134                         else
11135                                 TLS_LIBS="-lssl -lcrypto"
11136                         fi
11137                 fi
11138         fi
11139
11140 else
11141         echo "configure: warning: TLS data protection not supported!" 1>&2
11142 fi
11143
11144 if test $ol_link_tls = yes ; then
11145         cat >> confdefs.h <<\EOF
11146 #define HAVE_TLS 1
11147 EOF
11148
11149
11150 elif test $ol_with_tls = auto ; then
11151         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11152         echo "configure: warning: TLS data protection not supported!" 1>&2
11153
11154 elif test $ol_with_tls != no ; then
11155         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11156 fi
11157
11158 if test $ol_enable_lmpasswd != no; then
11159         if test $ol_link_tls != yes ; then
11160                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11161         fi
11162
11163         cat >> confdefs.h <<\EOF
11164 #define SLAPD_LMHASH 1
11165 EOF
11166
11167 fi
11168
11169 for ac_func in \
11170         ctime_r                 \
11171         gethostbyname_r gethostbyaddr_r \
11172
11173 do
11174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11175 echo "configure:11176: checking for $ac_func" >&5
11176 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11177   echo $ac_n "(cached) $ac_c" 1>&6
11178 else
11179   cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182 /* System header to define __stub macros and hopefully few prototypes,
11183     which can conflict with char $ac_func(); below.  */
11184 #include <assert.h>
11185 /* Override any gcc2 internal prototype to avoid an error.  */
11186 /* We use char because int might match the return type of a gcc2
11187     builtin and then its argument prototype would still apply.  */
11188 char $ac_func();
11189 char (*f)();
11190
11191 int main() {
11192
11193 /* The GNU C library defines this for functions which it implements
11194     to always fail with ENOSYS.  Some functions are actually named
11195     something starting with __ and the normal name is an alias.  */
11196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11197 choke me
11198 #else
11199 f = $ac_func;
11200 #endif
11201
11202 ; return 0; }
11203 EOF
11204 if { (eval echo configure:11205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11205   rm -rf conftest*
11206   eval "ac_cv_func_$ac_func=yes"
11207 else
11208   echo "configure: failed program was:" >&5
11209   cat conftest.$ac_ext >&5
11210   rm -rf conftest*
11211   eval "ac_cv_func_$ac_func=no"
11212 fi
11213 rm -f conftest*
11214 fi
11215
11216 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11217   echo "$ac_t""yes" 1>&6
11218     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11219   cat >> confdefs.h <<EOF
11220 #define $ac_tr_func 1
11221 EOF
11222  
11223 else
11224   echo "$ac_t""no" 1>&6
11225 fi
11226 done
11227
11228
11229 if test "$ac_cv_func_ctime_r" = no ; then
11230         ol_cv_func_ctime_r_nargs=0
11231 else
11232         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11233 echo "configure:11234: checking number of arguments of ctime_r" >&5
11234 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11235   echo $ac_n "(cached) $ac_c" 1>&6
11236 else
11237   cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240 #include <time.h>
11241 int main() {
11242 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11243 ; return 0; }
11244 EOF
11245 if { (eval echo configure:11246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11246   rm -rf conftest*
11247   ol_cv_func_ctime_r_nargs3=yes
11248 else
11249   echo "configure: failed program was:" >&5
11250   cat conftest.$ac_ext >&5
11251   rm -rf conftest*
11252   ol_cv_func_ctime_r_nargs3=no
11253 fi
11254 rm -f conftest*
11255
11256         cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 #include <time.h>
11260 int main() {
11261 time_t ti; char *buffer; ctime_r(&ti,buffer);
11262 ; return 0; }
11263 EOF
11264 if { (eval echo configure:11265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11265   rm -rf conftest*
11266   ol_cv_func_ctime_r_nargs2=yes
11267 else
11268   echo "configure: failed program was:" >&5
11269   cat conftest.$ac_ext >&5
11270   rm -rf conftest*
11271   ol_cv_func_ctime_r_nargs2=no
11272 fi
11273 rm -f conftest*
11274
11275         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11276                 $ol_cv_func_ctime_r_nargs2 = no ; then
11277
11278                 ol_cv_func_ctime_r_nargs=3
11279
11280         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11281                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11282
11283                 ol_cv_func_ctime_r_nargs=2
11284
11285         else
11286                 ol_cv_func_ctime_r_nargs=0
11287         fi
11288   
11289 fi
11290
11291 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11292
11293   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11294         cat >> confdefs.h <<EOF
11295 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11296 EOF
11297
11298   fi
11299
11300 fi
11301
11302 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11303         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11304 echo "configure:11305: checking number of arguments of gethostbyname_r" >&5
11305 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11306   echo $ac_n "(cached) $ac_c" 1>&6
11307 else
11308   cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 #include <sys/types.h>
11312 #include <sys/socket.h>
11313 #include <netinet/in.h>
11314 #include <netdb.h>
11315 #define BUFSIZE (sizeof(struct hostent)+10)
11316 int main() {
11317 struct hostent hent; char buffer[BUFSIZE];
11318                 int bufsize=BUFSIZE;int h_errno;
11319                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11320                         buffer, bufsize, &h_errno);
11321 ; return 0; }
11322 EOF
11323 if { (eval echo configure:11324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11324   rm -rf conftest*
11325   ol_cv_func_gethostbyname_r_nargs5=yes
11326 else
11327   echo "configure: failed program was:" >&5
11328   cat conftest.$ac_ext >&5
11329   rm -rf conftest*
11330   ol_cv_func_gethostbyname_r_nargs5=no
11331 fi
11332 rm -f conftest*
11333
11334         cat > conftest.$ac_ext <<EOF
11335 #line 11336 "configure"
11336 #include "confdefs.h"
11337 #include <sys/types.h>
11338 #include <sys/socket.h>
11339 #include <netinet/in.h>
11340 #include <netdb.h>
11341 #define BUFSIZE (sizeof(struct hostent)+10)
11342 int main() {
11343 struct hostent hent;struct hostent *rhent;
11344                 char buffer[BUFSIZE];
11345                 int bufsize=BUFSIZE;int h_errno;
11346                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11347                         &rhent, &h_errno);
11348 ; return 0; }
11349 EOF
11350 if { (eval echo configure:11351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11351   rm -rf conftest*
11352   ol_cv_func_gethostbyname_r_nargs6=yes
11353 else
11354   echo "configure: failed program was:" >&5
11355   cat conftest.$ac_ext >&5
11356   rm -rf conftest*
11357   ol_cv_func_gethostbyname_r_nargs6=no
11358 fi
11359 rm -f conftest*
11360
11361         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11362                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11363
11364                 ol_cv_func_gethostbyname_r_nargs=5
11365
11366         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11367                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11368
11369                 ol_cv_func_gethostbyname_r_nargs=6
11370
11371         else
11372                 ol_cv_func_gethostbyname_r_nargs=0
11373         fi
11374   
11375 fi
11376
11377 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11378   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11379         cat >> confdefs.h <<EOF
11380 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11381 EOF
11382
11383   fi
11384
11385 else
11386         ol_cv_func_gethostbyname_r_nargs=0
11387 fi
11388  
11389 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11390         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11391 echo "configure:11392: checking number of arguments of gethostbyaddr_r" >&5
11392 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11393   echo $ac_n "(cached) $ac_c" 1>&6
11394 else
11395   cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 #include <sys/types.h>
11399 #include <sys/socket.h>
11400 #include <netinet/in.h>
11401 #include <netdb.h>
11402 #define BUFSIZE (sizeof(struct hostent)+10)
11403 int main() {
11404 struct hostent hent; char buffer[BUFSIZE]; 
11405             struct in_addr add;
11406             size_t alen=sizeof(struct in_addr);
11407             int bufsize=BUFSIZE;int h_errno;
11408                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11409                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11410 ; return 0; }
11411 EOF
11412 if { (eval echo configure:11413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11413   rm -rf conftest*
11414   ol_cv_func_gethostbyaddr_r_nargs7=yes
11415 else
11416   echo "configure: failed program was:" >&5
11417   cat conftest.$ac_ext >&5
11418   rm -rf conftest*
11419   ol_cv_func_gethostbyaddr_r_nargs7=no
11420 fi
11421 rm -f conftest*
11422
11423         cat > conftest.$ac_ext <<EOF
11424 #line 11425 "configure"
11425 #include "confdefs.h"
11426 #include <sys/types.h>
11427 #include <sys/socket.h>
11428 #include <netinet/in.h>
11429 #include <netdb.h>
11430 #define BUFSIZE (sizeof(struct hostent)+10)
11431 int main() {
11432 struct hostent hent;
11433                 struct hostent *rhent; char buffer[BUFSIZE]; 
11434                 struct in_addr add;
11435                 size_t alen=sizeof(struct in_addr);
11436                 int bufsize=BUFSIZE;int h_errno;
11437                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11438                         alen, AF_INET, &hent, buffer, bufsize, 
11439                         &rhent, &h_errno);
11440 ; return 0; }
11441 EOF
11442 if { (eval echo configure:11443: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11443   rm -rf conftest*
11444   ol_cv_func_gethostbyaddr_r_nargs8=yes
11445 else
11446   echo "configure: failed program was:" >&5
11447   cat conftest.$ac_ext >&5
11448   rm -rf conftest*
11449   ol_cv_func_gethostbyaddr_r_nargs8=no
11450 fi
11451 rm -f conftest*
11452
11453         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11454                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11455
11456                 ol_cv_func_gethostbyaddr_r_nargs=7
11457
11458         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11459                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11460
11461                 ol_cv_func_gethostbyaddr_r_nargs=8
11462
11463         else
11464                 ol_cv_func_gethostbyaddr_r_nargs=0
11465         fi
11466   
11467 fi
11468
11469 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11470   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11471     cat >> confdefs.h <<EOF
11472 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11473 EOF
11474
11475   fi
11476
11477 else
11478         ol_cv_func_gethostbyaddr_r_nargs=0
11479 fi
11480
11481 if test "$ac_cv_func_ctime_r" = yes \
11482         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11483         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11484         -a "$ac_cv_func_gethostbyname_r" = yes \
11485         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11486         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11487         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11488         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11489         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11490         ; then
11491  
11492         cat >> confdefs.h <<\EOF
11493 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11494 EOF
11495
11496 fi
11497
11498 ol_link_threads=no
11499
11500 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11501         -o $ol_with_threads = nt ; then
11502
11503         
11504         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11505 echo "configure:11506: checking for _beginthread" >&5
11506 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11507   echo $ac_n "(cached) $ac_c" 1>&6
11508 else
11509   cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 /* System header to define __stub macros and hopefully few prototypes,
11513     which can conflict with char _beginthread(); below.  */
11514 #include <assert.h>
11515 /* Override any gcc2 internal prototype to avoid an error.  */
11516 /* We use char because int might match the return type of a gcc2
11517     builtin and then its argument prototype would still apply.  */
11518 char _beginthread();
11519 char (*f)();
11520
11521 int main() {
11522
11523 /* The GNU C library defines this for functions which it implements
11524     to always fail with ENOSYS.  Some functions are actually named
11525     something starting with __ and the normal name is an alias.  */
11526 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11527 choke me
11528 #else
11529 f = _beginthread;
11530 #endif
11531
11532 ; return 0; }
11533 EOF
11534 if { (eval echo configure:11535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11535   rm -rf conftest*
11536   eval "ac_cv_func__beginthread=yes"
11537 else
11538   echo "configure: failed program was:" >&5
11539   cat conftest.$ac_ext >&5
11540   rm -rf conftest*
11541   eval "ac_cv_func__beginthread=no"
11542 fi
11543 rm -f conftest*
11544 fi
11545
11546 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11547   echo "$ac_t""yes" 1>&6
11548   :
11549 else
11550   echo "$ac_t""no" 1>&6
11551 fi
11552
11553
11554         if test $ac_cv_func__beginthread = yes ; then
11555                 cat >> confdefs.h <<\EOF
11556 #define HAVE_NT_THREADS 1
11557 EOF
11558
11559                 ol_cv_nt_threads=yes
11560         fi
11561
11562
11563         if test "$ol_cv_nt_threads" = yes ; then
11564                 ol_link_threads=nt
11565                 ol_with_threads=found
11566                 ol_with_yielding_select=yes
11567
11568                 cat >> confdefs.h <<\EOF
11569 #define HAVE_NT_SERVICE_MANAGER 1
11570 EOF
11571
11572                 cat >> confdefs.h <<\EOF
11573 #define HAVE_NT_EVENT_LOG 1
11574 EOF
11575
11576         fi
11577
11578         if test $ol_with_threads = nt ; then
11579                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11580         fi
11581 fi
11582
11583 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11584         -o $ol_with_threads = posix ; then
11585
11586         for ac_hdr in pthread.h
11587 do
11588 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11589 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11590 echo "configure:11591: checking for $ac_hdr" >&5
11591 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11592   echo $ac_n "(cached) $ac_c" 1>&6
11593 else
11594   cat > conftest.$ac_ext <<EOF
11595 #line 11596 "configure"
11596 #include "confdefs.h"
11597 #include <$ac_hdr>
11598 EOF
11599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11600 { (eval echo configure:11601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11602 if test -z "$ac_err"; then
11603   rm -rf conftest*
11604   eval "ac_cv_header_$ac_safe=yes"
11605 else
11606   echo "$ac_err" >&5
11607   echo "configure: failed program was:" >&5
11608   cat conftest.$ac_ext >&5
11609   rm -rf conftest*
11610   eval "ac_cv_header_$ac_safe=no"
11611 fi
11612 rm -f conftest*
11613 fi
11614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11615   echo "$ac_t""yes" 1>&6
11616     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11617   cat >> confdefs.h <<EOF
11618 #define $ac_tr_hdr 1
11619 EOF
11620  
11621 else
11622   echo "$ac_t""no" 1>&6
11623 fi
11624 done
11625
11626
11627         if test $ac_cv_header_pthread_h = yes ; then
11628                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11629 echo "configure:11630: checking POSIX thread version" >&5
11630 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11631   echo $ac_n "(cached) $ac_c" 1>&6
11632 else
11633   
11634         cat > conftest.$ac_ext <<EOF
11635 #line 11636 "configure"
11636 #include "confdefs.h"
11637
11638 #               include <pthread.h>
11639         
11640 int main() {
11641
11642                 int i = PTHREAD_CREATE_JOINABLE;
11643         
11644 ; return 0; }
11645 EOF
11646 if { (eval echo configure:11647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11647   rm -rf conftest*
11648   
11649         cat > conftest.$ac_ext <<EOF
11650 #line 11651 "configure"
11651 #include "confdefs.h"
11652 #include <pthread.h>
11653 EOF
11654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11655   egrep "pthread_detach" >/dev/null 2>&1; then
11656   rm -rf conftest*
11657   ol_cv_pthread_version=10
11658 else
11659   rm -rf conftest*
11660   ol_cv_pthread_version=8
11661 fi
11662 rm -f conftest*
11663
11664 else
11665   echo "configure: failed program was:" >&5
11666   cat conftest.$ac_ext >&5
11667   rm -rf conftest*
11668   
11669         cat > conftest.$ac_ext <<EOF
11670 #line 11671 "configure"
11671 #include "confdefs.h"
11672
11673 #               include <pthread.h>
11674 #               ifdef PTHREAD_CREATE_UNDETACHED
11675                 draft7
11676 #               endif
11677         
11678 EOF
11679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11680   egrep "draft7" >/dev/null 2>&1; then
11681   rm -rf conftest*
11682   ol_cv_pthread_version=7
11683 else
11684   rm -rf conftest*
11685   
11686         cat > conftest.$ac_ext <<EOF
11687 #line 11688 "configure"
11688 #include "confdefs.h"
11689 #include <pthread.h>
11690 EOF
11691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11692   egrep "pthread_attr_init" >/dev/null 2>&1; then
11693   rm -rf conftest*
11694   ol_cv_pthread_version=6
11695 else
11696   rm -rf conftest*
11697   
11698         cat > conftest.$ac_ext <<EOF
11699 #line 11700 "configure"
11700 #include "confdefs.h"
11701
11702 #               include <pthread.h>
11703 #ifdef          PTHREAD_MUTEX_INITIALIZER
11704                 draft5
11705 #endif
11706         
11707 EOF
11708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11709   egrep "draft5" >/dev/null 2>&1; then
11710   rm -rf conftest*
11711   ol_cv_pthread_version=5
11712 else
11713   rm -rf conftest*
11714   ol_cv_pthread_version=4
11715 fi
11716 rm -f conftest*
11717  
11718 fi
11719 rm -f conftest*
11720  
11721 fi
11722 rm -f conftest*
11723  
11724 fi
11725 rm -f conftest*
11726
11727 fi
11728
11729 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11730
11731
11732                 if test $ol_cv_pthread_version != 0 ; then
11733                         cat >> confdefs.h <<EOF
11734 #define HAVE_PTHREADS $ol_cv_pthread_version
11735 EOF
11736
11737                 else
11738                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11739                 fi
11740
11741                 # consider threads found
11742                 ol_with_threads=found
11743
11744                 
11745         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11746 echo "configure:11747: checking for LinuxThreads pthread.h" >&5
11747 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11748   echo $ac_n "(cached) $ac_c" 1>&6
11749 else
11750   cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 #include <pthread.h>
11754 EOF
11755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11756   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11757   rm -rf conftest*
11758   ol_cv_header_linux_threads=yes
11759 else
11760   rm -rf conftest*
11761   ol_cv_header_linux_threads=no
11762 fi
11763 rm -f conftest*
11764
11765                 
11766 fi
11767
11768 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11769         if test $ol_cv_header_linux_threads = yes; then
11770                 cat >> confdefs.h <<\EOF
11771 #define HAVE_LINUX_THREADS 1
11772 EOF
11773
11774         fi
11775
11776                 
11777         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11778 echo "configure:11779: checking for GNU Pth pthread.h" >&5
11779 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11780   echo $ac_n "(cached) $ac_c" 1>&6
11781 else
11782   cat > conftest.$ac_ext <<EOF
11783 #line 11784 "configure"
11784 #include "confdefs.h"
11785 #include <pthread.h>
11786 #ifdef _POSIX_THREAD_IS_GNU_PTH
11787         __gnu_pth__;
11788 #endif
11789
11790 EOF
11791 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11792   egrep "__gnu_pth__" >/dev/null 2>&1; then
11793   rm -rf conftest*
11794   ol_cv_header_gnu_pth_pthread_h=yes
11795 else
11796   rm -rf conftest*
11797   ol_cv_header_gnu_pth_pthread_h=no
11798 fi
11799 rm -f conftest*
11800
11801                 
11802 fi
11803
11804 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11805
11806
11807                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11808                         for ac_hdr in sched.h
11809 do
11810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11812 echo "configure:11813: checking for $ac_hdr" >&5
11813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11814   echo $ac_n "(cached) $ac_c" 1>&6
11815 else
11816   cat > conftest.$ac_ext <<EOF
11817 #line 11818 "configure"
11818 #include "confdefs.h"
11819 #include <$ac_hdr>
11820 EOF
11821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11822 { (eval echo configure:11823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11824 if test -z "$ac_err"; then
11825   rm -rf conftest*
11826   eval "ac_cv_header_$ac_safe=yes"
11827 else
11828   echo "$ac_err" >&5
11829   echo "configure: failed program was:" >&5
11830   cat conftest.$ac_ext >&5
11831   rm -rf conftest*
11832   eval "ac_cv_header_$ac_safe=no"
11833 fi
11834 rm -f conftest*
11835 fi
11836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11837   echo "$ac_t""yes" 1>&6
11838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11839   cat >> confdefs.h <<EOF
11840 #define $ac_tr_hdr 1
11841 EOF
11842  
11843 else
11844   echo "$ac_t""no" 1>&6
11845 fi
11846 done
11847
11848                 fi
11849
11850                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11851                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11852 echo "configure:11853: checking for pthread_create in default libraries" >&5
11853 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11854   echo $ac_n "(cached) $ac_c" 1>&6
11855 else
11856   
11857                 if test "$cross_compiling" = yes; then
11858   cat > conftest.$ac_ext <<EOF
11859 #line 11860 "configure"
11860 #include "confdefs.h"
11861 /* pthread test headers */
11862 #include <pthread.h>
11863 #if HAVE_PTHREADS < 7
11864 #include <errno.h>
11865 #endif
11866 #ifndef NULL
11867 #define NULL (void*)0
11868 #endif
11869
11870 static void *task(p)
11871         void *p;
11872 {
11873         return (void *) (p == NULL);
11874 }
11875
11876 int main() {
11877
11878         /* pthread test function */
11879 #ifndef PTHREAD_CREATE_DETACHED
11880 #define PTHREAD_CREATE_DETACHED 1
11881 #endif
11882         pthread_t t;
11883         int status;
11884         int detach = PTHREAD_CREATE_DETACHED;
11885
11886 #if HAVE_PTHREADS > 4
11887         /* Final pthreads */
11888         pthread_attr_t attr;
11889
11890         status = pthread_attr_init(&attr);
11891         if( status ) return status;
11892
11893 #if HAVE_PTHREADS < 7
11894         status = pthread_attr_setdetachstate(&attr, &detach);
11895         if( status < 0 ) status = errno;
11896 #else
11897         status = pthread_attr_setdetachstate(&attr, detach);
11898 #endif
11899         if( status ) return status;
11900         status = pthread_create( &t, &attr, task, NULL );
11901 #if HAVE_PTHREADS < 7
11902         if( status < 0 ) status = errno;
11903 #endif
11904         if( status ) return status;
11905 #else
11906         /* Draft 4 pthreads */
11907         status = pthread_create( &t, pthread_attr_default, task, NULL );
11908         if( status ) return errno;
11909
11910         /* give thread a chance to complete */
11911         /* it should remain joinable and hence detachable */
11912         sleep( 1 );
11913
11914         status = pthread_detach( &t );
11915         if( status ) return errno;
11916 #endif
11917
11918 #ifdef HAVE_LINUX_THREADS
11919         pthread_kill_other_threads_np();
11920 #endif
11921
11922         return 0;
11923
11924 ; return 0; }
11925 EOF
11926 if { (eval echo configure:11927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11927   rm -rf conftest*
11928   ol_cv_pthread_create=yes
11929 else
11930   echo "configure: failed program was:" >&5
11931   cat conftest.$ac_ext >&5
11932   rm -rf conftest*
11933   ol_cv_pthread_create=no
11934 fi
11935 rm -f conftest*
11936 else
11937   cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940 /* pthread test headers */
11941 #include <pthread.h>
11942 #if HAVE_PTHREADS < 7
11943 #include <errno.h>
11944 #endif
11945 #ifndef NULL
11946 #define NULL (void*)0
11947 #endif
11948
11949 static void *task(p)
11950         void *p;
11951 {
11952         return (void *) (p == NULL);
11953 }
11954
11955
11956 int main(argc, argv)
11957         int argc;
11958         char **argv;
11959 {
11960
11961         /* pthread test function */
11962 #ifndef PTHREAD_CREATE_DETACHED
11963 #define PTHREAD_CREATE_DETACHED 1
11964 #endif
11965         pthread_t t;
11966         int status;
11967         int detach = PTHREAD_CREATE_DETACHED;
11968
11969 #if HAVE_PTHREADS > 4
11970         /* Final pthreads */
11971         pthread_attr_t attr;
11972
11973         status = pthread_attr_init(&attr);
11974         if( status ) return status;
11975
11976 #if HAVE_PTHREADS < 7
11977         status = pthread_attr_setdetachstate(&attr, &detach);
11978         if( status < 0 ) status = errno;
11979 #else
11980         status = pthread_attr_setdetachstate(&attr, detach);
11981 #endif
11982         if( status ) return status;
11983         status = pthread_create( &t, &attr, task, NULL );
11984 #if HAVE_PTHREADS < 7
11985         if( status < 0 ) status = errno;
11986 #endif
11987         if( status ) return status;
11988 #else
11989         /* Draft 4 pthreads */
11990         status = pthread_create( &t, pthread_attr_default, task, NULL );
11991         if( status ) return errno;
11992
11993         /* give thread a chance to complete */
11994         /* it should remain joinable and hence detachable */
11995         sleep( 1 );
11996
11997         status = pthread_detach( &t );
11998         if( status ) return errno;
11999 #endif
12000
12001 #ifdef HAVE_LINUX_THREADS
12002         pthread_kill_other_threads_np();
12003 #endif
12004
12005         return 0;
12006
12007 }
12008
12009 EOF
12010 if { (eval echo configure:12011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12011 then
12012   ol_cv_pthread_create=yes
12013 else
12014   echo "configure: failed program was:" >&5
12015   cat conftest.$ac_ext >&5
12016   rm -fr conftest*
12017   ol_cv_pthread_create=no
12018 fi
12019 rm -fr conftest*
12020 fi
12021
12022 fi
12023
12024 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12025
12026                 if test $ol_cv_pthread_create != no ; then
12027                         ol_link_threads=posix
12028                         ol_link_pthreads=""
12029                 fi
12030                 
12031                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12032 if test "$ol_link_threads" = no ; then
12033         # try -kthread
12034         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12035 echo "configure:12036: checking for pthread link with -kthread" >&5
12036 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12037   echo $ac_n "(cached) $ac_c" 1>&6
12038 else
12039   
12040                 # save the flags
12041                 ol_LIBS="$LIBS"
12042                 LIBS="-kthread $LIBS"
12043
12044                 if test "$cross_compiling" = yes; then
12045   cat > conftest.$ac_ext <<EOF
12046 #line 12047 "configure"
12047 #include "confdefs.h"
12048 /* pthread test headers */
12049 #include <pthread.h>
12050 #if HAVE_PTHREADS < 7
12051 #include <errno.h>
12052 #endif
12053 #ifndef NULL
12054 #define NULL (void*)0
12055 #endif
12056
12057 static void *task(p)
12058         void *p;
12059 {
12060         return (void *) (p == NULL);
12061 }
12062
12063 int main() {
12064
12065         /* pthread test function */
12066 #ifndef PTHREAD_CREATE_DETACHED
12067 #define PTHREAD_CREATE_DETACHED 1
12068 #endif
12069         pthread_t t;
12070         int status;
12071         int detach = PTHREAD_CREATE_DETACHED;
12072
12073 #if HAVE_PTHREADS > 4
12074         /* Final pthreads */
12075         pthread_attr_t attr;
12076
12077         status = pthread_attr_init(&attr);
12078         if( status ) return status;
12079
12080 #if HAVE_PTHREADS < 7
12081         status = pthread_attr_setdetachstate(&attr, &detach);
12082         if( status < 0 ) status = errno;
12083 #else
12084         status = pthread_attr_setdetachstate(&attr, detach);
12085 #endif
12086         if( status ) return status;
12087         status = pthread_create( &t, &attr, task, NULL );
12088 #if HAVE_PTHREADS < 7
12089         if( status < 0 ) status = errno;
12090 #endif
12091         if( status ) return status;
12092 #else
12093         /* Draft 4 pthreads */
12094         status = pthread_create( &t, pthread_attr_default, task, NULL );
12095         if( status ) return errno;
12096
12097         /* give thread a chance to complete */
12098         /* it should remain joinable and hence detachable */
12099         sleep( 1 );
12100
12101         status = pthread_detach( &t );
12102         if( status ) return errno;
12103 #endif
12104
12105 #ifdef HAVE_LINUX_THREADS
12106         pthread_kill_other_threads_np();
12107 #endif
12108
12109         return 0;
12110
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   ol_cv_pthread_kthread=yes
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   ol_cv_pthread_kthread=no
12121 fi
12122 rm -f conftest*
12123 else
12124   cat > conftest.$ac_ext <<EOF
12125 #line 12126 "configure"
12126 #include "confdefs.h"
12127 /* pthread test headers */
12128 #include <pthread.h>
12129 #if HAVE_PTHREADS < 7
12130 #include <errno.h>
12131 #endif
12132 #ifndef NULL
12133 #define NULL (void*)0
12134 #endif
12135
12136 static void *task(p)
12137         void *p;
12138 {
12139         return (void *) (p == NULL);
12140 }
12141
12142
12143 int main(argc, argv)
12144         int argc;
12145         char **argv;
12146 {
12147
12148         /* pthread test function */
12149 #ifndef PTHREAD_CREATE_DETACHED
12150 #define PTHREAD_CREATE_DETACHED 1
12151 #endif
12152         pthread_t t;
12153         int status;
12154         int detach = PTHREAD_CREATE_DETACHED;
12155
12156 #if HAVE_PTHREADS > 4
12157         /* Final pthreads */
12158         pthread_attr_t attr;
12159
12160         status = pthread_attr_init(&attr);
12161         if( status ) return status;
12162
12163 #if HAVE_PTHREADS < 7
12164         status = pthread_attr_setdetachstate(&attr, &detach);
12165         if( status < 0 ) status = errno;
12166 #else
12167         status = pthread_attr_setdetachstate(&attr, detach);
12168 #endif
12169         if( status ) return status;
12170         status = pthread_create( &t, &attr, task, NULL );
12171 #if HAVE_PTHREADS < 7
12172         if( status < 0 ) status = errno;
12173 #endif
12174         if( status ) return status;
12175 #else
12176         /* Draft 4 pthreads */
12177         status = pthread_create( &t, pthread_attr_default, task, NULL );
12178         if( status ) return errno;
12179
12180         /* give thread a chance to complete */
12181         /* it should remain joinable and hence detachable */
12182         sleep( 1 );
12183
12184         status = pthread_detach( &t );
12185         if( status ) return errno;
12186 #endif
12187
12188 #ifdef HAVE_LINUX_THREADS
12189         pthread_kill_other_threads_np();
12190 #endif
12191
12192         return 0;
12193
12194 }
12195
12196 EOF
12197 if { (eval echo configure:12198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12198 then
12199   ol_cv_pthread_kthread=yes
12200 else
12201   echo "configure: failed program was:" >&5
12202   cat conftest.$ac_ext >&5
12203   rm -fr conftest*
12204   ol_cv_pthread_kthread=no
12205 fi
12206 rm -fr conftest*
12207 fi
12208
12209
12210                 # restore the LIBS
12211                 LIBS="$ol_LIBS"
12212         
12213 fi
12214
12215 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12216
12217         if test $ol_cv_pthread_kthread = yes ; then
12218                 ol_link_pthreads="-kthread"
12219                 ol_link_threads=posix
12220         fi
12221 fi
12222
12223                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12224 if test "$ol_link_threads" = no ; then
12225         # try -pthread
12226         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12227 echo "configure:12228: checking for pthread link with -pthread" >&5
12228 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12229   echo $ac_n "(cached) $ac_c" 1>&6
12230 else
12231   
12232                 # save the flags
12233                 ol_LIBS="$LIBS"
12234                 LIBS="-pthread $LIBS"
12235
12236                 if test "$cross_compiling" = yes; then
12237   cat > conftest.$ac_ext <<EOF
12238 #line 12239 "configure"
12239 #include "confdefs.h"
12240 /* pthread test headers */
12241 #include <pthread.h>
12242 #if HAVE_PTHREADS < 7
12243 #include <errno.h>
12244 #endif
12245 #ifndef NULL
12246 #define NULL (void*)0
12247 #endif
12248
12249 static void *task(p)
12250         void *p;
12251 {
12252         return (void *) (p == NULL);
12253 }
12254
12255 int main() {
12256
12257         /* pthread test function */
12258 #ifndef PTHREAD_CREATE_DETACHED
12259 #define PTHREAD_CREATE_DETACHED 1
12260 #endif
12261         pthread_t t;
12262         int status;
12263         int detach = PTHREAD_CREATE_DETACHED;
12264
12265 #if HAVE_PTHREADS > 4
12266         /* Final pthreads */
12267         pthread_attr_t attr;
12268
12269         status = pthread_attr_init(&attr);
12270         if( status ) return status;
12271
12272 #if HAVE_PTHREADS < 7
12273         status = pthread_attr_setdetachstate(&attr, &detach);
12274         if( status < 0 ) status = errno;
12275 #else
12276         status = pthread_attr_setdetachstate(&attr, detach);
12277 #endif
12278         if( status ) return status;
12279         status = pthread_create( &t, &attr, task, NULL );
12280 #if HAVE_PTHREADS < 7
12281         if( status < 0 ) status = errno;
12282 #endif
12283         if( status ) return status;
12284 #else
12285         /* Draft 4 pthreads */
12286         status = pthread_create( &t, pthread_attr_default, task, NULL );
12287         if( status ) return errno;
12288
12289         /* give thread a chance to complete */
12290         /* it should remain joinable and hence detachable */
12291         sleep( 1 );
12292
12293         status = pthread_detach( &t );
12294         if( status ) return errno;
12295 #endif
12296
12297 #ifdef HAVE_LINUX_THREADS
12298         pthread_kill_other_threads_np();
12299 #endif
12300
12301         return 0;
12302
12303 ; return 0; }
12304 EOF
12305 if { (eval echo configure:12306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12306   rm -rf conftest*
12307   ol_cv_pthread_pthread=yes
12308 else
12309   echo "configure: failed program was:" >&5
12310   cat conftest.$ac_ext >&5
12311   rm -rf conftest*
12312   ol_cv_pthread_pthread=no
12313 fi
12314 rm -f conftest*
12315 else
12316   cat > conftest.$ac_ext <<EOF
12317 #line 12318 "configure"
12318 #include "confdefs.h"
12319 /* pthread test headers */
12320 #include <pthread.h>
12321 #if HAVE_PTHREADS < 7
12322 #include <errno.h>
12323 #endif
12324 #ifndef NULL
12325 #define NULL (void*)0
12326 #endif
12327
12328 static void *task(p)
12329         void *p;
12330 {
12331         return (void *) (p == NULL);
12332 }
12333
12334
12335 int main(argc, argv)
12336         int argc;
12337         char **argv;
12338 {
12339
12340         /* pthread test function */
12341 #ifndef PTHREAD_CREATE_DETACHED
12342 #define PTHREAD_CREATE_DETACHED 1
12343 #endif
12344         pthread_t t;
12345         int status;
12346         int detach = PTHREAD_CREATE_DETACHED;
12347
12348 #if HAVE_PTHREADS > 4
12349         /* Final pthreads */
12350         pthread_attr_t attr;
12351
12352         status = pthread_attr_init(&attr);
12353         if( status ) return status;
12354
12355 #if HAVE_PTHREADS < 7
12356         status = pthread_attr_setdetachstate(&attr, &detach);
12357         if( status < 0 ) status = errno;
12358 #else
12359         status = pthread_attr_setdetachstate(&attr, detach);
12360 #endif
12361         if( status ) return status;
12362         status = pthread_create( &t, &attr, task, NULL );
12363 #if HAVE_PTHREADS < 7
12364         if( status < 0 ) status = errno;
12365 #endif
12366         if( status ) return status;
12367 #else
12368         /* Draft 4 pthreads */
12369         status = pthread_create( &t, pthread_attr_default, task, NULL );
12370         if( status ) return errno;
12371
12372         /* give thread a chance to complete */
12373         /* it should remain joinable and hence detachable */
12374         sleep( 1 );
12375
12376         status = pthread_detach( &t );
12377         if( status ) return errno;
12378 #endif
12379
12380 #ifdef HAVE_LINUX_THREADS
12381         pthread_kill_other_threads_np();
12382 #endif
12383
12384         return 0;
12385
12386 }
12387
12388 EOF
12389 if { (eval echo configure:12390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12390 then
12391   ol_cv_pthread_pthread=yes
12392 else
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -fr conftest*
12396   ol_cv_pthread_pthread=no
12397 fi
12398 rm -fr conftest*
12399 fi
12400
12401
12402                 # restore the LIBS
12403                 LIBS="$ol_LIBS"
12404         
12405 fi
12406
12407 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12408
12409         if test $ol_cv_pthread_pthread = yes ; then
12410                 ol_link_pthreads="-pthread"
12411                 ol_link_threads=posix
12412         fi
12413 fi
12414
12415                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12416 if test "$ol_link_threads" = no ; then
12417         # try -pthreads
12418         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12419 echo "configure:12420: checking for pthread link with -pthreads" >&5
12420 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12421   echo $ac_n "(cached) $ac_c" 1>&6
12422 else
12423   
12424                 # save the flags
12425                 ol_LIBS="$LIBS"
12426                 LIBS="-pthreads $LIBS"
12427
12428                 if test "$cross_compiling" = yes; then
12429   cat > conftest.$ac_ext <<EOF
12430 #line 12431 "configure"
12431 #include "confdefs.h"
12432 /* pthread test headers */
12433 #include <pthread.h>
12434 #if HAVE_PTHREADS < 7
12435 #include <errno.h>
12436 #endif
12437 #ifndef NULL
12438 #define NULL (void*)0
12439 #endif
12440
12441 static void *task(p)
12442         void *p;
12443 {
12444         return (void *) (p == NULL);
12445 }
12446
12447 int main() {
12448
12449         /* pthread test function */
12450 #ifndef PTHREAD_CREATE_DETACHED
12451 #define PTHREAD_CREATE_DETACHED 1
12452 #endif
12453         pthread_t t;
12454         int status;
12455         int detach = PTHREAD_CREATE_DETACHED;
12456
12457 #if HAVE_PTHREADS > 4
12458         /* Final pthreads */
12459         pthread_attr_t attr;
12460
12461         status = pthread_attr_init(&attr);
12462         if( status ) return status;
12463
12464 #if HAVE_PTHREADS < 7
12465         status = pthread_attr_setdetachstate(&attr, &detach);
12466         if( status < 0 ) status = errno;
12467 #else
12468         status = pthread_attr_setdetachstate(&attr, detach);
12469 #endif
12470         if( status ) return status;
12471         status = pthread_create( &t, &attr, task, NULL );
12472 #if HAVE_PTHREADS < 7
12473         if( status < 0 ) status = errno;
12474 #endif
12475         if( status ) return status;
12476 #else
12477         /* Draft 4 pthreads */
12478         status = pthread_create( &t, pthread_attr_default, task, NULL );
12479         if( status ) return errno;
12480
12481         /* give thread a chance to complete */
12482         /* it should remain joinable and hence detachable */
12483         sleep( 1 );
12484
12485         status = pthread_detach( &t );
12486         if( status ) return errno;
12487 #endif
12488
12489 #ifdef HAVE_LINUX_THREADS
12490         pthread_kill_other_threads_np();
12491 #endif
12492
12493         return 0;
12494
12495 ; return 0; }
12496 EOF
12497 if { (eval echo configure:12498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12498   rm -rf conftest*
12499   ol_cv_pthread_pthreads=yes
12500 else
12501   echo "configure: failed program was:" >&5
12502   cat conftest.$ac_ext >&5
12503   rm -rf conftest*
12504   ol_cv_pthread_pthreads=no
12505 fi
12506 rm -f conftest*
12507 else
12508   cat > conftest.$ac_ext <<EOF
12509 #line 12510 "configure"
12510 #include "confdefs.h"
12511 /* pthread test headers */
12512 #include <pthread.h>
12513 #if HAVE_PTHREADS < 7
12514 #include <errno.h>
12515 #endif
12516 #ifndef NULL
12517 #define NULL (void*)0
12518 #endif
12519
12520 static void *task(p)
12521         void *p;
12522 {
12523         return (void *) (p == NULL);
12524 }
12525
12526
12527 int main(argc, argv)
12528         int argc;
12529         char **argv;
12530 {
12531
12532         /* pthread test function */
12533 #ifndef PTHREAD_CREATE_DETACHED
12534 #define PTHREAD_CREATE_DETACHED 1
12535 #endif
12536         pthread_t t;
12537         int status;
12538         int detach = PTHREAD_CREATE_DETACHED;
12539
12540 #if HAVE_PTHREADS > 4
12541         /* Final pthreads */
12542         pthread_attr_t attr;
12543
12544         status = pthread_attr_init(&attr);
12545         if( status ) return status;
12546
12547 #if HAVE_PTHREADS < 7
12548         status = pthread_attr_setdetachstate(&attr, &detach);
12549         if( status < 0 ) status = errno;
12550 #else
12551         status = pthread_attr_setdetachstate(&attr, detach);
12552 #endif
12553         if( status ) return status;
12554         status = pthread_create( &t, &attr, task, NULL );
12555 #if HAVE_PTHREADS < 7
12556         if( status < 0 ) status = errno;
12557 #endif
12558         if( status ) return status;
12559 #else
12560         /* Draft 4 pthreads */
12561         status = pthread_create( &t, pthread_attr_default, task, NULL );
12562         if( status ) return errno;
12563
12564         /* give thread a chance to complete */
12565         /* it should remain joinable and hence detachable */
12566         sleep( 1 );
12567
12568         status = pthread_detach( &t );
12569         if( status ) return errno;
12570 #endif
12571
12572 #ifdef HAVE_LINUX_THREADS
12573         pthread_kill_other_threads_np();
12574 #endif
12575
12576         return 0;
12577
12578 }
12579
12580 EOF
12581 if { (eval echo configure:12582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12582 then
12583   ol_cv_pthread_pthreads=yes
12584 else
12585   echo "configure: failed program was:" >&5
12586   cat conftest.$ac_ext >&5
12587   rm -fr conftest*
12588   ol_cv_pthread_pthreads=no
12589 fi
12590 rm -fr conftest*
12591 fi
12592
12593
12594                 # restore the LIBS
12595                 LIBS="$ol_LIBS"
12596         
12597 fi
12598
12599 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12600
12601         if test $ol_cv_pthread_pthreads = yes ; then
12602                 ol_link_pthreads="-pthreads"
12603                 ol_link_threads=posix
12604         fi
12605 fi
12606
12607                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12608 if test "$ol_link_threads" = no ; then
12609         # try -mthreads
12610         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12611 echo "configure:12612: checking for pthread link with -mthreads" >&5
12612 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12613   echo $ac_n "(cached) $ac_c" 1>&6
12614 else
12615   
12616                 # save the flags
12617                 ol_LIBS="$LIBS"
12618                 LIBS="-mthreads $LIBS"
12619
12620                 if test "$cross_compiling" = yes; then
12621   cat > conftest.$ac_ext <<EOF
12622 #line 12623 "configure"
12623 #include "confdefs.h"
12624 /* pthread test headers */
12625 #include <pthread.h>
12626 #if HAVE_PTHREADS < 7
12627 #include <errno.h>
12628 #endif
12629 #ifndef NULL
12630 #define NULL (void*)0
12631 #endif
12632
12633 static void *task(p)
12634         void *p;
12635 {
12636         return (void *) (p == NULL);
12637 }
12638
12639 int main() {
12640
12641         /* pthread test function */
12642 #ifndef PTHREAD_CREATE_DETACHED
12643 #define PTHREAD_CREATE_DETACHED 1
12644 #endif
12645         pthread_t t;
12646         int status;
12647         int detach = PTHREAD_CREATE_DETACHED;
12648
12649 #if HAVE_PTHREADS > 4
12650         /* Final pthreads */
12651         pthread_attr_t attr;
12652
12653         status = pthread_attr_init(&attr);
12654         if( status ) return status;
12655
12656 #if HAVE_PTHREADS < 7
12657         status = pthread_attr_setdetachstate(&attr, &detach);
12658         if( status < 0 ) status = errno;
12659 #else
12660         status = pthread_attr_setdetachstate(&attr, detach);
12661 #endif
12662         if( status ) return status;
12663         status = pthread_create( &t, &attr, task, NULL );
12664 #if HAVE_PTHREADS < 7
12665         if( status < 0 ) status = errno;
12666 #endif
12667         if( status ) return status;
12668 #else
12669         /* Draft 4 pthreads */
12670         status = pthread_create( &t, pthread_attr_default, task, NULL );
12671         if( status ) return errno;
12672
12673         /* give thread a chance to complete */
12674         /* it should remain joinable and hence detachable */
12675         sleep( 1 );
12676
12677         status = pthread_detach( &t );
12678         if( status ) return errno;
12679 #endif
12680
12681 #ifdef HAVE_LINUX_THREADS
12682         pthread_kill_other_threads_np();
12683 #endif
12684
12685         return 0;
12686
12687 ; return 0; }
12688 EOF
12689 if { (eval echo configure:12690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12690   rm -rf conftest*
12691   ol_cv_pthread_mthreads=yes
12692 else
12693   echo "configure: failed program was:" >&5
12694   cat conftest.$ac_ext >&5
12695   rm -rf conftest*
12696   ol_cv_pthread_mthreads=no
12697 fi
12698 rm -f conftest*
12699 else
12700   cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 /* pthread test headers */
12704 #include <pthread.h>
12705 #if HAVE_PTHREADS < 7
12706 #include <errno.h>
12707 #endif
12708 #ifndef NULL
12709 #define NULL (void*)0
12710 #endif
12711
12712 static void *task(p)
12713         void *p;
12714 {
12715         return (void *) (p == NULL);
12716 }
12717
12718
12719 int main(argc, argv)
12720         int argc;
12721         char **argv;
12722 {
12723
12724         /* pthread test function */
12725 #ifndef PTHREAD_CREATE_DETACHED
12726 #define PTHREAD_CREATE_DETACHED 1
12727 #endif
12728         pthread_t t;
12729         int status;
12730         int detach = PTHREAD_CREATE_DETACHED;
12731
12732 #if HAVE_PTHREADS > 4
12733         /* Final pthreads */
12734         pthread_attr_t attr;
12735
12736         status = pthread_attr_init(&attr);
12737         if( status ) return status;
12738
12739 #if HAVE_PTHREADS < 7
12740         status = pthread_attr_setdetachstate(&attr, &detach);
12741         if( status < 0 ) status = errno;
12742 #else
12743         status = pthread_attr_setdetachstate(&attr, detach);
12744 #endif
12745         if( status ) return status;
12746         status = pthread_create( &t, &attr, task, NULL );
12747 #if HAVE_PTHREADS < 7
12748         if( status < 0 ) status = errno;
12749 #endif
12750         if( status ) return status;
12751 #else
12752         /* Draft 4 pthreads */
12753         status = pthread_create( &t, pthread_attr_default, task, NULL );
12754         if( status ) return errno;
12755
12756         /* give thread a chance to complete */
12757         /* it should remain joinable and hence detachable */
12758         sleep( 1 );
12759
12760         status = pthread_detach( &t );
12761         if( status ) return errno;
12762 #endif
12763
12764 #ifdef HAVE_LINUX_THREADS
12765         pthread_kill_other_threads_np();
12766 #endif
12767
12768         return 0;
12769
12770 }
12771
12772 EOF
12773 if { (eval echo configure:12774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12774 then
12775   ol_cv_pthread_mthreads=yes
12776 else
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -fr conftest*
12780   ol_cv_pthread_mthreads=no
12781 fi
12782 rm -fr conftest*
12783 fi
12784
12785
12786                 # restore the LIBS
12787                 LIBS="$ol_LIBS"
12788         
12789 fi
12790
12791 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12792
12793         if test $ol_cv_pthread_mthreads = yes ; then
12794                 ol_link_pthreads="-mthreads"
12795                 ol_link_threads=posix
12796         fi
12797 fi
12798
12799                 # Pthread try link: -thread (ol_cv_pthread_thread)
12800 if test "$ol_link_threads" = no ; then
12801         # try -thread
12802         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12803 echo "configure:12804: checking for pthread link with -thread" >&5
12804 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12805   echo $ac_n "(cached) $ac_c" 1>&6
12806 else
12807   
12808                 # save the flags
12809                 ol_LIBS="$LIBS"
12810                 LIBS="-thread $LIBS"
12811
12812                 if test "$cross_compiling" = yes; then
12813   cat > conftest.$ac_ext <<EOF
12814 #line 12815 "configure"
12815 #include "confdefs.h"
12816 /* pthread test headers */
12817 #include <pthread.h>
12818 #if HAVE_PTHREADS < 7
12819 #include <errno.h>
12820 #endif
12821 #ifndef NULL
12822 #define NULL (void*)0
12823 #endif
12824
12825 static void *task(p)
12826         void *p;
12827 {
12828         return (void *) (p == NULL);
12829 }
12830
12831 int main() {
12832
12833         /* pthread test function */
12834 #ifndef PTHREAD_CREATE_DETACHED
12835 #define PTHREAD_CREATE_DETACHED 1
12836 #endif
12837         pthread_t t;
12838         int status;
12839         int detach = PTHREAD_CREATE_DETACHED;
12840
12841 #if HAVE_PTHREADS > 4
12842         /* Final pthreads */
12843         pthread_attr_t attr;
12844
12845         status = pthread_attr_init(&attr);
12846         if( status ) return status;
12847
12848 #if HAVE_PTHREADS < 7
12849         status = pthread_attr_setdetachstate(&attr, &detach);
12850         if( status < 0 ) status = errno;
12851 #else
12852         status = pthread_attr_setdetachstate(&attr, detach);
12853 #endif
12854         if( status ) return status;
12855         status = pthread_create( &t, &attr, task, NULL );
12856 #if HAVE_PTHREADS < 7
12857         if( status < 0 ) status = errno;
12858 #endif
12859         if( status ) return status;
12860 #else
12861         /* Draft 4 pthreads */
12862         status = pthread_create( &t, pthread_attr_default, task, NULL );
12863         if( status ) return errno;
12864
12865         /* give thread a chance to complete */
12866         /* it should remain joinable and hence detachable */
12867         sleep( 1 );
12868
12869         status = pthread_detach( &t );
12870         if( status ) return errno;
12871 #endif
12872
12873 #ifdef HAVE_LINUX_THREADS
12874         pthread_kill_other_threads_np();
12875 #endif
12876
12877         return 0;
12878
12879 ; return 0; }
12880 EOF
12881 if { (eval echo configure:12882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12882   rm -rf conftest*
12883   ol_cv_pthread_thread=yes
12884 else
12885   echo "configure: failed program was:" >&5
12886   cat conftest.$ac_ext >&5
12887   rm -rf conftest*
12888   ol_cv_pthread_thread=no
12889 fi
12890 rm -f conftest*
12891 else
12892   cat > conftest.$ac_ext <<EOF
12893 #line 12894 "configure"
12894 #include "confdefs.h"
12895 /* pthread test headers */
12896 #include <pthread.h>
12897 #if HAVE_PTHREADS < 7
12898 #include <errno.h>
12899 #endif
12900 #ifndef NULL
12901 #define NULL (void*)0
12902 #endif
12903
12904 static void *task(p)
12905         void *p;
12906 {
12907         return (void *) (p == NULL);
12908 }
12909
12910
12911 int main(argc, argv)
12912         int argc;
12913         char **argv;
12914 {
12915
12916         /* pthread test function */
12917 #ifndef PTHREAD_CREATE_DETACHED
12918 #define PTHREAD_CREATE_DETACHED 1
12919 #endif
12920         pthread_t t;
12921         int status;
12922         int detach = PTHREAD_CREATE_DETACHED;
12923
12924 #if HAVE_PTHREADS > 4
12925         /* Final pthreads */
12926         pthread_attr_t attr;
12927
12928         status = pthread_attr_init(&attr);
12929         if( status ) return status;
12930
12931 #if HAVE_PTHREADS < 7
12932         status = pthread_attr_setdetachstate(&attr, &detach);
12933         if( status < 0 ) status = errno;
12934 #else
12935         status = pthread_attr_setdetachstate(&attr, detach);
12936 #endif
12937         if( status ) return status;
12938         status = pthread_create( &t, &attr, task, NULL );
12939 #if HAVE_PTHREADS < 7
12940         if( status < 0 ) status = errno;
12941 #endif
12942         if( status ) return status;
12943 #else
12944         /* Draft 4 pthreads */
12945         status = pthread_create( &t, pthread_attr_default, task, NULL );
12946         if( status ) return errno;
12947
12948         /* give thread a chance to complete */
12949         /* it should remain joinable and hence detachable */
12950         sleep( 1 );
12951
12952         status = pthread_detach( &t );
12953         if( status ) return errno;
12954 #endif
12955
12956 #ifdef HAVE_LINUX_THREADS
12957         pthread_kill_other_threads_np();
12958 #endif
12959
12960         return 0;
12961
12962 }
12963
12964 EOF
12965 if { (eval echo configure:12966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12966 then
12967   ol_cv_pthread_thread=yes
12968 else
12969   echo "configure: failed program was:" >&5
12970   cat conftest.$ac_ext >&5
12971   rm -fr conftest*
12972   ol_cv_pthread_thread=no
12973 fi
12974 rm -fr conftest*
12975 fi
12976
12977
12978                 # restore the LIBS
12979                 LIBS="$ol_LIBS"
12980         
12981 fi
12982
12983 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12984
12985         if test $ol_cv_pthread_thread = yes ; then
12986                 ol_link_pthreads="-thread"
12987                 ol_link_threads=posix
12988         fi
12989 fi
12990
12991
12992                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12993 if test "$ol_link_threads" = no ; then
12994         # try -lpthread -lmach -lexc -lc_r
12995         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12996 echo "configure:12997: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12997 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12998   echo $ac_n "(cached) $ac_c" 1>&6
12999 else
13000   
13001                 # save the flags
13002                 ol_LIBS="$LIBS"
13003                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13004
13005                 if test "$cross_compiling" = yes; then
13006   cat > conftest.$ac_ext <<EOF
13007 #line 13008 "configure"
13008 #include "confdefs.h"
13009 /* pthread test headers */
13010 #include <pthread.h>
13011 #if HAVE_PTHREADS < 7
13012 #include <errno.h>
13013 #endif
13014 #ifndef NULL
13015 #define NULL (void*)0
13016 #endif
13017
13018 static void *task(p)
13019         void *p;
13020 {
13021         return (void *) (p == NULL);
13022 }
13023
13024 int main() {
13025
13026         /* pthread test function */
13027 #ifndef PTHREAD_CREATE_DETACHED
13028 #define PTHREAD_CREATE_DETACHED 1
13029 #endif
13030         pthread_t t;
13031         int status;
13032         int detach = PTHREAD_CREATE_DETACHED;
13033
13034 #if HAVE_PTHREADS > 4
13035         /* Final pthreads */
13036         pthread_attr_t attr;
13037
13038         status = pthread_attr_init(&attr);
13039         if( status ) return status;
13040
13041 #if HAVE_PTHREADS < 7
13042         status = pthread_attr_setdetachstate(&attr, &detach);
13043         if( status < 0 ) status = errno;
13044 #else
13045         status = pthread_attr_setdetachstate(&attr, detach);
13046 #endif
13047         if( status ) return status;
13048         status = pthread_create( &t, &attr, task, NULL );
13049 #if HAVE_PTHREADS < 7
13050         if( status < 0 ) status = errno;
13051 #endif
13052         if( status ) return status;
13053 #else
13054         /* Draft 4 pthreads */
13055         status = pthread_create( &t, pthread_attr_default, task, NULL );
13056         if( status ) return errno;
13057
13058         /* give thread a chance to complete */
13059         /* it should remain joinable and hence detachable */
13060         sleep( 1 );
13061
13062         status = pthread_detach( &t );
13063         if( status ) return errno;
13064 #endif
13065
13066 #ifdef HAVE_LINUX_THREADS
13067         pthread_kill_other_threads_np();
13068 #endif
13069
13070         return 0;
13071
13072 ; return 0; }
13073 EOF
13074 if { (eval echo configure:13075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13075   rm -rf conftest*
13076   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13077 else
13078   echo "configure: failed program was:" >&5
13079   cat conftest.$ac_ext >&5
13080   rm -rf conftest*
13081   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13082 fi
13083 rm -f conftest*
13084 else
13085   cat > conftest.$ac_ext <<EOF
13086 #line 13087 "configure"
13087 #include "confdefs.h"
13088 /* pthread test headers */
13089 #include <pthread.h>
13090 #if HAVE_PTHREADS < 7
13091 #include <errno.h>
13092 #endif
13093 #ifndef NULL
13094 #define NULL (void*)0
13095 #endif
13096
13097 static void *task(p)
13098         void *p;
13099 {
13100         return (void *) (p == NULL);
13101 }
13102
13103
13104 int main(argc, argv)
13105         int argc;
13106         char **argv;
13107 {
13108
13109         /* pthread test function */
13110 #ifndef PTHREAD_CREATE_DETACHED
13111 #define PTHREAD_CREATE_DETACHED 1
13112 #endif
13113         pthread_t t;
13114         int status;
13115         int detach = PTHREAD_CREATE_DETACHED;
13116
13117 #if HAVE_PTHREADS > 4
13118         /* Final pthreads */
13119         pthread_attr_t attr;
13120
13121         status = pthread_attr_init(&attr);
13122         if( status ) return status;
13123
13124 #if HAVE_PTHREADS < 7
13125         status = pthread_attr_setdetachstate(&attr, &detach);
13126         if( status < 0 ) status = errno;
13127 #else
13128         status = pthread_attr_setdetachstate(&attr, detach);
13129 #endif
13130         if( status ) return status;
13131         status = pthread_create( &t, &attr, task, NULL );
13132 #if HAVE_PTHREADS < 7
13133         if( status < 0 ) status = errno;
13134 #endif
13135         if( status ) return status;
13136 #else
13137         /* Draft 4 pthreads */
13138         status = pthread_create( &t, pthread_attr_default, task, NULL );
13139         if( status ) return errno;
13140
13141         /* give thread a chance to complete */
13142         /* it should remain joinable and hence detachable */
13143         sleep( 1 );
13144
13145         status = pthread_detach( &t );
13146         if( status ) return errno;
13147 #endif
13148
13149 #ifdef HAVE_LINUX_THREADS
13150         pthread_kill_other_threads_np();
13151 #endif
13152
13153         return 0;
13154
13155 }
13156
13157 EOF
13158 if { (eval echo configure:13159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13159 then
13160   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13161 else
13162   echo "configure: failed program was:" >&5
13163   cat conftest.$ac_ext >&5
13164   rm -fr conftest*
13165   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13166 fi
13167 rm -fr conftest*
13168 fi
13169
13170
13171                 # restore the LIBS
13172                 LIBS="$ol_LIBS"
13173         
13174 fi
13175
13176 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13177
13178         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13179                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13180                 ol_link_threads=posix
13181         fi
13182 fi
13183
13184                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13185 if test "$ol_link_threads" = no ; then
13186         # try -lpthread -lmach -lexc
13187         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13188 echo "configure:13189: checking for pthread link with -lpthread -lmach -lexc" >&5
13189 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13190   echo $ac_n "(cached) $ac_c" 1>&6
13191 else
13192   
13193                 # save the flags
13194                 ol_LIBS="$LIBS"
13195                 LIBS="-lpthread -lmach -lexc $LIBS"
13196
13197                 if test "$cross_compiling" = yes; then
13198   cat > conftest.$ac_ext <<EOF
13199 #line 13200 "configure"
13200 #include "confdefs.h"
13201 /* pthread test headers */
13202 #include <pthread.h>
13203 #if HAVE_PTHREADS < 7
13204 #include <errno.h>
13205 #endif
13206 #ifndef NULL
13207 #define NULL (void*)0
13208 #endif
13209
13210 static void *task(p)
13211         void *p;
13212 {
13213         return (void *) (p == NULL);
13214 }
13215
13216 int main() {
13217
13218         /* pthread test function */
13219 #ifndef PTHREAD_CREATE_DETACHED
13220 #define PTHREAD_CREATE_DETACHED 1
13221 #endif
13222         pthread_t t;
13223         int status;
13224         int detach = PTHREAD_CREATE_DETACHED;
13225
13226 #if HAVE_PTHREADS > 4
13227         /* Final pthreads */
13228         pthread_attr_t attr;
13229
13230         status = pthread_attr_init(&attr);
13231         if( status ) return status;
13232
13233 #if HAVE_PTHREADS < 7
13234         status = pthread_attr_setdetachstate(&attr, &detach);
13235         if( status < 0 ) status = errno;
13236 #else
13237         status = pthread_attr_setdetachstate(&attr, detach);
13238 #endif
13239         if( status ) return status;
13240         status = pthread_create( &t, &attr, task, NULL );
13241 #if HAVE_PTHREADS < 7
13242         if( status < 0 ) status = errno;
13243 #endif
13244         if( status ) return status;
13245 #else
13246         /* Draft 4 pthreads */
13247         status = pthread_create( &t, pthread_attr_default, task, NULL );
13248         if( status ) return errno;
13249
13250         /* give thread a chance to complete */
13251         /* it should remain joinable and hence detachable */
13252         sleep( 1 );
13253
13254         status = pthread_detach( &t );
13255         if( status ) return errno;
13256 #endif
13257
13258 #ifdef HAVE_LINUX_THREADS
13259         pthread_kill_other_threads_np();
13260 #endif
13261
13262         return 0;
13263
13264 ; return 0; }
13265 EOF
13266 if { (eval echo configure:13267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13267   rm -rf conftest*
13268   ol_cv_pthread_lpthread_lmach_lexc=yes
13269 else
13270   echo "configure: failed program was:" >&5
13271   cat conftest.$ac_ext >&5
13272   rm -rf conftest*
13273   ol_cv_pthread_lpthread_lmach_lexc=no
13274 fi
13275 rm -f conftest*
13276 else
13277   cat > conftest.$ac_ext <<EOF
13278 #line 13279 "configure"
13279 #include "confdefs.h"
13280 /* pthread test headers */
13281 #include <pthread.h>
13282 #if HAVE_PTHREADS < 7
13283 #include <errno.h>
13284 #endif
13285 #ifndef NULL
13286 #define NULL (void*)0
13287 #endif
13288
13289 static void *task(p)
13290         void *p;
13291 {
13292         return (void *) (p == NULL);
13293 }
13294
13295
13296 int main(argc, argv)
13297         int argc;
13298         char **argv;
13299 {
13300
13301         /* pthread test function */
13302 #ifndef PTHREAD_CREATE_DETACHED
13303 #define PTHREAD_CREATE_DETACHED 1
13304 #endif
13305         pthread_t t;
13306         int status;
13307         int detach = PTHREAD_CREATE_DETACHED;
13308
13309 #if HAVE_PTHREADS > 4
13310         /* Final pthreads */
13311         pthread_attr_t attr;
13312
13313         status = pthread_attr_init(&attr);
13314         if( status ) return status;
13315
13316 #if HAVE_PTHREADS < 7
13317         status = pthread_attr_setdetachstate(&attr, &detach);
13318         if( status < 0 ) status = errno;
13319 #else
13320         status = pthread_attr_setdetachstate(&attr, detach);
13321 #endif
13322         if( status ) return status;
13323         status = pthread_create( &t, &attr, task, NULL );
13324 #if HAVE_PTHREADS < 7
13325         if( status < 0 ) status = errno;
13326 #endif
13327         if( status ) return status;
13328 #else
13329         /* Draft 4 pthreads */
13330         status = pthread_create( &t, pthread_attr_default, task, NULL );
13331         if( status ) return errno;
13332
13333         /* give thread a chance to complete */
13334         /* it should remain joinable and hence detachable */
13335         sleep( 1 );
13336
13337         status = pthread_detach( &t );
13338         if( status ) return errno;
13339 #endif
13340
13341 #ifdef HAVE_LINUX_THREADS
13342         pthread_kill_other_threads_np();
13343 #endif
13344
13345         return 0;
13346
13347 }
13348
13349 EOF
13350 if { (eval echo configure:13351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13351 then
13352   ol_cv_pthread_lpthread_lmach_lexc=yes
13353 else
13354   echo "configure: failed program was:" >&5
13355   cat conftest.$ac_ext >&5
13356   rm -fr conftest*
13357   ol_cv_pthread_lpthread_lmach_lexc=no
13358 fi
13359 rm -fr conftest*
13360 fi
13361
13362
13363                 # restore the LIBS
13364                 LIBS="$ol_LIBS"
13365         
13366 fi
13367
13368 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13369
13370         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13371                 ol_link_pthreads="-lpthread -lmach -lexc"
13372                 ol_link_threads=posix
13373         fi
13374 fi
13375
13376
13377                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13378 if test "$ol_link_threads" = no ; then
13379         # try -lpthread -Wl,-woff,85
13380         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13381 echo "configure:13382: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13382 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13383   echo $ac_n "(cached) $ac_c" 1>&6
13384 else
13385   
13386                 # save the flags
13387                 ol_LIBS="$LIBS"
13388                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13389
13390                 if test "$cross_compiling" = yes; then
13391   cat > conftest.$ac_ext <<EOF
13392 #line 13393 "configure"
13393 #include "confdefs.h"
13394 /* pthread test headers */
13395 #include <pthread.h>
13396 #if HAVE_PTHREADS < 7
13397 #include <errno.h>
13398 #endif
13399 #ifndef NULL
13400 #define NULL (void*)0
13401 #endif
13402
13403 static void *task(p)
13404         void *p;
13405 {
13406         return (void *) (p == NULL);
13407 }
13408
13409 int main() {
13410
13411         /* pthread test function */
13412 #ifndef PTHREAD_CREATE_DETACHED
13413 #define PTHREAD_CREATE_DETACHED 1
13414 #endif
13415         pthread_t t;
13416         int status;
13417         int detach = PTHREAD_CREATE_DETACHED;
13418
13419 #if HAVE_PTHREADS > 4
13420         /* Final pthreads */
13421         pthread_attr_t attr;
13422
13423         status = pthread_attr_init(&attr);
13424         if( status ) return status;
13425
13426 #if HAVE_PTHREADS < 7
13427         status = pthread_attr_setdetachstate(&attr, &detach);
13428         if( status < 0 ) status = errno;
13429 #else
13430         status = pthread_attr_setdetachstate(&attr, detach);
13431 #endif
13432         if( status ) return status;
13433         status = pthread_create( &t, &attr, task, NULL );
13434 #if HAVE_PTHREADS < 7
13435         if( status < 0 ) status = errno;
13436 #endif
13437         if( status ) return status;
13438 #else
13439         /* Draft 4 pthreads */
13440         status = pthread_create( &t, pthread_attr_default, task, NULL );
13441         if( status ) return errno;
13442
13443         /* give thread a chance to complete */
13444         /* it should remain joinable and hence detachable */
13445         sleep( 1 );
13446
13447         status = pthread_detach( &t );
13448         if( status ) return errno;
13449 #endif
13450
13451 #ifdef HAVE_LINUX_THREADS
13452         pthread_kill_other_threads_np();
13453 #endif
13454
13455         return 0;
13456
13457 ; return 0; }
13458 EOF
13459 if { (eval echo configure:13460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13460   rm -rf conftest*
13461   ol_cv_pthread_lib_lpthread_woff=yes
13462 else
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -rf conftest*
13466   ol_cv_pthread_lib_lpthread_woff=no
13467 fi
13468 rm -f conftest*
13469 else
13470   cat > conftest.$ac_ext <<EOF
13471 #line 13472 "configure"
13472 #include "confdefs.h"
13473 /* pthread test headers */
13474 #include <pthread.h>
13475 #if HAVE_PTHREADS < 7
13476 #include <errno.h>
13477 #endif
13478 #ifndef NULL
13479 #define NULL (void*)0
13480 #endif
13481
13482 static void *task(p)
13483         void *p;
13484 {
13485         return (void *) (p == NULL);
13486 }
13487
13488
13489 int main(argc, argv)
13490         int argc;
13491         char **argv;
13492 {
13493
13494         /* pthread test function */
13495 #ifndef PTHREAD_CREATE_DETACHED
13496 #define PTHREAD_CREATE_DETACHED 1
13497 #endif
13498         pthread_t t;
13499         int status;
13500         int detach = PTHREAD_CREATE_DETACHED;
13501
13502 #if HAVE_PTHREADS > 4
13503         /* Final pthreads */
13504         pthread_attr_t attr;
13505
13506         status = pthread_attr_init(&attr);
13507         if( status ) return status;
13508
13509 #if HAVE_PTHREADS < 7
13510         status = pthread_attr_setdetachstate(&attr, &detach);
13511         if( status < 0 ) status = errno;
13512 #else
13513         status = pthread_attr_setdetachstate(&attr, detach);
13514 #endif
13515         if( status ) return status;
13516         status = pthread_create( &t, &attr, task, NULL );
13517 #if HAVE_PTHREADS < 7
13518         if( status < 0 ) status = errno;
13519 #endif
13520         if( status ) return status;
13521 #else
13522         /* Draft 4 pthreads */
13523         status = pthread_create( &t, pthread_attr_default, task, NULL );
13524         if( status ) return errno;
13525
13526         /* give thread a chance to complete */
13527         /* it should remain joinable and hence detachable */
13528         sleep( 1 );
13529
13530         status = pthread_detach( &t );
13531         if( status ) return errno;
13532 #endif
13533
13534 #ifdef HAVE_LINUX_THREADS
13535         pthread_kill_other_threads_np();
13536 #endif
13537
13538         return 0;
13539
13540 }
13541
13542 EOF
13543 if { (eval echo configure:13544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13544 then
13545   ol_cv_pthread_lib_lpthread_woff=yes
13546 else
13547   echo "configure: failed program was:" >&5
13548   cat conftest.$ac_ext >&5
13549   rm -fr conftest*
13550   ol_cv_pthread_lib_lpthread_woff=no
13551 fi
13552 rm -fr conftest*
13553 fi
13554
13555
13556                 # restore the LIBS
13557                 LIBS="$ol_LIBS"
13558         
13559 fi
13560
13561 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13562
13563         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13564                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13565                 ol_link_threads=posix
13566         fi
13567 fi
13568
13569
13570                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13571 if test "$ol_link_threads" = no ; then
13572         # try -lpthread
13573         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13574 echo "configure:13575: checking for pthread link with -lpthread" >&5
13575 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13576   echo $ac_n "(cached) $ac_c" 1>&6
13577 else
13578   
13579                 # save the flags
13580                 ol_LIBS="$LIBS"
13581                 LIBS="-lpthread $LIBS"
13582
13583                 if test "$cross_compiling" = yes; then
13584   cat > conftest.$ac_ext <<EOF
13585 #line 13586 "configure"
13586 #include "confdefs.h"
13587 /* pthread test headers */
13588 #include <pthread.h>
13589 #if HAVE_PTHREADS < 7
13590 #include <errno.h>
13591 #endif
13592 #ifndef NULL
13593 #define NULL (void*)0
13594 #endif
13595
13596 static void *task(p)
13597         void *p;
13598 {
13599         return (void *) (p == NULL);
13600 }
13601
13602 int main() {
13603
13604         /* pthread test function */
13605 #ifndef PTHREAD_CREATE_DETACHED
13606 #define PTHREAD_CREATE_DETACHED 1
13607 #endif
13608         pthread_t t;
13609         int status;
13610         int detach = PTHREAD_CREATE_DETACHED;
13611
13612 #if HAVE_PTHREADS > 4
13613         /* Final pthreads */
13614         pthread_attr_t attr;
13615
13616         status = pthread_attr_init(&attr);
13617         if( status ) return status;
13618
13619 #if HAVE_PTHREADS < 7
13620         status = pthread_attr_setdetachstate(&attr, &detach);
13621         if( status < 0 ) status = errno;
13622 #else
13623         status = pthread_attr_setdetachstate(&attr, detach);
13624 #endif
13625         if( status ) return status;
13626         status = pthread_create( &t, &attr, task, NULL );
13627 #if HAVE_PTHREADS < 7
13628         if( status < 0 ) status = errno;
13629 #endif
13630         if( status ) return status;
13631 #else
13632         /* Draft 4 pthreads */
13633         status = pthread_create( &t, pthread_attr_default, task, NULL );
13634         if( status ) return errno;
13635
13636         /* give thread a chance to complete */
13637         /* it should remain joinable and hence detachable */
13638         sleep( 1 );
13639
13640         status = pthread_detach( &t );
13641         if( status ) return errno;
13642 #endif
13643
13644 #ifdef HAVE_LINUX_THREADS
13645         pthread_kill_other_threads_np();
13646 #endif
13647
13648         return 0;
13649
13650 ; return 0; }
13651 EOF
13652 if { (eval echo configure:13653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13653   rm -rf conftest*
13654   ol_cv_pthread_lpthread=yes
13655 else
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -rf conftest*
13659   ol_cv_pthread_lpthread=no
13660 fi
13661 rm -f conftest*
13662 else
13663   cat > conftest.$ac_ext <<EOF
13664 #line 13665 "configure"
13665 #include "confdefs.h"
13666 /* pthread test headers */
13667 #include <pthread.h>
13668 #if HAVE_PTHREADS < 7
13669 #include <errno.h>
13670 #endif
13671 #ifndef NULL
13672 #define NULL (void*)0
13673 #endif
13674
13675 static void *task(p)
13676         void *p;
13677 {
13678         return (void *) (p == NULL);
13679 }
13680
13681
13682 int main(argc, argv)
13683         int argc;
13684         char **argv;
13685 {
13686
13687         /* pthread test function */
13688 #ifndef PTHREAD_CREATE_DETACHED
13689 #define PTHREAD_CREATE_DETACHED 1
13690 #endif
13691         pthread_t t;
13692         int status;
13693         int detach = PTHREAD_CREATE_DETACHED;
13694
13695 #if HAVE_PTHREADS > 4
13696         /* Final pthreads */
13697         pthread_attr_t attr;
13698
13699         status = pthread_attr_init(&attr);
13700         if( status ) return status;
13701
13702 #if HAVE_PTHREADS < 7
13703         status = pthread_attr_setdetachstate(&attr, &detach);
13704         if( status < 0 ) status = errno;
13705 #else
13706         status = pthread_attr_setdetachstate(&attr, detach);
13707 #endif
13708         if( status ) return status;
13709         status = pthread_create( &t, &attr, task, NULL );
13710 #if HAVE_PTHREADS < 7
13711         if( status < 0 ) status = errno;
13712 #endif
13713         if( status ) return status;
13714 #else
13715         /* Draft 4 pthreads */
13716         status = pthread_create( &t, pthread_attr_default, task, NULL );
13717         if( status ) return errno;
13718
13719         /* give thread a chance to complete */
13720         /* it should remain joinable and hence detachable */
13721         sleep( 1 );
13722
13723         status = pthread_detach( &t );
13724         if( status ) return errno;
13725 #endif
13726
13727 #ifdef HAVE_LINUX_THREADS
13728         pthread_kill_other_threads_np();
13729 #endif
13730
13731         return 0;
13732
13733 }
13734
13735 EOF
13736 if { (eval echo configure:13737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13737 then
13738   ol_cv_pthread_lpthread=yes
13739 else
13740   echo "configure: failed program was:" >&5
13741   cat conftest.$ac_ext >&5
13742   rm -fr conftest*
13743   ol_cv_pthread_lpthread=no
13744 fi
13745 rm -fr conftest*
13746 fi
13747
13748
13749                 # restore the LIBS
13750                 LIBS="$ol_LIBS"
13751         
13752 fi
13753
13754 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13755
13756         if test $ol_cv_pthread_lpthread = yes ; then
13757                 ol_link_pthreads="-lpthread"
13758                 ol_link_threads=posix
13759         fi
13760 fi
13761
13762                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13763 if test "$ol_link_threads" = no ; then
13764         # try -lc_r
13765         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13766 echo "configure:13767: checking for pthread link with -lc_r" >&5
13767 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13768   echo $ac_n "(cached) $ac_c" 1>&6
13769 else
13770   
13771                 # save the flags
13772                 ol_LIBS="$LIBS"
13773                 LIBS="-lc_r $LIBS"
13774
13775                 if test "$cross_compiling" = yes; then
13776   cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* pthread test headers */
13780 #include <pthread.h>
13781 #if HAVE_PTHREADS < 7
13782 #include <errno.h>
13783 #endif
13784 #ifndef NULL
13785 #define NULL (void*)0
13786 #endif
13787
13788 static void *task(p)
13789         void *p;
13790 {
13791         return (void *) (p == NULL);
13792 }
13793
13794 int main() {
13795
13796         /* pthread test function */
13797 #ifndef PTHREAD_CREATE_DETACHED
13798 #define PTHREAD_CREATE_DETACHED 1
13799 #endif
13800         pthread_t t;
13801         int status;
13802         int detach = PTHREAD_CREATE_DETACHED;
13803
13804 #if HAVE_PTHREADS > 4
13805         /* Final pthreads */
13806         pthread_attr_t attr;
13807
13808         status = pthread_attr_init(&attr);
13809         if( status ) return status;
13810
13811 #if HAVE_PTHREADS < 7
13812         status = pthread_attr_setdetachstate(&attr, &detach);
13813         if( status < 0 ) status = errno;
13814 #else
13815         status = pthread_attr_setdetachstate(&attr, detach);
13816 #endif
13817         if( status ) return status;
13818         status = pthread_create( &t, &attr, task, NULL );
13819 #if HAVE_PTHREADS < 7
13820         if( status < 0 ) status = errno;
13821 #endif
13822         if( status ) return status;
13823 #else
13824         /* Draft 4 pthreads */
13825         status = pthread_create( &t, pthread_attr_default, task, NULL );
13826         if( status ) return errno;
13827
13828         /* give thread a chance to complete */
13829         /* it should remain joinable and hence detachable */
13830         sleep( 1 );
13831
13832         status = pthread_detach( &t );
13833         if( status ) return errno;
13834 #endif
13835
13836 #ifdef HAVE_LINUX_THREADS
13837         pthread_kill_other_threads_np();
13838 #endif
13839
13840         return 0;
13841
13842 ; return 0; }
13843 EOF
13844 if { (eval echo configure:13845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13845   rm -rf conftest*
13846   ol_cv_pthread_lc_r=yes
13847 else
13848   echo "configure: failed program was:" >&5
13849   cat conftest.$ac_ext >&5
13850   rm -rf conftest*
13851   ol_cv_pthread_lc_r=no
13852 fi
13853 rm -f conftest*
13854 else
13855   cat > conftest.$ac_ext <<EOF
13856 #line 13857 "configure"
13857 #include "confdefs.h"
13858 /* pthread test headers */
13859 #include <pthread.h>
13860 #if HAVE_PTHREADS < 7
13861 #include <errno.h>
13862 #endif
13863 #ifndef NULL
13864 #define NULL (void*)0
13865 #endif
13866
13867 static void *task(p)
13868         void *p;
13869 {
13870         return (void *) (p == NULL);
13871 }
13872
13873
13874 int main(argc, argv)
13875         int argc;
13876         char **argv;
13877 {
13878
13879         /* pthread test function */
13880 #ifndef PTHREAD_CREATE_DETACHED
13881 #define PTHREAD_CREATE_DETACHED 1
13882 #endif
13883         pthread_t t;
13884         int status;
13885         int detach = PTHREAD_CREATE_DETACHED;
13886
13887 #if HAVE_PTHREADS > 4
13888         /* Final pthreads */
13889         pthread_attr_t attr;
13890
13891         status = pthread_attr_init(&attr);
13892         if( status ) return status;
13893
13894 #if HAVE_PTHREADS < 7
13895         status = pthread_attr_setdetachstate(&attr, &detach);
13896         if( status < 0 ) status = errno;
13897 #else
13898         status = pthread_attr_setdetachstate(&attr, detach);
13899 #endif
13900         if( status ) return status;
13901         status = pthread_create( &t, &attr, task, NULL );
13902 #if HAVE_PTHREADS < 7
13903         if( status < 0 ) status = errno;
13904 #endif
13905         if( status ) return status;
13906 #else
13907         /* Draft 4 pthreads */
13908         status = pthread_create( &t, pthread_attr_default, task, NULL );
13909         if( status ) return errno;
13910
13911         /* give thread a chance to complete */
13912         /* it should remain joinable and hence detachable */
13913         sleep( 1 );
13914
13915         status = pthread_detach( &t );
13916         if( status ) return errno;
13917 #endif
13918
13919 #ifdef HAVE_LINUX_THREADS
13920         pthread_kill_other_threads_np();
13921 #endif
13922
13923         return 0;
13924
13925 }
13926
13927 EOF
13928 if { (eval echo configure:13929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13929 then
13930   ol_cv_pthread_lc_r=yes
13931 else
13932   echo "configure: failed program was:" >&5
13933   cat conftest.$ac_ext >&5
13934   rm -fr conftest*
13935   ol_cv_pthread_lc_r=no
13936 fi
13937 rm -fr conftest*
13938 fi
13939
13940
13941                 # restore the LIBS
13942                 LIBS="$ol_LIBS"
13943         
13944 fi
13945
13946 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13947
13948         if test $ol_cv_pthread_lc_r = yes ; then
13949                 ol_link_pthreads="-lc_r"
13950                 ol_link_threads=posix
13951         fi
13952 fi
13953
13954
13955                 # Pthread try link: -threads (ol_cv_pthread_threads)
13956 if test "$ol_link_threads" = no ; then
13957         # try -threads
13958         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13959 echo "configure:13960: checking for pthread link with -threads" >&5
13960 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13961   echo $ac_n "(cached) $ac_c" 1>&6
13962 else
13963   
13964                 # save the flags
13965                 ol_LIBS="$LIBS"
13966                 LIBS="-threads $LIBS"
13967
13968                 if test "$cross_compiling" = yes; then
13969   cat > conftest.$ac_ext <<EOF
13970 #line 13971 "configure"
13971 #include "confdefs.h"
13972 /* pthread test headers */
13973 #include <pthread.h>
13974 #if HAVE_PTHREADS < 7
13975 #include <errno.h>
13976 #endif
13977 #ifndef NULL
13978 #define NULL (void*)0
13979 #endif
13980
13981 static void *task(p)
13982         void *p;
13983 {
13984         return (void *) (p == NULL);
13985 }
13986
13987 int main() {
13988
13989         /* pthread test function */
13990 #ifndef PTHREAD_CREATE_DETACHED
13991 #define PTHREAD_CREATE_DETACHED 1
13992 #endif
13993         pthread_t t;
13994         int status;
13995         int detach = PTHREAD_CREATE_DETACHED;
13996
13997 #if HAVE_PTHREADS > 4
13998         /* Final pthreads */
13999         pthread_attr_t attr;
14000
14001         status = pthread_attr_init(&attr);
14002         if( status ) return status;
14003
14004 #if HAVE_PTHREADS < 7
14005         status = pthread_attr_setdetachstate(&attr, &detach);
14006         if( status < 0 ) status = errno;
14007 #else
14008         status = pthread_attr_setdetachstate(&attr, detach);
14009 #endif
14010         if( status ) return status;
14011         status = pthread_create( &t, &attr, task, NULL );
14012 #if HAVE_PTHREADS < 7
14013         if( status < 0 ) status = errno;
14014 #endif
14015         if( status ) return status;
14016 #else
14017         /* Draft 4 pthreads */
14018         status = pthread_create( &t, pthread_attr_default, task, NULL );
14019         if( status ) return errno;
14020
14021         /* give thread a chance to complete */
14022         /* it should remain joinable and hence detachable */
14023         sleep( 1 );
14024
14025         status = pthread_detach( &t );
14026         if( status ) return errno;
14027 #endif
14028
14029 #ifdef HAVE_LINUX_THREADS
14030         pthread_kill_other_threads_np();
14031 #endif
14032
14033         return 0;
14034
14035 ; return 0; }
14036 EOF
14037 if { (eval echo configure:14038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14038   rm -rf conftest*
14039   ol_cv_pthread_threads=yes
14040 else
14041   echo "configure: failed program was:" >&5
14042   cat conftest.$ac_ext >&5
14043   rm -rf conftest*
14044   ol_cv_pthread_threads=no
14045 fi
14046 rm -f conftest*
14047 else
14048   cat > conftest.$ac_ext <<EOF
14049 #line 14050 "configure"
14050 #include "confdefs.h"
14051 /* pthread test headers */
14052 #include <pthread.h>
14053 #if HAVE_PTHREADS < 7
14054 #include <errno.h>
14055 #endif
14056 #ifndef NULL
14057 #define NULL (void*)0
14058 #endif
14059
14060 static void *task(p)
14061         void *p;
14062 {
14063         return (void *) (p == NULL);
14064 }
14065
14066
14067 int main(argc, argv)
14068         int argc;
14069         char **argv;
14070 {
14071
14072         /* pthread test function */
14073 #ifndef PTHREAD_CREATE_DETACHED
14074 #define PTHREAD_CREATE_DETACHED 1
14075 #endif
14076         pthread_t t;
14077         int status;
14078         int detach = PTHREAD_CREATE_DETACHED;
14079
14080 #if HAVE_PTHREADS > 4
14081         /* Final pthreads */
14082         pthread_attr_t attr;
14083
14084         status = pthread_attr_init(&attr);
14085         if( status ) return status;
14086
14087 #if HAVE_PTHREADS < 7
14088         status = pthread_attr_setdetachstate(&attr, &detach);
14089         if( status < 0 ) status = errno;
14090 #else
14091         status = pthread_attr_setdetachstate(&attr, detach);
14092 #endif
14093         if( status ) return status;
14094         status = pthread_create( &t, &attr, task, NULL );
14095 #if HAVE_PTHREADS < 7
14096         if( status < 0 ) status = errno;
14097 #endif
14098         if( status ) return status;
14099 #else
14100         /* Draft 4 pthreads */
14101         status = pthread_create( &t, pthread_attr_default, task, NULL );
14102         if( status ) return errno;
14103
14104         /* give thread a chance to complete */
14105         /* it should remain joinable and hence detachable */
14106         sleep( 1 );
14107
14108         status = pthread_detach( &t );
14109         if( status ) return errno;
14110 #endif
14111
14112 #ifdef HAVE_LINUX_THREADS
14113         pthread_kill_other_threads_np();
14114 #endif
14115
14116         return 0;
14117
14118 }
14119
14120 EOF
14121 if { (eval echo configure:14122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14122 then
14123   ol_cv_pthread_threads=yes
14124 else
14125   echo "configure: failed program was:" >&5
14126   cat conftest.$ac_ext >&5
14127   rm -fr conftest*
14128   ol_cv_pthread_threads=no
14129 fi
14130 rm -fr conftest*
14131 fi
14132
14133
14134                 # restore the LIBS
14135                 LIBS="$ol_LIBS"
14136         
14137 fi
14138
14139 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14140
14141         if test $ol_cv_pthread_threads = yes ; then
14142                 ol_link_pthreads="-threads"
14143                 ol_link_threads=posix
14144         fi
14145 fi
14146
14147
14148                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14149 if test "$ol_link_threads" = no ; then
14150         # try -lpthreads -lmach -lexc -lc_r
14151         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14152 echo "configure:14153: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14153 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14154   echo $ac_n "(cached) $ac_c" 1>&6
14155 else
14156   
14157                 # save the flags
14158                 ol_LIBS="$LIBS"
14159                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14160
14161                 if test "$cross_compiling" = yes; then
14162   cat > conftest.$ac_ext <<EOF
14163 #line 14164 "configure"
14164 #include "confdefs.h"
14165 /* pthread test headers */
14166 #include <pthread.h>
14167 #if HAVE_PTHREADS < 7
14168 #include <errno.h>
14169 #endif
14170 #ifndef NULL
14171 #define NULL (void*)0
14172 #endif
14173
14174 static void *task(p)
14175         void *p;
14176 {
14177         return (void *) (p == NULL);
14178 }
14179
14180 int main() {
14181
14182         /* pthread test function */
14183 #ifndef PTHREAD_CREATE_DETACHED
14184 #define PTHREAD_CREATE_DETACHED 1
14185 #endif
14186         pthread_t t;
14187         int status;
14188         int detach = PTHREAD_CREATE_DETACHED;
14189
14190 #if HAVE_PTHREADS > 4
14191         /* Final pthreads */
14192         pthread_attr_t attr;
14193
14194         status = pthread_attr_init(&attr);
14195         if( status ) return status;
14196
14197 #if HAVE_PTHREADS < 7
14198         status = pthread_attr_setdetachstate(&attr, &detach);
14199         if( status < 0 ) status = errno;
14200 #else
14201         status = pthread_attr_setdetachstate(&attr, detach);
14202 #endif
14203         if( status ) return status;
14204         status = pthread_create( &t, &attr, task, NULL );
14205 #if HAVE_PTHREADS < 7
14206         if( status < 0 ) status = errno;
14207 #endif
14208         if( status ) return status;
14209 #else
14210         /* Draft 4 pthreads */
14211         status = pthread_create( &t, pthread_attr_default, task, NULL );
14212         if( status ) return errno;
14213
14214         /* give thread a chance to complete */
14215         /* it should remain joinable and hence detachable */
14216         sleep( 1 );
14217
14218         status = pthread_detach( &t );
14219         if( status ) return errno;
14220 #endif
14221
14222 #ifdef HAVE_LINUX_THREADS
14223         pthread_kill_other_threads_np();
14224 #endif
14225
14226         return 0;
14227
14228 ; return 0; }
14229 EOF
14230 if { (eval echo configure:14231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14231   rm -rf conftest*
14232   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14233 else
14234   echo "configure: failed program was:" >&5
14235   cat conftest.$ac_ext >&5
14236   rm -rf conftest*
14237   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14238 fi
14239 rm -f conftest*
14240 else
14241   cat > conftest.$ac_ext <<EOF
14242 #line 14243 "configure"
14243 #include "confdefs.h"
14244 /* pthread test headers */
14245 #include <pthread.h>
14246 #if HAVE_PTHREADS < 7
14247 #include <errno.h>
14248 #endif
14249 #ifndef NULL
14250 #define NULL (void*)0
14251 #endif
14252
14253 static void *task(p)
14254         void *p;
14255 {
14256         return (void *) (p == NULL);
14257 }
14258
14259
14260 int main(argc, argv)
14261         int argc;
14262         char **argv;
14263 {
14264
14265         /* pthread test function */
14266 #ifndef PTHREAD_CREATE_DETACHED
14267 #define PTHREAD_CREATE_DETACHED 1
14268 #endif
14269         pthread_t t;
14270         int status;
14271         int detach = PTHREAD_CREATE_DETACHED;
14272
14273 #if HAVE_PTHREADS > 4
14274         /* Final pthreads */
14275         pthread_attr_t attr;
14276
14277         status = pthread_attr_init(&attr);
14278         if( status ) return status;
14279
14280 #if HAVE_PTHREADS < 7
14281         status = pthread_attr_setdetachstate(&attr, &detach);
14282         if( status < 0 ) status = errno;
14283 #else
14284         status = pthread_attr_setdetachstate(&attr, detach);
14285 #endif
14286         if( status ) return status;
14287         status = pthread_create( &t, &attr, task, NULL );
14288 #if HAVE_PTHREADS < 7
14289         if( status < 0 ) status = errno;
14290 #endif
14291         if( status ) return status;
14292 #else
14293         /* Draft 4 pthreads */
14294         status = pthread_create( &t, pthread_attr_default, task, NULL );
14295         if( status ) return errno;
14296
14297         /* give thread a chance to complete */
14298         /* it should remain joinable and hence detachable */
14299         sleep( 1 );
14300
14301         status = pthread_detach( &t );
14302         if( status ) return errno;
14303 #endif
14304
14305 #ifdef HAVE_LINUX_THREADS
14306         pthread_kill_other_threads_np();
14307 #endif
14308
14309         return 0;
14310
14311 }
14312
14313 EOF
14314 if { (eval echo configure:14315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14315 then
14316   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14317 else
14318   echo "configure: failed program was:" >&5
14319   cat conftest.$ac_ext >&5
14320   rm -fr conftest*
14321   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14322 fi
14323 rm -fr conftest*
14324 fi
14325
14326
14327                 # restore the LIBS
14328                 LIBS="$ol_LIBS"
14329         
14330 fi
14331
14332 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14333
14334         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14335                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14336                 ol_link_threads=posix
14337         fi
14338 fi
14339
14340                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14341 if test "$ol_link_threads" = no ; then
14342         # try -lpthreads -lmach -lexc
14343         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14344 echo "configure:14345: checking for pthread link with -lpthreads -lmach -lexc" >&5
14345 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14346   echo $ac_n "(cached) $ac_c" 1>&6
14347 else
14348   
14349                 # save the flags
14350                 ol_LIBS="$LIBS"
14351                 LIBS="-lpthreads -lmach -lexc $LIBS"
14352
14353                 if test "$cross_compiling" = yes; then
14354   cat > conftest.$ac_ext <<EOF
14355 #line 14356 "configure"
14356 #include "confdefs.h"
14357 /* pthread test headers */
14358 #include <pthread.h>
14359 #if HAVE_PTHREADS < 7
14360 #include <errno.h>
14361 #endif
14362 #ifndef NULL
14363 #define NULL (void*)0
14364 #endif
14365
14366 static void *task(p)
14367         void *p;
14368 {
14369         return (void *) (p == NULL);
14370 }
14371
14372 int main() {
14373
14374         /* pthread test function */
14375 #ifndef PTHREAD_CREATE_DETACHED
14376 #define PTHREAD_CREATE_DETACHED 1
14377 #endif
14378         pthread_t t;
14379         int status;
14380         int detach = PTHREAD_CREATE_DETACHED;
14381
14382 #if HAVE_PTHREADS > 4
14383         /* Final pthreads */
14384         pthread_attr_t attr;
14385
14386         status = pthread_attr_init(&attr);
14387         if( status ) return status;
14388
14389 #if HAVE_PTHREADS < 7
14390         status = pthread_attr_setdetachstate(&attr, &detach);
14391         if( status < 0 ) status = errno;
14392 #else
14393         status = pthread_attr_setdetachstate(&attr, detach);
14394 #endif
14395         if( status ) return status;
14396         status = pthread_create( &t, &attr, task, NULL );
14397 #if HAVE_PTHREADS < 7
14398         if( status < 0 ) status = errno;
14399 #endif
14400         if( status ) return status;
14401 #else
14402         /* Draft 4 pthreads */
14403         status = pthread_create( &t, pthread_attr_default, task, NULL );
14404         if( status ) return errno;
14405
14406         /* give thread a chance to complete */
14407         /* it should remain joinable and hence detachable */
14408         sleep( 1 );
14409
14410         status = pthread_detach( &t );
14411         if( status ) return errno;
14412 #endif
14413
14414 #ifdef HAVE_LINUX_THREADS
14415         pthread_kill_other_threads_np();
14416 #endif
14417
14418         return 0;
14419
14420 ; return 0; }
14421 EOF
14422 if { (eval echo configure:14423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14423   rm -rf conftest*
14424   ol_cv_pthread_lpthreads_lmach_lexc=yes
14425 else
14426   echo "configure: failed program was:" >&5
14427   cat conftest.$ac_ext >&5
14428   rm -rf conftest*
14429   ol_cv_pthread_lpthreads_lmach_lexc=no
14430 fi
14431 rm -f conftest*
14432 else
14433   cat > conftest.$ac_ext <<EOF
14434 #line 14435 "configure"
14435 #include "confdefs.h"
14436 /* pthread test headers */
14437 #include <pthread.h>
14438 #if HAVE_PTHREADS < 7
14439 #include <errno.h>
14440 #endif
14441 #ifndef NULL
14442 #define NULL (void*)0
14443 #endif
14444
14445 static void *task(p)
14446         void *p;
14447 {
14448         return (void *) (p == NULL);
14449 }
14450
14451
14452 int main(argc, argv)
14453         int argc;
14454         char **argv;
14455 {
14456
14457         /* pthread test function */
14458 #ifndef PTHREAD_CREATE_DETACHED
14459 #define PTHREAD_CREATE_DETACHED 1
14460 #endif
14461         pthread_t t;
14462         int status;
14463         int detach = PTHREAD_CREATE_DETACHED;
14464
14465 #if HAVE_PTHREADS > 4
14466         /* Final pthreads */
14467         pthread_attr_t attr;
14468
14469         status = pthread_attr_init(&attr);
14470         if( status ) return status;
14471
14472 #if HAVE_PTHREADS < 7
14473         status = pthread_attr_setdetachstate(&attr, &detach);
14474         if( status < 0 ) status = errno;
14475 #else
14476         status = pthread_attr_setdetachstate(&attr, detach);
14477 #endif
14478         if( status ) return status;
14479         status = pthread_create( &t, &attr, task, NULL );
14480 #if HAVE_PTHREADS < 7
14481         if( status < 0 ) status = errno;
14482 #endif
14483         if( status ) return status;
14484 #else
14485         /* Draft 4 pthreads */
14486         status = pthread_create( &t, pthread_attr_default, task, NULL );
14487         if( status ) return errno;
14488
14489         /* give thread a chance to complete */
14490         /* it should remain joinable and hence detachable */
14491         sleep( 1 );
14492
14493         status = pthread_detach( &t );
14494         if( status ) return errno;
14495 #endif
14496
14497 #ifdef HAVE_LINUX_THREADS
14498         pthread_kill_other_threads_np();
14499 #endif
14500
14501         return 0;
14502
14503 }
14504
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14507 then
14508   ol_cv_pthread_lpthreads_lmach_lexc=yes
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -fr conftest*
14513   ol_cv_pthread_lpthreads_lmach_lexc=no
14514 fi
14515 rm -fr conftest*
14516 fi
14517
14518
14519                 # restore the LIBS
14520                 LIBS="$ol_LIBS"
14521         
14522 fi
14523
14524 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14525
14526         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14527                 ol_link_pthreads="-lpthreads -lmach -lexc"
14528                 ol_link_threads=posix
14529         fi
14530 fi
14531
14532                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14533 if test "$ol_link_threads" = no ; then
14534         # try -lpthreads -lexc
14535         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14536 echo "configure:14537: checking for pthread link with -lpthreads -lexc" >&5
14537 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14538   echo $ac_n "(cached) $ac_c" 1>&6
14539 else
14540   
14541                 # save the flags
14542                 ol_LIBS="$LIBS"
14543                 LIBS="-lpthreads -lexc $LIBS"
14544
14545                 if test "$cross_compiling" = yes; then
14546   cat > conftest.$ac_ext <<EOF
14547 #line 14548 "configure"
14548 #include "confdefs.h"
14549 /* pthread test headers */
14550 #include <pthread.h>
14551 #if HAVE_PTHREADS < 7
14552 #include <errno.h>
14553 #endif
14554 #ifndef NULL
14555 #define NULL (void*)0
14556 #endif
14557
14558 static void *task(p)
14559         void *p;
14560 {
14561         return (void *) (p == NULL);
14562 }
14563
14564 int main() {
14565
14566         /* pthread test function */
14567 #ifndef PTHREAD_CREATE_DETACHED
14568 #define PTHREAD_CREATE_DETACHED 1
14569 #endif
14570         pthread_t t;
14571         int status;
14572         int detach = PTHREAD_CREATE_DETACHED;
14573
14574 #if HAVE_PTHREADS > 4
14575         /* Final pthreads */
14576         pthread_attr_t attr;
14577
14578         status = pthread_attr_init(&attr);
14579         if( status ) return status;
14580
14581 #if HAVE_PTHREADS < 7
14582         status = pthread_attr_setdetachstate(&attr, &detach);
14583         if( status < 0 ) status = errno;
14584 #else
14585         status = pthread_attr_setdetachstate(&attr, detach);
14586 #endif
14587         if( status ) return status;
14588         status = pthread_create( &t, &attr, task, NULL );
14589 #if HAVE_PTHREADS < 7
14590         if( status < 0 ) status = errno;
14591 #endif
14592         if( status ) return status;
14593 #else
14594         /* Draft 4 pthreads */
14595         status = pthread_create( &t, pthread_attr_default, task, NULL );
14596         if( status ) return errno;
14597
14598         /* give thread a chance to complete */
14599         /* it should remain joinable and hence detachable */
14600         sleep( 1 );
14601
14602         status = pthread_detach( &t );
14603         if( status ) return errno;
14604 #endif
14605
14606 #ifdef HAVE_LINUX_THREADS
14607         pthread_kill_other_threads_np();
14608 #endif
14609
14610         return 0;
14611
14612 ; return 0; }
14613 EOF
14614 if { (eval echo configure:14615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14615   rm -rf conftest*
14616   ol_cv_pthread_lpthreads_lexc=yes
14617 else
14618   echo "configure: failed program was:" >&5
14619   cat conftest.$ac_ext >&5
14620   rm -rf conftest*
14621   ol_cv_pthread_lpthreads_lexc=no
14622 fi
14623 rm -f conftest*
14624 else
14625   cat > conftest.$ac_ext <<EOF
14626 #line 14627 "configure"
14627 #include "confdefs.h"
14628 /* pthread test headers */
14629 #include <pthread.h>
14630 #if HAVE_PTHREADS < 7
14631 #include <errno.h>
14632 #endif
14633 #ifndef NULL
14634 #define NULL (void*)0
14635 #endif
14636
14637 static void *task(p)
14638         void *p;
14639 {
14640         return (void *) (p == NULL);
14641 }
14642
14643
14644 int main(argc, argv)
14645         int argc;
14646         char **argv;
14647 {
14648
14649         /* pthread test function */
14650 #ifndef PTHREAD_CREATE_DETACHED
14651 #define PTHREAD_CREATE_DETACHED 1
14652 #endif
14653         pthread_t t;
14654         int status;
14655         int detach = PTHREAD_CREATE_DETACHED;
14656
14657 #if HAVE_PTHREADS > 4
14658         /* Final pthreads */
14659         pthread_attr_t attr;
14660
14661         status = pthread_attr_init(&attr);
14662         if( status ) return status;
14663
14664 #if HAVE_PTHREADS < 7
14665         status = pthread_attr_setdetachstate(&attr, &detach);
14666         if( status < 0 ) status = errno;
14667 #else
14668         status = pthread_attr_setdetachstate(&attr, detach);
14669 #endif
14670         if( status ) return status;
14671         status = pthread_create( &t, &attr, task, NULL );
14672 #if HAVE_PTHREADS < 7
14673         if( status < 0 ) status = errno;
14674 #endif
14675         if( status ) return status;
14676 #else
14677         /* Draft 4 pthreads */
14678         status = pthread_create( &t, pthread_attr_default, task, NULL );
14679         if( status ) return errno;
14680
14681         /* give thread a chance to complete */
14682         /* it should remain joinable and hence detachable */
14683         sleep( 1 );
14684
14685         status = pthread_detach( &t );
14686         if( status ) return errno;
14687 #endif
14688
14689 #ifdef HAVE_LINUX_THREADS
14690         pthread_kill_other_threads_np();
14691 #endif
14692
14693         return 0;
14694
14695 }
14696
14697 EOF
14698 if { (eval echo configure:14699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14699 then
14700   ol_cv_pthread_lpthreads_lexc=yes
14701 else
14702   echo "configure: failed program was:" >&5
14703   cat conftest.$ac_ext >&5
14704   rm -fr conftest*
14705   ol_cv_pthread_lpthreads_lexc=no
14706 fi
14707 rm -fr conftest*
14708 fi
14709
14710
14711                 # restore the LIBS
14712                 LIBS="$ol_LIBS"
14713         
14714 fi
14715
14716 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14717
14718         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14719                 ol_link_pthreads="-lpthreads -lexc"
14720                 ol_link_threads=posix
14721         fi
14722 fi
14723
14724
14725                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14726 if test "$ol_link_threads" = no ; then
14727         # try -lpthreads
14728         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14729 echo "configure:14730: checking for pthread link with -lpthreads" >&5
14730 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14731   echo $ac_n "(cached) $ac_c" 1>&6
14732 else
14733   
14734                 # save the flags
14735                 ol_LIBS="$LIBS"
14736                 LIBS="-lpthreads $LIBS"
14737
14738                 if test "$cross_compiling" = yes; then
14739   cat > conftest.$ac_ext <<EOF
14740 #line 14741 "configure"
14741 #include "confdefs.h"
14742 /* pthread test headers */
14743 #include <pthread.h>
14744 #if HAVE_PTHREADS < 7
14745 #include <errno.h>
14746 #endif
14747 #ifndef NULL
14748 #define NULL (void*)0
14749 #endif
14750
14751 static void *task(p)
14752         void *p;
14753 {
14754         return (void *) (p == NULL);
14755 }
14756
14757 int main() {
14758
14759         /* pthread test function */
14760 #ifndef PTHREAD_CREATE_DETACHED
14761 #define PTHREAD_CREATE_DETACHED 1
14762 #endif
14763         pthread_t t;
14764         int status;
14765         int detach = PTHREAD_CREATE_DETACHED;
14766
14767 #if HAVE_PTHREADS > 4
14768         /* Final pthreads */
14769         pthread_attr_t attr;
14770
14771         status = pthread_attr_init(&attr);
14772         if( status ) return status;
14773
14774 #if HAVE_PTHREADS < 7
14775         status = pthread_attr_setdetachstate(&attr, &detach);
14776         if( status < 0 ) status = errno;
14777 #else
14778         status = pthread_attr_setdetachstate(&attr, detach);
14779 #endif
14780         if( status ) return status;
14781         status = pthread_create( &t, &attr, task, NULL );
14782 #if HAVE_PTHREADS < 7
14783         if( status < 0 ) status = errno;
14784 #endif
14785         if( status ) return status;
14786 #else
14787         /* Draft 4 pthreads */
14788         status = pthread_create( &t, pthread_attr_default, task, NULL );
14789         if( status ) return errno;
14790
14791         /* give thread a chance to complete */
14792         /* it should remain joinable and hence detachable */
14793         sleep( 1 );
14794
14795         status = pthread_detach( &t );
14796         if( status ) return errno;
14797 #endif
14798
14799 #ifdef HAVE_LINUX_THREADS
14800         pthread_kill_other_threads_np();
14801 #endif
14802
14803         return 0;
14804
14805 ; return 0; }
14806 EOF
14807 if { (eval echo configure:14808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14808   rm -rf conftest*
14809   ol_cv_pthread_lib_lpthreads=yes
14810 else
14811   echo "configure: failed program was:" >&5
14812   cat conftest.$ac_ext >&5
14813   rm -rf conftest*
14814   ol_cv_pthread_lib_lpthreads=no
14815 fi
14816 rm -f conftest*
14817 else
14818   cat > conftest.$ac_ext <<EOF
14819 #line 14820 "configure"
14820 #include "confdefs.h"
14821 /* pthread test headers */
14822 #include <pthread.h>
14823 #if HAVE_PTHREADS < 7
14824 #include <errno.h>
14825 #endif
14826 #ifndef NULL
14827 #define NULL (void*)0
14828 #endif
14829
14830 static void *task(p)
14831         void *p;
14832 {
14833         return (void *) (p == NULL);
14834 }
14835
14836
14837 int main(argc, argv)
14838         int argc;
14839         char **argv;
14840 {
14841
14842         /* pthread test function */
14843 #ifndef PTHREAD_CREATE_DETACHED
14844 #define PTHREAD_CREATE_DETACHED 1
14845 #endif
14846         pthread_t t;
14847         int status;
14848         int detach = PTHREAD_CREATE_DETACHED;
14849
14850 #if HAVE_PTHREADS > 4
14851         /* Final pthreads */
14852         pthread_attr_t attr;
14853
14854         status = pthread_attr_init(&attr);
14855         if( status ) return status;
14856
14857 #if HAVE_PTHREADS < 7
14858         status = pthread_attr_setdetachstate(&attr, &detach);
14859         if( status < 0 ) status = errno;
14860 #else
14861         status = pthread_attr_setdetachstate(&attr, detach);
14862 #endif
14863         if( status ) return status;
14864         status = pthread_create( &t, &attr, task, NULL );
14865 #if HAVE_PTHREADS < 7
14866         if( status < 0 ) status = errno;
14867 #endif
14868         if( status ) return status;
14869 #else
14870         /* Draft 4 pthreads */
14871         status = pthread_create( &t, pthread_attr_default, task, NULL );
14872         if( status ) return errno;
14873
14874         /* give thread a chance to complete */
14875         /* it should remain joinable and hence detachable */
14876         sleep( 1 );
14877
14878         status = pthread_detach( &t );
14879         if( status ) return errno;
14880 #endif
14881
14882 #ifdef HAVE_LINUX_THREADS
14883         pthread_kill_other_threads_np();
14884 #endif
14885
14886         return 0;
14887
14888 }
14889
14890 EOF
14891 if { (eval echo configure:14892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14892 then
14893   ol_cv_pthread_lib_lpthreads=yes
14894 else
14895   echo "configure: failed program was:" >&5
14896   cat conftest.$ac_ext >&5
14897   rm -fr conftest*
14898   ol_cv_pthread_lib_lpthreads=no
14899 fi
14900 rm -fr conftest*
14901 fi
14902
14903
14904                 # restore the LIBS
14905                 LIBS="$ol_LIBS"
14906         
14907 fi
14908
14909 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14910
14911         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14912                 ol_link_pthreads="-lpthreads"
14913                 ol_link_threads=posix
14914         fi
14915 fi
14916
14917
14918                 if test $ol_link_threads != no ; then
14919                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14920
14921                                                 save_CPPFLAGS="$CPPFLAGS"
14922                         save_LIBS="$LIBS"
14923                         LIBS="$LTHREAD_LIBS $LIBS"
14924
14925                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14926 do
14927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14928 echo "configure:14929: checking for $ac_func" >&5
14929 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14930   echo $ac_n "(cached) $ac_c" 1>&6
14931 else
14932   cat > conftest.$ac_ext <<EOF
14933 #line 14934 "configure"
14934 #include "confdefs.h"
14935 /* System header to define __stub macros and hopefully few prototypes,
14936     which can conflict with char $ac_func(); below.  */
14937 #include <assert.h>
14938 /* Override any gcc2 internal prototype to avoid an error.  */
14939 /* We use char because int might match the return type of a gcc2
14940     builtin and then its argument prototype would still apply.  */
14941 char $ac_func();
14942 char (*f)();
14943
14944 int main() {
14945
14946 /* The GNU C library defines this for functions which it implements
14947     to always fail with ENOSYS.  Some functions are actually named
14948     something starting with __ and the normal name is an alias.  */
14949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14950 choke me
14951 #else
14952 f = $ac_func;
14953 #endif
14954
14955 ; return 0; }
14956 EOF
14957 if { (eval echo configure:14958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14958   rm -rf conftest*
14959   eval "ac_cv_func_$ac_func=yes"
14960 else
14961   echo "configure: failed program was:" >&5
14962   cat conftest.$ac_ext >&5
14963   rm -rf conftest*
14964   eval "ac_cv_func_$ac_func=no"
14965 fi
14966 rm -f conftest*
14967 fi
14968
14969 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14970   echo "$ac_t""yes" 1>&6
14971     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14972   cat >> confdefs.h <<EOF
14973 #define $ac_tr_func 1
14974 EOF
14975  
14976 else
14977   echo "$ac_t""no" 1>&6
14978 fi
14979 done
14980
14981
14982                         if test $ac_cv_func_sched_yield = no -a \
14983                                 $ac_cv_func_pthread_yield = no -a \
14984                                 $ac_cv_func_thr_yield = no ; then
14985                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14986 echo "configure:14987: checking for sched_yield in -lrt" >&5
14987 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14989   echo $ac_n "(cached) $ac_c" 1>&6
14990 else
14991   ac_save_LIBS="$LIBS"
14992 LIBS="-lrt  $LIBS"
14993 cat > conftest.$ac_ext <<EOF
14994 #line 14995 "configure"
14995 #include "confdefs.h"
14996 /* Override any gcc2 internal prototype to avoid an error.  */
14997 /* We use char because int might match the return type of a gcc2
14998     builtin and then its argument prototype would still apply.  */
14999 char sched_yield();
15000
15001 int main() {
15002 sched_yield()
15003 ; return 0; }
15004 EOF
15005 if { (eval echo configure:15006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15006   rm -rf conftest*
15007   eval "ac_cv_lib_$ac_lib_var=yes"
15008 else
15009   echo "configure: failed program was:" >&5
15010   cat conftest.$ac_ext >&5
15011   rm -rf conftest*
15012   eval "ac_cv_lib_$ac_lib_var=no"
15013 fi
15014 rm -f conftest*
15015 LIBS="$ac_save_LIBS"
15016
15017 fi
15018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15019   echo "$ac_t""yes" 1>&6
15020   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15021                                         cat >> confdefs.h <<\EOF
15022 #define HAVE_SCHED_YIELD 1
15023 EOF
15024
15025                                         ac_cv_func_sched_yield=yes
15026 else
15027   echo "$ac_t""no" 1>&6
15028 ac_cv_func_sched_yield=no
15029 fi
15030
15031                         fi
15032                         if test $ac_cv_func_sched_yield = no -a \
15033                                 $ac_cv_func_pthread_yield = no -a \
15034                                 "$ac_cv_func_thr_yield" = no ; then
15035                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15036                         fi
15037
15038                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15039 do
15040 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15041 echo "configure:15042: checking for $ac_func" >&5
15042 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15043   echo $ac_n "(cached) $ac_c" 1>&6
15044 else
15045   cat > conftest.$ac_ext <<EOF
15046 #line 15047 "configure"
15047 #include "confdefs.h"
15048 /* System header to define __stub macros and hopefully few prototypes,
15049     which can conflict with char $ac_func(); below.  */
15050 #include <assert.h>
15051 /* Override any gcc2 internal prototype to avoid an error.  */
15052 /* We use char because int might match the return type of a gcc2
15053     builtin and then its argument prototype would still apply.  */
15054 char $ac_func();
15055 char (*f)();
15056
15057 int main() {
15058
15059 /* The GNU C library defines this for functions which it implements
15060     to always fail with ENOSYS.  Some functions are actually named
15061     something starting with __ and the normal name is an alias.  */
15062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15063 choke me
15064 #else
15065 f = $ac_func;
15066 #endif
15067
15068 ; return 0; }
15069 EOF
15070 if { (eval echo configure:15071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15071   rm -rf conftest*
15072   eval "ac_cv_func_$ac_func=yes"
15073 else
15074   echo "configure: failed program was:" >&5
15075   cat conftest.$ac_ext >&5
15076   rm -rf conftest*
15077   eval "ac_cv_func_$ac_func=no"
15078 fi
15079 rm -f conftest*
15080 fi
15081
15082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15083   echo "$ac_t""yes" 1>&6
15084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15085   cat >> confdefs.h <<EOF
15086 #define $ac_tr_func 1
15087 EOF
15088  
15089 else
15090   echo "$ac_t""no" 1>&6
15091 fi
15092 done
15093
15094
15095                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15096 echo "configure:15097: checking for pthread_detach with <pthread.h>" >&5
15097 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15098   echo $ac_n "(cached) $ac_c" 1>&6
15099 else
15100   
15101                                                                 cat > conftest.$ac_ext <<EOF
15102 #line 15103 "configure"
15103 #include "confdefs.h"
15104
15105 #include <pthread.h>
15106 #ifndef NULL
15107 #define NULL (void*)0
15108 #endif
15109
15110 int main() {
15111 pthread_detach(NULL);
15112 ; return 0; }
15113 EOF
15114 if { (eval echo configure:15115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15115   rm -rf conftest*
15116   ol_cv_func_pthread_detach=yes
15117 else
15118   echo "configure: failed program was:" >&5
15119   cat conftest.$ac_ext >&5
15120   rm -rf conftest*
15121   ol_cv_func_pthread_detach=no
15122 fi
15123 rm -f conftest*
15124                         
15125 fi
15126
15127 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15128
15129                         if test $ol_cv_func_pthread_detach = no ; then
15130                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15131                         fi
15132
15133                         cat >> confdefs.h <<\EOF
15134 #define HAVE_PTHREAD_DETACH 1
15135 EOF
15136
15137
15138                                                 for ac_func in \
15139                                 pthread_setconcurrency \
15140                                 pthread_getconcurrency \
15141                                 thr_setconcurrency \
15142                                 thr_getconcurrency \
15143                         
15144 do
15145 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15146 echo "configure:15147: checking for $ac_func" >&5
15147 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15148   echo $ac_n "(cached) $ac_c" 1>&6
15149 else
15150   cat > conftest.$ac_ext <<EOF
15151 #line 15152 "configure"
15152 #include "confdefs.h"
15153 /* System header to define __stub macros and hopefully few prototypes,
15154     which can conflict with char $ac_func(); below.  */
15155 #include <assert.h>
15156 /* Override any gcc2 internal prototype to avoid an error.  */
15157 /* We use char because int might match the return type of a gcc2
15158     builtin and then its argument prototype would still apply.  */
15159 char $ac_func();
15160 char (*f)();
15161
15162 int main() {
15163
15164 /* The GNU C library defines this for functions which it implements
15165     to always fail with ENOSYS.  Some functions are actually named
15166     something starting with __ and the normal name is an alias.  */
15167 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15168 choke me
15169 #else
15170 f = $ac_func;
15171 #endif
15172
15173 ; return 0; }
15174 EOF
15175 if { (eval echo configure:15176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15176   rm -rf conftest*
15177   eval "ac_cv_func_$ac_func=yes"
15178 else
15179   echo "configure: failed program was:" >&5
15180   cat conftest.$ac_ext >&5
15181   rm -rf conftest*
15182   eval "ac_cv_func_$ac_func=no"
15183 fi
15184 rm -f conftest*
15185 fi
15186
15187 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15188   echo "$ac_t""yes" 1>&6
15189     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15190   cat >> confdefs.h <<EOF
15191 #define $ac_tr_func 1
15192 EOF
15193  
15194 else
15195   echo "$ac_t""no" 1>&6
15196 fi
15197 done
15198
15199
15200                         
15201         for ac_func in pthread_kill_other_threads_np
15202 do
15203 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15204 echo "configure:15205: checking for $ac_func" >&5
15205 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15206   echo $ac_n "(cached) $ac_c" 1>&6
15207 else
15208   cat > conftest.$ac_ext <<EOF
15209 #line 15210 "configure"
15210 #include "confdefs.h"
15211 /* System header to define __stub macros and hopefully few prototypes,
15212     which can conflict with char $ac_func(); below.  */
15213 #include <assert.h>
15214 /* Override any gcc2 internal prototype to avoid an error.  */
15215 /* We use char because int might match the return type of a gcc2
15216     builtin and then its argument prototype would still apply.  */
15217 char $ac_func();
15218 char (*f)();
15219
15220 int main() {
15221
15222 /* The GNU C library defines this for functions which it implements
15223     to always fail with ENOSYS.  Some functions are actually named
15224     something starting with __ and the normal name is an alias.  */
15225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15226 choke me
15227 #else
15228 f = $ac_func;
15229 #endif
15230
15231 ; return 0; }
15232 EOF
15233 if { (eval echo configure:15234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15234   rm -rf conftest*
15235   eval "ac_cv_func_$ac_func=yes"
15236 else
15237   echo "configure: failed program was:" >&5
15238   cat conftest.$ac_ext >&5
15239   rm -rf conftest*
15240   eval "ac_cv_func_$ac_func=no"
15241 fi
15242 rm -f conftest*
15243 fi
15244
15245 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15246   echo "$ac_t""yes" 1>&6
15247     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15248   cat >> confdefs.h <<EOF
15249 #define $ac_tr_func 1
15250 EOF
15251  
15252 else
15253   echo "$ac_t""no" 1>&6
15254 fi
15255 done
15256
15257         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15258 echo "configure:15259: checking for LinuxThreads implementation" >&5
15259 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15260   echo $ac_n "(cached) $ac_c" 1>&6
15261 else
15262   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15263 fi
15264
15265 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15266
15267                         
15268         
15269         
15270         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15271 echo "configure:15272: checking for LinuxThreads consistency" >&5
15272 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15273   echo $ac_n "(cached) $ac_c" 1>&6
15274 else
15275   
15276                 if test $ol_cv_header_linux_threads = yes -a \
15277                         $ol_cv_sys_linux_threads = yes; then
15278                         ol_cv_linux_threads=yes
15279                 elif test $ol_cv_header_linux_threads = no -a \
15280                         $ol_cv_sys_linux_threads = no; then
15281                         ol_cv_linux_threads=no
15282                 else
15283                         ol_cv_linux_threads=error
15284                 fi
15285         
15286 fi
15287
15288 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15289
15290
15291                         if test $ol_cv_linux_threads = error; then
15292                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15293                         fi
15294
15295                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15296 echo "configure:15297: checking if pthread_create() works" >&5
15297 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15298   echo $ac_n "(cached) $ac_c" 1>&6
15299 else
15300   
15301                         if test "$cross_compiling" = yes; then
15302                                 ol_cv_pthread_create_works=yes
15303 else
15304   cat > conftest.$ac_ext <<EOF
15305 #line 15306 "configure"
15306 #include "confdefs.h"
15307 /* pthread test headers */
15308 #include <pthread.h>
15309 #if HAVE_PTHREADS < 7
15310 #include <errno.h>
15311 #endif
15312 #ifndef NULL
15313 #define NULL (void*)0
15314 #endif
15315
15316 static void *task(p)
15317         void *p;
15318 {
15319         return (void *) (p == NULL);
15320 }
15321
15322
15323 int main(argc, argv)
15324         int argc;
15325         char **argv;
15326 {
15327
15328         /* pthread test function */
15329 #ifndef PTHREAD_CREATE_DETACHED
15330 #define PTHREAD_CREATE_DETACHED 1
15331 #endif
15332         pthread_t t;
15333         int status;
15334         int detach = PTHREAD_CREATE_DETACHED;
15335
15336 #if HAVE_PTHREADS > 4
15337         /* Final pthreads */
15338         pthread_attr_t attr;
15339
15340         status = pthread_attr_init(&attr);
15341         if( status ) return status;
15342
15343 #if HAVE_PTHREADS < 7
15344         status = pthread_attr_setdetachstate(&attr, &detach);
15345         if( status < 0 ) status = errno;
15346 #else
15347         status = pthread_attr_setdetachstate(&attr, detach);
15348 #endif
15349         if( status ) return status;
15350         status = pthread_create( &t, &attr, task, NULL );
15351 #if HAVE_PTHREADS < 7
15352         if( status < 0 ) status = errno;
15353 #endif
15354         if( status ) return status;
15355 #else
15356         /* Draft 4 pthreads */
15357         status = pthread_create( &t, pthread_attr_default, task, NULL );
15358         if( status ) return errno;
15359
15360         /* give thread a chance to complete */
15361         /* it should remain joinable and hence detachable */
15362         sleep( 1 );
15363
15364         status = pthread_detach( &t );
15365         if( status ) return errno;
15366 #endif
15367
15368 #ifdef HAVE_LINUX_THREADS
15369         pthread_kill_other_threads_np();
15370 #endif
15371
15372         return 0;
15373
15374 }
15375
15376 EOF
15377 if { (eval echo configure:15378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15378 then
15379   ol_cv_pthread_create_works=yes
15380 else
15381   echo "configure: failed program was:" >&5
15382   cat conftest.$ac_ext >&5
15383   rm -fr conftest*
15384   ol_cv_pthread_create_works=no
15385 fi
15386 rm -fr conftest*
15387 fi
15388
15389 fi
15390
15391 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15392
15393                         if test $ol_cv_pthread_create_works = no ; then
15394                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15395                         fi
15396
15397                                                 if test $ol_with_yielding_select = auto ; then
15398                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15399 echo "configure:15400: checking if select yields when using pthreads" >&5
15400 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15401   echo $ac_n "(cached) $ac_c" 1>&6
15402 else
15403   
15404                                 if test "$cross_compiling" = yes; then
15405   ol_cv_pthread_select_yields=cross
15406 else
15407   cat > conftest.$ac_ext <<EOF
15408 #line 15409 "configure"
15409 #include "confdefs.h"
15410
15411 #include <sys/types.h>
15412 #include <sys/time.h>
15413 #include <unistd.h>
15414 #include <pthread.h>
15415 #ifndef NULL
15416 #define NULL (void*) 0
15417 #endif
15418
15419 static int fildes[2];
15420
15421 static void *task(p)
15422         void *p;
15423 {
15424         int i;
15425         struct timeval tv;
15426
15427         fd_set rfds;
15428
15429         tv.tv_sec=10;
15430         tv.tv_usec=0;
15431
15432         FD_ZERO(&rfds);
15433         FD_SET(fildes[0], &rfds);
15434
15435         /* we're not interested in any fds */
15436         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15437
15438         if(i < 0) {
15439                 perror("select");
15440                 exit(10);
15441         }
15442
15443         exit(0); /* if we exit here, the select blocked the whole process */
15444 }
15445
15446 int main(argc, argv)
15447         int argc;
15448         char **argv;
15449 {
15450         pthread_t t;
15451
15452         /* create a pipe to select */
15453         if(pipe(&fildes[0])) {
15454                 perror("select");
15455                 exit(1);
15456         }
15457
15458 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15459         (void) pthread_setconcurrency(2);
15460 #else
15461 #ifdef HAVE_THR_SETCONCURRENCY
15462         /* Set Solaris LWP concurrency to 2 */
15463         thr_setconcurrency(2);
15464 #endif
15465 #endif
15466
15467 #if HAVE_PTHREADS < 6
15468         pthread_create(&t, pthread_attr_default, task, NULL);
15469 #else
15470         pthread_create(&t, NULL, task, NULL);
15471 #endif
15472
15473         /* make sure task runs first */
15474 #if HAVE_THR_YIELD
15475         thr_yield();
15476 #elif defined( HAVE_SCHED_YIELD )
15477         sched_yield();
15478 #elif defined( HAVE_PTHREAD_YIELD )
15479         pthread_yield();
15480 #endif
15481
15482         exit(2);
15483 }
15484 EOF
15485 if { (eval echo configure:15486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15486 then
15487   ol_cv_pthread_select_yields=no
15488 else
15489   echo "configure: failed program was:" >&5
15490   cat conftest.$ac_ext >&5
15491   rm -fr conftest*
15492   ol_cv_pthread_select_yields=yes
15493 fi
15494 rm -fr conftest*
15495 fi
15496
15497 fi
15498
15499 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15500
15501                                 if test $ol_cv_pthread_select_yields = cross ; then
15502                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15503                                 fi
15504
15505                                 if test $ol_cv_pthread_select_yields = yes ; then
15506                                         ol_with_yielding_select=yes
15507                                 fi
15508                         fi
15509
15510                                                 CPPFLAGS="$save_CPPFLAGS"
15511                         LIBS="$save_LIBS"
15512                 else
15513                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15514                 fi
15515         fi
15516
15517         if test $ol_with_threads = posix ; then
15518                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15519         fi
15520 fi
15521
15522 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15523         -o $ol_with_threads = mach ; then
15524
15525                 for ac_hdr in mach/cthreads.h cthreads.h
15526 do
15527 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15528 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15529 echo "configure:15530: checking for $ac_hdr" >&5
15530 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15531   echo $ac_n "(cached) $ac_c" 1>&6
15532 else
15533   cat > conftest.$ac_ext <<EOF
15534 #line 15535 "configure"
15535 #include "confdefs.h"
15536 #include <$ac_hdr>
15537 EOF
15538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15539 { (eval echo configure:15540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15541 if test -z "$ac_err"; then
15542   rm -rf conftest*
15543   eval "ac_cv_header_$ac_safe=yes"
15544 else
15545   echo "$ac_err" >&5
15546   echo "configure: failed program was:" >&5
15547   cat conftest.$ac_ext >&5
15548   rm -rf conftest*
15549   eval "ac_cv_header_$ac_safe=no"
15550 fi
15551 rm -f conftest*
15552 fi
15553 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15554   echo "$ac_t""yes" 1>&6
15555     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15556   cat >> confdefs.h <<EOF
15557 #define $ac_tr_hdr 1
15558 EOF
15559  
15560 else
15561   echo "$ac_t""no" 1>&6
15562 fi
15563 done
15564
15565         if test $ac_cv_header_mach_cthreads_h = yes ; then
15566                 ol_with_threads=found
15567
15568                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15569 echo "configure:15570: checking for cthread_fork" >&5
15570 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15571   echo $ac_n "(cached) $ac_c" 1>&6
15572 else
15573   cat > conftest.$ac_ext <<EOF
15574 #line 15575 "configure"
15575 #include "confdefs.h"
15576 /* System header to define __stub macros and hopefully few prototypes,
15577     which can conflict with char cthread_fork(); below.  */
15578 #include <assert.h>
15579 /* Override any gcc2 internal prototype to avoid an error.  */
15580 /* We use char because int might match the return type of a gcc2
15581     builtin and then its argument prototype would still apply.  */
15582 char cthread_fork();
15583 char (*f)();
15584
15585 int main() {
15586
15587 /* The GNU C library defines this for functions which it implements
15588     to always fail with ENOSYS.  Some functions are actually named
15589     something starting with __ and the normal name is an alias.  */
15590 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15591 choke me
15592 #else
15593 f = cthread_fork;
15594 #endif
15595
15596 ; return 0; }
15597 EOF
15598 if { (eval echo configure:15599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15599   rm -rf conftest*
15600   eval "ac_cv_func_cthread_fork=yes"
15601 else
15602   echo "configure: failed program was:" >&5
15603   cat conftest.$ac_ext >&5
15604   rm -rf conftest*
15605   eval "ac_cv_func_cthread_fork=no"
15606 fi
15607 rm -f conftest*
15608 fi
15609
15610 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15611   echo "$ac_t""yes" 1>&6
15612   ol_link_threads=yes
15613 else
15614   echo "$ac_t""no" 1>&6
15615 fi
15616
15617
15618                 if test $ol_link_threads = no ; then
15619                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15620 echo "configure:15621: checking for cthread_fork with -all_load" >&5
15621 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15622   echo $ac_n "(cached) $ac_c" 1>&6
15623 else
15624   
15625                                                                 save_LIBS="$LIBS"
15626                                 LIBS="-all_load $LIBS"
15627                                 cat > conftest.$ac_ext <<EOF
15628 #line 15629 "configure"
15629 #include "confdefs.h"
15630 #include <mach/cthreads.h>
15631 int main() {
15632
15633                                         cthread_fork((void *)0, (void *)0);
15634                                         
15635 ; return 0; }
15636 EOF
15637 if { (eval echo configure:15638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15638   rm -rf conftest*
15639   ol_cv_cthread_all_load=yes
15640 else
15641   echo "configure: failed program was:" >&5
15642   cat conftest.$ac_ext >&5
15643   rm -rf conftest*
15644   ol_cv_cthread_all_load=no
15645 fi
15646 rm -f conftest*
15647                                                                 LIBS="$save_LIBS"
15648                         
15649 fi
15650
15651 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15652
15653                         if test $ol_cv_cthread_all_load = yes ; then
15654                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15655                                 ol_link_threads=mach
15656                                 ol_with_threads=found
15657                         fi
15658                 fi
15659
15660         elif test $ac_cv_header_cthreads_h = yes ; then
15661                                 
15662                 ol_with_threads=found
15663  
15664                                 save_LIBS="$LIBS"
15665                 LIBS="$LIBS -lthreads"
15666                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15667 echo "configure:15668: checking for cthread_fork" >&5
15668 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15669   echo $ac_n "(cached) $ac_c" 1>&6
15670 else
15671   cat > conftest.$ac_ext <<EOF
15672 #line 15673 "configure"
15673 #include "confdefs.h"
15674 /* System header to define __stub macros and hopefully few prototypes,
15675     which can conflict with char cthread_fork(); below.  */
15676 #include <assert.h>
15677 /* Override any gcc2 internal prototype to avoid an error.  */
15678 /* We use char because int might match the return type of a gcc2
15679     builtin and then its argument prototype would still apply.  */
15680 char cthread_fork();
15681 char (*f)();
15682
15683 int main() {
15684
15685 /* The GNU C library defines this for functions which it implements
15686     to always fail with ENOSYS.  Some functions are actually named
15687     something starting with __ and the normal name is an alias.  */
15688 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15689 choke me
15690 #else
15691 f = cthread_fork;
15692 #endif
15693
15694 ; return 0; }
15695 EOF
15696 if { (eval echo configure:15697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15697   rm -rf conftest*
15698   eval "ac_cv_func_cthread_fork=yes"
15699 else
15700   echo "configure: failed program was:" >&5
15701   cat conftest.$ac_ext >&5
15702   rm -rf conftest*
15703   eval "ac_cv_func_cthread_fork=no"
15704 fi
15705 rm -f conftest*
15706 fi
15707
15708 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15709   echo "$ac_t""yes" 1>&6
15710   ol_link_threads=yes
15711 else
15712   echo "$ac_t""no" 1>&6
15713 fi
15714
15715                 LIBS="$save_LIBS"
15716
15717                 if test $ol_link_threads = yes ; then
15718                         LTHREAD_LIBS="-lthreads"
15719                         ol_link_threads=mach
15720                         ol_with_threads=found
15721                 else
15722                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15723                 fi
15724
15725         elif test $ol_with_threads = mach ; then
15726                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15727         fi
15728
15729         if test $ol_link_threads = mach ; then
15730                 cat >> confdefs.h <<\EOF
15731 #define HAVE_MACH_CTHREADS 1
15732 EOF
15733
15734         elif test $ol_with_threads = found ; then
15735                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15736         fi
15737 fi
15738
15739 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15740         -o $ol_with_threads = pth ; then
15741
15742         for ac_hdr in pth.h
15743 do
15744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15746 echo "configure:15747: checking for $ac_hdr" >&5
15747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15748   echo $ac_n "(cached) $ac_c" 1>&6
15749 else
15750   cat > conftest.$ac_ext <<EOF
15751 #line 15752 "configure"
15752 #include "confdefs.h"
15753 #include <$ac_hdr>
15754 EOF
15755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15756 { (eval echo configure:15757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15758 if test -z "$ac_err"; then
15759   rm -rf conftest*
15760   eval "ac_cv_header_$ac_safe=yes"
15761 else
15762   echo "$ac_err" >&5
15763   echo "configure: failed program was:" >&5
15764   cat conftest.$ac_ext >&5
15765   rm -rf conftest*
15766   eval "ac_cv_header_$ac_safe=no"
15767 fi
15768 rm -f conftest*
15769 fi
15770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15771   echo "$ac_t""yes" 1>&6
15772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15773   cat >> confdefs.h <<EOF
15774 #define $ac_tr_hdr 1
15775 EOF
15776  
15777 else
15778   echo "$ac_t""no" 1>&6
15779 fi
15780 done
15781
15782
15783         if test $ac_cv_header_pth_h = yes ; then
15784                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15785 echo "configure:15786: checking for pth_version in -lpth" >&5
15786 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15788   echo $ac_n "(cached) $ac_c" 1>&6
15789 else
15790   ac_save_LIBS="$LIBS"
15791 LIBS="-lpth  $LIBS"
15792 cat > conftest.$ac_ext <<EOF
15793 #line 15794 "configure"
15794 #include "confdefs.h"
15795 /* Override any gcc2 internal prototype to avoid an error.  */
15796 /* We use char because int might match the return type of a gcc2
15797     builtin and then its argument prototype would still apply.  */
15798 char pth_version();
15799
15800 int main() {
15801 pth_version()
15802 ; return 0; }
15803 EOF
15804 if { (eval echo configure:15805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15805   rm -rf conftest*
15806   eval "ac_cv_lib_$ac_lib_var=yes"
15807 else
15808   echo "configure: failed program was:" >&5
15809   cat conftest.$ac_ext >&5
15810   rm -rf conftest*
15811   eval "ac_cv_lib_$ac_lib_var=no"
15812 fi
15813 rm -f conftest*
15814 LIBS="$ac_save_LIBS"
15815
15816 fi
15817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15818   echo "$ac_t""yes" 1>&6
15819   have_pth=yes
15820 else
15821   echo "$ac_t""no" 1>&6
15822 have_pth=no
15823 fi
15824
15825
15826                 if test $have_pth = yes ; then
15827                         cat >> confdefs.h <<\EOF
15828 #define HAVE_GNU_PTH 1
15829 EOF
15830
15831                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15832                         ol_link_threads=pth
15833                         ol_with_threads=found
15834
15835                         if test $ol_with_yielding_select = auto ; then
15836                                 ol_with_yielding_select=yes
15837                         fi
15838                 fi
15839         fi
15840 fi
15841
15842 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15843         -o $ol_with_threads = lwp ; then
15844
15845                 for ac_hdr in thread.h synch.h
15846 do
15847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15849 echo "configure:15850: checking for $ac_hdr" >&5
15850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15851   echo $ac_n "(cached) $ac_c" 1>&6
15852 else
15853   cat > conftest.$ac_ext <<EOF
15854 #line 15855 "configure"
15855 #include "confdefs.h"
15856 #include <$ac_hdr>
15857 EOF
15858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15859 { (eval echo configure:15860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15861 if test -z "$ac_err"; then
15862   rm -rf conftest*
15863   eval "ac_cv_header_$ac_safe=yes"
15864 else
15865   echo "$ac_err" >&5
15866   echo "configure: failed program was:" >&5
15867   cat conftest.$ac_ext >&5
15868   rm -rf conftest*
15869   eval "ac_cv_header_$ac_safe=no"
15870 fi
15871 rm -f conftest*
15872 fi
15873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15874   echo "$ac_t""yes" 1>&6
15875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15876   cat >> confdefs.h <<EOF
15877 #define $ac_tr_hdr 1
15878 EOF
15879  
15880 else
15881   echo "$ac_t""no" 1>&6
15882 fi
15883 done
15884
15885         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15886                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15887 echo "configure:15888: checking for thr_create in -lthread" >&5
15888 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15889 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15890   echo $ac_n "(cached) $ac_c" 1>&6
15891 else
15892   ac_save_LIBS="$LIBS"
15893 LIBS="-lthread  $LIBS"
15894 cat > conftest.$ac_ext <<EOF
15895 #line 15896 "configure"
15896 #include "confdefs.h"
15897 /* Override any gcc2 internal prototype to avoid an error.  */
15898 /* We use char because int might match the return type of a gcc2
15899     builtin and then its argument prototype would still apply.  */
15900 char thr_create();
15901
15902 int main() {
15903 thr_create()
15904 ; return 0; }
15905 EOF
15906 if { (eval echo configure:15907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15907   rm -rf conftest*
15908   eval "ac_cv_lib_$ac_lib_var=yes"
15909 else
15910   echo "configure: failed program was:" >&5
15911   cat conftest.$ac_ext >&5
15912   rm -rf conftest*
15913   eval "ac_cv_lib_$ac_lib_var=no"
15914 fi
15915 rm -f conftest*
15916 LIBS="$ac_save_LIBS"
15917
15918 fi
15919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15920   echo "$ac_t""yes" 1>&6
15921   have_thr=yes
15922 else
15923   echo "$ac_t""no" 1>&6
15924 have_thr=no
15925 fi
15926
15927
15928                 if test $have_thr = yes ; then
15929                         cat >> confdefs.h <<\EOF
15930 #define HAVE_THR 1
15931 EOF
15932
15933                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15934                         ol_link_threads=thr
15935
15936                         if test $ol_with_yielding_select = auto ; then
15937                                 ol_with_yielding_select=yes
15938                         fi
15939
15940                                                 for ac_func in \
15941                                 thr_setconcurrency \
15942                                 thr_getconcurrency \
15943                         
15944 do
15945 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15946 echo "configure:15947: checking for $ac_func" >&5
15947 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15948   echo $ac_n "(cached) $ac_c" 1>&6
15949 else
15950   cat > conftest.$ac_ext <<EOF
15951 #line 15952 "configure"
15952 #include "confdefs.h"
15953 /* System header to define __stub macros and hopefully few prototypes,
15954     which can conflict with char $ac_func(); below.  */
15955 #include <assert.h>
15956 /* Override any gcc2 internal prototype to avoid an error.  */
15957 /* We use char because int might match the return type of a gcc2
15958     builtin and then its argument prototype would still apply.  */
15959 char $ac_func();
15960 char (*f)();
15961
15962 int main() {
15963
15964 /* The GNU C library defines this for functions which it implements
15965     to always fail with ENOSYS.  Some functions are actually named
15966     something starting with __ and the normal name is an alias.  */
15967 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15968 choke me
15969 #else
15970 f = $ac_func;
15971 #endif
15972
15973 ; return 0; }
15974 EOF
15975 if { (eval echo configure:15976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15976   rm -rf conftest*
15977   eval "ac_cv_func_$ac_func=yes"
15978 else
15979   echo "configure: failed program was:" >&5
15980   cat conftest.$ac_ext >&5
15981   rm -rf conftest*
15982   eval "ac_cv_func_$ac_func=no"
15983 fi
15984 rm -f conftest*
15985 fi
15986
15987 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15988   echo "$ac_t""yes" 1>&6
15989     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15990   cat >> confdefs.h <<EOF
15991 #define $ac_tr_func 1
15992 EOF
15993  
15994 else
15995   echo "$ac_t""no" 1>&6
15996 fi
15997 done
15998
15999                 fi
16000         fi
16001
16002                 for ac_hdr in lwp/lwp.h
16003 do
16004 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16005 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16006 echo "configure:16007: checking for $ac_hdr" >&5
16007 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16008   echo $ac_n "(cached) $ac_c" 1>&6
16009 else
16010   cat > conftest.$ac_ext <<EOF
16011 #line 16012 "configure"
16012 #include "confdefs.h"
16013 #include <$ac_hdr>
16014 EOF
16015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16016 { (eval echo configure:16017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16018 if test -z "$ac_err"; then
16019   rm -rf conftest*
16020   eval "ac_cv_header_$ac_safe=yes"
16021 else
16022   echo "$ac_err" >&5
16023   echo "configure: failed program was:" >&5
16024   cat conftest.$ac_ext >&5
16025   rm -rf conftest*
16026   eval "ac_cv_header_$ac_safe=no"
16027 fi
16028 rm -f conftest*
16029 fi
16030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16031   echo "$ac_t""yes" 1>&6
16032     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16033   cat >> confdefs.h <<EOF
16034 #define $ac_tr_hdr 1
16035 EOF
16036  
16037 else
16038   echo "$ac_t""no" 1>&6
16039 fi
16040 done
16041
16042         if test $ac_cv_header_lwp_lwp_h = yes ; then
16043                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16044 echo "configure:16045: checking for lwp_create in -llwp" >&5
16045 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16046 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16047   echo $ac_n "(cached) $ac_c" 1>&6
16048 else
16049   ac_save_LIBS="$LIBS"
16050 LIBS="-llwp  $LIBS"
16051 cat > conftest.$ac_ext <<EOF
16052 #line 16053 "configure"
16053 #include "confdefs.h"
16054 /* Override any gcc2 internal prototype to avoid an error.  */
16055 /* We use char because int might match the return type of a gcc2
16056     builtin and then its argument prototype would still apply.  */
16057 char lwp_create();
16058
16059 int main() {
16060 lwp_create()
16061 ; return 0; }
16062 EOF
16063 if { (eval echo configure:16064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16064   rm -rf conftest*
16065   eval "ac_cv_lib_$ac_lib_var=yes"
16066 else
16067   echo "configure: failed program was:" >&5
16068   cat conftest.$ac_ext >&5
16069   rm -rf conftest*
16070   eval "ac_cv_lib_$ac_lib_var=no"
16071 fi
16072 rm -f conftest*
16073 LIBS="$ac_save_LIBS"
16074
16075 fi
16076 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16077   echo "$ac_t""yes" 1>&6
16078   have_lwp=yes
16079 else
16080   echo "$ac_t""no" 1>&6
16081 have_lwp=no
16082 fi
16083
16084
16085                 if test $have_lwp = yes ; then
16086                         cat >> confdefs.h <<\EOF
16087 #define HAVE_LWP 1
16088 EOF
16089
16090                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16091                         ol_link_threads=lwp
16092
16093                         if test $ol_with_yielding_select = auto ; then
16094                                 ol_with_yielding_select=no
16095                         fi
16096                 fi
16097         fi
16098 fi
16099
16100 if test $ol_with_yielding_select = yes ; then
16101         cat >> confdefs.h <<\EOF
16102 #define HAVE_YIELDING_SELECT 1
16103 EOF
16104
16105 fi
16106
16107 if test $ol_with_threads = manual ; then
16108                 ol_link_threads=yes
16109
16110         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16111
16112         for ac_hdr in pthread.h sched.h
16113 do
16114 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16115 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16116 echo "configure:16117: checking for $ac_hdr" >&5
16117 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16118   echo $ac_n "(cached) $ac_c" 1>&6
16119 else
16120   cat > conftest.$ac_ext <<EOF
16121 #line 16122 "configure"
16122 #include "confdefs.h"
16123 #include <$ac_hdr>
16124 EOF
16125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16126 { (eval echo configure:16127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16128 if test -z "$ac_err"; then
16129   rm -rf conftest*
16130   eval "ac_cv_header_$ac_safe=yes"
16131 else
16132   echo "$ac_err" >&5
16133   echo "configure: failed program was:" >&5
16134   cat conftest.$ac_ext >&5
16135   rm -rf conftest*
16136   eval "ac_cv_header_$ac_safe=no"
16137 fi
16138 rm -f conftest*
16139 fi
16140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16141   echo "$ac_t""yes" 1>&6
16142     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16143   cat >> confdefs.h <<EOF
16144 #define $ac_tr_hdr 1
16145 EOF
16146  
16147 else
16148   echo "$ac_t""no" 1>&6
16149 fi
16150 done
16151
16152         for ac_func in sched_yield pthread_yield
16153 do
16154 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16155 echo "configure:16156: checking for $ac_func" >&5
16156 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16157   echo $ac_n "(cached) $ac_c" 1>&6
16158 else
16159   cat > conftest.$ac_ext <<EOF
16160 #line 16161 "configure"
16161 #include "confdefs.h"
16162 /* System header to define __stub macros and hopefully few prototypes,
16163     which can conflict with char $ac_func(); below.  */
16164 #include <assert.h>
16165 /* Override any gcc2 internal prototype to avoid an error.  */
16166 /* We use char because int might match the return type of a gcc2
16167     builtin and then its argument prototype would still apply.  */
16168 char $ac_func();
16169 char (*f)();
16170
16171 int main() {
16172
16173 /* The GNU C library defines this for functions which it implements
16174     to always fail with ENOSYS.  Some functions are actually named
16175     something starting with __ and the normal name is an alias.  */
16176 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16177 choke me
16178 #else
16179 f = $ac_func;
16180 #endif
16181
16182 ; return 0; }
16183 EOF
16184 if { (eval echo configure:16185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16185   rm -rf conftest*
16186   eval "ac_cv_func_$ac_func=yes"
16187 else
16188   echo "configure: failed program was:" >&5
16189   cat conftest.$ac_ext >&5
16190   rm -rf conftest*
16191   eval "ac_cv_func_$ac_func=no"
16192 fi
16193 rm -f conftest*
16194 fi
16195
16196 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16197   echo "$ac_t""yes" 1>&6
16198     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16199   cat >> confdefs.h <<EOF
16200 #define $ac_tr_func 1
16201 EOF
16202  
16203 else
16204   echo "$ac_t""no" 1>&6
16205 fi
16206 done
16207
16208         
16209         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16210 echo "configure:16211: checking for LinuxThreads pthread.h" >&5
16211 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16212   echo $ac_n "(cached) $ac_c" 1>&6
16213 else
16214   cat > conftest.$ac_ext <<EOF
16215 #line 16216 "configure"
16216 #include "confdefs.h"
16217 #include <pthread.h>
16218 EOF
16219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16220   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16221   rm -rf conftest*
16222   ol_cv_header_linux_threads=yes
16223 else
16224   rm -rf conftest*
16225   ol_cv_header_linux_threads=no
16226 fi
16227 rm -f conftest*
16228
16229                 
16230 fi
16231
16232 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16233         if test $ol_cv_header_linux_threads = yes; then
16234                 cat >> confdefs.h <<\EOF
16235 #define HAVE_LINUX_THREADS 1
16236 EOF
16237
16238         fi
16239
16240
16241         for ac_hdr in mach/cthreads.h
16242 do
16243 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16244 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16245 echo "configure:16246: checking for $ac_hdr" >&5
16246 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16247   echo $ac_n "(cached) $ac_c" 1>&6
16248 else
16249   cat > conftest.$ac_ext <<EOF
16250 #line 16251 "configure"
16251 #include "confdefs.h"
16252 #include <$ac_hdr>
16253 EOF
16254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16255 { (eval echo configure:16256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16257 if test -z "$ac_err"; then
16258   rm -rf conftest*
16259   eval "ac_cv_header_$ac_safe=yes"
16260 else
16261   echo "$ac_err" >&5
16262   echo "configure: failed program was:" >&5
16263   cat conftest.$ac_ext >&5
16264   rm -rf conftest*
16265   eval "ac_cv_header_$ac_safe=no"
16266 fi
16267 rm -f conftest*
16268 fi
16269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16270   echo "$ac_t""yes" 1>&6
16271     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16272   cat >> confdefs.h <<EOF
16273 #define $ac_tr_hdr 1
16274 EOF
16275  
16276 else
16277   echo "$ac_t""no" 1>&6
16278 fi
16279 done
16280
16281         for ac_hdr in lwp/lwp.h
16282 do
16283 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16284 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16285 echo "configure:16286: checking for $ac_hdr" >&5
16286 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16287   echo $ac_n "(cached) $ac_c" 1>&6
16288 else
16289   cat > conftest.$ac_ext <<EOF
16290 #line 16291 "configure"
16291 #include "confdefs.h"
16292 #include <$ac_hdr>
16293 EOF
16294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16295 { (eval echo configure:16296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16297 if test -z "$ac_err"; then
16298   rm -rf conftest*
16299   eval "ac_cv_header_$ac_safe=yes"
16300 else
16301   echo "$ac_err" >&5
16302   echo "configure: failed program was:" >&5
16303   cat conftest.$ac_ext >&5
16304   rm -rf conftest*
16305   eval "ac_cv_header_$ac_safe=no"
16306 fi
16307 rm -f conftest*
16308 fi
16309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16310   echo "$ac_t""yes" 1>&6
16311     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16312   cat >> confdefs.h <<EOF
16313 #define $ac_tr_hdr 1
16314 EOF
16315  
16316 else
16317   echo "$ac_t""no" 1>&6
16318 fi
16319 done
16320
16321         for ac_hdr in thread.h synch.h
16322 do
16323 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16324 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16325 echo "configure:16326: checking for $ac_hdr" >&5
16326 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16327   echo $ac_n "(cached) $ac_c" 1>&6
16328 else
16329   cat > conftest.$ac_ext <<EOF
16330 #line 16331 "configure"
16331 #include "confdefs.h"
16332 #include <$ac_hdr>
16333 EOF
16334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16335 { (eval echo configure:16336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16337 if test -z "$ac_err"; then
16338   rm -rf conftest*
16339   eval "ac_cv_header_$ac_safe=yes"
16340 else
16341   echo "$ac_err" >&5
16342   echo "configure: failed program was:" >&5
16343   cat conftest.$ac_ext >&5
16344   rm -rf conftest*
16345   eval "ac_cv_header_$ac_safe=no"
16346 fi
16347 rm -f conftest*
16348 fi
16349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16350   echo "$ac_t""yes" 1>&6
16351     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16352   cat >> confdefs.h <<EOF
16353 #define $ac_tr_hdr 1
16354 EOF
16355  
16356 else
16357   echo "$ac_t""no" 1>&6
16358 fi
16359 done
16360
16361 fi
16362
16363 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16364                         cat >> confdefs.h <<\EOF
16365 #define REENTRANT 1
16366 EOF
16367
16368         cat >> confdefs.h <<\EOF
16369 #define _REENTRANT 1
16370 EOF
16371
16372         cat >> confdefs.h <<\EOF
16373 #define THREAD_SAFE 1
16374 EOF
16375
16376         cat >> confdefs.h <<\EOF
16377 #define _THREAD_SAFE 1
16378 EOF
16379
16380         cat >> confdefs.h <<\EOF
16381 #define THREADSAFE 1
16382 EOF
16383
16384         cat >> confdefs.h <<\EOF
16385 #define _THREADSAFE 1
16386 EOF
16387
16388         cat >> confdefs.h <<\EOF
16389 #define _SGI_MP_SOURCE 1
16390 EOF
16391
16392
16393                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16394 echo "configure:16395: checking for thread specific errno" >&5
16395 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16396   echo $ac_n "(cached) $ac_c" 1>&6
16397 else
16398   
16399                 cat > conftest.$ac_ext <<EOF
16400 #line 16401 "configure"
16401 #include "confdefs.h"
16402 #include <errno.h>
16403 int main() {
16404 errno = 0;
16405 ; return 0; }
16406 EOF
16407 if { (eval echo configure:16408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16408   rm -rf conftest*
16409   ol_cv_errno_thread_specific=yes
16410 else
16411   echo "configure: failed program was:" >&5
16412   cat conftest.$ac_ext >&5
16413   rm -rf conftest*
16414   ol_cv_errno_thread_specific=no
16415 fi
16416 rm -f conftest*
16417         
16418 fi
16419
16420 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16421
16422                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16423 echo "configure:16424: checking for thread specific h_errno" >&5
16424 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16425   echo $ac_n "(cached) $ac_c" 1>&6
16426 else
16427   
16428                 cat > conftest.$ac_ext <<EOF
16429 #line 16430 "configure"
16430 #include "confdefs.h"
16431 #include <netdb.h>
16432 int main() {
16433 h_errno = 0;
16434 ; return 0; }
16435 EOF
16436 if { (eval echo configure:16437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16437   rm -rf conftest*
16438   ol_cv_h_errno_thread_specific=yes
16439 else
16440   echo "configure: failed program was:" >&5
16441   cat conftest.$ac_ext >&5
16442   rm -rf conftest*
16443   ol_cv_h_errno_thread_specific=no
16444 fi
16445 rm -f conftest*
16446         
16447 fi
16448
16449 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16450
16451         if test $ol_cv_errno_thread_specific != yes \
16452                 -o $ol_cv_h_errno_thread_specific != yes ; then
16453                 LIBS="$LTHREAD_LIBS $LIBS"
16454                 LTHREAD_LIBS=""
16455         fi
16456
16457 fi  
16458
16459 if test $ol_link_threads = no ; then
16460         if test $ol_with_threads = yes ; then
16461                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16462         fi
16463
16464         if test $ol_with_threads = auto ; then
16465                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16466                 ol_with_threads=no
16467         fi
16468
16469         cat >> confdefs.h <<\EOF
16470 #define NO_THREADS 1
16471 EOF
16472
16473         LTHREAD_LIBS=""
16474 fi
16475
16476 if test $ol_link_threads != no ; then
16477         cat >> confdefs.h <<\EOF
16478 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16479 EOF
16480
16481 fi
16482
16483 ol_link_ldbm=no 
16484
16485 if test $ol_with_ldbm_api = auto \
16486         -o $ol_with_ldbm_api = berkeley \
16487         -o $ol_with_ldbm_api = bcompat ; then
16488
16489         if test $ol_with_ldbm_api = bcompat; then \
16490                 for ac_hdr in db_185.h db.h
16491 do
16492 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16493 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16494 echo "configure:16495: checking for $ac_hdr" >&5
16495 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16496   echo $ac_n "(cached) $ac_c" 1>&6
16497 else
16498   cat > conftest.$ac_ext <<EOF
16499 #line 16500 "configure"
16500 #include "confdefs.h"
16501 #include <$ac_hdr>
16502 EOF
16503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16504 { (eval echo configure:16505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16506 if test -z "$ac_err"; then
16507   rm -rf conftest*
16508   eval "ac_cv_header_$ac_safe=yes"
16509 else
16510   echo "$ac_err" >&5
16511   echo "configure: failed program was:" >&5
16512   cat conftest.$ac_ext >&5
16513   rm -rf conftest*
16514   eval "ac_cv_header_$ac_safe=no"
16515 fi
16516 rm -f conftest*
16517 fi
16518 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16519   echo "$ac_t""yes" 1>&6
16520     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16521   cat >> confdefs.h <<EOF
16522 #define $ac_tr_hdr 1
16523 EOF
16524  
16525 else
16526   echo "$ac_t""no" 1>&6
16527 fi
16528 done
16529
16530 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16531         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16532 echo "configure:16533: checking if Berkeley DB header compatibility" >&5
16533 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16534   echo $ac_n "(cached) $ac_c" 1>&6
16535 else
16536   
16537                 cat > conftest.$ac_ext <<EOF
16538 #line 16539 "configure"
16539 #include "confdefs.h"
16540
16541 #if HAVE_DB_185_H
16542 #       include <db_185.h>
16543 #else
16544 #       include <db.h>
16545 #endif
16546
16547  /* this check could be improved */
16548 #ifndef DB_VERSION_MAJOR
16549 #       define DB_VERSION_MAJOR 1
16550 #endif
16551
16552 #if DB_VERSION_MAJOR == 1 
16553         __db_version_1
16554 #endif
16555
16556 EOF
16557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16558   egrep "__db_version_1" >/dev/null 2>&1; then
16559   rm -rf conftest*
16560   ol_cv_header_db1=yes
16561 else
16562   rm -rf conftest*
16563   ol_cv_header_db1=no
16564 fi
16565 rm -f conftest*
16566
16567 fi
16568
16569 echo "$ac_t""$ol_cv_header_db1" 1>&6
16570
16571         if test $ol_cv_header_db1 = yes ; then
16572                 ol_cv_lib_db=no
16573 if test $ol_cv_lib_db = no ; then
16574         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16575 echo "configure:16576: checking for Berkeley DB link (default)" >&5
16576 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16577   echo $ac_n "(cached) $ac_c" 1>&6
16578 else
16579   
16580         ol_DB_LIB=
16581         ol_LIBS=$LIBS
16582         LIBS="$ol_DB_LIB $LIBS"
16583
16584         cat > conftest.$ac_ext <<EOF
16585 #line 16586 "configure"
16586 #include "confdefs.h"
16587
16588 #ifdef HAVE_DB_185_H
16589 # include <db_185.h>
16590 #else
16591 # include <db.h>
16592 #endif
16593
16594 #ifndef DB_VERSION_MAJOR
16595 # define DB_VERSION_MAJOR 1
16596 #endif
16597
16598 #ifndef NULL
16599 #define NULL ((void*)0)
16600 #endif
16601
16602 int main() {
16603
16604 #if DB_VERSION_MAJOR > 1
16605         {
16606                 char *version;
16607                 int major, minor, patch;
16608
16609                 version = db_version( &major, &minor, &patch );
16610
16611                 if( major != DB_VERSION_MAJOR ||
16612                         minor < DB_VERSION_MINOR )
16613                 {
16614                         printf("Berkeley DB version mismatch\n"
16615                                 "\texpected: %s\n\tgot: %s\n",
16616                                 DB_VERSION_STRING, version);
16617                         return 1;
16618                 }
16619         }
16620 #endif
16621
16622 #if DB_VERSION_MAJOR > 2
16623         db_env_create( NULL, 0 );
16624 #elif DB_VERSION_MAJOR > 1
16625         db_appexit( NULL );
16626 #else
16627         (void) dbopen( NULL, 0, 0, 0, NULL);
16628 #endif
16629
16630 ; return 0; }
16631 EOF
16632 if { (eval echo configure:16633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16633   rm -rf conftest*
16634   ol_cv_db_none=yes
16635 else
16636   echo "configure: failed program was:" >&5
16637   cat conftest.$ac_ext >&5
16638   rm -rf conftest*
16639   ol_cv_db_none=no
16640 fi
16641 rm -f conftest*
16642
16643         LIBS="$ol_LIBS"
16644
16645 fi
16646
16647 echo "$ac_t""$ol_cv_db_none" 1>&6
16648
16649         if test $ol_cv_db_none = yes ; then
16650                 ol_cv_lib_db=yes
16651         fi
16652 fi
16653
16654 if test $ol_cv_lib_db = no ; then
16655         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16656 echo "configure:16657: checking for Berkeley DB link (-ldb4)" >&5
16657 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16658   echo $ac_n "(cached) $ac_c" 1>&6
16659 else
16660   
16661         ol_DB_LIB=-ldb4
16662         ol_LIBS=$LIBS
16663         LIBS="$ol_DB_LIB $LIBS"
16664
16665         cat > conftest.$ac_ext <<EOF
16666 #line 16667 "configure"
16667 #include "confdefs.h"
16668
16669 #ifdef HAVE_DB_185_H
16670 # include <db_185.h>
16671 #else
16672 # include <db.h>
16673 #endif
16674
16675 #ifndef DB_VERSION_MAJOR
16676 # define DB_VERSION_MAJOR 1
16677 #endif
16678
16679 #ifndef NULL
16680 #define NULL ((void*)0)
16681 #endif
16682
16683 int main() {
16684
16685 #if DB_VERSION_MAJOR > 1
16686         {
16687                 char *version;
16688                 int major, minor, patch;
16689
16690                 version = db_version( &major, &minor, &patch );
16691
16692                 if( major != DB_VERSION_MAJOR ||
16693                         minor < DB_VERSION_MINOR )
16694                 {
16695                         printf("Berkeley DB version mismatch\n"
16696                                 "\texpected: %s\n\tgot: %s\n",
16697                                 DB_VERSION_STRING, version);
16698                         return 1;
16699                 }
16700         }
16701 #endif
16702
16703 #if DB_VERSION_MAJOR > 2
16704         db_env_create( NULL, 0 );
16705 #elif DB_VERSION_MAJOR > 1
16706         db_appexit( NULL );
16707 #else
16708         (void) dbopen( NULL, 0, 0, 0, NULL);
16709 #endif
16710
16711 ; return 0; }
16712 EOF
16713 if { (eval echo configure:16714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16714   rm -rf conftest*
16715   ol_cv_db_db4=yes
16716 else
16717   echo "configure: failed program was:" >&5
16718   cat conftest.$ac_ext >&5
16719   rm -rf conftest*
16720   ol_cv_db_db4=no
16721 fi
16722 rm -f conftest*
16723
16724         LIBS="$ol_LIBS"
16725
16726 fi
16727
16728 echo "$ac_t""$ol_cv_db_db4" 1>&6
16729
16730         if test $ol_cv_db_db4 = yes ; then
16731                 ol_cv_lib_db=-ldb4
16732         fi
16733 fi
16734
16735 if test $ol_cv_lib_db = no ; then
16736         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16737 echo "configure:16738: checking for Berkeley DB link (-ldb-4)" >&5
16738 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16739   echo $ac_n "(cached) $ac_c" 1>&6
16740 else
16741   
16742         ol_DB_LIB=-ldb-4
16743         ol_LIBS=$LIBS
16744         LIBS="$ol_DB_LIB $LIBS"
16745
16746         cat > conftest.$ac_ext <<EOF
16747 #line 16748 "configure"
16748 #include "confdefs.h"
16749
16750 #ifdef HAVE_DB_185_H
16751 # include <db_185.h>
16752 #else
16753 # include <db.h>
16754 #endif
16755
16756 #ifndef DB_VERSION_MAJOR
16757 # define DB_VERSION_MAJOR 1
16758 #endif
16759
16760 #ifndef NULL
16761 #define NULL ((void*)0)
16762 #endif
16763
16764 int main() {
16765
16766 #if DB_VERSION_MAJOR > 1
16767         {
16768                 char *version;
16769                 int major, minor, patch;
16770
16771                 version = db_version( &major, &minor, &patch );
16772
16773                 if( major != DB_VERSION_MAJOR ||
16774                         minor < DB_VERSION_MINOR )
16775                 {
16776                         printf("Berkeley DB version mismatch\n"
16777                                 "\texpected: %s\n\tgot: %s\n",
16778                                 DB_VERSION_STRING, version);
16779                         return 1;
16780                 }
16781         }
16782 #endif
16783
16784 #if DB_VERSION_MAJOR > 2
16785         db_env_create( NULL, 0 );
16786 #elif DB_VERSION_MAJOR > 1
16787         db_appexit( NULL );
16788 #else
16789         (void) dbopen( NULL, 0, 0, 0, NULL);
16790 #endif
16791
16792 ; return 0; }
16793 EOF
16794 if { (eval echo configure:16795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16795   rm -rf conftest*
16796   ol_cv_db_db_4=yes
16797 else
16798   echo "configure: failed program was:" >&5
16799   cat conftest.$ac_ext >&5
16800   rm -rf conftest*
16801   ol_cv_db_db_4=no
16802 fi
16803 rm -f conftest*
16804
16805         LIBS="$ol_LIBS"
16806
16807 fi
16808
16809 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16810
16811         if test $ol_cv_db_db_4 = yes ; then
16812                 ol_cv_lib_db=-ldb-4
16813         fi
16814 fi
16815
16816 if test $ol_cv_lib_db = no ; then
16817         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16818 echo "configure:16819: checking for Berkeley DB link (-ldb)" >&5
16819 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16820   echo $ac_n "(cached) $ac_c" 1>&6
16821 else
16822   
16823         ol_DB_LIB=-ldb
16824         ol_LIBS=$LIBS
16825         LIBS="$ol_DB_LIB $LIBS"
16826
16827         cat > conftest.$ac_ext <<EOF
16828 #line 16829 "configure"
16829 #include "confdefs.h"
16830
16831 #ifdef HAVE_DB_185_H
16832 # include <db_185.h>
16833 #else
16834 # include <db.h>
16835 #endif
16836
16837 #ifndef DB_VERSION_MAJOR
16838 # define DB_VERSION_MAJOR 1
16839 #endif
16840
16841 #ifndef NULL
16842 #define NULL ((void*)0)
16843 #endif
16844
16845 int main() {
16846
16847 #if DB_VERSION_MAJOR > 1
16848         {
16849                 char *version;
16850                 int major, minor, patch;
16851
16852                 version = db_version( &major, &minor, &patch );
16853
16854                 if( major != DB_VERSION_MAJOR ||
16855                         minor < DB_VERSION_MINOR )
16856                 {
16857                         printf("Berkeley DB version mismatch\n"
16858                                 "\texpected: %s\n\tgot: %s\n",
16859                                 DB_VERSION_STRING, version);
16860                         return 1;
16861                 }
16862         }
16863 #endif
16864
16865 #if DB_VERSION_MAJOR > 2
16866         db_env_create( NULL, 0 );
16867 #elif DB_VERSION_MAJOR > 1
16868         db_appexit( NULL );
16869 #else
16870         (void) dbopen( NULL, 0, 0, 0, NULL);
16871 #endif
16872
16873 ; return 0; }
16874 EOF
16875 if { (eval echo configure:16876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16876   rm -rf conftest*
16877   ol_cv_db_db=yes
16878 else
16879   echo "configure: failed program was:" >&5
16880   cat conftest.$ac_ext >&5
16881   rm -rf conftest*
16882   ol_cv_db_db=no
16883 fi
16884 rm -f conftest*
16885
16886         LIBS="$ol_LIBS"
16887
16888 fi
16889
16890 echo "$ac_t""$ol_cv_db_db" 1>&6
16891
16892         if test $ol_cv_db_db = yes ; then
16893                 ol_cv_lib_db=-ldb
16894         fi
16895 fi
16896
16897 if test $ol_cv_lib_db = no ; then
16898         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
16899 echo "configure:16900: checking for Berkeley DB link (-ldb3)" >&5
16900 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
16901   echo $ac_n "(cached) $ac_c" 1>&6
16902 else
16903   
16904         ol_DB_LIB=-ldb3
16905         ol_LIBS=$LIBS
16906         LIBS="$ol_DB_LIB $LIBS"
16907
16908         cat > conftest.$ac_ext <<EOF
16909 #line 16910 "configure"
16910 #include "confdefs.h"
16911
16912 #ifdef HAVE_DB_185_H
16913 # include <db_185.h>
16914 #else
16915 # include <db.h>
16916 #endif
16917
16918 #ifndef DB_VERSION_MAJOR
16919 # define DB_VERSION_MAJOR 1
16920 #endif
16921
16922 #ifndef NULL
16923 #define NULL ((void*)0)
16924 #endif
16925
16926 int main() {
16927
16928 #if DB_VERSION_MAJOR > 1
16929         {
16930                 char *version;
16931                 int major, minor, patch;
16932
16933                 version = db_version( &major, &minor, &patch );
16934
16935                 if( major != DB_VERSION_MAJOR ||
16936                         minor < DB_VERSION_MINOR )
16937                 {
16938                         printf("Berkeley DB version mismatch\n"
16939                                 "\texpected: %s\n\tgot: %s\n",
16940                                 DB_VERSION_STRING, version);
16941                         return 1;
16942                 }
16943         }
16944 #endif
16945
16946 #if DB_VERSION_MAJOR > 2
16947         db_env_create( NULL, 0 );
16948 #elif DB_VERSION_MAJOR > 1
16949         db_appexit( NULL );
16950 #else
16951         (void) dbopen( NULL, 0, 0, 0, NULL);
16952 #endif
16953
16954 ; return 0; }
16955 EOF
16956 if { (eval echo configure:16957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16957   rm -rf conftest*
16958   ol_cv_db_db3=yes
16959 else
16960   echo "configure: failed program was:" >&5
16961   cat conftest.$ac_ext >&5
16962   rm -rf conftest*
16963   ol_cv_db_db3=no
16964 fi
16965 rm -f conftest*
16966
16967         LIBS="$ol_LIBS"
16968
16969 fi
16970
16971 echo "$ac_t""$ol_cv_db_db3" 1>&6
16972
16973         if test $ol_cv_db_db3 = yes ; then
16974                 ol_cv_lib_db=-ldb3
16975         fi
16976 fi
16977
16978 if test $ol_cv_lib_db = no ; then
16979         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
16980 echo "configure:16981: checking for Berkeley DB link (-ldb-3)" >&5
16981 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
16982   echo $ac_n "(cached) $ac_c" 1>&6
16983 else
16984   
16985         ol_DB_LIB=-ldb-3
16986         ol_LIBS=$LIBS
16987         LIBS="$ol_DB_LIB $LIBS"
16988
16989         cat > conftest.$ac_ext <<EOF
16990 #line 16991 "configure"
16991 #include "confdefs.h"
16992
16993 #ifdef HAVE_DB_185_H
16994 # include <db_185.h>
16995 #else
16996 # include <db.h>
16997 #endif
16998
16999 #ifndef DB_VERSION_MAJOR
17000 # define DB_VERSION_MAJOR 1
17001 #endif
17002
17003 #ifndef NULL
17004 #define NULL ((void*)0)
17005 #endif
17006
17007 int main() {
17008
17009 #if DB_VERSION_MAJOR > 1
17010         {
17011                 char *version;
17012                 int major, minor, patch;
17013
17014                 version = db_version( &major, &minor, &patch );
17015
17016                 if( major != DB_VERSION_MAJOR ||
17017                         minor < DB_VERSION_MINOR )
17018                 {
17019                         printf("Berkeley DB version mismatch\n"
17020                                 "\texpected: %s\n\tgot: %s\n",
17021                                 DB_VERSION_STRING, version);
17022                         return 1;
17023                 }
17024         }
17025 #endif
17026
17027 #if DB_VERSION_MAJOR > 2
17028         db_env_create( NULL, 0 );
17029 #elif DB_VERSION_MAJOR > 1
17030         db_appexit( NULL );
17031 #else
17032         (void) dbopen( NULL, 0, 0, 0, NULL);
17033 #endif
17034
17035 ; return 0; }
17036 EOF
17037 if { (eval echo configure:17038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17038   rm -rf conftest*
17039   ol_cv_db_db_3=yes
17040 else
17041   echo "configure: failed program was:" >&5
17042   cat conftest.$ac_ext >&5
17043   rm -rf conftest*
17044   ol_cv_db_db_3=no
17045 fi
17046 rm -f conftest*
17047
17048         LIBS="$ol_LIBS"
17049
17050 fi
17051
17052 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17053
17054         if test $ol_cv_db_db_3 = yes ; then
17055                 ol_cv_lib_db=-ldb-3
17056         fi
17057 fi
17058
17059 if test $ol_cv_lib_db = no ; then
17060         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17061 echo "configure:17062: checking for Berkeley DB link (-ldb2)" >&5
17062 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17063   echo $ac_n "(cached) $ac_c" 1>&6
17064 else
17065   
17066         ol_DB_LIB=-ldb2
17067         ol_LIBS=$LIBS
17068         LIBS="$ol_DB_LIB $LIBS"
17069
17070         cat > conftest.$ac_ext <<EOF
17071 #line 17072 "configure"
17072 #include "confdefs.h"
17073
17074 #ifdef HAVE_DB_185_H
17075 # include <db_185.h>
17076 #else
17077 # include <db.h>
17078 #endif
17079
17080 #ifndef DB_VERSION_MAJOR
17081 # define DB_VERSION_MAJOR 1
17082 #endif
17083
17084 #ifndef NULL
17085 #define NULL ((void*)0)
17086 #endif
17087
17088 int main() {
17089
17090 #if DB_VERSION_MAJOR > 1
17091         {
17092                 char *version;
17093                 int major, minor, patch;
17094
17095                 version = db_version( &major, &minor, &patch );
17096
17097                 if( major != DB_VERSION_MAJOR ||
17098                         minor < DB_VERSION_MINOR )
17099                 {
17100                         printf("Berkeley DB version mismatch\n"
17101                                 "\texpected: %s\n\tgot: %s\n",
17102                                 DB_VERSION_STRING, version);
17103                         return 1;
17104                 }
17105         }
17106 #endif
17107
17108 #if DB_VERSION_MAJOR > 2
17109         db_env_create( NULL, 0 );
17110 #elif DB_VERSION_MAJOR > 1
17111         db_appexit( NULL );
17112 #else
17113         (void) dbopen( NULL, 0, 0, 0, NULL);
17114 #endif
17115
17116 ; return 0; }
17117 EOF
17118 if { (eval echo configure:17119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17119   rm -rf conftest*
17120   ol_cv_db_db2=yes
17121 else
17122   echo "configure: failed program was:" >&5
17123   cat conftest.$ac_ext >&5
17124   rm -rf conftest*
17125   ol_cv_db_db2=no
17126 fi
17127 rm -f conftest*
17128
17129         LIBS="$ol_LIBS"
17130
17131 fi
17132
17133 echo "$ac_t""$ol_cv_db_db2" 1>&6
17134
17135         if test $ol_cv_db_db2 = yes ; then
17136                 ol_cv_lib_db=-ldb2
17137         fi
17138 fi
17139
17140 if test $ol_cv_lib_db = no ; then
17141         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17142 echo "configure:17143: checking for Berkeley DB link (-ldb-2)" >&5
17143 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17144   echo $ac_n "(cached) $ac_c" 1>&6
17145 else
17146   
17147         ol_DB_LIB=-ldb-2
17148         ol_LIBS=$LIBS
17149         LIBS="$ol_DB_LIB $LIBS"
17150
17151         cat > conftest.$ac_ext <<EOF
17152 #line 17153 "configure"
17153 #include "confdefs.h"
17154
17155 #ifdef HAVE_DB_185_H
17156 # include <db_185.h>
17157 #else
17158 # include <db.h>
17159 #endif
17160
17161 #ifndef DB_VERSION_MAJOR
17162 # define DB_VERSION_MAJOR 1
17163 #endif
17164
17165 #ifndef NULL
17166 #define NULL ((void*)0)
17167 #endif
17168
17169 int main() {
17170
17171 #if DB_VERSION_MAJOR > 1
17172         {
17173                 char *version;
17174                 int major, minor, patch;
17175
17176                 version = db_version( &major, &minor, &patch );
17177
17178                 if( major != DB_VERSION_MAJOR ||
17179                         minor < DB_VERSION_MINOR )
17180                 {
17181                         printf("Berkeley DB version mismatch\n"
17182                                 "\texpected: %s\n\tgot: %s\n",
17183                                 DB_VERSION_STRING, version);
17184                         return 1;
17185                 }
17186         }
17187 #endif
17188
17189 #if DB_VERSION_MAJOR > 2
17190         db_env_create( NULL, 0 );
17191 #elif DB_VERSION_MAJOR > 1
17192         db_appexit( NULL );
17193 #else
17194         (void) dbopen( NULL, 0, 0, 0, NULL);
17195 #endif
17196
17197 ; return 0; }
17198 EOF
17199 if { (eval echo configure:17200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17200   rm -rf conftest*
17201   ol_cv_db_db_2=yes
17202 else
17203   echo "configure: failed program was:" >&5
17204   cat conftest.$ac_ext >&5
17205   rm -rf conftest*
17206   ol_cv_db_db_2=no
17207 fi
17208 rm -f conftest*
17209
17210         LIBS="$ol_LIBS"
17211
17212 fi
17213
17214 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17215
17216         if test $ol_cv_db_db_2 = yes ; then
17217                 ol_cv_lib_db=-ldb-2
17218         fi
17219 fi
17220
17221 if test $ol_cv_lib_db = no ; then
17222         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17223 echo "configure:17224: checking for Berkeley DB link (-ldb1)" >&5
17224 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17225   echo $ac_n "(cached) $ac_c" 1>&6
17226 else
17227   
17228         ol_DB_LIB=-ldb1
17229         ol_LIBS=$LIBS
17230         LIBS="$ol_DB_LIB $LIBS"
17231
17232         cat > conftest.$ac_ext <<EOF
17233 #line 17234 "configure"
17234 #include "confdefs.h"
17235
17236 #ifdef HAVE_DB_185_H
17237 # include <db_185.h>
17238 #else
17239 # include <db.h>
17240 #endif
17241
17242 #ifndef DB_VERSION_MAJOR
17243 # define DB_VERSION_MAJOR 1
17244 #endif
17245
17246 #ifndef NULL
17247 #define NULL ((void*)0)
17248 #endif
17249
17250 int main() {
17251
17252 #if DB_VERSION_MAJOR > 1
17253         {
17254                 char *version;
17255                 int major, minor, patch;
17256
17257                 version = db_version( &major, &minor, &patch );
17258
17259                 if( major != DB_VERSION_MAJOR ||
17260                         minor < DB_VERSION_MINOR )
17261                 {
17262                         printf("Berkeley DB version mismatch\n"
17263                                 "\texpected: %s\n\tgot: %s\n",
17264                                 DB_VERSION_STRING, version);
17265                         return 1;
17266                 }
17267         }
17268 #endif
17269
17270 #if DB_VERSION_MAJOR > 2
17271         db_env_create( NULL, 0 );
17272 #elif DB_VERSION_MAJOR > 1
17273         db_appexit( NULL );
17274 #else
17275         (void) dbopen( NULL, 0, 0, 0, NULL);
17276 #endif
17277
17278 ; return 0; }
17279 EOF
17280 if { (eval echo configure:17281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17281   rm -rf conftest*
17282   ol_cv_db_db1=yes
17283 else
17284   echo "configure: failed program was:" >&5
17285   cat conftest.$ac_ext >&5
17286   rm -rf conftest*
17287   ol_cv_db_db1=no
17288 fi
17289 rm -f conftest*
17290
17291         LIBS="$ol_LIBS"
17292
17293 fi
17294
17295 echo "$ac_t""$ol_cv_db_db1" 1>&6
17296
17297         if test $ol_cv_db_db1 = yes ; then
17298                 ol_cv_lib_db=-ldb1
17299         fi
17300 fi
17301
17302 if test $ol_cv_lib_db = no ; then
17303         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17304 echo "configure:17305: checking for Berkeley DB link (-ldb-1)" >&5
17305 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17306   echo $ac_n "(cached) $ac_c" 1>&6
17307 else
17308   
17309         ol_DB_LIB=-ldb-1
17310         ol_LIBS=$LIBS
17311         LIBS="$ol_DB_LIB $LIBS"
17312
17313         cat > conftest.$ac_ext <<EOF
17314 #line 17315 "configure"
17315 #include "confdefs.h"
17316
17317 #ifdef HAVE_DB_185_H
17318 # include <db_185.h>
17319 #else
17320 # include <db.h>
17321 #endif
17322
17323 #ifndef DB_VERSION_MAJOR
17324 # define DB_VERSION_MAJOR 1
17325 #endif
17326
17327 #ifndef NULL
17328 #define NULL ((void*)0)
17329 #endif
17330
17331 int main() {
17332
17333 #if DB_VERSION_MAJOR > 1
17334         {
17335                 char *version;
17336                 int major, minor, patch;
17337
17338                 version = db_version( &major, &minor, &patch );
17339
17340                 if( major != DB_VERSION_MAJOR ||
17341                         minor < DB_VERSION_MINOR )
17342                 {
17343                         printf("Berkeley DB version mismatch\n"
17344                                 "\texpected: %s\n\tgot: %s\n",
17345                                 DB_VERSION_STRING, version);
17346                         return 1;
17347                 }
17348         }
17349 #endif
17350
17351 #if DB_VERSION_MAJOR > 2
17352         db_env_create( NULL, 0 );
17353 #elif DB_VERSION_MAJOR > 1
17354         db_appexit( NULL );
17355 #else
17356         (void) dbopen( NULL, 0, 0, 0, NULL);
17357 #endif
17358
17359 ; return 0; }
17360 EOF
17361 if { (eval echo configure:17362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17362   rm -rf conftest*
17363   ol_cv_db_db_1=yes
17364 else
17365   echo "configure: failed program was:" >&5
17366   cat conftest.$ac_ext >&5
17367   rm -rf conftest*
17368   ol_cv_db_db_1=no
17369 fi
17370 rm -f conftest*
17371
17372         LIBS="$ol_LIBS"
17373
17374 fi
17375
17376 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17377
17378         if test $ol_cv_db_db_1 = yes ; then
17379                 ol_cv_lib_db=-ldb-1
17380         fi
17381 fi
17382
17383
17384                 if test "$ol_cv_lib_db" != no ; then
17385                         ol_cv_berkeley_db=yes
17386                 fi
17387         fi
17388 fi
17389
17390         else
17391                 ol_cv_berkeley_db=no
17392 for ac_hdr in db.h
17393 do
17394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17396 echo "configure:17397: checking for $ac_hdr" >&5
17397 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17398   echo $ac_n "(cached) $ac_c" 1>&6
17399 else
17400   cat > conftest.$ac_ext <<EOF
17401 #line 17402 "configure"
17402 #include "confdefs.h"
17403 #include <$ac_hdr>
17404 EOF
17405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17406 { (eval echo configure:17407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17408 if test -z "$ac_err"; then
17409   rm -rf conftest*
17410   eval "ac_cv_header_$ac_safe=yes"
17411 else
17412   echo "$ac_err" >&5
17413   echo "configure: failed program was:" >&5
17414   cat conftest.$ac_ext >&5
17415   rm -rf conftest*
17416   eval "ac_cv_header_$ac_safe=no"
17417 fi
17418 rm -f conftest*
17419 fi
17420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17421   echo "$ac_t""yes" 1>&6
17422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17423   cat >> confdefs.h <<EOF
17424 #define $ac_tr_hdr 1
17425 EOF
17426  
17427 else
17428   echo "$ac_t""no" 1>&6
17429 fi
17430 done
17431
17432 if test $ac_cv_header_db_h = yes; then
17433         ol_cv_lib_db=no
17434 if test $ol_cv_lib_db = no ; then
17435         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17436 echo "configure:17437: checking for Berkeley DB link (default)" >&5
17437 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17438   echo $ac_n "(cached) $ac_c" 1>&6
17439 else
17440   
17441         ol_DB_LIB=
17442         ol_LIBS=$LIBS
17443         LIBS="$ol_DB_LIB $LIBS"
17444
17445         cat > conftest.$ac_ext <<EOF
17446 #line 17447 "configure"
17447 #include "confdefs.h"
17448
17449 #ifdef HAVE_DB_185_H
17450 # include <db_185.h>
17451 #else
17452 # include <db.h>
17453 #endif
17454
17455 #ifndef DB_VERSION_MAJOR
17456 # define DB_VERSION_MAJOR 1
17457 #endif
17458
17459 #ifndef NULL
17460 #define NULL ((void*)0)
17461 #endif
17462
17463 int main() {
17464
17465 #if DB_VERSION_MAJOR > 1
17466         {
17467                 char *version;
17468                 int major, minor, patch;
17469
17470                 version = db_version( &major, &minor, &patch );
17471
17472                 if( major != DB_VERSION_MAJOR ||
17473                         minor < DB_VERSION_MINOR )
17474                 {
17475                         printf("Berkeley DB version mismatch\n"
17476                                 "\texpected: %s\n\tgot: %s\n",
17477                                 DB_VERSION_STRING, version);
17478                         return 1;
17479                 }
17480         }
17481 #endif
17482
17483 #if DB_VERSION_MAJOR > 2
17484         db_env_create( NULL, 0 );
17485 #elif DB_VERSION_MAJOR > 1
17486         db_appexit( NULL );
17487 #else
17488         (void) dbopen( NULL, 0, 0, 0, NULL);
17489 #endif
17490
17491 ; return 0; }
17492 EOF
17493 if { (eval echo configure:17494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17494   rm -rf conftest*
17495   ol_cv_db_none=yes
17496 else
17497   echo "configure: failed program was:" >&5
17498   cat conftest.$ac_ext >&5
17499   rm -rf conftest*
17500   ol_cv_db_none=no
17501 fi
17502 rm -f conftest*
17503
17504         LIBS="$ol_LIBS"
17505
17506 fi
17507
17508 echo "$ac_t""$ol_cv_db_none" 1>&6
17509
17510         if test $ol_cv_db_none = yes ; then
17511                 ol_cv_lib_db=yes
17512         fi
17513 fi
17514
17515 if test $ol_cv_lib_db = no ; then
17516         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17517 echo "configure:17518: checking for Berkeley DB link (-ldb4)" >&5
17518 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17519   echo $ac_n "(cached) $ac_c" 1>&6
17520 else
17521   
17522         ol_DB_LIB=-ldb4
17523         ol_LIBS=$LIBS
17524         LIBS="$ol_DB_LIB $LIBS"
17525
17526         cat > conftest.$ac_ext <<EOF
17527 #line 17528 "configure"
17528 #include "confdefs.h"
17529
17530 #ifdef HAVE_DB_185_H
17531 # include <db_185.h>
17532 #else
17533 # include <db.h>
17534 #endif
17535
17536 #ifndef DB_VERSION_MAJOR
17537 # define DB_VERSION_MAJOR 1
17538 #endif
17539
17540 #ifndef NULL
17541 #define NULL ((void*)0)
17542 #endif
17543
17544 int main() {
17545
17546 #if DB_VERSION_MAJOR > 1
17547         {
17548                 char *version;
17549                 int major, minor, patch;
17550
17551                 version = db_version( &major, &minor, &patch );
17552
17553                 if( major != DB_VERSION_MAJOR ||
17554                         minor < DB_VERSION_MINOR )
17555                 {
17556                         printf("Berkeley DB version mismatch\n"
17557                                 "\texpected: %s\n\tgot: %s\n",
17558                                 DB_VERSION_STRING, version);
17559                         return 1;
17560                 }
17561         }
17562 #endif
17563
17564 #if DB_VERSION_MAJOR > 2
17565         db_env_create( NULL, 0 );
17566 #elif DB_VERSION_MAJOR > 1
17567         db_appexit( NULL );
17568 #else
17569         (void) dbopen( NULL, 0, 0, 0, NULL);
17570 #endif
17571
17572 ; return 0; }
17573 EOF
17574 if { (eval echo configure:17575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17575   rm -rf conftest*
17576   ol_cv_db_db4=yes
17577 else
17578   echo "configure: failed program was:" >&5
17579   cat conftest.$ac_ext >&5
17580   rm -rf conftest*
17581   ol_cv_db_db4=no
17582 fi
17583 rm -f conftest*
17584
17585         LIBS="$ol_LIBS"
17586
17587 fi
17588
17589 echo "$ac_t""$ol_cv_db_db4" 1>&6
17590
17591         if test $ol_cv_db_db4 = yes ; then
17592                 ol_cv_lib_db=-ldb4
17593         fi
17594 fi
17595
17596 if test $ol_cv_lib_db = no ; then
17597         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17598 echo "configure:17599: checking for Berkeley DB link (-ldb-4)" >&5
17599 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17600   echo $ac_n "(cached) $ac_c" 1>&6
17601 else
17602   
17603         ol_DB_LIB=-ldb-4
17604         ol_LIBS=$LIBS
17605         LIBS="$ol_DB_LIB $LIBS"
17606
17607         cat > conftest.$ac_ext <<EOF
17608 #line 17609 "configure"
17609 #include "confdefs.h"
17610
17611 #ifdef HAVE_DB_185_H
17612 # include <db_185.h>
17613 #else
17614 # include <db.h>
17615 #endif
17616
17617 #ifndef DB_VERSION_MAJOR
17618 # define DB_VERSION_MAJOR 1
17619 #endif
17620
17621 #ifndef NULL
17622 #define NULL ((void*)0)
17623 #endif
17624
17625 int main() {
17626
17627 #if DB_VERSION_MAJOR > 1
17628         {
17629                 char *version;
17630                 int major, minor, patch;
17631
17632                 version = db_version( &major, &minor, &patch );
17633
17634                 if( major != DB_VERSION_MAJOR ||
17635                         minor < DB_VERSION_MINOR )
17636                 {
17637                         printf("Berkeley DB version mismatch\n"
17638                                 "\texpected: %s\n\tgot: %s\n",
17639                                 DB_VERSION_STRING, version);
17640                         return 1;
17641                 }
17642         }
17643 #endif
17644
17645 #if DB_VERSION_MAJOR > 2
17646         db_env_create( NULL, 0 );
17647 #elif DB_VERSION_MAJOR > 1
17648         db_appexit( NULL );
17649 #else
17650         (void) dbopen( NULL, 0, 0, 0, NULL);
17651 #endif
17652
17653 ; return 0; }
17654 EOF
17655 if { (eval echo configure:17656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17656   rm -rf conftest*
17657   ol_cv_db_db_4=yes
17658 else
17659   echo "configure: failed program was:" >&5
17660   cat conftest.$ac_ext >&5
17661   rm -rf conftest*
17662   ol_cv_db_db_4=no
17663 fi
17664 rm -f conftest*
17665
17666         LIBS="$ol_LIBS"
17667
17668 fi
17669
17670 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17671
17672         if test $ol_cv_db_db_4 = yes ; then
17673                 ol_cv_lib_db=-ldb-4
17674         fi
17675 fi
17676
17677 if test $ol_cv_lib_db = no ; then
17678         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17679 echo "configure:17680: checking for Berkeley DB link (-ldb)" >&5
17680 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17681   echo $ac_n "(cached) $ac_c" 1>&6
17682 else
17683   
17684         ol_DB_LIB=-ldb
17685         ol_LIBS=$LIBS
17686         LIBS="$ol_DB_LIB $LIBS"
17687
17688         cat > conftest.$ac_ext <<EOF
17689 #line 17690 "configure"
17690 #include "confdefs.h"
17691
17692 #ifdef HAVE_DB_185_H
17693 # include <db_185.h>
17694 #else
17695 # include <db.h>
17696 #endif
17697
17698 #ifndef DB_VERSION_MAJOR
17699 # define DB_VERSION_MAJOR 1
17700 #endif
17701
17702 #ifndef NULL
17703 #define NULL ((void*)0)
17704 #endif
17705
17706 int main() {
17707
17708 #if DB_VERSION_MAJOR > 1
17709         {
17710                 char *version;
17711                 int major, minor, patch;
17712
17713                 version = db_version( &major, &minor, &patch );
17714
17715                 if( major != DB_VERSION_MAJOR ||
17716                         minor < DB_VERSION_MINOR )
17717                 {
17718                         printf("Berkeley DB version mismatch\n"
17719                                 "\texpected: %s\n\tgot: %s\n",
17720                                 DB_VERSION_STRING, version);
17721                         return 1;
17722                 }
17723         }
17724 #endif
17725
17726 #if DB_VERSION_MAJOR > 2
17727         db_env_create( NULL, 0 );
17728 #elif DB_VERSION_MAJOR > 1
17729         db_appexit( NULL );
17730 #else
17731         (void) dbopen( NULL, 0, 0, 0, NULL);
17732 #endif
17733
17734 ; return 0; }
17735 EOF
17736 if { (eval echo configure:17737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17737   rm -rf conftest*
17738   ol_cv_db_db=yes
17739 else
17740   echo "configure: failed program was:" >&5
17741   cat conftest.$ac_ext >&5
17742   rm -rf conftest*
17743   ol_cv_db_db=no
17744 fi
17745 rm -f conftest*
17746
17747         LIBS="$ol_LIBS"
17748
17749 fi
17750
17751 echo "$ac_t""$ol_cv_db_db" 1>&6
17752
17753         if test $ol_cv_db_db = yes ; then
17754                 ol_cv_lib_db=-ldb
17755         fi
17756 fi
17757
17758 if test $ol_cv_lib_db = no ; then
17759         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17760 echo "configure:17761: checking for Berkeley DB link (-ldb3)" >&5
17761 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17762   echo $ac_n "(cached) $ac_c" 1>&6
17763 else
17764   
17765         ol_DB_LIB=-ldb3
17766         ol_LIBS=$LIBS
17767         LIBS="$ol_DB_LIB $LIBS"
17768
17769         cat > conftest.$ac_ext <<EOF
17770 #line 17771 "configure"
17771 #include "confdefs.h"
17772
17773 #ifdef HAVE_DB_185_H
17774 # include <db_185.h>
17775 #else
17776 # include <db.h>
17777 #endif
17778
17779 #ifndef DB_VERSION_MAJOR
17780 # define DB_VERSION_MAJOR 1
17781 #endif
17782
17783 #ifndef NULL
17784 #define NULL ((void*)0)
17785 #endif
17786
17787 int main() {
17788
17789 #if DB_VERSION_MAJOR > 1
17790         {
17791                 char *version;
17792                 int major, minor, patch;
17793
17794                 version = db_version( &major, &minor, &patch );
17795
17796                 if( major != DB_VERSION_MAJOR ||
17797                         minor < DB_VERSION_MINOR )
17798                 {
17799                         printf("Berkeley DB version mismatch\n"
17800                                 "\texpected: %s\n\tgot: %s\n",
17801                                 DB_VERSION_STRING, version);
17802                         return 1;
17803                 }
17804         }
17805 #endif
17806
17807 #if DB_VERSION_MAJOR > 2
17808         db_env_create( NULL, 0 );
17809 #elif DB_VERSION_MAJOR > 1
17810         db_appexit( NULL );
17811 #else
17812         (void) dbopen( NULL, 0, 0, 0, NULL);
17813 #endif
17814
17815 ; return 0; }
17816 EOF
17817 if { (eval echo configure:17818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17818   rm -rf conftest*
17819   ol_cv_db_db3=yes
17820 else
17821   echo "configure: failed program was:" >&5
17822   cat conftest.$ac_ext >&5
17823   rm -rf conftest*
17824   ol_cv_db_db3=no
17825 fi
17826 rm -f conftest*
17827
17828         LIBS="$ol_LIBS"
17829
17830 fi
17831
17832 echo "$ac_t""$ol_cv_db_db3" 1>&6
17833
17834         if test $ol_cv_db_db3 = yes ; then
17835                 ol_cv_lib_db=-ldb3
17836         fi
17837 fi
17838
17839 if test $ol_cv_lib_db = no ; then
17840         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17841 echo "configure:17842: checking for Berkeley DB link (-ldb-3)" >&5
17842 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17843   echo $ac_n "(cached) $ac_c" 1>&6
17844 else
17845   
17846         ol_DB_LIB=-ldb-3
17847         ol_LIBS=$LIBS
17848         LIBS="$ol_DB_LIB $LIBS"
17849
17850         cat > conftest.$ac_ext <<EOF
17851 #line 17852 "configure"
17852 #include "confdefs.h"
17853
17854 #ifdef HAVE_DB_185_H
17855 # include <db_185.h>
17856 #else
17857 # include <db.h>
17858 #endif
17859
17860 #ifndef DB_VERSION_MAJOR
17861 # define DB_VERSION_MAJOR 1
17862 #endif
17863
17864 #ifndef NULL
17865 #define NULL ((void*)0)
17866 #endif
17867
17868 int main() {
17869
17870 #if DB_VERSION_MAJOR > 1
17871         {
17872                 char *version;
17873                 int major, minor, patch;
17874
17875                 version = db_version( &major, &minor, &patch );
17876
17877                 if( major != DB_VERSION_MAJOR ||
17878                         minor < DB_VERSION_MINOR )
17879                 {
17880                         printf("Berkeley DB version mismatch\n"
17881                                 "\texpected: %s\n\tgot: %s\n",
17882                                 DB_VERSION_STRING, version);
17883                         return 1;
17884                 }
17885         }
17886 #endif
17887
17888 #if DB_VERSION_MAJOR > 2
17889         db_env_create( NULL, 0 );
17890 #elif DB_VERSION_MAJOR > 1
17891         db_appexit( NULL );
17892 #else
17893         (void) dbopen( NULL, 0, 0, 0, NULL);
17894 #endif
17895
17896 ; return 0; }
17897 EOF
17898 if { (eval echo configure:17899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17899   rm -rf conftest*
17900   ol_cv_db_db_3=yes
17901 else
17902   echo "configure: failed program was:" >&5
17903   cat conftest.$ac_ext >&5
17904   rm -rf conftest*
17905   ol_cv_db_db_3=no
17906 fi
17907 rm -f conftest*
17908
17909         LIBS="$ol_LIBS"
17910
17911 fi
17912
17913 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17914
17915         if test $ol_cv_db_db_3 = yes ; then
17916                 ol_cv_lib_db=-ldb-3
17917         fi
17918 fi
17919
17920 if test $ol_cv_lib_db = no ; then
17921         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17922 echo "configure:17923: checking for Berkeley DB link (-ldb2)" >&5
17923 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17924   echo $ac_n "(cached) $ac_c" 1>&6
17925 else
17926   
17927         ol_DB_LIB=-ldb2
17928         ol_LIBS=$LIBS
17929         LIBS="$ol_DB_LIB $LIBS"
17930
17931         cat > conftest.$ac_ext <<EOF
17932 #line 17933 "configure"
17933 #include "confdefs.h"
17934
17935 #ifdef HAVE_DB_185_H
17936 # include <db_185.h>
17937 #else
17938 # include <db.h>
17939 #endif
17940
17941 #ifndef DB_VERSION_MAJOR
17942 # define DB_VERSION_MAJOR 1
17943 #endif
17944
17945 #ifndef NULL
17946 #define NULL ((void*)0)
17947 #endif
17948
17949 int main() {
17950
17951 #if DB_VERSION_MAJOR > 1
17952         {
17953                 char *version;
17954                 int major, minor, patch;
17955
17956                 version = db_version( &major, &minor, &patch );
17957
17958                 if( major != DB_VERSION_MAJOR ||
17959                         minor < DB_VERSION_MINOR )
17960                 {
17961                         printf("Berkeley DB version mismatch\n"
17962                                 "\texpected: %s\n\tgot: %s\n",
17963                                 DB_VERSION_STRING, version);
17964                         return 1;
17965                 }
17966         }
17967 #endif
17968
17969 #if DB_VERSION_MAJOR > 2
17970         db_env_create( NULL, 0 );
17971 #elif DB_VERSION_MAJOR > 1
17972         db_appexit( NULL );
17973 #else
17974         (void) dbopen( NULL, 0, 0, 0, NULL);
17975 #endif
17976
17977 ; return 0; }
17978 EOF
17979 if { (eval echo configure:17980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17980   rm -rf conftest*
17981   ol_cv_db_db2=yes
17982 else
17983   echo "configure: failed program was:" >&5
17984   cat conftest.$ac_ext >&5
17985   rm -rf conftest*
17986   ol_cv_db_db2=no
17987 fi
17988 rm -f conftest*
17989
17990         LIBS="$ol_LIBS"
17991
17992 fi
17993
17994 echo "$ac_t""$ol_cv_db_db2" 1>&6
17995
17996         if test $ol_cv_db_db2 = yes ; then
17997                 ol_cv_lib_db=-ldb2
17998         fi
17999 fi
18000
18001 if test $ol_cv_lib_db = no ; then
18002         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18003 echo "configure:18004: checking for Berkeley DB link (-ldb-2)" >&5
18004 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18005   echo $ac_n "(cached) $ac_c" 1>&6
18006 else
18007   
18008         ol_DB_LIB=-ldb-2
18009         ol_LIBS=$LIBS
18010         LIBS="$ol_DB_LIB $LIBS"
18011
18012         cat > conftest.$ac_ext <<EOF
18013 #line 18014 "configure"
18014 #include "confdefs.h"
18015
18016 #ifdef HAVE_DB_185_H
18017 # include <db_185.h>
18018 #else
18019 # include <db.h>
18020 #endif
18021
18022 #ifndef DB_VERSION_MAJOR
18023 # define DB_VERSION_MAJOR 1
18024 #endif
18025
18026 #ifndef NULL
18027 #define NULL ((void*)0)
18028 #endif
18029
18030 int main() {
18031
18032 #if DB_VERSION_MAJOR > 1
18033         {
18034                 char *version;
18035                 int major, minor, patch;
18036
18037                 version = db_version( &major, &minor, &patch );
18038
18039                 if( major != DB_VERSION_MAJOR ||
18040                         minor < DB_VERSION_MINOR )
18041                 {
18042                         printf("Berkeley DB version mismatch\n"
18043                                 "\texpected: %s\n\tgot: %s\n",
18044                                 DB_VERSION_STRING, version);
18045                         return 1;
18046                 }
18047         }
18048 #endif
18049
18050 #if DB_VERSION_MAJOR > 2
18051         db_env_create( NULL, 0 );
18052 #elif DB_VERSION_MAJOR > 1
18053         db_appexit( NULL );
18054 #else
18055         (void) dbopen( NULL, 0, 0, 0, NULL);
18056 #endif
18057
18058 ; return 0; }
18059 EOF
18060 if { (eval echo configure:18061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18061   rm -rf conftest*
18062   ol_cv_db_db_2=yes
18063 else
18064   echo "configure: failed program was:" >&5
18065   cat conftest.$ac_ext >&5
18066   rm -rf conftest*
18067   ol_cv_db_db_2=no
18068 fi
18069 rm -f conftest*
18070
18071         LIBS="$ol_LIBS"
18072
18073 fi
18074
18075 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18076
18077         if test $ol_cv_db_db_2 = yes ; then
18078                 ol_cv_lib_db=-ldb-2
18079         fi
18080 fi
18081
18082 if test $ol_cv_lib_db = no ; then
18083         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18084 echo "configure:18085: checking for Berkeley DB link (-ldb1)" >&5
18085 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18086   echo $ac_n "(cached) $ac_c" 1>&6
18087 else
18088   
18089         ol_DB_LIB=-ldb1
18090         ol_LIBS=$LIBS
18091         LIBS="$ol_DB_LIB $LIBS"
18092
18093         cat > conftest.$ac_ext <<EOF
18094 #line 18095 "configure"
18095 #include "confdefs.h"
18096
18097 #ifdef HAVE_DB_185_H
18098 # include <db_185.h>
18099 #else
18100 # include <db.h>
18101 #endif
18102
18103 #ifndef DB_VERSION_MAJOR
18104 # define DB_VERSION_MAJOR 1
18105 #endif
18106
18107 #ifndef NULL
18108 #define NULL ((void*)0)
18109 #endif
18110
18111 int main() {
18112
18113 #if DB_VERSION_MAJOR > 1
18114         {
18115                 char *version;
18116                 int major, minor, patch;
18117
18118                 version = db_version( &major, &minor, &patch );
18119
18120                 if( major != DB_VERSION_MAJOR ||
18121                         minor < DB_VERSION_MINOR )
18122                 {
18123                         printf("Berkeley DB version mismatch\n"
18124                                 "\texpected: %s\n\tgot: %s\n",
18125                                 DB_VERSION_STRING, version);
18126                         return 1;
18127                 }
18128         }
18129 #endif
18130
18131 #if DB_VERSION_MAJOR > 2
18132         db_env_create( NULL, 0 );
18133 #elif DB_VERSION_MAJOR > 1
18134         db_appexit( NULL );
18135 #else
18136         (void) dbopen( NULL, 0, 0, 0, NULL);
18137 #endif
18138
18139 ; return 0; }
18140 EOF
18141 if { (eval echo configure:18142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18142   rm -rf conftest*
18143   ol_cv_db_db1=yes
18144 else
18145   echo "configure: failed program was:" >&5
18146   cat conftest.$ac_ext >&5
18147   rm -rf conftest*
18148   ol_cv_db_db1=no
18149 fi
18150 rm -f conftest*
18151
18152         LIBS="$ol_LIBS"
18153
18154 fi
18155
18156 echo "$ac_t""$ol_cv_db_db1" 1>&6
18157
18158         if test $ol_cv_db_db1 = yes ; then
18159                 ol_cv_lib_db=-ldb1
18160         fi
18161 fi
18162
18163 if test $ol_cv_lib_db = no ; then
18164         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18165 echo "configure:18166: checking for Berkeley DB link (-ldb-1)" >&5
18166 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18167   echo $ac_n "(cached) $ac_c" 1>&6
18168 else
18169   
18170         ol_DB_LIB=-ldb-1
18171         ol_LIBS=$LIBS
18172         LIBS="$ol_DB_LIB $LIBS"
18173
18174         cat > conftest.$ac_ext <<EOF
18175 #line 18176 "configure"
18176 #include "confdefs.h"
18177
18178 #ifdef HAVE_DB_185_H
18179 # include <db_185.h>
18180 #else
18181 # include <db.h>
18182 #endif
18183
18184 #ifndef DB_VERSION_MAJOR
18185 # define DB_VERSION_MAJOR 1
18186 #endif
18187
18188 #ifndef NULL
18189 #define NULL ((void*)0)
18190 #endif
18191
18192 int main() {
18193
18194 #if DB_VERSION_MAJOR > 1
18195         {
18196                 char *version;
18197                 int major, minor, patch;
18198
18199                 version = db_version( &major, &minor, &patch );
18200
18201                 if( major != DB_VERSION_MAJOR ||
18202                         minor < DB_VERSION_MINOR )
18203                 {
18204                         printf("Berkeley DB version mismatch\n"
18205                                 "\texpected: %s\n\tgot: %s\n",
18206                                 DB_VERSION_STRING, version);
18207                         return 1;
18208                 }
18209         }
18210 #endif
18211
18212 #if DB_VERSION_MAJOR > 2
18213         db_env_create( NULL, 0 );
18214 #elif DB_VERSION_MAJOR > 1
18215         db_appexit( NULL );
18216 #else
18217         (void) dbopen( NULL, 0, 0, 0, NULL);
18218 #endif
18219
18220 ; return 0; }
18221 EOF
18222 if { (eval echo configure:18223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18223   rm -rf conftest*
18224   ol_cv_db_db_1=yes
18225 else
18226   echo "configure: failed program was:" >&5
18227   cat conftest.$ac_ext >&5
18228   rm -rf conftest*
18229   ol_cv_db_db_1=no
18230 fi
18231 rm -f conftest*
18232
18233         LIBS="$ol_LIBS"
18234
18235 fi
18236
18237 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18238
18239         if test $ol_cv_db_db_1 = yes ; then
18240                 ol_cv_lib_db=-ldb-1
18241         fi
18242 fi
18243
18244
18245         if test "$ol_cv_lib_db" != no ; then
18246                 ol_cv_berkeley_db=yes
18247                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18248 echo "configure:18249: checking for Berkeley DB thread support" >&5
18249 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18250   echo $ac_n "(cached) $ac_c" 1>&6
18251 else
18252   
18253         ol_LIBS="$LIBS"
18254         if test $ol_cv_lib_db != yes ; then
18255                 LIBS="$ol_cv_lib_db"
18256         fi
18257
18258         if test "$cross_compiling" = yes; then
18259   ol_cv_berkeley_db_thread=cross
18260 else
18261   cat > conftest.$ac_ext <<EOF
18262 #line 18263 "configure"
18263 #include "confdefs.h"
18264
18265 #ifdef HAVE_DB_185_H
18266         choke me;
18267 #else
18268 #include <db.h>
18269 #endif
18270 #ifndef NULL
18271 #define NULL ((void *)0)
18272 #endif
18273 main()
18274 {
18275         int rc;
18276         u_int32_t flags = DB_CREATE |
18277 #ifdef DB_PRIVATE
18278                 DB_PRIVATE |
18279 #endif
18280                 DB_THREAD;
18281
18282 #if DB_VERSION_MAJOR > 2
18283         DB_ENV *env = NULL;
18284
18285         rc = db_env_create( &env, 0 );
18286
18287         flags |= DB_INIT_MPOOL;
18288 #ifdef DB_MPOOL_PRIVATE
18289         flags |= DB_MPOOL_PRIVATE;
18290 #endif
18291
18292         if( rc ) {
18293                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18294                 return rc;
18295         }
18296
18297 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18298         rc = env->open( env, NULL, flags, 0 );
18299 #else
18300         rc = env->open( env, NULL, NULL, flags, 0 );
18301 #endif
18302
18303         if ( rc == 0 ) {
18304                 rc = env->close( env, 0 );
18305         }
18306
18307         if( rc ) {
18308                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18309                 return rc;
18310         }
18311
18312 #else
18313         DB_ENV env;
18314         memset( &env, '\0', sizeof(env) );
18315
18316         rc = db_appinit( NULL, NULL, &env, flags );
18317
18318         if( rc == 0 ) {
18319                 db_appexit( &env );
18320         }
18321
18322         unlink("__db_mpool.share");
18323         unlink("__db_lock.share");
18324 #endif
18325
18326         return rc;
18327 }
18328 EOF
18329 if { (eval echo configure:18330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18330 then
18331   ol_cv_berkeley_db_thread=yes
18332 else
18333   echo "configure: failed program was:" >&5
18334   cat conftest.$ac_ext >&5
18335   rm -fr conftest*
18336   ol_cv_berkeley_db_thread=no
18337 fi
18338 rm -fr conftest*
18339 fi
18340
18341
18342         LIBS="$ol_LIBS"
18343
18344 fi
18345
18346 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18347
18348         if test $ol_cv_berkeley_db_thread != no ; then
18349                 cat >> confdefs.h <<\EOF
18350 #define HAVE_BERKELEY_DB_THREAD 1
18351 EOF
18352
18353         fi
18354
18355         fi
18356 fi
18357
18358         fi
18359
18360         if test $ol_cv_berkeley_db != no ; then
18361                 cat >> confdefs.h <<\EOF
18362 #define HAVE_BERKELEY_DB 1
18363 EOF
18364
18365
18366                 ol_link_ldbm=berkeley
18367                 ol_with_ldbm_api=berkeley
18368
18369                 if test $ol_with_ldbm_type = hash ; then
18370                         cat >> confdefs.h <<\EOF
18371 #define LDBM_USE_DBHASH 1
18372 EOF
18373
18374                 else
18375                         cat >> confdefs.h <<\EOF
18376 #define LDBM_USE_DBBTREE 1
18377 EOF
18378
18379                 fi
18380
18381                                                 if test $ol_cv_lib_db != yes ; then
18382                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18383                 fi
18384         fi
18385 fi
18386
18387 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18388         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18389 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18390         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18391 echo "configure:18392: checking Berkeley DB version for BDB backend" >&5
18392 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18393   echo $ac_n "(cached) $ac_c" 1>&6
18394 else
18395   
18396         cat > conftest.$ac_ext <<EOF
18397 #line 18398 "configure"
18398 #include "confdefs.h"
18399
18400 #include <db.h>
18401
18402  /* this check could be improved */
18403 #ifndef DB_VERSION_MAJOR
18404 #       define DB_VERSION_MAJOR 1
18405 #endif
18406
18407 /* require 4.0 or later */
18408 #if DB_VERSION_MAJOR >= 4 
18409         __db_version_compat
18410 #endif
18411         
18412 EOF
18413 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18414   egrep "__db_version_compat" >/dev/null 2>&1; then
18415   rm -rf conftest*
18416   ol_cv_bdb_compat=yes
18417 else
18418   rm -rf conftest*
18419   ol_cv_bdb_compat=no
18420 fi
18421 rm -f conftest*
18422
18423 fi
18424
18425 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18426
18427
18428         if test $ol_cv_bdb_compat = yes ; then
18429                 ol_enable_bdb=yes
18430         elif test $ol_enable_bdb = yes ; then
18431                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18432         else
18433                 ol_enable_bdb=no
18434         fi
18435 fi
18436
18437 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18438         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18439         ol_with_ldbm_api=none
18440 fi
18441
18442 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18443         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18444 echo "configure:18445: checking for MDBM library" >&5
18445 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18446   echo $ac_n "(cached) $ac_c" 1>&6
18447 else
18448         ol_LIBS="$LIBS"
18449         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18450 echo "configure:18451: checking for mdbm_set_chain" >&5
18451 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18452   echo $ac_n "(cached) $ac_c" 1>&6
18453 else
18454   cat > conftest.$ac_ext <<EOF
18455 #line 18456 "configure"
18456 #include "confdefs.h"
18457 /* System header to define __stub macros and hopefully few prototypes,
18458     which can conflict with char mdbm_set_chain(); below.  */
18459 #include <assert.h>
18460 /* Override any gcc2 internal prototype to avoid an error.  */
18461 /* We use char because int might match the return type of a gcc2
18462     builtin and then its argument prototype would still apply.  */
18463 char mdbm_set_chain();
18464 char (*f)();
18465
18466 int main() {
18467
18468 /* The GNU C library defines this for functions which it implements
18469     to always fail with ENOSYS.  Some functions are actually named
18470     something starting with __ and the normal name is an alias.  */
18471 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18472 choke me
18473 #else
18474 f = mdbm_set_chain;
18475 #endif
18476
18477 ; return 0; }
18478 EOF
18479 if { (eval echo configure:18480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18480   rm -rf conftest*
18481   eval "ac_cv_func_mdbm_set_chain=yes"
18482 else
18483   echo "configure: failed program was:" >&5
18484   cat conftest.$ac_ext >&5
18485   rm -rf conftest*
18486   eval "ac_cv_func_mdbm_set_chain=no"
18487 fi
18488 rm -f conftest*
18489 fi
18490
18491 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18492   echo "$ac_t""yes" 1>&6
18493   ol_cv_lib_mdbm=yes
18494 else
18495   echo "$ac_t""no" 1>&6
18496
18497                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18498 echo "configure:18499: checking for mdbm_set_chain in -lmdbm" >&5
18499 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18500 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18501   echo $ac_n "(cached) $ac_c" 1>&6
18502 else
18503   ac_save_LIBS="$LIBS"
18504 LIBS="-lmdbm  $LIBS"
18505 cat > conftest.$ac_ext <<EOF
18506 #line 18507 "configure"
18507 #include "confdefs.h"
18508 /* Override any gcc2 internal prototype to avoid an error.  */
18509 /* We use char because int might match the return type of a gcc2
18510     builtin and then its argument prototype would still apply.  */
18511 char mdbm_set_chain();
18512
18513 int main() {
18514 mdbm_set_chain()
18515 ; return 0; }
18516 EOF
18517 if { (eval echo configure:18518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18518   rm -rf conftest*
18519   eval "ac_cv_lib_$ac_lib_var=yes"
18520 else
18521   echo "configure: failed program was:" >&5
18522   cat conftest.$ac_ext >&5
18523   rm -rf conftest*
18524   eval "ac_cv_lib_$ac_lib_var=no"
18525 fi
18526 rm -f conftest*
18527 LIBS="$ac_save_LIBS"
18528
18529 fi
18530 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18531   echo "$ac_t""yes" 1>&6
18532   ol_cv_lib_mdbm=-lmdbm
18533 else
18534   echo "$ac_t""no" 1>&6
18535 ol_cv_lib_mdbm=no
18536 fi
18537
18538         
18539 fi
18540
18541         LIBS="$ol_LIBS"
18542
18543 fi
18544
18545 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18546
18547
18548  for ac_hdr in mdbm.h
18549 do
18550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18552 echo "configure:18553: checking for $ac_hdr" >&5
18553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18554   echo $ac_n "(cached) $ac_c" 1>&6
18555 else
18556   cat > conftest.$ac_ext <<EOF
18557 #line 18558 "configure"
18558 #include "confdefs.h"
18559 #include <$ac_hdr>
18560 EOF
18561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18562 { (eval echo configure:18563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18564 if test -z "$ac_err"; then
18565   rm -rf conftest*
18566   eval "ac_cv_header_$ac_safe=yes"
18567 else
18568   echo "$ac_err" >&5
18569   echo "configure: failed program was:" >&5
18570   cat conftest.$ac_ext >&5
18571   rm -rf conftest*
18572   eval "ac_cv_header_$ac_safe=no"
18573 fi
18574 rm -f conftest*
18575 fi
18576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18577   echo "$ac_t""yes" 1>&6
18578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18579   cat >> confdefs.h <<EOF
18580 #define $ac_tr_hdr 1
18581 EOF
18582  
18583 else
18584   echo "$ac_t""no" 1>&6
18585 fi
18586 done
18587
18588  echo $ac_n "checking for db""... $ac_c" 1>&6
18589 echo "configure:18590: checking for db" >&5
18590 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18591   echo $ac_n "(cached) $ac_c" 1>&6
18592 else
18593   
18594         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18595                 ol_cv_mdbm=no
18596         else
18597                 ol_cv_mdbm=yes
18598         fi
18599
18600 fi
18601
18602 echo "$ac_t""$ol_cv_mdbm" 1>&6
18603  if test $ol_cv_mdbm = yes ; then
18604         cat >> confdefs.h <<\EOF
18605 #define HAVE_MDBM 1
18606 EOF
18607
18608  fi
18609
18610
18611         if test $ol_cv_mdbm = yes ; then
18612                 ol_link_ldbm=mdbm
18613                 ol_with_ldbm_api=mdbm
18614                 if test $ol_cv_lib_mdbm != yes ; then
18615                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18616                 fi
18617         fi
18618 fi
18619
18620 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18621         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18622 echo "configure:18623: checking for GDBM library" >&5
18623 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18624   echo $ac_n "(cached) $ac_c" 1>&6
18625 else
18626         ol_LIBS="$LIBS"
18627         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18628 echo "configure:18629: checking for gdbm_open" >&5
18629 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18630   echo $ac_n "(cached) $ac_c" 1>&6
18631 else
18632   cat > conftest.$ac_ext <<EOF
18633 #line 18634 "configure"
18634 #include "confdefs.h"
18635 /* System header to define __stub macros and hopefully few prototypes,
18636     which can conflict with char gdbm_open(); below.  */
18637 #include <assert.h>
18638 /* Override any gcc2 internal prototype to avoid an error.  */
18639 /* We use char because int might match the return type of a gcc2
18640     builtin and then its argument prototype would still apply.  */
18641 char gdbm_open();
18642 char (*f)();
18643
18644 int main() {
18645
18646 /* The GNU C library defines this for functions which it implements
18647     to always fail with ENOSYS.  Some functions are actually named
18648     something starting with __ and the normal name is an alias.  */
18649 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18650 choke me
18651 #else
18652 f = gdbm_open;
18653 #endif
18654
18655 ; return 0; }
18656 EOF
18657 if { (eval echo configure:18658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18658   rm -rf conftest*
18659   eval "ac_cv_func_gdbm_open=yes"
18660 else
18661   echo "configure: failed program was:" >&5
18662   cat conftest.$ac_ext >&5
18663   rm -rf conftest*
18664   eval "ac_cv_func_gdbm_open=no"
18665 fi
18666 rm -f conftest*
18667 fi
18668
18669 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18670   echo "$ac_t""yes" 1>&6
18671   ol_cv_lib_gdbm=yes
18672 else
18673   echo "$ac_t""no" 1>&6
18674
18675                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18676 echo "configure:18677: checking for gdbm_open in -lgdbm" >&5
18677 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18678 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18679   echo $ac_n "(cached) $ac_c" 1>&6
18680 else
18681   ac_save_LIBS="$LIBS"
18682 LIBS="-lgdbm  $LIBS"
18683 cat > conftest.$ac_ext <<EOF
18684 #line 18685 "configure"
18685 #include "confdefs.h"
18686 /* Override any gcc2 internal prototype to avoid an error.  */
18687 /* We use char because int might match the return type of a gcc2
18688     builtin and then its argument prototype would still apply.  */
18689 char gdbm_open();
18690
18691 int main() {
18692 gdbm_open()
18693 ; return 0; }
18694 EOF
18695 if { (eval echo configure:18696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18696   rm -rf conftest*
18697   eval "ac_cv_lib_$ac_lib_var=yes"
18698 else
18699   echo "configure: failed program was:" >&5
18700   cat conftest.$ac_ext >&5
18701   rm -rf conftest*
18702   eval "ac_cv_lib_$ac_lib_var=no"
18703 fi
18704 rm -f conftest*
18705 LIBS="$ac_save_LIBS"
18706
18707 fi
18708 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18709   echo "$ac_t""yes" 1>&6
18710   ol_cv_lib_gdbm=-lgdbm
18711 else
18712   echo "$ac_t""no" 1>&6
18713 ol_cv_lib_gdbm=no
18714 fi
18715
18716         
18717 fi
18718
18719         LIBS="$ol_LIBS"
18720
18721 fi
18722
18723 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18724
18725
18726  for ac_hdr in gdbm.h
18727 do
18728 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18729 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18730 echo "configure:18731: checking for $ac_hdr" >&5
18731 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18732   echo $ac_n "(cached) $ac_c" 1>&6
18733 else
18734   cat > conftest.$ac_ext <<EOF
18735 #line 18736 "configure"
18736 #include "confdefs.h"
18737 #include <$ac_hdr>
18738 EOF
18739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18740 { (eval echo configure:18741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18742 if test -z "$ac_err"; then
18743   rm -rf conftest*
18744   eval "ac_cv_header_$ac_safe=yes"
18745 else
18746   echo "$ac_err" >&5
18747   echo "configure: failed program was:" >&5
18748   cat conftest.$ac_ext >&5
18749   rm -rf conftest*
18750   eval "ac_cv_header_$ac_safe=no"
18751 fi
18752 rm -f conftest*
18753 fi
18754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18755   echo "$ac_t""yes" 1>&6
18756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18757   cat >> confdefs.h <<EOF
18758 #define $ac_tr_hdr 1
18759 EOF
18760  
18761 else
18762   echo "$ac_t""no" 1>&6
18763 fi
18764 done
18765
18766  echo $ac_n "checking for db""... $ac_c" 1>&6
18767 echo "configure:18768: checking for db" >&5
18768 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18769   echo $ac_n "(cached) $ac_c" 1>&6
18770 else
18771   
18772         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18773                 ol_cv_gdbm=no
18774         else
18775                 ol_cv_gdbm=yes
18776         fi
18777
18778 fi
18779
18780 echo "$ac_t""$ol_cv_gdbm" 1>&6
18781  if test $ol_cv_gdbm = yes ; then
18782         cat >> confdefs.h <<\EOF
18783 #define HAVE_GDBM 1
18784 EOF
18785
18786  fi
18787
18788
18789         if test $ol_cv_gdbm = yes ; then
18790                 ol_link_ldbm=gdbm
18791                 ol_with_ldbm_api=gdbm
18792
18793                 if test $ol_cv_lib_gdbm != yes ; then
18794                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18795                 fi
18796         fi
18797 fi
18798
18799 if test $ol_with_ldbm_api = ndbm ; then
18800         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18801 echo "configure:18802: checking for NDBM library" >&5
18802 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18803   echo $ac_n "(cached) $ac_c" 1>&6
18804 else
18805         ol_LIBS="$LIBS"
18806         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18807 echo "configure:18808: checking for dbm_open" >&5
18808 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18809   echo $ac_n "(cached) $ac_c" 1>&6
18810 else
18811   cat > conftest.$ac_ext <<EOF
18812 #line 18813 "configure"
18813 #include "confdefs.h"
18814 /* System header to define __stub macros and hopefully few prototypes,
18815     which can conflict with char dbm_open(); below.  */
18816 #include <assert.h>
18817 /* Override any gcc2 internal prototype to avoid an error.  */
18818 /* We use char because int might match the return type of a gcc2
18819     builtin and then its argument prototype would still apply.  */
18820 char dbm_open();
18821 char (*f)();
18822
18823 int main() {
18824
18825 /* The GNU C library defines this for functions which it implements
18826     to always fail with ENOSYS.  Some functions are actually named
18827     something starting with __ and the normal name is an alias.  */
18828 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18829 choke me
18830 #else
18831 f = dbm_open;
18832 #endif
18833
18834 ; return 0; }
18835 EOF
18836 if { (eval echo configure:18837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18837   rm -rf conftest*
18838   eval "ac_cv_func_dbm_open=yes"
18839 else
18840   echo "configure: failed program was:" >&5
18841   cat conftest.$ac_ext >&5
18842   rm -rf conftest*
18843   eval "ac_cv_func_dbm_open=no"
18844 fi
18845 rm -f conftest*
18846 fi
18847
18848 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18849   echo "$ac_t""yes" 1>&6
18850   ol_cv_lib_ndbm=yes
18851 else
18852   echo "$ac_t""no" 1>&6
18853
18854                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18855 echo "configure:18856: checking for dbm_open in -lndbm" >&5
18856 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18857 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18858   echo $ac_n "(cached) $ac_c" 1>&6
18859 else
18860   ac_save_LIBS="$LIBS"
18861 LIBS="-lndbm  $LIBS"
18862 cat > conftest.$ac_ext <<EOF
18863 #line 18864 "configure"
18864 #include "confdefs.h"
18865 /* Override any gcc2 internal prototype to avoid an error.  */
18866 /* We use char because int might match the return type of a gcc2
18867     builtin and then its argument prototype would still apply.  */
18868 char dbm_open();
18869
18870 int main() {
18871 dbm_open()
18872 ; return 0; }
18873 EOF
18874 if { (eval echo configure:18875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18875   rm -rf conftest*
18876   eval "ac_cv_lib_$ac_lib_var=yes"
18877 else
18878   echo "configure: failed program was:" >&5
18879   cat conftest.$ac_ext >&5
18880   rm -rf conftest*
18881   eval "ac_cv_lib_$ac_lib_var=no"
18882 fi
18883 rm -f conftest*
18884 LIBS="$ac_save_LIBS"
18885
18886 fi
18887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18888   echo "$ac_t""yes" 1>&6
18889   ol_cv_lib_ndbm=-lndbm
18890 else
18891   echo "$ac_t""no" 1>&6
18892
18893                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18894 echo "configure:18895: checking for dbm_open in -ldbm" >&5
18895 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18896 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18897   echo $ac_n "(cached) $ac_c" 1>&6
18898 else
18899   ac_save_LIBS="$LIBS"
18900 LIBS="-ldbm  $LIBS"
18901 cat > conftest.$ac_ext <<EOF
18902 #line 18903 "configure"
18903 #include "confdefs.h"
18904 /* Override any gcc2 internal prototype to avoid an error.  */
18905 /* We use char because int might match the return type of a gcc2
18906     builtin and then its argument prototype would still apply.  */
18907 char dbm_open();
18908
18909 int main() {
18910 dbm_open()
18911 ; return 0; }
18912 EOF
18913 if { (eval echo configure:18914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18914   rm -rf conftest*
18915   eval "ac_cv_lib_$ac_lib_var=yes"
18916 else
18917   echo "configure: failed program was:" >&5
18918   cat conftest.$ac_ext >&5
18919   rm -rf conftest*
18920   eval "ac_cv_lib_$ac_lib_var=no"
18921 fi
18922 rm -f conftest*
18923 LIBS="$ac_save_LIBS"
18924
18925 fi
18926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18927   echo "$ac_t""yes" 1>&6
18928   ol_cv_lib_ndbm=-ldbm
18929 else
18930   echo "$ac_t""no" 1>&6
18931 ol_cv_lib_ndbm=no
18932 fi
18933                 
18934 fi
18935
18936         
18937 fi
18938
18939         LIBS="$ol_LIBS"
18940
18941 fi
18942
18943 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18944
18945
18946  for ac_hdr in ndbm.h
18947 do
18948 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18949 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18950 echo "configure:18951: checking for $ac_hdr" >&5
18951 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18952   echo $ac_n "(cached) $ac_c" 1>&6
18953 else
18954   cat > conftest.$ac_ext <<EOF
18955 #line 18956 "configure"
18956 #include "confdefs.h"
18957 #include <$ac_hdr>
18958 EOF
18959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18960 { (eval echo configure:18961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18962 if test -z "$ac_err"; then
18963   rm -rf conftest*
18964   eval "ac_cv_header_$ac_safe=yes"
18965 else
18966   echo "$ac_err" >&5
18967   echo "configure: failed program was:" >&5
18968   cat conftest.$ac_ext >&5
18969   rm -rf conftest*
18970   eval "ac_cv_header_$ac_safe=no"
18971 fi
18972 rm -f conftest*
18973 fi
18974 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18975   echo "$ac_t""yes" 1>&6
18976     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18977   cat >> confdefs.h <<EOF
18978 #define $ac_tr_hdr 1
18979 EOF
18980  
18981 else
18982   echo "$ac_t""no" 1>&6
18983 fi
18984 done
18985
18986  echo $ac_n "checking for db""... $ac_c" 1>&6
18987 echo "configure:18988: checking for db" >&5
18988 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18989   echo $ac_n "(cached) $ac_c" 1>&6
18990 else
18991   
18992         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18993                 ol_cv_ndbm=no
18994         else
18995                 ol_cv_ndbm=yes
18996         fi
18997
18998 fi
18999
19000 echo "$ac_t""$ol_cv_ndbm" 1>&6
19001  if test $ol_cv_ndbm = yes ; then
19002         cat >> confdefs.h <<\EOF
19003 #define HAVE_NDBM 1
19004 EOF
19005
19006  fi
19007
19008
19009         if test $ol_cv_ndbm = yes ; then
19010                 ol_link_ldbm=ndbm
19011                 ol_with_ldbm_api=ndbm
19012
19013                 if test $ol_cv_lib_ndbm != yes ; then
19014                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19015                 fi
19016         fi
19017 fi
19018
19019 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19020         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19021         if test $ol_enable_ldbm = yes ; then
19022                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19023         fi
19024
19025         echo "configure: warning: disabling LDBM" 1>&2
19026         ol_enable_ldbm=no
19027 fi
19028
19029 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19030         BUILD_LIBS_DYNAMIC=shared
19031         cat >> confdefs.h <<\EOF
19032 #define LDAP_LIBS_DYNAMIC 1
19033 EOF
19034
19035 else
19036         BUILD_LIBS_DYNAMIC=static
19037 fi
19038
19039 if test $ol_enable_wrappers != no ; then
19040         for ac_hdr in tcpd.h
19041 do
19042 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19043 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19044 echo "configure:19045: checking for $ac_hdr" >&5
19045 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19046   echo $ac_n "(cached) $ac_c" 1>&6
19047 else
19048   cat > conftest.$ac_ext <<EOF
19049 #line 19050 "configure"
19050 #include "confdefs.h"
19051 #include <$ac_hdr>
19052 EOF
19053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19054 { (eval echo configure:19055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19056 if test -z "$ac_err"; then
19057   rm -rf conftest*
19058   eval "ac_cv_header_$ac_safe=yes"
19059 else
19060   echo "$ac_err" >&5
19061   echo "configure: failed program was:" >&5
19062   cat conftest.$ac_ext >&5
19063   rm -rf conftest*
19064   eval "ac_cv_header_$ac_safe=no"
19065 fi
19066 rm -f conftest*
19067 fi
19068 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19069   echo "$ac_t""yes" 1>&6
19070     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19071   cat >> confdefs.h <<EOF
19072 #define $ac_tr_hdr 1
19073 EOF
19074  
19075                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19076 echo "configure:19077: checking for TCP wrappers library" >&5
19077                 save_LIBS="$LIBS"
19078                 LIBS="$LIBS -lwrap"
19079                 cat > conftest.$ac_ext <<EOF
19080 #line 19081 "configure"
19081 #include "confdefs.h"
19082
19083 #include <tcpd.h>
19084 int allow_severity = 0;
19085 int deny_severity  = 0;
19086
19087 struct request_info *req;
19088                 
19089 int main() {
19090
19091 hosts_access(req)
19092                 
19093 ; return 0; }
19094 EOF
19095 if { (eval echo configure:19096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19096   rm -rf conftest*
19097   echo "$ac_t""-lwrap" 1>&6
19098                 have_wrappers=yes
19099                 LIBS="$save_LIBS"
19100 else
19101   echo "configure: failed program was:" >&5
19102   cat conftest.$ac_ext >&5
19103   rm -rf conftest*
19104   
19105                                 LIBS="$LIBS -lnsl"
19106                 cat > conftest.$ac_ext <<EOF
19107 #line 19108 "configure"
19108 #include "confdefs.h"
19109
19110 #include <tcpd.h>
19111 int allow_severity = 0;
19112 int deny_severity  = 0;
19113
19114 struct request_info *req;
19115                 
19116 int main() {
19117
19118 hosts_access(req)
19119                 
19120 ; return 0; }
19121 EOF
19122 if { (eval echo configure:19123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19123   rm -rf conftest*
19124   echo "$ac_t""-lwrap -lnsl" 1>&6
19125                 have_wrappers=yes
19126                 LIBS="$save_LIBS -lnsl"
19127 else
19128   echo "configure: failed program was:" >&5
19129   cat conftest.$ac_ext >&5
19130   rm -rf conftest*
19131   
19132                 echo "$ac_t""no" 1>&6
19133                 have_wrappers=no
19134                 LIBS=$save_LIBS
19135 fi
19136 rm -f conftest*
19137 fi
19138 rm -f conftest*
19139 else
19140   echo "$ac_t""no" 1>&6
19141 have_wrappers=no
19142 fi
19143 done
19144
19145
19146         if test $have_wrappers = yes ; then
19147                 cat >> confdefs.h <<\EOF
19148 #define HAVE_TCPD 1
19149 EOF
19150
19151                 WRAP_LIBS="-lwrap"
19152         elif test $ol_enable_wrappers = yes ; then
19153                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19154         else
19155                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19156                 WRAP_LIBS=""
19157         fi
19158 fi
19159
19160 if test $ol_enable_syslog != no ; then
19161         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19162 echo "configure:19163: checking for openlog" >&5
19163 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19164   echo $ac_n "(cached) $ac_c" 1>&6
19165 else
19166   cat > conftest.$ac_ext <<EOF
19167 #line 19168 "configure"
19168 #include "confdefs.h"
19169 /* System header to define __stub macros and hopefully few prototypes,
19170     which can conflict with char openlog(); below.  */
19171 #include <assert.h>
19172 /* Override any gcc2 internal prototype to avoid an error.  */
19173 /* We use char because int might match the return type of a gcc2
19174     builtin and then its argument prototype would still apply.  */
19175 char openlog();
19176 char (*f)();
19177
19178 int main() {
19179
19180 /* The GNU C library defines this for functions which it implements
19181     to always fail with ENOSYS.  Some functions are actually named
19182     something starting with __ and the normal name is an alias.  */
19183 #if defined (__stub_openlog) || defined (__stub___openlog)
19184 choke me
19185 #else
19186 f = openlog;
19187 #endif
19188
19189 ; return 0; }
19190 EOF
19191 if { (eval echo configure:19192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19192   rm -rf conftest*
19193   eval "ac_cv_func_openlog=yes"
19194 else
19195   echo "configure: failed program was:" >&5
19196   cat conftest.$ac_ext >&5
19197   rm -rf conftest*
19198   eval "ac_cv_func_openlog=no"
19199 fi
19200 rm -f conftest*
19201 fi
19202
19203 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19204   echo "$ac_t""yes" 1>&6
19205   :
19206 else
19207   echo "$ac_t""no" 1>&6
19208 fi
19209
19210         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19211                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19212         fi
19213         ol_enable_syslog=$ac_cv_func_openlog
19214 fi
19215
19216
19217 ol_link_sql=no
19218 if test $ol_enable_sql != no ; then
19219         for ac_hdr in sql.h sqlext.h
19220 do
19221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19223 echo "configure:19224: checking for $ac_hdr" >&5
19224 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19225   echo $ac_n "(cached) $ac_c" 1>&6
19226 else
19227   cat > conftest.$ac_ext <<EOF
19228 #line 19229 "configure"
19229 #include "confdefs.h"
19230 #include <$ac_hdr>
19231 EOF
19232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19233 { (eval echo configure:19234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19235 if test -z "$ac_err"; then
19236   rm -rf conftest*
19237   eval "ac_cv_header_$ac_safe=yes"
19238 else
19239   echo "$ac_err" >&5
19240   echo "configure: failed program was:" >&5
19241   cat conftest.$ac_ext >&5
19242   rm -rf conftest*
19243   eval "ac_cv_header_$ac_safe=no"
19244 fi
19245 rm -f conftest*
19246 fi
19247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19248   echo "$ac_t""yes" 1>&6
19249     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19250   cat >> confdefs.h <<EOF
19251 #define $ac_tr_hdr 1
19252 EOF
19253  
19254 else
19255   echo "$ac_t""no" 1>&6
19256 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19257         
19258 fi
19259 done
19260
19261
19262         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19263 echo "configure:19264: checking for SQLDriverConnect in -liodbc" >&5
19264 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19265 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19266   echo $ac_n "(cached) $ac_c" 1>&6
19267 else
19268   ac_save_LIBS="$LIBS"
19269 LIBS="-liodbc  $LIBS"
19270 cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273 /* Override any gcc2 internal prototype to avoid an error.  */
19274 /* We use char because int might match the return type of a gcc2
19275     builtin and then its argument prototype would still apply.  */
19276 char SQLDriverConnect();
19277
19278 int main() {
19279 SQLDriverConnect()
19280 ; return 0; }
19281 EOF
19282 if { (eval echo configure:19283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19283   rm -rf conftest*
19284   eval "ac_cv_lib_$ac_lib_var=yes"
19285 else
19286   echo "configure: failed program was:" >&5
19287   cat conftest.$ac_ext >&5
19288   rm -rf conftest*
19289   eval "ac_cv_lib_$ac_lib_var=no"
19290 fi
19291 rm -f conftest*
19292 LIBS="$ac_save_LIBS"
19293
19294 fi
19295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19296   echo "$ac_t""yes" 1>&6
19297   have_iodbc=yes
19298 else
19299   echo "$ac_t""no" 1>&6
19300 have_iodbc=no
19301 fi
19302
19303         if test $have_iodbc = yes ; then
19304                 ol_link_sql="-liodbc"
19305         else
19306                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19307 echo "configure:19308: checking for SQLDriverConnect in -lodbc" >&5
19308 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19310   echo $ac_n "(cached) $ac_c" 1>&6
19311 else
19312   ac_save_LIBS="$LIBS"
19313 LIBS="-lodbc  $LIBS"
19314 cat > conftest.$ac_ext <<EOF
19315 #line 19316 "configure"
19316 #include "confdefs.h"
19317 /* Override any gcc2 internal prototype to avoid an error.  */
19318 /* We use char because int might match the return type of a gcc2
19319     builtin and then its argument prototype would still apply.  */
19320 char SQLDriverConnect();
19321
19322 int main() {
19323 SQLDriverConnect()
19324 ; return 0; }
19325 EOF
19326 if { (eval echo configure:19327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19327   rm -rf conftest*
19328   eval "ac_cv_lib_$ac_lib_var=yes"
19329 else
19330   echo "configure: failed program was:" >&5
19331   cat conftest.$ac_ext >&5
19332   rm -rf conftest*
19333   eval "ac_cv_lib_$ac_lib_var=no"
19334 fi
19335 rm -f conftest*
19336 LIBS="$ac_save_LIBS"
19337
19338 fi
19339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19340   echo "$ac_t""yes" 1>&6
19341   have_odbc=yes
19342 else
19343   echo "$ac_t""no" 1>&6
19344 have_odbc=no
19345 fi
19346
19347                 if test $have_odbc = yes ; then
19348                         ol_link_sql="-lodbc"
19349                 fi
19350         fi
19351
19352         if test $ol_link_sql != no ; then
19353                 SLAPD_SQL_LIBS="$ol_link_sql"
19354
19355         elif test $ol_enable_sql != auto ; then
19356                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19357         fi
19358 fi
19359
19360 if test $ol_enable_tcl != no ; then
19361         for ac_hdr in tcl.h
19362 do
19363 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19364 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19365 echo "configure:19366: checking for $ac_hdr" >&5
19366 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19367   echo $ac_n "(cached) $ac_c" 1>&6
19368 else
19369   cat > conftest.$ac_ext <<EOF
19370 #line 19371 "configure"
19371 #include "confdefs.h"
19372 #include <$ac_hdr>
19373 EOF
19374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19375 { (eval echo configure:19376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19377 if test -z "$ac_err"; then
19378   rm -rf conftest*
19379   eval "ac_cv_header_$ac_safe=yes"
19380 else
19381   echo "$ac_err" >&5
19382   echo "configure: failed program was:" >&5
19383   cat conftest.$ac_ext >&5
19384   rm -rf conftest*
19385   eval "ac_cv_header_$ac_safe=no"
19386 fi
19387 rm -f conftest*
19388 fi
19389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19390   echo "$ac_t""yes" 1>&6
19391     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19392   cat >> confdefs.h <<EOF
19393 #define $ac_tr_hdr 1
19394 EOF
19395  
19396 else
19397   echo "$ac_t""no" 1>&6
19398 fi
19399 done
19400
19401
19402         if test $ac_cv_header_tcl_h != yes ; then
19403                 have_tcl=no
19404         else
19405                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19406                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19407 echo "configure:19408: checking for main in -l$lib" >&5
19408 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19410   echo $ac_n "(cached) $ac_c" 1>&6
19411 else
19412   ac_save_LIBS="$LIBS"
19413 LIBS="-l$lib  $LIBS"
19414 cat > conftest.$ac_ext <<EOF
19415 #line 19416 "configure"
19416 #include "confdefs.h"
19417
19418 int main() {
19419 main()
19420 ; return 0; }
19421 EOF
19422 if { (eval echo configure:19423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19423   rm -rf conftest*
19424   eval "ac_cv_lib_$ac_lib_var=yes"
19425 else
19426   echo "configure: failed program was:" >&5
19427   cat conftest.$ac_ext >&5
19428   rm -rf conftest*
19429   eval "ac_cv_lib_$ac_lib_var=no"
19430 fi
19431 rm -f conftest*
19432 LIBS="$ac_save_LIBS"
19433
19434 fi
19435 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19436   echo "$ac_t""yes" 1>&6
19437   have_tcl=yes
19438                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19439                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19440                            else
19441                                         MOD_TCL_LIB="-l${lib}"
19442                            fi;break
19443 else
19444   echo "$ac_t""no" 1>&6
19445 have_tcl=no
19446 fi
19447
19448                 done
19449         fi
19450
19451         if test $have_tcl != yes ; then
19452                 echo "configure: warning: could not find -ltcl" 1>&2
19453                 if test $ol_enable_tcl = yes ; then
19454                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19455                 fi
19456
19457                 ol_enable_tcl=no
19458         fi
19459 fi
19460
19461 ol_link_termcap=no
19462 for ac_hdr in termcap.h ncurses.h
19463 do
19464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19466 echo "configure:19467: checking for $ac_hdr" >&5
19467 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19468   echo $ac_n "(cached) $ac_c" 1>&6
19469 else
19470   cat > conftest.$ac_ext <<EOF
19471 #line 19472 "configure"
19472 #include "confdefs.h"
19473 #include <$ac_hdr>
19474 EOF
19475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19476 { (eval echo configure:19477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19478 if test -z "$ac_err"; then
19479   rm -rf conftest*
19480   eval "ac_cv_header_$ac_safe=yes"
19481 else
19482   echo "$ac_err" >&5
19483   echo "configure: failed program was:" >&5
19484   cat conftest.$ac_ext >&5
19485   rm -rf conftest*
19486   eval "ac_cv_header_$ac_safe=no"
19487 fi
19488 rm -f conftest*
19489 fi
19490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19491   echo "$ac_t""yes" 1>&6
19492     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19493   cat >> confdefs.h <<EOF
19494 #define $ac_tr_hdr 1
19495 EOF
19496  
19497 else
19498   echo "$ac_t""no" 1>&6
19499 fi
19500 done
19501
19502
19503 if test $ol_link_termcap = no ; then
19504         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19505 echo "configure:19506: checking for tputs in -ltermcap" >&5
19506 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19507 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19508   echo $ac_n "(cached) $ac_c" 1>&6
19509 else
19510   ac_save_LIBS="$LIBS"
19511 LIBS="-ltermcap  $LIBS"
19512 cat > conftest.$ac_ext <<EOF
19513 #line 19514 "configure"
19514 #include "confdefs.h"
19515 /* Override any gcc2 internal prototype to avoid an error.  */
19516 /* We use char because int might match the return type of a gcc2
19517     builtin and then its argument prototype would still apply.  */
19518 char tputs();
19519
19520 int main() {
19521 tputs()
19522 ; return 0; }
19523 EOF
19524 if { (eval echo configure:19525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19525   rm -rf conftest*
19526   eval "ac_cv_lib_$ac_lib_var=yes"
19527 else
19528   echo "configure: failed program was:" >&5
19529   cat conftest.$ac_ext >&5
19530   rm -rf conftest*
19531   eval "ac_cv_lib_$ac_lib_var=no"
19532 fi
19533 rm -f conftest*
19534 LIBS="$ac_save_LIBS"
19535
19536 fi
19537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19538   echo "$ac_t""yes" 1>&6
19539   have_termcap=yes
19540 else
19541   echo "$ac_t""no" 1>&6
19542 have_termcap=no
19543 fi
19544
19545         if test $have_termcap = yes ; then
19546                 cat >> confdefs.h <<\EOF
19547 #define HAVE_TERMCAP 1
19548 EOF
19549
19550                 ol_link_termcap=yes
19551                 TERMCAP_LIBS=-ltermcap
19552         fi
19553 fi
19554
19555 if test $ol_link_termcap = no ; then
19556         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19557 echo "configure:19558: checking for initscr in -lncurses" >&5
19558 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19559 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19560   echo $ac_n "(cached) $ac_c" 1>&6
19561 else
19562   ac_save_LIBS="$LIBS"
19563 LIBS="-lncurses  $LIBS"
19564 cat > conftest.$ac_ext <<EOF
19565 #line 19566 "configure"
19566 #include "confdefs.h"
19567 /* Override any gcc2 internal prototype to avoid an error.  */
19568 /* We use char because int might match the return type of a gcc2
19569     builtin and then its argument prototype would still apply.  */
19570 char initscr();
19571
19572 int main() {
19573 initscr()
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   eval "ac_cv_lib_$ac_lib_var=yes"
19579 else
19580   echo "configure: failed program was:" >&5
19581   cat conftest.$ac_ext >&5
19582   rm -rf conftest*
19583   eval "ac_cv_lib_$ac_lib_var=no"
19584 fi
19585 rm -f conftest*
19586 LIBS="$ac_save_LIBS"
19587
19588 fi
19589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19590   echo "$ac_t""yes" 1>&6
19591   have_ncurses=yes
19592 else
19593   echo "$ac_t""no" 1>&6
19594 have_ncurses=no
19595 fi
19596
19597         if test $have_ncurses = yes ; then
19598                 cat >> confdefs.h <<\EOF
19599 #define HAVE_NCURSES 1
19600 EOF
19601
19602                 ol_link_termcap=yes
19603                 TERMCAP_LIBS=-lncurses
19604         fi
19605 fi
19606
19607 if test $ol_link_termcap = no ; then
19608         cat >> confdefs.h <<\EOF
19609 #define NO_TERMCAP 1
19610 EOF
19611
19612         TERMCAP_LIBS=
19613 fi
19614
19615 ol_link_sasl=no
19616 ol_link_spasswd=no
19617 if test $ol_with_cyrus_sasl != no ; then
19618         for ac_hdr in sasl/sasl.h sasl.h
19619 do
19620 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19621 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19622 echo "configure:19623: checking for $ac_hdr" >&5
19623 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19624   echo $ac_n "(cached) $ac_c" 1>&6
19625 else
19626   cat > conftest.$ac_ext <<EOF
19627 #line 19628 "configure"
19628 #include "confdefs.h"
19629 #include <$ac_hdr>
19630 EOF
19631 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19632 { (eval echo configure:19633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19633 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19634 if test -z "$ac_err"; then
19635   rm -rf conftest*
19636   eval "ac_cv_header_$ac_safe=yes"
19637 else
19638   echo "$ac_err" >&5
19639   echo "configure: failed program was:" >&5
19640   cat conftest.$ac_ext >&5
19641   rm -rf conftest*
19642   eval "ac_cv_header_$ac_safe=no"
19643 fi
19644 rm -f conftest*
19645 fi
19646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19647   echo "$ac_t""yes" 1>&6
19648     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19649   cat >> confdefs.h <<EOF
19650 #define $ac_tr_hdr 1
19651 EOF
19652  
19653 else
19654   echo "$ac_t""no" 1>&6
19655 fi
19656 done
19657
19658
19659         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19660                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19661 echo "configure:19662: checking for sasl_client_init in -lsasl2" >&5
19662 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19663 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19664   echo $ac_n "(cached) $ac_c" 1>&6
19665 else
19666   ac_save_LIBS="$LIBS"
19667 LIBS="-lsasl2  $LIBS"
19668 cat > conftest.$ac_ext <<EOF
19669 #line 19670 "configure"
19670 #include "confdefs.h"
19671 /* Override any gcc2 internal prototype to avoid an error.  */
19672 /* We use char because int might match the return type of a gcc2
19673     builtin and then its argument prototype would still apply.  */
19674 char sasl_client_init();
19675
19676 int main() {
19677 sasl_client_init()
19678 ; return 0; }
19679 EOF
19680 if { (eval echo configure:19681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19681   rm -rf conftest*
19682   eval "ac_cv_lib_$ac_lib_var=yes"
19683 else
19684   echo "configure: failed program was:" >&5
19685   cat conftest.$ac_ext >&5
19686   rm -rf conftest*
19687   eval "ac_cv_lib_$ac_lib_var=no"
19688 fi
19689 rm -f conftest*
19690 LIBS="$ac_save_LIBS"
19691
19692 fi
19693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19694   echo "$ac_t""yes" 1>&6
19695   ol_link_sasl="-lsasl2"
19696 else
19697   echo "$ac_t""no" 1>&6
19698 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19699 echo "configure:19700: checking for sasl_client_init in -lsasl" >&5
19700 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19701 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19702   echo $ac_n "(cached) $ac_c" 1>&6
19703 else
19704   ac_save_LIBS="$LIBS"
19705 LIBS="-lsasl  $LIBS"
19706 cat > conftest.$ac_ext <<EOF
19707 #line 19708 "configure"
19708 #include "confdefs.h"
19709 /* Override any gcc2 internal prototype to avoid an error.  */
19710 /* We use char because int might match the return type of a gcc2
19711     builtin and then its argument prototype would still apply.  */
19712 char sasl_client_init();
19713
19714 int main() {
19715 sasl_client_init()
19716 ; return 0; }
19717 EOF
19718 if { (eval echo configure:19719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19719   rm -rf conftest*
19720   eval "ac_cv_lib_$ac_lib_var=yes"
19721 else
19722   echo "configure: failed program was:" >&5
19723   cat conftest.$ac_ext >&5
19724   rm -rf conftest*
19725   eval "ac_cv_lib_$ac_lib_var=no"
19726 fi
19727 rm -f conftest*
19728 LIBS="$ac_save_LIBS"
19729
19730 fi
19731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19732   echo "$ac_t""yes" 1>&6
19733   ol_link_sasl="-lsasl"
19734 else
19735   echo "$ac_t""no" 1>&6
19736 fi
19737
19738 fi
19739
19740         fi
19741
19742         if test $ol_link_sasl = no ; then
19743                 if test $ol_with_cyrus_sasl != auto ; then
19744                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19745                 else
19746                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19747                         echo "configure: warning: SASL authentication not supported!" 1>&2
19748                         if test $ol_link_tls = no ; then
19749                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19750                         fi
19751                 fi
19752         else
19753                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19754 echo "configure:19755: checking Cyrus SASL library version" >&5
19755 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19756   echo $ac_n "(cached) $ac_c" 1>&6
19757 else
19758   
19759         cat > conftest.$ac_ext <<EOF
19760 #line 19761 "configure"
19761 #include "confdefs.h"
19762
19763 #ifdef HAVE_SASL_SASL_H
19764 #include <sasl/sasl.h>
19765 #else
19766 #include <sasl.h>
19767 #endif
19768
19769 /* require 2.1.3 or later */
19770 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19771         char *__sasl_compat = "1.5.x okay";
19772 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19773         __sasl_compat "2.2+ or better okay (we guess)";
19774 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19775         && SASL_VERSION_STEP >=3
19776         __sasl_compat = "2.1.3+ or better okay";
19777 #endif
19778         
19779 EOF
19780 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19781   egrep "__sasl_compat" >/dev/null 2>&1; then
19782   rm -rf conftest*
19783   ol_cv_sasl_compat=yes
19784 else
19785   rm -rf conftest*
19786   ol_cv_sasl_compat=no
19787 fi
19788 rm -f conftest*
19789
19790 fi
19791
19792 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19793
19794                 if test $ol_cv_sasl_compat = no ; then
19795                         ol_link_sasl=no
19796                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19797                 fi
19798
19799                 cat >> confdefs.h <<\EOF
19800 #define HAVE_CYRUS_SASL 1
19801 EOF
19802
19803                 SASL_LIBS="$ol_link_sasl"
19804                 if test $ol_enable_spasswd != no ; then
19805                         ol_link_spasswd=yes
19806                 fi
19807
19808                 ac_save_LIBS="$LIBS"
19809                 LIBS="$LIBS $ol_link_sasl"
19810                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
19811 echo "configure:19812: checking for sasl_version" >&5
19812 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
19813   echo $ac_n "(cached) $ac_c" 1>&6
19814 else
19815   cat > conftest.$ac_ext <<EOF
19816 #line 19817 "configure"
19817 #include "confdefs.h"
19818 /* System header to define __stub macros and hopefully few prototypes,
19819     which can conflict with char sasl_version(); below.  */
19820 #include <assert.h>
19821 /* Override any gcc2 internal prototype to avoid an error.  */
19822 /* We use char because int might match the return type of a gcc2
19823     builtin and then its argument prototype would still apply.  */
19824 char sasl_version();
19825 char (*f)();
19826
19827 int main() {
19828
19829 /* The GNU C library defines this for functions which it implements
19830     to always fail with ENOSYS.  Some functions are actually named
19831     something starting with __ and the normal name is an alias.  */
19832 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
19833 choke me
19834 #else
19835 f = sasl_version;
19836 #endif
19837
19838 ; return 0; }
19839 EOF
19840 if { (eval echo configure:19841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19841   rm -rf conftest*
19842   eval "ac_cv_func_sasl_version=yes"
19843 else
19844   echo "configure: failed program was:" >&5
19845   cat conftest.$ac_ext >&5
19846   rm -rf conftest*
19847   eval "ac_cv_func_sasl_version=no"
19848 fi
19849 rm -f conftest*
19850 fi
19851
19852 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
19853   echo "$ac_t""yes" 1>&6
19854   cat >> confdefs.h <<\EOF
19855 #define HAVE_SASL_VERSION 1
19856 EOF
19857
19858 else
19859   echo "$ac_t""no" 1>&6
19860 fi
19861
19862                 LIBS="$ac_save_LIBS"
19863         fi
19864
19865 else
19866         echo "configure: warning: SASL authentication not supported!" 1>&2
19867         if test $ol_link_tls = no ; then
19868                 echo "configure: warning: Strong authentication not supported!" 1>&2
19869         fi
19870 fi
19871
19872 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19873         dev=no
19874         if test -r /dev/urandom ; then
19875                 dev="/dev/urandom";
19876         elif test -r /idev/urandom ; then
19877                 dev="/idev/urandom";
19878         elif test -r /dev/srandom ; then
19879                 dev="/dev/srandom";
19880         elif test -r /dev/random ; then
19881                 dev="/dev/random";
19882         elif test -r /idev/random ; then
19883                 dev="/idev/random";
19884         fi
19885
19886         if test $dev != no ; then
19887                 cat >> confdefs.h <<EOF
19888 #define URANDOM_DEVICE "$dev"
19889 EOF
19890
19891         fi
19892 fi
19893
19894 ol_link_fetch=no
19895 if test $ol_with_fetch != no ; then
19896         ol_LIBS=$LIBS
19897 LIBS="-lfetch -lcom_err $LIBS"
19898 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19899 echo "configure:19900: checking fetch(3) library" >&5
19900 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19901   echo $ac_n "(cached) $ac_c" 1>&6
19902 else
19903   
19904         cat > conftest.$ac_ext <<EOF
19905 #line 19906 "configure"
19906 #include "confdefs.h"
19907
19908 #include <sys/param.h>
19909 #include <stdio.h>
19910 #include <fetch.h>
19911 int main() {
19912 struct url *u = fetchParseURL("file:///"); 
19913 ; return 0; }
19914 EOF
19915 if { (eval echo configure:19916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19916   rm -rf conftest*
19917   ol_cv_lib_fetch=yes
19918 else
19919   echo "configure: failed program was:" >&5
19920   cat conftest.$ac_ext >&5
19921   rm -rf conftest*
19922   ol_cv_lib_fetch=no
19923 fi
19924 rm -f conftest*
19925 fi
19926
19927 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19928 LIBS=$ol_LIBS
19929 if test $ol_cv_lib_fetch != no ; then
19930         ol_link_fetch="-lfetch -lcom_err"
19931         cat >> confdefs.h <<\EOF
19932 #define HAVE_FETCH 1
19933 EOF
19934
19935 fi
19936
19937
19938         if test $ol_cv_lib_fetch != no ; then
19939                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19940                 ol_link_fetch=freebsd
19941
19942         elif test $ol_with_fetch != auto ; then
19943                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19944         fi 
19945 fi
19946
19947 ol_link_readline=no
19948 if test $ol_with_readline != no ; then
19949         for ac_hdr in readline/readline.h readline/history.h
19950 do
19951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19953 echo "configure:19954: checking for $ac_hdr" >&5
19954 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19955   echo $ac_n "(cached) $ac_c" 1>&6
19956 else
19957   cat > conftest.$ac_ext <<EOF
19958 #line 19959 "configure"
19959 #include "confdefs.h"
19960 #include <$ac_hdr>
19961 EOF
19962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19963 { (eval echo configure:19964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19965 if test -z "$ac_err"; then
19966   rm -rf conftest*
19967   eval "ac_cv_header_$ac_safe=yes"
19968 else
19969   echo "$ac_err" >&5
19970   echo "configure: failed program was:" >&5
19971   cat conftest.$ac_ext >&5
19972   rm -rf conftest*
19973   eval "ac_cv_header_$ac_safe=no"
19974 fi
19975 rm -f conftest*
19976 fi
19977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19978   echo "$ac_t""yes" 1>&6
19979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19980   cat >> confdefs.h <<EOF
19981 #define $ac_tr_hdr 1
19982 EOF
19983  
19984 else
19985   echo "$ac_t""no" 1>&6
19986 fi
19987 done
19988
19989
19990         if test $ac_cv_header_readline_readline_h = yes ; then
19991                 save_LIBS="$LIBS"
19992                 LIBS="$TERMCAP_LIBS $LIBS"
19993                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19994 echo "configure:19995: checking for readline in -lreadline" >&5
19995 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19996 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19997   echo $ac_n "(cached) $ac_c" 1>&6
19998 else
19999   ac_save_LIBS="$LIBS"
20000 LIBS="-lreadline  $LIBS"
20001 cat > conftest.$ac_ext <<EOF
20002 #line 20003 "configure"
20003 #include "confdefs.h"
20004 /* Override any gcc2 internal prototype to avoid an error.  */
20005 /* We use char because int might match the return type of a gcc2
20006     builtin and then its argument prototype would still apply.  */
20007 char readline();
20008
20009 int main() {
20010 readline()
20011 ; return 0; }
20012 EOF
20013 if { (eval echo configure:20014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20014   rm -rf conftest*
20015   eval "ac_cv_lib_$ac_lib_var=yes"
20016 else
20017   echo "configure: failed program was:" >&5
20018   cat conftest.$ac_ext >&5
20019   rm -rf conftest*
20020   eval "ac_cv_lib_$ac_lib_var=no"
20021 fi
20022 rm -f conftest*
20023 LIBS="$ac_save_LIBS"
20024
20025 fi
20026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20027   echo "$ac_t""yes" 1>&6
20028   have_readline=yes
20029 else
20030   echo "$ac_t""no" 1>&6
20031 have_readline=no
20032 fi
20033
20034                 LIBS="$save_LIBS"
20035                         
20036                 if test $have_readline = yes ; then
20037                         ol_with_readline=found
20038                         ol_link_readline=yes
20039
20040                         READLINE_LIBS="-lreadline"
20041                 fi
20042         fi
20043 fi
20044
20045 if test $ol_link_readline = yes ; then
20046         cat >> confdefs.h <<\EOF
20047 #define HAVE_READLINE 1
20048 EOF
20049
20050 fi
20051
20052
20053 if test $ol_enable_crypt != no ; then
20054         save_LIBS="$LIBS"
20055         LIBS="$TLS_LIBS $LIBS"
20056
20057         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20058 echo "configure:20059: checking for crypt" >&5
20059 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20060   echo $ac_n "(cached) $ac_c" 1>&6
20061 else
20062   cat > conftest.$ac_ext <<EOF
20063 #line 20064 "configure"
20064 #include "confdefs.h"
20065 /* System header to define __stub macros and hopefully few prototypes,
20066     which can conflict with char crypt(); below.  */
20067 #include <assert.h>
20068 /* Override any gcc2 internal prototype to avoid an error.  */
20069 /* We use char because int might match the return type of a gcc2
20070     builtin and then its argument prototype would still apply.  */
20071 char crypt();
20072 char (*f)();
20073
20074 int main() {
20075
20076 /* The GNU C library defines this for functions which it implements
20077     to always fail with ENOSYS.  Some functions are actually named
20078     something starting with __ and the normal name is an alias.  */
20079 #if defined (__stub_crypt) || defined (__stub___crypt)
20080 choke me
20081 #else
20082 f = crypt;
20083 #endif
20084
20085 ; return 0; }
20086 EOF
20087 if { (eval echo configure:20088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20088   rm -rf conftest*
20089   eval "ac_cv_func_crypt=yes"
20090 else
20091   echo "configure: failed program was:" >&5
20092   cat conftest.$ac_ext >&5
20093   rm -rf conftest*
20094   eval "ac_cv_func_crypt=no"
20095 fi
20096 rm -f conftest*
20097 fi
20098
20099 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20100   echo "$ac_t""yes" 1>&6
20101   have_crypt=yes
20102 else
20103   echo "$ac_t""no" 1>&6
20104
20105                 LIBS="$save_LIBS"
20106                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20107 echo "configure:20108: checking for crypt in -lcrypt" >&5
20108 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20110   echo $ac_n "(cached) $ac_c" 1>&6
20111 else
20112   ac_save_LIBS="$LIBS"
20113 LIBS="-lcrypt  $LIBS"
20114 cat > conftest.$ac_ext <<EOF
20115 #line 20116 "configure"
20116 #include "confdefs.h"
20117 /* Override any gcc2 internal prototype to avoid an error.  */
20118 /* We use char because int might match the return type of a gcc2
20119     builtin and then its argument prototype would still apply.  */
20120 char crypt();
20121
20122 int main() {
20123 crypt()
20124 ; return 0; }
20125 EOF
20126 if { (eval echo configure:20127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20127   rm -rf conftest*
20128   eval "ac_cv_lib_$ac_lib_var=yes"
20129 else
20130   echo "configure: failed program was:" >&5
20131   cat conftest.$ac_ext >&5
20132   rm -rf conftest*
20133   eval "ac_cv_lib_$ac_lib_var=no"
20134 fi
20135 rm -f conftest*
20136 LIBS="$ac_save_LIBS"
20137
20138 fi
20139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20140   echo "$ac_t""yes" 1>&6
20141   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20142                         have_crypt=yes
20143 else
20144   echo "$ac_t""no" 1>&6
20145 have_crypt=no
20146 fi
20147
20148 fi
20149
20150
20151         LIBS="$save_LIBS"
20152
20153         if test $have_crypt = yes ; then
20154                 cat >> confdefs.h <<\EOF
20155 #define HAVE_CRYPT 1
20156 EOF
20157
20158         else
20159                 echo "configure: warning: could not find crypt" 1>&2
20160                 if test $ol_enable_crypt = yes ; then
20161                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20162                 fi
20163
20164                 echo "configure: warning: disabling crypt support" 1>&2
20165                 ol_enable_crypt=no
20166         fi
20167 fi
20168
20169 if test $ol_enable_proctitle != no ; then
20170         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20171 echo "configure:20172: checking for setproctitle" >&5
20172 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20173   echo $ac_n "(cached) $ac_c" 1>&6
20174 else
20175   cat > conftest.$ac_ext <<EOF
20176 #line 20177 "configure"
20177 #include "confdefs.h"
20178 /* System header to define __stub macros and hopefully few prototypes,
20179     which can conflict with char setproctitle(); below.  */
20180 #include <assert.h>
20181 /* Override any gcc2 internal prototype to avoid an error.  */
20182 /* We use char because int might match the return type of a gcc2
20183     builtin and then its argument prototype would still apply.  */
20184 char setproctitle();
20185 char (*f)();
20186
20187 int main() {
20188
20189 /* The GNU C library defines this for functions which it implements
20190     to always fail with ENOSYS.  Some functions are actually named
20191     something starting with __ and the normal name is an alias.  */
20192 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20193 choke me
20194 #else
20195 f = setproctitle;
20196 #endif
20197
20198 ; return 0; }
20199 EOF
20200 if { (eval echo configure:20201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20201   rm -rf conftest*
20202   eval "ac_cv_func_setproctitle=yes"
20203 else
20204   echo "configure: failed program was:" >&5
20205   cat conftest.$ac_ext >&5
20206   rm -rf conftest*
20207   eval "ac_cv_func_setproctitle=no"
20208 fi
20209 rm -f conftest*
20210 fi
20211
20212 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20213   echo "$ac_t""yes" 1>&6
20214   have_setproctitle=yes
20215 else
20216   echo "$ac_t""no" 1>&6
20217
20218                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20219 echo "configure:20220: checking for setproctitle in -lutil" >&5
20220 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20221 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20222   echo $ac_n "(cached) $ac_c" 1>&6
20223 else
20224   ac_save_LIBS="$LIBS"
20225 LIBS="-lutil  $LIBS"
20226 cat > conftest.$ac_ext <<EOF
20227 #line 20228 "configure"
20228 #include "confdefs.h"
20229 /* Override any gcc2 internal prototype to avoid an error.  */
20230 /* We use char because int might match the return type of a gcc2
20231     builtin and then its argument prototype would still apply.  */
20232 char setproctitle();
20233
20234 int main() {
20235 setproctitle()
20236 ; return 0; }
20237 EOF
20238 if { (eval echo configure:20239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20239   rm -rf conftest*
20240   eval "ac_cv_lib_$ac_lib_var=yes"
20241 else
20242   echo "configure: failed program was:" >&5
20243   cat conftest.$ac_ext >&5
20244   rm -rf conftest*
20245   eval "ac_cv_lib_$ac_lib_var=no"
20246 fi
20247 rm -f conftest*
20248 LIBS="$ac_save_LIBS"
20249
20250 fi
20251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20252   echo "$ac_t""yes" 1>&6
20253   have_setproctitle=yes
20254                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20255 else
20256   echo "$ac_t""no" 1>&6
20257 have_setproctitle=no
20258                         LIBOBJS="$LIBOBJS setproctitle.o"
20259                         LIBSRCS="$LIBSRCS setproctitle.c"
20260 fi
20261
20262 fi
20263
20264
20265         if test $have_setproctitle = yes ; then
20266                 cat >> confdefs.h <<\EOF
20267 #define HAVE_SETPROCTITLE 1
20268 EOF
20269
20270         fi
20271 fi
20272
20273 if test $ol_enable_slp != no ; then
20274         for ac_hdr in slp.h 
20275 do
20276 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20277 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20278 echo "configure:20279: checking for $ac_hdr" >&5
20279 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20280   echo $ac_n "(cached) $ac_c" 1>&6
20281 else
20282   cat > conftest.$ac_ext <<EOF
20283 #line 20284 "configure"
20284 #include "confdefs.h"
20285 #include <$ac_hdr>
20286 EOF
20287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20288 { (eval echo configure:20289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20290 if test -z "$ac_err"; then
20291   rm -rf conftest*
20292   eval "ac_cv_header_$ac_safe=yes"
20293 else
20294   echo "$ac_err" >&5
20295   echo "configure: failed program was:" >&5
20296   cat conftest.$ac_ext >&5
20297   rm -rf conftest*
20298   eval "ac_cv_header_$ac_safe=no"
20299 fi
20300 rm -f conftest*
20301 fi
20302 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20303   echo "$ac_t""yes" 1>&6
20304     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20305   cat >> confdefs.h <<EOF
20306 #define $ac_tr_hdr 1
20307 EOF
20308  
20309 else
20310   echo "$ac_t""no" 1>&6
20311 fi
20312 done
20313
20314
20315         if test $ac_cv_header_slp_h = yes ; then
20316                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20317 echo "configure:20318: checking for SLPOpen in -lslp" >&5
20318 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20319 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20320   echo $ac_n "(cached) $ac_c" 1>&6
20321 else
20322   ac_save_LIBS="$LIBS"
20323 LIBS="-lslp  $LIBS"
20324 cat > conftest.$ac_ext <<EOF
20325 #line 20326 "configure"
20326 #include "confdefs.h"
20327 /* Override any gcc2 internal prototype to avoid an error.  */
20328 /* We use char because int might match the return type of a gcc2
20329     builtin and then its argument prototype would still apply.  */
20330 char SLPOpen();
20331
20332 int main() {
20333 SLPOpen()
20334 ; return 0; }
20335 EOF
20336 if { (eval echo configure:20337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20337   rm -rf conftest*
20338   eval "ac_cv_lib_$ac_lib_var=yes"
20339 else
20340   echo "configure: failed program was:" >&5
20341   cat conftest.$ac_ext >&5
20342   rm -rf conftest*
20343   eval "ac_cv_lib_$ac_lib_var=no"
20344 fi
20345 rm -f conftest*
20346 LIBS="$ac_save_LIBS"
20347
20348 fi
20349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20350   echo "$ac_t""yes" 1>&6
20351   have_slp=yes
20352 else
20353   echo "$ac_t""no" 1>&6
20354 have_slp=no
20355 fi
20356
20357                 if test $have_slp = yes ; then
20358                         cat >> confdefs.h <<\EOF
20359 #define HAVE_SLP 1
20360 EOF
20361
20362                         SLAPD_SLP_LIBS=-lslp
20363                 fi
20364
20365         elif test $ol_enable_slp = yes ; then
20366                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20367         fi
20368 fi
20369
20370 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20371 echo "configure:20372: checking for ANSI C header files" >&5
20372 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20373   echo $ac_n "(cached) $ac_c" 1>&6
20374 else
20375   cat > conftest.$ac_ext <<EOF
20376 #line 20377 "configure"
20377 #include "confdefs.h"
20378 #include <stdlib.h>
20379 #include <stdarg.h>
20380 #include <string.h>
20381 #include <float.h>
20382 EOF
20383 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20384 { (eval echo configure:20385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20385 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20386 if test -z "$ac_err"; then
20387   rm -rf conftest*
20388   ac_cv_header_stdc=yes
20389 else
20390   echo "$ac_err" >&5
20391   echo "configure: failed program was:" >&5
20392   cat conftest.$ac_ext >&5
20393   rm -rf conftest*
20394   ac_cv_header_stdc=no
20395 fi
20396 rm -f conftest*
20397
20398 if test $ac_cv_header_stdc = yes; then
20399   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20400 cat > conftest.$ac_ext <<EOF
20401 #line 20402 "configure"
20402 #include "confdefs.h"
20403 #include <string.h>
20404 EOF
20405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20406   egrep "memchr" >/dev/null 2>&1; then
20407   :
20408 else
20409   rm -rf conftest*
20410   ac_cv_header_stdc=no
20411 fi
20412 rm -f conftest*
20413
20414 fi
20415
20416 if test $ac_cv_header_stdc = yes; then
20417   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20418 cat > conftest.$ac_ext <<EOF
20419 #line 20420 "configure"
20420 #include "confdefs.h"
20421 #include <stdlib.h>
20422 EOF
20423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20424   egrep "free" >/dev/null 2>&1; then
20425   :
20426 else
20427   rm -rf conftest*
20428   ac_cv_header_stdc=no
20429 fi
20430 rm -f conftest*
20431
20432 fi
20433
20434 if test $ac_cv_header_stdc = yes; then
20435   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20436 if test "$cross_compiling" = yes; then
20437   :
20438 else
20439   cat > conftest.$ac_ext <<EOF
20440 #line 20441 "configure"
20441 #include "confdefs.h"
20442 #include <ctype.h>
20443 #if ((' ' & 0x0FF) == 0x020)
20444 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20445 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20446 #else
20447 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20448  || ('j' <= (c) && (c) <= 'r') \
20449  || ('s' <= (c) && (c) <= 'z'))
20450 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20451 #endif
20452 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20453 int main () { int i; for (i = 0; i < 256; i++)
20454 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20455 exit (0); }
20456
20457 EOF
20458 if { (eval echo configure:20459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20459 then
20460   :
20461 else
20462   echo "configure: failed program was:" >&5
20463   cat conftest.$ac_ext >&5
20464   rm -fr conftest*
20465   ac_cv_header_stdc=no
20466 fi
20467 rm -fr conftest*
20468 fi
20469
20470 fi
20471 fi
20472
20473 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20474 if test $ac_cv_header_stdc = yes; then
20475   cat >> confdefs.h <<\EOF
20476 #define STDC_HEADERS 1
20477 EOF
20478
20479 fi
20480
20481 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20482 echo "configure:20483: checking for mode_t" >&5
20483 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20484   echo $ac_n "(cached) $ac_c" 1>&6
20485 else
20486   cat > conftest.$ac_ext <<EOF
20487 #line 20488 "configure"
20488 #include "confdefs.h"
20489 #include <sys/types.h>
20490 #if STDC_HEADERS
20491 #include <stdlib.h>
20492 #include <stddef.h>
20493 #endif
20494
20495 EOF
20496 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20497   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20498   rm -rf conftest*
20499   eval "ac_cv_type_mode_t=yes"
20500 else
20501   rm -rf conftest*
20502   eval "ac_cv_type_mode_t=no"
20503 fi
20504 rm -f conftest*
20505
20506 fi
20507 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20508   echo "$ac_t""yes" 1>&6
20509 else
20510   echo "$ac_t""no" 1>&6
20511   cat >> confdefs.h <<EOF
20512 #define mode_t int
20513 EOF
20514
20515 fi
20516
20517 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20518 echo "configure:20519: checking for off_t" >&5
20519 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20520   echo $ac_n "(cached) $ac_c" 1>&6
20521 else
20522   cat > conftest.$ac_ext <<EOF
20523 #line 20524 "configure"
20524 #include "confdefs.h"
20525 #include <sys/types.h>
20526 #if STDC_HEADERS
20527 #include <stdlib.h>
20528 #include <stddef.h>
20529 #endif
20530
20531 EOF
20532 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20533   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20534   rm -rf conftest*
20535   eval "ac_cv_type_off_t=yes"
20536 else
20537   rm -rf conftest*
20538   eval "ac_cv_type_off_t=no"
20539 fi
20540 rm -f conftest*
20541
20542 fi
20543 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20544   echo "$ac_t""yes" 1>&6
20545 else
20546   echo "$ac_t""no" 1>&6
20547   cat >> confdefs.h <<EOF
20548 #define off_t long
20549 EOF
20550
20551 fi
20552
20553 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20554 echo "configure:20555: checking for pid_t" >&5
20555 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20556   echo $ac_n "(cached) $ac_c" 1>&6
20557 else
20558   cat > conftest.$ac_ext <<EOF
20559 #line 20560 "configure"
20560 #include "confdefs.h"
20561 #include <sys/types.h>
20562 #if STDC_HEADERS
20563 #include <stdlib.h>
20564 #include <stddef.h>
20565 #endif
20566
20567 EOF
20568 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20569   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20570   rm -rf conftest*
20571   eval "ac_cv_type_pid_t=yes"
20572 else
20573   rm -rf conftest*
20574   eval "ac_cv_type_pid_t=no"
20575 fi
20576 rm -f conftest*
20577
20578 fi
20579 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20580   echo "$ac_t""yes" 1>&6
20581 else
20582   echo "$ac_t""no" 1>&6
20583   cat >> confdefs.h <<EOF
20584 #define pid_t int
20585 EOF
20586
20587 fi
20588
20589 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20590 echo "configure:20591: checking for ptrdiff_t" >&5
20591 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20592   echo $ac_n "(cached) $ac_c" 1>&6
20593 else
20594   cat > conftest.$ac_ext <<EOF
20595 #line 20596 "configure"
20596 #include "confdefs.h"
20597 #include <stddef.h>
20598 int main() {
20599 ptrdiff_t p
20600 ; return 0; }
20601 EOF
20602 if { (eval echo configure:20603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20603   rm -rf conftest*
20604   am_cv_type_ptrdiff_t=yes
20605 else
20606   echo "configure: failed program was:" >&5
20607   cat conftest.$ac_ext >&5
20608   rm -rf conftest*
20609   am_cv_type_ptrdiff_t=no
20610 fi
20611 rm -f conftest*
20612 fi
20613
20614 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20615    if test $am_cv_type_ptrdiff_t = yes; then
20616      cat >> confdefs.h <<\EOF
20617 #define HAVE_PTRDIFF_T 1
20618 EOF
20619
20620    fi
20621
20622 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20623 echo "configure:20624: checking return type of signal handlers" >&5
20624 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20625   echo $ac_n "(cached) $ac_c" 1>&6
20626 else
20627   cat > conftest.$ac_ext <<EOF
20628 #line 20629 "configure"
20629 #include "confdefs.h"
20630 #include <sys/types.h>
20631 #include <signal.h>
20632 #ifdef signal
20633 #undef signal
20634 #endif
20635 #ifdef __cplusplus
20636 extern "C" void (*signal (int, void (*)(int)))(int);
20637 #else
20638 void (*signal ()) ();
20639 #endif
20640
20641 int main() {
20642 int i;
20643 ; return 0; }
20644 EOF
20645 if { (eval echo configure:20646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20646   rm -rf conftest*
20647   ac_cv_type_signal=void
20648 else
20649   echo "configure: failed program was:" >&5
20650   cat conftest.$ac_ext >&5
20651   rm -rf conftest*
20652   ac_cv_type_signal=int
20653 fi
20654 rm -f conftest*
20655 fi
20656
20657 echo "$ac_t""$ac_cv_type_signal" 1>&6
20658 cat >> confdefs.h <<EOF
20659 #define RETSIGTYPE $ac_cv_type_signal
20660 EOF
20661
20662
20663 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20664 echo "configure:20665: checking for size_t" >&5
20665 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20666   echo $ac_n "(cached) $ac_c" 1>&6
20667 else
20668   cat > conftest.$ac_ext <<EOF
20669 #line 20670 "configure"
20670 #include "confdefs.h"
20671 #include <sys/types.h>
20672 #if STDC_HEADERS
20673 #include <stdlib.h>
20674 #include <stddef.h>
20675 #endif
20676
20677 EOF
20678 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20679   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20680   rm -rf conftest*
20681   eval "ac_cv_type_size_t=yes"
20682 else
20683   rm -rf conftest*
20684   eval "ac_cv_type_size_t=no"
20685 fi
20686 rm -f conftest*
20687
20688 fi
20689 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20690   echo "$ac_t""yes" 1>&6
20691 else
20692   echo "$ac_t""no" 1>&6
20693   cat >> confdefs.h <<EOF
20694 #define size_t unsigned
20695 EOF
20696
20697 fi
20698
20699
20700 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20701 echo "configure:20702: checking for ssize_t" >&5
20702 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20703   echo $ac_n "(cached) $ac_c" 1>&6
20704 else
20705   cat > conftest.$ac_ext <<EOF
20706 #line 20707 "configure"
20707 #include "confdefs.h"
20708 #include <sys/types.h>
20709 #if STDC_HEADERS
20710 #include <stdlib.h>
20711 #include <stddef.h>
20712 #endif
20713
20714 EOF
20715 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20716   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20717   rm -rf conftest*
20718   eval "ac_cv_type_ssize_t=yes"
20719 else
20720   rm -rf conftest*
20721   eval "ac_cv_type_ssize_t=no"
20722 fi
20723 rm -f conftest*
20724
20725 fi
20726 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20727   echo "$ac_t""yes" 1>&6
20728 else
20729   echo "$ac_t""no" 1>&6
20730   cat >> confdefs.h <<EOF
20731 #define ssize_t signed int
20732 EOF
20733
20734 fi
20735
20736 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20737 echo "configure:20738: checking for caddr_t" >&5
20738 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20739   echo $ac_n "(cached) $ac_c" 1>&6
20740 else
20741   cat > conftest.$ac_ext <<EOF
20742 #line 20743 "configure"
20743 #include "confdefs.h"
20744 #include <sys/types.h>
20745 #if STDC_HEADERS
20746 #include <stdlib.h>
20747 #include <stddef.h>
20748 #endif
20749
20750 EOF
20751 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20752   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20753   rm -rf conftest*
20754   eval "ac_cv_type_caddr_t=yes"
20755 else
20756   rm -rf conftest*
20757   eval "ac_cv_type_caddr_t=no"
20758 fi
20759 rm -f conftest*
20760
20761 fi
20762 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20763   echo "$ac_t""yes" 1>&6
20764 else
20765   echo "$ac_t""no" 1>&6
20766   cat >> confdefs.h <<EOF
20767 #define caddr_t char *
20768 EOF
20769
20770 fi
20771
20772
20773 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20774 echo "configure:20775: checking for socklen_t" >&5
20775 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20776   echo $ac_n "(cached) $ac_c" 1>&6
20777 else
20778   cat > conftest.$ac_ext <<EOF
20779 #line 20780 "configure"
20780 #include "confdefs.h"
20781
20782 #ifdef HAVE_SYS_TYPES_H
20783 #include <sys/types.h>
20784 #endif
20785 #ifdef HAVE_SYS_SOCKET_H
20786 #include <sys/socket.h>
20787 #endif
20788
20789 int main() {
20790 socklen_t len;
20791 ; return 0; }
20792 EOF
20793 if { (eval echo configure:20794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20794   rm -rf conftest*
20795   ol_cv_type_socklen_t=yes
20796 else
20797   echo "configure: failed program was:" >&5
20798   cat conftest.$ac_ext >&5
20799   rm -rf conftest*
20800   ol_cv_type_socklen_t=no
20801 fi
20802 rm -f conftest*
20803 fi
20804
20805 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20806   if test $ol_cv_type_socklen_t = no; then
20807     cat >> confdefs.h <<\EOF
20808 #define socklen_t int
20809 EOF
20810
20811   fi
20812  
20813 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20814 echo "configure:20815: checking for member st_blksize in aggregate type struct stat" >&5
20815 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20816   echo $ac_n "(cached) $ac_c" 1>&6
20817 else
20818   cat > conftest.$ac_ext <<EOF
20819 #line 20820 "configure"
20820 #include "confdefs.h"
20821 #include <sys/types.h>
20822 #include <sys/stat.h>
20823 int main() {
20824 struct stat foo; foo.st_blksize;
20825 ; return 0; }
20826 EOF
20827 if { (eval echo configure:20828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20828   rm -rf conftest*
20829   ac_cv_c_struct_member_st_blksize=yes
20830 else
20831   echo "configure: failed program was:" >&5
20832   cat conftest.$ac_ext >&5
20833   rm -rf conftest*
20834   ac_cv_c_struct_member_st_blksize=no
20835 fi
20836 rm -f conftest*
20837 fi
20838
20839 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20840 st_blksize="$ac_cv_c_struct_member_st_blksize"
20841 if test $ac_cv_c_struct_member_st_blksize = yes; then
20842   cat >> confdefs.h <<\EOF
20843 #define HAVE_ST_BLKSIZE 1
20844 EOF
20845
20846 fi
20847
20848 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20849 echo "configure:20850: checking whether time.h and sys/time.h may both be included" >&5
20850 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20851   echo $ac_n "(cached) $ac_c" 1>&6
20852 else
20853   cat > conftest.$ac_ext <<EOF
20854 #line 20855 "configure"
20855 #include "confdefs.h"
20856 #include <sys/types.h>
20857 #include <sys/time.h>
20858 #include <time.h>
20859 int main() {
20860 struct tm *tp;
20861 ; return 0; }
20862 EOF
20863 if { (eval echo configure:20864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20864   rm -rf conftest*
20865   ac_cv_header_time=yes
20866 else
20867   echo "configure: failed program was:" >&5
20868   cat conftest.$ac_ext >&5
20869   rm -rf conftest*
20870   ac_cv_header_time=no
20871 fi
20872 rm -f conftest*
20873 fi
20874
20875 echo "$ac_t""$ac_cv_header_time" 1>&6
20876 if test $ac_cv_header_time = yes; then
20877   cat >> confdefs.h <<\EOF
20878 #define TIME_WITH_SYS_TIME 1
20879 EOF
20880
20881 fi
20882
20883 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20884 echo "configure:20885: checking whether struct tm is in sys/time.h or time.h" >&5
20885 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20886   echo $ac_n "(cached) $ac_c" 1>&6
20887 else
20888   cat > conftest.$ac_ext <<EOF
20889 #line 20890 "configure"
20890 #include "confdefs.h"
20891 #include <sys/types.h>
20892 #include <time.h>
20893 int main() {
20894 struct tm *tp; tp->tm_sec;
20895 ; return 0; }
20896 EOF
20897 if { (eval echo configure:20898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20898   rm -rf conftest*
20899   ac_cv_struct_tm=time.h
20900 else
20901   echo "configure: failed program was:" >&5
20902   cat conftest.$ac_ext >&5
20903   rm -rf conftest*
20904   ac_cv_struct_tm=sys/time.h
20905 fi
20906 rm -f conftest*
20907 fi
20908
20909 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20910 if test $ac_cv_struct_tm = sys/time.h; then
20911   cat >> confdefs.h <<\EOF
20912 #define TM_IN_SYS_TIME 1
20913 EOF
20914
20915 fi
20916
20917 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20918 echo "configure:20919: checking for uid_t in sys/types.h" >&5
20919 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20920   echo $ac_n "(cached) $ac_c" 1>&6
20921 else
20922   cat > conftest.$ac_ext <<EOF
20923 #line 20924 "configure"
20924 #include "confdefs.h"
20925 #include <sys/types.h>
20926 EOF
20927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20928   egrep "uid_t" >/dev/null 2>&1; then
20929   rm -rf conftest*
20930   ac_cv_type_uid_t=yes
20931 else
20932   rm -rf conftest*
20933   ac_cv_type_uid_t=no
20934 fi
20935 rm -f conftest*
20936
20937 fi
20938
20939 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20940 if test $ac_cv_type_uid_t = no; then
20941   cat >> confdefs.h <<\EOF
20942 #define uid_t int
20943 EOF
20944
20945   cat >> confdefs.h <<\EOF
20946 #define gid_t int
20947 EOF
20948
20949 fi
20950
20951 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20952 echo "configure:20953: checking for sig_atomic_t" >&5
20953 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20954   echo $ac_n "(cached) $ac_c" 1>&6
20955 else
20956   cat > conftest.$ac_ext <<EOF
20957 #line 20958 "configure"
20958 #include "confdefs.h"
20959 #include <signal.h>
20960 int main() {
20961 sig_atomic_t atomic;
20962 ; return 0; }
20963 EOF
20964 if { (eval echo configure:20965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20965   rm -rf conftest*
20966   ol_cv_type_sig_atomic_t=yes
20967 else
20968   echo "configure: failed program was:" >&5
20969   cat conftest.$ac_ext >&5
20970   rm -rf conftest*
20971   ol_cv_type_sig_atomic_t=no
20972 fi
20973 rm -f conftest*
20974 fi
20975
20976 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20977   if test $ol_cv_type_sig_atomic_t = no; then
20978     cat >> confdefs.h <<\EOF
20979 #define sig_atomic_t int
20980 EOF
20981
20982   fi
20983  
20984
20985
20986 # test for pw_gecos in struct passwd
20987 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20988 echo "configure:20989: checking struct passwd for pw_gecos" >&5
20989 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20990   echo $ac_n "(cached) $ac_c" 1>&6
20991 else
20992   
20993         cat > conftest.$ac_ext <<EOF
20994 #line 20995 "configure"
20995 #include "confdefs.h"
20996 #include <pwd.h>
20997 int main() {
20998
20999         struct passwd pwd;
21000         pwd.pw_gecos = pwd.pw_name;
21001
21002 ; return 0; }
21003 EOF
21004 if { (eval echo configure:21005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21005   rm -rf conftest*
21006   ol_cv_struct_passwd_pw_gecos=yes
21007 else
21008   echo "configure: failed program was:" >&5
21009   cat conftest.$ac_ext >&5
21010   rm -rf conftest*
21011   ol_cv_struct_passwd_pw_gecos=no
21012 fi
21013 rm -f conftest*
21014 fi
21015
21016 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21017 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21018         cat >> confdefs.h <<\EOF
21019 #define HAVE_PW_GECOS 1
21020 EOF
21021
21022 fi
21023
21024 # test for pw_passwd in struct passwd
21025 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21026 echo "configure:21027: checking struct passwd for pw_passwd" >&5
21027 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21028   echo $ac_n "(cached) $ac_c" 1>&6
21029 else
21030   
21031         cat > conftest.$ac_ext <<EOF
21032 #line 21033 "configure"
21033 #include "confdefs.h"
21034 #include <pwd.h>
21035 int main() {
21036
21037         struct passwd pwd;
21038         pwd.pw_passwd = pwd.pw_name;
21039
21040 ; return 0; }
21041 EOF
21042 if { (eval echo configure:21043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21043   rm -rf conftest*
21044   ol_cv_struct_passwd_pw_passwd=yes
21045 else
21046   echo "configure: failed program was:" >&5
21047   cat conftest.$ac_ext >&5
21048   rm -rf conftest*
21049   ol_cv_struct_passwd_pw_passwd=no
21050 fi
21051 rm -f conftest*
21052 fi
21053
21054 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21055 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21056         cat >> confdefs.h <<\EOF
21057 #define HAVE_PW_PASSWD 1
21058 EOF
21059
21060 fi
21061
21062
21063 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21064 echo "configure:21065: checking if toupper() requires islower()" >&5
21065 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21066   echo $ac_n "(cached) $ac_c" 1>&6
21067 else
21068   
21069         if test "$cross_compiling" = yes; then
21070   ol_cv_c_upper_lower=safe
21071 else
21072   cat > conftest.$ac_ext <<EOF
21073 #line 21074 "configure"
21074 #include "confdefs.h"
21075
21076 #include <ctype.h>
21077 main()
21078 {
21079         if ('C' == toupper('C'))
21080                 exit(0);
21081         else
21082                 exit(1);
21083 }
21084 EOF
21085 if { (eval echo configure:21086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21086 then
21087   ol_cv_c_upper_lower=no
21088 else
21089   echo "configure: failed program was:" >&5
21090   cat conftest.$ac_ext >&5
21091   rm -fr conftest*
21092   ol_cv_c_upper_lower=yes
21093 fi
21094 rm -fr conftest*
21095 fi
21096
21097 fi
21098
21099 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21100 if test $ol_cv_c_upper_lower != no ; then
21101         cat >> confdefs.h <<\EOF
21102 #define C_UPPER_LOWER 1
21103 EOF
21104
21105 fi
21106
21107 echo $ac_n "checking for working const""... $ac_c" 1>&6
21108 echo "configure:21109: checking for working const" >&5
21109 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21110   echo $ac_n "(cached) $ac_c" 1>&6
21111 else
21112   cat > conftest.$ac_ext <<EOF
21113 #line 21114 "configure"
21114 #include "confdefs.h"
21115
21116 int main() {
21117
21118 /* Ultrix mips cc rejects this.  */
21119 typedef int charset[2]; const charset x;
21120 /* SunOS 4.1.1 cc rejects this.  */
21121 char const *const *ccp;
21122 char **p;
21123 /* NEC SVR4.0.2 mips cc rejects this.  */
21124 struct point {int x, y;};
21125 static struct point const zero = {0,0};
21126 /* AIX XL C 1.02.0.0 rejects this.
21127    It does not let you subtract one const X* pointer from another in an arm
21128    of an if-expression whose if-part is not a constant expression */
21129 const char *g = "string";
21130 ccp = &g + (g ? g-g : 0);
21131 /* HPUX 7.0 cc rejects these. */
21132 ++ccp;
21133 p = (char**) ccp;
21134 ccp = (char const *const *) p;
21135 { /* SCO 3.2v4 cc rejects this.  */
21136   char *t;
21137   char const *s = 0 ? (char *) 0 : (char const *) 0;
21138
21139   *t++ = 0;
21140 }
21141 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21142   int x[] = {25, 17};
21143   const int *foo = &x[0];
21144   ++foo;
21145 }
21146 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21147   typedef const int *iptr;
21148   iptr p = 0;
21149   ++p;
21150 }
21151 { /* AIX XL C 1.02.0.0 rejects this saying
21152      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21153   struct s { int j; const int *ap[3]; };
21154   struct s *b; b->j = 5;
21155 }
21156 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21157   const int foo = 10;
21158 }
21159
21160 ; return 0; }
21161 EOF
21162 if { (eval echo configure:21163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21163   rm -rf conftest*
21164   ac_cv_c_const=yes
21165 else
21166   echo "configure: failed program was:" >&5
21167   cat conftest.$ac_ext >&5
21168   rm -rf conftest*
21169   ac_cv_c_const=no
21170 fi
21171 rm -f conftest*
21172 fi
21173
21174 echo "$ac_t""$ac_cv_c_const" 1>&6
21175 if test $ac_cv_c_const = no; then
21176   cat >> confdefs.h <<\EOF
21177 #define const 
21178 EOF
21179
21180 fi
21181
21182 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21183 echo "configure:21184: checking if compiler understands volatile" >&5
21184 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21185   echo $ac_n "(cached) $ac_c" 1>&6
21186 else
21187   cat > conftest.$ac_ext <<EOF
21188 #line 21189 "configure"
21189 #include "confdefs.h"
21190 int x, y, z;
21191 int main() {
21192 volatile int a; int * volatile b = x ? &y : &z;
21193       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21194       *b = 0;
21195 ; return 0; }
21196 EOF
21197 if { (eval echo configure:21198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21198   rm -rf conftest*
21199   ol_cv_c_volatile=yes
21200 else
21201   echo "configure: failed program was:" >&5
21202   cat conftest.$ac_ext >&5
21203   rm -rf conftest*
21204   ol_cv_c_volatile=no
21205 fi
21206 rm -f conftest*
21207 fi
21208
21209 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21210   if test $ol_cv_c_volatile = yes; then
21211     : 
21212   else
21213     cat >> confdefs.h <<\EOF
21214 #define volatile 
21215 EOF
21216
21217   fi
21218  
21219
21220 if test $cross_compiling = yes ; then
21221         cat >> confdefs.h <<\EOF
21222 #define CROSS_COMPILING 1
21223 EOF
21224
21225 else
21226         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21227 echo "configure:21228: checking whether byte ordering is bigendian" >&5
21228 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21229   echo $ac_n "(cached) $ac_c" 1>&6
21230 else
21231   ac_cv_c_bigendian=unknown
21232 # See if sys/param.h defines the BYTE_ORDER macro.
21233 cat > conftest.$ac_ext <<EOF
21234 #line 21235 "configure"
21235 #include "confdefs.h"
21236 #include <sys/types.h>
21237 #include <sys/param.h>
21238 int main() {
21239
21240 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21241  bogus endian macros
21242 #endif
21243 ; return 0; }
21244 EOF
21245 if { (eval echo configure:21246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21246   rm -rf conftest*
21247   # It does; now see whether it defined to BIG_ENDIAN or not.
21248 cat > conftest.$ac_ext <<EOF
21249 #line 21250 "configure"
21250 #include "confdefs.h"
21251 #include <sys/types.h>
21252 #include <sys/param.h>
21253 int main() {
21254
21255 #if BYTE_ORDER != BIG_ENDIAN
21256  not big endian
21257 #endif
21258 ; return 0; }
21259 EOF
21260 if { (eval echo configure:21261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21261   rm -rf conftest*
21262   ac_cv_c_bigendian=yes
21263 else
21264   echo "configure: failed program was:" >&5
21265   cat conftest.$ac_ext >&5
21266   rm -rf conftest*
21267   ac_cv_c_bigendian=no
21268 fi
21269 rm -f conftest*
21270 else
21271   echo "configure: failed program was:" >&5
21272   cat conftest.$ac_ext >&5
21273 fi
21274 rm -f conftest*
21275 if test $ac_cv_c_bigendian = unknown; then
21276 if test "$cross_compiling" = yes; then
21277     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21278 else
21279   cat > conftest.$ac_ext <<EOF
21280 #line 21281 "configure"
21281 #include "confdefs.h"
21282 main () {
21283   /* Are we little or big endian?  From Harbison&Steele.  */
21284   union
21285   {
21286     long l;
21287     char c[sizeof (long)];
21288   } u;
21289   u.l = 1;
21290   exit (u.c[sizeof (long) - 1] == 1);
21291 }
21292 EOF
21293 if { (eval echo configure:21294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21294 then
21295   ac_cv_c_bigendian=no
21296 else
21297   echo "configure: failed program was:" >&5
21298   cat conftest.$ac_ext >&5
21299   rm -fr conftest*
21300   ac_cv_c_bigendian=yes
21301 fi
21302 rm -fr conftest*
21303 fi
21304
21305 fi
21306 fi
21307
21308 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21309 if test $ac_cv_c_bigendian = yes; then
21310   cat >> confdefs.h <<\EOF
21311 #define WORDS_BIGENDIAN 1
21312 EOF
21313
21314 fi
21315
21316 fi
21317
21318 echo $ac_n "checking size of short""... $ac_c" 1>&6
21319 echo "configure:21320: checking size of short" >&5 
21320 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21321   echo $ac_n "(cached) $ac_c" 1>&6
21322 else
21323   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21324   cat > conftest.$ac_ext <<EOF
21325 #line 21326 "configure"
21326 #include "confdefs.h"
21327 #include "confdefs.h" 
21328 #include <sys/types.h> 
21329  
21330
21331 int main() {
21332 switch (0) case 0: case (sizeof (short) == $ac_size):;
21333 ; return 0; }
21334 EOF
21335 if { (eval echo configure:21336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21336   rm -rf conftest*
21337   ac_cv_sizeof_short=$ac_size
21338 else
21339   echo "configure: failed program was:" >&5
21340   cat conftest.$ac_ext >&5
21341 fi
21342 rm -f conftest* 
21343   if test x$ac_cv_sizeof_short != x ; then break; fi 
21344 done 
21345
21346 fi
21347  
21348 if test x$ac_cv_sizeof_short = x ; then 
21349   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21350 fi 
21351 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21352 cat >> confdefs.h <<EOF
21353 #define SIZEOF_SHORT $ac_cv_sizeof_short
21354 EOF
21355  
21356  
21357 echo $ac_n "checking size of int""... $ac_c" 1>&6
21358 echo "configure:21359: checking size of int" >&5 
21359 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21360   echo $ac_n "(cached) $ac_c" 1>&6
21361 else
21362   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21363   cat > conftest.$ac_ext <<EOF
21364 #line 21365 "configure"
21365 #include "confdefs.h"
21366 #include "confdefs.h" 
21367 #include <sys/types.h> 
21368  
21369
21370 int main() {
21371 switch (0) case 0: case (sizeof (int) == $ac_size):;
21372 ; return 0; }
21373 EOF
21374 if { (eval echo configure:21375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21375   rm -rf conftest*
21376   ac_cv_sizeof_int=$ac_size
21377 else
21378   echo "configure: failed program was:" >&5
21379   cat conftest.$ac_ext >&5
21380 fi
21381 rm -f conftest* 
21382   if test x$ac_cv_sizeof_int != x ; then break; fi 
21383 done 
21384
21385 fi
21386  
21387 if test x$ac_cv_sizeof_int = x ; then 
21388   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21389 fi 
21390 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21391 cat >> confdefs.h <<EOF
21392 #define SIZEOF_INT $ac_cv_sizeof_int
21393 EOF
21394  
21395  
21396 echo $ac_n "checking size of long""... $ac_c" 1>&6
21397 echo "configure:21398: checking size of long" >&5 
21398 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21399   echo $ac_n "(cached) $ac_c" 1>&6
21400 else
21401   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21402   cat > conftest.$ac_ext <<EOF
21403 #line 21404 "configure"
21404 #include "confdefs.h"
21405 #include "confdefs.h" 
21406 #include <sys/types.h> 
21407  
21408
21409 int main() {
21410 switch (0) case 0: case (sizeof (long) == $ac_size):;
21411 ; return 0; }
21412 EOF
21413 if { (eval echo configure:21414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21414   rm -rf conftest*
21415   ac_cv_sizeof_long=$ac_size
21416 else
21417   echo "configure: failed program was:" >&5
21418   cat conftest.$ac_ext >&5
21419 fi
21420 rm -f conftest* 
21421   if test x$ac_cv_sizeof_long != x ; then break; fi 
21422 done 
21423
21424 fi
21425  
21426 if test x$ac_cv_sizeof_long = x ; then 
21427   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21428 fi 
21429 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21430 cat >> confdefs.h <<EOF
21431 #define SIZEOF_LONG $ac_cv_sizeof_long
21432 EOF
21433  
21434
21435
21436 if test "$ac_cv_sizeof_int" -lt 4 ; then
21437         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21438
21439         cat >> confdefs.h <<\EOF
21440 #define LBER_INT_T long
21441 EOF
21442
21443 else
21444         cat >> confdefs.h <<\EOF
21445 #define LBER_INT_T int
21446 EOF
21447
21448 fi
21449
21450 cat >> confdefs.h <<\EOF
21451 #define LBER_LEN_T long
21452 EOF
21453
21454 cat >> confdefs.h <<\EOF
21455 #define LBER_SOCKET_T int
21456 EOF
21457
21458 cat >> confdefs.h <<\EOF
21459 #define LBER_TAG_T long
21460 EOF
21461
21462
21463 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21464 echo "configure:21465: checking for 8-bit clean memcmp" >&5
21465 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21466   echo $ac_n "(cached) $ac_c" 1>&6
21467 else
21468   if test "$cross_compiling" = yes; then
21469   ac_cv_func_memcmp_clean=no
21470 else
21471   cat > conftest.$ac_ext <<EOF
21472 #line 21473 "configure"
21473 #include "confdefs.h"
21474
21475 main()
21476 {
21477   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21478   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21479 }
21480
21481 EOF
21482 if { (eval echo configure:21483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21483 then
21484   ac_cv_func_memcmp_clean=yes
21485 else
21486   echo "configure: failed program was:" >&5
21487   cat conftest.$ac_ext >&5
21488   rm -fr conftest*
21489   ac_cv_func_memcmp_clean=no
21490 fi
21491 rm -fr conftest*
21492 fi
21493
21494 fi
21495
21496 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21497 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21498
21499 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21500 echo "configure:21501: checking for strftime" >&5
21501 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21502   echo $ac_n "(cached) $ac_c" 1>&6
21503 else
21504   cat > conftest.$ac_ext <<EOF
21505 #line 21506 "configure"
21506 #include "confdefs.h"
21507 /* System header to define __stub macros and hopefully few prototypes,
21508     which can conflict with char strftime(); below.  */
21509 #include <assert.h>
21510 /* Override any gcc2 internal prototype to avoid an error.  */
21511 /* We use char because int might match the return type of a gcc2
21512     builtin and then its argument prototype would still apply.  */
21513 char strftime();
21514 char (*f)();
21515
21516 int main() {
21517
21518 /* The GNU C library defines this for functions which it implements
21519     to always fail with ENOSYS.  Some functions are actually named
21520     something starting with __ and the normal name is an alias.  */
21521 #if defined (__stub_strftime) || defined (__stub___strftime)
21522 choke me
21523 #else
21524 f = strftime;
21525 #endif
21526
21527 ; return 0; }
21528 EOF
21529 if { (eval echo configure:21530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21530   rm -rf conftest*
21531   eval "ac_cv_func_strftime=yes"
21532 else
21533   echo "configure: failed program was:" >&5
21534   cat conftest.$ac_ext >&5
21535   rm -rf conftest*
21536   eval "ac_cv_func_strftime=no"
21537 fi
21538 rm -f conftest*
21539 fi
21540
21541 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21542   echo "$ac_t""yes" 1>&6
21543   cat >> confdefs.h <<\EOF
21544 #define HAVE_STRFTIME 1
21545 EOF
21546
21547 else
21548   echo "$ac_t""no" 1>&6
21549 # strftime is in -lintl on SCO UNIX.
21550 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21551 echo "configure:21552: checking for strftime in -lintl" >&5
21552 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21554   echo $ac_n "(cached) $ac_c" 1>&6
21555 else
21556   ac_save_LIBS="$LIBS"
21557 LIBS="-lintl  $LIBS"
21558 cat > conftest.$ac_ext <<EOF
21559 #line 21560 "configure"
21560 #include "confdefs.h"
21561 /* Override any gcc2 internal prototype to avoid an error.  */
21562 /* We use char because int might match the return type of a gcc2
21563     builtin and then its argument prototype would still apply.  */
21564 char strftime();
21565
21566 int main() {
21567 strftime()
21568 ; return 0; }
21569 EOF
21570 if { (eval echo configure:21571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21571   rm -rf conftest*
21572   eval "ac_cv_lib_$ac_lib_var=yes"
21573 else
21574   echo "configure: failed program was:" >&5
21575   cat conftest.$ac_ext >&5
21576   rm -rf conftest*
21577   eval "ac_cv_lib_$ac_lib_var=no"
21578 fi
21579 rm -f conftest*
21580 LIBS="$ac_save_LIBS"
21581
21582 fi
21583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21584   echo "$ac_t""yes" 1>&6
21585   cat >> confdefs.h <<\EOF
21586 #define HAVE_STRFTIME 1
21587 EOF
21588
21589 LIBS="-lintl $LIBS"
21590 else
21591   echo "$ac_t""no" 1>&6
21592 fi
21593
21594 fi
21595
21596
21597 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21598 echo "configure:21599: checking for inet_aton()" >&5
21599 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21600   echo $ac_n "(cached) $ac_c" 1>&6
21601 else
21602   cat > conftest.$ac_ext <<EOF
21603 #line 21604 "configure"
21604 #include "confdefs.h"
21605
21606 #ifdef HAVE_SYS_TYPES_H
21607 #       include <sys/types.h>
21608 #endif
21609 #ifdef HAVE_SYS_SOCKET_H
21610 #       include <sys/socket.h>
21611 #       ifdef HAVE_SYS_SELECT_H
21612 #               include <sys/select.h>
21613 #       endif
21614 #       include <netinet/in.h>
21615 #       ifdef HAVE_ARPA_INET_H
21616 #               include <arpa/inet.h>
21617 #       endif
21618 #endif
21619
21620 int main() {
21621 struct in_addr in;
21622 int rc = inet_aton( "255.255.255.255", &in );
21623 ; return 0; }
21624 EOF
21625 if { (eval echo configure:21626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21626   rm -rf conftest*
21627   ol_cv_func_inet_aton=yes
21628 else
21629   echo "configure: failed program was:" >&5
21630   cat conftest.$ac_ext >&5
21631   rm -rf conftest*
21632   ol_cv_func_inet_aton=no
21633 fi
21634 rm -f conftest*
21635 fi
21636
21637 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21638   if test $ol_cv_func_inet_aton != no; then
21639     cat >> confdefs.h <<\EOF
21640 #define HAVE_INET_ATON 1
21641 EOF
21642
21643   fi
21644  
21645
21646 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21647 echo "configure:21648: checking for _spawnlp" >&5
21648 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21649   echo $ac_n "(cached) $ac_c" 1>&6
21650 else
21651   cat > conftest.$ac_ext <<EOF
21652 #line 21653 "configure"
21653 #include "confdefs.h"
21654 /* System header to define __stub macros and hopefully few prototypes,
21655     which can conflict with char _spawnlp(); below.  */
21656 #include <assert.h>
21657 /* Override any gcc2 internal prototype to avoid an error.  */
21658 /* We use char because int might match the return type of a gcc2
21659     builtin and then its argument prototype would still apply.  */
21660 char _spawnlp();
21661 char (*f)();
21662
21663 int main() {
21664
21665 /* The GNU C library defines this for functions which it implements
21666     to always fail with ENOSYS.  Some functions are actually named
21667     something starting with __ and the normal name is an alias.  */
21668 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21669 choke me
21670 #else
21671 f = _spawnlp;
21672 #endif
21673
21674 ; return 0; }
21675 EOF
21676 if { (eval echo configure:21677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21677   rm -rf conftest*
21678   eval "ac_cv_func__spawnlp=yes"
21679 else
21680   echo "configure: failed program was:" >&5
21681   cat conftest.$ac_ext >&5
21682   rm -rf conftest*
21683   eval "ac_cv_func__spawnlp=no"
21684 fi
21685 rm -f conftest*
21686 fi
21687
21688 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21689   echo "$ac_t""yes" 1>&6
21690   cat >> confdefs.h <<\EOF
21691 #define HAVE_SPAWNLP 1
21692 EOF
21693
21694 else
21695   echo "$ac_t""no" 1>&6
21696 fi
21697
21698
21699 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21700 echo "configure:21701: checking for _snprintf" >&5
21701 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21702   echo $ac_n "(cached) $ac_c" 1>&6
21703 else
21704   cat > conftest.$ac_ext <<EOF
21705 #line 21706 "configure"
21706 #include "confdefs.h"
21707 /* System header to define __stub macros and hopefully few prototypes,
21708     which can conflict with char _snprintf(); below.  */
21709 #include <assert.h>
21710 /* Override any gcc2 internal prototype to avoid an error.  */
21711 /* We use char because int might match the return type of a gcc2
21712     builtin and then its argument prototype would still apply.  */
21713 char _snprintf();
21714 char (*f)();
21715
21716 int main() {
21717
21718 /* The GNU C library defines this for functions which it implements
21719     to always fail with ENOSYS.  Some functions are actually named
21720     something starting with __ and the normal name is an alias.  */
21721 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21722 choke me
21723 #else
21724 f = _snprintf;
21725 #endif
21726
21727 ; return 0; }
21728 EOF
21729 if { (eval echo configure:21730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21730   rm -rf conftest*
21731   eval "ac_cv_func__snprintf=yes"
21732 else
21733   echo "configure: failed program was:" >&5
21734   cat conftest.$ac_ext >&5
21735   rm -rf conftest*
21736   eval "ac_cv_func__snprintf=no"
21737 fi
21738 rm -f conftest*
21739 fi
21740
21741 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21742   echo "$ac_t""yes" 1>&6
21743   ac_cv_func_snprintf=yes
21744         cat >> confdefs.h <<\EOF
21745 #define snprintf _snprintf
21746 EOF
21747
21748
21749 else
21750   echo "$ac_t""no" 1>&6
21751 fi
21752
21753
21754 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21755 echo "configure:21756: checking for _vsnprintf" >&5
21756 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21757   echo $ac_n "(cached) $ac_c" 1>&6
21758 else
21759   cat > conftest.$ac_ext <<EOF
21760 #line 21761 "configure"
21761 #include "confdefs.h"
21762 /* System header to define __stub macros and hopefully few prototypes,
21763     which can conflict with char _vsnprintf(); below.  */
21764 #include <assert.h>
21765 /* Override any gcc2 internal prototype to avoid an error.  */
21766 /* We use char because int might match the return type of a gcc2
21767     builtin and then its argument prototype would still apply.  */
21768 char _vsnprintf();
21769 char (*f)();
21770
21771 int main() {
21772
21773 /* The GNU C library defines this for functions which it implements
21774     to always fail with ENOSYS.  Some functions are actually named
21775     something starting with __ and the normal name is an alias.  */
21776 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21777 choke me
21778 #else
21779 f = _vsnprintf;
21780 #endif
21781
21782 ; return 0; }
21783 EOF
21784 if { (eval echo configure:21785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21785   rm -rf conftest*
21786   eval "ac_cv_func__vsnprintf=yes"
21787 else
21788   echo "configure: failed program was:" >&5
21789   cat conftest.$ac_ext >&5
21790   rm -rf conftest*
21791   eval "ac_cv_func__vsnprintf=no"
21792 fi
21793 rm -f conftest*
21794 fi
21795
21796 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21797   echo "$ac_t""yes" 1>&6
21798   ac_cv_func_vsnprintf=yes
21799         cat >> confdefs.h <<\EOF
21800 #define vsnprintf _vsnprintf
21801 EOF
21802
21803
21804 else
21805   echo "$ac_t""no" 1>&6
21806 fi
21807
21808
21809 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21810 echo "configure:21811: checking for vprintf" >&5
21811 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21812   echo $ac_n "(cached) $ac_c" 1>&6
21813 else
21814   cat > conftest.$ac_ext <<EOF
21815 #line 21816 "configure"
21816 #include "confdefs.h"
21817 /* System header to define __stub macros and hopefully few prototypes,
21818     which can conflict with char vprintf(); below.  */
21819 #include <assert.h>
21820 /* Override any gcc2 internal prototype to avoid an error.  */
21821 /* We use char because int might match the return type of a gcc2
21822     builtin and then its argument prototype would still apply.  */
21823 char vprintf();
21824 char (*f)();
21825
21826 int main() {
21827
21828 /* The GNU C library defines this for functions which it implements
21829     to always fail with ENOSYS.  Some functions are actually named
21830     something starting with __ and the normal name is an alias.  */
21831 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21832 choke me
21833 #else
21834 f = vprintf;
21835 #endif
21836
21837 ; return 0; }
21838 EOF
21839 if { (eval echo configure:21840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21840   rm -rf conftest*
21841   eval "ac_cv_func_vprintf=yes"
21842 else
21843   echo "configure: failed program was:" >&5
21844   cat conftest.$ac_ext >&5
21845   rm -rf conftest*
21846   eval "ac_cv_func_vprintf=no"
21847 fi
21848 rm -f conftest*
21849 fi
21850
21851 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21852   echo "$ac_t""yes" 1>&6
21853   cat >> confdefs.h <<\EOF
21854 #define HAVE_VPRINTF 1
21855 EOF
21856
21857 else
21858   echo "$ac_t""no" 1>&6
21859 fi
21860
21861 if test "$ac_cv_func_vprintf" != yes; then
21862 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21863 echo "configure:21864: checking for _doprnt" >&5
21864 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21865   echo $ac_n "(cached) $ac_c" 1>&6
21866 else
21867   cat > conftest.$ac_ext <<EOF
21868 #line 21869 "configure"
21869 #include "confdefs.h"
21870 /* System header to define __stub macros and hopefully few prototypes,
21871     which can conflict with char _doprnt(); below.  */
21872 #include <assert.h>
21873 /* Override any gcc2 internal prototype to avoid an error.  */
21874 /* We use char because int might match the return type of a gcc2
21875     builtin and then its argument prototype would still apply.  */
21876 char _doprnt();
21877 char (*f)();
21878
21879 int main() {
21880
21881 /* The GNU C library defines this for functions which it implements
21882     to always fail with ENOSYS.  Some functions are actually named
21883     something starting with __ and the normal name is an alias.  */
21884 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21885 choke me
21886 #else
21887 f = _doprnt;
21888 #endif
21889
21890 ; return 0; }
21891 EOF
21892 if { (eval echo configure:21893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21893   rm -rf conftest*
21894   eval "ac_cv_func__doprnt=yes"
21895 else
21896   echo "configure: failed program was:" >&5
21897   cat conftest.$ac_ext >&5
21898   rm -rf conftest*
21899   eval "ac_cv_func__doprnt=no"
21900 fi
21901 rm -f conftest*
21902 fi
21903
21904 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21905   echo "$ac_t""yes" 1>&6
21906   cat >> confdefs.h <<\EOF
21907 #define HAVE_DOPRNT 1
21908 EOF
21909
21910 else
21911   echo "$ac_t""no" 1>&6
21912 fi
21913
21914 fi
21915
21916
21917 if test $ac_cv_func_vprintf = yes ; then
21918                 for ac_func in snprintf vsnprintf
21919 do
21920 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21921 echo "configure:21922: checking for $ac_func" >&5
21922 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21923   echo $ac_n "(cached) $ac_c" 1>&6
21924 else
21925   cat > conftest.$ac_ext <<EOF
21926 #line 21927 "configure"
21927 #include "confdefs.h"
21928 /* System header to define __stub macros and hopefully few prototypes,
21929     which can conflict with char $ac_func(); below.  */
21930 #include <assert.h>
21931 /* Override any gcc2 internal prototype to avoid an error.  */
21932 /* We use char because int might match the return type of a gcc2
21933     builtin and then its argument prototype would still apply.  */
21934 char $ac_func();
21935 char (*f)();
21936
21937 int main() {
21938
21939 /* The GNU C library defines this for functions which it implements
21940     to always fail with ENOSYS.  Some functions are actually named
21941     something starting with __ and the normal name is an alias.  */
21942 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21943 choke me
21944 #else
21945 f = $ac_func;
21946 #endif
21947
21948 ; return 0; }
21949 EOF
21950 if { (eval echo configure:21951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21951   rm -rf conftest*
21952   eval "ac_cv_func_$ac_func=yes"
21953 else
21954   echo "configure: failed program was:" >&5
21955   cat conftest.$ac_ext >&5
21956   rm -rf conftest*
21957   eval "ac_cv_func_$ac_func=no"
21958 fi
21959 rm -f conftest*
21960 fi
21961
21962 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21963   echo "$ac_t""yes" 1>&6
21964     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21965   cat >> confdefs.h <<EOF
21966 #define $ac_tr_func 1
21967 EOF
21968  
21969 else
21970   echo "$ac_t""no" 1>&6
21971 fi
21972 done
21973
21974 fi
21975
21976 for ac_func in \
21977         bcopy                   \
21978         closesocket             \
21979         chroot                  \
21980         endgrent                \
21981         endpwent                \
21982         fcntl                   \
21983         flock                   \
21984         fstat                   \
21985         getdtablesize   \
21986         getgrgid                \
21987         gethostname             \
21988         getpass                 \
21989         getpassphrase   \
21990         getpwuid                \
21991         getpwnam                \
21992         getspnam                \
21993         gettimeofday    \
21994         initgroups              \
21995         lockf                   \
21996         memcpy                  \
21997         memmove                 \
21998         mkstemp                 \
21999         mktemp                  \
22000         pipe                    \
22001         read                    \
22002         recv                    \
22003         recvfrom                \
22004         setpwfile               \
22005         setgid                  \
22006         setegid                 \
22007         setsid                  \
22008         setuid                  \
22009         seteuid                 \
22010         sigaction               \
22011         signal                  \
22012         sigset                  \
22013         strdup                  \
22014         strerror                \
22015         strpbrk                 \
22016         strrchr                 \
22017         strsep                  \
22018         strstr                  \
22019         strtol                  \
22020         strtoul                 \
22021         strspn                  \
22022         sysconf                 \
22023         usleep                  \
22024         waitpid                 \
22025         wait4                   \
22026         write                   \
22027         send                    \
22028         sendto                  \
22029
22030 do
22031 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22032 echo "configure:22033: checking for $ac_func" >&5
22033 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22034   echo $ac_n "(cached) $ac_c" 1>&6
22035 else
22036   cat > conftest.$ac_ext <<EOF
22037 #line 22038 "configure"
22038 #include "confdefs.h"
22039 /* System header to define __stub macros and hopefully few prototypes,
22040     which can conflict with char $ac_func(); below.  */
22041 #include <assert.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 $ac_func();
22046 char (*f)();
22047
22048 int main() {
22049
22050 /* The GNU C library defines this for functions which it implements
22051     to always fail with ENOSYS.  Some functions are actually named
22052     something starting with __ and the normal name is an alias.  */
22053 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22054 choke me
22055 #else
22056 f = $ac_func;
22057 #endif
22058
22059 ; return 0; }
22060 EOF
22061 if { (eval echo configure:22062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22062   rm -rf conftest*
22063   eval "ac_cv_func_$ac_func=yes"
22064 else
22065   echo "configure: failed program was:" >&5
22066   cat conftest.$ac_ext >&5
22067   rm -rf conftest*
22068   eval "ac_cv_func_$ac_func=no"
22069 fi
22070 rm -f conftest*
22071 fi
22072
22073 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22074   echo "$ac_t""yes" 1>&6
22075     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22076   cat >> confdefs.h <<EOF
22077 #define $ac_tr_func 1
22078 EOF
22079  
22080 else
22081   echo "$ac_t""no" 1>&6
22082 fi
22083 done
22084
22085
22086 for ac_func in getopt
22087 do
22088 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22089 echo "configure:22090: checking for $ac_func" >&5
22090 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22091   echo $ac_n "(cached) $ac_c" 1>&6
22092 else
22093   cat > conftest.$ac_ext <<EOF
22094 #line 22095 "configure"
22095 #include "confdefs.h"
22096 /* System header to define __stub macros and hopefully few prototypes,
22097     which can conflict with char $ac_func(); below.  */
22098 #include <assert.h>
22099 /* Override any gcc2 internal prototype to avoid an error.  */
22100 /* We use char because int might match the return type of a gcc2
22101     builtin and then its argument prototype would still apply.  */
22102 char $ac_func();
22103 char (*f)();
22104
22105 int main() {
22106
22107 /* The GNU C library defines this for functions which it implements
22108     to always fail with ENOSYS.  Some functions are actually named
22109     something starting with __ and the normal name is an alias.  */
22110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22111 choke me
22112 #else
22113 f = $ac_func;
22114 #endif
22115
22116 ; return 0; }
22117 EOF
22118 if { (eval echo configure:22119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22119   rm -rf conftest*
22120   eval "ac_cv_func_$ac_func=yes"
22121 else
22122   echo "configure: failed program was:" >&5
22123   cat conftest.$ac_ext >&5
22124   rm -rf conftest*
22125   eval "ac_cv_func_$ac_func=no"
22126 fi
22127 rm -f conftest*
22128 fi
22129
22130 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22131   echo "$ac_t""yes" 1>&6
22132     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22133   cat >> confdefs.h <<EOF
22134 #define $ac_tr_func 1
22135 EOF
22136  
22137 else
22138   echo "$ac_t""no" 1>&6
22139 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22140 fi
22141 done
22142
22143
22144
22145 if test "$ac_cv_func_getopt" != yes; then
22146         LIBSRCS="$LIBSRCS getopt.c"
22147 fi
22148 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22149         if test "$ac_cv_func_snprintf" != yes; then
22150                 cat >> confdefs.h <<\EOF
22151 #define snprintf ber_pvt_snprintf
22152 EOF
22153
22154         fi
22155         if test "$ac_cv_func_vsnprintf" != yes; then
22156                 cat >> confdefs.h <<\EOF
22157 #define vsnprintf ber_pvt_vsnprintf
22158 EOF
22159
22160         fi
22161 fi
22162
22163 # Check Configuration
22164 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22165 echo "configure:22166: checking declaration of sys_errlist" >&5
22166 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22167   echo $ac_n "(cached) $ac_c" 1>&6
22168 else
22169   
22170         cat > conftest.$ac_ext <<EOF
22171 #line 22172 "configure"
22172 #include "confdefs.h"
22173
22174 #include <stdio.h>
22175 #include <sys/types.h>
22176 #include <errno.h>
22177 #ifdef WINNT
22178 #include <stdlib.h>
22179 #endif 
22180 int main() {
22181 char *c = (char *) *sys_errlist
22182 ; return 0; }
22183 EOF
22184 if { (eval echo configure:22185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22185   rm -rf conftest*
22186   ol_cv_dcl_sys_errlist=yes
22187         ol_cv_have_sys_errlist=yes
22188 else
22189   echo "configure: failed program was:" >&5
22190   cat conftest.$ac_ext >&5
22191   rm -rf conftest*
22192   ol_cv_dcl_sys_errlist=no
22193 fi
22194 rm -f conftest*
22195 fi
22196
22197 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22198 #
22199 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22200 if test $ol_cv_dcl_sys_errlist = no ; then
22201         cat >> confdefs.h <<\EOF
22202 #define DECL_SYS_ERRLIST 1
22203 EOF
22204
22205
22206         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22207 echo "configure:22208: checking existence of sys_errlist" >&5
22208 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22209   echo $ac_n "(cached) $ac_c" 1>&6
22210 else
22211   
22212                 cat > conftest.$ac_ext <<EOF
22213 #line 22214 "configure"
22214 #include "confdefs.h"
22215 #include <errno.h>
22216 int main() {
22217 char *c = (char *) *sys_errlist
22218 ; return 0; }
22219 EOF
22220 if { (eval echo configure:22221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22221   rm -rf conftest*
22222   ol_cv_have_sys_errlist=yes
22223 else
22224   echo "configure: failed program was:" >&5
22225   cat conftest.$ac_ext >&5
22226   rm -rf conftest*
22227   ol_cv_have_sys_errlist=no
22228 fi
22229 rm -f conftest*
22230 fi
22231
22232 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22233 fi
22234 if test $ol_cv_have_sys_errlist = yes ; then
22235         cat >> confdefs.h <<\EOF
22236 #define HAVE_SYS_ERRLIST 1
22237 EOF
22238
22239 fi
22240
22241
22242
22243 if test "$ol_enable_debug" != no ; then
22244         cat >> confdefs.h <<\EOF
22245 #define LDAP_DEBUG 1
22246 EOF
22247
22248 fi
22249 if test "$ol_enable_syslog" = yes ; then
22250         cat >> confdefs.h <<\EOF
22251 #define LDAP_SYSLOG 1
22252 EOF
22253
22254 fi
22255 if test "$ol_enable_cache" = no ; then
22256         cat >> confdefs.h <<\EOF
22257 #define LDAP_NOCACHE 1
22258 EOF
22259
22260 fi
22261 if test "$ol_link_kbind" != no ; then
22262         cat >> confdefs.h <<\EOF
22263 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22264 EOF
22265
22266 fi
22267 if test "$ol_enable_proctitle" != no ; then
22268         cat >> confdefs.h <<\EOF
22269 #define LDAP_PROCTITLE 1
22270 EOF
22271
22272 fi
22273 if test "$ol_enable_referrals" != no ; then
22274         cat >> confdefs.h <<\EOF
22275 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22276 EOF
22277
22278 fi
22279 if test "$ol_enable_local" != no; then
22280         cat >> confdefs.h <<\EOF
22281 #define LDAP_PF_LOCAL 1
22282 EOF
22283
22284 fi
22285 if test "$ol_link_ipv6" != no; then
22286         cat >> confdefs.h <<\EOF
22287 #define LDAP_PF_INET6 1
22288 EOF
22289
22290 fi
22291 if test "$ol_enable_cleartext" != no ; then
22292         cat >> confdefs.h <<\EOF
22293 #define SLAPD_CLEARTEXT 1
22294 EOF
22295
22296 fi
22297 if test "$ol_enable_crypt" != no ; then
22298         cat >> confdefs.h <<\EOF
22299 #define SLAPD_CRYPT 1
22300 EOF
22301
22302 fi
22303 if test "$ol_link_kpasswd" != no ; then
22304         cat >> confdefs.h <<\EOF
22305 #define SLAPD_KPASSWD 1
22306 EOF
22307
22308 fi
22309 if test "$ol_link_spasswd" != no ; then
22310         cat >> confdefs.h <<\EOF
22311 #define SLAPD_SPASSWD 1
22312 EOF
22313
22314 fi
22315 if test "$ol_enable_multimaster" != no ; then
22316         cat >> confdefs.h <<\EOF
22317 #define SLAPD_MULTIMASTER 1
22318 EOF
22319
22320 fi
22321 if test "$ol_enable_phonetic" != no ; then
22322         cat >> confdefs.h <<\EOF
22323 #define SLAPD_PHONETIC 1
22324 EOF
22325
22326 fi
22327 if test "$ol_enable_rlookups" != no ; then
22328         cat >> confdefs.h <<\EOF
22329 #define SLAPD_RLOOKUPS 1
22330 EOF
22331
22332 fi
22333 if test "$ol_enable_aci" != no ; then
22334         cat >> confdefs.h <<\EOF
22335 #define SLAPD_ACI_ENABLED 1
22336 EOF
22337
22338 fi
22339
22340 if test "$ol_link_modules" != no ; then
22341         cat >> confdefs.h <<\EOF
22342 #define SLAPD_MODULES 1
22343 EOF
22344
22345         BUILD_SLAPD=yes
22346         SLAPD_MODULES_LDFLAGS="-dlopen self"
22347 fi
22348
22349 if test "$ol_enable_bdb" != no ; then
22350         cat >> confdefs.h <<\EOF
22351 #define SLAPD_BDB 1
22352 EOF
22353
22354         BUILD_SLAPD=yes
22355         BUILD_BDB=yes
22356         if test "$ol_with_bdb_module" != static ; then
22357                 cat >> confdefs.h <<\EOF
22358 #define SLAPD_BDB_DYNAMIC 1
22359 EOF
22360
22361                 BUILD_BDB=mod
22362                 BUILD_BDB_DYNAMIC=shared
22363                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22364         else
22365                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22366         fi
22367 fi
22368
22369 if test "$ol_link_dnssrv" != no ; then
22370         cat >> confdefs.h <<\EOF
22371 #define SLAPD_DNSSRV 1
22372 EOF
22373
22374         BUILD_SLAPD=yes
22375         BUILD_DNSSRV=yes
22376         if test "$ol_with_dnssrv_module" != static ; then
22377                 cat >> confdefs.h <<\EOF
22378 #define SLAPD_DNSSRV_DYNAMIC 1
22379 EOF
22380
22381                 BUILD_DNSSRV=mod
22382                 BUILD_DNSSRV_DYNAMIC=shared
22383                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22384         else
22385                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22386         fi
22387 fi
22388
22389 if test "$ol_enable_ldap" != no ; then
22390         cat >> confdefs.h <<\EOF
22391 #define SLAPD_LDAP 1
22392 EOF
22393
22394         BUILD_SLAPD=yes
22395         BUILD_LDAP=yes
22396         if test "$ol_with_ldap_module" != static ; then
22397                 cat >> confdefs.h <<\EOF
22398 #define SLAPD_LDAP_DYNAMIC 1
22399 EOF
22400
22401                 BUILD_LDAP=mod
22402                 BUILD_LDAP_DYNAMIC=shared
22403                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22404         else
22405                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22406         fi
22407 fi
22408
22409 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22410         cat >> confdefs.h <<\EOF
22411 #define SLAPD_LDBM 1
22412 EOF
22413
22414         BUILD_SLAPD=yes
22415         BUILD_LDBM=yes
22416         if test "$ol_with_ldbm_module" != static ; then
22417                 cat >> confdefs.h <<\EOF
22418 #define SLAPD_LDBM_DYNAMIC 1
22419 EOF
22420
22421                 BUILD_LDBM=mod
22422                 BUILD_LDBM_DYNAMIC=shared
22423                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22424         else
22425                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22426         fi
22427 fi
22428
22429 if test "$ol_enable_meta" != no ; then
22430         if test "$ol_enable_ldap" = no ; then
22431                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22432         fi
22433         if test "$ol_enable_rewrite" = no ; then
22434                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22435         fi
22436         cat >> confdefs.h <<\EOF
22437 #define SLAPD_META 1
22438 EOF
22439
22440         BUILD_SLAPD=yes
22441         BUILD_META=yes
22442         BUILD_LDAP=yes
22443         BUILD_REWRITE=yes
22444         if test "$ol_with_meta_module" != static ; then
22445                 cat >> confdefs.h <<\EOF
22446 #define SLAPD_META_DYNAMIC 1
22447 EOF
22448
22449                 BUILD_META=mod
22450                 BUILD_META_DYNAMIC=shared
22451                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22452         else
22453                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22454         fi
22455 fi
22456
22457 if test "$ol_enable_monitor" != no ; then
22458         cat >> confdefs.h <<\EOF
22459 #define SLAPD_MONITOR 1
22460 EOF
22461
22462         BUILD_SLAPD=yes
22463         BUILD_MONITOR=yes
22464         if test "$ol_with_monitor_module" != static ; then
22465                 cat >> confdefs.h <<\EOF
22466 #define SLAPD_MONITOR_DYNAMIC 1
22467 EOF
22468
22469                 BUILD_MONITOR=mod
22470                 BUILD_MONITOR_DYNAMIC=shared
22471                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22472         else
22473                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22474         fi
22475 fi
22476
22477 if test "$ol_enable_null" != no ; then
22478         cat >> confdefs.h <<\EOF
22479 #define SLAPD_NULL 1
22480 EOF
22481
22482         BUILD_SLAPD=yes
22483         BUILD_NULL=yes
22484         if test "$ol_with_null_module" != static ; then
22485                 cat >> confdefs.h <<\EOF
22486 #define SLAPD_NULL_DYNAMIC 1
22487 EOF
22488
22489                 BUILD_NULL=mod
22490                 BUILD_NULL_DYNAMIC=shared
22491                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22492         else
22493                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22494         fi
22495 fi
22496
22497 if test "$ol_enable_passwd" != no ; then
22498         cat >> confdefs.h <<\EOF
22499 #define SLAPD_PASSWD 1
22500 EOF
22501
22502         BUILD_SLAPD=yes
22503         BUILD_PASSWD=yes
22504         if test "$ol_with_passwd_module" != static ; then
22505                 cat >> confdefs.h <<\EOF
22506 #define SLAPD_PASSWD_DYNAMIC 1
22507 EOF
22508
22509                 BUILD_PASSWD=mod
22510                 BUILD_PASSWD_DYNAMIC=shared
22511                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22512         else
22513                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22514         fi
22515 fi
22516
22517 if test "$ol_link_perl" != no ; then
22518         cat >> confdefs.h <<\EOF
22519 #define SLAPD_PERL 1
22520 EOF
22521
22522         BUILD_SLAPD=yes
22523         BUILD_PERL=yes
22524         if test "$ol_with_perl_module" != static ; then
22525                 cat >> confdefs.h <<\EOF
22526 #define SLAPD_PERL_DYNAMIC 1
22527 EOF
22528
22529                 BUILD_PERL=mod
22530                 BUILD_PERL_DYNAMIC=shared
22531                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22532         else
22533                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22534         fi
22535 fi
22536
22537 if test "$ol_enable_shell" != no ; then
22538         if test "$ol_link_thread" != no ; then
22539                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
22540         fi
22541         cat >> confdefs.h <<\EOF
22542 #define SLAPD_SHELL 1
22543 EOF
22544
22545         BUILD_SLAPD=yes
22546         BUILD_SHELL=yes
22547         if test "$ol_with_shell_module" != static ; then
22548                 cat >> confdefs.h <<\EOF
22549 #define SLAPD_SHELL_DYNAMIC 1
22550 EOF
22551
22552                 BUILD_SHELL=mod
22553                 BUILD_SHELL_DYNAMIC=shared
22554                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22555         else
22556                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22557         fi
22558 fi
22559
22560 if test "$ol_enable_tcl" != no ; then
22561         cat >> confdefs.h <<\EOF
22562 #define SLAPD_TCL 1
22563 EOF
22564
22565         BUILD_SLAPD=yes
22566         BUILD_TCL=yes
22567         if test "$ol_with_tcl_module" != static; then
22568                 cat >> confdefs.h <<\EOF
22569 #define SLAPD_TCL_DYNAMIC 1
22570 EOF
22571
22572                 BUILD_TCL=mod
22573                 BUILD_TCL_DYNAMIC=shared
22574                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22575         else
22576                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22577         fi
22578 fi
22579
22580 if test "$ol_link_sql" != no ; then
22581         cat >> confdefs.h <<\EOF
22582 #define SLAPD_SQL 1
22583 EOF
22584
22585         BUILD_SLAPD=yes
22586         BUILD_SQL=yes
22587         if test "$ol_with_sql_module" != static; then
22588                 cat >> confdefs.h <<\EOF
22589 #define SLAPD_SQL_DYNAMIC 1
22590 EOF
22591
22592                 BUILD_SQL=mod
22593                 BUILD_SQL_DYNAMIC=shared
22594                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22595         else
22596                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22597         fi
22598 fi
22599
22600 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22601         $BUILD_SLAPD = yes ; then
22602         BUILD_SLURPD=yes
22603 fi
22604
22605 if test "$ol_enable_rewrite" != no ; then
22606         cat >> confdefs.h <<\EOF
22607 #define ENABLE_REWRITE 1
22608 EOF
22609
22610         BUILD_REWRITE=yes
22611 fi
22612
22613
22614
22615 if test "$ac_cv_mingw32" = yes ; then
22616         PLAT=NT
22617         SLAPD_MODULES_LDFLAGS=
22618 else
22619         PLAT=UNIX
22620 fi
22621
22622 if test -z "$SLAPD_STATIC_BACKENDS"; then
22623         SLAPD_NO_STATIC='#'
22624 else
22625         SLAPD_NO_STATIC=
22626 fi
22627
22628
22629
22630
22631
22632
22633   
22634   
22635   
22636   
22637   
22638   
22639   
22640   
22641   
22642   
22643   
22644   
22645   
22646   
22647   
22648   
22649   
22650   
22651   
22652   
22653   
22654   
22655   
22656   
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695 # Check whether --with-xxinstall or --without-xxinstall was given.
22696 if test "${with_xxinstall+set}" = set; then
22697   withval="$with_xxinstall"
22698   :
22699 fi
22700
22701
22702
22703 trap '' 1 2 15
22704
22705 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22706
22707 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22708 # Let make expand exec_prefix.
22709 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22710
22711 # Any assignment to VPATH causes Sun make to only execute
22712 # the first set of double-colon rules, so remove it if not needed.
22713 # If there is a colon in the path, we need to keep it.
22714 if test "x$srcdir" = x.; then
22715   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22716 fi
22717
22718 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22719
22720 DEFS=-DHAVE_CONFIG_H
22721
22722 # Without the "./", some shells look in PATH for config.status.
22723 : ${CONFIG_STATUS=./config.status}
22724
22725 echo creating $CONFIG_STATUS
22726 rm -f $CONFIG_STATUS
22727 cat > $CONFIG_STATUS <<EOF
22728 #! /bin/sh
22729 # Generated automatically by configure.
22730 # Run this file to recreate the current configuration.
22731 # This directory was configured as follows,
22732 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22733 #
22734 # $0 $ac_configure_args
22735 #
22736 # Compiler output produced by configure, useful for debugging
22737 # configure, is in ./config.log if it exists.
22738
22739 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22740 for ac_option
22741 do
22742   case "\$ac_option" in
22743   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22744     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22745     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22746   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22747     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22748     exit 0 ;;
22749   -help | --help | --hel | --he | --h)
22750     echo "\$ac_cs_usage"; exit 0 ;;
22751   *) echo "\$ac_cs_usage"; exit 1 ;;
22752   esac
22753 done
22754
22755 ac_given_srcdir=$srcdir
22756 ac_given_INSTALL="$INSTALL"
22757
22758 trap 'rm -fr `echo "\
22759 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22760 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22761 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22762 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22763 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22764 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22765 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22766 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22767 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22768 include/Makefile:build/top.mk:include/Makefile.in \
22769 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22770 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22771 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22772 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22773 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22774 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22775 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22776 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22777 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22778 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22779 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22780 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22781 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22782 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22783 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22784 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22785 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22786 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22787 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22788 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22789 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22790 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22791 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22792 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22793 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22794 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22795 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22796 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22797 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22798  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22799 EOF
22800 cat >> $CONFIG_STATUS <<EOF
22801
22802 # Protect against being on the right side of a sed subst in config.status.
22803 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22804  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22805 $ac_vpsub
22806 $extrasub
22807 s%@SHELL@%$SHELL%g
22808 s%@CFLAGS@%$CFLAGS%g
22809 s%@CPPFLAGS@%$CPPFLAGS%g
22810 s%@CXXFLAGS@%$CXXFLAGS%g
22811 s%@FFLAGS@%$FFLAGS%g
22812 s%@DEFS@%$DEFS%g
22813 s%@LDFLAGS@%$LDFLAGS%g
22814 s%@LIBS@%$LIBS%g
22815 s%@exec_prefix@%$exec_prefix%g
22816 s%@prefix@%$prefix%g
22817 s%@program_transform_name@%$program_transform_name%g
22818 s%@bindir@%$bindir%g
22819 s%@sbindir@%$sbindir%g
22820 s%@libexecdir@%$libexecdir%g
22821 s%@datadir@%$datadir%g
22822 s%@sysconfdir@%$sysconfdir%g
22823 s%@sharedstatedir@%$sharedstatedir%g
22824 s%@localstatedir@%$localstatedir%g
22825 s%@libdir@%$libdir%g
22826 s%@includedir@%$includedir%g
22827 s%@oldincludedir@%$oldincludedir%g
22828 s%@infodir@%$infodir%g
22829 s%@mandir@%$mandir%g
22830 s%@host@%$host%g
22831 s%@host_alias@%$host_alias%g
22832 s%@host_cpu@%$host_cpu%g
22833 s%@host_vendor@%$host_vendor%g
22834 s%@host_os@%$host_os%g
22835 s%@target@%$target%g
22836 s%@target_alias@%$target_alias%g
22837 s%@target_cpu@%$target_cpu%g
22838 s%@target_vendor@%$target_vendor%g
22839 s%@target_os@%$target_os%g
22840 s%@build@%$build%g
22841 s%@build_alias@%$build_alias%g
22842 s%@build_cpu@%$build_cpu%g
22843 s%@build_vendor@%$build_vendor%g
22844 s%@build_os@%$build_os%g
22845 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22846 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22847 s%@INSTALL_DATA@%$INSTALL_DATA%g
22848 s%@PACKAGE@%$PACKAGE%g
22849 s%@VERSION@%$VERSION%g
22850 s%@ACLOCAL@%$ACLOCAL%g
22851 s%@AUTOCONF@%$AUTOCONF%g
22852 s%@AUTOMAKE@%$AUTOMAKE%g
22853 s%@AUTOHEADER@%$AUTOHEADER%g
22854 s%@MAKEINFO@%$MAKEINFO%g
22855 s%@install_sh@%$install_sh%g
22856 s%@AMTAR@%$AMTAR%g
22857 s%@AWK@%$AWK%g
22858 s%@AMTARFLAGS@%$AMTARFLAGS%g
22859 s%@SET_MAKE@%$SET_MAKE%g
22860 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22861 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22862 s%@top_builddir@%$top_builddir%g
22863 s%@ldap_subdir@%$ldap_subdir%g
22864 s%@CC@%$CC%g
22865 s%@AR@%$AR%g
22866 s%@LN_S@%$LN_S%g
22867 s%@OBJEXT@%$OBJEXT%g
22868 s%@EXEEXT@%$EXEEXT%g
22869 s%@ECHO@%$ECHO%g
22870 s%@RANLIB@%$RANLIB%g
22871 s%@STRIP@%$STRIP%g
22872 s%@DLLTOOL@%$DLLTOOL%g
22873 s%@AS@%$AS%g
22874 s%@OBJDUMP@%$OBJDUMP%g
22875 s%@CPP@%$CPP%g
22876 s%@LIBTOOL@%$LIBTOOL%g
22877 s%@LTSTATIC@%$LTSTATIC%g
22878 s%@LN_H@%$LN_H%g
22879 s%@PERLBIN@%$PERLBIN%g
22880 s%@OL_MKDEP@%$OL_MKDEP%g
22881 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22882 s%@LIBOBJS@%$LIBOBJS%g
22883 s%@LIBSRCS@%$LIBSRCS%g
22884 s%@PLAT@%$PLAT%g
22885 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22886 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22887 s%@BUILD_BDB@%$BUILD_BDB%g
22888 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22889 s%@BUILD_LDAP@%$BUILD_LDAP%g
22890 s%@BUILD_LDBM@%$BUILD_LDBM%g
22891 s%@BUILD_META@%$BUILD_META%g
22892 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22893 s%@BUILD_NULL@%$BUILD_NULL%g
22894 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22895 s%@BUILD_PERL@%$BUILD_PERL%g
22896 s%@BUILD_SHELL@%$BUILD_SHELL%g
22897 s%@BUILD_SQL@%$BUILD_SQL%g
22898 s%@BUILD_TCL@%$BUILD_TCL%g
22899 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22900 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22901 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22902 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22903 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22904 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22905 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22906 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22907 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22908 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22909 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22910 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22911 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22912 s%@LDAP_LIBS@%$LDAP_LIBS%g
22913 s%@LDIF_LIBS@%$LDIF_LIBS%g
22914 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22915 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22916 s%@LDBM_LIBS@%$LDBM_LIBS%g
22917 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22918 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22919 s%@WRAP_LIBS@%$WRAP_LIBS%g
22920 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22921 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22922 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22923 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
22924 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22925 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22926 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22927 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22928 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22929 s%@KRB4_LIBS@%$KRB4_LIBS%g
22930 s%@KRB5_LIBS@%$KRB5_LIBS%g
22931 s%@READLINE_LIBS@%$READLINE_LIBS%g
22932 s%@SASL_LIBS@%$SASL_LIBS%g
22933 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22934 s%@TLS_LIBS@%$TLS_LIBS%g
22935 s%@MODULES_LIBS@%$MODULES_LIBS%g
22936 s%@AUTH_LIBS@%$AUTH_LIBS%g
22937 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22938 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22939 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22940 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22941
22942 CEOF
22943 EOF
22944
22945 cat >> $CONFIG_STATUS <<\EOF
22946
22947 # Split the substitutions into bite-sized pieces for seds with
22948 # small command number limits, like on Digital OSF/1 and HP-UX.
22949 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22950 ac_file=1 # Number of current file.
22951 ac_beg=1 # First line for current file.
22952 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22953 ac_more_lines=:
22954 ac_sed_cmds=""
22955 while $ac_more_lines; do
22956   if test $ac_beg -gt 1; then
22957     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22958   else
22959     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22960   fi
22961   if test ! -s conftest.s$ac_file; then
22962     ac_more_lines=false
22963     rm -f conftest.s$ac_file
22964   else
22965     if test -z "$ac_sed_cmds"; then
22966       ac_sed_cmds="sed -f conftest.s$ac_file"
22967     else
22968       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22969     fi
22970     ac_file=`expr $ac_file + 1`
22971     ac_beg=$ac_end
22972     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22973   fi
22974 done
22975 if test -z "$ac_sed_cmds"; then
22976   ac_sed_cmds=cat
22977 fi
22978 EOF
22979
22980 cat >> $CONFIG_STATUS <<EOF
22981
22982 CONFIG_FILES=\${CONFIG_FILES-"\
22983 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22984 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22985 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22986 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22987 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22988 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22989 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22990 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22991 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22992 include/Makefile:build/top.mk:include/Makefile.in \
22993 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22994 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22995 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22996 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22997 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22998 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22999 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23000 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23001 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23002 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23003 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23004 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23005 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23006 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23007 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23008 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23009 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23010 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23011 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23012 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23013 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23014 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23015 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23016 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23017 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23018 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23019 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23020 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23021 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23022 "}
23023 EOF
23024 cat >> $CONFIG_STATUS <<\EOF
23025 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23026   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23027   case "$ac_file" in
23028   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23029        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23030   *) ac_file_in="${ac_file}.in" ;;
23031   esac
23032
23033   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23034
23035   # Remove last slash and all that follows it.  Not all systems have dirname.
23036   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23037   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23038     # The file is in a subdirectory.
23039     test ! -d "$ac_dir" && mkdir "$ac_dir"
23040     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23041     # A "../" for each directory in $ac_dir_suffix.
23042     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23043   else
23044     ac_dir_suffix= ac_dots=
23045   fi
23046
23047   case "$ac_given_srcdir" in
23048   .)  srcdir=.
23049       if test -z "$ac_dots"; then top_srcdir=.
23050       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23051   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23052   *) # Relative path.
23053     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23054     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23055   esac
23056
23057   case "$ac_given_INSTALL" in
23058   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23059   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23060   esac
23061
23062   echo creating "$ac_file"
23063   rm -f "$ac_file"
23064   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23065   case "$ac_file" in
23066   *[Mm]akefile*) ac_comsub="1i\\
23067 # $configure_input" ;;
23068   *) ac_comsub= ;;
23069   esac
23070
23071   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23072   sed -e "$ac_comsub
23073 s%@configure_input@%$configure_input%g
23074 s%@srcdir@%$srcdir%g
23075 s%@top_srcdir@%$top_srcdir%g
23076 s%@INSTALL@%$INSTALL%g
23077 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23078 fi; done
23079 rm -f conftest.s*
23080
23081 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23082 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23083 #
23084 # ac_d sets the value in "#define NAME VALUE" lines.
23085 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23086 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23087 ac_dC='\3'
23088 ac_dD='%g'
23089 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23090 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23091 ac_uB='\([      ]\)%\1#\2define\3'
23092 ac_uC=' '
23093 ac_uD='\4%g'
23094 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23095 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23096 ac_eB='$%\1#\2define\3'
23097 ac_eC=' '
23098 ac_eD='%g'
23099
23100 if test "${CONFIG_HEADERS+set}" != set; then
23101 EOF
23102 cat >> $CONFIG_STATUS <<EOF
23103   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23104 EOF
23105 cat >> $CONFIG_STATUS <<\EOF
23106 fi
23107 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23108   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23109   case "$ac_file" in
23110   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23111        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23112   *) ac_file_in="${ac_file}.in" ;;
23113   esac
23114
23115   echo creating $ac_file
23116
23117   rm -f conftest.frag conftest.in conftest.out
23118   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23119   cat $ac_file_inputs > conftest.in
23120
23121 EOF
23122
23123 # Transform confdefs.h into a sed script conftest.vals that substitutes
23124 # the proper values into config.h.in to produce config.h.  And first:
23125 # Protect against being on the right side of a sed subst in config.status.
23126 # Protect against being in an unquoted here document in config.status.
23127 rm -f conftest.vals
23128 cat > conftest.hdr <<\EOF
23129 s/[\\&%]/\\&/g
23130 s%[\\$`]%\\&%g
23131 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23132 s%ac_d%ac_u%gp
23133 s%ac_u%ac_e%gp
23134 EOF
23135 sed -n -f conftest.hdr confdefs.h > conftest.vals
23136 rm -f conftest.hdr
23137
23138 # This sed command replaces #undef with comments.  This is necessary, for
23139 # example, in the case of _POSIX_SOURCE, which is predefined and required
23140 # on some systems where configure will not decide to define it.
23141 cat >> conftest.vals <<\EOF
23142 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23143 EOF
23144
23145 # Break up conftest.vals because some shells have a limit on
23146 # the size of here documents, and old seds have small limits too.
23147
23148 rm -f conftest.tail
23149 while :
23150 do
23151   ac_lines=`grep -c . conftest.vals`
23152   # grep -c gives empty output for an empty file on some AIX systems.
23153   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23154   # Write a limited-size here document to conftest.frag.
23155   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23156   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23157   echo 'CEOF
23158   sed -f conftest.frag conftest.in > conftest.out
23159   rm -f conftest.in
23160   mv conftest.out conftest.in
23161 ' >> $CONFIG_STATUS
23162   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23163   rm -f conftest.vals
23164   mv conftest.tail conftest.vals
23165 done
23166 rm -f conftest.vals
23167
23168 cat >> $CONFIG_STATUS <<\EOF
23169   rm -f conftest.frag conftest.h
23170   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23171   cat conftest.in >> conftest.h
23172   rm -f conftest.in
23173   if cmp -s $ac_file conftest.h 2>/dev/null; then
23174     echo "$ac_file is unchanged"
23175     rm -f conftest.h
23176   else
23177     # Remove last slash and all that follows it.  Not all systems have dirname.
23178       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23179       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23180       # The file is in a subdirectory.
23181       test ! -d "$ac_dir" && mkdir "$ac_dir"
23182     fi
23183     rm -f $ac_file
23184     mv conftest.h $ac_file
23185   fi
23186 fi; done
23187
23188 EOF
23189 cat >> $CONFIG_STATUS <<EOF
23190
23191 EOF
23192 cat >> $CONFIG_STATUS <<\EOF
23193
23194 date > stamp-h
23195 echo Please run \"make depend\" to build dependencies
23196
23197 exit 0
23198 EOF
23199 chmod +x $CONFIG_STATUS
23200 rm -fr confdefs* $ac_clean_files
23201 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23202