]> git.sur5r.net Git - openldap/blob - configure
Disable slapi by default (for now)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.449 2002/12/07 16:19:29 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-slapi   enable installation of slapi library [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend [yes]"
95 ac_help="$ac_help
96     --with-bdb-module     module type static|dynamic [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type static|dynamic [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type static|dynamic [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type static|dynamic [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type static|dynamic [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142     --enable-tcl          enable tcl backend [no]"
143 ac_help="$ac_help
144     --with-tcl-module     module type static|dynamic [static]"
145 ac_help="$ac_help
146
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if test -f $ac_dir/install-sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install-sh -c"
844     break
845   elif test -f $ac_dir/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
876 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
877
878 OPENLDAP_CVS=""
879 if test -d $ac_aux_dir/CVS; then
880         OPENLDAP_CVS="(from CVS sources) "
881 fi
882
883 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
884
885
886 echo $ac_n "checking host system type""... $ac_c" 1>&6
887 echo "configure:888: checking host system type" >&5
888 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
889
890 # Make sure we can run config.sub.
891   if $ac_config_sub sun4 >/dev/null 2>&1; then :
892     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
893   fi
894
895   ac_cv_host_alias=$host
896   case "$ac_cv_host_alias" in
897   NONE)
898     case $nonopt in
899     NONE)
900       if ac_cv_host_alias=`$ac_config_guess`; then :
901       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
902       fi ;;
903     *) ac_cv_host_alias=$nonopt ;;
904     esac ;;
905   esac
906
907   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
908   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
909   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
910   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
911 else
912   echo $ac_n "(cached) $ac_c" 1>&6
913 fi
914
915 echo "$ac_t""$ac_cv_host" 1>&6
916
917 host=$ac_cv_host
918 host_alias=$ac_cv_host_alias
919 host_cpu=$ac_cv_host_cpu
920 host_vendor=$ac_cv_host_vendor
921 host_os=$ac_cv_host_os
922
923
924
925
926
927 echo $ac_n "checking target system type""... $ac_c" 1>&6
928 echo "configure:929: checking target system type" >&5
929 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
930
931 # Make sure we can run config.sub.
932   if $ac_config_sub sun4 >/dev/null 2>&1; then :
933     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
934   fi
935
936   ac_cv_target_alias=$target
937   case "$ac_cv_target_alias" in
938   NONE)
939     case $nonopt in
940     NONE)
941       ac_cv_target_alias=$host_alias ;;
942
943     *) ac_cv_target_alias=$nonopt ;;
944     esac ;;
945   esac
946
947   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
948   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
949   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
950   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
951 else
952   echo $ac_n "(cached) $ac_c" 1>&6
953 fi
954
955 echo "$ac_t""$ac_cv_target" 1>&6
956
957 target=$ac_cv_target
958 target_alias=$ac_cv_target_alias
959 target_cpu=$ac_cv_target_cpu
960 target_vendor=$ac_cv_target_vendor
961 target_os=$ac_cv_target_os
962
963
964
965
966
967 echo $ac_n "checking build system type""... $ac_c" 1>&6
968 echo "configure:969: checking build system type" >&5
969 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
970
971 # Make sure we can run config.sub.
972   if $ac_config_sub sun4 >/dev/null 2>&1; then :
973     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
974   fi
975
976   ac_cv_build_alias=$build
977   case "$ac_cv_build_alias" in
978   NONE)
979     case $nonopt in
980     NONE)
981       ac_cv_build_alias=$host_alias ;;
982
983     *) ac_cv_build_alias=$nonopt ;;
984     esac ;;
985   esac
986
987   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
988   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
989   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
990   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
991 else
992   echo $ac_n "(cached) $ac_c" 1>&6
993 fi
994
995 echo "$ac_t""$ac_cv_build" 1>&6
996
997 build=$ac_cv_build
998 build_alias=$ac_cv_build_alias
999 build_cpu=$ac_cv_build_cpu
1000 build_vendor=$ac_cv_build_vendor
1001 build_os=$ac_cv_build_os
1002
1003
1004
1005
1006
1007 # Do some error checking and defaulting for the host and target type.
1008 # The inputs are:
1009 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1010 #
1011 # The rules are:
1012 # 1. You are not allowed to specify --host, --target, and nonopt at the
1013 #    same time.
1014 # 2. Host defaults to nonopt.
1015 # 3. If nonopt is not specified, then host defaults to the current host,
1016 #    as determined by config.guess.
1017 # 4. Target and build default to nonopt.
1018 # 5. If nonopt is not specified, then target and build default to host.
1019
1020 # The aliases save the names the user supplied, while $host etc.
1021 # will get canonicalized.
1022 case $host---$target---$nonopt in
1023 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1024 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1025 esac
1026
1027 test "$host_alias" != "$target_alias" &&
1028   test "$program_prefix$program_suffix$program_transform_name" = \
1029     NONENONEs,x,x, &&
1030   program_prefix=${target_alias}-
1031
1032
1033 # Find a good install program.  We prefer a C program (faster),
1034 # so one script is as good as another.  But avoid the broken or
1035 # incompatible versions:
1036 # SysV /etc/install, /usr/sbin/install
1037 # SunOS /usr/etc/install
1038 # IRIX /sbin/install
1039 # AIX /bin/install
1040 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1041 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1042 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1043 # ./install, which can be erroneously created by make from ./install.sh.
1044 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1045 echo "configure:1046: checking for a BSD compatible install" >&5
1046 if test -z "$INSTALL"; then
1047 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1048   echo $ac_n "(cached) $ac_c" 1>&6
1049 else
1050     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1051   for ac_dir in $PATH; do
1052     # Account for people who put trailing slashes in PATH elements.
1053     case "$ac_dir/" in
1054     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1055     *)
1056       # OSF1 and SCO ODT 3.0 have their own names for install.
1057       # Don't use installbsd from OSF since it installs stuff as root
1058       # by default.
1059       for ac_prog in ginstall scoinst install; do
1060         if test -f $ac_dir/$ac_prog; then
1061           if test $ac_prog = install &&
1062             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1063             # AIX install.  It has an incompatible calling convention.
1064             :
1065           elif test $ac_prog = install &&
1066             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1067             # program-specific install script used by HP pwplus--don't use.
1068             :
1069           else
1070             ac_cv_path_install="$ac_dir/$ac_prog -c"
1071             break 2
1072           fi
1073         fi
1074       done
1075       ;;
1076     esac
1077   done
1078   IFS="$ac_save_IFS"
1079
1080 fi
1081   if test "${ac_cv_path_install+set}" = set; then
1082     INSTALL="$ac_cv_path_install"
1083   else
1084     # As a last resort, use the slow shell script.  We don't cache a
1085     # path for INSTALL within a source directory, because that will
1086     # break other packages using the cache if that directory is
1087     # removed, or if the path is relative.
1088     INSTALL="$ac_install_sh"
1089   fi
1090 fi
1091 echo "$ac_t""$INSTALL" 1>&6
1092
1093 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1094 # It thinks the first close brace ends the variable substitution.
1095 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1096
1097 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1098
1099 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1100
1101 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1102 echo "configure:1103: checking whether build environment is sane" >&5
1103 # Just in case
1104 sleep 1
1105 echo timestamp > conftestfile
1106 # Do `set' in a subshell so we don't clobber the current shell's
1107 # arguments.  Must try -L first in case configure is actually a
1108 # symlink; some systems play weird games with the mod time of symlinks
1109 # (eg FreeBSD returns the mod time of the symlink's containing
1110 # directory).
1111 if (
1112    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1113    if test "$*" = "X"; then
1114       # -L didn't work.
1115       set X `ls -t $srcdir/configure conftestfile`
1116    fi
1117    if test "$*" != "X $srcdir/configure conftestfile" \
1118       && test "$*" != "X conftestfile $srcdir/configure"; then
1119
1120       # If neither matched, then we have a broken ls.  This can happen
1121       # if, for instance, CONFIG_SHELL is bash and it inherits a
1122       # broken ls alias from the environment.  This has actually
1123       # happened.  Such a system could not be considered "sane".
1124       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1125 alias in your environment" 1>&2; exit 1; }
1126    fi
1127
1128    test "$2" = conftestfile
1129    )
1130 then
1131    # Ok.
1132    :
1133 else
1134    { echo "configure: error: newly created file is older than distributed files!
1135 Check your system clock" 1>&2; exit 1; }
1136 fi
1137 rm -f conftest*
1138 echo "$ac_t""yes" 1>&6
1139 if test "$program_transform_name" = s,x,x,; then
1140   program_transform_name=
1141 else
1142   # Double any \ or $.  echo might interpret backslashes.
1143   cat <<\EOF_SED > conftestsed
1144 s,\\,\\\\,g; s,\$,$$,g
1145 EOF_SED
1146   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1147   rm -f conftestsed
1148 fi
1149 test "$program_prefix" != NONE &&
1150   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1151 # Use a double $ so make ignores it.
1152 test "$program_suffix" != NONE &&
1153   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1154
1155 # sed with no file args requires a program.
1156 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1157
1158 for ac_prog in mawk gawk nawk awk
1159 do
1160 # Extract the first word of "$ac_prog", so it can be a program name with args.
1161 set dummy $ac_prog; ac_word=$2
1162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1163 echo "configure:1164: checking for $ac_word" >&5
1164 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1165   echo $ac_n "(cached) $ac_c" 1>&6
1166 else
1167   if test -n "$AWK"; then
1168   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1169 else
1170   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1171   ac_dummy="$PATH"
1172   for ac_dir in $ac_dummy; do
1173     test -z "$ac_dir" && ac_dir=.
1174     if test -f $ac_dir/$ac_word; then
1175       ac_cv_prog_AWK="$ac_prog"
1176       break
1177     fi
1178   done
1179   IFS="$ac_save_ifs"
1180 fi
1181 fi
1182 AWK="$ac_cv_prog_AWK"
1183 if test -n "$AWK"; then
1184   echo "$ac_t""$AWK" 1>&6
1185 else
1186   echo "$ac_t""no" 1>&6
1187 fi
1188
1189 test -n "$AWK" && break
1190 done
1191
1192 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1193 echo "configure:1194: checking whether ${MAKE-make} sets \${MAKE}" >&5
1194 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1195 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   cat > conftestmake <<\EOF
1199 all:
1200         @echo 'ac_maketemp="${MAKE}"'
1201 EOF
1202 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1203 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1204 if test -n "$ac_maketemp"; then
1205   eval ac_cv_prog_make_${ac_make}_set=yes
1206 else
1207   eval ac_cv_prog_make_${ac_make}_set=no
1208 fi
1209 rm -f conftestmake
1210 fi
1211 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1212   echo "$ac_t""yes" 1>&6
1213   SET_MAKE=
1214 else
1215   echo "$ac_t""no" 1>&6
1216   SET_MAKE="MAKE=${MAKE-make}"
1217 fi
1218
1219
1220
1221 PACKAGE=$OL_PACKAGE
1222
1223 VERSION=$OL_VERSION
1224
1225 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1226   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1227 fi
1228
1229
1230
1231 missing_dir=`cd $ac_aux_dir && pwd`
1232 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1233 echo "configure:1234: checking for working aclocal" >&5
1234 # Run test in a subshell; some versions of sh will print an error if
1235 # an executable is not found, even if stderr is redirected.
1236 # Redirect stdin to placate older versions of autoconf.  Sigh.
1237 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1238    ACLOCAL=aclocal
1239    echo "$ac_t""found" 1>&6
1240 else
1241    ACLOCAL="$missing_dir/missing aclocal"
1242    echo "$ac_t""missing" 1>&6
1243 fi
1244
1245 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1246 echo "configure:1247: checking for working autoconf" >&5
1247 # Run test in a subshell; some versions of sh will print an error if
1248 # an executable is not found, even if stderr is redirected.
1249 # Redirect stdin to placate older versions of autoconf.  Sigh.
1250 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1251    AUTOCONF=autoconf
1252    echo "$ac_t""found" 1>&6
1253 else
1254    AUTOCONF="$missing_dir/missing autoconf"
1255    echo "$ac_t""missing" 1>&6
1256 fi
1257
1258 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1259 echo "configure:1260: checking for working automake" >&5
1260 # Run test in a subshell; some versions of sh will print an error if
1261 # an executable is not found, even if stderr is redirected.
1262 # Redirect stdin to placate older versions of autoconf.  Sigh.
1263 if (automake --version) < /dev/null > /dev/null 2>&1; then
1264    AUTOMAKE=automake
1265    echo "$ac_t""found" 1>&6
1266 else
1267    AUTOMAKE="$missing_dir/missing automake"
1268    echo "$ac_t""missing" 1>&6
1269 fi
1270
1271 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1272 echo "configure:1273: checking for working autoheader" >&5
1273 # Run test in a subshell; some versions of sh will print an error if
1274 # an executable is not found, even if stderr is redirected.
1275 # Redirect stdin to placate older versions of autoconf.  Sigh.
1276 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1277    AUTOHEADER=autoheader
1278    echo "$ac_t""found" 1>&6
1279 else
1280    AUTOHEADER="$missing_dir/missing autoheader"
1281    echo "$ac_t""missing" 1>&6
1282 fi
1283
1284 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1285 echo "configure:1286: checking for working makeinfo" >&5
1286 # Run test in a subshell; some versions of sh will print an error if
1287 # an executable is not found, even if stderr is redirected.
1288 # Redirect stdin to placate older versions of autoconf.  Sigh.
1289 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1290    MAKEINFO=makeinfo
1291    echo "$ac_t""found" 1>&6
1292 else
1293    MAKEINFO="$missing_dir/missing makeinfo"
1294    echo "$ac_t""missing" 1>&6
1295 fi
1296
1297 install_sh="$missing_dir/install-sh"
1298 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1299
1300 for ac_prog in gnutar gtar tar
1301 do
1302 # Extract the first word of "$ac_prog", so it can be a program name with args.
1303 set dummy $ac_prog; ac_word=$2
1304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1305 echo "configure:1306: checking for $ac_word" >&5
1306 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1307   echo $ac_n "(cached) $ac_c" 1>&6
1308 else
1309   if test -n "$AMTAR"; then
1310   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1311 else
1312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1313   ac_dummy="$PATH"
1314   for ac_dir in $ac_dummy; do
1315     test -z "$ac_dir" && ac_dir=.
1316     if test -f $ac_dir/$ac_word; then
1317       ac_cv_prog_AMTAR="$ac_prog"
1318       break
1319     fi
1320   done
1321   IFS="$ac_save_ifs"
1322 fi
1323 fi
1324 AMTAR="$ac_cv_prog_AMTAR"
1325 if test -n "$AMTAR"; then
1326   echo "$ac_t""$AMTAR" 1>&6
1327 else
1328   echo "$ac_t""no" 1>&6
1329 fi
1330
1331 test -n "$AMTAR" && break
1332 done
1333
1334
1335 AMTARFLAGS=
1336 if test -n "$AMTAR"; then
1337   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1338         AMTARFLAGS=o
1339   fi
1340 fi
1341
1342 cat >> confdefs.h <<EOF
1343 #define OPENLDAP_PACKAGE "$PACKAGE"
1344 EOF
1345
1346 cat >> confdefs.h <<EOF
1347 #define OPENLDAP_VERSION "$VERSION"
1348 EOF
1349
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION $OL_API_INC
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1357 EOF
1358
1359 cat >> confdefs.h <<EOF
1360 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1361 EOF
1362
1363 cat >> confdefs.h <<EOF
1364 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1365 EOF
1366
1367
1368 OPENLDAP_LIBVERSION=$OL_API_LIB
1369
1370 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1371
1372
1373
1374 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1375 echo "configure:1376: checking configure arguments" >&5
1376
1377
1378 top_builddir=`pwd`
1379
1380 ldap_subdir="/openldap"
1381
1382 # Check whether --with-subdir or --without-subdir was given.
1383 if test "${with_subdir+set}" = set; then
1384   withval="$with_subdir"
1385   case "$withval" in
1386         no) ldap_subdir=""
1387                 ;;
1388         yes)
1389                 ;;
1390         /*|\\*)
1391                 ldap_subdir="$withval"
1392                 ;;
1393         *)
1394                 ldap_subdir="/$withval"
1395                 ;;
1396 esac
1397
1398 fi
1399
1400
1401 # OpenLDAP --enable-debug
1402         # Check whether --enable-debug or --disable-debug was given.
1403 if test "${enable_debug+set}" = set; then
1404   enableval="$enable_debug"
1405   
1406         ol_arg=invalid
1407         for ol_val in auto yes no ; do
1408                 if test "$enableval" = "$ol_val" ; then
1409                         ol_arg="$ol_val"
1410                 fi
1411         done
1412         if test "$ol_arg" = "invalid" ; then
1413                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1414         fi
1415         ol_enable_debug="$ol_arg"
1416
1417 else
1418         ol_enable_debug="yes"
1419 fi
1420 # end --enable-debug
1421 # OpenLDAP --enable-syslog
1422         # Check whether --enable-syslog or --disable-syslog was given.
1423 if test "${enable_syslog+set}" = set; then
1424   enableval="$enable_syslog"
1425   
1426         ol_arg=invalid
1427         for ol_val in auto yes no ; do
1428                 if test "$enableval" = "$ol_val" ; then
1429                         ol_arg="$ol_val"
1430                 fi
1431         done
1432         if test "$ol_arg" = "invalid" ; then
1433                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1434         fi
1435         ol_enable_syslog="$ol_arg"
1436
1437 else
1438         ol_enable_syslog="auto"
1439 fi
1440 # end --enable-syslog
1441 # OpenLDAP --enable-proctitle
1442         # Check whether --enable-proctitle or --disable-proctitle was given.
1443 if test "${enable_proctitle+set}" = set; then
1444   enableval="$enable_proctitle"
1445   
1446         ol_arg=invalid
1447         for ol_val in auto yes no ; do
1448                 if test "$enableval" = "$ol_val" ; then
1449                         ol_arg="$ol_val"
1450                 fi
1451         done
1452         if test "$ol_arg" = "invalid" ; then
1453                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1454         fi
1455         ol_enable_proctitle="$ol_arg"
1456
1457 else
1458         ol_enable_proctitle="yes"
1459 fi
1460 # end --enable-proctitle
1461 # OpenLDAP --enable-cache
1462         # Check whether --enable-cache or --disable-cache was given.
1463 if test "${enable_cache+set}" = set; then
1464   enableval="$enable_cache"
1465   
1466         ol_arg=invalid
1467         for ol_val in auto yes no ; do
1468                 if test "$enableval" = "$ol_val" ; then
1469                         ol_arg="$ol_val"
1470                 fi
1471         done
1472         if test "$ol_arg" = "invalid" ; then
1473                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1474         fi
1475         ol_enable_cache="$ol_arg"
1476
1477 else
1478         ol_enable_cache="no"
1479 fi
1480 # end --enable-cache
1481 # OpenLDAP --enable-referrals
1482         # Check whether --enable-referrals or --disable-referrals was given.
1483 if test "${enable_referrals+set}" = set; then
1484   enableval="$enable_referrals"
1485   
1486         ol_arg=invalid
1487         for ol_val in auto yes no ; do
1488                 if test "$enableval" = "$ol_val" ; then
1489                         ol_arg="$ol_val"
1490                 fi
1491         done
1492         if test "$ol_arg" = "invalid" ; then
1493                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1494         fi
1495         ol_enable_referrals="$ol_arg"
1496
1497 else
1498         ol_enable_referrals="no"
1499 fi
1500 # end --enable-referrals
1501 ol_enable_kbind=${ol_enable_kbind-no}
1502 # OpenLDAP --enable-ipv6
1503         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1504 if test "${enable_ipv6+set}" = set; then
1505   enableval="$enable_ipv6"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1515         fi
1516         ol_enable_ipv6="$ol_arg"
1517
1518 else
1519         ol_enable_ipv6="auto"
1520 fi
1521 # end --enable-ipv6
1522 # OpenLDAP --enable-local
1523         # Check whether --enable-local or --disable-local was given.
1524 if test "${enable_local+set}" = set; then
1525   enableval="$enable_local"
1526   
1527         ol_arg=invalid
1528         for ol_val in auto yes no ; do
1529                 if test "$enableval" = "$ol_val" ; then
1530                         ol_arg="$ol_val"
1531                 fi
1532         done
1533         if test "$ol_arg" = "invalid" ; then
1534                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1535         fi
1536         ol_enable_local="$ol_arg"
1537
1538 else
1539         ol_enable_local="auto"
1540 fi
1541 # end --enable-local
1542 # OpenLDAP --enable-x_compile
1543         # Check whether --enable-x_compile or --disable-x_compile was given.
1544 if test "${enable_x_compile+set}" = set; then
1545   enableval="$enable_x_compile"
1546   
1547         ol_arg=invalid
1548         for ol_val in yes no ; do
1549                 if test "$enableval" = "$ol_val" ; then
1550                         ol_arg="$ol_val"
1551                 fi
1552         done
1553         if test "$ol_arg" = "invalid" ; then
1554                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1555         fi
1556         ol_enable_x_compile="$ol_arg"
1557
1558 else
1559         ol_enable_x_compile="no"
1560 fi
1561 # end --enable-x_compile
1562
1563
1564 # OpenLDAP --with-cyrus_sasl
1565         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1566 if test "${with_cyrus_sasl+set}" = set; then
1567   withval="$with_cyrus_sasl"
1568   
1569         ol_arg=invalid
1570         for ol_val in auto yes no  ; do
1571                 if test "$withval" = "$ol_val" ; then
1572                         ol_arg="$ol_val"
1573                 fi
1574         done
1575         if test "$ol_arg" = "invalid" ; then
1576                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1577         fi
1578         ol_with_cyrus_sasl="$ol_arg"
1579
1580 else
1581         ol_with_cyrus_sasl="auto"
1582 fi
1583 # end --with-cyrus_sasl
1584
1585 # OpenLDAP --with-fetch
1586         # Check whether --with-fetch or --without-fetch was given.
1587 if test "${with_fetch+set}" = set; then
1588   withval="$with_fetch"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto yes no  ; do
1592                 if test "$withval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1598         fi
1599         ol_with_fetch="$ol_arg"
1600
1601 else
1602         ol_with_fetch="auto"
1603 fi
1604 # end --with-fetch
1605
1606 # OpenLDAP --with-kerberos
1607         # Check whether --with-kerberos or --without-kerberos was given.
1608 if test "${with_kerberos+set}" = set; then
1609   withval="$with_kerberos"
1610   
1611         ol_arg=invalid
1612         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1613                 if test "$withval" = "$ol_val" ; then
1614                         ol_arg="$ol_val"
1615                 fi
1616         done
1617         if test "$ol_arg" = "invalid" ; then
1618                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1619         fi
1620         ol_with_kerberos="$ol_arg"
1621
1622 else
1623         ol_with_kerberos="auto"
1624 fi
1625 # end --with-kerberos
1626
1627 # OpenLDAP --with-readline
1628         # Check whether --with-readline or --without-readline was given.
1629 if test "${with_readline+set}" = set; then
1630   withval="$with_readline"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no  ; do
1634                 if test "$withval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1640         fi
1641         ol_with_readline="$ol_arg"
1642
1643 else
1644         ol_with_readline="auto"
1645 fi
1646 # end --with-readline
1647
1648 # OpenLDAP --with-threads
1649         # Check whether --with-threads or --without-threads was given.
1650 if test "${with_threads+set}" = set; then
1651   withval="$with_threads"
1652   
1653         ol_arg=invalid
1654         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1655                 if test "$withval" = "$ol_val" ; then
1656                         ol_arg="$ol_val"
1657                 fi
1658         done
1659         if test "$ol_arg" = "invalid" ; then
1660                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1661         fi
1662         ol_with_threads="$ol_arg"
1663
1664 else
1665         ol_with_threads="auto"
1666 fi
1667 # end --with-threads
1668
1669 # OpenLDAP --with-tls
1670         # Check whether --with-tls or --without-tls was given.
1671 if test "${with_tls+set}" = set; then
1672   withval="$with_tls"
1673   
1674         ol_arg=invalid
1675         for ol_val in auto ssleay openssl yes no  ; do
1676                 if test "$withval" = "$ol_val" ; then
1677                         ol_arg="$ol_val"
1678                 fi
1679         done
1680         if test "$ol_arg" = "invalid" ; then
1681                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1682         fi
1683         ol_with_tls="$ol_arg"
1684
1685 else
1686         ol_with_tls="auto"
1687 fi
1688 # end --with-tls
1689
1690 # OpenLDAP --with-yielding_select
1691         # Check whether --with-yielding_select or --without-yielding_select was given.
1692 if test "${with_yielding_select+set}" = set; then
1693   withval="$with_yielding_select"
1694   
1695         ol_arg=invalid
1696         for ol_val in auto yes no manual  ; do
1697                 if test "$withval" = "$ol_val" ; then
1698                         ol_arg="$ol_val"
1699                 fi
1700         done
1701         if test "$ol_arg" = "invalid" ; then
1702                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1703         fi
1704         ol_with_yielding_select="$ol_arg"
1705
1706 else
1707         ol_with_yielding_select="auto"
1708 fi
1709 # end --with-yielding_select
1710
1711
1712
1713 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1714 if test "${with_xxslapdoptions+set}" = set; then
1715   withval="$with_xxslapdoptions"
1716   :
1717 fi
1718
1719 # OpenLDAP --enable-slapd
1720         # Check whether --enable-slapd or --disable-slapd was given.
1721 if test "${enable_slapd+set}" = set; then
1722   enableval="$enable_slapd"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no ; do
1726                 if test "$enableval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1732         fi
1733         ol_enable_slapd="$ol_arg"
1734
1735 else
1736         ol_enable_slapd="yes"
1737 fi
1738 # end --enable-slapd
1739 # OpenLDAP --enable-aci
1740         # Check whether --enable-aci or --disable-aci was given.
1741 if test "${enable_aci+set}" = set; then
1742   enableval="$enable_aci"
1743   
1744         ol_arg=invalid
1745         for ol_val in auto yes no ; do
1746                 if test "$enableval" = "$ol_val" ; then
1747                         ol_arg="$ol_val"
1748                 fi
1749         done
1750         if test "$ol_arg" = "invalid" ; then
1751                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1752         fi
1753         ol_enable_aci="$ol_arg"
1754
1755 else
1756         ol_enable_aci="no"
1757 fi
1758 # end --enable-aci
1759 # OpenLDAP --enable-cleartext
1760         # Check whether --enable-cleartext or --disable-cleartext was given.
1761 if test "${enable_cleartext+set}" = set; then
1762   enableval="$enable_cleartext"
1763   
1764         ol_arg=invalid
1765         for ol_val in auto yes no ; do
1766                 if test "$enableval" = "$ol_val" ; then
1767                         ol_arg="$ol_val"
1768                 fi
1769         done
1770         if test "$ol_arg" = "invalid" ; then
1771                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1772         fi
1773         ol_enable_cleartext="$ol_arg"
1774
1775 else
1776         ol_enable_cleartext="yes"
1777 fi
1778 # end --enable-cleartext
1779 # OpenLDAP --enable-crypt
1780         # Check whether --enable-crypt or --disable-crypt was given.
1781 if test "${enable_crypt+set}" = set; then
1782   enableval="$enable_crypt"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1792         fi
1793         ol_enable_crypt="$ol_arg"
1794
1795 else
1796         ol_enable_crypt="no"
1797 fi
1798 # end --enable-crypt
1799 # OpenLDAP --enable-dynamic
1800         # Check whether --enable-dynamic or --disable-dynamic was given.
1801 if test "${enable_dynamic+set}" = set; then
1802   enableval="$enable_dynamic"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1812         fi
1813         ol_enable_dynamic="$ol_arg"
1814
1815 else
1816         ol_enable_dynamic="no"
1817 fi
1818 # end --enable-dynamic
1819 # OpenLDAP --enable-kpasswd
1820         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1821 if test "${enable_kpasswd+set}" = set; then
1822   enableval="$enable_kpasswd"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1832         fi
1833         ol_enable_kpasswd="$ol_arg"
1834
1835 else
1836         ol_enable_kpasswd="no"
1837 fi
1838 # end --enable-kpasswd
1839 # OpenLDAP --enable-lmpasswd
1840         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1841 if test "${enable_lmpasswd+set}" = set; then
1842   enableval="$enable_lmpasswd"
1843   
1844         ol_arg=invalid
1845         for ol_val in auto yes no ; do
1846                 if test "$enableval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1852         fi
1853         ol_enable_lmpasswd="$ol_arg"
1854
1855 else
1856         ol_enable_lmpasswd="no"
1857 fi
1858 # end --enable-lmpasswd
1859 # OpenLDAP --enable-spasswd
1860         # Check whether --enable-spasswd or --disable-spasswd was given.
1861 if test "${enable_spasswd+set}" = set; then
1862   enableval="$enable_spasswd"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1872         fi
1873         ol_enable_spasswd="$ol_arg"
1874
1875 else
1876         ol_enable_spasswd="no"
1877 fi
1878 # end --enable-spasswd
1879 # OpenLDAP --enable-modules
1880         # Check whether --enable-modules or --disable-modules was given.
1881 if test "${enable_modules+set}" = set; then
1882   enableval="$enable_modules"
1883   
1884         ol_arg=invalid
1885         for ol_val in auto yes no ; do
1886                 if test "$enableval" = "$ol_val" ; then
1887                         ol_arg="$ol_val"
1888                 fi
1889         done
1890         if test "$ol_arg" = "invalid" ; then
1891                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1892         fi
1893         ol_enable_modules="$ol_arg"
1894
1895 else
1896         ol_enable_modules="no"
1897 fi
1898 # end --enable-modules
1899 ol_enable_multimaster=${ol_enable_multimaster-no}
1900 # OpenLDAP --enable-phonetic
1901         # Check whether --enable-phonetic or --disable-phonetic was given.
1902 if test "${enable_phonetic+set}" = set; then
1903   enableval="$enable_phonetic"
1904   
1905         ol_arg=invalid
1906         for ol_val in auto yes no ; do
1907                 if test "$enableval" = "$ol_val" ; then
1908                         ol_arg="$ol_val"
1909                 fi
1910         done
1911         if test "$ol_arg" = "invalid" ; then
1912                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1913         fi
1914         ol_enable_phonetic="$ol_arg"
1915
1916 else
1917         ol_enable_phonetic="no"
1918 fi
1919 # end --enable-phonetic
1920 # OpenLDAP --enable-rewrite
1921         # Check whether --enable-rewrite or --disable-rewrite was given.
1922 if test "${enable_rewrite+set}" = set; then
1923   enableval="$enable_rewrite"
1924   
1925         ol_arg=invalid
1926         for ol_val in auto yes no ; do
1927                 if test "$enableval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1933         fi
1934         ol_enable_rewrite="$ol_arg"
1935
1936 else
1937         ol_enable_rewrite="no"
1938 fi
1939 # end --enable-rewrite
1940 # OpenLDAP --enable-rlookups
1941         # Check whether --enable-rlookups or --disable-rlookups was given.
1942 if test "${enable_rlookups+set}" = set; then
1943   enableval="$enable_rlookups"
1944   
1945         ol_arg=invalid
1946         for ol_val in auto yes no ; do
1947                 if test "$enableval" = "$ol_val" ; then
1948                         ol_arg="$ol_val"
1949                 fi
1950         done
1951         if test "$ol_arg" = "invalid" ; then
1952                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1953         fi
1954         ol_enable_rlookups="$ol_arg"
1955
1956 else
1957         ol_enable_rlookups="no"
1958 fi
1959 # end --enable-rlookups
1960 # OpenLDAP --enable-slp
1961         # Check whether --enable-slp or --disable-slp was given.
1962 if test "${enable_slp+set}" = set; then
1963   enableval="$enable_slp"
1964   
1965         ol_arg=invalid
1966         for ol_val in auto yes no ; do
1967                 if test "$enableval" = "$ol_val" ; then
1968                         ol_arg="$ol_val"
1969                 fi
1970         done
1971         if test "$ol_arg" = "invalid" ; then
1972                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1973         fi
1974         ol_enable_slp="$ol_arg"
1975
1976 else
1977         ol_enable_slp="no"
1978 fi
1979 # end --enable-slp
1980 # OpenLDAP --enable-wrappers
1981         # Check whether --enable-wrappers or --disable-wrappers was given.
1982 if test "${enable_wrappers+set}" = set; then
1983   enableval="$enable_wrappers"
1984   
1985         ol_arg=invalid
1986         for ol_val in auto yes no ; do
1987                 if test "$enableval" = "$ol_val" ; then
1988                         ol_arg="$ol_val"
1989                 fi
1990         done
1991         if test "$ol_arg" = "invalid" ; then
1992                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1993         fi
1994         ol_enable_wrappers="$ol_arg"
1995
1996 else
1997         ol_enable_wrappers="no"
1998 fi
1999 # end --enable-wrappers
2000
2001 # OpenLDAP --enable-slapi
2002         # Check whether --enable-slapi or --disable-slapi was given.
2003 if test "${enable_slapi+set}" = set; then
2004   enableval="$enable_slapi"
2005   
2006         ol_arg=invalid
2007         for ol_val in auto yes no ; do
2008                 if test "$enableval" = "$ol_val" ; then
2009                         ol_arg="$ol_val"
2010                 fi
2011         done
2012         if test "$ol_arg" = "invalid" ; then
2013                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
2014         fi
2015         ol_enable_slapi="$ol_arg"
2016
2017 else
2018         ol_enable_slapi="no"
2019 fi
2020 # end --enable-slapi
2021
2022 # OpenLDAP --enable-bdb
2023         # Check whether --enable-bdb or --disable-bdb was given.
2024 if test "${enable_bdb+set}" = set; then
2025   enableval="$enable_bdb"
2026   
2027         ol_arg=invalid
2028         for ol_val in auto yes no ; do
2029                 if test "$enableval" = "$ol_val" ; then
2030                         ol_arg="$ol_val"
2031                 fi
2032         done
2033         if test "$ol_arg" = "invalid" ; then
2034                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2035         fi
2036         ol_enable_bdb="$ol_arg"
2037
2038 else
2039         ol_enable_bdb="yes"
2040 fi
2041 # end --enable-bdb
2042 # OpenLDAP --with-bdb_module
2043         # Check whether --with-bdb_module or --without-bdb_module was given.
2044 if test "${with_bdb_module+set}" = set; then
2045   withval="$with_bdb_module"
2046   
2047         ol_arg=invalid
2048         for ol_val in static dynamic ; do
2049                 if test "$withval" = "$ol_val" ; then
2050                         ol_arg="$ol_val"
2051                 fi
2052         done
2053         if test "$ol_arg" = "invalid" ; then
2054                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2055         fi
2056         ol_with_bdb_module="$ol_arg"
2057
2058 else
2059         ol_with_bdb_module="static"
2060 fi
2061 # end --with-bdb_module
2062
2063 # OpenLDAP --enable-dnssrv
2064         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2065 if test "${enable_dnssrv+set}" = set; then
2066   enableval="$enable_dnssrv"
2067   
2068         ol_arg=invalid
2069         for ol_val in auto yes no ; do
2070                 if test "$enableval" = "$ol_val" ; then
2071                         ol_arg="$ol_val"
2072                 fi
2073         done
2074         if test "$ol_arg" = "invalid" ; then
2075                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2076         fi
2077         ol_enable_dnssrv="$ol_arg"
2078
2079 else
2080         ol_enable_dnssrv="no"
2081 fi
2082 # end --enable-dnssrv
2083 # OpenLDAP --with-dnssrv_module
2084         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2085 if test "${with_dnssrv_module+set}" = set; then
2086   withval="$with_dnssrv_module"
2087   
2088         ol_arg=invalid
2089         for ol_val in static dynamic ; do
2090                 if test "$withval" = "$ol_val" ; then
2091                         ol_arg="$ol_val"
2092                 fi
2093         done
2094         if test "$ol_arg" = "invalid" ; then
2095                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2096         fi
2097         ol_with_dnssrv_module="$ol_arg"
2098
2099 else
2100         ol_with_dnssrv_module="static"
2101 fi
2102 # end --with-dnssrv_module
2103
2104 # OpenLDAP --enable-ldap
2105         # Check whether --enable-ldap or --disable-ldap was given.
2106 if test "${enable_ldap+set}" = set; then
2107   enableval="$enable_ldap"
2108   
2109         ol_arg=invalid
2110         for ol_val in auto yes no ; do
2111                 if test "$enableval" = "$ol_val" ; then
2112                         ol_arg="$ol_val"
2113                 fi
2114         done
2115         if test "$ol_arg" = "invalid" ; then
2116                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2117         fi
2118         ol_enable_ldap="$ol_arg"
2119
2120 else
2121         ol_enable_ldap="no"
2122 fi
2123 # end --enable-ldap
2124 # OpenLDAP --with-ldap_module
2125         # Check whether --with-ldap_module or --without-ldap_module was given.
2126 if test "${with_ldap_module+set}" = set; then
2127   withval="$with_ldap_module"
2128   
2129         ol_arg=invalid
2130         for ol_val in static dynamic ; do
2131                 if test "$withval" = "$ol_val" ; then
2132                         ol_arg="$ol_val"
2133                 fi
2134         done
2135         if test "$ol_arg" = "invalid" ; then
2136                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2137         fi
2138         ol_with_ldap_module="$ol_arg"
2139
2140 else
2141         ol_with_ldap_module="static"
2142 fi
2143 # end --with-ldap_module
2144
2145 # OpenLDAP --enable-ldbm
2146         # Check whether --enable-ldbm or --disable-ldbm was given.
2147 if test "${enable_ldbm+set}" = set; then
2148   enableval="$enable_ldbm"
2149   
2150         ol_arg=invalid
2151         for ol_val in auto yes no ; do
2152                 if test "$enableval" = "$ol_val" ; then
2153                         ol_arg="$ol_val"
2154                 fi
2155         done
2156         if test "$ol_arg" = "invalid" ; then
2157                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2158         fi
2159         ol_enable_ldbm="$ol_arg"
2160
2161 else
2162         ol_enable_ldbm="no"
2163 fi
2164 # end --enable-ldbm
2165 # OpenLDAP --with-ldbm_api
2166         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2167 if test "${with_ldbm_api+set}" = set; then
2168   withval="$with_ldbm_api"
2169   
2170         ol_arg=invalid
2171         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2172                 if test "$withval" = "$ol_val" ; then
2173                         ol_arg="$ol_val"
2174                 fi
2175         done
2176         if test "$ol_arg" = "invalid" ; then
2177                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2178         fi
2179         ol_with_ldbm_api="$ol_arg"
2180
2181 else
2182         ol_with_ldbm_api="auto"
2183 fi
2184 # end --with-ldbm_api
2185
2186 # OpenLDAP --with-ldbm_module
2187         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2188 if test "${with_ldbm_module+set}" = set; then
2189   withval="$with_ldbm_module"
2190   
2191         ol_arg=invalid
2192         for ol_val in static dynamic ; do
2193                 if test "$withval" = "$ol_val" ; then
2194                         ol_arg="$ol_val"
2195                 fi
2196         done
2197         if test "$ol_arg" = "invalid" ; then
2198                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2199         fi
2200         ol_with_ldbm_module="$ol_arg"
2201
2202 else
2203         ol_with_ldbm_module="static"
2204 fi
2205 # end --with-ldbm_module
2206
2207 # OpenLDAP --with-ldbm_type
2208         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2209 if test "${with_ldbm_type+set}" = set; then
2210   withval="$with_ldbm_type"
2211   
2212         ol_arg=invalid
2213         for ol_val in auto btree hash ; do
2214                 if test "$withval" = "$ol_val" ; then
2215                         ol_arg="$ol_val"
2216                 fi
2217         done
2218         if test "$ol_arg" = "invalid" ; then
2219                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2220         fi
2221         ol_with_ldbm_type="$ol_arg"
2222
2223 else
2224         ol_with_ldbm_type="auto"
2225 fi
2226 # end --with-ldbm_type
2227
2228 # OpenLDAP --enable-meta
2229         # Check whether --enable-meta or --disable-meta was given.
2230 if test "${enable_meta+set}" = set; then
2231   enableval="$enable_meta"
2232   
2233         ol_arg=invalid
2234         for ol_val in auto yes no ; do
2235                 if test "$enableval" = "$ol_val" ; then
2236                         ol_arg="$ol_val"
2237                 fi
2238         done
2239         if test "$ol_arg" = "invalid" ; then
2240                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2241         fi
2242         ol_enable_meta="$ol_arg"
2243
2244 else
2245         ol_enable_meta="no"
2246 fi
2247 # end --enable-meta
2248 # OpenLDAP --with-meta_module
2249         # Check whether --with-meta_module or --without-meta_module was given.
2250 if test "${with_meta_module+set}" = set; then
2251   withval="$with_meta_module"
2252   
2253         ol_arg=invalid
2254         for ol_val in static dynamic ; do
2255                 if test "$withval" = "$ol_val" ; then
2256                         ol_arg="$ol_val"
2257                 fi
2258         done
2259         if test "$ol_arg" = "invalid" ; then
2260                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2261         fi
2262         ol_with_meta_module="$ol_arg"
2263
2264 else
2265         ol_with_meta_module="static"
2266 fi
2267 # end --with-meta_module
2268
2269 # OpenLDAP --enable-monitor
2270         # Check whether --enable-monitor or --disable-monitor was given.
2271 if test "${enable_monitor+set}" = set; then
2272   enableval="$enable_monitor"
2273   
2274         ol_arg=invalid
2275         for ol_val in auto yes no ; do
2276                 if test "$enableval" = "$ol_val" ; then
2277                         ol_arg="$ol_val"
2278                 fi
2279         done
2280         if test "$ol_arg" = "invalid" ; then
2281                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2282         fi
2283         ol_enable_monitor="$ol_arg"
2284
2285 else
2286         ol_enable_monitor="no"
2287 fi
2288 # end --enable-monitor
2289 # OpenLDAP --with-monitor_module
2290         # Check whether --with-monitor_module or --without-monitor_module was given.
2291 if test "${with_monitor_module+set}" = set; then
2292   withval="$with_monitor_module"
2293   
2294         ol_arg=invalid
2295         for ol_val in static dynamic ; do
2296                 if test "$withval" = "$ol_val" ; then
2297                         ol_arg="$ol_val"
2298                 fi
2299         done
2300         if test "$ol_arg" = "invalid" ; then
2301                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2302         fi
2303         ol_with_monitor_module="$ol_arg"
2304
2305 else
2306         ol_with_monitor_module="static"
2307 fi
2308 # end --with-monitor_module
2309
2310 # OpenLDAP --enable-null
2311         # Check whether --enable-null or --disable-null was given.
2312 if test "${enable_null+set}" = set; then
2313   enableval="$enable_null"
2314   
2315         ol_arg=invalid
2316         for ol_val in auto yes no ; do
2317                 if test "$enableval" = "$ol_val" ; then
2318                         ol_arg="$ol_val"
2319                 fi
2320         done
2321         if test "$ol_arg" = "invalid" ; then
2322                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2323         fi
2324         ol_enable_null="$ol_arg"
2325
2326 else
2327         ol_enable_null="no"
2328 fi
2329 # end --enable-null
2330 # OpenLDAP --with-null_module
2331         # Check whether --with-null_module or --without-null_module was given.
2332 if test "${with_null_module+set}" = set; then
2333   withval="$with_null_module"
2334   
2335         ol_arg=invalid
2336         for ol_val in static dynamic ; do
2337                 if test "$withval" = "$ol_val" ; then
2338                         ol_arg="$ol_val"
2339                 fi
2340         done
2341         if test "$ol_arg" = "invalid" ; then
2342                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2343         fi
2344         ol_with_null_module="$ol_arg"
2345
2346 else
2347         ol_with_null_module="static"
2348 fi
2349 # end --with-null_module
2350
2351 # OpenLDAP --enable-passwd
2352         # Check whether --enable-passwd or --disable-passwd was given.
2353 if test "${enable_passwd+set}" = set; then
2354   enableval="$enable_passwd"
2355   
2356         ol_arg=invalid
2357         for ol_val in auto yes no ; do
2358                 if test "$enableval" = "$ol_val" ; then
2359                         ol_arg="$ol_val"
2360                 fi
2361         done
2362         if test "$ol_arg" = "invalid" ; then
2363                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2364         fi
2365         ol_enable_passwd="$ol_arg"
2366
2367 else
2368         ol_enable_passwd="no"
2369 fi
2370 # end --enable-passwd
2371 # OpenLDAP --with-passwd_module
2372         # Check whether --with-passwd_module or --without-passwd_module was given.
2373 if test "${with_passwd_module+set}" = set; then
2374   withval="$with_passwd_module"
2375   
2376         ol_arg=invalid
2377         for ol_val in static dynamic ; do
2378                 if test "$withval" = "$ol_val" ; then
2379                         ol_arg="$ol_val"
2380                 fi
2381         done
2382         if test "$ol_arg" = "invalid" ; then
2383                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2384         fi
2385         ol_with_passwd_module="$ol_arg"
2386
2387 else
2388         ol_with_passwd_module="static"
2389 fi
2390 # end --with-passwd_module
2391
2392 # OpenLDAP --enable-perl
2393         # Check whether --enable-perl or --disable-perl was given.
2394 if test "${enable_perl+set}" = set; then
2395   enableval="$enable_perl"
2396   
2397         ol_arg=invalid
2398         for ol_val in auto yes no ; do
2399                 if test "$enableval" = "$ol_val" ; then
2400                         ol_arg="$ol_val"
2401                 fi
2402         done
2403         if test "$ol_arg" = "invalid" ; then
2404                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2405         fi
2406         ol_enable_perl="$ol_arg"
2407
2408 else
2409         ol_enable_perl="no"
2410 fi
2411 # end --enable-perl
2412 # OpenLDAP --with-perl_module
2413         # Check whether --with-perl_module or --without-perl_module was given.
2414 if test "${with_perl_module+set}" = set; then
2415   withval="$with_perl_module"
2416   
2417         ol_arg=invalid
2418         for ol_val in static dynamic ; do
2419                 if test "$withval" = "$ol_val" ; then
2420                         ol_arg="$ol_val"
2421                 fi
2422         done
2423         if test "$ol_arg" = "invalid" ; then
2424                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2425         fi
2426         ol_with_perl_module="$ol_arg"
2427
2428 else
2429         ol_with_perl_module="static"
2430 fi
2431 # end --with-perl_module
2432
2433 # OpenLDAP --enable-shell
2434         # Check whether --enable-shell or --disable-shell was given.
2435 if test "${enable_shell+set}" = set; then
2436   enableval="$enable_shell"
2437   
2438         ol_arg=invalid
2439         for ol_val in auto yes no ; do
2440                 if test "$enableval" = "$ol_val" ; then
2441                         ol_arg="$ol_val"
2442                 fi
2443         done
2444         if test "$ol_arg" = "invalid" ; then
2445                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2446         fi
2447         ol_enable_shell="$ol_arg"
2448
2449 else
2450         ol_enable_shell="no"
2451 fi
2452 # end --enable-shell
2453 # OpenLDAP --with-shell_module
2454         # Check whether --with-shell_module or --without-shell_module was given.
2455 if test "${with_shell_module+set}" = set; then
2456   withval="$with_shell_module"
2457   
2458         ol_arg=invalid
2459         for ol_val in static dynamic ; do
2460                 if test "$withval" = "$ol_val" ; then
2461                         ol_arg="$ol_val"
2462                 fi
2463         done
2464         if test "$ol_arg" = "invalid" ; then
2465                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2466         fi
2467         ol_with_shell_module="$ol_arg"
2468
2469 else
2470         ol_with_shell_module="static"
2471 fi
2472 # end --with-shell_module
2473
2474 # OpenLDAP --enable-sql
2475         # Check whether --enable-sql or --disable-sql was given.
2476 if test "${enable_sql+set}" = set; then
2477   enableval="$enable_sql"
2478   
2479         ol_arg=invalid
2480         for ol_val in auto yes no ; do
2481                 if test "$enableval" = "$ol_val" ; then
2482                         ol_arg="$ol_val"
2483                 fi
2484         done
2485         if test "$ol_arg" = "invalid" ; then
2486                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2487         fi
2488         ol_enable_sql="$ol_arg"
2489
2490 else
2491         ol_enable_sql="no"
2492 fi
2493 # end --enable-sql
2494 # OpenLDAP --with-sql_module
2495         # Check whether --with-sql_module or --without-sql_module was given.
2496 if test "${with_sql_module+set}" = set; then
2497   withval="$with_sql_module"
2498   
2499         ol_arg=invalid
2500         for ol_val in static dynamic ; do
2501                 if test "$withval" = "$ol_val" ; then
2502                         ol_arg="$ol_val"
2503                 fi
2504         done
2505         if test "$ol_arg" = "invalid" ; then
2506                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2507         fi
2508         ol_with_sql_module="$ol_arg"
2509
2510 else
2511         ol_with_sql_module="static"
2512 fi
2513 # end --with-sql_module
2514
2515 # OpenLDAP --enable-tcl
2516         # Check whether --enable-tcl or --disable-tcl was given.
2517 if test "${enable_tcl+set}" = set; then
2518   enableval="$enable_tcl"
2519   
2520         ol_arg=invalid
2521         for ol_val in auto yes no ; do
2522                 if test "$enableval" = "$ol_val" ; then
2523                         ol_arg="$ol_val"
2524                 fi
2525         done
2526         if test "$ol_arg" = "invalid" ; then
2527                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2528         fi
2529         ol_enable_tcl="$ol_arg"
2530
2531 else
2532         ol_enable_tcl="no"
2533 fi
2534 # end --enable-tcl
2535 # OpenLDAP --with-tcl_module
2536         # Check whether --with-tcl_module or --without-tcl_module was given.
2537 if test "${with_tcl_module+set}" = set; then
2538   withval="$with_tcl_module"
2539   
2540         ol_arg=invalid
2541         for ol_val in static dynamic ; do
2542                 if test "$withval" = "$ol_val" ; then
2543                         ol_arg="$ol_val"
2544                 fi
2545         done
2546         if test "$ol_arg" = "invalid" ; then
2547                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2548         fi
2549         ol_with_tcl_module="$ol_arg"
2550
2551 else
2552         ol_with_tcl_module="static"
2553 fi
2554 # end --with-tcl_module
2555
2556
2557 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2558 if test "${with_xxslurpdoptions+set}" = set; then
2559   withval="$with_xxslurpdoptions"
2560   :
2561 fi
2562
2563 # OpenLDAP --enable-slurpd
2564         # Check whether --enable-slurpd or --disable-slurpd was given.
2565 if test "${enable_slurpd+set}" = set; then
2566   enableval="$enable_slurpd"
2567   
2568         ol_arg=invalid
2569         for ol_val in auto yes no ; do
2570                 if test "$enableval" = "$ol_val" ; then
2571                         ol_arg="$ol_val"
2572                 fi
2573         done
2574         if test "$ol_arg" = "invalid" ; then
2575                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2576         fi
2577         ol_enable_slurpd="$ol_arg"
2578
2579 else
2580         ol_enable_slurpd="auto"
2581 fi
2582 # end --enable-slurpd
2583
2584 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2585 if test "${with_xxliboptions+set}" = set; then
2586   withval="$with_xxliboptions"
2587   :
2588 fi
2589
2590 # Check whether --enable-static or --disable-static was given.
2591 if test "${enable_static+set}" = set; then
2592   enableval="$enable_static"
2593   p=${PACKAGE-default}
2594 case $enableval in
2595 yes) enable_static=yes ;;
2596 no) enable_static=no ;;
2597 *)
2598   enable_static=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_static=yes
2604     fi
2605   done
2606   IFS="$ac_save_ifs"
2607   ;;
2608 esac
2609 else
2610   enable_static=yes
2611 fi
2612
2613 # Check whether --enable-shared or --disable-shared was given.
2614 if test "${enable_shared+set}" = set; then
2615   enableval="$enable_shared"
2616   p=${PACKAGE-default}
2617 case $enableval in
2618 yes) enable_shared=yes ;;
2619 no) enable_shared=no ;;
2620 *)
2621   enable_shared=no
2622   # Look at the argument we got.  We use all the common list separators.
2623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2624   for pkg in $enableval; do
2625     if test "X$pkg" = "X$p"; then
2626       enable_shared=yes
2627     fi
2628   done
2629   IFS="$ac_save_ifs"
2630   ;;
2631 esac
2632 else
2633   enable_shared=yes
2634 fi
2635
2636
2637
2638 # validate options
2639 if test $ol_enable_slapd = no ; then
2640                 if test $ol_enable_slapi = yes ; then
2641                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2642         fi
2643         if test $ol_enable_bdb = yes ; then
2644                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2645         fi
2646         if test $ol_enable_dnssrv = yes ; then
2647                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2648         fi
2649         if test $ol_enable_ldap = yes ; then
2650                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2651         fi
2652         if test $ol_enable_ldbm = yes ; then
2653                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2654         fi
2655         if test $ol_enable_meta = yes ; then
2656                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2657         fi
2658         if test $ol_enable_monitor = yes ; then
2659                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2660         fi
2661         if test $ol_enable_null = yes ; then
2662                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2663         fi
2664         if test $ol_enable_passwd = yes ; then
2665                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2666         fi
2667         if test $ol_enable_perl = yes ; then
2668                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2669         fi
2670         if test $ol_enable_shell = yes ; then
2671                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2672         fi
2673         if test $ol_enable_tcl = yes ; then
2674                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2675         fi
2676         if test $ol_enable_sql = yes ; then
2677                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2678         fi
2679         if test $ol_enable_modules = yes ; then
2680                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2681         fi
2682         if test $ol_enable_multimaster = yes ; then
2683                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2684         fi
2685         if test $ol_enable_wrappers = yes ; then
2686                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2687         fi
2688         if test $ol_enable_phonetic = yes ; then
2689                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2690         fi
2691         if test $ol_enable_rlookups = yes ; then
2692                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2693         fi
2694         if test $ol_enable_aci = yes ; then
2695                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2696         fi
2697         if test $ol_with_ldbm_api != auto ; then
2698                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2699         fi
2700         if test $ol_with_ldbm_type != auto ; then
2701                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2702         fi
2703         if test $ol_with_bdb_module != static ; then
2704                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2705         fi
2706         if test $ol_with_dnssrv_module != static ; then
2707                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2708         fi
2709         if test $ol_with_ldap_module != static ; then
2710                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2711         fi
2712         if test $ol_with_ldbm_module != static ; then
2713                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2714         fi
2715         if test $ol_with_meta_module != static ; then
2716                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2717         fi
2718         if test $ol_with_monitor_module != static ; then
2719                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2720         fi
2721         if test $ol_with_null_module != static ; then
2722                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2723         fi
2724         if test $ol_with_passwd_module != static ; then
2725                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2726         fi
2727         if test $ol_with_perl_module != static ; then
2728                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2729         fi
2730         if test $ol_with_shell_module != static ; then
2731                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2732         fi
2733         if test $ol_with_tcl_module != static ; then
2734                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2735         fi
2736         if test $ol_with_sql_module != static ; then
2737                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2738         fi
2739         if test $ol_enable_slurpd = yes ; then
2740                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2741         fi
2742         if test $ol_enable_rewrite = yes ; then
2743                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2744         fi
2745
2746         # force settings to no
2747         ol_enable_slapi=no
2748         ol_enable_bdb=no
2749         ol_enable_dnssrv=no
2750         ol_enable_ldap=no
2751         ol_enable_ldbm=no
2752         ol_enable_meta=no
2753         ol_enable_monitor=no
2754         ol_enable_null=no
2755         ol_enable_passwd=no
2756         ol_enable_perl=no
2757         ol_enable_shell=no
2758         ol_enable_tcl=no
2759         ol_enable_sql=no
2760
2761         ol_enable_modules=no
2762         ol_enable_multimaster=no
2763         ol_enable_phonetic=no
2764         ol_enable_rlookups=no
2765         ol_enable_aci=no
2766         ol_enable_wrappers=no
2767         ol_enable_dynamic=no
2768
2769         ol_with_ldbm_api=no
2770         ol_with_ldbm_type=no
2771
2772         ol_with_bdb_module=static
2773         ol_with_dnssrv_module=static
2774         ol_with_ldap_module=static
2775         ol_with_ldbm_module=static
2776         ol_with_meta_module=static
2777         ol_with_monitor_module=static
2778         ol_with_null_module=static
2779         ol_with_passwd_module=static
2780         ol_with_perl_module=static
2781         ol_with_shell_module=static
2782         ol_with_tcl_module=static
2783         ol_with_sql_module=static
2784
2785         ol_enable_slurpd=no
2786
2787         ol_enable_rewrite=no
2788
2789 elif test $ol_enable_ldbm = no ; then
2790         
2791         if test $ol_with_ldbm_api != auto ; then
2792                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2793         fi
2794
2795         if test $ol_with_ldbm_type != auto ; then
2796                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2797         fi
2798
2799         if test $ol_with_ldbm_module != static ; then
2800                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2801         fi
2802
2803         if test $ol_enable_modules != yes -a \
2804                 $ol_enable_bdb = no -a \
2805                 $ol_enable_dnssrv = no -a \
2806                 $ol_enable_ldap = no -a \
2807                 $ol_enable_meta = no -a \
2808                 $ol_enable_monitor = no -a \
2809                 $ol_enable_null = no -a \
2810                 $ol_enable_passwd = no -a \
2811                 $ol_enable_perl = no -a \
2812                 $ol_enable_shell = no -a \
2813                 $ol_enable_sql = no -a \
2814                 $ol_enable_tcl = no ; then
2815
2816                 if test $ol_enable_slapd = yes ; then
2817                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2818                 else
2819                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2820                         ol_enable_slapd=no
2821                 fi
2822         fi
2823
2824         ol_with_ldbm_api=no
2825         ol_with_ldbm_type=no
2826         ol_with_ldbm_module=static
2827
2828         if test $ol_enable_bdb != no ; then
2829                 ol_with_ldbm_api=berkeley
2830         fi
2831
2832 else
2833                 if test $ol_with_ldbm_api = gdbm -a \
2834                 $ol_with_ldbm_type = btree ; then
2835                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2836         fi
2837         if test $ol_with_ldbm_api = mdbm -a \
2838                 $ol_with_ldbm_type = btree ; then
2839                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2840         fi
2841         if test $ol_with_ldbm_api = ndbm -a \
2842                 $ol_with_ldbm_type = btree ; then
2843                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2844         fi
2845
2846         if test $ol_enable_bdb = yes ; then
2847                 if test $ol_with_ldbm_api = auto ; then
2848                         ol_with_ldbm_api=berkeley
2849                 elif test $ol_with_ldbm_api != berkeley ; then
2850                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2851                 fi
2852
2853         elif test $ol_enable_bdb = auto ; then
2854                 if test $ol_with_ldbm_api != berkeley \
2855                         -o $ol_with_ldbm_api != auto ; then
2856                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2857                         ol_enable_bdb=no
2858                 fi
2859         fi
2860 fi
2861
2862 if test $ol_enable_slurpd = yes ; then
2863                 if test $ol_with_threads = no ; then
2864                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2865         fi
2866 fi
2867
2868 if test $ol_enable_lmpasswd = yes ; then
2869         if test $ol_with_tls = no ; then
2870                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2871         fi
2872 fi
2873
2874 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2875         if test $ol_with_kerberos = no ; then
2876                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2877         elif test $ol_with_kerberos = auto ; then
2878                 ol_with_kerberos=yes
2879         fi
2880
2881 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2882         if test $ol_with_kerberos = auto ; then
2883                 ol_with_kerberos=no
2884         elif test $ol_with_kerberos != no ; then
2885                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2886                 ol_with_kerberos=no
2887         fi
2888 fi
2889
2890 if test $ol_enable_spasswd = yes ; then
2891         if test $ol_with_cyrus_sasl = no ; then
2892                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2893         fi
2894         ol_with_cyrus_sasl=yes
2895 fi
2896
2897 echo "$ac_t""done" 1>&6
2898
2899 LDAP_LIBS=
2900 LDIF_LIBS=
2901 LDBM_LIBS=
2902 LTHREAD_LIBS=
2903 LUTIL_LIBS=
2904
2905 SLAPD_LIBS=
2906 SLURPD_LIBS=
2907
2908 BUILD_SLAPD=no
2909 BUILD_SLURPD=no
2910
2911 BUILD_THREAD=no
2912
2913 BUILD_SLAPI=no
2914 SLAPD_SLAPI_DEPEND=
2915
2916 BUILD_BDB=no
2917 BUILD_DNSSRV=no
2918 BUILD_LDAP=no
2919 BUILD_LDBM=no
2920 BUILD_META=no
2921 BUILD_MONITOR=no
2922 BUILD_NULL=no
2923 BUILD_PASSWD=no
2924 BUILD_PERL=no
2925 BUILD_SHELL=no
2926 BUILD_SQL=no
2927 BUILD_TCL=no
2928
2929 BUILD_BDB_DYNAMIC=static
2930 BUILD_DNSSRV_DYNAMIC=static
2931 BUILD_LDAP_DYNAMIC=static
2932 BUILD_LDBM_DYNAMIC=static
2933 BUILD_META_DYNAMIC=static
2934 BUILD_MONITOR_DYNAMIC=static
2935 BUILD_NULL_DYNAMIC=static
2936 BUILD_PASSWD_DYNAMIC=static
2937 BUILD_PERL_DYNAMIC=static
2938 BUILD_SHELL_DYNAMIC=static
2939 BUILD_TCL_DYNAMIC=static
2940 BUILD_SQL_DYNAMIC=static
2941
2942 SLAPD_MODULES_LDFLAGS=
2943 SLAPD_MODULES_CPPFLAGS=
2944
2945 SLAPD_STATIC_BACKENDS=
2946 SLAPD_DYNAMIC_BACKENDS=
2947
2948 SLAPD_PERL_LDFLAGS=
2949 MOD_PERL_LDFLAGS=
2950 PERL_CPPFLAGS=
2951
2952 SLAPD_SQL_LDFLAGS=
2953 SLAPD_SQL_LIBS=
2954 SLAPD_SQL_INCLUDES=
2955
2956 MOD_TCL_LIB=
2957 KRB4_LIBS=
2958 KRB5_LIBS=
2959 READLINE_LIBS=
2960 SASL_LIBS=
2961 TERMCAP_LIBS=
2962 TLS_LIBS=
2963 MODULES_LIBS=
2964 SLAPI_LIBS=
2965 AUTH_LIBS=
2966
2967 SLAPD_SLP_LIBS=
2968
2969
2970 # Find a good install program.  We prefer a C program (faster),
2971 # so one script is as good as another.  But avoid the broken or
2972 # incompatible versions:
2973 # SysV /etc/install, /usr/sbin/install
2974 # SunOS /usr/etc/install
2975 # IRIX /sbin/install
2976 # AIX /bin/install
2977 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2978 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2979 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2980 # ./install, which can be erroneously created by make from ./install.sh.
2981 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2982 echo "configure:2983: checking for a BSD compatible install" >&5
2983 if test -z "$INSTALL"; then
2984 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2988   for ac_dir in $PATH; do
2989     # Account for people who put trailing slashes in PATH elements.
2990     case "$ac_dir/" in
2991     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2992     *)
2993       # OSF1 and SCO ODT 3.0 have their own names for install.
2994       # Don't use installbsd from OSF since it installs stuff as root
2995       # by default.
2996       for ac_prog in ginstall scoinst install; do
2997         if test -f $ac_dir/$ac_prog; then
2998           if test $ac_prog = install &&
2999             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3000             # AIX install.  It has an incompatible calling convention.
3001             :
3002           elif test $ac_prog = install &&
3003             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
3004             # program-specific install script used by HP pwplus--don't use.
3005             :
3006           else
3007             ac_cv_path_install="$ac_dir/$ac_prog -c"
3008             break 2
3009           fi
3010         fi
3011       done
3012       ;;
3013     esac
3014   done
3015   IFS="$ac_save_IFS"
3016
3017 fi
3018   if test "${ac_cv_path_install+set}" = set; then
3019     INSTALL="$ac_cv_path_install"
3020   else
3021     # As a last resort, use the slow shell script.  We don't cache a
3022     # path for INSTALL within a source directory, because that will
3023     # break other packages using the cache if that directory is
3024     # removed, or if the path is relative.
3025     INSTALL="$ac_install_sh"
3026   fi
3027 fi
3028 echo "$ac_t""$INSTALL" 1>&6
3029
3030 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3031 # It thinks the first close brace ends the variable substitution.
3032 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3033
3034 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3035
3036 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3037
3038
3039 cat >> confdefs.h <<\EOF
3040 #define HAVE_MKVERSION 1
3041 EOF
3042
3043
3044
3045
3046 ol_aix_threads=no
3047 case "$target" in
3048 *-*-aix*)       if test -z "$CC" ; then
3049                 case "$ol_with_threads" in
3050                 auto | yes |  posix) ol_aix_threads=yes ;;
3051                 esac
3052         fi
3053 ;;
3054 esac
3055
3056 if test $ol_aix_threads = yes ; then
3057         if test -z "${CC}" ; then
3058                 for ac_prog in cc_r xlc_r cc
3059 do
3060 # Extract the first word of "$ac_prog", so it can be a program name with args.
3061 set dummy $ac_prog; ac_word=$2
3062 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3063 echo "configure:3064: checking for $ac_word" >&5
3064 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3065   echo $ac_n "(cached) $ac_c" 1>&6
3066 else
3067   if test -n "$CC"; then
3068   ac_cv_prog_CC="$CC" # Let the user override the test.
3069 else
3070   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3071   ac_dummy="$PATH"
3072   for ac_dir in $ac_dummy; do
3073     test -z "$ac_dir" && ac_dir=.
3074     if test -f $ac_dir/$ac_word; then
3075       ac_cv_prog_CC="$ac_prog"
3076       break
3077     fi
3078   done
3079   IFS="$ac_save_ifs"
3080 fi
3081 fi
3082 CC="$ac_cv_prog_CC"
3083 if test -n "$CC"; then
3084   echo "$ac_t""$CC" 1>&6
3085 else
3086   echo "$ac_t""no" 1>&6
3087 fi
3088
3089 test -n "$CC" && break
3090 done
3091
3092
3093                 if test "$CC" = cc ; then
3094                                                 if test $ol_with_threads != auto ; then
3095                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3096                         else
3097                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3098                         fi
3099                         ol_with_threads=no
3100                 fi
3101         fi
3102
3103         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3104                 ol_with_threads=posix
3105                 ol_cv_pthread_create=yes
3106         fi
3107 fi
3108
3109 if test -z "${CC}"; then
3110         for ac_prog in cc gcc
3111 do
3112 # Extract the first word of "$ac_prog", so it can be a program name with args.
3113 set dummy $ac_prog; ac_word=$2
3114 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3115 echo "configure:3116: checking for $ac_word" >&5
3116 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3117   echo $ac_n "(cached) $ac_c" 1>&6
3118 else
3119   if test -n "$CC"; then
3120   ac_cv_prog_CC="$CC" # Let the user override the test.
3121 else
3122   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3123   ac_dummy="$PATH"
3124   for ac_dir in $ac_dummy; do
3125     test -z "$ac_dir" && ac_dir=.
3126     if test -f $ac_dir/$ac_word; then
3127       ac_cv_prog_CC="$ac_prog"
3128       break
3129     fi
3130   done
3131   IFS="$ac_save_ifs"
3132 fi
3133 fi
3134 CC="$ac_cv_prog_CC"
3135 if test -n "$CC"; then
3136   echo "$ac_t""$CC" 1>&6
3137 else
3138   echo "$ac_t""no" 1>&6
3139 fi
3140
3141 test -n "$CC" && break
3142 done
3143 test -n "$CC" || CC="missing"
3144
3145
3146         if test "${CC}" = "missing" ; then
3147                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3148         fi
3149 fi
3150
3151 if test -z "${AR}"; then
3152         for ac_prog in ar gar
3153 do
3154 # Extract the first word of "$ac_prog", so it can be a program name with args.
3155 set dummy $ac_prog; ac_word=$2
3156 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3157 echo "configure:3158: checking for $ac_word" >&5
3158 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3159   echo $ac_n "(cached) $ac_c" 1>&6
3160 else
3161   if test -n "$AR"; then
3162   ac_cv_prog_AR="$AR" # Let the user override the test.
3163 else
3164   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3165   ac_dummy="$PATH"
3166   for ac_dir in $ac_dummy; do
3167     test -z "$ac_dir" && ac_dir=.
3168     if test -f $ac_dir/$ac_word; then
3169       ac_cv_prog_AR="$ac_prog"
3170       break
3171     fi
3172   done
3173   IFS="$ac_save_ifs"
3174 fi
3175 fi
3176 AR="$ac_cv_prog_AR"
3177 if test -n "$AR"; then
3178   echo "$ac_t""$AR" 1>&6
3179 else
3180   echo "$ac_t""no" 1>&6
3181 fi
3182
3183 test -n "$AR" && break
3184 done
3185 test -n "$AR" || AR="missing"
3186
3187
3188         if test "${AR}" = "missing" ; then
3189                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3190         fi
3191 fi
3192
3193
3194
3195 # Find the correct PATH separator.  Usually this is `:', but
3196 # DJGPP uses `;' like DOS.
3197 if test "X${PATH_SEPARATOR+set}" != Xset; then
3198   UNAME=${UNAME-`uname 2>/dev/null`}
3199   case X$UNAME in
3200     *-DOS) lt_cv_sys_path_separator=';' ;;
3201     *)     lt_cv_sys_path_separator=':' ;;
3202   esac
3203   PATH_SEPARATOR=$lt_cv_sys_path_separator
3204 fi
3205
3206 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3207 echo "configure:3208: checking for Cygwin environment" >&5
3208 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211   cat > conftest.$ac_ext <<EOF
3212 #line 3213 "configure"
3213 #include "confdefs.h"
3214
3215 int main() {
3216
3217 #ifndef __CYGWIN__
3218 #define __CYGWIN__ __CYGWIN32__
3219 #endif
3220 return __CYGWIN__;
3221 ; return 0; }
3222 EOF
3223 if { (eval echo configure:3224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3224   rm -rf conftest*
3225   ac_cv_cygwin=yes
3226 else
3227   echo "configure: failed program was:" >&5
3228   cat conftest.$ac_ext >&5
3229   rm -rf conftest*
3230   ac_cv_cygwin=no
3231 fi
3232 rm -f conftest*
3233 fi
3234
3235 echo "$ac_t""$ac_cv_cygwin" 1>&6
3236 CYGWIN=
3237 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3238 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3239 echo "configure:3240: checking for mingw32 environment" >&5
3240 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3241   echo $ac_n "(cached) $ac_c" 1>&6
3242 else
3243   cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246
3247 int main() {
3248 return __MINGW32__;
3249 ; return 0; }
3250 EOF
3251 if { (eval echo configure:3252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3252   rm -rf conftest*
3253   ac_cv_mingw32=yes
3254 else
3255   echo "configure: failed program was:" >&5
3256   cat conftest.$ac_ext >&5
3257   rm -rf conftest*
3258   ac_cv_mingw32=no
3259 fi
3260 rm -f conftest*
3261 fi
3262
3263 echo "$ac_t""$ac_cv_mingw32" 1>&6
3264 MINGW32=
3265 test "$ac_cv_mingw32" = yes && MINGW32=yes
3266 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3267 echo "configure:3268: checking for EMX OS/2 environment" >&5
3268 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3269   echo $ac_n "(cached) $ac_c" 1>&6
3270 else
3271   cat > conftest.$ac_ext <<EOF
3272 #line 3273 "configure"
3273 #include "confdefs.h"
3274
3275 int main() {
3276 return __EMX__;
3277 ; return 0; }
3278 EOF
3279 if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3280   rm -rf conftest*
3281   ac_cv_emxos2=yes
3282 else
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   ac_cv_emxos2=no
3287 fi
3288 rm -f conftest*
3289 fi
3290
3291 echo "$ac_t""$ac_cv_emxos2" 1>&6
3292 EMXOS2=
3293 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3294 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3295 echo "configure:3296: checking how to run the C preprocessor" >&5
3296 # On Suns, sometimes $CPP names a directory.
3297 if test -n "$CPP" && test -d "$CPP"; then
3298   CPP=
3299 fi
3300 if test -z "$CPP"; then
3301 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3302   echo $ac_n "(cached) $ac_c" 1>&6
3303 else
3304     # This must be in double quotes, not single quotes, because CPP may get
3305   # substituted into the Makefile and "${CC-cc}" will confuse make.
3306   CPP="${CC-cc} -E"
3307   # On the NeXT, cc -E runs the code through the compiler's parser,
3308   # not just through cpp.
3309   cat > conftest.$ac_ext <<EOF
3310 #line 3311 "configure"
3311 #include "confdefs.h"
3312 #include <assert.h>
3313 Syntax Error
3314 EOF
3315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3316 { (eval echo configure:3317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3318 if test -z "$ac_err"; then
3319   :
3320 else
3321   echo "$ac_err" >&5
3322   echo "configure: failed program was:" >&5
3323   cat conftest.$ac_ext >&5
3324   rm -rf conftest*
3325   CPP="${CC-cc} -E -traditional-cpp"
3326   cat > conftest.$ac_ext <<EOF
3327 #line 3328 "configure"
3328 #include "confdefs.h"
3329 #include <assert.h>
3330 Syntax Error
3331 EOF
3332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3333 { (eval echo configure:3334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3335 if test -z "$ac_err"; then
3336   :
3337 else
3338   echo "$ac_err" >&5
3339   echo "configure: failed program was:" >&5
3340   cat conftest.$ac_ext >&5
3341   rm -rf conftest*
3342   CPP="${CC-cc} -nologo -E"
3343   cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3346 #include <assert.h>
3347 Syntax Error
3348 EOF
3349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3350 { (eval echo configure:3351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3352 if test -z "$ac_err"; then
3353   :
3354 else
3355   echo "$ac_err" >&5
3356   echo "configure: failed program was:" >&5
3357   cat conftest.$ac_ext >&5
3358   rm -rf conftest*
3359   CPP=/lib/cpp
3360 fi
3361 rm -f conftest*
3362 fi
3363 rm -f conftest*
3364 fi
3365 rm -f conftest*
3366   ac_cv_prog_CPP="$CPP"
3367 fi
3368   CPP="$ac_cv_prog_CPP"
3369 else
3370   ac_cv_prog_CPP="$CPP"
3371 fi
3372 echo "$ac_t""$CPP" 1>&6
3373
3374 # Check whether --enable-fast-install or --disable-fast-install was given.
3375 if test "${enable_fast_install+set}" = set; then
3376   enableval="$enable_fast_install"
3377   p=${PACKAGE-default}
3378 case $enableval in
3379 yes) enable_fast_install=yes ;;
3380 no) enable_fast_install=no ;;
3381 *)
3382   enable_fast_install=no
3383   # Look at the argument we got.  We use all the common list separators.
3384   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3385   for pkg in $enableval; do
3386     if test "X$pkg" = "X$p"; then
3387       enable_fast_install=yes
3388     fi
3389   done
3390   IFS="$ac_save_ifs"
3391   ;;
3392 esac
3393 else
3394   enable_fast_install=yes
3395 fi
3396
3397 # Extract the first word of "gcc", so it can be a program name with args.
3398 set dummy gcc; ac_word=$2
3399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3400 echo "configure:3401: checking for $ac_word" >&5
3401 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   if test -n "$CC"; then
3405   ac_cv_prog_CC="$CC" # Let the user override the test.
3406 else
3407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
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       ac_cv_prog_CC="gcc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 fi
3418 fi
3419 CC="$ac_cv_prog_CC"
3420 if test -n "$CC"; then
3421   echo "$ac_t""$CC" 1>&6
3422 else
3423   echo "$ac_t""no" 1>&6
3424 fi
3425
3426 if test -z "$CC"; then
3427   # Extract the first word of "cc", so it can be a program name with args.
3428 set dummy cc; ac_word=$2
3429 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3430 echo "configure:3431: checking for $ac_word" >&5
3431 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3432   echo $ac_n "(cached) $ac_c" 1>&6
3433 else
3434   if test -n "$CC"; then
3435   ac_cv_prog_CC="$CC" # Let the user override the test.
3436 else
3437   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3438   ac_prog_rejected=no
3439   ac_dummy="$PATH"
3440   for ac_dir in $ac_dummy; do
3441     test -z "$ac_dir" && ac_dir=.
3442     if test -f $ac_dir/$ac_word; then
3443       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3444         ac_prog_rejected=yes
3445         continue
3446       fi
3447       ac_cv_prog_CC="cc"
3448       break
3449     fi
3450   done
3451   IFS="$ac_save_ifs"
3452 if test $ac_prog_rejected = yes; then
3453   # We found a bogon in the path, so make sure we never use it.
3454   set dummy $ac_cv_prog_CC
3455   shift
3456   if test $# -gt 0; then
3457     # We chose a different compiler from the bogus one.
3458     # However, it has the same basename, so the bogon will be chosen
3459     # first if we set CC to just the basename; use the full file name.
3460     shift
3461     set dummy "$ac_dir/$ac_word" "$@"
3462     shift
3463     ac_cv_prog_CC="$@"
3464   fi
3465 fi
3466 fi
3467 fi
3468 CC="$ac_cv_prog_CC"
3469 if test -n "$CC"; then
3470   echo "$ac_t""$CC" 1>&6
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474
3475   if test -z "$CC"; then
3476     case "`uname -s`" in
3477     *win32* | *WIN32* | *CYGWIN*)
3478       # Extract the first word of "cl", so it can be a program name with args.
3479 set dummy cl; ac_word=$2
3480 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3481 echo "configure:3482: checking for $ac_word" >&5
3482 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3483   echo $ac_n "(cached) $ac_c" 1>&6
3484 else
3485   if test -n "$CC"; then
3486   ac_cv_prog_CC="$CC" # Let the user override the test.
3487 else
3488   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3489   ac_dummy="$PATH"
3490   for ac_dir in $ac_dummy; do
3491     test -z "$ac_dir" && ac_dir=.
3492     if test -f $ac_dir/$ac_word; then
3493       ac_cv_prog_CC="cl"
3494       break
3495     fi
3496   done
3497   IFS="$ac_save_ifs"
3498 fi
3499 fi
3500 CC="$ac_cv_prog_CC"
3501 if test -n "$CC"; then
3502   echo "$ac_t""$CC" 1>&6
3503 else
3504   echo "$ac_t""no" 1>&6
3505 fi
3506  ;;
3507     esac
3508   fi
3509   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3510 fi
3511
3512 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3513 echo "configure:3514: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3514
3515 ac_ext=c
3516 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3517 ac_cpp='$CPP $CPPFLAGS'
3518 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3519 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3520 cross_compiling=$ac_cv_prog_cc_cross
3521
3522 cat > conftest.$ac_ext << EOF
3523
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526
3527 main(){return(0);}
3528 EOF
3529 if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3530   ac_cv_prog_cc_works=yes
3531   # If we can't run a trivial program, we are probably using a cross compiler.
3532   if (./conftest; exit) 2>/dev/null; then
3533     ac_cv_prog_cc_cross=no
3534   else
3535     ac_cv_prog_cc_cross=yes
3536   fi
3537 else
3538   echo "configure: failed program was:" >&5
3539   cat conftest.$ac_ext >&5
3540   ac_cv_prog_cc_works=no
3541 fi
3542 rm -fr conftest*
3543 ac_ext=c
3544 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3545 ac_cpp='$CPP $CPPFLAGS'
3546 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3547 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3548 cross_compiling=$ac_cv_prog_cc_cross
3549
3550 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3551 if test $ac_cv_prog_cc_works = no; then
3552   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3553 fi
3554 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3555 echo "configure:3556: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3556 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3557 cross_compiling=$ac_cv_prog_cc_cross
3558
3559 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3560 echo "configure:3561: checking whether we are using GNU C" >&5
3561 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3562   echo $ac_n "(cached) $ac_c" 1>&6
3563 else
3564   cat > conftest.c <<EOF
3565 #ifdef __GNUC__
3566   yes;
3567 #endif
3568 EOF
3569 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3570   ac_cv_prog_gcc=yes
3571 else
3572   ac_cv_prog_gcc=no
3573 fi
3574 fi
3575
3576 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3577
3578 if test $ac_cv_prog_gcc = yes; then
3579   GCC=yes
3580 else
3581   GCC=
3582 fi
3583
3584 ac_test_CFLAGS="${CFLAGS+set}"
3585 ac_save_CFLAGS="$CFLAGS"
3586 CFLAGS=
3587 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3588 echo "configure:3589: checking whether ${CC-cc} accepts -g" >&5
3589 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3590   echo $ac_n "(cached) $ac_c" 1>&6
3591 else
3592   echo 'void f(){}' > conftest.c
3593 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3594   ac_cv_prog_cc_g=yes
3595 else
3596   ac_cv_prog_cc_g=no
3597 fi
3598 rm -f conftest*
3599
3600 fi
3601
3602 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3603 if test "$ac_test_CFLAGS" = set; then
3604   CFLAGS="$ac_save_CFLAGS"
3605 elif test $ac_cv_prog_cc_g = yes; then
3606   if test "$GCC" = yes; then
3607     CFLAGS="-g -O2"
3608   else
3609     CFLAGS="-g"
3610   fi
3611 else
3612   if test "$GCC" = yes; then
3613     CFLAGS="-O2"
3614   else
3615     CFLAGS=
3616   fi
3617 fi
3618
3619 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3620 if test "${with_gnu_ld+set}" = set; then
3621   withval="$with_gnu_ld"
3622   test "$withval" = no || with_gnu_ld=yes
3623 else
3624   with_gnu_ld=no
3625 fi
3626
3627 ac_prog=ld
3628 if test "$GCC" = yes; then
3629   # Check if gcc -print-prog-name=ld gives a path.
3630   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3631 echo "configure:3632: checking for ld used by GCC" >&5
3632   case $host in
3633   *-*-mingw*)
3634     # gcc leaves a trailing carriage return which upsets mingw
3635     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3636   *)
3637     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3638   esac
3639   case $ac_prog in
3640     # Accept absolute paths.
3641     [\\/]* | [A-Za-z]:[\\/]*)
3642       re_direlt='/[^/][^/]*/\.\./'
3643       # Canonicalize the path of ld
3644       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3645       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3646         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3647       done
3648       test -z "$LD" && LD="$ac_prog"
3649       ;;
3650   "")
3651     # If it fails, then pretend we aren't using GCC.
3652     ac_prog=ld
3653     ;;
3654   *)
3655     # If it is relative, then search for the first ld in PATH.
3656     with_gnu_ld=unknown
3657     ;;
3658   esac
3659 elif test "$with_gnu_ld" = yes; then
3660   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3661 echo "configure:3662: checking for GNU ld" >&5
3662 else
3663   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking for non-GNU ld" >&5
3665 fi
3666 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3667   echo $ac_n "(cached) $ac_c" 1>&6
3668 else
3669   if test -z "$LD"; then
3670   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3671   for ac_dir in $PATH; do
3672     test -z "$ac_dir" && ac_dir=.
3673     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3674       lt_cv_path_LD="$ac_dir/$ac_prog"
3675       # Check to see if the program is GNU ld.  I'd rather use --version,
3676       # but apparently some GNU ld's only accept -v.
3677       # Break only if it was the GNU/non-GNU ld that we prefer.
3678       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3679         test "$with_gnu_ld" != no && break
3680       else
3681         test "$with_gnu_ld" != yes && break
3682       fi
3683     fi
3684   done
3685   IFS="$ac_save_ifs"
3686 else
3687   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3688 fi
3689 fi
3690
3691 LD="$lt_cv_path_LD"
3692 if test -n "$LD"; then
3693   echo "$ac_t""$LD" 1>&6
3694 else
3695   echo "$ac_t""no" 1>&6
3696 fi
3697 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3698 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3699 echo "configure:3700: checking if the linker ($LD) is GNU ld" >&5
3700 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3701   echo $ac_n "(cached) $ac_c" 1>&6
3702 else
3703   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3704 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3705   lt_cv_prog_gnu_ld=yes
3706 else
3707   lt_cv_prog_gnu_ld=no
3708 fi
3709 fi
3710
3711 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3712 with_gnu_ld=$lt_cv_prog_gnu_ld
3713
3714
3715 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3716 echo "configure:3717: checking for $LD option to reload object files" >&5
3717 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3718   echo $ac_n "(cached) $ac_c" 1>&6
3719 else
3720   lt_cv_ld_reload_flag='-r'
3721 fi
3722
3723 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3724 reload_flag=$lt_cv_ld_reload_flag
3725 test -n "$reload_flag" && reload_flag=" $reload_flag"
3726
3727 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3728 echo "configure:3729: checking for BSD-compatible nm" >&5
3729 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3730   echo $ac_n "(cached) $ac_c" 1>&6
3731 else
3732   if test -n "$NM"; then
3733   # Let the user override the test.
3734   lt_cv_path_NM="$NM"
3735 else
3736   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3737   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3738     test -z "$ac_dir" && ac_dir=.
3739     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3740     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3741       # Check to see if the nm accepts a BSD-compat flag.
3742       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3743       #   nm: unknown option "B" ignored
3744       # Tru64's nm complains that /dev/null is an invalid object file
3745       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3746         lt_cv_path_NM="$tmp_nm -B"
3747         break
3748       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3749         lt_cv_path_NM="$tmp_nm -p"
3750         break
3751       else
3752         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3753         continue # so that we can try to find one that supports BSD flags
3754       fi
3755     fi
3756   done
3757   IFS="$ac_save_ifs"
3758   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3759 fi
3760 fi
3761
3762 NM="$lt_cv_path_NM"
3763 echo "$ac_t""$NM" 1>&6
3764
3765 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3766 echo "configure:3767: checking whether ln -s works" >&5
3767 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3768   echo $ac_n "(cached) $ac_c" 1>&6
3769 else
3770   rm -f conftestdata
3771 if ln -s X conftestdata 2>/dev/null
3772 then
3773   rm -f conftestdata
3774   ac_cv_prog_LN_S="ln -s"
3775 else
3776   ac_cv_prog_LN_S=ln
3777 fi
3778 fi
3779 LN_S="$ac_cv_prog_LN_S"
3780 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3781   echo "$ac_t""yes" 1>&6
3782 else
3783   echo "$ac_t""no" 1>&6
3784 fi
3785
3786 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3787 echo "configure:3788: checking how to recognise dependant libraries" >&5
3788 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3789   echo $ac_n "(cached) $ac_c" 1>&6
3790 else
3791   lt_cv_file_magic_cmd='$MAGIC_CMD'
3792 lt_cv_file_magic_test_file=
3793 lt_cv_deplibs_check_method='unknown'
3794 # Need to set the preceding variable on all platforms that support
3795 # interlibrary dependencies.
3796 # 'none' -- dependencies not supported.
3797 # `unknown' -- same as none, but documents that we really don't know.
3798 # 'pass_all' -- all dependencies passed with no checks.
3799 # 'test_compile' -- check by making test program.
3800 # 'file_magic [[regex]]' -- check by looking for files in library path
3801 # which responds to the $file_magic_cmd with a given egrep regex.
3802 # If you have `file' or equivalent on your system and you're not sure
3803 # whether `pass_all' will *always* work, you probably want this one.
3804
3805 case $host_os in
3806 aix4* | aix5*)
3807   lt_cv_deplibs_check_method=pass_all
3808   ;;
3809
3810 beos*)
3811   lt_cv_deplibs_check_method=pass_all
3812   ;;
3813
3814 bsdi4*)
3815   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3816   lt_cv_file_magic_cmd='/usr/bin/file -L'
3817   lt_cv_file_magic_test_file=/shlib/libc.so
3818   ;;
3819
3820 cygwin* | mingw* | pw32*)
3821   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3822   lt_cv_file_magic_cmd='$OBJDUMP -f'
3823   ;;
3824
3825 darwin* | rhapsody*)
3826   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3827   lt_cv_file_magic_cmd='/usr/bin/file -L'
3828   case "$host_os" in
3829   rhapsody* | darwin1.[012])
3830     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3831     ;;
3832   *) # Darwin 1.3 on
3833     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3834     ;;
3835   esac
3836   ;;
3837
3838 freebsd*)
3839   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3840     case $host_cpu in
3841     i*86 )
3842       # Not sure whether the presence of OpenBSD here was a mistake.
3843       # Let's accept both of them until this is cleared up.
3844       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3845       lt_cv_file_magic_cmd=/usr/bin/file
3846       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3847       ;;
3848     esac
3849   else
3850     lt_cv_deplibs_check_method=pass_all
3851   fi
3852   ;;
3853
3854 gnu*)
3855   lt_cv_deplibs_check_method=pass_all
3856   ;;
3857
3858 hpux10.20*|hpux11*)
3859   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3860   lt_cv_file_magic_cmd=/usr/bin/file
3861   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3862   ;;
3863
3864 irix5* | irix6*)
3865   case $host_os in
3866   irix5*)
3867     # this will be overridden with pass_all, but let us keep it just in case
3868     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3869     ;;
3870   *)
3871     case $LD in
3872     *-32|*"-32 ") libmagic=32-bit;;
3873     *-n32|*"-n32 ") libmagic=N32;;
3874     *-64|*"-64 ") libmagic=64-bit;;
3875     *) libmagic=never-match;;
3876     esac
3877     # this will be overridden with pass_all, but let us keep it just in case
3878     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3879     ;;
3880   esac
3881   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3882   lt_cv_deplibs_check_method=pass_all
3883   ;;
3884
3885 # This must be Linux ELF.
3886 linux-gnu*)
3887   case $host_cpu in
3888   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3889     lt_cv_deplibs_check_method=pass_all ;;
3890   *)
3891     # glibc up to 2.1.1 does not perform some relocations on ARM
3892     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3893   esac
3894   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3895   ;;
3896
3897 netbsd*)
3898   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3899     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3900   else
3901     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3902   fi
3903   ;;
3904
3905 newos6*)
3906   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3907   lt_cv_file_magic_cmd=/usr/bin/file
3908   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3909   ;;
3910
3911 openbsd*)
3912   lt_cv_file_magic_cmd=/usr/bin/file
3913   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3914   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3915     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3916   else
3917     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3918   fi
3919   ;;
3920
3921 osf3* | osf4* | osf5*)
3922   # this will be overridden with pass_all, but let us keep it just in case
3923   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3924   lt_cv_file_magic_test_file=/shlib/libc.so
3925   lt_cv_deplibs_check_method=pass_all
3926   ;;
3927
3928 sco3.2v5*)
3929   lt_cv_deplibs_check_method=pass_all
3930   ;;
3931
3932 solaris*)
3933   lt_cv_deplibs_check_method=pass_all
3934   lt_cv_file_magic_test_file=/lib/libc.so
3935   ;;
3936
3937 sysv5uw[78]* | sysv4*uw2*)
3938   lt_cv_deplibs_check_method=pass_all
3939   ;;
3940
3941 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3942   case $host_vendor in
3943   motorola)
3944     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]'
3945     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3946     ;;
3947   ncr)
3948     lt_cv_deplibs_check_method=pass_all
3949     ;;
3950   sequent)
3951     lt_cv_file_magic_cmd='/bin/file'
3952     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3953     ;;
3954   sni)
3955     lt_cv_file_magic_cmd='/bin/file'
3956     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3957     lt_cv_file_magic_test_file=/lib/libc.so
3958     ;;
3959   esac
3960   ;;
3961 esac
3962
3963 fi
3964
3965 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3966 file_magic_cmd=$lt_cv_file_magic_cmd
3967 deplibs_check_method=$lt_cv_deplibs_check_method
3968
3969 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3970 echo "configure:3971: checking for object suffix" >&5
3971 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3972   echo $ac_n "(cached) $ac_c" 1>&6
3973 else
3974   rm -f conftest*
3975 echo 'int i = 1;' > conftest.$ac_ext
3976 if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3977   for ac_file in conftest.*; do
3978     case $ac_file in
3979     *.c) ;;
3980     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3981     esac
3982   done
3983 else
3984   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3985 fi
3986 rm -f conftest*
3987 fi
3988
3989 echo "$ac_t""$ac_cv_objext" 1>&6
3990 OBJEXT=$ac_cv_objext
3991 ac_objext=$ac_cv_objext
3992
3993
3994
3995
3996 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3997 echo "configure:3998: checking for executable suffix" >&5
3998 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3999   echo $ac_n "(cached) $ac_c" 1>&6
4000 else
4001   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4002   ac_cv_exeext=.exe
4003 else
4004   rm -f conftest*
4005   echo 'int main () { return 0; }' > conftest.$ac_ext
4006   ac_cv_exeext=
4007   if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4008     for file in conftest.*; do
4009       case $file in
4010       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4011       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4012       esac
4013     done
4014   else
4015     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4016   fi
4017   rm -f conftest*
4018   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4019 fi
4020 fi
4021
4022 EXEEXT=""
4023 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4024 echo "$ac_t""${ac_cv_exeext}" 1>&6
4025 ac_exeext=$EXEEXT
4026
4027 if test $host != $build; then
4028   ac_tool_prefix=${host_alias}-
4029 else
4030   ac_tool_prefix=
4031 fi
4032
4033
4034
4035
4036 # Check for command to grab the raw symbol name followed by C symbol from nm.
4037 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4038 echo "configure:4039: checking command to parse $NM output" >&5
4039 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4040   echo $ac_n "(cached) $ac_c" 1>&6
4041 else
4042   
4043 # These are sane defaults that work on at least a few old systems.
4044 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4045
4046 # Character class describing NM global symbol codes.
4047 symcode='[BCDEGRST]'
4048
4049 # Regexp to match symbols that can be accessed directly from C.
4050 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4051
4052 # Transform the above into a raw symbol and a C symbol.
4053 symxfrm='\1 \2\3 \3'
4054
4055 # Transform an extracted symbol line into a proper C declaration
4056 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4057
4058 # Transform an extracted symbol line into symbol name and symbol address
4059 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'"
4060
4061 # Define system-specific variables.
4062 case $host_os in
4063 aix*)
4064   symcode='[BCDT]'
4065   ;;
4066 cygwin* | mingw* | pw32*)
4067   symcode='[ABCDGISTW]'
4068   ;;
4069 hpux*) # Its linker distinguishes data from code symbols
4070   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4071   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'"
4072   ;;
4073 irix*)
4074   symcode='[BCDEGRST]'
4075   ;;
4076 solaris* | sysv5*)
4077   symcode='[BDT]'
4078   ;;
4079 sysv4)
4080   symcode='[DFNSTU]'
4081   ;;
4082 esac
4083
4084 # Handle CRLF in mingw tool chain
4085 opt_cr=
4086 case $host_os in
4087 mingw*)
4088   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4089   ;;
4090 esac
4091
4092 # If we're using GNU nm, then use its standard symbol codes.
4093 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4094   symcode='[ABCDGISTW]'
4095 fi
4096
4097 # Try without a prefix undercore, then with it.
4098 for ac_symprfx in "" "_"; do
4099
4100   # Write the raw and C identifiers.
4101 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4102
4103   # Check to see that the pipe works correctly.
4104   pipe_works=no
4105   rm -f conftest*
4106   cat > conftest.$ac_ext <<EOF
4107 #ifdef __cplusplus
4108 extern "C" {
4109 #endif
4110 char nm_test_var;
4111 void nm_test_func(){}
4112 #ifdef __cplusplus
4113 }
4114 #endif
4115 int main(){nm_test_var='a';nm_test_func();return(0);}
4116 EOF
4117
4118   if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4119     # Now try to grab the symbols.
4120     nlist=conftest.nm
4121     if { (eval echo configure:4122: \"$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
4122       # Try sorting and uniquifying the output.
4123       if sort "$nlist" | uniq > "$nlist"T; then
4124         mv -f "$nlist"T "$nlist"
4125       else
4126         rm -f "$nlist"T
4127       fi
4128
4129       # Make sure that we snagged all the symbols we need.
4130       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4131         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4132           cat <<EOF > conftest.$ac_ext
4133 #ifdef __cplusplus
4134 extern "C" {
4135 #endif
4136
4137 EOF
4138           # Now generate the symbol file.
4139           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4140
4141           cat <<EOF >> conftest.$ac_ext
4142 #if defined (__STDC__) && __STDC__
4143 # define lt_ptr void *
4144 #else
4145 # define lt_ptr char *
4146 # define const
4147 #endif
4148
4149 /* The mapping between symbol names and symbols. */
4150 const struct {
4151   const char *name;
4152   lt_ptr address;
4153 }
4154 lt_preloaded_symbols[] =
4155 {
4156 EOF
4157           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4158           cat <<\EOF >> conftest.$ac_ext
4159   {0, (lt_ptr) 0}
4160 };
4161
4162 #ifdef __cplusplus
4163 }
4164 #endif
4165 EOF
4166           # Now try linking the two files.
4167           mv conftest.$ac_objext conftstm.$ac_objext
4168           save_LIBS="$LIBS"
4169           save_CFLAGS="$CFLAGS"
4170           LIBS="conftstm.$ac_objext"
4171           CFLAGS="$CFLAGS$no_builtin_flag"
4172           if { (eval echo configure:4173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4173             pipe_works=yes
4174           fi
4175           LIBS="$save_LIBS"
4176           CFLAGS="$save_CFLAGS"
4177         else
4178           echo "cannot find nm_test_func in $nlist" >&5
4179         fi
4180       else
4181         echo "cannot find nm_test_var in $nlist" >&5
4182       fi
4183     else
4184       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4185     fi
4186   else
4187     echo "$progname: failed program was:" >&5
4188     cat conftest.$ac_ext >&5
4189   fi
4190   rm -f conftest* conftst*
4191
4192   # Do not use the global_symbol_pipe unless it works.
4193   if test "$pipe_works" = yes; then
4194     break
4195   else
4196     lt_cv_sys_global_symbol_pipe=
4197   fi
4198 done
4199
4200 fi
4201
4202 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4203 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4204   global_symbol_to_cdecl=
4205   global_symbol_to_c_name_address=
4206 else
4207   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4208   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4209 fi
4210 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4211 then
4212   echo "$ac_t""failed" 1>&6
4213 else
4214   echo "$ac_t""ok" 1>&6
4215 fi
4216
4217 for ac_hdr in dlfcn.h
4218 do
4219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4221 echo "configure:4222: checking for $ac_hdr" >&5
4222 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4223   echo $ac_n "(cached) $ac_c" 1>&6
4224 else
4225   cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228 #include <$ac_hdr>
4229 EOF
4230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4231 { (eval echo configure:4232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4233 if test -z "$ac_err"; then
4234   rm -rf conftest*
4235   eval "ac_cv_header_$ac_safe=yes"
4236 else
4237   echo "$ac_err" >&5
4238   echo "configure: failed program was:" >&5
4239   cat conftest.$ac_ext >&5
4240   rm -rf conftest*
4241   eval "ac_cv_header_$ac_safe=no"
4242 fi
4243 rm -f conftest*
4244 fi
4245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4246   echo "$ac_t""yes" 1>&6
4247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4248   cat >> confdefs.h <<EOF
4249 #define $ac_tr_hdr 1
4250 EOF
4251  
4252 else
4253   echo "$ac_t""no" 1>&6
4254 fi
4255 done
4256
4257
4258
4259
4260
4261 # Only perform the check for file, if the check method requires it
4262 case $deplibs_check_method in
4263 file_magic*)
4264   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4265     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4266 echo "configure:4267: checking for ${ac_tool_prefix}file" >&5
4267 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4268   echo $ac_n "(cached) $ac_c" 1>&6
4269 else
4270   case $MAGIC_CMD in
4271   /*)
4272   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4273   ;;
4274   ?:/*)
4275   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4276   ;;
4277   *)
4278   ac_save_MAGIC_CMD="$MAGIC_CMD"
4279   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4280   ac_dummy="/usr/bin:$PATH"
4281   for ac_dir in $ac_dummy; do
4282     test -z "$ac_dir" && ac_dir=.
4283     if test -f $ac_dir/${ac_tool_prefix}file; then
4284       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4285       if test -n "$file_magic_test_file"; then
4286         case $deplibs_check_method in
4287         "file_magic "*)
4288           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4289           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4290           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4291             egrep "$file_magic_regex" > /dev/null; then
4292             :
4293           else
4294             cat <<EOF 1>&2
4295
4296 *** Warning: the command libtool uses to detect shared libraries,
4297 *** $file_magic_cmd, produces output that libtool cannot recognize.
4298 *** The result is that libtool may fail to recognize shared libraries
4299 *** as such.  This will affect the creation of libtool libraries that
4300 *** depend on shared libraries, but programs linked with such libtool
4301 *** libraries will work regardless of this problem.  Nevertheless, you
4302 *** may want to report the problem to your system manager and/or to
4303 *** bug-libtool@gnu.org
4304
4305 EOF
4306           fi ;;
4307         esac
4308       fi
4309       break
4310     fi
4311   done
4312   IFS="$ac_save_ifs"
4313   MAGIC_CMD="$ac_save_MAGIC_CMD"
4314   ;;
4315 esac
4316 fi
4317
4318 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4319 if test -n "$MAGIC_CMD"; then
4320   echo "$ac_t""$MAGIC_CMD" 1>&6
4321 else
4322   echo "$ac_t""no" 1>&6
4323 fi
4324
4325 if test -z "$lt_cv_path_MAGIC_CMD"; then
4326   if test -n "$ac_tool_prefix"; then
4327     echo $ac_n "checking for file""... $ac_c" 1>&6
4328 echo "configure:4329: checking for file" >&5
4329 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4330   echo $ac_n "(cached) $ac_c" 1>&6
4331 else
4332   case $MAGIC_CMD in
4333   /*)
4334   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4335   ;;
4336   ?:/*)
4337   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4338   ;;
4339   *)
4340   ac_save_MAGIC_CMD="$MAGIC_CMD"
4341   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4342   ac_dummy="/usr/bin:$PATH"
4343   for ac_dir in $ac_dummy; do
4344     test -z "$ac_dir" && ac_dir=.
4345     if test -f $ac_dir/file; then
4346       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4347       if test -n "$file_magic_test_file"; then
4348         case $deplibs_check_method in
4349         "file_magic "*)
4350           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4351           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4352           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4353             egrep "$file_magic_regex" > /dev/null; then
4354             :
4355           else
4356             cat <<EOF 1>&2
4357
4358 *** Warning: the command libtool uses to detect shared libraries,
4359 *** $file_magic_cmd, produces output that libtool cannot recognize.
4360 *** The result is that libtool may fail to recognize shared libraries
4361 *** as such.  This will affect the creation of libtool libraries that
4362 *** depend on shared libraries, but programs linked with such libtool
4363 *** libraries will work regardless of this problem.  Nevertheless, you
4364 *** may want to report the problem to your system manager and/or to
4365 *** bug-libtool@gnu.org
4366
4367 EOF
4368           fi ;;
4369         esac
4370       fi
4371       break
4372     fi
4373   done
4374   IFS="$ac_save_ifs"
4375   MAGIC_CMD="$ac_save_MAGIC_CMD"
4376   ;;
4377 esac
4378 fi
4379
4380 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4381 if test -n "$MAGIC_CMD"; then
4382   echo "$ac_t""$MAGIC_CMD" 1>&6
4383 else
4384   echo "$ac_t""no" 1>&6
4385 fi
4386
4387   else
4388     MAGIC_CMD=:
4389   fi
4390 fi
4391
4392   fi
4393   ;;
4394 esac
4395
4396 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4397 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4398 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4399 echo "configure:4400: checking for $ac_word" >&5
4400 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4401   echo $ac_n "(cached) $ac_c" 1>&6
4402 else
4403   if test -n "$RANLIB"; then
4404   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4405 else
4406   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4407   ac_dummy="$PATH"
4408   for ac_dir in $ac_dummy; do
4409     test -z "$ac_dir" && ac_dir=.
4410     if test -f $ac_dir/$ac_word; then
4411       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4412       break
4413     fi
4414   done
4415   IFS="$ac_save_ifs"
4416 fi
4417 fi
4418 RANLIB="$ac_cv_prog_RANLIB"
4419 if test -n "$RANLIB"; then
4420   echo "$ac_t""$RANLIB" 1>&6
4421 else
4422   echo "$ac_t""no" 1>&6
4423 fi
4424
4425
4426 if test -z "$ac_cv_prog_RANLIB"; then
4427 if test -n "$ac_tool_prefix"; then
4428   # Extract the first word of "ranlib", so it can be a program name with args.
4429 set dummy ranlib; ac_word=$2
4430 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4431 echo "configure:4432: checking for $ac_word" >&5
4432 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   if test -n "$RANLIB"; then
4436   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4437 else
4438   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4439   ac_dummy="$PATH"
4440   for ac_dir in $ac_dummy; do
4441     test -z "$ac_dir" && ac_dir=.
4442     if test -f $ac_dir/$ac_word; then
4443       ac_cv_prog_RANLIB="ranlib"
4444       break
4445     fi
4446   done
4447   IFS="$ac_save_ifs"
4448   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4449 fi
4450 fi
4451 RANLIB="$ac_cv_prog_RANLIB"
4452 if test -n "$RANLIB"; then
4453   echo "$ac_t""$RANLIB" 1>&6
4454 else
4455   echo "$ac_t""no" 1>&6
4456 fi
4457
4458 else
4459   RANLIB=":"
4460 fi
4461 fi
4462
4463 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4464 set dummy ${ac_tool_prefix}strip; ac_word=$2
4465 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4466 echo "configure:4467: checking for $ac_word" >&5
4467 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4468   echo $ac_n "(cached) $ac_c" 1>&6
4469 else
4470   if test -n "$STRIP"; then
4471   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4472 else
4473   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4474   ac_dummy="$PATH"
4475   for ac_dir in $ac_dummy; do
4476     test -z "$ac_dir" && ac_dir=.
4477     if test -f $ac_dir/$ac_word; then
4478       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4479       break
4480     fi
4481   done
4482   IFS="$ac_save_ifs"
4483 fi
4484 fi
4485 STRIP="$ac_cv_prog_STRIP"
4486 if test -n "$STRIP"; then
4487   echo "$ac_t""$STRIP" 1>&6
4488 else
4489   echo "$ac_t""no" 1>&6
4490 fi
4491
4492
4493 if test -z "$ac_cv_prog_STRIP"; then
4494 if test -n "$ac_tool_prefix"; then
4495   # Extract the first word of "strip", so it can be a program name with args.
4496 set dummy strip; ac_word=$2
4497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4498 echo "configure:4499: checking for $ac_word" >&5
4499 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4500   echo $ac_n "(cached) $ac_c" 1>&6
4501 else
4502   if test -n "$STRIP"; then
4503   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4504 else
4505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4506   ac_dummy="$PATH"
4507   for ac_dir in $ac_dummy; do
4508     test -z "$ac_dir" && ac_dir=.
4509     if test -f $ac_dir/$ac_word; then
4510       ac_cv_prog_STRIP="strip"
4511       break
4512     fi
4513   done
4514   IFS="$ac_save_ifs"
4515   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4516 fi
4517 fi
4518 STRIP="$ac_cv_prog_STRIP"
4519 if test -n "$STRIP"; then
4520   echo "$ac_t""$STRIP" 1>&6
4521 else
4522   echo "$ac_t""no" 1>&6
4523 fi
4524
4525 else
4526   STRIP=":"
4527 fi
4528 fi
4529
4530
4531 enable_dlopen=yes
4532 enable_win32_dll=yes
4533
4534 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4535 if test "${enable_libtool_lock+set}" = set; then
4536   enableval="$enable_libtool_lock"
4537   :
4538 fi
4539
4540 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4541
4542 # Some flags need to be propagated to the compiler or linker for good
4543 # libtool support.
4544 case $host in
4545 *-*-irix6*)
4546   # Find out which ABI we are using.
4547   echo '#line 4548 "configure"' > conftest.$ac_ext
4548   if { (eval echo configure:4549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4549     case `/usr/bin/file conftest.$ac_objext` in
4550     *32-bit*)
4551       LD="${LD-ld} -32"
4552       ;;
4553     *N32*)
4554       LD="${LD-ld} -n32"
4555       ;;
4556     *64-bit*)
4557       LD="${LD-ld} -64"
4558       ;;
4559     esac
4560   fi
4561   rm -rf conftest*
4562   ;;
4563
4564 *-*-sco3.2v5*)
4565   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4566   SAVE_CFLAGS="$CFLAGS"
4567   CFLAGS="$CFLAGS -belf"
4568   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4569 echo "configure:4570: checking whether the C compiler needs -belf" >&5
4570 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4571   echo $ac_n "(cached) $ac_c" 1>&6
4572 else
4573   
4574      ac_ext=c
4575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4576 ac_cpp='$CPP $CPPFLAGS'
4577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4578 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4579 cross_compiling=$ac_cv_prog_cc_cross
4580
4581      cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584
4585 int main() {
4586
4587 ; return 0; }
4588 EOF
4589 if { (eval echo configure:4590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4590   rm -rf conftest*
4591   lt_cv_cc_needs_belf=yes
4592 else
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -rf conftest*
4596   lt_cv_cc_needs_belf=no
4597 fi
4598 rm -f conftest*
4599      ac_ext=c
4600 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4601 ac_cpp='$CPP $CPPFLAGS'
4602 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4603 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4604 cross_compiling=$ac_cv_prog_cc_cross
4605
4606 fi
4607
4608 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4609   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4610     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4611     CFLAGS="$SAVE_CFLAGS"
4612   fi
4613   ;;
4614
4615 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4616   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4617 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4619 echo "configure:4620: checking for $ac_word" >&5
4620 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4621   echo $ac_n "(cached) $ac_c" 1>&6
4622 else
4623   if test -n "$DLLTOOL"; then
4624   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4625 else
4626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4627   ac_dummy="$PATH"
4628   for ac_dir in $ac_dummy; do
4629     test -z "$ac_dir" && ac_dir=.
4630     if test -f $ac_dir/$ac_word; then
4631       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4632       break
4633     fi
4634   done
4635   IFS="$ac_save_ifs"
4636 fi
4637 fi
4638 DLLTOOL="$ac_cv_prog_DLLTOOL"
4639 if test -n "$DLLTOOL"; then
4640   echo "$ac_t""$DLLTOOL" 1>&6
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644
4645
4646 if test -z "$ac_cv_prog_DLLTOOL"; then
4647 if test -n "$ac_tool_prefix"; then
4648   # Extract the first word of "dlltool", so it can be a program name with args.
4649 set dummy dlltool; ac_word=$2
4650 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4651 echo "configure:4652: checking for $ac_word" >&5
4652 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   if test -n "$DLLTOOL"; then
4656   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4657 else
4658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4659   ac_dummy="$PATH"
4660   for ac_dir in $ac_dummy; do
4661     test -z "$ac_dir" && ac_dir=.
4662     if test -f $ac_dir/$ac_word; then
4663       ac_cv_prog_DLLTOOL="dlltool"
4664       break
4665     fi
4666   done
4667   IFS="$ac_save_ifs"
4668   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4669 fi
4670 fi
4671 DLLTOOL="$ac_cv_prog_DLLTOOL"
4672 if test -n "$DLLTOOL"; then
4673   echo "$ac_t""$DLLTOOL" 1>&6
4674 else
4675   echo "$ac_t""no" 1>&6
4676 fi
4677
4678 else
4679   DLLTOOL="false"
4680 fi
4681 fi
4682
4683   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4684 set dummy ${ac_tool_prefix}as; ac_word=$2
4685 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4686 echo "configure:4687: checking for $ac_word" >&5
4687 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4688   echo $ac_n "(cached) $ac_c" 1>&6
4689 else
4690   if test -n "$AS"; then
4691   ac_cv_prog_AS="$AS" # Let the user override the test.
4692 else
4693   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4694   ac_dummy="$PATH"
4695   for ac_dir in $ac_dummy; do
4696     test -z "$ac_dir" && ac_dir=.
4697     if test -f $ac_dir/$ac_word; then
4698       ac_cv_prog_AS="${ac_tool_prefix}as"
4699       break
4700     fi
4701   done
4702   IFS="$ac_save_ifs"
4703 fi
4704 fi
4705 AS="$ac_cv_prog_AS"
4706 if test -n "$AS"; then
4707   echo "$ac_t""$AS" 1>&6
4708 else
4709   echo "$ac_t""no" 1>&6
4710 fi
4711
4712
4713 if test -z "$ac_cv_prog_AS"; then
4714 if test -n "$ac_tool_prefix"; then
4715   # Extract the first word of "as", so it can be a program name with args.
4716 set dummy as; ac_word=$2
4717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4718 echo "configure:4719: checking for $ac_word" >&5
4719 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   if test -n "$AS"; then
4723   ac_cv_prog_AS="$AS" # Let the user override the test.
4724 else
4725   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4726   ac_dummy="$PATH"
4727   for ac_dir in $ac_dummy; do
4728     test -z "$ac_dir" && ac_dir=.
4729     if test -f $ac_dir/$ac_word; then
4730       ac_cv_prog_AS="as"
4731       break
4732     fi
4733   done
4734   IFS="$ac_save_ifs"
4735   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4736 fi
4737 fi
4738 AS="$ac_cv_prog_AS"
4739 if test -n "$AS"; then
4740   echo "$ac_t""$AS" 1>&6
4741 else
4742   echo "$ac_t""no" 1>&6
4743 fi
4744
4745 else
4746   AS="false"
4747 fi
4748 fi
4749
4750   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4751 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4752 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4753 echo "configure:4754: checking for $ac_word" >&5
4754 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4755   echo $ac_n "(cached) $ac_c" 1>&6
4756 else
4757   if test -n "$OBJDUMP"; then
4758   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4759 else
4760   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4761   ac_dummy="$PATH"
4762   for ac_dir in $ac_dummy; do
4763     test -z "$ac_dir" && ac_dir=.
4764     if test -f $ac_dir/$ac_word; then
4765       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4766       break
4767     fi
4768   done
4769   IFS="$ac_save_ifs"
4770 fi
4771 fi
4772 OBJDUMP="$ac_cv_prog_OBJDUMP"
4773 if test -n "$OBJDUMP"; then
4774   echo "$ac_t""$OBJDUMP" 1>&6
4775 else
4776   echo "$ac_t""no" 1>&6
4777 fi
4778
4779
4780 if test -z "$ac_cv_prog_OBJDUMP"; then
4781 if test -n "$ac_tool_prefix"; then
4782   # Extract the first word of "objdump", so it can be a program name with args.
4783 set dummy objdump; ac_word=$2
4784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4785 echo "configure:4786: checking for $ac_word" >&5
4786 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4787   echo $ac_n "(cached) $ac_c" 1>&6
4788 else
4789   if test -n "$OBJDUMP"; then
4790   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4791 else
4792   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4793   ac_dummy="$PATH"
4794   for ac_dir in $ac_dummy; do
4795     test -z "$ac_dir" && ac_dir=.
4796     if test -f $ac_dir/$ac_word; then
4797       ac_cv_prog_OBJDUMP="objdump"
4798       break
4799     fi
4800   done
4801   IFS="$ac_save_ifs"
4802   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4803 fi
4804 fi
4805 OBJDUMP="$ac_cv_prog_OBJDUMP"
4806 if test -n "$OBJDUMP"; then
4807   echo "$ac_t""$OBJDUMP" 1>&6
4808 else
4809   echo "$ac_t""no" 1>&6
4810 fi
4811
4812 else
4813   OBJDUMP="false"
4814 fi
4815 fi
4816
4817
4818   # recent cygwin and mingw systems supply a stub DllMain which the user
4819   # can override, but on older systems we have to supply one
4820   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4821 echo "configure:4822: checking if libtool should supply DllMain function" >&5
4822 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4823   echo $ac_n "(cached) $ac_c" 1>&6
4824 else
4825   cat > conftest.$ac_ext <<EOF
4826 #line 4827 "configure"
4827 #include "confdefs.h"
4828
4829 int main() {
4830 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4831       DllMain (0, 0, 0);
4832 ; return 0; }
4833 EOF
4834 if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4835   rm -rf conftest*
4836   lt_cv_need_dllmain=no
4837 else
4838   echo "configure: failed program was:" >&5
4839   cat conftest.$ac_ext >&5
4840   rm -rf conftest*
4841   lt_cv_need_dllmain=yes
4842 fi
4843 rm -f conftest*
4844 fi
4845
4846 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4847
4848   case $host/$CC in
4849   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4850     # old mingw systems require "-dll" to link a DLL, while more recent ones
4851     # require "-mdll"
4852     SAVE_CFLAGS="$CFLAGS"
4853     CFLAGS="$CFLAGS -mdll"
4854     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4855 echo "configure:4856: checking how to link DLLs" >&5
4856 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4857   echo $ac_n "(cached) $ac_c" 1>&6
4858 else
4859   cat > conftest.$ac_ext <<EOF
4860 #line 4861 "configure"
4861 #include "confdefs.h"
4862
4863 int main() {
4864
4865 ; return 0; }
4866 EOF
4867 if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4868   rm -rf conftest*
4869   lt_cv_cc_dll_switch=-mdll
4870 else
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   lt_cv_cc_dll_switch=-dll
4875 fi
4876 rm -f conftest*
4877 fi
4878
4879 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4880     CFLAGS="$SAVE_CFLAGS" ;;
4881   *-*-cygwin* | *-*-pw32*)
4882     # cygwin systems need to pass --dll to the linker, and not link
4883     # crt.o which will require a WinMain@16 definition.
4884     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4885   esac
4886   ;;
4887   
4888 esac
4889
4890 # Sed substitution that helps us do robust quoting.  It backslashifies
4891 # metacharacters that are still active within double-quoted strings.
4892 Xsed='sed -e s/^X//'
4893 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4894
4895 # Same as above, but do not quote variable references.
4896 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4897
4898 # Sed substitution to delay expansion of an escaped shell variable in a
4899 # double_quote_subst'ed string.
4900 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4901
4902 # Constants:
4903 rm="rm -f"
4904
4905 # Global variables:
4906 default_ofile=libtool
4907 can_build_shared=yes
4908
4909 # All known linkers require a `.a' archive for static linking (except M$VC,
4910 # which needs '.lib').
4911 libext=a
4912 ltmain="$ac_aux_dir/ltmain.sh"
4913 ofile="$default_ofile"
4914 with_gnu_ld="$lt_cv_prog_gnu_ld"
4915 need_locks="$enable_libtool_lock"
4916
4917 old_CC="$CC"
4918 old_CFLAGS="$CFLAGS"
4919
4920 # Set sane defaults for various variables
4921 test -z "$AR" && AR=ar
4922 test -z "$AR_FLAGS" && AR_FLAGS=cru
4923 test -z "$AS" && AS=as
4924 test -z "$CC" && CC=cc
4925 test -z "$DLLTOOL" && DLLTOOL=dlltool
4926 test -z "$LD" && LD=ld
4927 test -z "$LN_S" && LN_S="ln -s"
4928 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4929 test -z "$NM" && NM=nm
4930 test -z "$OBJDUMP" && OBJDUMP=objdump
4931 test -z "$RANLIB" && RANLIB=:
4932 test -z "$STRIP" && STRIP=:
4933 test -z "$ac_objext" && ac_objext=o
4934
4935 if test x"$host" != x"$build"; then
4936   ac_tool_prefix=${host_alias}-
4937 else
4938   ac_tool_prefix=
4939 fi
4940
4941 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4942 case $host_os in
4943 linux-gnu*) ;;
4944 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4945 esac
4946
4947 case $host_os in
4948 aix3*)
4949   # AIX sometimes has problems with the GCC collect2 program.  For some
4950   # reason, if we set the COLLECT_NAMES environment variable, the problems
4951   # vanish in a puff of smoke.
4952   if test "X${COLLECT_NAMES+set}" != Xset; then
4953     COLLECT_NAMES=
4954     export COLLECT_NAMES
4955   fi
4956   ;;
4957 esac
4958
4959 # Determine commands to create old-style static archives.
4960 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4961 old_postinstall_cmds='chmod 644 $oldlib'
4962 old_postuninstall_cmds=
4963
4964 if test -n "$RANLIB"; then
4965   case $host_os in
4966   openbsd*)
4967     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4968     ;;
4969   *)
4970     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4971     ;;
4972   esac
4973   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4974 fi
4975
4976 # Allow CC to be a program name with arguments.
4977 set dummy $CC
4978 compiler="$2"
4979
4980 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4981 echo "configure:4982: checking for objdir" >&5
4982 rm -f .libs 2>/dev/null
4983 mkdir .libs 2>/dev/null
4984 if test -d .libs; then
4985   objdir=.libs
4986 else
4987   # MS-DOS does not allow filenames that begin with a dot.
4988   objdir=_libs
4989 fi
4990 rmdir .libs 2>/dev/null
4991 echo "$ac_t""$objdir" 1>&6
4992
4993
4994 # Check whether --with-pic or --without-pic was given.
4995 if test "${with_pic+set}" = set; then
4996   withval="$with_pic"
4997   pic_mode="$withval"
4998 else
4999   pic_mode=default
5000 fi
5001
5002 test -z "$pic_mode" && pic_mode=default
5003
5004 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5005 # in isolation, and that seeing it set (from the cache) indicates that
5006 # the associated values are set (in the cache) correctly too.
5007 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5008 echo "configure:5009: checking for $compiler option to produce PIC" >&5
5009 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5010   echo $ac_n "(cached) $ac_c" 1>&6
5011 else
5012    lt_cv_prog_cc_pic=
5013   lt_cv_prog_cc_shlib=
5014   lt_cv_prog_cc_wl=
5015   lt_cv_prog_cc_static=
5016   lt_cv_prog_cc_no_builtin=
5017   lt_cv_prog_cc_can_build_shared=$can_build_shared
5018
5019   if test "$GCC" = yes; then
5020     lt_cv_prog_cc_wl='-Wl,'
5021     lt_cv_prog_cc_static='-static'
5022
5023     case $host_os in
5024     aix*)
5025       # Below there is a dirty hack to force normal static linking with -ldl
5026       # The problem is because libdl dynamically linked with both libc and
5027       # libC (AIX C++ library), which obviously doesn't included in libraries
5028       # list by gcc. This cause undefined symbols with -static flags.
5029       # This hack allows C programs to be linked with "-static -ldl", but
5030       # not sure about C++ programs.
5031       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5032       ;;
5033     amigaos*)
5034       # FIXME: we need at least 68020 code to build shared libraries, but
5035       # adding the `-m68020' flag to GCC prevents building anything better,
5036       # like `-m68040'.
5037       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5038       ;;
5039     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5040       # PIC is the default for these OSes.
5041       ;;
5042     darwin* | rhapsody*)
5043       # PIC is the default on this platform
5044       # Common symbols not allowed in MH_DYLIB files
5045       lt_cv_prog_cc_pic='-fno-common'
5046       ;;
5047     cygwin* | mingw* | pw32* | os2*)
5048       # This hack is so that the source file can tell whether it is being
5049       # built for inclusion in a dll (and should export symbols for example).
5050       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5051       ;;
5052     sysv4*MP*)
5053       if test -d /usr/nec; then
5054          lt_cv_prog_cc_pic=-Kconform_pic
5055       fi
5056       ;;
5057     *)
5058       lt_cv_prog_cc_pic='-fPIC'
5059       ;;
5060     esac
5061   else
5062     # PORTME Check for PIC flags for the system compiler.
5063     case $host_os in
5064     aix3* | aix4* | aix5*)
5065       lt_cv_prog_cc_wl='-Wl,'
5066       # All AIX code is PIC.
5067       if test "$host_cpu" = ia64; then
5068         # AIX 5 now supports IA64 processor
5069         lt_cv_prog_cc_static='-Bstatic'
5070       else
5071         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5072       fi
5073       ;;
5074
5075     hpux9* | hpux10* | hpux11*)
5076       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5077       lt_cv_prog_cc_wl='-Wl,'
5078       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5079       lt_cv_prog_cc_pic='+Z'
5080       ;;
5081
5082     irix5* | irix6*)
5083       lt_cv_prog_cc_wl='-Wl,'
5084       lt_cv_prog_cc_static='-non_shared'
5085       # PIC (with -KPIC) is the default.
5086       ;;
5087
5088     cygwin* | mingw* | pw32* | os2*)
5089       # This hack is so that the source file can tell whether it is being
5090       # built for inclusion in a dll (and should export symbols for example).
5091       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5092       ;;
5093
5094     newsos6)
5095       lt_cv_prog_cc_pic='-KPIC'
5096       lt_cv_prog_cc_static='-Bstatic'
5097       ;;
5098
5099     osf3* | osf4* | osf5*)
5100       # All OSF/1 code is PIC.
5101       lt_cv_prog_cc_wl='-Wl,'
5102       lt_cv_prog_cc_static='-non_shared'
5103       ;;
5104
5105     sco3.2v5*)
5106       lt_cv_prog_cc_pic='-Kpic'
5107       lt_cv_prog_cc_static='-dn'
5108       lt_cv_prog_cc_shlib='-belf'
5109       ;;
5110
5111     solaris*)
5112       lt_cv_prog_cc_pic='-KPIC'
5113       lt_cv_prog_cc_static='-Bstatic'
5114       lt_cv_prog_cc_wl='-Wl,'
5115       ;;
5116
5117     sunos4*)
5118       lt_cv_prog_cc_pic='-PIC'
5119       lt_cv_prog_cc_static='-Bstatic'
5120       lt_cv_prog_cc_wl='-Qoption ld '
5121       ;;
5122
5123     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5124       lt_cv_prog_cc_pic='-KPIC'
5125       lt_cv_prog_cc_static='-Bstatic'
5126       if test "x$host_vendor" = xsni; then
5127         lt_cv_prog_cc_wl='-LD'
5128       else
5129         lt_cv_prog_cc_wl='-Wl,'
5130       fi
5131       ;;
5132
5133     uts4*)
5134       lt_cv_prog_cc_pic='-pic'
5135       lt_cv_prog_cc_static='-Bstatic'
5136       ;;
5137
5138     sysv4*MP*)
5139       if test -d /usr/nec ;then
5140         lt_cv_prog_cc_pic='-Kconform_pic'
5141         lt_cv_prog_cc_static='-Bstatic'
5142       fi
5143       ;;
5144
5145     *)
5146       lt_cv_prog_cc_can_build_shared=no
5147       ;;
5148     esac
5149   fi
5150
5151 fi
5152
5153 if test -z "$lt_cv_prog_cc_pic"; then
5154   echo "$ac_t""none" 1>&6
5155 else
5156   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5157
5158   # Check to make sure the pic_flag actually works.
5159   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5160 echo "configure:5161: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5161   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5162   echo $ac_n "(cached) $ac_c" 1>&6
5163 else
5164       save_CFLAGS="$CFLAGS"
5165     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5166     cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5169
5170 int main() {
5171
5172 ; return 0; }
5173 EOF
5174 if { (eval echo configure:5175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5175   rm -rf conftest*
5176         case $host_os in
5177       hpux9* | hpux10* | hpux11*)
5178         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5179         # they create non-PIC objects.  So, if there were any warnings, we
5180         # assume that PIC is not supported.
5181         if test -s conftest.err; then
5182           lt_cv_prog_cc_pic_works=no
5183         else
5184           lt_cv_prog_cc_pic_works=yes
5185         fi
5186         ;;
5187       *)
5188         lt_cv_prog_cc_pic_works=yes
5189         ;;
5190       esac
5191     
5192 else
5193   echo "configure: failed program was:" >&5
5194   cat conftest.$ac_ext >&5
5195   rm -rf conftest*
5196         lt_cv_prog_cc_pic_works=no
5197     
5198 fi
5199 rm -f conftest*
5200     CFLAGS="$save_CFLAGS"
5201   
5202 fi
5203
5204
5205   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5206     lt_cv_prog_cc_pic=
5207     lt_cv_prog_cc_can_build_shared=no
5208   else
5209     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5210   fi
5211
5212   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5213 fi
5214
5215 # Check for any special shared library compilation flags.
5216 if test -n "$lt_cv_prog_cc_shlib"; then
5217   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5218   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5219   else
5220    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5221     lt_cv_prog_cc_can_build_shared=no
5222   fi
5223 fi
5224
5225 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5226 echo "configure:5227: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5227 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5228   echo $ac_n "(cached) $ac_c" 1>&6
5229 else
5230     lt_cv_prog_cc_static_works=no
5231   save_LDFLAGS="$LDFLAGS"
5232   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5242   rm -rf conftest*
5243   lt_cv_prog_cc_static_works=yes
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247 fi
5248 rm -f conftest*
5249   LDFLAGS="$save_LDFLAGS"
5250
5251 fi
5252
5253
5254 # Belt *and* braces to stop my trousers falling down:
5255 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5256 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5257
5258 pic_flag="$lt_cv_prog_cc_pic"
5259 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5260 wl="$lt_cv_prog_cc_wl"
5261 link_static_flag="$lt_cv_prog_cc_static"
5262 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5263 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5264
5265
5266 # Check to see if options -o and -c are simultaneously supported by compiler
5267 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5268 echo "configure:5269: checking if $compiler supports -c -o file.$ac_objext" >&5
5269 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5270   echo $ac_n "(cached) $ac_c" 1>&6
5271 else
5272   
5273 $rm -r conftest 2>/dev/null
5274 mkdir conftest
5275 cd conftest
5276 echo "int some_variable = 0;" > conftest.$ac_ext
5277 mkdir out
5278 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5279 # that will create temporary files in the current directory regardless of
5280 # the output directory.  Thus, making CWD read-only will cause this test
5281 # to fail, enabling locking or at least warning the user not to do parallel
5282 # builds.
5283 chmod -w .
5284 save_CFLAGS="$CFLAGS"
5285 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5286 compiler_c_o=no
5287 if { (eval echo configure:5288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5288   # The compiler can only warn and ignore the option if not recognized
5289   # So say no if there are warnings
5290   if test -s out/conftest.err; then
5291     lt_cv_compiler_c_o=no
5292   else
5293     lt_cv_compiler_c_o=yes
5294   fi
5295 else
5296   # Append any errors to the config.log.
5297   cat out/conftest.err 1>&5
5298   lt_cv_compiler_c_o=no
5299 fi
5300 CFLAGS="$save_CFLAGS"
5301 chmod u+w .
5302 $rm conftest* out/*
5303 rmdir out
5304 cd ..
5305 rmdir conftest
5306 $rm -r conftest 2>/dev/null
5307
5308 fi
5309
5310 compiler_c_o=$lt_cv_compiler_c_o
5311 echo "$ac_t""$compiler_c_o" 1>&6
5312
5313 if test x"$compiler_c_o" = x"yes"; then
5314   # Check to see if we can write to a .lo
5315   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5316 echo "configure:5317: checking if $compiler supports -c -o file.lo" >&5
5317   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5318   echo $ac_n "(cached) $ac_c" 1>&6
5319 else
5320   
5321   lt_cv_compiler_o_lo=no
5322   save_CFLAGS="$CFLAGS"
5323   CFLAGS="$CFLAGS -c -o conftest.lo"
5324   save_objext="$ac_objext"
5325   ac_objext=lo
5326   cat > conftest.$ac_ext <<EOF
5327 #line 5328 "configure"
5328 #include "confdefs.h"
5329
5330 int main() {
5331 int some_variable = 0;
5332 ; return 0; }
5333 EOF
5334 if { (eval echo configure:5335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5335   rm -rf conftest*
5336       # The compiler can only warn and ignore the option if not recognized
5337     # So say no if there are warnings
5338     if test -s conftest.err; then
5339       lt_cv_compiler_o_lo=no
5340     else
5341       lt_cv_compiler_o_lo=yes
5342     fi
5343   
5344 else
5345   echo "configure: failed program was:" >&5
5346   cat conftest.$ac_ext >&5
5347 fi
5348 rm -f conftest*
5349   ac_objext="$save_objext"
5350   CFLAGS="$save_CFLAGS"
5351   
5352 fi
5353
5354   compiler_o_lo=$lt_cv_compiler_o_lo
5355   echo "$ac_t""$compiler_o_lo" 1>&6
5356 else
5357   compiler_o_lo=no
5358 fi
5359
5360 # Check to see if we can do hard links to lock some files if needed
5361 hard_links="nottested"
5362 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5363   # do not overwrite the value of need_locks provided by the user
5364   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5365 echo "configure:5366: checking if we can lock with hard links" >&5
5366   hard_links=yes
5367   $rm conftest*
5368   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5369   touch conftest.a
5370   ln conftest.a conftest.b 2>&5 || hard_links=no
5371   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5372   echo "$ac_t""$hard_links" 1>&6
5373   if test "$hard_links" = no; then
5374     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5375     need_locks=warn
5376   fi
5377 else
5378   need_locks=no
5379 fi
5380
5381 if test "$GCC" = yes; then
5382   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5383   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5384 echo "configure:5385: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5385   echo "int some_variable = 0;" > conftest.$ac_ext
5386   save_CFLAGS="$CFLAGS"
5387   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5388   compiler_rtti_exceptions=no
5389   cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392
5393 int main() {
5394 int some_variable = 0;
5395 ; return 0; }
5396 EOF
5397 if { (eval echo configure:5398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5398   rm -rf conftest*
5399       # The compiler can only warn and ignore the option if not recognized
5400     # So say no if there are warnings
5401     if test -s conftest.err; then
5402       compiler_rtti_exceptions=no
5403     else
5404       compiler_rtti_exceptions=yes
5405     fi
5406   
5407 else
5408   echo "configure: failed program was:" >&5
5409   cat conftest.$ac_ext >&5
5410 fi
5411 rm -f conftest*
5412   CFLAGS="$save_CFLAGS"
5413   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5414
5415   if test "$compiler_rtti_exceptions" = "yes"; then
5416     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5417   else
5418     no_builtin_flag=' -fno-builtin'
5419   fi
5420 fi
5421
5422 # See if the linker supports building shared libraries.
5423 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5424 echo "configure:5425: checking whether the linker ($LD) supports shared libraries" >&5
5425
5426 allow_undefined_flag=
5427 no_undefined_flag=
5428 need_lib_prefix=unknown
5429 need_version=unknown
5430 # when you set need_version to no, make sure it does not cause -set_version
5431 # flags to be left without arguments
5432 archive_cmds=
5433 archive_expsym_cmds=
5434 old_archive_from_new_cmds=
5435 old_archive_from_expsyms_cmds=
5436 export_dynamic_flag_spec=
5437 whole_archive_flag_spec=
5438 thread_safe_flag_spec=
5439 hardcode_into_libs=no
5440 hardcode_libdir_flag_spec=
5441 hardcode_libdir_separator=
5442 hardcode_direct=no
5443 hardcode_minus_L=no
5444 hardcode_shlibpath_var=unsupported
5445 runpath_var=
5446 link_all_deplibs=unknown
5447 always_export_symbols=no
5448 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5449 # include_expsyms should be a list of space-separated symbols to be *always*
5450 # included in the symbol list
5451 include_expsyms=
5452 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5453 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5454 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5455 # as well as any symbol that contains `d'.
5456 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5457 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5458 # platforms (ab)use it in PIC code, but their linkers get confused if
5459 # the symbol is explicitly referenced.  Since portable code cannot
5460 # rely on this symbol name, it's probably fine to never include it in
5461 # preloaded symbol tables.
5462 extract_expsyms_cmds=
5463
5464 case $host_os in
5465 cygwin* | mingw* | pw32*)
5466   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5467   # When not using gcc, we currently assume that we are using
5468   # Microsoft Visual C++.
5469   if test "$GCC" != yes; then
5470     with_gnu_ld=no
5471   fi
5472   ;;
5473 openbsd*)
5474   with_gnu_ld=no
5475   ;;
5476 esac
5477
5478 ld_shlibs=yes
5479 if test "$with_gnu_ld" = yes; then
5480   # If archive_cmds runs LD, not CC, wlarc should be empty
5481   wlarc='${wl}'
5482
5483   # See if GNU ld supports shared libraries.
5484   case $host_os in
5485   aix3* | aix4* | aix5*)
5486     # On AIX, the GNU linker is very broken
5487     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5488     ld_shlibs=no
5489     cat <<EOF 1>&2
5490
5491 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5492 *** to be unable to reliably create shared libraries on AIX.
5493 *** Therefore, libtool is disabling shared libraries support.  If you
5494 *** really care for shared libraries, you may want to modify your PATH
5495 *** so that a non-GNU linker is found, and then restart.
5496
5497 EOF
5498     ;;
5499
5500   amigaos*)
5501     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)'
5502     hardcode_libdir_flag_spec='-L$libdir'
5503     hardcode_minus_L=yes
5504
5505     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5506     # that the semantics of dynamic libraries on AmigaOS, at least up
5507     # to version 4, is to share data among multiple programs linked
5508     # with the same dynamic library.  Since this doesn't match the
5509     # behavior of shared libraries on other platforms, we can use
5510     # them.
5511     ld_shlibs=no
5512     ;;
5513
5514   beos*)
5515     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5516       allow_undefined_flag=unsupported
5517       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5518       # support --undefined.  This deserves some investigation.  FIXME
5519       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5520     else
5521       ld_shlibs=no
5522     fi
5523     ;;
5524
5525   cygwin* | mingw* | pw32*)
5526     # hardcode_libdir_flag_spec is actually meaningless, as there is
5527     # no search path for DLLs.
5528     hardcode_libdir_flag_spec='-L$libdir'
5529     allow_undefined_flag=unsupported
5530     always_export_symbols=yes
5531
5532     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5533       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5534       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5535       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5536       else $CC -o impgen impgen.c ; fi)~
5537       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5538
5539     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5540
5541     # cygwin and mingw dlls have different entry points and sets of symbols
5542     # to exclude.
5543     # FIXME: what about values for MSVC?
5544     dll_entry=__cygwin_dll_entry@12
5545     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5546     case $host_os in
5547     mingw*)
5548       # mingw values
5549       dll_entry=_DllMainCRTStartup@12
5550       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5551       ;;
5552     esac
5553
5554     # mingw and cygwin differ, and it's simplest to just exclude the union
5555     # of the two symbol sets.
5556     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5557
5558     # recent cygwin and mingw systems supply a stub DllMain which the user
5559     # can override, but on older systems we have to supply one (in ltdll.c)
5560     if test "x$lt_cv_need_dllmain" = "xyes"; then
5561       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5562       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~
5563         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5564     else
5565       ltdll_obj=
5566       ltdll_cmds=
5567     fi
5568
5569     # Extract the symbol export list from an `--export-all' def file,
5570     # then regenerate the def file from the symbol export list, so that
5571     # the compiled dll only exports the symbol export list.
5572     # Be careful not to strip the DATA tag left be newer dlltools.
5573     export_symbols_cmds="$ltdll_cmds"'
5574       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5575       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5576
5577     # If the export-symbols file already is a .def file (1st line
5578     # is EXPORTS), use it as is.
5579     # If DATA tags from a recent dlltool are present, honour them!
5580     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5581         cp $export_symbols $output_objdir/$soname-def;
5582       else
5583         echo EXPORTS > $output_objdir/$soname-def;
5584         _lt_hint=1;
5585         cat $export_symbols | while read symbol; do
5586          set dummy \$symbol;
5587          case \$# in
5588            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5589            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5590          esac;
5591          _lt_hint=`expr 1 + \$_lt_hint`;
5592         done;
5593       fi~
5594       '"$ltdll_cmds"'
5595       $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~
5596       $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~
5597       $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~
5598       $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~
5599       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5600     ;;
5601
5602   netbsd*)
5603     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5604       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5605       wlarc=
5606     else
5607       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5608       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5609     fi
5610     ;;
5611
5612   solaris* | sysv5*)
5613     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5614       ld_shlibs=no
5615       cat <<EOF 1>&2
5616
5617 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5618 *** create shared libraries on Solaris systems.  Therefore, libtool
5619 *** is disabling shared libraries support.  We urge you to upgrade GNU
5620 *** binutils to release 2.9.1 or newer.  Another option is to modify
5621 *** your PATH or compiler configuration so that the native linker is
5622 *** used, and then restart.
5623
5624 EOF
5625     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5626       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5627       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5628     else
5629       ld_shlibs=no
5630     fi
5631     ;;
5632
5633   sunos4*)
5634     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5635     wlarc=
5636     hardcode_direct=yes
5637     hardcode_shlibpath_var=no
5638     ;;
5639
5640   *)
5641     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5642       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5643       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5644     else
5645       ld_shlibs=no
5646     fi
5647     ;;
5648   esac
5649
5650   if test "$ld_shlibs" = yes; then
5651     runpath_var=LD_RUN_PATH
5652     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5653     export_dynamic_flag_spec='${wl}--export-dynamic'
5654     case $host_os in
5655     cygwin* | mingw* | pw32*)
5656       # dlltool doesn't understand --whole-archive et. al.
5657       whole_archive_flag_spec=
5658       ;;
5659     *)
5660       # ancient GNU ld didn't support --whole-archive et. al.
5661       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5662         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5663       else
5664         whole_archive_flag_spec=
5665       fi
5666       ;;
5667     esac
5668   fi
5669 else
5670   # PORTME fill in a description of your system's linker (not GNU ld)
5671   case $host_os in
5672   aix3*)
5673     allow_undefined_flag=unsupported
5674     always_export_symbols=yes
5675     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'
5676     # Note: this linker hardcodes the directories in LIBPATH if there
5677     # are no directories specified by -L.
5678     hardcode_minus_L=yes
5679     if test "$GCC" = yes && test -z "$link_static_flag"; then
5680       # Neither direct hardcoding nor static linking is supported with a
5681       # broken collect2.
5682       hardcode_direct=unsupported
5683     fi
5684     ;;
5685
5686   aix4* | aix5*)
5687     if test "$host_cpu" = ia64; then
5688       # On IA64, the linker does run time linking by default, so we don't
5689       # have to do anything special.
5690       aix_use_runtimelinking=no
5691       exp_sym_flag='-Bexport'
5692       no_entry_flag=""
5693     else
5694       aix_use_runtimelinking=no
5695
5696       # Test if we are trying to use run time linking or normal
5697       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5698       # need to do runtime linking.
5699       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5700         for ld_flag in $LDFLAGS; do
5701           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5702             aix_use_runtimelinking=yes
5703             break
5704           fi
5705         done
5706       esac
5707
5708       exp_sym_flag='-bexport'
5709       no_entry_flag='-bnoentry'
5710     fi
5711
5712     # When large executables or shared objects are built, AIX ld can
5713     # have problems creating the table of contents.  If linking a library
5714     # or program results in "error TOC overflow" add -mminimal-toc to
5715     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5716     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5717
5718     hardcode_direct=yes
5719     archive_cmds=''
5720     hardcode_libdir_separator=':'
5721     if test "$GCC" = yes; then
5722       case $host_os in aix4.[012]|aix4.[012].*)
5723         collect2name=`${CC} -print-prog-name=collect2`
5724         if test -f "$collect2name" && \
5725           strings "$collect2name" | grep resolve_lib_name >/dev/null
5726         then
5727           # We have reworked collect2
5728           hardcode_direct=yes
5729         else
5730           # We have old collect2
5731           hardcode_direct=unsupported
5732           # It fails to find uninstalled libraries when the uninstalled
5733           # path is not listed in the libpath.  Setting hardcode_minus_L
5734           # to unsupported forces relinking
5735           hardcode_minus_L=yes
5736           hardcode_libdir_flag_spec='-L$libdir'
5737           hardcode_libdir_separator=
5738         fi
5739       esac
5740
5741       shared_flag='-shared'
5742     else
5743       # not using gcc
5744       if test "$host_cpu" = ia64; then
5745         shared_flag='${wl}-G'
5746       else
5747         if test "$aix_use_runtimelinking" = yes; then
5748           shared_flag='${wl}-G'
5749         else
5750           shared_flag='${wl}-bM:SRE'
5751         fi
5752       fi
5753     fi
5754
5755     # It seems that -bexpall can do strange things, so it is better to
5756     # generate a list of symbols to export.
5757     always_export_symbols=yes
5758     if test "$aix_use_runtimelinking" = yes; then
5759       # Warning - without using the other runtime loading flags (-brtl),
5760       # -berok will link without error, but may produce a broken library.
5761       allow_undefined_flag='-berok'
5762       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5763       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"
5764     else
5765       if test "$host_cpu" = ia64; then
5766         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5767         allow_undefined_flag="-z nodefs"
5768         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"
5769       else
5770         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5771         # Warning - without using the other run time loading flags,
5772         # -berok will link without error, but may produce a broken library.
5773         allow_undefined_flag='${wl}-berok'
5774         # This is a bit strange, but is similar to how AIX traditionally builds
5775         # it's shared libraries.
5776         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'
5777       fi
5778     fi
5779     ;;
5780
5781   amigaos*)
5782     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)'
5783     hardcode_libdir_flag_spec='-L$libdir'
5784     hardcode_minus_L=yes
5785     # see comment about different semantics on the GNU ld section
5786     ld_shlibs=no
5787     ;;
5788
5789   cygwin* | mingw* | pw32*)
5790     # When not using gcc, we currently assume that we are using
5791     # Microsoft Visual C++.
5792     # hardcode_libdir_flag_spec is actually meaningless, as there is
5793     # no search path for DLLs.
5794     hardcode_libdir_flag_spec=' '
5795     allow_undefined_flag=unsupported
5796     # Tell ltmain to make .lib files, not .a files.
5797     libext=lib
5798     # FIXME: Setting linknames here is a bad hack.
5799     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5800     # The linker will automatically build a .lib file if we build a DLL.
5801     old_archive_from_new_cmds='true'
5802     # FIXME: Should let the user specify the lib program.
5803     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5804     fix_srcfile_path='`cygpath -w "$srcfile"`'
5805     ;;
5806
5807   darwin* | rhapsody*)
5808     case "$host_os" in
5809     rhapsody* | darwin1.[012])
5810       allow_undefined_flag='-undefined suppress'
5811       ;;
5812     *) # Darwin 1.3 on
5813       allow_undefined_flag='-flat_namespace -undefined suppress'
5814       ;;
5815     esac
5816     # FIXME: Relying on posixy $() will cause problems for
5817     #        cross-compilation, but unfortunately the echo tests do not
5818     #        yet detect zsh echo's removal of \ escapes.
5819     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'
5820     # We need to add '_' to the symbols in $export_symbols first
5821     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5822     hardcode_direct=yes
5823     hardcode_shlibpath_var=no
5824     whole_archive_flag_spec='-all_load $convenience'
5825     ;;
5826
5827   freebsd1*)
5828     ld_shlibs=no
5829     ;;
5830
5831   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5832   # support.  Future versions do this automatically, but an explicit c++rt0.o
5833   # does not break anything, and helps significantly (at the cost of a little
5834   # extra space).
5835   freebsd2.2*)
5836     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5837     hardcode_libdir_flag_spec='-R$libdir'
5838     hardcode_direct=yes
5839     hardcode_shlibpath_var=no
5840     ;;
5841
5842   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5843   freebsd2*)
5844     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5845     hardcode_direct=yes
5846     hardcode_minus_L=yes
5847     hardcode_shlibpath_var=no
5848     ;;
5849
5850   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5851   freebsd*)
5852     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5853     hardcode_libdir_flag_spec='-R$libdir'
5854     hardcode_direct=yes
5855     hardcode_shlibpath_var=no
5856     ;;
5857
5858   hpux9* | hpux10* | hpux11*)
5859     case $host_os in
5860     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' ;;
5861     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5862     esac
5863     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5864     hardcode_libdir_separator=:
5865     hardcode_direct=yes
5866     hardcode_minus_L=yes # Not in the search PATH, but as the default
5867                          # location of the library.
5868     export_dynamic_flag_spec='${wl}-E'
5869     ;;
5870
5871   irix5* | irix6*)
5872     if test "$GCC" = yes; then
5873       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'
5874     else
5875       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'
5876     fi
5877     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5878     hardcode_libdir_separator=:
5879     link_all_deplibs=yes
5880     ;;
5881
5882   netbsd*)
5883     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5884       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5885     else
5886       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5887     fi
5888     hardcode_libdir_flag_spec='-R$libdir'
5889     hardcode_direct=yes
5890     hardcode_shlibpath_var=no
5891     ;;
5892
5893   newsos6)
5894     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5895     hardcode_direct=yes
5896     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5897     hardcode_libdir_separator=:
5898     hardcode_shlibpath_var=no
5899     ;;
5900
5901   openbsd*)
5902     hardcode_direct=yes
5903     hardcode_shlibpath_var=no
5904     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5905       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5906       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5907       export_dynamic_flag_spec='${wl}-E'
5908     else
5909       case "$host_os" in
5910       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5911         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5912         hardcode_libdir_flag_spec='-R$libdir'
5913         ;;
5914       *)
5915         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5916         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5917         ;;
5918       esac
5919     fi
5920     ;;
5921
5922   os2*)
5923     hardcode_libdir_flag_spec='-L$libdir'
5924     hardcode_minus_L=yes
5925     allow_undefined_flag=unsupported
5926     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'
5927     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5928     ;;
5929
5930   osf3*)
5931     if test "$GCC" = yes; then
5932       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5933       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'
5934     else
5935       allow_undefined_flag=' -expect_unresolved \*'
5936       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'
5937     fi
5938     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5939     hardcode_libdir_separator=:
5940     ;;
5941
5942   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5943     if test "$GCC" = yes; then
5944       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5945       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'
5946       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5947     else
5948       allow_undefined_flag=' -expect_unresolved \*'
5949       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'
5950       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5951       $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'
5952
5953       #Both c and cxx compiler support -rpath directly
5954       hardcode_libdir_flag_spec='-rpath $libdir'
5955     fi
5956     hardcode_libdir_separator=:
5957     ;;
5958
5959   sco3.2v5*)
5960     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5961     hardcode_shlibpath_var=no
5962     runpath_var=LD_RUN_PATH
5963     hardcode_runpath_var=yes
5964     export_dynamic_flag_spec='${wl}-Bexport'
5965     ;;
5966
5967   solaris*)
5968     # gcc --version < 3.0 without binutils cannot create self contained
5969     # shared libraries reliably, requiring libgcc.a to resolve some of
5970     # the object symbols generated in some cases.  Libraries that use
5971     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5972     # a copy of libgcc.a into every shared library to guarantee resolving
5973     # such symbols causes other problems:  According to Tim Van Holder
5974     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5975     # (to the application) exception stack for one thing.
5976     no_undefined_flag=' -z defs'
5977     if test "$GCC" = yes; then
5978       case `$CC --version 2>/dev/null` in
5979       [12].*)
5980         cat <<EOF 1>&2
5981
5982 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5983 *** create self contained shared libraries on Solaris systems, without
5984 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5985 *** -no-undefined support, which will at least allow you to build shared
5986 *** libraries.  However, you may find that when you link such libraries
5987 *** into an application without using GCC, you have to manually add
5988 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5989 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5990 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5991
5992 EOF
5993         no_undefined_flag=
5994         ;;
5995       esac
5996     fi
5997     # $CC -shared without GNU ld will not create a library from C++
5998     # object files and a static libstdc++, better avoid it by now
5999     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6000     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6001                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6002     hardcode_libdir_flag_spec='-R$libdir'
6003     hardcode_shlibpath_var=no
6004     case $host_os in
6005     solaris2.[0-5] | solaris2.[0-5].*) ;;
6006     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6007       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6008     esac
6009     link_all_deplibs=yes
6010     ;;
6011
6012   sunos4*)
6013     if test "x$host_vendor" = xsequent; then
6014       # Use $CC to link under sequent, because it throws in some extra .o
6015       # files that make .init and .fini sections work.
6016       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6017     else
6018       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6019     fi
6020     hardcode_libdir_flag_spec='-L$libdir'
6021     hardcode_direct=yes
6022     hardcode_minus_L=yes
6023     hardcode_shlibpath_var=no
6024     ;;
6025
6026   sysv4)
6027     if test "x$host_vendor" = xsno; then
6028       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6029       hardcode_direct=yes # is this really true???
6030     else
6031       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6032       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6033     fi
6034     runpath_var='LD_RUN_PATH'
6035     hardcode_shlibpath_var=no
6036     ;;
6037
6038   sysv4.3*)
6039     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6040     hardcode_shlibpath_var=no
6041     export_dynamic_flag_spec='-Bexport'
6042     ;;
6043
6044   sysv5*)
6045     no_undefined_flag=' -z text'
6046     # $CC -shared without GNU ld will not create a library from C++
6047     # object files and a static libstdc++, better avoid it by now
6048     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6049     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6050                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6051     hardcode_libdir_flag_spec=
6052     hardcode_shlibpath_var=no
6053     runpath_var='LD_RUN_PATH'
6054     ;;
6055
6056   uts4*)
6057     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6058     hardcode_libdir_flag_spec='-L$libdir'
6059     hardcode_shlibpath_var=no
6060     ;;
6061
6062   dgux*)
6063     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6064     hardcode_libdir_flag_spec='-L$libdir'
6065     hardcode_shlibpath_var=no
6066     ;;
6067
6068   sysv4*MP*)
6069     if test -d /usr/nec; then
6070       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6071       hardcode_shlibpath_var=no
6072       runpath_var=LD_RUN_PATH
6073       hardcode_runpath_var=yes
6074       ld_shlibs=yes
6075     fi
6076     ;;
6077
6078   sysv4.2uw2*)
6079     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6080     hardcode_direct=yes
6081     hardcode_minus_L=no
6082     hardcode_shlibpath_var=no
6083     hardcode_runpath_var=yes
6084     runpath_var=LD_RUN_PATH
6085     ;;
6086
6087   sysv5uw7* | unixware7*)
6088     no_undefined_flag='${wl}-z ${wl}text'
6089     if test "$GCC" = yes; then
6090       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6091     else
6092       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6093     fi
6094     runpath_var='LD_RUN_PATH'
6095     hardcode_shlibpath_var=no
6096     ;;
6097
6098   *)
6099     ld_shlibs=no
6100     ;;
6101   esac
6102 fi
6103 echo "$ac_t""$ld_shlibs" 1>&6
6104 test "$ld_shlibs" = no && can_build_shared=no
6105
6106 # Check hardcoding attributes.
6107 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6108 echo "configure:6109: checking how to hardcode library paths into programs" >&5
6109 hardcode_action=
6110 if test -n "$hardcode_libdir_flag_spec" || \
6111    test -n "$runpath_var"; then
6112
6113   # We can hardcode non-existant directories.
6114   if test "$hardcode_direct" != no &&
6115      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6116      # have to relink, otherwise we might link with an installed library
6117      # when we should be linking with a yet-to-be-installed one
6118      ## test "$hardcode_shlibpath_var" != no &&
6119      test "$hardcode_minus_L" != no; then
6120     # Linking always hardcodes the temporary library directory.
6121     hardcode_action=relink
6122   else
6123     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6124     hardcode_action=immediate
6125   fi
6126 else
6127   # We cannot hardcode anything, or else we can only hardcode existing
6128   # directories.
6129   hardcode_action=unsupported
6130 fi
6131 echo "$ac_t""$hardcode_action" 1>&6
6132
6133 striplib=
6134 old_striplib=
6135 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6136 echo "configure:6137: checking whether stripping libraries is possible" >&5
6137 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6138   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6139   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6140   echo "$ac_t""yes" 1>&6
6141 else
6142   echo "$ac_t""no" 1>&6
6143 fi
6144
6145 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6146 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6147
6148 # PORTME Fill in your ld.so characteristics
6149 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6150 echo "configure:6151: checking dynamic linker characteristics" >&5
6151 library_names_spec=
6152 libname_spec='lib$name'
6153 soname_spec=
6154 postinstall_cmds=
6155 postuninstall_cmds=
6156 finish_cmds=
6157 finish_eval=
6158 shlibpath_var=
6159 shlibpath_overrides_runpath=unknown
6160 version_type=none
6161 dynamic_linker="$host_os ld.so"
6162 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6163 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6164
6165 case $host_os in
6166 aix3*)
6167   version_type=linux
6168   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6169   shlibpath_var=LIBPATH
6170
6171   # AIX has no versioning support, so we append a major version to the name.
6172   soname_spec='${libname}${release}.so$major'
6173   ;;
6174
6175 aix4* | aix5*)
6176   version_type=linux
6177   if test "$host_cpu" = ia64; then
6178     # AIX 5 supports IA64
6179     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6180     shlibpath_var=LD_LIBRARY_PATH
6181   else
6182     # With GCC up to 2.95.x, collect2 would create an import file
6183     # for dependence libraries.  The import file would start with
6184     # the line `#! .'.  This would cause the generated library to
6185     # depend on `.', always an invalid library.  This was fixed in
6186     # development snapshots of GCC prior to 3.0.
6187     case $host_os in
6188       aix4 | aix4.[01] | aix4.[01].*)
6189         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6190              echo ' yes '
6191              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6192           :
6193         else
6194           can_build_shared=no
6195         fi
6196         ;;
6197     esac
6198     # AIX (on Power*) has no versioning support, so currently we can
6199     # not hardcode correct soname into executable. Probably we can
6200     # add versioning support to collect2, so additional links can
6201     # be useful in future.
6202     if test "$aix_use_runtimelinking" = yes; then
6203       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6204       # instead of lib<name>.a to let people know that these are not
6205       # typical AIX shared libraries.
6206       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6207     else
6208       # We preserve .a as extension for shared libraries through AIX4.2
6209       # and later when we are not doing run time linking.
6210       library_names_spec='${libname}${release}.a $libname.a'
6211       soname_spec='${libname}${release}.so$major'
6212     fi
6213     shlibpath_var=LIBPATH
6214   fi
6215   ;;
6216
6217 amigaos*)
6218   library_names_spec='$libname.ixlibrary $libname.a'
6219   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6220   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'
6221   ;;
6222
6223 beos*)
6224   library_names_spec='${libname}.so'
6225   dynamic_linker="$host_os ld.so"
6226   shlibpath_var=LIBRARY_PATH
6227   ;;
6228
6229 bsdi4*)
6230   version_type=linux
6231   need_version=no
6232   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6233   soname_spec='${libname}${release}.so$major'
6234   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6235   shlibpath_var=LD_LIBRARY_PATH
6236   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6237   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6238   export_dynamic_flag_spec=-rdynamic
6239   # the default ld.so.conf also contains /usr/contrib/lib and
6240   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6241   # libtool to hard-code these into programs
6242   ;;
6243
6244 cygwin* | mingw* | pw32*)
6245   version_type=windows
6246   need_version=no
6247   need_lib_prefix=no
6248   case $GCC,$host_os in
6249   yes,cygwin*)
6250     library_names_spec='$libname.dll.a'
6251     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6252     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6253       dldir=$destdir/`dirname \$dlpath`~
6254       test -d \$dldir || mkdir -p \$dldir~
6255       $install_prog .libs/$dlname \$dldir/$dlname'
6256     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6257       dlpath=$dir/\$dldll~
6258        $rm \$dlpath'
6259     ;;
6260   yes,mingw*)
6261     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6262     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6263     ;;
6264   yes,pw32*)
6265     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6266     ;;
6267   *)
6268     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6269     ;;
6270   esac
6271   dynamic_linker='Win32 ld.exe'
6272   # FIXME: first we should search . and the directory the executable is in
6273   shlibpath_var=PATH
6274   ;;
6275
6276 darwin* | rhapsody*)
6277   dynamic_linker="$host_os dyld"
6278   version_type=darwin
6279   need_lib_prefix=no
6280   need_version=no
6281   # FIXME: Relying on posixy $() will cause problems for
6282   #        cross-compilation, but unfortunately the echo tests do not
6283   #        yet detect zsh echo's removal of \ escapes.
6284   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)'
6285   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6286   shlibpath_overrides_runpath=yes
6287   shlibpath_var=DYLD_LIBRARY_PATH
6288   ;;
6289
6290 freebsd1*)
6291   dynamic_linker=no
6292   ;;
6293
6294 freebsd*)
6295   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6296   version_type=freebsd-$objformat
6297   case $version_type in
6298     freebsd-elf*)
6299       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6300       need_version=no
6301       need_lib_prefix=no
6302       ;;
6303     freebsd-*)
6304       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6305       need_version=yes
6306       ;;
6307   esac
6308   shlibpath_var=LD_LIBRARY_PATH
6309   case $host_os in
6310   freebsd2*)
6311     shlibpath_overrides_runpath=yes
6312     ;;
6313   *)
6314     shlibpath_overrides_runpath=no
6315     hardcode_into_libs=yes
6316     ;;
6317   esac
6318   ;;
6319
6320 gnu*)
6321   version_type=linux
6322   need_lib_prefix=no
6323   need_version=no
6324   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6325   soname_spec='${libname}${release}.so$major'
6326   shlibpath_var=LD_LIBRARY_PATH
6327   hardcode_into_libs=yes
6328   ;;
6329
6330 hpux9* | hpux10* | hpux11*)
6331   # Give a soname corresponding to the major version so that dld.sl refuses to
6332   # link against other versions.
6333   dynamic_linker="$host_os dld.sl"
6334   version_type=sunos
6335   need_lib_prefix=no
6336   need_version=no
6337   shlibpath_var=SHLIB_PATH
6338   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6339   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6340   soname_spec='${libname}${release}.sl$major'
6341   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6342   postinstall_cmds='chmod 555 $lib'
6343   ;;
6344
6345 irix5* | irix6*)
6346   version_type=irix
6347   need_lib_prefix=no
6348   need_version=no
6349   soname_spec='${libname}${release}.so$major'
6350   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6351   case $host_os in
6352   irix5*)
6353     libsuff= shlibsuff=
6354     ;;
6355   *)
6356     case $LD in # libtool.m4 will add one of these switches to LD
6357     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6358     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6359     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6360     *) libsuff= shlibsuff= libmagic=never-match;;
6361     esac
6362     ;;
6363   esac
6364   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6365   shlibpath_overrides_runpath=no
6366   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6367   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6368   ;;
6369
6370 # No shared lib support for Linux oldld, aout, or coff.
6371 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6372   dynamic_linker=no
6373   ;;
6374
6375 # This must be Linux ELF.
6376 linux-gnu*)
6377   version_type=linux
6378   need_lib_prefix=no
6379   need_version=no
6380   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6381   soname_spec='${libname}${release}.so$major'
6382   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6383   shlibpath_var=LD_LIBRARY_PATH
6384   shlibpath_overrides_runpath=no
6385   # This implies no fast_install, which is unacceptable.
6386   # Some rework will be needed to allow for fast_install
6387   # before this can be enabled.
6388   hardcode_into_libs=yes
6389
6390   # We used to test for /lib/ld.so.1 and disable shared libraries on
6391   # powerpc, because MkLinux only supported shared libraries with the
6392   # GNU dynamic linker.  Since this was broken with cross compilers,
6393   # most powerpc-linux boxes support dynamic linking these days and
6394   # people can always --disable-shared, the test was removed, and we
6395   # assume the GNU/Linux dynamic linker is in use.
6396   dynamic_linker='GNU/Linux ld.so'
6397   ;;
6398
6399 netbsd*)
6400   version_type=sunos
6401   need_lib_prefix=no
6402   need_version=no
6403   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6404     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6405     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6406     dynamic_linker='NetBSD (a.out) ld.so'
6407   else
6408     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6409     soname_spec='${libname}${release}.so$major'
6410     dynamic_linker='NetBSD ld.elf_so'
6411   fi
6412   shlibpath_var=LD_LIBRARY_PATH
6413   shlibpath_overrides_runpath=yes
6414   hardcode_into_libs=yes
6415   ;;
6416
6417 newsos6)
6418   version_type=linux
6419   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6420   shlibpath_var=LD_LIBRARY_PATH
6421   shlibpath_overrides_runpath=yes
6422   ;;
6423
6424 openbsd*)
6425   version_type=sunos
6426   need_lib_prefix=no
6427   need_version=no
6428   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6429     case "$host_os" in
6430     openbsd2.[89] | openbsd2.[89].*)
6431       shlibpath_overrides_runpath=no
6432       ;;
6433     *)
6434       shlibpath_overrides_runpath=yes
6435       ;;
6436     esac
6437   else
6438     shlibpath_overrides_runpath=yes
6439   fi
6440   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6441   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6442   shlibpath_var=LD_LIBRARY_PATH
6443   ;;
6444
6445 os2*)
6446   libname_spec='$name'
6447   need_lib_prefix=no
6448   library_names_spec='$libname.dll $libname.a'
6449   dynamic_linker='OS/2 ld.exe'
6450   shlibpath_var=LIBPATH
6451   ;;
6452
6453 osf3* | osf4* | osf5*)
6454   version_type=osf
6455   need_version=no
6456   soname_spec='${libname}${release}.so'
6457   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6458   shlibpath_var=LD_LIBRARY_PATH
6459   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6460   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6461   ;;
6462
6463 sco3.2v5*)
6464   version_type=osf
6465   soname_spec='${libname}${release}.so$major'
6466   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6467   shlibpath_var=LD_LIBRARY_PATH
6468   ;;
6469
6470 solaris*)
6471   version_type=linux
6472   need_lib_prefix=no
6473   need_version=no
6474   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6475   soname_spec='${libname}${release}.so$major'
6476   shlibpath_var=LD_LIBRARY_PATH
6477   shlibpath_overrides_runpath=yes
6478   hardcode_into_libs=yes
6479   # ldd complains unless libraries are executable
6480   postinstall_cmds='chmod +x $lib'
6481   ;;
6482
6483 sunos4*)
6484   version_type=sunos
6485   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6486   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6487   shlibpath_var=LD_LIBRARY_PATH
6488   shlibpath_overrides_runpath=yes
6489   if test "$with_gnu_ld" = yes; then
6490     need_lib_prefix=no
6491   fi
6492   need_version=yes
6493   ;;
6494
6495 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6496   version_type=linux
6497   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6498   soname_spec='${libname}${release}.so$major'
6499   shlibpath_var=LD_LIBRARY_PATH
6500   case $host_vendor in
6501     sni)
6502       shlibpath_overrides_runpath=no
6503       ;;
6504     motorola)
6505       need_lib_prefix=no
6506       need_version=no
6507       shlibpath_overrides_runpath=no
6508       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6509       ;;
6510   esac
6511   ;;
6512
6513 uts4*)
6514   version_type=linux
6515   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6516   soname_spec='${libname}${release}.so$major'
6517   shlibpath_var=LD_LIBRARY_PATH
6518   ;;
6519
6520 dgux*)
6521   version_type=linux
6522   need_lib_prefix=no
6523   need_version=no
6524   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6525   soname_spec='${libname}${release}.so$major'
6526   shlibpath_var=LD_LIBRARY_PATH
6527   ;;
6528
6529 sysv4*MP*)
6530   if test -d /usr/nec ;then
6531     version_type=linux
6532     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6533     soname_spec='$libname.so.$major'
6534     shlibpath_var=LD_LIBRARY_PATH
6535   fi
6536   ;;
6537
6538 *)
6539   dynamic_linker=no
6540   ;;
6541 esac
6542 echo "$ac_t""$dynamic_linker" 1>&6
6543 test "$dynamic_linker" = no && can_build_shared=no
6544
6545 # Report the final consequences.
6546 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6547 echo "configure:6548: checking if libtool supports shared libraries" >&5
6548 echo "$ac_t""$can_build_shared" 1>&6
6549
6550 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6551 echo "configure:6552: checking whether to build shared libraries" >&5
6552 test "$can_build_shared" = "no" && enable_shared=no
6553
6554 # On AIX, shared libraries and static libraries use the same namespace, and
6555 # are all built from PIC.
6556 case "$host_os" in
6557 aix3*)
6558   test "$enable_shared" = yes && enable_static=no
6559   if test -n "$RANLIB"; then
6560     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6561     postinstall_cmds='$RANLIB $lib'
6562   fi
6563   ;;
6564
6565 aix4*)
6566   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6567     test "$enable_shared" = yes && enable_static=no
6568   fi
6569   ;;
6570 esac
6571 echo "$ac_t""$enable_shared" 1>&6
6572
6573 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6574 echo "configure:6575: checking whether to build static libraries" >&5
6575 # Make sure either enable_shared or enable_static is yes.
6576 test "$enable_shared" = yes || enable_static=yes
6577 echo "$ac_t""$enable_static" 1>&6
6578
6579 if test "$hardcode_action" = relink; then
6580   # Fast installation is not supported
6581   enable_fast_install=no
6582 elif test "$shlibpath_overrides_runpath" = yes ||
6583      test "$enable_shared" = no; then
6584   # Fast installation is not necessary
6585   enable_fast_install=needless
6586 fi
6587
6588 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6589 if test "$GCC" = yes; then
6590   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6591 fi
6592
6593 if test "x$enable_dlopen" != xyes; then
6594   enable_dlopen=unknown
6595   enable_dlopen_self=unknown
6596   enable_dlopen_self_static=unknown
6597 else
6598   lt_cv_dlopen=no
6599   lt_cv_dlopen_libs=
6600
6601   case $host_os in
6602   beos*)
6603     lt_cv_dlopen="load_add_on"
6604     lt_cv_dlopen_libs=
6605     lt_cv_dlopen_self=yes
6606     ;;
6607
6608   cygwin* | mingw* | pw32*)
6609     lt_cv_dlopen="LoadLibrary"
6610     lt_cv_dlopen_libs=
6611    ;;
6612
6613   *)
6614     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6615 echo "configure:6616: checking for shl_load" >&5
6616 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6617   echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619   cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* System header to define __stub macros and hopefully few prototypes,
6623     which can conflict with char shl_load(); below.  */
6624 #include <assert.h>
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 /* We use char because int might match the return type of a gcc2
6627     builtin and then its argument prototype would still apply.  */
6628 char shl_load();
6629 char (*f)();
6630
6631 int main() {
6632
6633 /* The GNU C library defines this for functions which it implements
6634     to always fail with ENOSYS.  Some functions are actually named
6635     something starting with __ and the normal name is an alias.  */
6636 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6637 choke me
6638 #else
6639 f = shl_load;
6640 #endif
6641
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_func_shl_load=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_func_shl_load=no"
6652 fi
6653 rm -f conftest*
6654 fi
6655
6656 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6657   echo "$ac_t""yes" 1>&6
6658   lt_cv_dlopen="shl_load"
6659 else
6660   echo "$ac_t""no" 1>&6
6661 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6662 echo "configure:6663: checking for shl_load in -ldld" >&5
6663 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   ac_save_LIBS="$LIBS"
6668 LIBS="-ldld  $LIBS"
6669 cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char shl_load();
6676
6677 int main() {
6678 shl_load()
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=no"
6689 fi
6690 rm -f conftest*
6691 LIBS="$ac_save_LIBS"
6692
6693 fi
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6697 else
6698   echo "$ac_t""no" 1>&6
6699 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6700 echo "configure:6701: checking for dlopen" >&5
6701 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6702   echo $ac_n "(cached) $ac_c" 1>&6
6703 else
6704   cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 /* System header to define __stub macros and hopefully few prototypes,
6708     which can conflict with char dlopen(); below.  */
6709 #include <assert.h>
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char dlopen();
6714 char (*f)();
6715
6716 int main() {
6717
6718 /* The GNU C library defines this for functions which it implements
6719     to always fail with ENOSYS.  Some functions are actually named
6720     something starting with __ and the normal name is an alias.  */
6721 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6722 choke me
6723 #else
6724 f = dlopen;
6725 #endif
6726
6727 ; return 0; }
6728 EOF
6729 if { (eval echo configure:6730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6730   rm -rf conftest*
6731   eval "ac_cv_func_dlopen=yes"
6732 else
6733   echo "configure: failed program was:" >&5
6734   cat conftest.$ac_ext >&5
6735   rm -rf conftest*
6736   eval "ac_cv_func_dlopen=no"
6737 fi
6738 rm -f conftest*
6739 fi
6740
6741 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6742   echo "$ac_t""yes" 1>&6
6743   lt_cv_dlopen="dlopen"
6744 else
6745   echo "$ac_t""no" 1>&6
6746 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6747 echo "configure:6748: checking for dlopen in -ldl" >&5
6748 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6750   echo $ac_n "(cached) $ac_c" 1>&6
6751 else
6752   ac_save_LIBS="$LIBS"
6753 LIBS="-ldl  $LIBS"
6754 cat > conftest.$ac_ext <<EOF
6755 #line 6756 "configure"
6756 #include "confdefs.h"
6757 /* Override any gcc2 internal prototype to avoid an error.  */
6758 /* We use char because int might match the return type of a gcc2
6759     builtin and then its argument prototype would still apply.  */
6760 char dlopen();
6761
6762 int main() {
6763 dlopen()
6764 ; return 0; }
6765 EOF
6766 if { (eval echo configure:6767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6767   rm -rf conftest*
6768   eval "ac_cv_lib_$ac_lib_var=yes"
6769 else
6770   echo "configure: failed program was:" >&5
6771   cat conftest.$ac_ext >&5
6772   rm -rf conftest*
6773   eval "ac_cv_lib_$ac_lib_var=no"
6774 fi
6775 rm -f conftest*
6776 LIBS="$ac_save_LIBS"
6777
6778 fi
6779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6780   echo "$ac_t""yes" 1>&6
6781   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6782 else
6783   echo "$ac_t""no" 1>&6
6784 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6785 echo "configure:6786: checking for dlopen in -lsvld" >&5
6786 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6787 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6788   echo $ac_n "(cached) $ac_c" 1>&6
6789 else
6790   ac_save_LIBS="$LIBS"
6791 LIBS="-lsvld  $LIBS"
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 /* Override any gcc2 internal prototype to avoid an error.  */
6796 /* We use char because int might match the return type of a gcc2
6797     builtin and then its argument prototype would still apply.  */
6798 char dlopen();
6799
6800 int main() {
6801 dlopen()
6802 ; return 0; }
6803 EOF
6804 if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6805   rm -rf conftest*
6806   eval "ac_cv_lib_$ac_lib_var=yes"
6807 else
6808   echo "configure: failed program was:" >&5
6809   cat conftest.$ac_ext >&5
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=no"
6812 fi
6813 rm -f conftest*
6814 LIBS="$ac_save_LIBS"
6815
6816 fi
6817 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6818   echo "$ac_t""yes" 1>&6
6819   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6820 else
6821   echo "$ac_t""no" 1>&6
6822 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6823 echo "configure:6824: checking for dld_link in -ldld" >&5
6824 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6826   echo $ac_n "(cached) $ac_c" 1>&6
6827 else
6828   ac_save_LIBS="$LIBS"
6829 LIBS="-ldld  $LIBS"
6830 cat > conftest.$ac_ext <<EOF
6831 #line 6832 "configure"
6832 #include "confdefs.h"
6833 /* Override any gcc2 internal prototype to avoid an error.  */
6834 /* We use char because int might match the return type of a gcc2
6835     builtin and then its argument prototype would still apply.  */
6836 char dld_link();
6837
6838 int main() {
6839 dld_link()
6840 ; return 0; }
6841 EOF
6842 if { (eval echo configure:6843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843   rm -rf conftest*
6844   eval "ac_cv_lib_$ac_lib_var=yes"
6845 else
6846   echo "configure: failed program was:" >&5
6847   cat conftest.$ac_ext >&5
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=no"
6850 fi
6851 rm -f conftest*
6852 LIBS="$ac_save_LIBS"
6853
6854 fi
6855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6856   echo "$ac_t""yes" 1>&6
6857   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6858 else
6859   echo "$ac_t""no" 1>&6
6860 fi
6861
6862               
6863 fi
6864
6865             
6866 fi
6867
6868           
6869 fi
6870
6871         
6872 fi
6873
6874       
6875 fi
6876
6877     ;;
6878   esac
6879
6880   if test "x$lt_cv_dlopen" != xno; then
6881     enable_dlopen=yes
6882   else
6883     enable_dlopen=no
6884   fi
6885
6886   case $lt_cv_dlopen in
6887   dlopen)
6888     save_CPPFLAGS="$CPPFLAGS"
6889         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6890
6891     save_LDFLAGS="$LDFLAGS"
6892     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6893
6894     save_LIBS="$LIBS"
6895     LIBS="$lt_cv_dlopen_libs $LIBS"
6896
6897     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6898 echo "configure:6899: checking whether a program can dlopen itself" >&5
6899 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6900   echo $ac_n "(cached) $ac_c" 1>&6
6901 else
6902           if test "$cross_compiling" = yes; then :
6903   lt_cv_dlopen_self=cross
6904 else
6905     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6906   lt_status=$lt_dlunknown
6907   cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910
6911 #if HAVE_DLFCN_H
6912 #include <dlfcn.h>
6913 #endif
6914
6915 #include <stdio.h>
6916
6917 #ifdef RTLD_GLOBAL
6918 #  define LT_DLGLOBAL           RTLD_GLOBAL
6919 #else
6920 #  ifdef DL_GLOBAL
6921 #    define LT_DLGLOBAL         DL_GLOBAL
6922 #  else
6923 #    define LT_DLGLOBAL         0
6924 #  endif
6925 #endif
6926
6927 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6928    find out it does not work in some platform. */
6929 #ifndef LT_DLLAZY_OR_NOW
6930 #  ifdef RTLD_LAZY
6931 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6932 #  else
6933 #    ifdef DL_LAZY
6934 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6935 #    else
6936 #      ifdef RTLD_NOW
6937 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6938 #      else
6939 #        ifdef DL_NOW
6940 #          define LT_DLLAZY_OR_NOW      DL_NOW
6941 #        else
6942 #          define LT_DLLAZY_OR_NOW      0
6943 #        endif
6944 #      endif
6945 #    endif
6946 #  endif
6947 #endif
6948
6949 #ifdef __cplusplus
6950 extern "C" void exit (int);
6951 #endif
6952
6953 void fnord() { int i=42;}
6954 int main ()
6955 {
6956   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6957   int status = $lt_dlunknown;
6958
6959   if (self)
6960     {
6961       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6962       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6963       /* dlclose (self); */
6964     }
6965
6966     exit (status);
6967 }
6968 EOF
6969   if { (eval echo configure:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6970     (./conftest; exit; ) 2>/dev/null
6971     lt_status=$?
6972     case x$lt_status in
6973       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6974       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6975       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6976     esac
6977   else :
6978     # compilation failed
6979     lt_cv_dlopen_self=no
6980   fi
6981 fi
6982 rm -fr conftest*
6983
6984     
6985 fi
6986
6987 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6988
6989     if test "x$lt_cv_dlopen_self" = xyes; then
6990       LDFLAGS="$LDFLAGS $link_static_flag"
6991       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6992 echo "configure:6993: checking whether a statically linked program can dlopen itself" >&5
6993 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6994   echo $ac_n "(cached) $ac_c" 1>&6
6995 else
6996           if test "$cross_compiling" = yes; then :
6997   lt_cv_dlopen_self_static=cross
6998 else
6999     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7000   lt_status=$lt_dlunknown
7001   cat > conftest.$ac_ext <<EOF
7002 #line 7003 "configure"
7003 #include "confdefs.h"
7004
7005 #if HAVE_DLFCN_H
7006 #include <dlfcn.h>
7007 #endif
7008
7009 #include <stdio.h>
7010
7011 #ifdef RTLD_GLOBAL
7012 #  define LT_DLGLOBAL           RTLD_GLOBAL
7013 #else
7014 #  ifdef DL_GLOBAL
7015 #    define LT_DLGLOBAL         DL_GLOBAL
7016 #  else
7017 #    define LT_DLGLOBAL         0
7018 #  endif
7019 #endif
7020
7021 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7022    find out it does not work in some platform. */
7023 #ifndef LT_DLLAZY_OR_NOW
7024 #  ifdef RTLD_LAZY
7025 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7026 #  else
7027 #    ifdef DL_LAZY
7028 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7029 #    else
7030 #      ifdef RTLD_NOW
7031 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7032 #      else
7033 #        ifdef DL_NOW
7034 #          define LT_DLLAZY_OR_NOW      DL_NOW
7035 #        else
7036 #          define LT_DLLAZY_OR_NOW      0
7037 #        endif
7038 #      endif
7039 #    endif
7040 #  endif
7041 #endif
7042
7043 #ifdef __cplusplus
7044 extern "C" void exit (int);
7045 #endif
7046
7047 void fnord() { int i=42;}
7048 int main ()
7049 {
7050   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7051   int status = $lt_dlunknown;
7052
7053   if (self)
7054     {
7055       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7056       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7057       /* dlclose (self); */
7058     }
7059
7060     exit (status);
7061 }
7062 EOF
7063   if { (eval echo configure:7064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7064     (./conftest; exit; ) 2>/dev/null
7065     lt_status=$?
7066     case x$lt_status in
7067       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7068       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7069       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7070     esac
7071   else :
7072     # compilation failed
7073     lt_cv_dlopen_self_static=no
7074   fi
7075 fi
7076 rm -fr conftest*
7077
7078       
7079 fi
7080
7081 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7082     fi
7083
7084     CPPFLAGS="$save_CPPFLAGS"
7085     LDFLAGS="$save_LDFLAGS"
7086     LIBS="$save_LIBS"
7087     ;;
7088   esac
7089
7090   case $lt_cv_dlopen_self in
7091   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7092   *) enable_dlopen_self=unknown ;;
7093   esac
7094
7095   case $lt_cv_dlopen_self_static in
7096   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7097   *) enable_dlopen_self_static=unknown ;;
7098   esac
7099 fi
7100
7101
7102 if test "$enable_shared" = yes && test "$GCC" = yes; then
7103   case $archive_cmds in
7104   *'~'*)
7105     # FIXME: we may have to deal with multi-command sequences.
7106     ;;
7107   '$CC '*)
7108     # Test whether the compiler implicitly links with -lc since on some
7109     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7110     # to ld, don't add -lc before -lgcc.
7111     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7112 echo "configure:7113: checking whether -lc should be explicitly linked in" >&5
7113     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7114   echo $ac_n "(cached) $ac_c" 1>&6
7115 else
7116   $rm conftest*
7117     echo 'static int dummy;' > conftest.$ac_ext
7118
7119     if { (eval echo configure:7120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7120       soname=conftest
7121       lib=conftest
7122       libobjs=conftest.$ac_objext
7123       deplibs=
7124       wl=$lt_cv_prog_cc_wl
7125       compiler_flags=-v
7126       linker_flags=-v
7127       verstring=
7128       output_objdir=.
7129       libname=conftest
7130       save_allow_undefined_flag=$allow_undefined_flag
7131       allow_undefined_flag=
7132       if { (eval echo configure:7133: \"$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; }
7133       then
7134         lt_cv_archive_cmds_need_lc=no
7135       else
7136         lt_cv_archive_cmds_need_lc=yes
7137       fi
7138       allow_undefined_flag=$save_allow_undefined_flag
7139     else
7140       cat conftest.err 1>&5
7141     fi
7142 fi
7143
7144     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7145     ;;
7146   esac
7147 fi
7148 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7149
7150 # The second clause should only fire when bootstrapping the
7151 # libtool distribution, otherwise you forgot to ship ltmain.sh
7152 # with your package, and you will get complaints that there are
7153 # no rules to generate ltmain.sh.
7154 if test -f "$ltmain"; then
7155   :
7156 else
7157   # If there is no Makefile yet, we rely on a make rule to execute
7158   # `config.status --recheck' to rerun these tests and create the
7159   # libtool script then.
7160   test -f Makefile && make "$ltmain"
7161 fi
7162
7163 if test -f "$ltmain"; then
7164   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7165   $rm -f "${ofile}T"
7166
7167   echo creating $ofile
7168
7169   # Now quote all the things that may contain metacharacters while being
7170   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7171   # variables and quote the copies for generation of the libtool script.
7172   for var in echo old_CC old_CFLAGS \
7173     AR AR_FLAGS CC LD LN_S NM SHELL \
7174     reload_flag reload_cmds wl \
7175     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7176     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7177     library_names_spec soname_spec \
7178     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7179     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7180     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7181     old_striplib striplib file_magic_cmd export_symbols_cmds \
7182     deplibs_check_method allow_undefined_flag no_undefined_flag \
7183     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7184     global_symbol_to_c_name_address \
7185     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7186     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7187     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7188
7189     case $var in
7190     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7191     old_postinstall_cmds | old_postuninstall_cmds | \
7192     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7193     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7194     postinstall_cmds | postuninstall_cmds | \
7195     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7196       # Double-quote double-evaled strings.
7197       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7198       ;;
7199     *)
7200       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7201       ;;
7202     esac
7203   done
7204
7205   cat <<__EOF__ > "${ofile}T"
7206 #! $SHELL
7207
7208 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7209 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7210 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7211 #
7212 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7213 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7214 #
7215 # This program is free software; you can redistribute it and/or modify
7216 # it under the terms of the GNU General Public License as published by
7217 # the Free Software Foundation; either version 2 of the License, or
7218 # (at your option) any later version.
7219 #
7220 # This program is distributed in the hope that it will be useful, but
7221 # WITHOUT ANY WARRANTY; without even the implied warranty of
7222 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7223 # General Public License for more details.
7224 #
7225 # You should have received a copy of the GNU General Public License
7226 # along with this program; if not, write to the Free Software
7227 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7228 #
7229 # As a special exception to the GNU General Public License, if you
7230 # distribute this file as part of a program that contains a
7231 # configuration script generated by Autoconf, you may include it under
7232 # the same distribution terms that you use for the rest of that program.
7233
7234 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7235 Xsed="sed -e s/^X//"
7236
7237 # The HP-UX ksh and POSIX shell print the target directory to stdout
7238 # if CDPATH is set.
7239 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7240
7241 # ### BEGIN LIBTOOL CONFIG
7242
7243 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7244
7245 # Shell to use when invoking shell scripts.
7246 SHELL=$lt_SHELL
7247
7248 # Whether or not to build shared libraries.
7249 build_libtool_libs=$enable_shared
7250
7251 # Whether or not to build static libraries.
7252 build_old_libs=$enable_static
7253
7254 # Whether or not to add -lc for building shared libraries.
7255 build_libtool_need_lc=$need_lc
7256
7257 # Whether or not to optimize for fast installation.
7258 fast_install=$enable_fast_install
7259
7260 # The host system.
7261 host_alias=$host_alias
7262 host=$host
7263
7264 # An echo program that does not interpret backslashes.
7265 echo=$lt_echo
7266
7267 # The archiver.
7268 AR=$lt_AR
7269 AR_FLAGS=$lt_AR_FLAGS
7270
7271 # The default C compiler.
7272 CC=$lt_CC
7273
7274 # Is the compiler the GNU C compiler?
7275 with_gcc=$GCC
7276
7277 # The linker used to build libraries.
7278 LD=$lt_LD
7279
7280 # Whether we need hard or soft links.
7281 LN_S=$lt_LN_S
7282
7283 # A BSD-compatible nm program.
7284 NM=$lt_NM
7285
7286 # A symbol stripping program
7287 STRIP=$STRIP
7288
7289 # Used to examine libraries when file_magic_cmd begins "file"
7290 MAGIC_CMD=$MAGIC_CMD
7291
7292 # Used on cygwin: DLL creation program.
7293 DLLTOOL="$DLLTOOL"
7294
7295 # Used on cygwin: object dumper.
7296 OBJDUMP="$OBJDUMP"
7297
7298 # Used on cygwin: assembler.
7299 AS="$AS"
7300
7301 # The name of the directory that contains temporary libtool files.
7302 objdir=$objdir
7303
7304 # How to create reloadable object files.
7305 reload_flag=$lt_reload_flag
7306 reload_cmds=$lt_reload_cmds
7307
7308 # How to pass a linker flag through the compiler.
7309 wl=$lt_wl
7310
7311 # Object file suffix (normally "o").
7312 objext="$ac_objext"
7313
7314 # Old archive suffix (normally "a").
7315 libext="$libext"
7316
7317 # Executable file suffix (normally "").
7318 exeext="$exeext"
7319
7320 # Additional compiler flags for building library objects.
7321 pic_flag=$lt_pic_flag
7322 pic_mode=$pic_mode
7323
7324 # Does compiler simultaneously support -c and -o options?
7325 compiler_c_o=$lt_compiler_c_o
7326
7327 # Can we write directly to a .lo ?
7328 compiler_o_lo=$lt_compiler_o_lo
7329
7330 # Must we lock files when doing compilation ?
7331 need_locks=$lt_need_locks
7332
7333 # Do we need the lib prefix for modules?
7334 need_lib_prefix=$need_lib_prefix
7335
7336 # Do we need a version for libraries?
7337 need_version=$need_version
7338
7339 # Whether dlopen is supported.
7340 dlopen_support=$enable_dlopen
7341
7342 # Whether dlopen of programs is supported.
7343 dlopen_self=$enable_dlopen_self
7344
7345 # Whether dlopen of statically linked programs is supported.
7346 dlopen_self_static=$enable_dlopen_self_static
7347
7348 # Compiler flag to prevent dynamic linking.
7349 link_static_flag=$lt_link_static_flag
7350
7351 # Compiler flag to turn off builtin functions.
7352 no_builtin_flag=$lt_no_builtin_flag
7353
7354 # Compiler flag to allow reflexive dlopens.
7355 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7356
7357 # Compiler flag to generate shared objects directly from archives.
7358 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7359
7360 # Compiler flag to generate thread-safe objects.
7361 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7362
7363 # Library versioning type.
7364 version_type=$version_type
7365
7366 # Format of library name prefix.
7367 libname_spec=$lt_libname_spec
7368
7369 # List of archive names.  First name is the real one, the rest are links.
7370 # The last name is the one that the linker finds with -lNAME.
7371 library_names_spec=$lt_library_names_spec
7372
7373 # The coded name of the library, if different from the real name.
7374 soname_spec=$lt_soname_spec
7375
7376 # Commands used to build and install an old-style archive.
7377 RANLIB=$lt_RANLIB
7378 old_archive_cmds=$lt_old_archive_cmds
7379 old_postinstall_cmds=$lt_old_postinstall_cmds
7380 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7381
7382 # Create an old-style archive from a shared archive.
7383 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7384
7385 # Create a temporary old-style archive to link instead of a shared archive.
7386 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7387
7388 # Commands used to build and install a shared archive.
7389 archive_cmds=$lt_archive_cmds
7390 archive_expsym_cmds=$lt_archive_expsym_cmds
7391 postinstall_cmds=$lt_postinstall_cmds
7392 postuninstall_cmds=$lt_postuninstall_cmds
7393
7394 # Commands to strip libraries.
7395 old_striplib=$lt_old_striplib
7396 striplib=$lt_striplib
7397
7398 # Method to check whether dependent libraries are shared objects.
7399 deplibs_check_method=$lt_deplibs_check_method
7400
7401 # Command to use when deplibs_check_method == file_magic.
7402 file_magic_cmd=$lt_file_magic_cmd
7403
7404 # Flag that allows shared libraries with undefined symbols to be built.
7405 allow_undefined_flag=$lt_allow_undefined_flag
7406
7407 # Flag that forces no undefined symbols.
7408 no_undefined_flag=$lt_no_undefined_flag
7409
7410 # Commands used to finish a libtool library installation in a directory.
7411 finish_cmds=$lt_finish_cmds
7412
7413 # Same as above, but a single script fragment to be evaled but not shown.
7414 finish_eval=$lt_finish_eval
7415
7416 # Take the output of nm and produce a listing of raw symbols and C names.
7417 global_symbol_pipe=$lt_global_symbol_pipe
7418
7419 # Transform the output of nm in a proper C declaration
7420 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7421
7422 # Transform the output of nm in a C name address pair
7423 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7424
7425 # This is the shared library runtime path variable.
7426 runpath_var=$runpath_var
7427
7428 # This is the shared library path variable.
7429 shlibpath_var=$shlibpath_var
7430
7431 # Is shlibpath searched before the hard-coded library search path?
7432 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7433
7434 # How to hardcode a shared library path into an executable.
7435 hardcode_action=$hardcode_action
7436
7437 # Whether we should hardcode library paths into libraries.
7438 hardcode_into_libs=$hardcode_into_libs
7439
7440 # Flag to hardcode \$libdir into a binary during linking.
7441 # This must work even if \$libdir does not exist.
7442 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7443
7444 # Whether we need a single -rpath flag with a separated argument.
7445 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7446
7447 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7448 # resulting binary.
7449 hardcode_direct=$hardcode_direct
7450
7451 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7452 # resulting binary.
7453 hardcode_minus_L=$hardcode_minus_L
7454
7455 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7456 # the resulting binary.
7457 hardcode_shlibpath_var=$hardcode_shlibpath_var
7458
7459 # Variables whose values should be saved in libtool wrapper scripts and
7460 # restored at relink time.
7461 variables_saved_for_relink="$variables_saved_for_relink"
7462
7463 # Whether libtool must link a program against all its dependency libraries.
7464 link_all_deplibs=$link_all_deplibs
7465
7466 # Compile-time system search path for libraries
7467 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7468
7469 # Run-time system search path for libraries
7470 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7471
7472 # Fix the shell variable \$srcfile for the compiler.
7473 fix_srcfile_path="$fix_srcfile_path"
7474
7475 # Set to yes if exported symbols are required.
7476 always_export_symbols=$always_export_symbols
7477
7478 # The commands to list exported symbols.
7479 export_symbols_cmds=$lt_export_symbols_cmds
7480
7481 # The commands to extract the exported symbol list from a shared archive.
7482 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7483
7484 # Symbols that should not be listed in the preloaded symbols.
7485 exclude_expsyms=$lt_exclude_expsyms
7486
7487 # Symbols that must always be exported.
7488 include_expsyms=$lt_include_expsyms
7489
7490 # ### END LIBTOOL CONFIG
7491
7492 __EOF__
7493
7494   case $host_os in
7495   aix3*)
7496     cat <<\EOF >> "${ofile}T"
7497
7498 # AIX sometimes has problems with the GCC collect2 program.  For some
7499 # reason, if we set the COLLECT_NAMES environment variable, the problems
7500 # vanish in a puff of smoke.
7501 if test "X${COLLECT_NAMES+set}" != Xset; then
7502   COLLECT_NAMES=
7503   export COLLECT_NAMES
7504 fi
7505 EOF
7506     ;;
7507   esac
7508
7509   case $host_os in
7510   cygwin* | mingw* | pw32* | os2*)
7511     cat <<'EOF' >> "${ofile}T"
7512       # This is a source program that is used to create dlls on Windows
7513       # Don't remove nor modify the starting and closing comments
7514 # /* ltdll.c starts here */
7515 # #define WIN32_LEAN_AND_MEAN
7516 # #include <windows.h>
7517 # #undef WIN32_LEAN_AND_MEAN
7518 # #include <stdio.h>
7519 #
7520 # #ifndef __CYGWIN__
7521 # #  ifdef __CYGWIN32__
7522 # #    define __CYGWIN__ __CYGWIN32__
7523 # #  endif
7524 # #endif
7525 #
7526 # #ifdef __cplusplus
7527 # extern "C" {
7528 # #endif
7529 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7530 # #ifdef __cplusplus
7531 # }
7532 # #endif
7533 #
7534 # #ifdef __CYGWIN__
7535 # #include <cygwin/cygwin_dll.h>
7536 # DECLARE_CYGWIN_DLL( DllMain );
7537 # #endif
7538 # HINSTANCE __hDllInstance_base;
7539 #
7540 # BOOL APIENTRY
7541 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7542 # {
7543 #   __hDllInstance_base = hInst;
7544 #   return TRUE;
7545 # }
7546 # /* ltdll.c ends here */
7547         # This is a source program that is used to create import libraries
7548         # on Windows for dlls which lack them. Don't remove nor modify the
7549         # starting and closing comments
7550 # /* impgen.c starts here */
7551 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7552 #
7553 #  This file is part of GNU libtool.
7554 #
7555 #  This program is free software; you can redistribute it and/or modify
7556 #  it under the terms of the GNU General Public License as published by
7557 #  the Free Software Foundation; either version 2 of the License, or
7558 #  (at your option) any later version.
7559 #
7560 #  This program is distributed in the hope that it will be useful,
7561 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7562 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7563 #  GNU General Public License for more details.
7564 #
7565 #  You should have received a copy of the GNU General Public License
7566 #  along with this program; if not, write to the Free Software
7567 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7568 #  */
7569 #
7570 # #include <stdio.h>            /* for printf() */
7571 # #include <unistd.h>           /* for open(), lseek(), read() */
7572 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7573 # #include <string.h>           /* for strdup() */
7574 #
7575 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7576 # #ifndef O_BINARY
7577 # #define O_BINARY 0
7578 # #endif
7579 #
7580 # static unsigned int
7581 # pe_get16 (fd, offset)
7582 #      int fd;
7583 #      int offset;
7584 # {
7585 #   unsigned char b[2];
7586 #   lseek (fd, offset, SEEK_SET);
7587 #   read (fd, b, 2);
7588 #   return b[0] + (b[1]<<8);
7589 # }
7590 #
7591 # static unsigned int
7592 # pe_get32 (fd, offset)
7593 #     int fd;
7594 #     int offset;
7595 # {
7596 #   unsigned char b[4];
7597 #   lseek (fd, offset, SEEK_SET);
7598 #   read (fd, b, 4);
7599 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7600 # }
7601 #
7602 # static unsigned int
7603 # pe_as32 (ptr)
7604 #      void *ptr;
7605 # {
7606 #   unsigned char *b = ptr;
7607 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7608 # }
7609 #
7610 # int
7611 # main (argc, argv)
7612 #     int argc;
7613 #     char *argv[];
7614 # {
7615 #     int dll;
7616 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7617 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7618 #     unsigned long name_rvas, nexp;
7619 #     unsigned char *expdata, *erva;
7620 #     char *filename, *dll_name;
7621 #
7622 #     filename = argv[1];
7623 #
7624 #     dll = open(filename, O_RDONLY|O_BINARY);
7625 #     if (dll < 1)
7626 #       return 1;
7627 #
7628 #     dll_name = filename;
7629 #
7630 #     for (i=0; filename[i]; i++)
7631 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7632 #           dll_name = filename + i +1;
7633 #
7634 #     pe_header_offset = pe_get32 (dll, 0x3c);
7635 #     opthdr_ofs = pe_header_offset + 4 + 20;
7636 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7637 #
7638 #     if (num_entries < 1) /* no exports */
7639 #       return 1;
7640 #
7641 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7642 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7643 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7644 #     secptr = (pe_header_offset + 4 + 20 +
7645 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7646 #
7647 #     expptr = 0;
7648 #     for (i = 0; i < nsections; i++)
7649 #     {
7650 #       char sname[8];
7651 #       unsigned long secptr1 = secptr + 40 * i;
7652 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7653 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7654 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7655 #       lseek(dll, secptr1, SEEK_SET);
7656 #       read(dll, sname, 8);
7657 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7658 #       {
7659 #           expptr = fptr + (export_rva - vaddr);
7660 #           if (export_rva + export_size > vaddr + vsize)
7661 #               export_size = vsize - (export_rva - vaddr);
7662 #           break;
7663 #       }
7664 #     }
7665 #
7666 #     expdata = (unsigned char*)malloc(export_size);
7667 #     lseek (dll, expptr, SEEK_SET);
7668 #     read (dll, expdata, export_size);
7669 #     erva = expdata - export_rva;
7670 #
7671 #     nexp = pe_as32 (expdata+24);
7672 #     name_rvas = pe_as32 (expdata+32);
7673 #
7674 #     printf ("EXPORTS\n");
7675 #     for (i = 0; i<nexp; i++)
7676 #     {
7677 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7678 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7679 #     }
7680 #
7681 #     return 0;
7682 # }
7683 # /* impgen.c ends here */
7684
7685 EOF
7686     ;;
7687   esac
7688
7689   # We use sed instead of cat because bash on DJGPP gets confused if
7690   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7691   # text mode, it properly converts lines to CR/LF.  This bash problem
7692   # is reportedly fixed, but why not run on old versions too?
7693   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7694
7695   mv -f "${ofile}T" "$ofile" || \
7696     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7697   chmod +x "$ofile"
7698 fi
7699
7700
7701
7702
7703
7704 # This can be used to rebuild libtool when needed
7705 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7706
7707 # Always use our own libtool.
7708 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7709
7710 # Prevent multiple expansion
7711
7712
7713
7714 LTSTATIC=""
7715 if test "${OPENLDAP_CVS}"; then
7716         LTSTATIC="-static"
7717 fi
7718
7719 # test for ln hardlink support
7720 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7721 echo "configure:7722: checking whether ln works" >&5
7722 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7723   echo $ac_n "(cached) $ac_c" 1>&6
7724 else
7725   rm -f conftest.src conftest.dst
7726 echo "conftest" > conftest.src
7727 if ln conftest.src conftest.dst 2>/dev/null
7728 then
7729   ol_cv_prog_LN_H="ln"
7730 else
7731   ol_cv_prog_LN_H="cp"
7732 fi
7733 rm -f conftest.src conftest.dst
7734
7735 fi
7736 LN_H="$ol_cv_prog_LN_H"
7737 if test "$ol_cv_prog_LN_H" = "ln"; then
7738         echo "$ac_t""yes" 1>&6
7739 else
7740         echo "$ac_t""no" 1>&6
7741 fi
7742
7743 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7744 echo "configure:7745: checking whether ln -s works" >&5
7745 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7746   echo $ac_n "(cached) $ac_c" 1>&6
7747 else
7748   rm -f conftestdata
7749 if ln -s X conftestdata 2>/dev/null
7750 then
7751   rm -f conftestdata
7752   ac_cv_prog_LN_S="ln -s"
7753 else
7754   ac_cv_prog_LN_S=ln
7755 fi
7756 fi
7757 LN_S="$ac_cv_prog_LN_S"
7758 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7759   echo "$ac_t""yes" 1>&6
7760 else
7761   echo "$ac_t""no" 1>&6
7762 fi
7763
7764
7765 ol_link_perl=no
7766 if test $ol_enable_perl != no ; then
7767         # Extract the first word of "perl", so it can be a program name with args.
7768 set dummy perl; ac_word=$2
7769 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7770 echo "configure:7771: checking for $ac_word" >&5
7771 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7772   echo $ac_n "(cached) $ac_c" 1>&6
7773 else
7774   case "$PERLBIN" in
7775   /*)
7776   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7777   ;;
7778   ?:/*)
7779   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7780   ;;
7781   *)
7782   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7783   ac_dummy="$PATH"
7784   for ac_dir in $ac_dummy; do 
7785     test -z "$ac_dir" && ac_dir=.
7786     if test -f $ac_dir/$ac_word; then
7787       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7788       break
7789     fi
7790   done
7791   IFS="$ac_save_ifs"
7792   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7793   ;;
7794 esac
7795 fi
7796 PERLBIN="$ac_cv_path_PERLBIN"
7797 if test -n "$PERLBIN"; then
7798   echo "$ac_t""$PERLBIN" 1>&6
7799 else
7800   echo "$ac_t""no" 1>&6
7801 fi
7802
7803
7804         if test "no$PERLBIN" = "no" ; then
7805                 if test $ol_enable_perl = yes ; then
7806                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7807                 fi
7808
7809         else
7810                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7811                 if test x"$ol_with_perl_module" = "xstatic" ; then
7812                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7813                 else
7814                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7815                 fi
7816                                 ol_link_perl=yes
7817         fi
7818 fi
7819
7820 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7821 echo "configure:7822: checking how to run the C preprocessor" >&5
7822 # On Suns, sometimes $CPP names a directory.
7823 if test -n "$CPP" && test -d "$CPP"; then
7824   CPP=
7825 fi
7826 if test -z "$CPP"; then
7827 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7828   echo $ac_n "(cached) $ac_c" 1>&6
7829 else
7830     # This must be in double quotes, not single quotes, because CPP may get
7831   # substituted into the Makefile and "${CC-cc}" will confuse make.
7832   CPP="${CC-cc} -E"
7833   # On the NeXT, cc -E runs the code through the compiler's parser,
7834   # not just through cpp.
7835   cat > conftest.$ac_ext <<EOF
7836 #line 7837 "configure"
7837 #include "confdefs.h"
7838 #include <assert.h>
7839 Syntax Error
7840 EOF
7841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7842 { (eval echo configure:7843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7844 if test -z "$ac_err"; then
7845   :
7846 else
7847   echo "$ac_err" >&5
7848   echo "configure: failed program was:" >&5
7849   cat conftest.$ac_ext >&5
7850   rm -rf conftest*
7851   CPP="${CC-cc} -E -traditional-cpp"
7852   cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 #include <assert.h>
7856 Syntax Error
7857 EOF
7858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7859 { (eval echo configure:7860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7861 if test -z "$ac_err"; then
7862   :
7863 else
7864   echo "$ac_err" >&5
7865   echo "configure: failed program was:" >&5
7866   cat conftest.$ac_ext >&5
7867   rm -rf conftest*
7868   CPP="${CC-cc} -nologo -E"
7869   cat > conftest.$ac_ext <<EOF
7870 #line 7871 "configure"
7871 #include "confdefs.h"
7872 #include <assert.h>
7873 Syntax Error
7874 EOF
7875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7876 { (eval echo configure:7877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7878 if test -z "$ac_err"; then
7879   :
7880 else
7881   echo "$ac_err" >&5
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   CPP=/lib/cpp
7886 fi
7887 rm -f conftest*
7888 fi
7889 rm -f conftest*
7890 fi
7891 rm -f conftest*
7892   ac_cv_prog_CPP="$CPP"
7893 fi
7894   CPP="$ac_cv_prog_CPP"
7895 else
7896   ac_cv_prog_CPP="$CPP"
7897 fi
7898 echo "$ac_t""$CPP" 1>&6
7899
7900
7901 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7902         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7903
7904 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7905         echo "configure: warning: programs compiled here do run here..." 1>&2
7906         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7907
7908 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7909         echo "configure: warning: programs compiled here do not run here..." 1>&2
7910         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7911 fi
7912
7913
7914 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7915 echo "configure:7916: checking for Cygwin environment" >&5
7916 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7917   echo $ac_n "(cached) $ac_c" 1>&6
7918 else
7919   cat > conftest.$ac_ext <<EOF
7920 #line 7921 "configure"
7921 #include "confdefs.h"
7922
7923 int main() {
7924
7925 #ifndef __CYGWIN__
7926 #define __CYGWIN__ __CYGWIN32__
7927 #endif
7928 return __CYGWIN__;
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7932   rm -rf conftest*
7933   ac_cv_cygwin=yes
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   ac_cv_cygwin=no
7939 fi
7940 rm -f conftest*
7941 fi
7942
7943 echo "$ac_t""$ac_cv_cygwin" 1>&6
7944 CYGWIN=
7945 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7946 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7947 echo "configure:7948: checking for mingw32 environment" >&5
7948 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7949   echo $ac_n "(cached) $ac_c" 1>&6
7950 else
7951   cat > conftest.$ac_ext <<EOF
7952 #line 7953 "configure"
7953 #include "confdefs.h"
7954
7955 int main() {
7956 return __MINGW32__;
7957 ; return 0; }
7958 EOF
7959 if { (eval echo configure:7960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7960   rm -rf conftest*
7961   ac_cv_mingw32=yes
7962 else
7963   echo "configure: failed program was:" >&5
7964   cat conftest.$ac_ext >&5
7965   rm -rf conftest*
7966   ac_cv_mingw32=no
7967 fi
7968 rm -f conftest*
7969 fi
7970
7971 echo "$ac_t""$ac_cv_mingw32" 1>&6
7972 MINGW32=
7973 test "$ac_cv_mingw32" = yes && MINGW32=yes
7974
7975
7976
7977 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7978 echo "configure:7979: checking for executable suffix" >&5
7979 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7980   echo $ac_n "(cached) $ac_c" 1>&6
7981 else
7982   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7983   ac_cv_exeext=.exe
7984 else
7985   rm -f conftest*
7986   echo 'int main () { return 0; }' > conftest.$ac_ext
7987   ac_cv_exeext=
7988   if { (eval echo configure:7989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7989     for file in conftest.*; do
7990       case $file in
7991       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7992       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7993       esac
7994     done
7995   else
7996     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7997   fi
7998   rm -f conftest*
7999   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8000 fi
8001 fi
8002
8003 EXEEXT=""
8004 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8005 echo "$ac_t""${ac_cv_exeext}" 1>&6
8006 ac_exeext=$EXEEXT
8007
8008 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8009 echo "configure:8010: checking for object suffix" >&5
8010 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8011   echo $ac_n "(cached) $ac_c" 1>&6
8012 else
8013   rm -f conftest*
8014 echo 'int i = 1;' > conftest.$ac_ext
8015 if { (eval echo configure:8016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8016   for ac_file in conftest.*; do
8017     case $ac_file in
8018     *.c) ;;
8019     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8020     esac
8021   done
8022 else
8023   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8024 fi
8025 rm -f conftest*
8026 fi
8027
8028 echo "$ac_t""$ac_cv_objext" 1>&6
8029 OBJEXT=$ac_cv_objext
8030 ac_objext=$ac_cv_objext
8031
8032
8033 cat >> confdefs.h <<EOF
8034 #define EXEEXT "${EXEEXT}"
8035 EOF
8036
8037
8038 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8039 echo "configure:8040: checking for be_app in -lbe" >&5
8040 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8042   echo $ac_n "(cached) $ac_c" 1>&6
8043 else
8044   ac_save_LIBS="$LIBS"
8045 LIBS="-lbe -lroot -lnet $LIBS"
8046 cat > conftest.$ac_ext <<EOF
8047 #line 8048 "configure"
8048 #include "confdefs.h"
8049 /* Override any gcc2 internal prototype to avoid an error.  */
8050 /* We use char because int might match the return type of a gcc2
8051     builtin and then its argument prototype would still apply.  */
8052 char be_app();
8053
8054 int main() {
8055 be_app()
8056 ; return 0; }
8057 EOF
8058 if { (eval echo configure:8059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8059   rm -rf conftest*
8060   eval "ac_cv_lib_$ac_lib_var=yes"
8061 else
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -rf conftest*
8065   eval "ac_cv_lib_$ac_lib_var=no"
8066 fi
8067 rm -f conftest*
8068 LIBS="$ac_save_LIBS"
8069
8070 fi
8071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8072   echo "$ac_t""yes" 1>&6
8073   LIBS="$LIBS -lbe -lroot -lnet"
8074 else
8075   echo "$ac_t""no" 1>&6
8076 :
8077 fi
8078
8079
8080
8081
8082
8083 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8084 echo "configure:8085: checking for ${CC-cc} option to accept ANSI C" >&5
8085 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8086   echo $ac_n "(cached) $ac_c" 1>&6
8087 else
8088   am_cv_prog_cc_stdc=no
8089 ac_save_CC="$CC"
8090 # Don't try gcc -ansi; that turns off useful extensions and
8091 # breaks some systems' header files.
8092 # AIX                   -qlanglvl=ansi
8093 # Ultrix and OSF/1      -std1
8094 # HP-UX 10.20 and later -Ae
8095 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8096 # SVR4                  -Xc -D__EXTENSIONS__
8097 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8098 do
8099   CC="$ac_save_CC $ac_arg"
8100   cat > conftest.$ac_ext <<EOF
8101 #line 8102 "configure"
8102 #include "confdefs.h"
8103 #include <stdarg.h>
8104 #include <stdio.h>
8105 #include <sys/types.h>
8106 #include <sys/stat.h>
8107 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8108 struct buf { int x; };
8109 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8110 static char *e (p, i)
8111      char **p;
8112      int i;
8113 {
8114   return p[i];
8115 }
8116 static char *f (char * (*g) (char **, int), char **p, ...)
8117 {
8118   char *s;
8119   va_list v;
8120   va_start (v,p);
8121   s = g (p, va_arg (v,int));
8122   va_end (v);
8123   return s;
8124 }
8125 int test (int i, double x);
8126 struct s1 {int (*f) (int a);};
8127 struct s2 {int (*f) (double a);};
8128 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8129 int argc;
8130 char **argv;
8131
8132 int main() {
8133
8134 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8135
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8139   rm -rf conftest*
8140   am_cv_prog_cc_stdc="$ac_arg"; break
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144 fi
8145 rm -f conftest*
8146 done
8147 CC="$ac_save_CC"
8148
8149 fi
8150
8151 if test -z "$am_cv_prog_cc_stdc"; then
8152   echo "$ac_t""none needed" 1>&6
8153 else
8154   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8155 fi
8156 case "x$am_cv_prog_cc_stdc" in
8157   x|xno) ;;
8158   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8159 esac
8160
8161 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8162         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8163 fi
8164
8165 # test for make depend flag
8166 OL_MKDEP=
8167 OL_MKDEP_FLAGS=
8168 if test -z "${MKDEP}"; then
8169         OL_MKDEP="${CC-cc}"
8170         if test -z "${MKDEP_FLAGS}"; then
8171                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8172 echo "configure:8173: checking for ${OL_MKDEP} depend flag" >&5
8173 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8174   echo $ac_n "(cached) $ac_c" 1>&6
8175 else
8176   
8177                         ol_cv_mkdep=no
8178                         for flag in "-M" "-xM"; do
8179                                 cat > conftest.c <<EOF
8180  noCode;
8181 EOF
8182                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8183                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8184                                 then
8185                                         if test ! -f conftest."${ac_object}" ; then
8186                                                 ol_cv_mkdep=$flag
8187                                                 OL_MKDEP_FLAGS="$flag"
8188                                                 break
8189                                         fi
8190                                 fi
8191                         done
8192                         rm -f conftest*
8193                 
8194 fi
8195
8196 echo "$ac_t""$ol_cv_mkdep" 1>&6
8197         else
8198                 cc_cv_mkdep=yes
8199                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8200         fi
8201 else
8202         cc_cv_mkdep=yes
8203         OL_MKDEP="${MKDEP}"
8204         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8205 fi
8206
8207
8208
8209 if test "${ol_cv_mkdep}" = no ; then
8210         # this will soon become an error
8211         echo "configure: warning: do not know how to generate dependencies" 1>&2
8212 fi
8213
8214 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8215 echo "configure:8216: checking for afopen in -ls" >&5
8216 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8217 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8218   echo $ac_n "(cached) $ac_c" 1>&6
8219 else
8220   ac_save_LIBS="$LIBS"
8221 LIBS="-ls  $LIBS"
8222 cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8225 /* Override any gcc2 internal prototype to avoid an error.  */
8226 /* We use char because int might match the return type of a gcc2
8227     builtin and then its argument prototype would still apply.  */
8228 char afopen();
8229
8230 int main() {
8231 afopen()
8232 ; return 0; }
8233 EOF
8234 if { (eval echo configure:8235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=yes"
8237 else
8238   echo "configure: failed program was:" >&5
8239   cat conftest.$ac_ext >&5
8240   rm -rf conftest*
8241   eval "ac_cv_lib_$ac_lib_var=no"
8242 fi
8243 rm -f conftest*
8244 LIBS="$ac_save_LIBS"
8245
8246 fi
8247 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8248   echo "$ac_t""yes" 1>&6
8249   
8250         AUTH_LIBS=-ls
8251         cat >> confdefs.h <<\EOF
8252 #define HAVE_AIX_SECURITY 1
8253 EOF
8254
8255
8256 else
8257   echo "$ac_t""no" 1>&6
8258 fi
8259
8260
8261 case "$target" in
8262 *-ibm-openedition)
8263         ac_cv_func_getopt=no
8264         cat >> confdefs.h <<\EOF
8265 #define BOTH_STRINGS_H 1
8266 EOF
8267
8268         ;;
8269 esac
8270
8271 ol_link_modules=no
8272 if test $ol_enable_modules != no ; then
8273         for ac_hdr in ltdl.h
8274 do
8275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8277 echo "configure:8278: checking for $ac_hdr" >&5
8278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <$ac_hdr>
8285 EOF
8286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8287 { (eval echo configure:8288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8289 if test -z "$ac_err"; then
8290   rm -rf conftest*
8291   eval "ac_cv_header_$ac_safe=yes"
8292 else
8293   echo "$ac_err" >&5
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 fi
8301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8304   cat >> confdefs.h <<EOF
8305 #define $ac_tr_hdr 1
8306 EOF
8307  
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311 done
8312
8313
8314         if test $ac_cv_header_ltdl_h = no ; then
8315                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8316         fi
8317
8318         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8319 echo "configure:8320: checking for lt_dlinit in -lltdl" >&5
8320 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   ac_save_LIBS="$LIBS"
8325 LIBS="-lltdl  $LIBS"
8326 cat > conftest.$ac_ext <<EOF
8327 #line 8328 "configure"
8328 #include "confdefs.h"
8329 /* Override any gcc2 internal prototype to avoid an error.  */
8330 /* We use char because int might match the return type of a gcc2
8331     builtin and then its argument prototype would still apply.  */
8332 char lt_dlinit();
8333
8334 int main() {
8335 lt_dlinit()
8336 ; return 0; }
8337 EOF
8338 if { (eval echo configure:8339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8339   rm -rf conftest*
8340   eval "ac_cv_lib_$ac_lib_var=yes"
8341 else
8342   echo "configure: failed program was:" >&5
8343   cat conftest.$ac_ext >&5
8344   rm -rf conftest*
8345   eval "ac_cv_lib_$ac_lib_var=no"
8346 fi
8347 rm -f conftest*
8348 LIBS="$ac_save_LIBS"
8349
8350 fi
8351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8352   echo "$ac_t""yes" 1>&6
8353   
8354                 MODULES_LIBS=-lltdl
8355                 cat >> confdefs.h <<\EOF
8356 #define HAVE_LIBLTDL 1
8357 EOF
8358
8359         
8360 else
8361   echo "$ac_t""no" 1>&6
8362 fi
8363
8364
8365         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8366                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8367         fi
8368         ol_link_modules=yes
8369 else
8370         ol_with_bdb_module=static
8371         ol_with_dnssrv_module=static
8372         ol_with_ldap_module=static
8373         ol_with_ldbm_module=static
8374         ol_with_meta_module=static
8375         ol_with_monitor_module=static
8376         ol_with_null_module=static
8377         ol_with_passwd_module=static
8378         ol_with_perl_module=static
8379         ol_with_shell_module=static
8380         ol_with_tcl_module=static
8381         ol_with_sql_module=static
8382 fi
8383
8384 # test for EBCDIC
8385 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8386 echo "configure:8387: checking for EBCDIC" >&5
8387 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8388   echo $ac_n "(cached) $ac_c" 1>&6
8389 else
8390   
8391         cat > conftest.$ac_ext <<EOF
8392 #line 8393 "configure"
8393 #include "confdefs.h"
8394
8395 #if !('M' == 0xd4)
8396 #include <__ASCII__/generate_error.h>
8397 #endif
8398
8399 EOF
8400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8401 { (eval echo configure:8402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8403 if test -z "$ac_err"; then
8404   rm -rf conftest*
8405   ol_cv_cpp_ebcdic=yes
8406 else
8407   echo "$ac_err" >&5
8408   echo "configure: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   rm -rf conftest*
8411   ol_cv_cpp_ebcdic=no
8412 fi
8413 rm -f conftest*
8414 fi
8415
8416 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8417 if test $ol_cv_cpp_ebcdic = yes ; then
8418         cat >> confdefs.h <<\EOF
8419 #define HAVE_EBCDIC 1
8420 EOF
8421
8422 fi
8423
8424 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8425 echo "configure:8426: checking for ANSI C header files" >&5
8426 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <stdlib.h>
8433 #include <stdarg.h>
8434 #include <string.h>
8435 #include <float.h>
8436 EOF
8437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8438 { (eval echo configure:8439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8440 if test -z "$ac_err"; then
8441   rm -rf conftest*
8442   ol_cv_header_stdc=yes
8443 else
8444   echo "$ac_err" >&5
8445   echo "configure: failed program was:" >&5
8446   cat conftest.$ac_ext >&5
8447   rm -rf conftest*
8448   ol_cv_header_stdc=no
8449 fi
8450 rm -f conftest*
8451
8452 if test $ol_cv_header_stdc = yes; then
8453   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8454 cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457 #include <string.h>
8458 EOF
8459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8460   egrep "memchr" >/dev/null 2>&1; then
8461   :
8462 else
8463   rm -rf conftest*
8464   ol_cv_header_stdc=no
8465 fi
8466 rm -f conftest*
8467
8468 fi
8469
8470 if test $ol_cv_header_stdc = yes; then
8471   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8472 cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <stdlib.h>
8476 EOF
8477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8478   egrep "free" >/dev/null 2>&1; then
8479   :
8480 else
8481   rm -rf conftest*
8482   ol_cv_header_stdc=no
8483 fi
8484 rm -f conftest*
8485
8486 fi
8487
8488 if test $ol_cv_header_stdc = yes; then
8489   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8490 if test "$cross_compiling" = yes; then
8491   :
8492 else
8493   cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 #include <ctype.h>
8497 #ifndef HAVE_EBCDIC
8498 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8499 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8500 #else
8501 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8502                 || ('j' <= (c) && (c) <= 'r') \
8503                 || ('s' <= (c) && (c) <= 'z'))
8504 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8505 #endif
8506 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8507 int main () { int i; for (i = 0; i < 256; i++)
8508 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8509 exit (0); }
8510
8511 EOF
8512 if { (eval echo configure:8513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8513 then
8514   :
8515 else
8516   echo "configure: failed program was:" >&5
8517   cat conftest.$ac_ext >&5
8518   rm -fr conftest*
8519   ol_cv_header_stdc=no
8520 fi
8521 rm -fr conftest*
8522 fi
8523
8524 fi
8525 fi
8526
8527 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8528 if test $ol_cv_header_stdc = yes; then
8529   cat >> confdefs.h <<\EOF
8530 #define STDC_HEADERS 1
8531 EOF
8532
8533 fi
8534 ac_cv_header_stdc=disable
8535
8536
8537 if test $ol_cv_header_stdc != yes; then
8538         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8539 fi
8540
8541 ac_header_dirent=no
8542 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8543 do
8544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8545 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8546 echo "configure:8547: checking for $ac_hdr that defines DIR" >&5
8547 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <sys/types.h>
8554 #include <$ac_hdr>
8555 int main() {
8556 DIR *dirp = 0;
8557 ; return 0; }
8558 EOF
8559 if { (eval echo configure:8560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8560   rm -rf conftest*
8561   eval "ac_cv_header_dirent_$ac_safe=yes"
8562 else
8563   echo "configure: failed program was:" >&5
8564   cat conftest.$ac_ext >&5
8565   rm -rf conftest*
8566   eval "ac_cv_header_dirent_$ac_safe=no"
8567 fi
8568 rm -f conftest*
8569 fi
8570 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8573   cat >> confdefs.h <<EOF
8574 #define $ac_tr_hdr 1
8575 EOF
8576  ac_header_dirent=$ac_hdr; break
8577 else
8578   echo "$ac_t""no" 1>&6
8579 fi
8580 done
8581 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8582 if test $ac_header_dirent = dirent.h; then
8583 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8584 echo "configure:8585: checking for opendir in -ldir" >&5
8585 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8586 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8587   echo $ac_n "(cached) $ac_c" 1>&6
8588 else
8589   ac_save_LIBS="$LIBS"
8590 LIBS="-ldir  $LIBS"
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 /* Override any gcc2 internal prototype to avoid an error.  */
8595 /* We use char because int might match the return type of a gcc2
8596     builtin and then its argument prototype would still apply.  */
8597 char opendir();
8598
8599 int main() {
8600 opendir()
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   eval "ac_cv_lib_$ac_lib_var=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_lib_$ac_lib_var=no"
8611 fi
8612 rm -f conftest*
8613 LIBS="$ac_save_LIBS"
8614
8615 fi
8616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8617   echo "$ac_t""yes" 1>&6
8618   LIBS="$LIBS -ldir"
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622
8623 else
8624 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8625 echo "configure:8626: checking for opendir in -lx" >&5
8626 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8628   echo $ac_n "(cached) $ac_c" 1>&6
8629 else
8630   ac_save_LIBS="$LIBS"
8631 LIBS="-lx  $LIBS"
8632 cat > conftest.$ac_ext <<EOF
8633 #line 8634 "configure"
8634 #include "confdefs.h"
8635 /* Override any gcc2 internal prototype to avoid an error.  */
8636 /* We use char because int might match the return type of a gcc2
8637     builtin and then its argument prototype would still apply.  */
8638 char opendir();
8639
8640 int main() {
8641 opendir()
8642 ; return 0; }
8643 EOF
8644 if { (eval echo configure:8645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8645   rm -rf conftest*
8646   eval "ac_cv_lib_$ac_lib_var=yes"
8647 else
8648   echo "configure: failed program was:" >&5
8649   cat conftest.$ac_ext >&5
8650   rm -rf conftest*
8651   eval "ac_cv_lib_$ac_lib_var=no"
8652 fi
8653 rm -f conftest*
8654 LIBS="$ac_save_LIBS"
8655
8656 fi
8657 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8658   echo "$ac_t""yes" 1>&6
8659   LIBS="$LIBS -lx"
8660 else
8661   echo "$ac_t""no" 1>&6
8662 fi
8663
8664 fi
8665
8666 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8667 echo "configure:8668: checking for sys/wait.h that is POSIX.1 compatible" >&5
8668 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8669   echo $ac_n "(cached) $ac_c" 1>&6
8670 else
8671   cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 #include <sys/types.h>
8675 #include <sys/wait.h>
8676 #ifndef WEXITSTATUS
8677 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8678 #endif
8679 #ifndef WIFEXITED
8680 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8681 #endif
8682 int main() {
8683 int s;
8684 wait (&s);
8685 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8689   rm -rf conftest*
8690   ac_cv_header_sys_wait_h=yes
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   ac_cv_header_sys_wait_h=no
8696 fi
8697 rm -f conftest*
8698 fi
8699
8700 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8701 if test $ac_cv_header_sys_wait_h = yes; then
8702   cat >> confdefs.h <<\EOF
8703 #define HAVE_SYS_WAIT_H 1
8704 EOF
8705
8706 fi
8707
8708 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8709 echo "configure:8710: checking POSIX termios" >&5
8710 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8711   echo $ac_n "(cached) $ac_c" 1>&6
8712 else
8713   cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8716 #include <sys/types.h>
8717 #include <unistd.h>
8718 #include <termios.h>
8719 int main() {
8720 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8721    tcgetattr(0, 0);
8722 ; return 0; }
8723 EOF
8724 if { (eval echo configure:8725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8725   rm -rf conftest*
8726   am_cv_sys_posix_termios=yes
8727 else
8728   echo "configure: failed program was:" >&5
8729   cat conftest.$ac_ext >&5
8730   rm -rf conftest*
8731   am_cv_sys_posix_termios=no
8732 fi
8733 rm -f conftest*
8734 fi
8735
8736 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8737
8738
8739  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8740 echo "configure:8741: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8741 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8742   echo $ac_n "(cached) $ac_c" 1>&6
8743 else
8744   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8745
8746   gwinsz_in_termios_h=no
8747   if test $am_cv_sys_posix_termios = yes; then
8748     cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 #include <sys/types.h>
8752 #     include <termios.h>
8753 #     ifdef TIOCGWINSZ
8754         yes
8755 #     endif
8756     
8757 EOF
8758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8759   egrep "yes" >/dev/null 2>&1; then
8760   rm -rf conftest*
8761   gwinsz_in_termios_h=yes
8762 fi
8763 rm -f conftest*
8764
8765   fi
8766
8767   if test $gwinsz_in_termios_h = no; then
8768     cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <sys/types.h>
8772 #     include <sys/ioctl.h>
8773 #     ifdef TIOCGWINSZ
8774         yes
8775 #     endif
8776     
8777 EOF
8778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8779   egrep "yes" >/dev/null 2>&1; then
8780   rm -rf conftest*
8781   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8782 fi
8783 rm -f conftest*
8784
8785   fi
8786   
8787 fi
8788
8789 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8790   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8791     cat >> confdefs.h <<\EOF
8792 #define GWINSZ_IN_SYS_IOCTL 1
8793 EOF
8794
8795   fi
8796
8797 if test $am_cv_sys_posix_termios = yes ; then
8798         cat >> confdefs.h <<\EOF
8799 #define HAVE_POSIX_TERMIOS 1
8800 EOF
8801
8802 fi
8803
8804 for ac_hdr in \
8805         arpa/inet.h             \
8806         arpa/nameser.h  \
8807         assert.h                \
8808         conio.h                 \
8809         crypt.h                 \
8810         direct.h                \
8811         errno.h                 \
8812         fcntl.h                 \
8813         filio.h                 \
8814         getopt.h                \
8815         grp.h                   \
8816         io.h                    \
8817         libutil.h               \
8818         limits.h                \
8819         locale.h                \
8820         netinet/tcp.h   \
8821         malloc.h                \
8822         memory.h                \
8823         psap.h                  \
8824         pwd.h                   \
8825         process.h               \
8826         resolv.h                \
8827         sgtty.h                 \
8828         shadow.h                \
8829         stddef.h                \
8830         string.h                \
8831         strings.h               \
8832         sysexits.h              \
8833         sys/file.h              \
8834         sys/filio.h             \
8835         sys/errno.h             \
8836         sys/ioctl.h             \
8837         sys/param.h             \
8838         sys/resource.h  \
8839         sys/select.h    \
8840         sys/socket.h    \
8841         sys/syslog.h    \
8842         sys/time.h              \
8843         sys/types.h             \
8844         sys/ucred.h             \
8845         syslog.h                \
8846         termios.h               \
8847         unistd.h                \
8848         winsock.h               \
8849         winsock2.h              \
8850
8851 do
8852 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8854 echo "configure:8855: checking for $ac_hdr" >&5
8855 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8856   echo $ac_n "(cached) $ac_c" 1>&6
8857 else
8858   cat > conftest.$ac_ext <<EOF
8859 #line 8860 "configure"
8860 #include "confdefs.h"
8861 #include <$ac_hdr>
8862 EOF
8863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8864 { (eval echo configure:8865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8866 if test -z "$ac_err"; then
8867   rm -rf conftest*
8868   eval "ac_cv_header_$ac_safe=yes"
8869 else
8870   echo "$ac_err" >&5
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_header_$ac_safe=no"
8875 fi
8876 rm -f conftest*
8877 fi
8878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8879   echo "$ac_t""yes" 1>&6
8880     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8881   cat >> confdefs.h <<EOF
8882 #define $ac_tr_hdr 1
8883 EOF
8884  
8885 else
8886   echo "$ac_t""no" 1>&6
8887 fi
8888 done
8889
8890
8891
8892
8893 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8894 echo "configure:8895: checking for dlopen" >&5
8895 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8896   echo $ac_n "(cached) $ac_c" 1>&6
8897 else
8898   cat > conftest.$ac_ext <<EOF
8899 #line 8900 "configure"
8900 #include "confdefs.h"
8901 /* System header to define __stub macros and hopefully few prototypes,
8902     which can conflict with char dlopen(); below.  */
8903 #include <assert.h>
8904 /* Override any gcc2 internal prototype to avoid an error.  */
8905 /* We use char because int might match the return type of a gcc2
8906     builtin and then its argument prototype would still apply.  */
8907 char dlopen();
8908 char (*f)();
8909
8910 int main() {
8911
8912 /* The GNU C library defines this for functions which it implements
8913     to always fail with ENOSYS.  Some functions are actually named
8914     something starting with __ and the normal name is an alias.  */
8915 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8916 choke me
8917 #else
8918 f = dlopen;
8919 #endif
8920
8921 ; return 0; }
8922 EOF
8923 if { (eval echo configure:8924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8924   rm -rf conftest*
8925   eval "ac_cv_func_dlopen=yes"
8926 else
8927   echo "configure: failed program was:" >&5
8928   cat conftest.$ac_ext >&5
8929   rm -rf conftest*
8930   eval "ac_cv_func_dlopen=no"
8931 fi
8932 rm -f conftest*
8933 fi
8934
8935 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8936   echo "$ac_t""yes" 1>&6
8937   :
8938 else
8939   echo "$ac_t""no" 1>&6
8940 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8941 echo "configure:8942: checking for dlopen in -ldl" >&5
8942 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8943 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8944   echo $ac_n "(cached) $ac_c" 1>&6
8945 else
8946   ac_save_LIBS="$LIBS"
8947 LIBS="-ldl  $LIBS"
8948 cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8951 /* Override any gcc2 internal prototype to avoid an error.  */
8952 /* We use char because int might match the return type of a gcc2
8953     builtin and then its argument prototype would still apply.  */
8954 char dlopen();
8955
8956 int main() {
8957 dlopen()
8958 ; return 0; }
8959 EOF
8960 if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8961   rm -rf conftest*
8962   eval "ac_cv_lib_$ac_lib_var=yes"
8963 else
8964   echo "configure: failed program was:" >&5
8965   cat conftest.$ac_ext >&5
8966   rm -rf conftest*
8967   eval "ac_cv_lib_$ac_lib_var=no"
8968 fi
8969 rm -f conftest*
8970 LIBS="$ac_save_LIBS"
8971
8972 fi
8973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8974   echo "$ac_t""yes" 1>&6
8975     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8976     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8977   cat >> confdefs.h <<EOF
8978 #define $ac_tr_lib 1
8979 EOF
8980
8981   LIBS="-ldl $LIBS"
8982
8983 else
8984   echo "$ac_t""no" 1>&6
8985 fi
8986
8987 fi
8988
8989
8990 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8991 echo "configure:8992: checking for sigset in -lV3" >&5
8992 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8994   echo $ac_n "(cached) $ac_c" 1>&6
8995 else
8996   ac_save_LIBS="$LIBS"
8997 LIBS="-lV3  $LIBS"
8998 cat > conftest.$ac_ext <<EOF
8999 #line 9000 "configure"
9000 #include "confdefs.h"
9001 /* Override any gcc2 internal prototype to avoid an error.  */
9002 /* We use char because int might match the return type of a gcc2
9003     builtin and then its argument prototype would still apply.  */
9004 char sigset();
9005
9006 int main() {
9007 sigset()
9008 ; return 0; }
9009 EOF
9010 if { (eval echo configure:9011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9011   rm -rf conftest*
9012   eval "ac_cv_lib_$ac_lib_var=yes"
9013 else
9014   echo "configure: failed program was:" >&5
9015   cat conftest.$ac_ext >&5
9016   rm -rf conftest*
9017   eval "ac_cv_lib_$ac_lib_var=no"
9018 fi
9019 rm -f conftest*
9020 LIBS="$ac_save_LIBS"
9021
9022 fi
9023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9024   echo "$ac_t""yes" 1>&6
9025     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9026     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9027   cat >> confdefs.h <<EOF
9028 #define $ac_tr_lib 1
9029 EOF
9030
9031   LIBS="-lV3 $LIBS"
9032
9033 else
9034   echo "$ac_t""no" 1>&6
9035 fi
9036
9037
9038 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9039 echo "configure:9040: checking for winsock" >&5
9040 save_LIBS="$LIBS"
9041 for curlib in ws2_32 wsock32; do
9042         LIBS="$LIBS -l$curlib"
9043         cat > conftest.$ac_ext <<EOF
9044 #line 9045 "configure"
9045 #include "confdefs.h"
9046
9047                         char socket@12();
9048                         char select@20();
9049                         char closesocket@4();
9050                         char gethostname@8();
9051                         
9052 int main() {
9053
9054                         socket@12();
9055                         select@20();
9056                         closesocket@4();
9057                         gethostname@8();
9058                         
9059 ; return 0; }
9060 EOF
9061 if { (eval echo configure:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9062   rm -rf conftest*
9063   have_winsock=yes
9064 else
9065   echo "configure: failed program was:" >&5
9066   cat conftest.$ac_ext >&5
9067   rm -rf conftest*
9068   have_winsock=no
9069 fi
9070 rm -f conftest*
9071
9072         if test $have_winsock = yes; then
9073                 cat >> confdefs.h <<\EOF
9074 #define HAVE_WINSOCK 1
9075 EOF
9076
9077                 ac_cv_func_socket=yes
9078                 ac_cv_func_select=yes
9079                 ac_cv_func_closesocket=yes
9080                 ac_cv_func_gethostname=yes
9081                 if test $curlib = ws2_32; then
9082                         have_winsock=winsock2
9083                         cat >> confdefs.h <<\EOF
9084 #define HAVE_WINSOCK2 1
9085 EOF
9086
9087                 fi
9088                 break
9089         fi
9090         LIBS="$save_LIBS"
9091 done
9092 echo "$ac_t""$have_winsock" 1>&6
9093
9094
9095 echo $ac_n "checking for socket""... $ac_c" 1>&6
9096 echo "configure:9097: checking for socket" >&5
9097 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9098   echo $ac_n "(cached) $ac_c" 1>&6
9099 else
9100   cat > conftest.$ac_ext <<EOF
9101 #line 9102 "configure"
9102 #include "confdefs.h"
9103 /* System header to define __stub macros and hopefully few prototypes,
9104     which can conflict with char socket(); below.  */
9105 #include <assert.h>
9106 /* Override any gcc2 internal prototype to avoid an error.  */
9107 /* We use char because int might match the return type of a gcc2
9108     builtin and then its argument prototype would still apply.  */
9109 char socket();
9110 char (*f)();
9111
9112 int main() {
9113
9114 /* The GNU C library defines this for functions which it implements
9115     to always fail with ENOSYS.  Some functions are actually named
9116     something starting with __ and the normal name is an alias.  */
9117 #if defined (__stub_socket) || defined (__stub___socket)
9118 choke me
9119 #else
9120 f = socket;
9121 #endif
9122
9123 ; return 0; }
9124 EOF
9125 if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9126   rm -rf conftest*
9127   eval "ac_cv_func_socket=yes"
9128 else
9129   echo "configure: failed program was:" >&5
9130   cat conftest.$ac_ext >&5
9131   rm -rf conftest*
9132   eval "ac_cv_func_socket=no"
9133 fi
9134 rm -f conftest*
9135 fi
9136
9137 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9138   echo "$ac_t""yes" 1>&6
9139   :
9140 else
9141   echo "$ac_t""no" 1>&6
9142         
9143         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9144 echo "configure:9145: checking for main in -lsocket" >&5
9145 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9146 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9147   echo $ac_n "(cached) $ac_c" 1>&6
9148 else
9149   ac_save_LIBS="$LIBS"
9150 LIBS="-lsocket  $LIBS"
9151 cat > conftest.$ac_ext <<EOF
9152 #line 9153 "configure"
9153 #include "confdefs.h"
9154
9155 int main() {
9156 main()
9157 ; return 0; }
9158 EOF
9159 if { (eval echo configure:9160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9160   rm -rf conftest*
9161   eval "ac_cv_lib_$ac_lib_var=yes"
9162 else
9163   echo "configure: failed program was:" >&5
9164   cat conftest.$ac_ext >&5
9165   rm -rf conftest*
9166   eval "ac_cv_lib_$ac_lib_var=no"
9167 fi
9168 rm -f conftest*
9169 LIBS="$ac_save_LIBS"
9170
9171 fi
9172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9173   echo "$ac_t""yes" 1>&6
9174     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9175     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9176   cat >> confdefs.h <<EOF
9177 #define $ac_tr_lib 1
9178 EOF
9179
9180   LIBS="-lsocket $LIBS"
9181
9182 else
9183   echo "$ac_t""no" 1>&6
9184 fi
9185
9186         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9187 echo "configure:9188: checking for main in -lnet" >&5
9188 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9189 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9190   echo $ac_n "(cached) $ac_c" 1>&6
9191 else
9192   ac_save_LIBS="$LIBS"
9193 LIBS="-lnet  $LIBS"
9194 cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197
9198 int main() {
9199 main()
9200 ; return 0; }
9201 EOF
9202 if { (eval echo configure:9203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9203   rm -rf conftest*
9204   eval "ac_cv_lib_$ac_lib_var=yes"
9205 else
9206   echo "configure: failed program was:" >&5
9207   cat conftest.$ac_ext >&5
9208   rm -rf conftest*
9209   eval "ac_cv_lib_$ac_lib_var=no"
9210 fi
9211 rm -f conftest*
9212 LIBS="$ac_save_LIBS"
9213
9214 fi
9215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9216   echo "$ac_t""yes" 1>&6
9217     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9218     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9219   cat >> confdefs.h <<EOF
9220 #define $ac_tr_lib 1
9221 EOF
9222
9223   LIBS="-lnet $LIBS"
9224
9225 else
9226   echo "$ac_t""no" 1>&6
9227 fi
9228
9229         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9230 echo "configure:9231: checking for main in -lnsl_s" >&5
9231 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9233   echo $ac_n "(cached) $ac_c" 1>&6
9234 else
9235   ac_save_LIBS="$LIBS"
9236 LIBS="-lnsl_s  $LIBS"
9237 cat > conftest.$ac_ext <<EOF
9238 #line 9239 "configure"
9239 #include "confdefs.h"
9240
9241 int main() {
9242 main()
9243 ; return 0; }
9244 EOF
9245 if { (eval echo configure:9246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9246   rm -rf conftest*
9247   eval "ac_cv_lib_$ac_lib_var=yes"
9248 else
9249   echo "configure: failed program was:" >&5
9250   cat conftest.$ac_ext >&5
9251   rm -rf conftest*
9252   eval "ac_cv_lib_$ac_lib_var=no"
9253 fi
9254 rm -f conftest*
9255 LIBS="$ac_save_LIBS"
9256
9257 fi
9258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9259   echo "$ac_t""yes" 1>&6
9260     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9261     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9262   cat >> confdefs.h <<EOF
9263 #define $ac_tr_lib 1
9264 EOF
9265
9266   LIBS="-lnsl_s $LIBS"
9267
9268 else
9269   echo "$ac_t""no" 1>&6
9270 fi
9271
9272         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9273 echo "configure:9274: checking for main in -lnsl" >&5
9274 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9275 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9276   echo $ac_n "(cached) $ac_c" 1>&6
9277 else
9278   ac_save_LIBS="$LIBS"
9279 LIBS="-lnsl  $LIBS"
9280 cat > conftest.$ac_ext <<EOF
9281 #line 9282 "configure"
9282 #include "confdefs.h"
9283
9284 int main() {
9285 main()
9286 ; return 0; }
9287 EOF
9288 if { (eval echo configure:9289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9289   rm -rf conftest*
9290   eval "ac_cv_lib_$ac_lib_var=yes"
9291 else
9292   echo "configure: failed program was:" >&5
9293   cat conftest.$ac_ext >&5
9294   rm -rf conftest*
9295   eval "ac_cv_lib_$ac_lib_var=no"
9296 fi
9297 rm -f conftest*
9298 LIBS="$ac_save_LIBS"
9299
9300 fi
9301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9302   echo "$ac_t""yes" 1>&6
9303     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9305   cat >> confdefs.h <<EOF
9306 #define $ac_tr_lib 1
9307 EOF
9308
9309   LIBS="-lnsl $LIBS"
9310
9311 else
9312   echo "$ac_t""no" 1>&6
9313 fi
9314
9315         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9316 echo "configure:9317: checking for socket in -linet" >&5
9317 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9318 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9319   echo $ac_n "(cached) $ac_c" 1>&6
9320 else
9321   ac_save_LIBS="$LIBS"
9322 LIBS="-linet  $LIBS"
9323 cat > conftest.$ac_ext <<EOF
9324 #line 9325 "configure"
9325 #include "confdefs.h"
9326 /* Override any gcc2 internal prototype to avoid an error.  */
9327 /* We use char because int might match the return type of a gcc2
9328     builtin and then its argument prototype would still apply.  */
9329 char socket();
9330
9331 int main() {
9332 socket()
9333 ; return 0; }
9334 EOF
9335 if { (eval echo configure:9336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=yes"
9338 else
9339   echo "configure: failed program was:" >&5
9340   cat conftest.$ac_ext >&5
9341   rm -rf conftest*
9342   eval "ac_cv_lib_$ac_lib_var=no"
9343 fi
9344 rm -f conftest*
9345 LIBS="$ac_save_LIBS"
9346
9347 fi
9348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9349   echo "$ac_t""yes" 1>&6
9350     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9351     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9352   cat >> confdefs.h <<EOF
9353 #define $ac_tr_lib 1
9354 EOF
9355
9356   LIBS="-linet $LIBS"
9357
9358 else
9359   echo "$ac_t""no" 1>&6
9360 fi
9361
9362         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9363 echo "configure:9364: checking for main in -lgen" >&5
9364 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9366   echo $ac_n "(cached) $ac_c" 1>&6
9367 else
9368   ac_save_LIBS="$LIBS"
9369 LIBS="-lgen  $LIBS"
9370 cat > conftest.$ac_ext <<EOF
9371 #line 9372 "configure"
9372 #include "confdefs.h"
9373
9374 int main() {
9375 main()
9376 ; return 0; }
9377 EOF
9378 if { (eval echo configure:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9379   rm -rf conftest*
9380   eval "ac_cv_lib_$ac_lib_var=yes"
9381 else
9382   echo "configure: failed program was:" >&5
9383   cat conftest.$ac_ext >&5
9384   rm -rf conftest*
9385   eval "ac_cv_lib_$ac_lib_var=no"
9386 fi
9387 rm -f conftest*
9388 LIBS="$ac_save_LIBS"
9389
9390 fi
9391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9392   echo "$ac_t""yes" 1>&6
9393     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9394     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9395   cat >> confdefs.h <<EOF
9396 #define $ac_tr_lib 1
9397 EOF
9398
9399   LIBS="-lgen $LIBS"
9400
9401 else
9402   echo "$ac_t""no" 1>&6
9403 fi
9404
9405
9406 fi
9407
9408
9409 echo $ac_n "checking for select""... $ac_c" 1>&6
9410 echo "configure:9411: checking for select" >&5
9411 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9412   echo $ac_n "(cached) $ac_c" 1>&6
9413 else
9414   cat > conftest.$ac_ext <<EOF
9415 #line 9416 "configure"
9416 #include "confdefs.h"
9417 /* System header to define __stub macros and hopefully few prototypes,
9418     which can conflict with char select(); below.  */
9419 #include <assert.h>
9420 /* Override any gcc2 internal prototype to avoid an error.  */
9421 /* We use char because int might match the return type of a gcc2
9422     builtin and then its argument prototype would still apply.  */
9423 char select();
9424 char (*f)();
9425
9426 int main() {
9427
9428 /* The GNU C library defines this for functions which it implements
9429     to always fail with ENOSYS.  Some functions are actually named
9430     something starting with __ and the normal name is an alias.  */
9431 #if defined (__stub_select) || defined (__stub___select)
9432 choke me
9433 #else
9434 f = select;
9435 #endif
9436
9437 ; return 0; }
9438 EOF
9439 if { (eval echo configure:9440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9440   rm -rf conftest*
9441   eval "ac_cv_func_select=yes"
9442 else
9443   echo "configure: failed program was:" >&5
9444   cat conftest.$ac_ext >&5
9445   rm -rf conftest*
9446   eval "ac_cv_func_select=no"
9447 fi
9448 rm -f conftest*
9449 fi
9450
9451 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9452   echo "$ac_t""yes" 1>&6
9453   :
9454 else
9455   echo "$ac_t""no" 1>&6
9456 { echo "configure: error: select() required." 1>&2; exit 1; }
9457 fi
9458
9459
9460 if test "${ac_cv_header_winsock_h}" != yes; then
9461                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9462 echo "configure:9463: checking types of arguments for select()" >&5
9463  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9464   echo $ac_n "(cached) $ac_c" 1>&6
9465 else
9466    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9470   echo $ac_n "(cached) $ac_c" 1>&6
9471 else
9472      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9473      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9474       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9475        cat > conftest.$ac_ext <<EOF
9476 #line 9477 "configure"
9477 #include "confdefs.h"
9478 #ifdef HAVE_SYS_TYPES_H
9479 #include <sys/types.h>
9480 #endif
9481 #ifdef HAVE_SYS_TIME_H
9482 #include <sys/time.h>
9483 #endif
9484 #ifdef HAVE_SYS_SELECT_H
9485 #include <sys/select.h>
9486 #endif
9487 #ifdef HAVE_SYS_SOCKET_H
9488 #include <sys/socket.h>
9489 #endif
9490 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);
9491 int main() {
9492
9493 ; return 0; }
9494 EOF
9495 if { (eval echo configure:9496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9496   rm -rf conftest*
9497           ac_not_found=no ; break 3
9498 else
9499   echo "configure: failed program was:" >&5
9500   cat conftest.$ac_ext >&5
9501   rm -rf conftest*
9502   ac_not_found=yes
9503 fi
9504 rm -f conftest*
9505       done
9506      done
9507     done
9508    
9509 fi
9510   
9511 fi
9512  
9513 fi
9514  if test "$ac_not_found" = yes; then
9515   ac_cv_func_select_arg1=int 
9516   ac_cv_func_select_arg234='int *' 
9517   ac_cv_func_select_arg5='struct timeval *'
9518  fi
9519  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9520  cat >> confdefs.h <<EOF
9521 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9522 EOF
9523
9524  cat >> confdefs.h <<EOF
9525 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9526 EOF
9527
9528  cat >> confdefs.h <<EOF
9529 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9530 EOF
9531
9532
9533 fi
9534
9535
9536 for ac_hdr in regex.h 
9537 do
9538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9540 echo "configure:9541: checking for $ac_hdr" >&5
9541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 #include <$ac_hdr>
9548 EOF
9549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9550 { (eval echo configure:9551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9552 if test -z "$ac_err"; then
9553   rm -rf conftest*
9554   eval "ac_cv_header_$ac_safe=yes"
9555 else
9556   echo "$ac_err" >&5
9557   echo "configure: failed program was:" >&5
9558   cat conftest.$ac_ext >&5
9559   rm -rf conftest*
9560   eval "ac_cv_header_$ac_safe=no"
9561 fi
9562 rm -f conftest*
9563 fi
9564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9565   echo "$ac_t""yes" 1>&6
9566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9567   cat >> confdefs.h <<EOF
9568 #define $ac_tr_hdr 1
9569 EOF
9570  
9571 else
9572   echo "$ac_t""no" 1>&6
9573 fi
9574 done
9575
9576 if test "$ac_cv_header_regex_h" != yes ; then
9577         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9578 fi
9579
9580 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9581 echo "configure:9582: checking for library containing regfree" >&5
9582 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9583   echo $ac_n "(cached) $ac_c" 1>&6
9584 else
9585   ac_func_search_save_LIBS="$LIBS"
9586 ac_cv_search_regfree="no"
9587 cat > conftest.$ac_ext <<EOF
9588 #line 9589 "configure"
9589 #include "confdefs.h"
9590 /* Override any gcc2 internal prototype to avoid an error.  */
9591 /* We use char because int might match the return type of a gcc2
9592     builtin and then its argument prototype would still apply.  */
9593 char regfree();
9594
9595 int main() {
9596 regfree()
9597 ; return 0; }
9598 EOF
9599 if { (eval echo configure:9600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9600   rm -rf conftest*
9601   ac_cv_search_regfree="none required"
9602 else
9603   echo "configure: failed program was:" >&5
9604   cat conftest.$ac_ext >&5
9605 fi
9606 rm -f conftest*
9607 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9608 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9609 cat > conftest.$ac_ext <<EOF
9610 #line 9611 "configure"
9611 #include "confdefs.h"
9612 /* Override any gcc2 internal prototype to avoid an error.  */
9613 /* We use char because int might match the return type of a gcc2
9614     builtin and then its argument prototype would still apply.  */
9615 char regfree();
9616
9617 int main() {
9618 regfree()
9619 ; return 0; }
9620 EOF
9621 if { (eval echo configure:9622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9622   rm -rf conftest*
9623   ac_cv_search_regfree="-l$ac_lib"
9624 break
9625 else
9626   echo "configure: failed program was:" >&5
9627   cat conftest.$ac_ext >&5
9628 fi
9629 rm -f conftest*
9630 done
9631 LIBS="$ac_func_search_save_LIBS"
9632 fi
9633
9634 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9635 if test "$ac_cv_search_regfree" != "no"; then
9636   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9637   :
9638 else :
9639   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9640 fi
9641
9642
9643 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9644 echo "configure:9645: checking for compatible POSIX regex" >&5
9645 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9646   echo $ac_n "(cached) $ac_c" 1>&6
9647 else
9648   
9649         if test "$cross_compiling" = yes; then
9650   ol_cv_c_posix_regex=cross
9651 else
9652   cat > conftest.$ac_ext <<EOF
9653 #line 9654 "configure"
9654 #include "confdefs.h"
9655
9656 #include <sys/types.h>
9657 #include <regex.h>
9658 static char *pattern, *string;
9659 main()
9660 {
9661         int rc;
9662         regex_t re;
9663
9664         pattern = "^A";
9665
9666         if(regcomp(&re, pattern, 0)) {
9667                 return -1;
9668         }
9669         
9670         string = "ALL MATCH";
9671         
9672         rc = regexec(&re, string, 0, (void*)0, 0);
9673
9674         regfree(&re);
9675
9676         return rc;
9677 }
9678 EOF
9679 if { (eval echo configure:9680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9680 then
9681   ol_cv_c_posix_regex=yes
9682 else
9683   echo "configure: failed program was:" >&5
9684   cat conftest.$ac_ext >&5
9685   rm -fr conftest*
9686   ol_cv_c_posix_regex=no
9687 fi
9688 rm -fr conftest*
9689 fi
9690
9691 fi
9692
9693 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9694
9695 if test "$ol_cv_c_posix_regex" = no ; then
9696         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9697 fi
9698
9699
9700 have_uuid=no
9701 for ac_hdr in sys/uuid.h
9702 do
9703 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9704 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9705 echo "configure:9706: checking for $ac_hdr" >&5
9706 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9707   echo $ac_n "(cached) $ac_c" 1>&6
9708 else
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712 #include <$ac_hdr>
9713 EOF
9714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9715 { (eval echo configure:9716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9717 if test -z "$ac_err"; then
9718   rm -rf conftest*
9719   eval "ac_cv_header_$ac_safe=yes"
9720 else
9721   echo "$ac_err" >&5
9722   echo "configure: failed program was:" >&5
9723   cat conftest.$ac_ext >&5
9724   rm -rf conftest*
9725   eval "ac_cv_header_$ac_safe=no"
9726 fi
9727 rm -f conftest*
9728 fi
9729 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9730   echo "$ac_t""yes" 1>&6
9731     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9732   cat >> confdefs.h <<EOF
9733 #define $ac_tr_hdr 1
9734 EOF
9735  
9736 else
9737   echo "$ac_t""no" 1>&6
9738 fi
9739 done
9740
9741 if test $ac_cv_header_sys_uuid_h = yes ; then
9742         save_LIBS="$LIBS"
9743         
9744 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9745 echo "configure:9746: checking for library containing uuid_to_str" >&5
9746 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9747   echo $ac_n "(cached) $ac_c" 1>&6
9748 else
9749   ac_func_search_save_LIBS="$LIBS"
9750 ac_cv_search_uuid_to_str="no"
9751 cat > conftest.$ac_ext <<EOF
9752 #line 9753 "configure"
9753 #include "confdefs.h"
9754 /* Override any gcc2 internal prototype to avoid an error.  */
9755 /* We use char because int might match the return type of a gcc2
9756     builtin and then its argument prototype would still apply.  */
9757 char uuid_to_str();
9758
9759 int main() {
9760 uuid_to_str()
9761 ; return 0; }
9762 EOF
9763 if { (eval echo configure:9764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9764   rm -rf conftest*
9765   ac_cv_search_uuid_to_str="none required"
9766 else
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769 fi
9770 rm -f conftest*
9771 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9772 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9773 cat > conftest.$ac_ext <<EOF
9774 #line 9775 "configure"
9775 #include "confdefs.h"
9776 /* Override any gcc2 internal prototype to avoid an error.  */
9777 /* We use char because int might match the return type of a gcc2
9778     builtin and then its argument prototype would still apply.  */
9779 char uuid_to_str();
9780
9781 int main() {
9782 uuid_to_str()
9783 ; return 0; }
9784 EOF
9785 if { (eval echo configure:9786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9786   rm -rf conftest*
9787   ac_cv_search_uuid_to_str="-l$ac_lib"
9788 break
9789 else
9790   echo "configure: failed program was:" >&5
9791   cat conftest.$ac_ext >&5
9792 fi
9793 rm -f conftest*
9794 done
9795 LIBS="$ac_func_search_save_LIBS"
9796 fi
9797
9798 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9799 if test "$ac_cv_search_uuid_to_str" != "no"; then
9800   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9801   have_uuid=yes
9802 else :
9803   :
9804 fi
9805         LIBS="$save_LIBS"
9806
9807         if test have_uuid = yes ; then
9808                 cat >> confdefs.h <<\EOF
9809 #define HAVE_UUID_TO_STR 1
9810 EOF
9811
9812
9813                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9814                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9815         fi
9816 fi
9817
9818 if test $have_uuid = no ; then
9819         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9820 echo "configure:9821: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9821         save_LIBS="$LIBS"
9822         LIBS="$LIBS -lrpcrt4"
9823         cat > conftest.$ac_ext <<EOF
9824 #line 9825 "configure"
9825 #include "confdefs.h"
9826
9827                 char UuidCreate@4();
9828                 char UuidToStringA@8();
9829                 
9830 int main() {
9831
9832                 UuidCreate@4();
9833                 UuidToStringA@8();
9834                 
9835 ; return 0; }
9836 EOF
9837 if { (eval echo configure:9838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9838   rm -rf conftest*
9839   need_rpcrt=yes
9840 else
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   need_rpcrt=no
9845 fi
9846 rm -f conftest*
9847         if test $need_rpcrt = yes; then
9848                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9849         fi
9850         LIBS="$save_LIBS"
9851         echo "$ac_t""$need_rpcrt" 1>&6
9852 fi
9853
9854 ol_link_dnssrv=no
9855 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9856 echo "configure:9857: checking for res_query" >&5
9857 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9858   echo $ac_n "(cached) $ac_c" 1>&6
9859 else
9860   cat > conftest.$ac_ext <<EOF
9861 #line 9862 "configure"
9862 #include "confdefs.h"
9863 /* System header to define __stub macros and hopefully few prototypes,
9864     which can conflict with char res_query(); below.  */
9865 #include <assert.h>
9866 /* Override any gcc2 internal prototype to avoid an error.  */
9867 /* We use char because int might match the return type of a gcc2
9868     builtin and then its argument prototype would still apply.  */
9869 char res_query();
9870 char (*f)();
9871
9872 int main() {
9873
9874 /* The GNU C library defines this for functions which it implements
9875     to always fail with ENOSYS.  Some functions are actually named
9876     something starting with __ and the normal name is an alias.  */
9877 #if defined (__stub_res_query) || defined (__stub___res_query)
9878 choke me
9879 #else
9880 f = res_query;
9881 #endif
9882
9883 ; return 0; }
9884 EOF
9885 if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9886   rm -rf conftest*
9887   eval "ac_cv_func_res_query=yes"
9888 else
9889   echo "configure: failed program was:" >&5
9890   cat conftest.$ac_ext >&5
9891   rm -rf conftest*
9892   eval "ac_cv_func_res_query=no"
9893 fi
9894 rm -f conftest*
9895 fi
9896
9897 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9898   echo "$ac_t""yes" 1>&6
9899   :
9900 else
9901   echo "$ac_t""no" 1>&6
9902 fi
9903
9904 if test $ac_cv_func_res_query = no ; then 
9905         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9906 echo "configure:9907: checking for __res_query" >&5
9907 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9908   echo $ac_n "(cached) $ac_c" 1>&6
9909 else
9910   cat > conftest.$ac_ext <<EOF
9911 #line 9912 "configure"
9912 #include "confdefs.h"
9913 /* System header to define __stub macros and hopefully few prototypes,
9914     which can conflict with char __res_query(); below.  */
9915 #include <assert.h>
9916 /* Override any gcc2 internal prototype to avoid an error.  */
9917 /* We use char because int might match the return type of a gcc2
9918     builtin and then its argument prototype would still apply.  */
9919 char __res_query();
9920 char (*f)();
9921
9922 int main() {
9923
9924 /* The GNU C library defines this for functions which it implements
9925     to always fail with ENOSYS.  Some functions are actually named
9926     something starting with __ and the normal name is an alias.  */
9927 #if defined (__stub___res_query) || defined (__stub_____res_query)
9928 choke me
9929 #else
9930 f = __res_query;
9931 #endif
9932
9933 ; return 0; }
9934 EOF
9935 if { (eval echo configure:9936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9936   rm -rf conftest*
9937   eval "ac_cv_func___res_query=yes"
9938 else
9939   echo "configure: failed program was:" >&5
9940   cat conftest.$ac_ext >&5
9941   rm -rf conftest*
9942   eval "ac_cv_func___res_query=no"
9943 fi
9944 rm -f conftest*
9945 fi
9946
9947 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9948   echo "$ac_t""yes" 1>&6
9949   :
9950 else
9951   echo "$ac_t""no" 1>&6
9952 fi
9953
9954         ac_cv_func_res_query=$ac_cv_func___res_query
9955 fi
9956
9957 if test $ac_cv_func_res_query = no ; then 
9958         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9959 echo "configure:9960: checking for res_query in -lbind" >&5
9960 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9961 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9962   echo $ac_n "(cached) $ac_c" 1>&6
9963 else
9964   ac_save_LIBS="$LIBS"
9965 LIBS="-lbind  $LIBS"
9966 cat > conftest.$ac_ext <<EOF
9967 #line 9968 "configure"
9968 #include "confdefs.h"
9969 /* Override any gcc2 internal prototype to avoid an error.  */
9970 /* We use char because int might match the return type of a gcc2
9971     builtin and then its argument prototype would still apply.  */
9972 char res_query();
9973
9974 int main() {
9975 res_query()
9976 ; return 0; }
9977 EOF
9978 if { (eval echo configure:9979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9979   rm -rf conftest*
9980   eval "ac_cv_lib_$ac_lib_var=yes"
9981 else
9982   echo "configure: failed program was:" >&5
9983   cat conftest.$ac_ext >&5
9984   rm -rf conftest*
9985   eval "ac_cv_lib_$ac_lib_var=no"
9986 fi
9987 rm -f conftest*
9988 LIBS="$ac_save_LIBS"
9989
9990 fi
9991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9992   echo "$ac_t""yes" 1>&6
9993     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9994     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9995   cat >> confdefs.h <<EOF
9996 #define $ac_tr_lib 1
9997 EOF
9998
9999   LIBS="-lbind $LIBS"
10000
10001 else
10002   echo "$ac_t""no" 1>&6
10003 fi
10004
10005         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10006 fi
10007
10008 if test $ac_cv_func_res_query = no ; then 
10009         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10010 echo "configure:10011: checking for __res_query in -lbind" >&5
10011 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10013   echo $ac_n "(cached) $ac_c" 1>&6
10014 else
10015   ac_save_LIBS="$LIBS"
10016 LIBS="-lbind  $LIBS"
10017 cat > conftest.$ac_ext <<EOF
10018 #line 10019 "configure"
10019 #include "confdefs.h"
10020 /* Override any gcc2 internal prototype to avoid an error.  */
10021 /* We use char because int might match the return type of a gcc2
10022     builtin and then its argument prototype would still apply.  */
10023 char __res_query();
10024
10025 int main() {
10026 __res_query()
10027 ; return 0; }
10028 EOF
10029 if { (eval echo configure:10030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10030   rm -rf conftest*
10031   eval "ac_cv_lib_$ac_lib_var=yes"
10032 else
10033   echo "configure: failed program was:" >&5
10034   cat conftest.$ac_ext >&5
10035   rm -rf conftest*
10036   eval "ac_cv_lib_$ac_lib_var=no"
10037 fi
10038 rm -f conftest*
10039 LIBS="$ac_save_LIBS"
10040
10041 fi
10042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10043   echo "$ac_t""yes" 1>&6
10044     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10045     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10046   cat >> confdefs.h <<EOF
10047 #define $ac_tr_lib 1
10048 EOF
10049
10050   LIBS="-lbind $LIBS"
10051
10052 else
10053   echo "$ac_t""no" 1>&6
10054 fi
10055
10056         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10057 fi
10058
10059 if test $ac_cv_func_res_query = no ; then 
10060         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10061 echo "configure:10062: checking for res_query in -lresolv" >&5
10062 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10064   echo $ac_n "(cached) $ac_c" 1>&6
10065 else
10066   ac_save_LIBS="$LIBS"
10067 LIBS="-lresolv  $LIBS"
10068 cat > conftest.$ac_ext <<EOF
10069 #line 10070 "configure"
10070 #include "confdefs.h"
10071 /* Override any gcc2 internal prototype to avoid an error.  */
10072 /* We use char because int might match the return type of a gcc2
10073     builtin and then its argument prototype would still apply.  */
10074 char res_query();
10075
10076 int main() {
10077 res_query()
10078 ; return 0; }
10079 EOF
10080 if { (eval echo configure:10081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10081   rm -rf conftest*
10082   eval "ac_cv_lib_$ac_lib_var=yes"
10083 else
10084   echo "configure: failed program was:" >&5
10085   cat conftest.$ac_ext >&5
10086   rm -rf conftest*
10087   eval "ac_cv_lib_$ac_lib_var=no"
10088 fi
10089 rm -f conftest*
10090 LIBS="$ac_save_LIBS"
10091
10092 fi
10093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10094   echo "$ac_t""yes" 1>&6
10095     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10096     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10097   cat >> confdefs.h <<EOF
10098 #define $ac_tr_lib 1
10099 EOF
10100
10101   LIBS="-lresolv $LIBS"
10102
10103 else
10104   echo "$ac_t""no" 1>&6
10105 fi
10106
10107         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10108 fi
10109
10110 if test $ac_cv_func_res_query = no ; then 
10111         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10112 echo "configure:10113: checking for __res_query in -lresolv" >&5
10113 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10114 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10115   echo $ac_n "(cached) $ac_c" 1>&6
10116 else
10117   ac_save_LIBS="$LIBS"
10118 LIBS="-lresolv  $LIBS"
10119 cat > conftest.$ac_ext <<EOF
10120 #line 10121 "configure"
10121 #include "confdefs.h"
10122 /* Override any gcc2 internal prototype to avoid an error.  */
10123 /* We use char because int might match the return type of a gcc2
10124     builtin and then its argument prototype would still apply.  */
10125 char __res_query();
10126
10127 int main() {
10128 __res_query()
10129 ; return 0; }
10130 EOF
10131 if { (eval echo configure:10132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10132   rm -rf conftest*
10133   eval "ac_cv_lib_$ac_lib_var=yes"
10134 else
10135   echo "configure: failed program was:" >&5
10136   cat conftest.$ac_ext >&5
10137   rm -rf conftest*
10138   eval "ac_cv_lib_$ac_lib_var=no"
10139 fi
10140 rm -f conftest*
10141 LIBS="$ac_save_LIBS"
10142
10143 fi
10144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10145   echo "$ac_t""yes" 1>&6
10146     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10147     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10148   cat >> confdefs.h <<EOF
10149 #define $ac_tr_lib 1
10150 EOF
10151
10152   LIBS="-lresolv $LIBS"
10153
10154 else
10155   echo "$ac_t""no" 1>&6
10156 fi
10157
10158         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10159 fi
10160
10161 if test "$ac_cv_func_res_query" = yes ; then
10162         cat >> confdefs.h <<\EOF
10163 #define HAVE_RES_QUERY 1
10164 EOF
10165
10166
10167         if test $ol_enable_dnssrv != no ; then
10168                 ol_link_dnssrv=yes
10169         fi
10170 fi
10171
10172 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10173         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10174 fi
10175
10176 for ac_func in getaddrinfo gai_strerror inet_ntop 
10177 do
10178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10179 echo "configure:10180: checking for $ac_func" >&5
10180 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10181   echo $ac_n "(cached) $ac_c" 1>&6
10182 else
10183   cat > conftest.$ac_ext <<EOF
10184 #line 10185 "configure"
10185 #include "confdefs.h"
10186 /* System header to define __stub macros and hopefully few prototypes,
10187     which can conflict with char $ac_func(); below.  */
10188 #include <assert.h>
10189 /* Override any gcc2 internal prototype to avoid an error.  */
10190 /* We use char because int might match the return type of a gcc2
10191     builtin and then its argument prototype would still apply.  */
10192 char $ac_func();
10193 char (*f)();
10194
10195 int main() {
10196
10197 /* The GNU C library defines this for functions which it implements
10198     to always fail with ENOSYS.  Some functions are actually named
10199     something starting with __ and the normal name is an alias.  */
10200 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10201 choke me
10202 #else
10203 f = $ac_func;
10204 #endif
10205
10206 ; return 0; }
10207 EOF
10208 if { (eval echo configure:10209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10209   rm -rf conftest*
10210   eval "ac_cv_func_$ac_func=yes"
10211 else
10212   echo "configure: failed program was:" >&5
10213   cat conftest.$ac_ext >&5
10214   rm -rf conftest*
10215   eval "ac_cv_func_$ac_func=no"
10216 fi
10217 rm -f conftest*
10218 fi
10219
10220 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10221   echo "$ac_t""yes" 1>&6
10222     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10223   cat >> confdefs.h <<EOF
10224 #define $ac_tr_func 1
10225 EOF
10226  
10227 else
10228   echo "$ac_t""no" 1>&6
10229 fi
10230 done
10231
10232
10233 ol_link_ipv6=no
10234 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10235         if test $ol_enable_ipv6 = yes ; then
10236                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10237         fi
10238 elif test $ol_enable_ipv6 != no ; then
10239         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10240 echo "configure:10241: checking INET6_ADDRSTRLEN" >&5
10241 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10242   echo $ac_n "(cached) $ac_c" 1>&6
10243 else
10244   
10245                 cat > conftest.$ac_ext <<EOF
10246 #line 10247 "configure"
10247 #include "confdefs.h"
10248
10249 #                       include <netinet/in.h>
10250 #                       ifdef INET6_ADDRSTRLEN
10251                                 __has_inet6_addrstrlen__;
10252 #                       endif
10253                 
10254 EOF
10255 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10256   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10257   rm -rf conftest*
10258   ol_cv_inet6_addrstrlen=yes
10259 else
10260   rm -rf conftest*
10261   ol_cv_inet6_addrstrlen=no
10262 fi
10263 rm -f conftest*
10264
10265 fi
10266
10267 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10268
10269
10270         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10271 echo "configure:10272: checking struct sockaddr_storage" >&5
10272 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10273   echo $ac_n "(cached) $ac_c" 1>&6
10274 else
10275   
10276                 cat > conftest.$ac_ext <<EOF
10277 #line 10278 "configure"
10278 #include "confdefs.h"
10279
10280 #include <sys/types.h>
10281 #include <sys/socket.h>
10282
10283 int main() {
10284
10285                         struct sockaddr_storage ss;
10286
10287 ; return 0; }
10288 EOF
10289 if { (eval echo configure:10290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10290   rm -rf conftest*
10291   ol_cv_struct_sockaddr_storage=yes
10292 else
10293   echo "configure: failed program was:" >&5
10294   cat conftest.$ac_ext >&5
10295   rm -rf conftest*
10296   ol_cv_struct_sockaddr_storage=no
10297 fi
10298 rm -f conftest*
10299 fi
10300
10301 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10302
10303         if test $ol_cv_inet6_addrstrlen = yes \
10304                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10305                 ol_link_ipv6=yes
10306         elif test $ol_enable_ipv6 = yes \
10307                         -a $ol_cv_inet6_addrstrlen = no ; then
10308                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10309         elif test $ol_enable_ipv6 = yes \
10310                         -a $ol_cv_struct_sockaddr_storage = no ; then
10311                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10312         fi
10313 fi
10314
10315 if test $ol_enable_local != no ; then
10316         for ac_hdr in sys/un.h 
10317 do
10318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10320 echo "configure:10321: checking for $ac_hdr" >&5
10321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10322   echo $ac_n "(cached) $ac_c" 1>&6
10323 else
10324   cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 #include <$ac_hdr>
10328 EOF
10329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10330 { (eval echo configure:10331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10332 if test -z "$ac_err"; then
10333   rm -rf conftest*
10334   eval "ac_cv_header_$ac_safe=yes"
10335 else
10336   echo "$ac_err" >&5
10337   echo "configure: failed program was:" >&5
10338   cat conftest.$ac_ext >&5
10339   rm -rf conftest*
10340   eval "ac_cv_header_$ac_safe=no"
10341 fi
10342 rm -f conftest*
10343 fi
10344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10345   echo "$ac_t""yes" 1>&6
10346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10347   cat >> confdefs.h <<EOF
10348 #define $ac_tr_hdr 1
10349 EOF
10350  
10351 else
10352   echo "$ac_t""no" 1>&6
10353 fi
10354 done
10355
10356
10357         if test $ol_enable_local = auto ; then
10358                 ol_enable_local=$ac_cv_header_sys_un_h
10359         elif test $ac_cv_header_sys_un_h = no ; then
10360                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10361         fi
10362 fi
10363
10364 ol_link_kbind=no
10365 ol_link_kpasswd=no
10366 ol_link_krb5=no
10367 ol_link_krb4=no
10368
10369 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10370         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10371         -o $ol_with_kerberos = k425 ; then
10372
10373         for ac_hdr in krb5.h
10374 do
10375 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10376 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10377 echo "configure:10378: checking for $ac_hdr" >&5
10378 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10379   echo $ac_n "(cached) $ac_c" 1>&6
10380 else
10381   cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 #include <$ac_hdr>
10385 EOF
10386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10387 { (eval echo configure:10388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10389 if test -z "$ac_err"; then
10390   rm -rf conftest*
10391   eval "ac_cv_header_$ac_safe=yes"
10392 else
10393   echo "$ac_err" >&5
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   eval "ac_cv_header_$ac_safe=no"
10398 fi
10399 rm -f conftest*
10400 fi
10401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10402   echo "$ac_t""yes" 1>&6
10403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10404   cat >> confdefs.h <<EOF
10405 #define $ac_tr_hdr 1
10406 EOF
10407  
10408 else
10409   echo "$ac_t""no" 1>&6
10410 fi
10411 done
10412
10413
10414         if test $ac_cv_header_krb5_h = yes ; then
10415                                 for ac_hdr in heim_err.h
10416 do
10417 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10418 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10419 echo "configure:10420: checking for $ac_hdr" >&5
10420 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10421   echo $ac_n "(cached) $ac_c" 1>&6
10422 else
10423   cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <$ac_hdr>
10427 EOF
10428 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10429 { (eval echo configure:10430: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10430 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10431 if test -z "$ac_err"; then
10432   rm -rf conftest*
10433   eval "ac_cv_header_$ac_safe=yes"
10434 else
10435   echo "$ac_err" >&5
10436   echo "configure: failed program was:" >&5
10437   cat conftest.$ac_ext >&5
10438   rm -rf conftest*
10439   eval "ac_cv_header_$ac_safe=no"
10440 fi
10441 rm -f conftest*
10442 fi
10443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10444   echo "$ac_t""yes" 1>&6
10445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10446   cat >> confdefs.h <<EOF
10447 #define $ac_tr_hdr 1
10448 EOF
10449  
10450 else
10451   echo "$ac_t""no" 1>&6
10452 fi
10453 done
10454
10455                 if test $ac_cv_header_heim_err_h = yes ; then
10456                         krb5_impl=heimdal
10457                 else
10458                         krb5_impl=mit
10459                 fi
10460
10461                 if test $krb5_impl = mit; then
10462                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10463 echo "configure:10464: checking for main in -lk5crypto" >&5
10464 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10465 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10466   echo $ac_n "(cached) $ac_c" 1>&6
10467 else
10468   ac_save_LIBS="$LIBS"
10469 LIBS="-lk5crypto  $LIBS"
10470 cat > conftest.$ac_ext <<EOF
10471 #line 10472 "configure"
10472 #include "confdefs.h"
10473
10474 int main() {
10475 main()
10476 ; return 0; }
10477 EOF
10478 if { (eval echo configure:10479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10479   rm -rf conftest*
10480   eval "ac_cv_lib_$ac_lib_var=yes"
10481 else
10482   echo "configure: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   rm -rf conftest*
10485   eval "ac_cv_lib_$ac_lib_var=no"
10486 fi
10487 rm -f conftest*
10488 LIBS="$ac_save_LIBS"
10489
10490 fi
10491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10492   echo "$ac_t""yes" 1>&6
10493   krb5crypto=k5crypto
10494 else
10495   echo "$ac_t""no" 1>&6
10496 krb5crypto=crypto
10497 fi
10498
10499
10500                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10501 echo "configure:10502: checking for main in -lkrb5" >&5
10502 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10503 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10504   echo $ac_n "(cached) $ac_c" 1>&6
10505 else
10506   ac_save_LIBS="$LIBS"
10507 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10508 cat > conftest.$ac_ext <<EOF
10509 #line 10510 "configure"
10510 #include "confdefs.h"
10511
10512 int main() {
10513 main()
10514 ; return 0; }
10515 EOF
10516 if { (eval echo configure:10517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10517   rm -rf conftest*
10518   eval "ac_cv_lib_$ac_lib_var=yes"
10519 else
10520   echo "configure: failed program was:" >&5
10521   cat conftest.$ac_ext >&5
10522   rm -rf conftest*
10523   eval "ac_cv_lib_$ac_lib_var=no"
10524 fi
10525 rm -f conftest*
10526 LIBS="$ac_save_LIBS"
10527
10528 fi
10529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10530   echo "$ac_t""yes" 1>&6
10531   have_krb5=yes
10532                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10533 else
10534   echo "$ac_t""no" 1>&6
10535 have_krb5=no
10536 fi
10537
10538
10539                 elif test $krb5_impl = heimdal; then
10540                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10541 echo "configure:10542: checking for main in -ldes" >&5
10542 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10544   echo $ac_n "(cached) $ac_c" 1>&6
10545 else
10546   ac_save_LIBS="$LIBS"
10547 LIBS="-ldes  $LIBS"
10548 cat > conftest.$ac_ext <<EOF
10549 #line 10550 "configure"
10550 #include "confdefs.h"
10551
10552 int main() {
10553 main()
10554 ; return 0; }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=no"
10564 fi
10565 rm -f conftest*
10566 LIBS="$ac_save_LIBS"
10567
10568 fi
10569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10570   echo "$ac_t""yes" 1>&6
10571   krb5crypto=des
10572 else
10573   echo "$ac_t""no" 1>&6
10574 krb5crypto=crypto
10575 fi
10576
10577
10578                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10579 echo "configure:10580: checking for main in -lkrb5" >&5
10580 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10581 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10582   echo $ac_n "(cached) $ac_c" 1>&6
10583 else
10584   ac_save_LIBS="$LIBS"
10585 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10586 cat > conftest.$ac_ext <<EOF
10587 #line 10588 "configure"
10588 #include "confdefs.h"
10589
10590 int main() {
10591 main()
10592 ; return 0; }
10593 EOF
10594 if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10595   rm -rf conftest*
10596   eval "ac_cv_lib_$ac_lib_var=yes"
10597 else
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -rf conftest*
10601   eval "ac_cv_lib_$ac_lib_var=no"
10602 fi
10603 rm -f conftest*
10604 LIBS="$ac_save_LIBS"
10605
10606 fi
10607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10608   echo "$ac_t""yes" 1>&6
10609   have_krb5=yes
10610                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10611 else
10612   echo "$ac_t""no" 1>&6
10613 have_krb5=no
10614 fi
10615
10616
10617                         cat >> confdefs.h <<\EOF
10618 #define HAVE_HEIMDAL_KERBEROS 1
10619 EOF
10620
10621
10622                 else
10623                         have_krb5=no
10624                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10625                 fi
10626
10627                 if test $have_krb5 = yes ; then
10628                         ol_link_krb5=yes
10629
10630                         cat >> confdefs.h <<\EOF
10631 #define HAVE_KRB5 1
10632 EOF
10633
10634
10635                         if test $ol_enable_kpasswd != no ; then
10636                                 ol_link_kpasswd=yes;
10637                         fi
10638
10639                         if test $ol_with_kerberos = k5only ; then
10640                                 ol_with_kerberos=found
10641                         fi
10642
10643                 elif test $ol_with_kerberos != auto ; then
10644                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10645                 fi
10646
10647         fi
10648 fi
10649
10650 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10651         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10652
10653         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10654 do
10655 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10656 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10657 echo "configure:10658: checking for $ac_hdr" >&5
10658 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10659   echo $ac_n "(cached) $ac_c" 1>&6
10660 else
10661   cat > conftest.$ac_ext <<EOF
10662 #line 10663 "configure"
10663 #include "confdefs.h"
10664 #include <$ac_hdr>
10665 EOF
10666 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10667 { (eval echo configure:10668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10668 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10669 if test -z "$ac_err"; then
10670   rm -rf conftest*
10671   eval "ac_cv_header_$ac_safe=yes"
10672 else
10673   echo "$ac_err" >&5
10674   echo "configure: failed program was:" >&5
10675   cat conftest.$ac_ext >&5
10676   rm -rf conftest*
10677   eval "ac_cv_header_$ac_safe=no"
10678 fi
10679 rm -f conftest*
10680 fi
10681 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10682   echo "$ac_t""yes" 1>&6
10683     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10684   cat >> confdefs.h <<EOF
10685 #define $ac_tr_hdr 1
10686 EOF
10687  
10688 else
10689   echo "$ac_t""no" 1>&6
10690 fi
10691 done
10692
10693
10694         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10695                 if test $krb5_impl = mit; then
10696                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10697 echo "configure:10698: checking for main in -lkrb4" >&5
10698 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10699 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   ac_save_LIBS="$LIBS"
10703 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10704 cat > conftest.$ac_ext <<EOF
10705 #line 10706 "configure"
10706 #include "confdefs.h"
10707
10708 int main() {
10709 main()
10710 ; return 0; }
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=yes"
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=no"
10720 fi
10721 rm -f conftest*
10722 LIBS="$ac_save_LIBS"
10723
10724 fi
10725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727   have_k425=yes
10728                                 KRB4_LIBS="-lkrb4 -ldes425"
10729 else
10730   echo "$ac_t""no" 1>&6
10731 have_k425=no
10732 fi
10733
10734
10735                 elif test $krb5_impl = heimdal; then
10736                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10737 echo "configure:10738: checking for main in -lkrb4" >&5
10738 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   ac_save_LIBS="$LIBS"
10743 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10744 cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 int main() {
10749 main()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 LIBS="$ac_save_LIBS"
10763
10764 fi
10765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767   have_k425=yes
10768                                 KRB4_LIBS="-lkrb4"
10769 else
10770   echo "$ac_t""no" 1>&6
10771 have_k425=no
10772 fi
10773
10774
10775                 else
10776                         have_425=no
10777                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10778                 fi
10779
10780                 if test $have_k425 = yes ; then
10781                         ol_with_kerberos=found
10782                         ol_link_krb4=yes
10783
10784                         cat >> confdefs.h <<\EOF
10785 #define HAVE_KRB425 1
10786 EOF
10787
10788                         cat >> confdefs.h <<\EOF
10789 #define HAVE_KRB4 1
10790 EOF
10791
10792
10793                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10794 echo "configure:10795: checking for des_debug in Kerberos libraries" >&5
10795 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10796   echo $ac_n "(cached) $ac_c" 1>&6
10797 else
10798   
10799                                                                 save_LIBS="$LIBS"
10800                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10801                                 cat > conftest.$ac_ext <<EOF
10802 #line 10803 "configure"
10803 #include "confdefs.h"
10804
10805 #include <kerberosIV/krb.h>
10806 #include <kerberosIV/des.h>
10807 extern int des_debug;
10808
10809 int main() {
10810
10811 des_debug = 1;
10812
10813 ; return 0; }
10814 EOF
10815 if { (eval echo configure:10816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10816   rm -rf conftest*
10817   ol_cv_var_des_debug=yes
10818 else
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   ol_cv_var_des_debug=no
10823 fi
10824 rm -f conftest*
10825                                                                 LIBS="$save_LIBS"
10826                         
10827 fi
10828
10829 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10830
10831                         if test $ol_cv_var_des_debug = yes ; then
10832                                 cat >> confdefs.h <<\EOF
10833 #define HAVE_DES_DEBUG 1
10834 EOF
10835
10836                         fi
10837
10838                         LIBS="$save_LIBS"
10839                 fi
10840         fi
10841 fi
10842
10843 if test $ol_link_krb5 = yes ; then
10844         ol_with_kerberos=found
10845 fi
10846
10847 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10848         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10849
10850         for ac_hdr in krb.h des.h krb-archaeology.h 
10851 do
10852 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10853 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10854 echo "configure:10855: checking for $ac_hdr" >&5
10855 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10856   echo $ac_n "(cached) $ac_c" 1>&6
10857 else
10858   cat > conftest.$ac_ext <<EOF
10859 #line 10860 "configure"
10860 #include "confdefs.h"
10861 #include <$ac_hdr>
10862 EOF
10863 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10864 { (eval echo configure:10865: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10865 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10866 if test -z "$ac_err"; then
10867   rm -rf conftest*
10868   eval "ac_cv_header_$ac_safe=yes"
10869 else
10870   echo "$ac_err" >&5
10871   echo "configure: failed program was:" >&5
10872   cat conftest.$ac_ext >&5
10873   rm -rf conftest*
10874   eval "ac_cv_header_$ac_safe=no"
10875 fi
10876 rm -f conftest*
10877 fi
10878 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10879   echo "$ac_t""yes" 1>&6
10880     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10881   cat >> confdefs.h <<EOF
10882 #define $ac_tr_hdr 1
10883 EOF
10884  
10885 else
10886   echo "$ac_t""no" 1>&6
10887 fi
10888 done
10889
10890
10891         if test $ac_cv_header_krb_h = yes ; then
10892                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10893 echo "configure:10894: checking for main in -lkrb" >&5
10894 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10896   echo $ac_n "(cached) $ac_c" 1>&6
10897 else
10898   ac_save_LIBS="$LIBS"
10899 LIBS="-lkrb -ldes $LIBS"
10900 cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903
10904 int main() {
10905 main()
10906 ; return 0; }
10907 EOF
10908 if { (eval echo configure:10909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10909   rm -rf conftest*
10910   eval "ac_cv_lib_$ac_lib_var=yes"
10911 else
10912   echo "configure: failed program was:" >&5
10913   cat conftest.$ac_ext >&5
10914   rm -rf conftest*
10915   eval "ac_cv_lib_$ac_lib_var=no"
10916 fi
10917 rm -f conftest*
10918 LIBS="$ac_save_LIBS"
10919
10920 fi
10921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10922   echo "$ac_t""yes" 1>&6
10923   have_k4=yes
10924 else
10925   echo "$ac_t""no" 1>&6
10926 have_k4=no
10927 fi
10928
10929
10930                 if test $have_k4 = yes ; then
10931                         ol_with_kerberos=found
10932                         ol_link_krb4=yes
10933
10934                         cat >> confdefs.h <<\EOF
10935 #define HAVE_KRB4 1
10936 EOF
10937
10938
10939                         KRB4_LIBS="-lkrb -ldes"
10940
10941                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10942                                 cat >> confdefs.h <<\EOF
10943 #define HAVE_KTH_KERBEROS 1
10944 EOF
10945
10946                         fi
10947                 fi
10948         fi
10949 fi
10950
10951 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10952         ol_link_kpasswd=yes
10953 fi
10954
10955 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10956         ol_link_kbind=yes
10957
10958 elif test $ol_enable_kbind = yes ; then
10959         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10960 fi
10961
10962 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10963         cat >> confdefs.h <<\EOF
10964 #define HAVE_KERBEROS 1
10965 EOF
10966
10967
10968 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10969         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10970 fi
10971
10972 ol_link_tls=no
10973 if test $ol_with_tls != no ; then
10974         for ac_hdr in openssl/ssl.h ssl.h
10975 do
10976 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10977 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10978 echo "configure:10979: checking for $ac_hdr" >&5
10979 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10980   echo $ac_n "(cached) $ac_c" 1>&6
10981 else
10982   cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985 #include <$ac_hdr>
10986 EOF
10987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10988 { (eval echo configure:10989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10990 if test -z "$ac_err"; then
10991   rm -rf conftest*
10992   eval "ac_cv_header_$ac_safe=yes"
10993 else
10994   echo "$ac_err" >&5
10995   echo "configure: failed program was:" >&5
10996   cat conftest.$ac_ext >&5
10997   rm -rf conftest*
10998   eval "ac_cv_header_$ac_safe=no"
10999 fi
11000 rm -f conftest*
11001 fi
11002 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11003   echo "$ac_t""yes" 1>&6
11004     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11005   cat >> confdefs.h <<EOF
11006 #define $ac_tr_hdr 1
11007 EOF
11008  
11009 else
11010   echo "$ac_t""no" 1>&6
11011 fi
11012 done
11013
11014         
11015         if test $ac_cv_header_openssl_ssl_h = yes \
11016                 -o $ac_cv_header_ssl_h = yes ; then
11017                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11018 echo "configure:11019: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11019 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11021   echo $ac_n "(cached) $ac_c" 1>&6
11022 else
11023   ac_save_LIBS="$LIBS"
11024 LIBS="-lssl -lcrypto $LIBS"
11025 cat > conftest.$ac_ext <<EOF
11026 #line 11027 "configure"
11027 #include "confdefs.h"
11028 /* Override any gcc2 internal prototype to avoid an error.  */
11029 /* We use char because int might match the return type of a gcc2
11030     builtin and then its argument prototype would still apply.  */
11031 char SSLeay_add_ssl_algorithms();
11032
11033 int main() {
11034 SSLeay_add_ssl_algorithms()
11035 ; return 0; }
11036 EOF
11037 if { (eval echo configure:11038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11038   rm -rf conftest*
11039   eval "ac_cv_lib_$ac_lib_var=yes"
11040 else
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -rf conftest*
11044   eval "ac_cv_lib_$ac_lib_var=no"
11045 fi
11046 rm -f conftest*
11047 LIBS="$ac_save_LIBS"
11048
11049 fi
11050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11051   echo "$ac_t""yes" 1>&6
11052   have_ssleay=yes
11053                         need_rsaref=no
11054 else
11055   echo "$ac_t""no" 1>&6
11056 have_ssleay=no
11057 fi
11058
11059                         
11060                 if test $have_ssleay = no ; then
11061                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11062 echo "configure:11063: checking for SSL_library_init in -lssl" >&5
11063 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   ac_save_LIBS="$LIBS"
11068 LIBS="-lssl -lcrypto $LIBS"
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char SSL_library_init();
11076
11077 int main() {
11078 SSL_library_init()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 LIBS="$ac_save_LIBS"
11092
11093 fi
11094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096   have_ssleay=yes
11097                                 need_rsaref=no
11098 else
11099   echo "$ac_t""no" 1>&6
11100 have_ssleay=no
11101 fi
11102
11103                 fi
11104
11105                 if test $have_ssleay = no ; then
11106                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11107 echo "configure:11108: checking for ssl3_accept in -lssl" >&5
11108 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   ac_save_LIBS="$LIBS"
11113 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11114 cat > conftest.$ac_ext <<EOF
11115 #line 11116 "configure"
11116 #include "confdefs.h"
11117 /* Override any gcc2 internal prototype to avoid an error.  */
11118 /* We use char because int might match the return type of a gcc2
11119     builtin and then its argument prototype would still apply.  */
11120 char ssl3_accept();
11121
11122 int main() {
11123 ssl3_accept()
11124 ; return 0; }
11125 EOF
11126 if { (eval echo configure:11127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11127   rm -rf conftest*
11128   eval "ac_cv_lib_$ac_lib_var=yes"
11129 else
11130   echo "configure: failed program was:" >&5
11131   cat conftest.$ac_ext >&5
11132   rm -rf conftest*
11133   eval "ac_cv_lib_$ac_lib_var=no"
11134 fi
11135 rm -f conftest*
11136 LIBS="$ac_save_LIBS"
11137
11138 fi
11139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11140   echo "$ac_t""yes" 1>&6
11141   have_ssleay=yes
11142                                 need_rsaref=yes
11143 else
11144   echo "$ac_t""no" 1>&6
11145 have_ssleay=no
11146 fi
11147
11148                 fi
11149
11150                 if test $have_ssleay = yes ; then
11151                         ol_with_tls=found
11152                         ol_link_tls=yes
11153
11154                         cat >> confdefs.h <<\EOF
11155 #define HAVE_SSLEAY 1
11156 EOF
11157
11158
11159                         if test $need_rsaref = yes; then
11160                                 cat >> confdefs.h <<\EOF
11161 #define HAVE_RSAREF 1
11162 EOF
11163
11164
11165                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11166                         else
11167                                 TLS_LIBS="-lssl -lcrypto"
11168                         fi
11169                 fi
11170         fi
11171
11172 else
11173         echo "configure: warning: TLS data protection not supported!" 1>&2
11174 fi
11175
11176 if test $ol_link_tls = yes ; then
11177         cat >> confdefs.h <<\EOF
11178 #define HAVE_TLS 1
11179 EOF
11180
11181
11182 elif test $ol_with_tls = auto ; then
11183         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11184         echo "configure: warning: TLS data protection not supported!" 1>&2
11185
11186 elif test $ol_with_tls != no ; then
11187         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11188 fi
11189
11190 if test $ol_enable_lmpasswd != no; then
11191         if test $ol_link_tls != yes ; then
11192                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11193         fi
11194
11195         cat >> confdefs.h <<\EOF
11196 #define SLAPD_LMHASH 1
11197 EOF
11198
11199 fi
11200
11201 ol_link_threads=no
11202
11203 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11204         -o $ol_with_threads = nt ; then
11205
11206         
11207         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11208 echo "configure:11209: checking for _beginthread" >&5
11209 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11210   echo $ac_n "(cached) $ac_c" 1>&6
11211 else
11212   cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 /* System header to define __stub macros and hopefully few prototypes,
11216     which can conflict with char _beginthread(); below.  */
11217 #include <assert.h>
11218 /* Override any gcc2 internal prototype to avoid an error.  */
11219 /* We use char because int might match the return type of a gcc2
11220     builtin and then its argument prototype would still apply.  */
11221 char _beginthread();
11222 char (*f)();
11223
11224 int main() {
11225
11226 /* The GNU C library defines this for functions which it implements
11227     to always fail with ENOSYS.  Some functions are actually named
11228     something starting with __ and the normal name is an alias.  */
11229 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11230 choke me
11231 #else
11232 f = _beginthread;
11233 #endif
11234
11235 ; return 0; }
11236 EOF
11237 if { (eval echo configure:11238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11238   rm -rf conftest*
11239   eval "ac_cv_func__beginthread=yes"
11240 else
11241   echo "configure: failed program was:" >&5
11242   cat conftest.$ac_ext >&5
11243   rm -rf conftest*
11244   eval "ac_cv_func__beginthread=no"
11245 fi
11246 rm -f conftest*
11247 fi
11248
11249 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11250   echo "$ac_t""yes" 1>&6
11251   :
11252 else
11253   echo "$ac_t""no" 1>&6
11254 fi
11255
11256
11257         if test $ac_cv_func__beginthread = yes ; then
11258                 cat >> confdefs.h <<\EOF
11259 #define HAVE_NT_THREADS 1
11260 EOF
11261
11262                 ol_cv_nt_threads=yes
11263         fi
11264
11265
11266         if test "$ol_cv_nt_threads" = yes ; then
11267                 ol_link_threads=nt
11268                 ol_with_threads=found
11269                 ol_with_yielding_select=yes
11270
11271                 cat >> confdefs.h <<\EOF
11272 #define HAVE_NT_SERVICE_MANAGER 1
11273 EOF
11274
11275                 cat >> confdefs.h <<\EOF
11276 #define HAVE_NT_EVENT_LOG 1
11277 EOF
11278
11279         fi
11280
11281         if test $ol_with_threads = nt ; then
11282                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11283         fi
11284 fi
11285
11286 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11287         -o $ol_with_threads = posix ; then
11288
11289         for ac_hdr in pthread.h
11290 do
11291 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11292 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11293 echo "configure:11294: checking for $ac_hdr" >&5
11294 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11295   echo $ac_n "(cached) $ac_c" 1>&6
11296 else
11297   cat > conftest.$ac_ext <<EOF
11298 #line 11299 "configure"
11299 #include "confdefs.h"
11300 #include <$ac_hdr>
11301 EOF
11302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11303 { (eval echo configure:11304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11305 if test -z "$ac_err"; then
11306   rm -rf conftest*
11307   eval "ac_cv_header_$ac_safe=yes"
11308 else
11309   echo "$ac_err" >&5
11310   echo "configure: failed program was:" >&5
11311   cat conftest.$ac_ext >&5
11312   rm -rf conftest*
11313   eval "ac_cv_header_$ac_safe=no"
11314 fi
11315 rm -f conftest*
11316 fi
11317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11318   echo "$ac_t""yes" 1>&6
11319     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11320   cat >> confdefs.h <<EOF
11321 #define $ac_tr_hdr 1
11322 EOF
11323  
11324 else
11325   echo "$ac_t""no" 1>&6
11326 fi
11327 done
11328
11329
11330         if test $ac_cv_header_pthread_h = yes ; then
11331                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11332 echo "configure:11333: checking POSIX thread version" >&5
11333 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11334   echo $ac_n "(cached) $ac_c" 1>&6
11335 else
11336   
11337         cat > conftest.$ac_ext <<EOF
11338 #line 11339 "configure"
11339 #include "confdefs.h"
11340
11341 #               include <pthread.h>
11342         
11343 int main() {
11344
11345                 int i = PTHREAD_CREATE_JOINABLE;
11346         
11347 ; return 0; }
11348 EOF
11349 if { (eval echo configure:11350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11350   rm -rf conftest*
11351   
11352         cat > conftest.$ac_ext <<EOF
11353 #line 11354 "configure"
11354 #include "confdefs.h"
11355 #include <pthread.h>
11356 EOF
11357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11358   egrep "pthread_detach" >/dev/null 2>&1; then
11359   rm -rf conftest*
11360   ol_cv_pthread_version=10
11361 else
11362   rm -rf conftest*
11363   ol_cv_pthread_version=8
11364 fi
11365 rm -f conftest*
11366
11367 else
11368   echo "configure: failed program was:" >&5
11369   cat conftest.$ac_ext >&5
11370   rm -rf conftest*
11371   
11372         cat > conftest.$ac_ext <<EOF
11373 #line 11374 "configure"
11374 #include "confdefs.h"
11375
11376 #               include <pthread.h>
11377 #               ifdef PTHREAD_CREATE_UNDETACHED
11378                 draft7
11379 #               endif
11380         
11381 EOF
11382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11383   egrep "draft7" >/dev/null 2>&1; then
11384   rm -rf conftest*
11385   ol_cv_pthread_version=7
11386 else
11387   rm -rf conftest*
11388   
11389         cat > conftest.$ac_ext <<EOF
11390 #line 11391 "configure"
11391 #include "confdefs.h"
11392 #include <pthread.h>
11393 EOF
11394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11395   egrep "pthread_attr_init" >/dev/null 2>&1; then
11396   rm -rf conftest*
11397   ol_cv_pthread_version=6
11398 else
11399   rm -rf conftest*
11400   
11401         cat > conftest.$ac_ext <<EOF
11402 #line 11403 "configure"
11403 #include "confdefs.h"
11404
11405 #               include <pthread.h>
11406 #ifdef          PTHREAD_MUTEX_INITIALIZER
11407                 draft5
11408 #endif
11409         
11410 EOF
11411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11412   egrep "draft5" >/dev/null 2>&1; then
11413   rm -rf conftest*
11414   ol_cv_pthread_version=5
11415 else
11416   rm -rf conftest*
11417   ol_cv_pthread_version=4
11418 fi
11419 rm -f conftest*
11420  
11421 fi
11422 rm -f conftest*
11423  
11424 fi
11425 rm -f conftest*
11426  
11427 fi
11428 rm -f conftest*
11429
11430 fi
11431
11432 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11433
11434
11435                 if test $ol_cv_pthread_version != 0 ; then
11436                         cat >> confdefs.h <<EOF
11437 #define HAVE_PTHREADS $ol_cv_pthread_version
11438 EOF
11439
11440                 else
11441                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11442                 fi
11443
11444                 # consider threads found
11445                 ol_with_threads=found
11446
11447                 
11448         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11449 echo "configure:11450: checking for LinuxThreads pthread.h" >&5
11450 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11451   echo $ac_n "(cached) $ac_c" 1>&6
11452 else
11453   cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 #include <pthread.h>
11457 EOF
11458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11459   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11460   rm -rf conftest*
11461   ol_cv_header_linux_threads=yes
11462 else
11463   rm -rf conftest*
11464   ol_cv_header_linux_threads=no
11465 fi
11466 rm -f conftest*
11467
11468                 
11469 fi
11470
11471 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11472         if test $ol_cv_header_linux_threads = yes; then
11473                 cat >> confdefs.h <<\EOF
11474 #define HAVE_LINUX_THREADS 1
11475 EOF
11476
11477         fi
11478
11479                 
11480         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11481 echo "configure:11482: checking for GNU Pth pthread.h" >&5
11482 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11483   echo $ac_n "(cached) $ac_c" 1>&6
11484 else
11485   cat > conftest.$ac_ext <<EOF
11486 #line 11487 "configure"
11487 #include "confdefs.h"
11488 #include <pthread.h>
11489 #ifdef _POSIX_THREAD_IS_GNU_PTH
11490         __gnu_pth__;
11491 #endif
11492
11493 EOF
11494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11495   egrep "__gnu_pth__" >/dev/null 2>&1; then
11496   rm -rf conftest*
11497   ol_cv_header_gnu_pth_pthread_h=yes
11498 else
11499   rm -rf conftest*
11500   ol_cv_header_gnu_pth_pthread_h=no
11501 fi
11502 rm -f conftest*
11503
11504                 
11505 fi
11506
11507 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11508
11509
11510                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11511                         for ac_hdr in sched.h
11512 do
11513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11515 echo "configure:11516: checking for $ac_hdr" >&5
11516 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11517   echo $ac_n "(cached) $ac_c" 1>&6
11518 else
11519   cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 #include <$ac_hdr>
11523 EOF
11524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11525 { (eval echo configure:11526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11527 if test -z "$ac_err"; then
11528   rm -rf conftest*
11529   eval "ac_cv_header_$ac_safe=yes"
11530 else
11531   echo "$ac_err" >&5
11532   echo "configure: failed program was:" >&5
11533   cat conftest.$ac_ext >&5
11534   rm -rf conftest*
11535   eval "ac_cv_header_$ac_safe=no"
11536 fi
11537 rm -f conftest*
11538 fi
11539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11540   echo "$ac_t""yes" 1>&6
11541     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11542   cat >> confdefs.h <<EOF
11543 #define $ac_tr_hdr 1
11544 EOF
11545  
11546 else
11547   echo "$ac_t""no" 1>&6
11548 fi
11549 done
11550
11551                 fi
11552
11553                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11554                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11555 echo "configure:11556: checking for pthread_create in default libraries" >&5
11556 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11557   echo $ac_n "(cached) $ac_c" 1>&6
11558 else
11559   
11560                 if test "$cross_compiling" = yes; then
11561   cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564 /* pthread test headers */
11565 #include <pthread.h>
11566 #if HAVE_PTHREADS < 7
11567 #include <errno.h>
11568 #endif
11569 #ifndef NULL
11570 #define NULL (void*)0
11571 #endif
11572
11573 static void *task(p)
11574         void *p;
11575 {
11576         return (void *) (p == NULL);
11577 }
11578
11579 int main() {
11580
11581         /* pthread test function */
11582 #ifndef PTHREAD_CREATE_DETACHED
11583 #define PTHREAD_CREATE_DETACHED 1
11584 #endif
11585         pthread_t t;
11586         int status;
11587         int detach = PTHREAD_CREATE_DETACHED;
11588
11589 #if HAVE_PTHREADS > 4
11590         /* Final pthreads */
11591         pthread_attr_t attr;
11592
11593         status = pthread_attr_init(&attr);
11594         if( status ) return status;
11595
11596 #if HAVE_PTHREADS < 7
11597         status = pthread_attr_setdetachstate(&attr, &detach);
11598         if( status < 0 ) status = errno;
11599 #else
11600         status = pthread_attr_setdetachstate(&attr, detach);
11601 #endif
11602         if( status ) return status;
11603         status = pthread_create( &t, &attr, task, NULL );
11604 #if HAVE_PTHREADS < 7
11605         if( status < 0 ) status = errno;
11606 #endif
11607         if( status ) return status;
11608 #else
11609         /* Draft 4 pthreads */
11610         status = pthread_create( &t, pthread_attr_default, task, NULL );
11611         if( status ) return errno;
11612
11613         /* give thread a chance to complete */
11614         /* it should remain joinable and hence detachable */
11615         sleep( 1 );
11616
11617         status = pthread_detach( &t );
11618         if( status ) return errno;
11619 #endif
11620
11621 #ifdef HAVE_LINUX_THREADS
11622         pthread_kill_other_threads_np();
11623 #endif
11624
11625         return 0;
11626
11627 ; return 0; }
11628 EOF
11629 if { (eval echo configure:11630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11630   rm -rf conftest*
11631   ol_cv_pthread_create=yes
11632 else
11633   echo "configure: failed program was:" >&5
11634   cat conftest.$ac_ext >&5
11635   rm -rf conftest*
11636   ol_cv_pthread_create=no
11637 fi
11638 rm -f conftest*
11639 else
11640   cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643 /* pthread test headers */
11644 #include <pthread.h>
11645 #if HAVE_PTHREADS < 7
11646 #include <errno.h>
11647 #endif
11648 #ifndef NULL
11649 #define NULL (void*)0
11650 #endif
11651
11652 static void *task(p)
11653         void *p;
11654 {
11655         return (void *) (p == NULL);
11656 }
11657
11658
11659 int main(argc, argv)
11660         int argc;
11661         char **argv;
11662 {
11663
11664         /* pthread test function */
11665 #ifndef PTHREAD_CREATE_DETACHED
11666 #define PTHREAD_CREATE_DETACHED 1
11667 #endif
11668         pthread_t t;
11669         int status;
11670         int detach = PTHREAD_CREATE_DETACHED;
11671
11672 #if HAVE_PTHREADS > 4
11673         /* Final pthreads */
11674         pthread_attr_t attr;
11675
11676         status = pthread_attr_init(&attr);
11677         if( status ) return status;
11678
11679 #if HAVE_PTHREADS < 7
11680         status = pthread_attr_setdetachstate(&attr, &detach);
11681         if( status < 0 ) status = errno;
11682 #else
11683         status = pthread_attr_setdetachstate(&attr, detach);
11684 #endif
11685         if( status ) return status;
11686         status = pthread_create( &t, &attr, task, NULL );
11687 #if HAVE_PTHREADS < 7
11688         if( status < 0 ) status = errno;
11689 #endif
11690         if( status ) return status;
11691 #else
11692         /* Draft 4 pthreads */
11693         status = pthread_create( &t, pthread_attr_default, task, NULL );
11694         if( status ) return errno;
11695
11696         /* give thread a chance to complete */
11697         /* it should remain joinable and hence detachable */
11698         sleep( 1 );
11699
11700         status = pthread_detach( &t );
11701         if( status ) return errno;
11702 #endif
11703
11704 #ifdef HAVE_LINUX_THREADS
11705         pthread_kill_other_threads_np();
11706 #endif
11707
11708         return 0;
11709
11710 }
11711
11712 EOF
11713 if { (eval echo configure:11714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11714 then
11715   ol_cv_pthread_create=yes
11716 else
11717   echo "configure: failed program was:" >&5
11718   cat conftest.$ac_ext >&5
11719   rm -fr conftest*
11720   ol_cv_pthread_create=no
11721 fi
11722 rm -fr conftest*
11723 fi
11724
11725 fi
11726
11727 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11728
11729                 if test $ol_cv_pthread_create != no ; then
11730                         ol_link_threads=posix
11731                         ol_link_pthreads=""
11732                 fi
11733                 
11734                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11735 if test "$ol_link_threads" = no ; then
11736         # try -kthread
11737         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11738 echo "configure:11739: checking for pthread link with -kthread" >&5
11739 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11740   echo $ac_n "(cached) $ac_c" 1>&6
11741 else
11742   
11743                 # save the flags
11744                 ol_LIBS="$LIBS"
11745                 LIBS="-kthread $LIBS"
11746
11747                 if test "$cross_compiling" = yes; then
11748   cat > conftest.$ac_ext <<EOF
11749 #line 11750 "configure"
11750 #include "confdefs.h"
11751 /* pthread test headers */
11752 #include <pthread.h>
11753 #if HAVE_PTHREADS < 7
11754 #include <errno.h>
11755 #endif
11756 #ifndef NULL
11757 #define NULL (void*)0
11758 #endif
11759
11760 static void *task(p)
11761         void *p;
11762 {
11763         return (void *) (p == NULL);
11764 }
11765
11766 int main() {
11767
11768         /* pthread test function */
11769 #ifndef PTHREAD_CREATE_DETACHED
11770 #define PTHREAD_CREATE_DETACHED 1
11771 #endif
11772         pthread_t t;
11773         int status;
11774         int detach = PTHREAD_CREATE_DETACHED;
11775
11776 #if HAVE_PTHREADS > 4
11777         /* Final pthreads */
11778         pthread_attr_t attr;
11779
11780         status = pthread_attr_init(&attr);
11781         if( status ) return status;
11782
11783 #if HAVE_PTHREADS < 7
11784         status = pthread_attr_setdetachstate(&attr, &detach);
11785         if( status < 0 ) status = errno;
11786 #else
11787         status = pthread_attr_setdetachstate(&attr, detach);
11788 #endif
11789         if( status ) return status;
11790         status = pthread_create( &t, &attr, task, NULL );
11791 #if HAVE_PTHREADS < 7
11792         if( status < 0 ) status = errno;
11793 #endif
11794         if( status ) return status;
11795 #else
11796         /* Draft 4 pthreads */
11797         status = pthread_create( &t, pthread_attr_default, task, NULL );
11798         if( status ) return errno;
11799
11800         /* give thread a chance to complete */
11801         /* it should remain joinable and hence detachable */
11802         sleep( 1 );
11803
11804         status = pthread_detach( &t );
11805         if( status ) return errno;
11806 #endif
11807
11808 #ifdef HAVE_LINUX_THREADS
11809         pthread_kill_other_threads_np();
11810 #endif
11811
11812         return 0;
11813
11814 ; return 0; }
11815 EOF
11816 if { (eval echo configure:11817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11817   rm -rf conftest*
11818   ol_cv_pthread_kthread=yes
11819 else
11820   echo "configure: failed program was:" >&5
11821   cat conftest.$ac_ext >&5
11822   rm -rf conftest*
11823   ol_cv_pthread_kthread=no
11824 fi
11825 rm -f conftest*
11826 else
11827   cat > conftest.$ac_ext <<EOF
11828 #line 11829 "configure"
11829 #include "confdefs.h"
11830 /* pthread test headers */
11831 #include <pthread.h>
11832 #if HAVE_PTHREADS < 7
11833 #include <errno.h>
11834 #endif
11835 #ifndef NULL
11836 #define NULL (void*)0
11837 #endif
11838
11839 static void *task(p)
11840         void *p;
11841 {
11842         return (void *) (p == NULL);
11843 }
11844
11845
11846 int main(argc, argv)
11847         int argc;
11848         char **argv;
11849 {
11850
11851         /* pthread test function */
11852 #ifndef PTHREAD_CREATE_DETACHED
11853 #define PTHREAD_CREATE_DETACHED 1
11854 #endif
11855         pthread_t t;
11856         int status;
11857         int detach = PTHREAD_CREATE_DETACHED;
11858
11859 #if HAVE_PTHREADS > 4
11860         /* Final pthreads */
11861         pthread_attr_t attr;
11862
11863         status = pthread_attr_init(&attr);
11864         if( status ) return status;
11865
11866 #if HAVE_PTHREADS < 7
11867         status = pthread_attr_setdetachstate(&attr, &detach);
11868         if( status < 0 ) status = errno;
11869 #else
11870         status = pthread_attr_setdetachstate(&attr, detach);
11871 #endif
11872         if( status ) return status;
11873         status = pthread_create( &t, &attr, task, NULL );
11874 #if HAVE_PTHREADS < 7
11875         if( status < 0 ) status = errno;
11876 #endif
11877         if( status ) return status;
11878 #else
11879         /* Draft 4 pthreads */
11880         status = pthread_create( &t, pthread_attr_default, task, NULL );
11881         if( status ) return errno;
11882
11883         /* give thread a chance to complete */
11884         /* it should remain joinable and hence detachable */
11885         sleep( 1 );
11886
11887         status = pthread_detach( &t );
11888         if( status ) return errno;
11889 #endif
11890
11891 #ifdef HAVE_LINUX_THREADS
11892         pthread_kill_other_threads_np();
11893 #endif
11894
11895         return 0;
11896
11897 }
11898
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11901 then
11902   ol_cv_pthread_kthread=yes
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -fr conftest*
11907   ol_cv_pthread_kthread=no
11908 fi
11909 rm -fr conftest*
11910 fi
11911
11912
11913                 # restore the LIBS
11914                 LIBS="$ol_LIBS"
11915         
11916 fi
11917
11918 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11919
11920         if test $ol_cv_pthread_kthread = yes ; then
11921                 ol_link_pthreads="-kthread"
11922                 ol_link_threads=posix
11923         fi
11924 fi
11925
11926                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11927 if test "$ol_link_threads" = no ; then
11928         # try -pthread
11929         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11930 echo "configure:11931: checking for pthread link with -pthread" >&5
11931 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11932   echo $ac_n "(cached) $ac_c" 1>&6
11933 else
11934   
11935                 # save the flags
11936                 ol_LIBS="$LIBS"
11937                 LIBS="-pthread $LIBS"
11938
11939                 if test "$cross_compiling" = yes; then
11940   cat > conftest.$ac_ext <<EOF
11941 #line 11942 "configure"
11942 #include "confdefs.h"
11943 /* pthread test headers */
11944 #include <pthread.h>
11945 #if HAVE_PTHREADS < 7
11946 #include <errno.h>
11947 #endif
11948 #ifndef NULL
11949 #define NULL (void*)0
11950 #endif
11951
11952 static void *task(p)
11953         void *p;
11954 {
11955         return (void *) (p == NULL);
11956 }
11957
11958 int main() {
11959
11960         /* pthread test function */
11961 #ifndef PTHREAD_CREATE_DETACHED
11962 #define PTHREAD_CREATE_DETACHED 1
11963 #endif
11964         pthread_t t;
11965         int status;
11966         int detach = PTHREAD_CREATE_DETACHED;
11967
11968 #if HAVE_PTHREADS > 4
11969         /* Final pthreads */
11970         pthread_attr_t attr;
11971
11972         status = pthread_attr_init(&attr);
11973         if( status ) return status;
11974
11975 #if HAVE_PTHREADS < 7
11976         status = pthread_attr_setdetachstate(&attr, &detach);
11977         if( status < 0 ) status = errno;
11978 #else
11979         status = pthread_attr_setdetachstate(&attr, detach);
11980 #endif
11981         if( status ) return status;
11982         status = pthread_create( &t, &attr, task, NULL );
11983 #if HAVE_PTHREADS < 7
11984         if( status < 0 ) status = errno;
11985 #endif
11986         if( status ) return status;
11987 #else
11988         /* Draft 4 pthreads */
11989         status = pthread_create( &t, pthread_attr_default, task, NULL );
11990         if( status ) return errno;
11991
11992         /* give thread a chance to complete */
11993         /* it should remain joinable and hence detachable */
11994         sleep( 1 );
11995
11996         status = pthread_detach( &t );
11997         if( status ) return errno;
11998 #endif
11999
12000 #ifdef HAVE_LINUX_THREADS
12001         pthread_kill_other_threads_np();
12002 #endif
12003
12004         return 0;
12005
12006 ; return 0; }
12007 EOF
12008 if { (eval echo configure:12009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12009   rm -rf conftest*
12010   ol_cv_pthread_pthread=yes
12011 else
12012   echo "configure: failed program was:" >&5
12013   cat conftest.$ac_ext >&5
12014   rm -rf conftest*
12015   ol_cv_pthread_pthread=no
12016 fi
12017 rm -f conftest*
12018 else
12019   cat > conftest.$ac_ext <<EOF
12020 #line 12021 "configure"
12021 #include "confdefs.h"
12022 /* pthread test headers */
12023 #include <pthread.h>
12024 #if HAVE_PTHREADS < 7
12025 #include <errno.h>
12026 #endif
12027 #ifndef NULL
12028 #define NULL (void*)0
12029 #endif
12030
12031 static void *task(p)
12032         void *p;
12033 {
12034         return (void *) (p == NULL);
12035 }
12036
12037
12038 int main(argc, argv)
12039         int argc;
12040         char **argv;
12041 {
12042
12043         /* pthread test function */
12044 #ifndef PTHREAD_CREATE_DETACHED
12045 #define PTHREAD_CREATE_DETACHED 1
12046 #endif
12047         pthread_t t;
12048         int status;
12049         int detach = PTHREAD_CREATE_DETACHED;
12050
12051 #if HAVE_PTHREADS > 4
12052         /* Final pthreads */
12053         pthread_attr_t attr;
12054
12055         status = pthread_attr_init(&attr);
12056         if( status ) return status;
12057
12058 #if HAVE_PTHREADS < 7
12059         status = pthread_attr_setdetachstate(&attr, &detach);
12060         if( status < 0 ) status = errno;
12061 #else
12062         status = pthread_attr_setdetachstate(&attr, detach);
12063 #endif
12064         if( status ) return status;
12065         status = pthread_create( &t, &attr, task, NULL );
12066 #if HAVE_PTHREADS < 7
12067         if( status < 0 ) status = errno;
12068 #endif
12069         if( status ) return status;
12070 #else
12071         /* Draft 4 pthreads */
12072         status = pthread_create( &t, pthread_attr_default, task, NULL );
12073         if( status ) return errno;
12074
12075         /* give thread a chance to complete */
12076         /* it should remain joinable and hence detachable */
12077         sleep( 1 );
12078
12079         status = pthread_detach( &t );
12080         if( status ) return errno;
12081 #endif
12082
12083 #ifdef HAVE_LINUX_THREADS
12084         pthread_kill_other_threads_np();
12085 #endif
12086
12087         return 0;
12088
12089 }
12090
12091 EOF
12092 if { (eval echo configure:12093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12093 then
12094   ol_cv_pthread_pthread=yes
12095 else
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -fr conftest*
12099   ol_cv_pthread_pthread=no
12100 fi
12101 rm -fr conftest*
12102 fi
12103
12104
12105                 # restore the LIBS
12106                 LIBS="$ol_LIBS"
12107         
12108 fi
12109
12110 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12111
12112         if test $ol_cv_pthread_pthread = yes ; then
12113                 ol_link_pthreads="-pthread"
12114                 ol_link_threads=posix
12115         fi
12116 fi
12117
12118                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12119 if test "$ol_link_threads" = no ; then
12120         # try -pthreads
12121         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12122 echo "configure:12123: checking for pthread link with -pthreads" >&5
12123 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12124   echo $ac_n "(cached) $ac_c" 1>&6
12125 else
12126   
12127                 # save the flags
12128                 ol_LIBS="$LIBS"
12129                 LIBS="-pthreads $LIBS"
12130
12131                 if test "$cross_compiling" = yes; then
12132   cat > conftest.$ac_ext <<EOF
12133 #line 12134 "configure"
12134 #include "confdefs.h"
12135 /* pthread test headers */
12136 #include <pthread.h>
12137 #if HAVE_PTHREADS < 7
12138 #include <errno.h>
12139 #endif
12140 #ifndef NULL
12141 #define NULL (void*)0
12142 #endif
12143
12144 static void *task(p)
12145         void *p;
12146 {
12147         return (void *) (p == NULL);
12148 }
12149
12150 int main() {
12151
12152         /* pthread test function */
12153 #ifndef PTHREAD_CREATE_DETACHED
12154 #define PTHREAD_CREATE_DETACHED 1
12155 #endif
12156         pthread_t t;
12157         int status;
12158         int detach = PTHREAD_CREATE_DETACHED;
12159
12160 #if HAVE_PTHREADS > 4
12161         /* Final pthreads */
12162         pthread_attr_t attr;
12163
12164         status = pthread_attr_init(&attr);
12165         if( status ) return status;
12166
12167 #if HAVE_PTHREADS < 7
12168         status = pthread_attr_setdetachstate(&attr, &detach);
12169         if( status < 0 ) status = errno;
12170 #else
12171         status = pthread_attr_setdetachstate(&attr, detach);
12172 #endif
12173         if( status ) return status;
12174         status = pthread_create( &t, &attr, task, NULL );
12175 #if HAVE_PTHREADS < 7
12176         if( status < 0 ) status = errno;
12177 #endif
12178         if( status ) return status;
12179 #else
12180         /* Draft 4 pthreads */
12181         status = pthread_create( &t, pthread_attr_default, task, NULL );
12182         if( status ) return errno;
12183
12184         /* give thread a chance to complete */
12185         /* it should remain joinable and hence detachable */
12186         sleep( 1 );
12187
12188         status = pthread_detach( &t );
12189         if( status ) return errno;
12190 #endif
12191
12192 #ifdef HAVE_LINUX_THREADS
12193         pthread_kill_other_threads_np();
12194 #endif
12195
12196         return 0;
12197
12198 ; return 0; }
12199 EOF
12200 if { (eval echo configure:12201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12201   rm -rf conftest*
12202   ol_cv_pthread_pthreads=yes
12203 else
12204   echo "configure: failed program was:" >&5
12205   cat conftest.$ac_ext >&5
12206   rm -rf conftest*
12207   ol_cv_pthread_pthreads=no
12208 fi
12209 rm -f conftest*
12210 else
12211   cat > conftest.$ac_ext <<EOF
12212 #line 12213 "configure"
12213 #include "confdefs.h"
12214 /* pthread test headers */
12215 #include <pthread.h>
12216 #if HAVE_PTHREADS < 7
12217 #include <errno.h>
12218 #endif
12219 #ifndef NULL
12220 #define NULL (void*)0
12221 #endif
12222
12223 static void *task(p)
12224         void *p;
12225 {
12226         return (void *) (p == NULL);
12227 }
12228
12229
12230 int main(argc, argv)
12231         int argc;
12232         char **argv;
12233 {
12234
12235         /* pthread test function */
12236 #ifndef PTHREAD_CREATE_DETACHED
12237 #define PTHREAD_CREATE_DETACHED 1
12238 #endif
12239         pthread_t t;
12240         int status;
12241         int detach = PTHREAD_CREATE_DETACHED;
12242
12243 #if HAVE_PTHREADS > 4
12244         /* Final pthreads */
12245         pthread_attr_t attr;
12246
12247         status = pthread_attr_init(&attr);
12248         if( status ) return status;
12249
12250 #if HAVE_PTHREADS < 7
12251         status = pthread_attr_setdetachstate(&attr, &detach);
12252         if( status < 0 ) status = errno;
12253 #else
12254         status = pthread_attr_setdetachstate(&attr, detach);
12255 #endif
12256         if( status ) return status;
12257         status = pthread_create( &t, &attr, task, NULL );
12258 #if HAVE_PTHREADS < 7
12259         if( status < 0 ) status = errno;
12260 #endif
12261         if( status ) return status;
12262 #else
12263         /* Draft 4 pthreads */
12264         status = pthread_create( &t, pthread_attr_default, task, NULL );
12265         if( status ) return errno;
12266
12267         /* give thread a chance to complete */
12268         /* it should remain joinable and hence detachable */
12269         sleep( 1 );
12270
12271         status = pthread_detach( &t );
12272         if( status ) return errno;
12273 #endif
12274
12275 #ifdef HAVE_LINUX_THREADS
12276         pthread_kill_other_threads_np();
12277 #endif
12278
12279         return 0;
12280
12281 }
12282
12283 EOF
12284 if { (eval echo configure:12285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12285 then
12286   ol_cv_pthread_pthreads=yes
12287 else
12288   echo "configure: failed program was:" >&5
12289   cat conftest.$ac_ext >&5
12290   rm -fr conftest*
12291   ol_cv_pthread_pthreads=no
12292 fi
12293 rm -fr conftest*
12294 fi
12295
12296
12297                 # restore the LIBS
12298                 LIBS="$ol_LIBS"
12299         
12300 fi
12301
12302 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12303
12304         if test $ol_cv_pthread_pthreads = yes ; then
12305                 ol_link_pthreads="-pthreads"
12306                 ol_link_threads=posix
12307         fi
12308 fi
12309
12310                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12311 if test "$ol_link_threads" = no ; then
12312         # try -mthreads
12313         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12314 echo "configure:12315: checking for pthread link with -mthreads" >&5
12315 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12316   echo $ac_n "(cached) $ac_c" 1>&6
12317 else
12318   
12319                 # save the flags
12320                 ol_LIBS="$LIBS"
12321                 LIBS="-mthreads $LIBS"
12322
12323                 if test "$cross_compiling" = yes; then
12324   cat > conftest.$ac_ext <<EOF
12325 #line 12326 "configure"
12326 #include "confdefs.h"
12327 /* pthread test headers */
12328 #include <pthread.h>
12329 #if HAVE_PTHREADS < 7
12330 #include <errno.h>
12331 #endif
12332 #ifndef NULL
12333 #define NULL (void*)0
12334 #endif
12335
12336 static void *task(p)
12337         void *p;
12338 {
12339         return (void *) (p == NULL);
12340 }
12341
12342 int main() {
12343
12344         /* pthread test function */
12345 #ifndef PTHREAD_CREATE_DETACHED
12346 #define PTHREAD_CREATE_DETACHED 1
12347 #endif
12348         pthread_t t;
12349         int status;
12350         int detach = PTHREAD_CREATE_DETACHED;
12351
12352 #if HAVE_PTHREADS > 4
12353         /* Final pthreads */
12354         pthread_attr_t attr;
12355
12356         status = pthread_attr_init(&attr);
12357         if( status ) return status;
12358
12359 #if HAVE_PTHREADS < 7
12360         status = pthread_attr_setdetachstate(&attr, &detach);
12361         if( status < 0 ) status = errno;
12362 #else
12363         status = pthread_attr_setdetachstate(&attr, detach);
12364 #endif
12365         if( status ) return status;
12366         status = pthread_create( &t, &attr, task, NULL );
12367 #if HAVE_PTHREADS < 7
12368         if( status < 0 ) status = errno;
12369 #endif
12370         if( status ) return status;
12371 #else
12372         /* Draft 4 pthreads */
12373         status = pthread_create( &t, pthread_attr_default, task, NULL );
12374         if( status ) return errno;
12375
12376         /* give thread a chance to complete */
12377         /* it should remain joinable and hence detachable */
12378         sleep( 1 );
12379
12380         status = pthread_detach( &t );
12381         if( status ) return errno;
12382 #endif
12383
12384 #ifdef HAVE_LINUX_THREADS
12385         pthread_kill_other_threads_np();
12386 #endif
12387
12388         return 0;
12389
12390 ; return 0; }
12391 EOF
12392 if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12393   rm -rf conftest*
12394   ol_cv_pthread_mthreads=yes
12395 else
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   ol_cv_pthread_mthreads=no
12400 fi
12401 rm -f conftest*
12402 else
12403   cat > conftest.$ac_ext <<EOF
12404 #line 12405 "configure"
12405 #include "confdefs.h"
12406 /* pthread test headers */
12407 #include <pthread.h>
12408 #if HAVE_PTHREADS < 7
12409 #include <errno.h>
12410 #endif
12411 #ifndef NULL
12412 #define NULL (void*)0
12413 #endif
12414
12415 static void *task(p)
12416         void *p;
12417 {
12418         return (void *) (p == NULL);
12419 }
12420
12421
12422 int main(argc, argv)
12423         int argc;
12424         char **argv;
12425 {
12426
12427         /* pthread test function */
12428 #ifndef PTHREAD_CREATE_DETACHED
12429 #define PTHREAD_CREATE_DETACHED 1
12430 #endif
12431         pthread_t t;
12432         int status;
12433         int detach = PTHREAD_CREATE_DETACHED;
12434
12435 #if HAVE_PTHREADS > 4
12436         /* Final pthreads */
12437         pthread_attr_t attr;
12438
12439         status = pthread_attr_init(&attr);
12440         if( status ) return status;
12441
12442 #if HAVE_PTHREADS < 7
12443         status = pthread_attr_setdetachstate(&attr, &detach);
12444         if( status < 0 ) status = errno;
12445 #else
12446         status = pthread_attr_setdetachstate(&attr, detach);
12447 #endif
12448         if( status ) return status;
12449         status = pthread_create( &t, &attr, task, NULL );
12450 #if HAVE_PTHREADS < 7
12451         if( status < 0 ) status = errno;
12452 #endif
12453         if( status ) return status;
12454 #else
12455         /* Draft 4 pthreads */
12456         status = pthread_create( &t, pthread_attr_default, task, NULL );
12457         if( status ) return errno;
12458
12459         /* give thread a chance to complete */
12460         /* it should remain joinable and hence detachable */
12461         sleep( 1 );
12462
12463         status = pthread_detach( &t );
12464         if( status ) return errno;
12465 #endif
12466
12467 #ifdef HAVE_LINUX_THREADS
12468         pthread_kill_other_threads_np();
12469 #endif
12470
12471         return 0;
12472
12473 }
12474
12475 EOF
12476 if { (eval echo configure:12477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12477 then
12478   ol_cv_pthread_mthreads=yes
12479 else
12480   echo "configure: failed program was:" >&5
12481   cat conftest.$ac_ext >&5
12482   rm -fr conftest*
12483   ol_cv_pthread_mthreads=no
12484 fi
12485 rm -fr conftest*
12486 fi
12487
12488
12489                 # restore the LIBS
12490                 LIBS="$ol_LIBS"
12491         
12492 fi
12493
12494 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12495
12496         if test $ol_cv_pthread_mthreads = yes ; then
12497                 ol_link_pthreads="-mthreads"
12498                 ol_link_threads=posix
12499         fi
12500 fi
12501
12502                 # Pthread try link: -thread (ol_cv_pthread_thread)
12503 if test "$ol_link_threads" = no ; then
12504         # try -thread
12505         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12506 echo "configure:12507: checking for pthread link with -thread" >&5
12507 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12508   echo $ac_n "(cached) $ac_c" 1>&6
12509 else
12510   
12511                 # save the flags
12512                 ol_LIBS="$LIBS"
12513                 LIBS="-thread $LIBS"
12514
12515                 if test "$cross_compiling" = yes; then
12516   cat > conftest.$ac_ext <<EOF
12517 #line 12518 "configure"
12518 #include "confdefs.h"
12519 /* pthread test headers */
12520 #include <pthread.h>
12521 #if HAVE_PTHREADS < 7
12522 #include <errno.h>
12523 #endif
12524 #ifndef NULL
12525 #define NULL (void*)0
12526 #endif
12527
12528 static void *task(p)
12529         void *p;
12530 {
12531         return (void *) (p == NULL);
12532 }
12533
12534 int main() {
12535
12536         /* pthread test function */
12537 #ifndef PTHREAD_CREATE_DETACHED
12538 #define PTHREAD_CREATE_DETACHED 1
12539 #endif
12540         pthread_t t;
12541         int status;
12542         int detach = PTHREAD_CREATE_DETACHED;
12543
12544 #if HAVE_PTHREADS > 4
12545         /* Final pthreads */
12546         pthread_attr_t attr;
12547
12548         status = pthread_attr_init(&attr);
12549         if( status ) return status;
12550
12551 #if HAVE_PTHREADS < 7
12552         status = pthread_attr_setdetachstate(&attr, &detach);
12553         if( status < 0 ) status = errno;
12554 #else
12555         status = pthread_attr_setdetachstate(&attr, detach);
12556 #endif
12557         if( status ) return status;
12558         status = pthread_create( &t, &attr, task, NULL );
12559 #if HAVE_PTHREADS < 7
12560         if( status < 0 ) status = errno;
12561 #endif
12562         if( status ) return status;
12563 #else
12564         /* Draft 4 pthreads */
12565         status = pthread_create( &t, pthread_attr_default, task, NULL );
12566         if( status ) return errno;
12567
12568         /* give thread a chance to complete */
12569         /* it should remain joinable and hence detachable */
12570         sleep( 1 );
12571
12572         status = pthread_detach( &t );
12573         if( status ) return errno;
12574 #endif
12575
12576 #ifdef HAVE_LINUX_THREADS
12577         pthread_kill_other_threads_np();
12578 #endif
12579
12580         return 0;
12581
12582 ; return 0; }
12583 EOF
12584 if { (eval echo configure:12585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12585   rm -rf conftest*
12586   ol_cv_pthread_thread=yes
12587 else
12588   echo "configure: failed program was:" >&5
12589   cat conftest.$ac_ext >&5
12590   rm -rf conftest*
12591   ol_cv_pthread_thread=no
12592 fi
12593 rm -f conftest*
12594 else
12595   cat > conftest.$ac_ext <<EOF
12596 #line 12597 "configure"
12597 #include "confdefs.h"
12598 /* pthread test headers */
12599 #include <pthread.h>
12600 #if HAVE_PTHREADS < 7
12601 #include <errno.h>
12602 #endif
12603 #ifndef NULL
12604 #define NULL (void*)0
12605 #endif
12606
12607 static void *task(p)
12608         void *p;
12609 {
12610         return (void *) (p == NULL);
12611 }
12612
12613
12614 int main(argc, argv)
12615         int argc;
12616         char **argv;
12617 {
12618
12619         /* pthread test function */
12620 #ifndef PTHREAD_CREATE_DETACHED
12621 #define PTHREAD_CREATE_DETACHED 1
12622 #endif
12623         pthread_t t;
12624         int status;
12625         int detach = PTHREAD_CREATE_DETACHED;
12626
12627 #if HAVE_PTHREADS > 4
12628         /* Final pthreads */
12629         pthread_attr_t attr;
12630
12631         status = pthread_attr_init(&attr);
12632         if( status ) return status;
12633
12634 #if HAVE_PTHREADS < 7
12635         status = pthread_attr_setdetachstate(&attr, &detach);
12636         if( status < 0 ) status = errno;
12637 #else
12638         status = pthread_attr_setdetachstate(&attr, detach);
12639 #endif
12640         if( status ) return status;
12641         status = pthread_create( &t, &attr, task, NULL );
12642 #if HAVE_PTHREADS < 7
12643         if( status < 0 ) status = errno;
12644 #endif
12645         if( status ) return status;
12646 #else
12647         /* Draft 4 pthreads */
12648         status = pthread_create( &t, pthread_attr_default, task, NULL );
12649         if( status ) return errno;
12650
12651         /* give thread a chance to complete */
12652         /* it should remain joinable and hence detachable */
12653         sleep( 1 );
12654
12655         status = pthread_detach( &t );
12656         if( status ) return errno;
12657 #endif
12658
12659 #ifdef HAVE_LINUX_THREADS
12660         pthread_kill_other_threads_np();
12661 #endif
12662
12663         return 0;
12664
12665 }
12666
12667 EOF
12668 if { (eval echo configure:12669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12669 then
12670   ol_cv_pthread_thread=yes
12671 else
12672   echo "configure: failed program was:" >&5
12673   cat conftest.$ac_ext >&5
12674   rm -fr conftest*
12675   ol_cv_pthread_thread=no
12676 fi
12677 rm -fr conftest*
12678 fi
12679
12680
12681                 # restore the LIBS
12682                 LIBS="$ol_LIBS"
12683         
12684 fi
12685
12686 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12687
12688         if test $ol_cv_pthread_thread = yes ; then
12689                 ol_link_pthreads="-thread"
12690                 ol_link_threads=posix
12691         fi
12692 fi
12693
12694
12695                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12696 if test "$ol_link_threads" = no ; then
12697         # try -lpthread -lmach -lexc -lc_r
12698         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12699 echo "configure:12700: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12700 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12701   echo $ac_n "(cached) $ac_c" 1>&6
12702 else
12703   
12704                 # save the flags
12705                 ol_LIBS="$LIBS"
12706                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12707
12708                 if test "$cross_compiling" = yes; then
12709   cat > conftest.$ac_ext <<EOF
12710 #line 12711 "configure"
12711 #include "confdefs.h"
12712 /* pthread test headers */
12713 #include <pthread.h>
12714 #if HAVE_PTHREADS < 7
12715 #include <errno.h>
12716 #endif
12717 #ifndef NULL
12718 #define NULL (void*)0
12719 #endif
12720
12721 static void *task(p)
12722         void *p;
12723 {
12724         return (void *) (p == NULL);
12725 }
12726
12727 int main() {
12728
12729         /* pthread test function */
12730 #ifndef PTHREAD_CREATE_DETACHED
12731 #define PTHREAD_CREATE_DETACHED 1
12732 #endif
12733         pthread_t t;
12734         int status;
12735         int detach = PTHREAD_CREATE_DETACHED;
12736
12737 #if HAVE_PTHREADS > 4
12738         /* Final pthreads */
12739         pthread_attr_t attr;
12740
12741         status = pthread_attr_init(&attr);
12742         if( status ) return status;
12743
12744 #if HAVE_PTHREADS < 7
12745         status = pthread_attr_setdetachstate(&attr, &detach);
12746         if( status < 0 ) status = errno;
12747 #else
12748         status = pthread_attr_setdetachstate(&attr, detach);
12749 #endif
12750         if( status ) return status;
12751         status = pthread_create( &t, &attr, task, NULL );
12752 #if HAVE_PTHREADS < 7
12753         if( status < 0 ) status = errno;
12754 #endif
12755         if( status ) return status;
12756 #else
12757         /* Draft 4 pthreads */
12758         status = pthread_create( &t, pthread_attr_default, task, NULL );
12759         if( status ) return errno;
12760
12761         /* give thread a chance to complete */
12762         /* it should remain joinable and hence detachable */
12763         sleep( 1 );
12764
12765         status = pthread_detach( &t );
12766         if( status ) return errno;
12767 #endif
12768
12769 #ifdef HAVE_LINUX_THREADS
12770         pthread_kill_other_threads_np();
12771 #endif
12772
12773         return 0;
12774
12775 ; return 0; }
12776 EOF
12777 if { (eval echo configure:12778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12778   rm -rf conftest*
12779   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12780 else
12781   echo "configure: failed program was:" >&5
12782   cat conftest.$ac_ext >&5
12783   rm -rf conftest*
12784   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12785 fi
12786 rm -f conftest*
12787 else
12788   cat > conftest.$ac_ext <<EOF
12789 #line 12790 "configure"
12790 #include "confdefs.h"
12791 /* pthread test headers */
12792 #include <pthread.h>
12793 #if HAVE_PTHREADS < 7
12794 #include <errno.h>
12795 #endif
12796 #ifndef NULL
12797 #define NULL (void*)0
12798 #endif
12799
12800 static void *task(p)
12801         void *p;
12802 {
12803         return (void *) (p == NULL);
12804 }
12805
12806
12807 int main(argc, argv)
12808         int argc;
12809         char **argv;
12810 {
12811
12812         /* pthread test function */
12813 #ifndef PTHREAD_CREATE_DETACHED
12814 #define PTHREAD_CREATE_DETACHED 1
12815 #endif
12816         pthread_t t;
12817         int status;
12818         int detach = PTHREAD_CREATE_DETACHED;
12819
12820 #if HAVE_PTHREADS > 4
12821         /* Final pthreads */
12822         pthread_attr_t attr;
12823
12824         status = pthread_attr_init(&attr);
12825         if( status ) return status;
12826
12827 #if HAVE_PTHREADS < 7
12828         status = pthread_attr_setdetachstate(&attr, &detach);
12829         if( status < 0 ) status = errno;
12830 #else
12831         status = pthread_attr_setdetachstate(&attr, detach);
12832 #endif
12833         if( status ) return status;
12834         status = pthread_create( &t, &attr, task, NULL );
12835 #if HAVE_PTHREADS < 7
12836         if( status < 0 ) status = errno;
12837 #endif
12838         if( status ) return status;
12839 #else
12840         /* Draft 4 pthreads */
12841         status = pthread_create( &t, pthread_attr_default, task, NULL );
12842         if( status ) return errno;
12843
12844         /* give thread a chance to complete */
12845         /* it should remain joinable and hence detachable */
12846         sleep( 1 );
12847
12848         status = pthread_detach( &t );
12849         if( status ) return errno;
12850 #endif
12851
12852 #ifdef HAVE_LINUX_THREADS
12853         pthread_kill_other_threads_np();
12854 #endif
12855
12856         return 0;
12857
12858 }
12859
12860 EOF
12861 if { (eval echo configure:12862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12862 then
12863   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12864 else
12865   echo "configure: failed program was:" >&5
12866   cat conftest.$ac_ext >&5
12867   rm -fr conftest*
12868   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12869 fi
12870 rm -fr conftest*
12871 fi
12872
12873
12874                 # restore the LIBS
12875                 LIBS="$ol_LIBS"
12876         
12877 fi
12878
12879 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12880
12881         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12882                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12883                 ol_link_threads=posix
12884         fi
12885 fi
12886
12887                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12888 if test "$ol_link_threads" = no ; then
12889         # try -lpthread -lmach -lexc
12890         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12891 echo "configure:12892: checking for pthread link with -lpthread -lmach -lexc" >&5
12892 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12893   echo $ac_n "(cached) $ac_c" 1>&6
12894 else
12895   
12896                 # save the flags
12897                 ol_LIBS="$LIBS"
12898                 LIBS="-lpthread -lmach -lexc $LIBS"
12899
12900                 if test "$cross_compiling" = yes; then
12901   cat > conftest.$ac_ext <<EOF
12902 #line 12903 "configure"
12903 #include "confdefs.h"
12904 /* pthread test headers */
12905 #include <pthread.h>
12906 #if HAVE_PTHREADS < 7
12907 #include <errno.h>
12908 #endif
12909 #ifndef NULL
12910 #define NULL (void*)0
12911 #endif
12912
12913 static void *task(p)
12914         void *p;
12915 {
12916         return (void *) (p == NULL);
12917 }
12918
12919 int main() {
12920
12921         /* pthread test function */
12922 #ifndef PTHREAD_CREATE_DETACHED
12923 #define PTHREAD_CREATE_DETACHED 1
12924 #endif
12925         pthread_t t;
12926         int status;
12927         int detach = PTHREAD_CREATE_DETACHED;
12928
12929 #if HAVE_PTHREADS > 4
12930         /* Final pthreads */
12931         pthread_attr_t attr;
12932
12933         status = pthread_attr_init(&attr);
12934         if( status ) return status;
12935
12936 #if HAVE_PTHREADS < 7
12937         status = pthread_attr_setdetachstate(&attr, &detach);
12938         if( status < 0 ) status = errno;
12939 #else
12940         status = pthread_attr_setdetachstate(&attr, detach);
12941 #endif
12942         if( status ) return status;
12943         status = pthread_create( &t, &attr, task, NULL );
12944 #if HAVE_PTHREADS < 7
12945         if( status < 0 ) status = errno;
12946 #endif
12947         if( status ) return status;
12948 #else
12949         /* Draft 4 pthreads */
12950         status = pthread_create( &t, pthread_attr_default, task, NULL );
12951         if( status ) return errno;
12952
12953         /* give thread a chance to complete */
12954         /* it should remain joinable and hence detachable */
12955         sleep( 1 );
12956
12957         status = pthread_detach( &t );
12958         if( status ) return errno;
12959 #endif
12960
12961 #ifdef HAVE_LINUX_THREADS
12962         pthread_kill_other_threads_np();
12963 #endif
12964
12965         return 0;
12966
12967 ; return 0; }
12968 EOF
12969 if { (eval echo configure:12970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12970   rm -rf conftest*
12971   ol_cv_pthread_lpthread_lmach_lexc=yes
12972 else
12973   echo "configure: failed program was:" >&5
12974   cat conftest.$ac_ext >&5
12975   rm -rf conftest*
12976   ol_cv_pthread_lpthread_lmach_lexc=no
12977 fi
12978 rm -f conftest*
12979 else
12980   cat > conftest.$ac_ext <<EOF
12981 #line 12982 "configure"
12982 #include "confdefs.h"
12983 /* pthread test headers */
12984 #include <pthread.h>
12985 #if HAVE_PTHREADS < 7
12986 #include <errno.h>
12987 #endif
12988 #ifndef NULL
12989 #define NULL (void*)0
12990 #endif
12991
12992 static void *task(p)
12993         void *p;
12994 {
12995         return (void *) (p == NULL);
12996 }
12997
12998
12999 int main(argc, argv)
13000         int argc;
13001         char **argv;
13002 {
13003
13004         /* pthread test function */
13005 #ifndef PTHREAD_CREATE_DETACHED
13006 #define PTHREAD_CREATE_DETACHED 1
13007 #endif
13008         pthread_t t;
13009         int status;
13010         int detach = PTHREAD_CREATE_DETACHED;
13011
13012 #if HAVE_PTHREADS > 4
13013         /* Final pthreads */
13014         pthread_attr_t attr;
13015
13016         status = pthread_attr_init(&attr);
13017         if( status ) return status;
13018
13019 #if HAVE_PTHREADS < 7
13020         status = pthread_attr_setdetachstate(&attr, &detach);
13021         if( status < 0 ) status = errno;
13022 #else
13023         status = pthread_attr_setdetachstate(&attr, detach);
13024 #endif
13025         if( status ) return status;
13026         status = pthread_create( &t, &attr, task, NULL );
13027 #if HAVE_PTHREADS < 7
13028         if( status < 0 ) status = errno;
13029 #endif
13030         if( status ) return status;
13031 #else
13032         /* Draft 4 pthreads */
13033         status = pthread_create( &t, pthread_attr_default, task, NULL );
13034         if( status ) return errno;
13035
13036         /* give thread a chance to complete */
13037         /* it should remain joinable and hence detachable */
13038         sleep( 1 );
13039
13040         status = pthread_detach( &t );
13041         if( status ) return errno;
13042 #endif
13043
13044 #ifdef HAVE_LINUX_THREADS
13045         pthread_kill_other_threads_np();
13046 #endif
13047
13048         return 0;
13049
13050 }
13051
13052 EOF
13053 if { (eval echo configure:13054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13054 then
13055   ol_cv_pthread_lpthread_lmach_lexc=yes
13056 else
13057   echo "configure: failed program was:" >&5
13058   cat conftest.$ac_ext >&5
13059   rm -fr conftest*
13060   ol_cv_pthread_lpthread_lmach_lexc=no
13061 fi
13062 rm -fr conftest*
13063 fi
13064
13065
13066                 # restore the LIBS
13067                 LIBS="$ol_LIBS"
13068         
13069 fi
13070
13071 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13072
13073         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13074                 ol_link_pthreads="-lpthread -lmach -lexc"
13075                 ol_link_threads=posix
13076         fi
13077 fi
13078
13079
13080                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13081 if test "$ol_link_threads" = no ; then
13082         # try -lpthread -Wl,-woff,85
13083         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13084 echo "configure:13085: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13085 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13086   echo $ac_n "(cached) $ac_c" 1>&6
13087 else
13088   
13089                 # save the flags
13090                 ol_LIBS="$LIBS"
13091                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13092
13093                 if test "$cross_compiling" = yes; then
13094   cat > conftest.$ac_ext <<EOF
13095 #line 13096 "configure"
13096 #include "confdefs.h"
13097 /* pthread test headers */
13098 #include <pthread.h>
13099 #if HAVE_PTHREADS < 7
13100 #include <errno.h>
13101 #endif
13102 #ifndef NULL
13103 #define NULL (void*)0
13104 #endif
13105
13106 static void *task(p)
13107         void *p;
13108 {
13109         return (void *) (p == NULL);
13110 }
13111
13112 int main() {
13113
13114         /* pthread test function */
13115 #ifndef PTHREAD_CREATE_DETACHED
13116 #define PTHREAD_CREATE_DETACHED 1
13117 #endif
13118         pthread_t t;
13119         int status;
13120         int detach = PTHREAD_CREATE_DETACHED;
13121
13122 #if HAVE_PTHREADS > 4
13123         /* Final pthreads */
13124         pthread_attr_t attr;
13125
13126         status = pthread_attr_init(&attr);
13127         if( status ) return status;
13128
13129 #if HAVE_PTHREADS < 7
13130         status = pthread_attr_setdetachstate(&attr, &detach);
13131         if( status < 0 ) status = errno;
13132 #else
13133         status = pthread_attr_setdetachstate(&attr, detach);
13134 #endif
13135         if( status ) return status;
13136         status = pthread_create( &t, &attr, task, NULL );
13137 #if HAVE_PTHREADS < 7
13138         if( status < 0 ) status = errno;
13139 #endif
13140         if( status ) return status;
13141 #else
13142         /* Draft 4 pthreads */
13143         status = pthread_create( &t, pthread_attr_default, task, NULL );
13144         if( status ) return errno;
13145
13146         /* give thread a chance to complete */
13147         /* it should remain joinable and hence detachable */
13148         sleep( 1 );
13149
13150         status = pthread_detach( &t );
13151         if( status ) return errno;
13152 #endif
13153
13154 #ifdef HAVE_LINUX_THREADS
13155         pthread_kill_other_threads_np();
13156 #endif
13157
13158         return 0;
13159
13160 ; return 0; }
13161 EOF
13162 if { (eval echo configure:13163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13163   rm -rf conftest*
13164   ol_cv_pthread_lib_lpthread_woff=yes
13165 else
13166   echo "configure: failed program was:" >&5
13167   cat conftest.$ac_ext >&5
13168   rm -rf conftest*
13169   ol_cv_pthread_lib_lpthread_woff=no
13170 fi
13171 rm -f conftest*
13172 else
13173   cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 /* pthread test headers */
13177 #include <pthread.h>
13178 #if HAVE_PTHREADS < 7
13179 #include <errno.h>
13180 #endif
13181 #ifndef NULL
13182 #define NULL (void*)0
13183 #endif
13184
13185 static void *task(p)
13186         void *p;
13187 {
13188         return (void *) (p == NULL);
13189 }
13190
13191
13192 int main(argc, argv)
13193         int argc;
13194         char **argv;
13195 {
13196
13197         /* pthread test function */
13198 #ifndef PTHREAD_CREATE_DETACHED
13199 #define PTHREAD_CREATE_DETACHED 1
13200 #endif
13201         pthread_t t;
13202         int status;
13203         int detach = PTHREAD_CREATE_DETACHED;
13204
13205 #if HAVE_PTHREADS > 4
13206         /* Final pthreads */
13207         pthread_attr_t attr;
13208
13209         status = pthread_attr_init(&attr);
13210         if( status ) return status;
13211
13212 #if HAVE_PTHREADS < 7
13213         status = pthread_attr_setdetachstate(&attr, &detach);
13214         if( status < 0 ) status = errno;
13215 #else
13216         status = pthread_attr_setdetachstate(&attr, detach);
13217 #endif
13218         if( status ) return status;
13219         status = pthread_create( &t, &attr, task, NULL );
13220 #if HAVE_PTHREADS < 7
13221         if( status < 0 ) status = errno;
13222 #endif
13223         if( status ) return status;
13224 #else
13225         /* Draft 4 pthreads */
13226         status = pthread_create( &t, pthread_attr_default, task, NULL );
13227         if( status ) return errno;
13228
13229         /* give thread a chance to complete */
13230         /* it should remain joinable and hence detachable */
13231         sleep( 1 );
13232
13233         status = pthread_detach( &t );
13234         if( status ) return errno;
13235 #endif
13236
13237 #ifdef HAVE_LINUX_THREADS
13238         pthread_kill_other_threads_np();
13239 #endif
13240
13241         return 0;
13242
13243 }
13244
13245 EOF
13246 if { (eval echo configure:13247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13247 then
13248   ol_cv_pthread_lib_lpthread_woff=yes
13249 else
13250   echo "configure: failed program was:" >&5
13251   cat conftest.$ac_ext >&5
13252   rm -fr conftest*
13253   ol_cv_pthread_lib_lpthread_woff=no
13254 fi
13255 rm -fr conftest*
13256 fi
13257
13258
13259                 # restore the LIBS
13260                 LIBS="$ol_LIBS"
13261         
13262 fi
13263
13264 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13265
13266         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13267                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13268                 ol_link_threads=posix
13269         fi
13270 fi
13271
13272
13273                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13274 if test "$ol_link_threads" = no ; then
13275         # try -lpthread
13276         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13277 echo "configure:13278: checking for pthread link with -lpthread" >&5
13278 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13279   echo $ac_n "(cached) $ac_c" 1>&6
13280 else
13281   
13282                 # save the flags
13283                 ol_LIBS="$LIBS"
13284                 LIBS="-lpthread $LIBS"
13285
13286                 if test "$cross_compiling" = yes; then
13287   cat > conftest.$ac_ext <<EOF
13288 #line 13289 "configure"
13289 #include "confdefs.h"
13290 /* pthread test headers */
13291 #include <pthread.h>
13292 #if HAVE_PTHREADS < 7
13293 #include <errno.h>
13294 #endif
13295 #ifndef NULL
13296 #define NULL (void*)0
13297 #endif
13298
13299 static void *task(p)
13300         void *p;
13301 {
13302         return (void *) (p == NULL);
13303 }
13304
13305 int main() {
13306
13307         /* pthread test function */
13308 #ifndef PTHREAD_CREATE_DETACHED
13309 #define PTHREAD_CREATE_DETACHED 1
13310 #endif
13311         pthread_t t;
13312         int status;
13313         int detach = PTHREAD_CREATE_DETACHED;
13314
13315 #if HAVE_PTHREADS > 4
13316         /* Final pthreads */
13317         pthread_attr_t attr;
13318
13319         status = pthread_attr_init(&attr);
13320         if( status ) return status;
13321
13322 #if HAVE_PTHREADS < 7
13323         status = pthread_attr_setdetachstate(&attr, &detach);
13324         if( status < 0 ) status = errno;
13325 #else
13326         status = pthread_attr_setdetachstate(&attr, detach);
13327 #endif
13328         if( status ) return status;
13329         status = pthread_create( &t, &attr, task, NULL );
13330 #if HAVE_PTHREADS < 7
13331         if( status < 0 ) status = errno;
13332 #endif
13333         if( status ) return status;
13334 #else
13335         /* Draft 4 pthreads */
13336         status = pthread_create( &t, pthread_attr_default, task, NULL );
13337         if( status ) return errno;
13338
13339         /* give thread a chance to complete */
13340         /* it should remain joinable and hence detachable */
13341         sleep( 1 );
13342
13343         status = pthread_detach( &t );
13344         if( status ) return errno;
13345 #endif
13346
13347 #ifdef HAVE_LINUX_THREADS
13348         pthread_kill_other_threads_np();
13349 #endif
13350
13351         return 0;
13352
13353 ; return 0; }
13354 EOF
13355 if { (eval echo configure:13356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13356   rm -rf conftest*
13357   ol_cv_pthread_lpthread=yes
13358 else
13359   echo "configure: failed program was:" >&5
13360   cat conftest.$ac_ext >&5
13361   rm -rf conftest*
13362   ol_cv_pthread_lpthread=no
13363 fi
13364 rm -f conftest*
13365 else
13366   cat > conftest.$ac_ext <<EOF
13367 #line 13368 "configure"
13368 #include "confdefs.h"
13369 /* pthread test headers */
13370 #include <pthread.h>
13371 #if HAVE_PTHREADS < 7
13372 #include <errno.h>
13373 #endif
13374 #ifndef NULL
13375 #define NULL (void*)0
13376 #endif
13377
13378 static void *task(p)
13379         void *p;
13380 {
13381         return (void *) (p == NULL);
13382 }
13383
13384
13385 int main(argc, argv)
13386         int argc;
13387         char **argv;
13388 {
13389
13390         /* pthread test function */
13391 #ifndef PTHREAD_CREATE_DETACHED
13392 #define PTHREAD_CREATE_DETACHED 1
13393 #endif
13394         pthread_t t;
13395         int status;
13396         int detach = PTHREAD_CREATE_DETACHED;
13397
13398 #if HAVE_PTHREADS > 4
13399         /* Final pthreads */
13400         pthread_attr_t attr;
13401
13402         status = pthread_attr_init(&attr);
13403         if( status ) return status;
13404
13405 #if HAVE_PTHREADS < 7
13406         status = pthread_attr_setdetachstate(&attr, &detach);
13407         if( status < 0 ) status = errno;
13408 #else
13409         status = pthread_attr_setdetachstate(&attr, detach);
13410 #endif
13411         if( status ) return status;
13412         status = pthread_create( &t, &attr, task, NULL );
13413 #if HAVE_PTHREADS < 7
13414         if( status < 0 ) status = errno;
13415 #endif
13416         if( status ) return status;
13417 #else
13418         /* Draft 4 pthreads */
13419         status = pthread_create( &t, pthread_attr_default, task, NULL );
13420         if( status ) return errno;
13421
13422         /* give thread a chance to complete */
13423         /* it should remain joinable and hence detachable */
13424         sleep( 1 );
13425
13426         status = pthread_detach( &t );
13427         if( status ) return errno;
13428 #endif
13429
13430 #ifdef HAVE_LINUX_THREADS
13431         pthread_kill_other_threads_np();
13432 #endif
13433
13434         return 0;
13435
13436 }
13437
13438 EOF
13439 if { (eval echo configure:13440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13440 then
13441   ol_cv_pthread_lpthread=yes
13442 else
13443   echo "configure: failed program was:" >&5
13444   cat conftest.$ac_ext >&5
13445   rm -fr conftest*
13446   ol_cv_pthread_lpthread=no
13447 fi
13448 rm -fr conftest*
13449 fi
13450
13451
13452                 # restore the LIBS
13453                 LIBS="$ol_LIBS"
13454         
13455 fi
13456
13457 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13458
13459         if test $ol_cv_pthread_lpthread = yes ; then
13460                 ol_link_pthreads="-lpthread"
13461                 ol_link_threads=posix
13462         fi
13463 fi
13464
13465                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13466 if test "$ol_link_threads" = no ; then
13467         # try -lc_r
13468         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13469 echo "configure:13470: checking for pthread link with -lc_r" >&5
13470 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13471   echo $ac_n "(cached) $ac_c" 1>&6
13472 else
13473   
13474                 # save the flags
13475                 ol_LIBS="$LIBS"
13476                 LIBS="-lc_r $LIBS"
13477
13478                 if test "$cross_compiling" = yes; then
13479   cat > conftest.$ac_ext <<EOF
13480 #line 13481 "configure"
13481 #include "confdefs.h"
13482 /* pthread test headers */
13483 #include <pthread.h>
13484 #if HAVE_PTHREADS < 7
13485 #include <errno.h>
13486 #endif
13487 #ifndef NULL
13488 #define NULL (void*)0
13489 #endif
13490
13491 static void *task(p)
13492         void *p;
13493 {
13494         return (void *) (p == NULL);
13495 }
13496
13497 int main() {
13498
13499         /* pthread test function */
13500 #ifndef PTHREAD_CREATE_DETACHED
13501 #define PTHREAD_CREATE_DETACHED 1
13502 #endif
13503         pthread_t t;
13504         int status;
13505         int detach = PTHREAD_CREATE_DETACHED;
13506
13507 #if HAVE_PTHREADS > 4
13508         /* Final pthreads */
13509         pthread_attr_t attr;
13510
13511         status = pthread_attr_init(&attr);
13512         if( status ) return status;
13513
13514 #if HAVE_PTHREADS < 7
13515         status = pthread_attr_setdetachstate(&attr, &detach);
13516         if( status < 0 ) status = errno;
13517 #else
13518         status = pthread_attr_setdetachstate(&attr, detach);
13519 #endif
13520         if( status ) return status;
13521         status = pthread_create( &t, &attr, task, NULL );
13522 #if HAVE_PTHREADS < 7
13523         if( status < 0 ) status = errno;
13524 #endif
13525         if( status ) return status;
13526 #else
13527         /* Draft 4 pthreads */
13528         status = pthread_create( &t, pthread_attr_default, task, NULL );
13529         if( status ) return errno;
13530
13531         /* give thread a chance to complete */
13532         /* it should remain joinable and hence detachable */
13533         sleep( 1 );
13534
13535         status = pthread_detach( &t );
13536         if( status ) return errno;
13537 #endif
13538
13539 #ifdef HAVE_LINUX_THREADS
13540         pthread_kill_other_threads_np();
13541 #endif
13542
13543         return 0;
13544
13545 ; return 0; }
13546 EOF
13547 if { (eval echo configure:13548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13548   rm -rf conftest*
13549   ol_cv_pthread_lc_r=yes
13550 else
13551   echo "configure: failed program was:" >&5
13552   cat conftest.$ac_ext >&5
13553   rm -rf conftest*
13554   ol_cv_pthread_lc_r=no
13555 fi
13556 rm -f conftest*
13557 else
13558   cat > conftest.$ac_ext <<EOF
13559 #line 13560 "configure"
13560 #include "confdefs.h"
13561 /* pthread test headers */
13562 #include <pthread.h>
13563 #if HAVE_PTHREADS < 7
13564 #include <errno.h>
13565 #endif
13566 #ifndef NULL
13567 #define NULL (void*)0
13568 #endif
13569
13570 static void *task(p)
13571         void *p;
13572 {
13573         return (void *) (p == NULL);
13574 }
13575
13576
13577 int main(argc, argv)
13578         int argc;
13579         char **argv;
13580 {
13581
13582         /* pthread test function */
13583 #ifndef PTHREAD_CREATE_DETACHED
13584 #define PTHREAD_CREATE_DETACHED 1
13585 #endif
13586         pthread_t t;
13587         int status;
13588         int detach = PTHREAD_CREATE_DETACHED;
13589
13590 #if HAVE_PTHREADS > 4
13591         /* Final pthreads */
13592         pthread_attr_t attr;
13593
13594         status = pthread_attr_init(&attr);
13595         if( status ) return status;
13596
13597 #if HAVE_PTHREADS < 7
13598         status = pthread_attr_setdetachstate(&attr, &detach);
13599         if( status < 0 ) status = errno;
13600 #else
13601         status = pthread_attr_setdetachstate(&attr, detach);
13602 #endif
13603         if( status ) return status;
13604         status = pthread_create( &t, &attr, task, NULL );
13605 #if HAVE_PTHREADS < 7
13606         if( status < 0 ) status = errno;
13607 #endif
13608         if( status ) return status;
13609 #else
13610         /* Draft 4 pthreads */
13611         status = pthread_create( &t, pthread_attr_default, task, NULL );
13612         if( status ) return errno;
13613
13614         /* give thread a chance to complete */
13615         /* it should remain joinable and hence detachable */
13616         sleep( 1 );
13617
13618         status = pthread_detach( &t );
13619         if( status ) return errno;
13620 #endif
13621
13622 #ifdef HAVE_LINUX_THREADS
13623         pthread_kill_other_threads_np();
13624 #endif
13625
13626         return 0;
13627
13628 }
13629
13630 EOF
13631 if { (eval echo configure:13632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13632 then
13633   ol_cv_pthread_lc_r=yes
13634 else
13635   echo "configure: failed program was:" >&5
13636   cat conftest.$ac_ext >&5
13637   rm -fr conftest*
13638   ol_cv_pthread_lc_r=no
13639 fi
13640 rm -fr conftest*
13641 fi
13642
13643
13644                 # restore the LIBS
13645                 LIBS="$ol_LIBS"
13646         
13647 fi
13648
13649 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13650
13651         if test $ol_cv_pthread_lc_r = yes ; then
13652                 ol_link_pthreads="-lc_r"
13653                 ol_link_threads=posix
13654         fi
13655 fi
13656
13657
13658                 # Pthread try link: -threads (ol_cv_pthread_threads)
13659 if test "$ol_link_threads" = no ; then
13660         # try -threads
13661         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13662 echo "configure:13663: checking for pthread link with -threads" >&5
13663 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13664   echo $ac_n "(cached) $ac_c" 1>&6
13665 else
13666   
13667                 # save the flags
13668                 ol_LIBS="$LIBS"
13669                 LIBS="-threads $LIBS"
13670
13671                 if test "$cross_compiling" = yes; then
13672   cat > conftest.$ac_ext <<EOF
13673 #line 13674 "configure"
13674 #include "confdefs.h"
13675 /* pthread test headers */
13676 #include <pthread.h>
13677 #if HAVE_PTHREADS < 7
13678 #include <errno.h>
13679 #endif
13680 #ifndef NULL
13681 #define NULL (void*)0
13682 #endif
13683
13684 static void *task(p)
13685         void *p;
13686 {
13687         return (void *) (p == NULL);
13688 }
13689
13690 int main() {
13691
13692         /* pthread test function */
13693 #ifndef PTHREAD_CREATE_DETACHED
13694 #define PTHREAD_CREATE_DETACHED 1
13695 #endif
13696         pthread_t t;
13697         int status;
13698         int detach = PTHREAD_CREATE_DETACHED;
13699
13700 #if HAVE_PTHREADS > 4
13701         /* Final pthreads */
13702         pthread_attr_t attr;
13703
13704         status = pthread_attr_init(&attr);
13705         if( status ) return status;
13706
13707 #if HAVE_PTHREADS < 7
13708         status = pthread_attr_setdetachstate(&attr, &detach);
13709         if( status < 0 ) status = errno;
13710 #else
13711         status = pthread_attr_setdetachstate(&attr, detach);
13712 #endif
13713         if( status ) return status;
13714         status = pthread_create( &t, &attr, task, NULL );
13715 #if HAVE_PTHREADS < 7
13716         if( status < 0 ) status = errno;
13717 #endif
13718         if( status ) return status;
13719 #else
13720         /* Draft 4 pthreads */
13721         status = pthread_create( &t, pthread_attr_default, task, NULL );
13722         if( status ) return errno;
13723
13724         /* give thread a chance to complete */
13725         /* it should remain joinable and hence detachable */
13726         sleep( 1 );
13727
13728         status = pthread_detach( &t );
13729         if( status ) return errno;
13730 #endif
13731
13732 #ifdef HAVE_LINUX_THREADS
13733         pthread_kill_other_threads_np();
13734 #endif
13735
13736         return 0;
13737
13738 ; return 0; }
13739 EOF
13740 if { (eval echo configure:13741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13741   rm -rf conftest*
13742   ol_cv_pthread_threads=yes
13743 else
13744   echo "configure: failed program was:" >&5
13745   cat conftest.$ac_ext >&5
13746   rm -rf conftest*
13747   ol_cv_pthread_threads=no
13748 fi
13749 rm -f conftest*
13750 else
13751   cat > conftest.$ac_ext <<EOF
13752 #line 13753 "configure"
13753 #include "confdefs.h"
13754 /* pthread test headers */
13755 #include <pthread.h>
13756 #if HAVE_PTHREADS < 7
13757 #include <errno.h>
13758 #endif
13759 #ifndef NULL
13760 #define NULL (void*)0
13761 #endif
13762
13763 static void *task(p)
13764         void *p;
13765 {
13766         return (void *) (p == NULL);
13767 }
13768
13769
13770 int main(argc, argv)
13771         int argc;
13772         char **argv;
13773 {
13774
13775         /* pthread test function */
13776 #ifndef PTHREAD_CREATE_DETACHED
13777 #define PTHREAD_CREATE_DETACHED 1
13778 #endif
13779         pthread_t t;
13780         int status;
13781         int detach = PTHREAD_CREATE_DETACHED;
13782
13783 #if HAVE_PTHREADS > 4
13784         /* Final pthreads */
13785         pthread_attr_t attr;
13786
13787         status = pthread_attr_init(&attr);
13788         if( status ) return status;
13789
13790 #if HAVE_PTHREADS < 7
13791         status = pthread_attr_setdetachstate(&attr, &detach);
13792         if( status < 0 ) status = errno;
13793 #else
13794         status = pthread_attr_setdetachstate(&attr, detach);
13795 #endif
13796         if( status ) return status;
13797         status = pthread_create( &t, &attr, task, NULL );
13798 #if HAVE_PTHREADS < 7
13799         if( status < 0 ) status = errno;
13800 #endif
13801         if( status ) return status;
13802 #else
13803         /* Draft 4 pthreads */
13804         status = pthread_create( &t, pthread_attr_default, task, NULL );
13805         if( status ) return errno;
13806
13807         /* give thread a chance to complete */
13808         /* it should remain joinable and hence detachable */
13809         sleep( 1 );
13810
13811         status = pthread_detach( &t );
13812         if( status ) return errno;
13813 #endif
13814
13815 #ifdef HAVE_LINUX_THREADS
13816         pthread_kill_other_threads_np();
13817 #endif
13818
13819         return 0;
13820
13821 }
13822
13823 EOF
13824 if { (eval echo configure:13825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13825 then
13826   ol_cv_pthread_threads=yes
13827 else
13828   echo "configure: failed program was:" >&5
13829   cat conftest.$ac_ext >&5
13830   rm -fr conftest*
13831   ol_cv_pthread_threads=no
13832 fi
13833 rm -fr conftest*
13834 fi
13835
13836
13837                 # restore the LIBS
13838                 LIBS="$ol_LIBS"
13839         
13840 fi
13841
13842 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13843
13844         if test $ol_cv_pthread_threads = yes ; then
13845                 ol_link_pthreads="-threads"
13846                 ol_link_threads=posix
13847         fi
13848 fi
13849
13850
13851                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13852 if test "$ol_link_threads" = no ; then
13853         # try -lpthreads -lmach -lexc -lc_r
13854         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13855 echo "configure:13856: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13856 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13857   echo $ac_n "(cached) $ac_c" 1>&6
13858 else
13859   
13860                 # save the flags
13861                 ol_LIBS="$LIBS"
13862                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13863
13864                 if test "$cross_compiling" = yes; then
13865   cat > conftest.$ac_ext <<EOF
13866 #line 13867 "configure"
13867 #include "confdefs.h"
13868 /* pthread test headers */
13869 #include <pthread.h>
13870 #if HAVE_PTHREADS < 7
13871 #include <errno.h>
13872 #endif
13873 #ifndef NULL
13874 #define NULL (void*)0
13875 #endif
13876
13877 static void *task(p)
13878         void *p;
13879 {
13880         return (void *) (p == NULL);
13881 }
13882
13883 int main() {
13884
13885         /* pthread test function */
13886 #ifndef PTHREAD_CREATE_DETACHED
13887 #define PTHREAD_CREATE_DETACHED 1
13888 #endif
13889         pthread_t t;
13890         int status;
13891         int detach = PTHREAD_CREATE_DETACHED;
13892
13893 #if HAVE_PTHREADS > 4
13894         /* Final pthreads */
13895         pthread_attr_t attr;
13896
13897         status = pthread_attr_init(&attr);
13898         if( status ) return status;
13899
13900 #if HAVE_PTHREADS < 7
13901         status = pthread_attr_setdetachstate(&attr, &detach);
13902         if( status < 0 ) status = errno;
13903 #else
13904         status = pthread_attr_setdetachstate(&attr, detach);
13905 #endif
13906         if( status ) return status;
13907         status = pthread_create( &t, &attr, task, NULL );
13908 #if HAVE_PTHREADS < 7
13909         if( status < 0 ) status = errno;
13910 #endif
13911         if( status ) return status;
13912 #else
13913         /* Draft 4 pthreads */
13914         status = pthread_create( &t, pthread_attr_default, task, NULL );
13915         if( status ) return errno;
13916
13917         /* give thread a chance to complete */
13918         /* it should remain joinable and hence detachable */
13919         sleep( 1 );
13920
13921         status = pthread_detach( &t );
13922         if( status ) return errno;
13923 #endif
13924
13925 #ifdef HAVE_LINUX_THREADS
13926         pthread_kill_other_threads_np();
13927 #endif
13928
13929         return 0;
13930
13931 ; return 0; }
13932 EOF
13933 if { (eval echo configure:13934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13934   rm -rf conftest*
13935   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13936 else
13937   echo "configure: failed program was:" >&5
13938   cat conftest.$ac_ext >&5
13939   rm -rf conftest*
13940   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13941 fi
13942 rm -f conftest*
13943 else
13944   cat > conftest.$ac_ext <<EOF
13945 #line 13946 "configure"
13946 #include "confdefs.h"
13947 /* pthread test headers */
13948 #include <pthread.h>
13949 #if HAVE_PTHREADS < 7
13950 #include <errno.h>
13951 #endif
13952 #ifndef NULL
13953 #define NULL (void*)0
13954 #endif
13955
13956 static void *task(p)
13957         void *p;
13958 {
13959         return (void *) (p == NULL);
13960 }
13961
13962
13963 int main(argc, argv)
13964         int argc;
13965         char **argv;
13966 {
13967
13968         /* pthread test function */
13969 #ifndef PTHREAD_CREATE_DETACHED
13970 #define PTHREAD_CREATE_DETACHED 1
13971 #endif
13972         pthread_t t;
13973         int status;
13974         int detach = PTHREAD_CREATE_DETACHED;
13975
13976 #if HAVE_PTHREADS > 4
13977         /* Final pthreads */
13978         pthread_attr_t attr;
13979
13980         status = pthread_attr_init(&attr);
13981         if( status ) return status;
13982
13983 #if HAVE_PTHREADS < 7
13984         status = pthread_attr_setdetachstate(&attr, &detach);
13985         if( status < 0 ) status = errno;
13986 #else
13987         status = pthread_attr_setdetachstate(&attr, detach);
13988 #endif
13989         if( status ) return status;
13990         status = pthread_create( &t, &attr, task, NULL );
13991 #if HAVE_PTHREADS < 7
13992         if( status < 0 ) status = errno;
13993 #endif
13994         if( status ) return status;
13995 #else
13996         /* Draft 4 pthreads */
13997         status = pthread_create( &t, pthread_attr_default, task, NULL );
13998         if( status ) return errno;
13999
14000         /* give thread a chance to complete */
14001         /* it should remain joinable and hence detachable */
14002         sleep( 1 );
14003
14004         status = pthread_detach( &t );
14005         if( status ) return errno;
14006 #endif
14007
14008 #ifdef HAVE_LINUX_THREADS
14009         pthread_kill_other_threads_np();
14010 #endif
14011
14012         return 0;
14013
14014 }
14015
14016 EOF
14017 if { (eval echo configure:14018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14018 then
14019   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14020 else
14021   echo "configure: failed program was:" >&5
14022   cat conftest.$ac_ext >&5
14023   rm -fr conftest*
14024   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14025 fi
14026 rm -fr conftest*
14027 fi
14028
14029
14030                 # restore the LIBS
14031                 LIBS="$ol_LIBS"
14032         
14033 fi
14034
14035 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14036
14037         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14038                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14039                 ol_link_threads=posix
14040         fi
14041 fi
14042
14043                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14044 if test "$ol_link_threads" = no ; then
14045         # try -lpthreads -lmach -lexc
14046         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14047 echo "configure:14048: checking for pthread link with -lpthreads -lmach -lexc" >&5
14048 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14049   echo $ac_n "(cached) $ac_c" 1>&6
14050 else
14051   
14052                 # save the flags
14053                 ol_LIBS="$LIBS"
14054                 LIBS="-lpthreads -lmach -lexc $LIBS"
14055
14056                 if test "$cross_compiling" = yes; then
14057   cat > conftest.$ac_ext <<EOF
14058 #line 14059 "configure"
14059 #include "confdefs.h"
14060 /* pthread test headers */
14061 #include <pthread.h>
14062 #if HAVE_PTHREADS < 7
14063 #include <errno.h>
14064 #endif
14065 #ifndef NULL
14066 #define NULL (void*)0
14067 #endif
14068
14069 static void *task(p)
14070         void *p;
14071 {
14072         return (void *) (p == NULL);
14073 }
14074
14075 int main() {
14076
14077         /* pthread test function */
14078 #ifndef PTHREAD_CREATE_DETACHED
14079 #define PTHREAD_CREATE_DETACHED 1
14080 #endif
14081         pthread_t t;
14082         int status;
14083         int detach = PTHREAD_CREATE_DETACHED;
14084
14085 #if HAVE_PTHREADS > 4
14086         /* Final pthreads */
14087         pthread_attr_t attr;
14088
14089         status = pthread_attr_init(&attr);
14090         if( status ) return status;
14091
14092 #if HAVE_PTHREADS < 7
14093         status = pthread_attr_setdetachstate(&attr, &detach);
14094         if( status < 0 ) status = errno;
14095 #else
14096         status = pthread_attr_setdetachstate(&attr, detach);
14097 #endif
14098         if( status ) return status;
14099         status = pthread_create( &t, &attr, task, NULL );
14100 #if HAVE_PTHREADS < 7
14101         if( status < 0 ) status = errno;
14102 #endif
14103         if( status ) return status;
14104 #else
14105         /* Draft 4 pthreads */
14106         status = pthread_create( &t, pthread_attr_default, task, NULL );
14107         if( status ) return errno;
14108
14109         /* give thread a chance to complete */
14110         /* it should remain joinable and hence detachable */
14111         sleep( 1 );
14112
14113         status = pthread_detach( &t );
14114         if( status ) return errno;
14115 #endif
14116
14117 #ifdef HAVE_LINUX_THREADS
14118         pthread_kill_other_threads_np();
14119 #endif
14120
14121         return 0;
14122
14123 ; return 0; }
14124 EOF
14125 if { (eval echo configure:14126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14126   rm -rf conftest*
14127   ol_cv_pthread_lpthreads_lmach_lexc=yes
14128 else
14129   echo "configure: failed program was:" >&5
14130   cat conftest.$ac_ext >&5
14131   rm -rf conftest*
14132   ol_cv_pthread_lpthreads_lmach_lexc=no
14133 fi
14134 rm -f conftest*
14135 else
14136   cat > conftest.$ac_ext <<EOF
14137 #line 14138 "configure"
14138 #include "confdefs.h"
14139 /* pthread test headers */
14140 #include <pthread.h>
14141 #if HAVE_PTHREADS < 7
14142 #include <errno.h>
14143 #endif
14144 #ifndef NULL
14145 #define NULL (void*)0
14146 #endif
14147
14148 static void *task(p)
14149         void *p;
14150 {
14151         return (void *) (p == NULL);
14152 }
14153
14154
14155 int main(argc, argv)
14156         int argc;
14157         char **argv;
14158 {
14159
14160         /* pthread test function */
14161 #ifndef PTHREAD_CREATE_DETACHED
14162 #define PTHREAD_CREATE_DETACHED 1
14163 #endif
14164         pthread_t t;
14165         int status;
14166         int detach = PTHREAD_CREATE_DETACHED;
14167
14168 #if HAVE_PTHREADS > 4
14169         /* Final pthreads */
14170         pthread_attr_t attr;
14171
14172         status = pthread_attr_init(&attr);
14173         if( status ) return status;
14174
14175 #if HAVE_PTHREADS < 7
14176         status = pthread_attr_setdetachstate(&attr, &detach);
14177         if( status < 0 ) status = errno;
14178 #else
14179         status = pthread_attr_setdetachstate(&attr, detach);
14180 #endif
14181         if( status ) return status;
14182         status = pthread_create( &t, &attr, task, NULL );
14183 #if HAVE_PTHREADS < 7
14184         if( status < 0 ) status = errno;
14185 #endif
14186         if( status ) return status;
14187 #else
14188         /* Draft 4 pthreads */
14189         status = pthread_create( &t, pthread_attr_default, task, NULL );
14190         if( status ) return errno;
14191
14192         /* give thread a chance to complete */
14193         /* it should remain joinable and hence detachable */
14194         sleep( 1 );
14195
14196         status = pthread_detach( &t );
14197         if( status ) return errno;
14198 #endif
14199
14200 #ifdef HAVE_LINUX_THREADS
14201         pthread_kill_other_threads_np();
14202 #endif
14203
14204         return 0;
14205
14206 }
14207
14208 EOF
14209 if { (eval echo configure:14210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14210 then
14211   ol_cv_pthread_lpthreads_lmach_lexc=yes
14212 else
14213   echo "configure: failed program was:" >&5
14214   cat conftest.$ac_ext >&5
14215   rm -fr conftest*
14216   ol_cv_pthread_lpthreads_lmach_lexc=no
14217 fi
14218 rm -fr conftest*
14219 fi
14220
14221
14222                 # restore the LIBS
14223                 LIBS="$ol_LIBS"
14224         
14225 fi
14226
14227 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14228
14229         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14230                 ol_link_pthreads="-lpthreads -lmach -lexc"
14231                 ol_link_threads=posix
14232         fi
14233 fi
14234
14235                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14236 if test "$ol_link_threads" = no ; then
14237         # try -lpthreads -lexc
14238         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14239 echo "configure:14240: checking for pthread link with -lpthreads -lexc" >&5
14240 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14241   echo $ac_n "(cached) $ac_c" 1>&6
14242 else
14243   
14244                 # save the flags
14245                 ol_LIBS="$LIBS"
14246                 LIBS="-lpthreads -lexc $LIBS"
14247
14248                 if test "$cross_compiling" = yes; then
14249   cat > conftest.$ac_ext <<EOF
14250 #line 14251 "configure"
14251 #include "confdefs.h"
14252 /* pthread test headers */
14253 #include <pthread.h>
14254 #if HAVE_PTHREADS < 7
14255 #include <errno.h>
14256 #endif
14257 #ifndef NULL
14258 #define NULL (void*)0
14259 #endif
14260
14261 static void *task(p)
14262         void *p;
14263 {
14264         return (void *) (p == NULL);
14265 }
14266
14267 int main() {
14268
14269         /* pthread test function */
14270 #ifndef PTHREAD_CREATE_DETACHED
14271 #define PTHREAD_CREATE_DETACHED 1
14272 #endif
14273         pthread_t t;
14274         int status;
14275         int detach = PTHREAD_CREATE_DETACHED;
14276
14277 #if HAVE_PTHREADS > 4
14278         /* Final pthreads */
14279         pthread_attr_t attr;
14280
14281         status = pthread_attr_init(&attr);
14282         if( status ) return status;
14283
14284 #if HAVE_PTHREADS < 7
14285         status = pthread_attr_setdetachstate(&attr, &detach);
14286         if( status < 0 ) status = errno;
14287 #else
14288         status = pthread_attr_setdetachstate(&attr, detach);
14289 #endif
14290         if( status ) return status;
14291         status = pthread_create( &t, &attr, task, NULL );
14292 #if HAVE_PTHREADS < 7
14293         if( status < 0 ) status = errno;
14294 #endif
14295         if( status ) return status;
14296 #else
14297         /* Draft 4 pthreads */
14298         status = pthread_create( &t, pthread_attr_default, task, NULL );
14299         if( status ) return errno;
14300
14301         /* give thread a chance to complete */
14302         /* it should remain joinable and hence detachable */
14303         sleep( 1 );
14304
14305         status = pthread_detach( &t );
14306         if( status ) return errno;
14307 #endif
14308
14309 #ifdef HAVE_LINUX_THREADS
14310         pthread_kill_other_threads_np();
14311 #endif
14312
14313         return 0;
14314
14315 ; return 0; }
14316 EOF
14317 if { (eval echo configure:14318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14318   rm -rf conftest*
14319   ol_cv_pthread_lpthreads_lexc=yes
14320 else
14321   echo "configure: failed program was:" >&5
14322   cat conftest.$ac_ext >&5
14323   rm -rf conftest*
14324   ol_cv_pthread_lpthreads_lexc=no
14325 fi
14326 rm -f conftest*
14327 else
14328   cat > conftest.$ac_ext <<EOF
14329 #line 14330 "configure"
14330 #include "confdefs.h"
14331 /* pthread test headers */
14332 #include <pthread.h>
14333 #if HAVE_PTHREADS < 7
14334 #include <errno.h>
14335 #endif
14336 #ifndef NULL
14337 #define NULL (void*)0
14338 #endif
14339
14340 static void *task(p)
14341         void *p;
14342 {
14343         return (void *) (p == NULL);
14344 }
14345
14346
14347 int main(argc, argv)
14348         int argc;
14349         char **argv;
14350 {
14351
14352         /* pthread test function */
14353 #ifndef PTHREAD_CREATE_DETACHED
14354 #define PTHREAD_CREATE_DETACHED 1
14355 #endif
14356         pthread_t t;
14357         int status;
14358         int detach = PTHREAD_CREATE_DETACHED;
14359
14360 #if HAVE_PTHREADS > 4
14361         /* Final pthreads */
14362         pthread_attr_t attr;
14363
14364         status = pthread_attr_init(&attr);
14365         if( status ) return status;
14366
14367 #if HAVE_PTHREADS < 7
14368         status = pthread_attr_setdetachstate(&attr, &detach);
14369         if( status < 0 ) status = errno;
14370 #else
14371         status = pthread_attr_setdetachstate(&attr, detach);
14372 #endif
14373         if( status ) return status;
14374         status = pthread_create( &t, &attr, task, NULL );
14375 #if HAVE_PTHREADS < 7
14376         if( status < 0 ) status = errno;
14377 #endif
14378         if( status ) return status;
14379 #else
14380         /* Draft 4 pthreads */
14381         status = pthread_create( &t, pthread_attr_default, task, NULL );
14382         if( status ) return errno;
14383
14384         /* give thread a chance to complete */
14385         /* it should remain joinable and hence detachable */
14386         sleep( 1 );
14387
14388         status = pthread_detach( &t );
14389         if( status ) return errno;
14390 #endif
14391
14392 #ifdef HAVE_LINUX_THREADS
14393         pthread_kill_other_threads_np();
14394 #endif
14395
14396         return 0;
14397
14398 }
14399
14400 EOF
14401 if { (eval echo configure:14402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14402 then
14403   ol_cv_pthread_lpthreads_lexc=yes
14404 else
14405   echo "configure: failed program was:" >&5
14406   cat conftest.$ac_ext >&5
14407   rm -fr conftest*
14408   ol_cv_pthread_lpthreads_lexc=no
14409 fi
14410 rm -fr conftest*
14411 fi
14412
14413
14414                 # restore the LIBS
14415                 LIBS="$ol_LIBS"
14416         
14417 fi
14418
14419 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14420
14421         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14422                 ol_link_pthreads="-lpthreads -lexc"
14423                 ol_link_threads=posix
14424         fi
14425 fi
14426
14427
14428                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14429 if test "$ol_link_threads" = no ; then
14430         # try -lpthreads
14431         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14432 echo "configure:14433: checking for pthread link with -lpthreads" >&5
14433 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14434   echo $ac_n "(cached) $ac_c" 1>&6
14435 else
14436   
14437                 # save the flags
14438                 ol_LIBS="$LIBS"
14439                 LIBS="-lpthreads $LIBS"
14440
14441                 if test "$cross_compiling" = yes; then
14442   cat > conftest.$ac_ext <<EOF
14443 #line 14444 "configure"
14444 #include "confdefs.h"
14445 /* pthread test headers */
14446 #include <pthread.h>
14447 #if HAVE_PTHREADS < 7
14448 #include <errno.h>
14449 #endif
14450 #ifndef NULL
14451 #define NULL (void*)0
14452 #endif
14453
14454 static void *task(p)
14455         void *p;
14456 {
14457         return (void *) (p == NULL);
14458 }
14459
14460 int main() {
14461
14462         /* pthread test function */
14463 #ifndef PTHREAD_CREATE_DETACHED
14464 #define PTHREAD_CREATE_DETACHED 1
14465 #endif
14466         pthread_t t;
14467         int status;
14468         int detach = PTHREAD_CREATE_DETACHED;
14469
14470 #if HAVE_PTHREADS > 4
14471         /* Final pthreads */
14472         pthread_attr_t attr;
14473
14474         status = pthread_attr_init(&attr);
14475         if( status ) return status;
14476
14477 #if HAVE_PTHREADS < 7
14478         status = pthread_attr_setdetachstate(&attr, &detach);
14479         if( status < 0 ) status = errno;
14480 #else
14481         status = pthread_attr_setdetachstate(&attr, detach);
14482 #endif
14483         if( status ) return status;
14484         status = pthread_create( &t, &attr, task, NULL );
14485 #if HAVE_PTHREADS < 7
14486         if( status < 0 ) status = errno;
14487 #endif
14488         if( status ) return status;
14489 #else
14490         /* Draft 4 pthreads */
14491         status = pthread_create( &t, pthread_attr_default, task, NULL );
14492         if( status ) return errno;
14493
14494         /* give thread a chance to complete */
14495         /* it should remain joinable and hence detachable */
14496         sleep( 1 );
14497
14498         status = pthread_detach( &t );
14499         if( status ) return errno;
14500 #endif
14501
14502 #ifdef HAVE_LINUX_THREADS
14503         pthread_kill_other_threads_np();
14504 #endif
14505
14506         return 0;
14507
14508 ; return 0; }
14509 EOF
14510 if { (eval echo configure:14511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14511   rm -rf conftest*
14512   ol_cv_pthread_lib_lpthreads=yes
14513 else
14514   echo "configure: failed program was:" >&5
14515   cat conftest.$ac_ext >&5
14516   rm -rf conftest*
14517   ol_cv_pthread_lib_lpthreads=no
14518 fi
14519 rm -f conftest*
14520 else
14521   cat > conftest.$ac_ext <<EOF
14522 #line 14523 "configure"
14523 #include "confdefs.h"
14524 /* pthread test headers */
14525 #include <pthread.h>
14526 #if HAVE_PTHREADS < 7
14527 #include <errno.h>
14528 #endif
14529 #ifndef NULL
14530 #define NULL (void*)0
14531 #endif
14532
14533 static void *task(p)
14534         void *p;
14535 {
14536         return (void *) (p == NULL);
14537 }
14538
14539
14540 int main(argc, argv)
14541         int argc;
14542         char **argv;
14543 {
14544
14545         /* pthread test function */
14546 #ifndef PTHREAD_CREATE_DETACHED
14547 #define PTHREAD_CREATE_DETACHED 1
14548 #endif
14549         pthread_t t;
14550         int status;
14551         int detach = PTHREAD_CREATE_DETACHED;
14552
14553 #if HAVE_PTHREADS > 4
14554         /* Final pthreads */
14555         pthread_attr_t attr;
14556
14557         status = pthread_attr_init(&attr);
14558         if( status ) return status;
14559
14560 #if HAVE_PTHREADS < 7
14561         status = pthread_attr_setdetachstate(&attr, &detach);
14562         if( status < 0 ) status = errno;
14563 #else
14564         status = pthread_attr_setdetachstate(&attr, detach);
14565 #endif
14566         if( status ) return status;
14567         status = pthread_create( &t, &attr, task, NULL );
14568 #if HAVE_PTHREADS < 7
14569         if( status < 0 ) status = errno;
14570 #endif
14571         if( status ) return status;
14572 #else
14573         /* Draft 4 pthreads */
14574         status = pthread_create( &t, pthread_attr_default, task, NULL );
14575         if( status ) return errno;
14576
14577         /* give thread a chance to complete */
14578         /* it should remain joinable and hence detachable */
14579         sleep( 1 );
14580
14581         status = pthread_detach( &t );
14582         if( status ) return errno;
14583 #endif
14584
14585 #ifdef HAVE_LINUX_THREADS
14586         pthread_kill_other_threads_np();
14587 #endif
14588
14589         return 0;
14590
14591 }
14592
14593 EOF
14594 if { (eval echo configure:14595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14595 then
14596   ol_cv_pthread_lib_lpthreads=yes
14597 else
14598   echo "configure: failed program was:" >&5
14599   cat conftest.$ac_ext >&5
14600   rm -fr conftest*
14601   ol_cv_pthread_lib_lpthreads=no
14602 fi
14603 rm -fr conftest*
14604 fi
14605
14606
14607                 # restore the LIBS
14608                 LIBS="$ol_LIBS"
14609         
14610 fi
14611
14612 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14613
14614         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14615                 ol_link_pthreads="-lpthreads"
14616                 ol_link_threads=posix
14617         fi
14618 fi
14619
14620
14621                 if test $ol_link_threads != no ; then
14622                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14623
14624                                                 save_CPPFLAGS="$CPPFLAGS"
14625                         save_LIBS="$LIBS"
14626                         LIBS="$LTHREAD_LIBS $LIBS"
14627
14628                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14629 do
14630 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14631 echo "configure:14632: checking for $ac_func" >&5
14632 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14633   echo $ac_n "(cached) $ac_c" 1>&6
14634 else
14635   cat > conftest.$ac_ext <<EOF
14636 #line 14637 "configure"
14637 #include "confdefs.h"
14638 /* System header to define __stub macros and hopefully few prototypes,
14639     which can conflict with char $ac_func(); below.  */
14640 #include <assert.h>
14641 /* Override any gcc2 internal prototype to avoid an error.  */
14642 /* We use char because int might match the return type of a gcc2
14643     builtin and then its argument prototype would still apply.  */
14644 char $ac_func();
14645 char (*f)();
14646
14647 int main() {
14648
14649 /* The GNU C library defines this for functions which it implements
14650     to always fail with ENOSYS.  Some functions are actually named
14651     something starting with __ and the normal name is an alias.  */
14652 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14653 choke me
14654 #else
14655 f = $ac_func;
14656 #endif
14657
14658 ; return 0; }
14659 EOF
14660 if { (eval echo configure:14661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14661   rm -rf conftest*
14662   eval "ac_cv_func_$ac_func=yes"
14663 else
14664   echo "configure: failed program was:" >&5
14665   cat conftest.$ac_ext >&5
14666   rm -rf conftest*
14667   eval "ac_cv_func_$ac_func=no"
14668 fi
14669 rm -f conftest*
14670 fi
14671
14672 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14673   echo "$ac_t""yes" 1>&6
14674     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14675   cat >> confdefs.h <<EOF
14676 #define $ac_tr_func 1
14677 EOF
14678  
14679 else
14680   echo "$ac_t""no" 1>&6
14681 fi
14682 done
14683
14684
14685                         if test $ac_cv_func_sched_yield = no -a \
14686                                 $ac_cv_func_pthread_yield = no -a \
14687                                 $ac_cv_func_thr_yield = no ; then
14688                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14689 echo "configure:14690: checking for sched_yield in -lrt" >&5
14690 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14692   echo $ac_n "(cached) $ac_c" 1>&6
14693 else
14694   ac_save_LIBS="$LIBS"
14695 LIBS="-lrt  $LIBS"
14696 cat > conftest.$ac_ext <<EOF
14697 #line 14698 "configure"
14698 #include "confdefs.h"
14699 /* Override any gcc2 internal prototype to avoid an error.  */
14700 /* We use char because int might match the return type of a gcc2
14701     builtin and then its argument prototype would still apply.  */
14702 char sched_yield();
14703
14704 int main() {
14705 sched_yield()
14706 ; return 0; }
14707 EOF
14708 if { (eval echo configure:14709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14709   rm -rf conftest*
14710   eval "ac_cv_lib_$ac_lib_var=yes"
14711 else
14712   echo "configure: failed program was:" >&5
14713   cat conftest.$ac_ext >&5
14714   rm -rf conftest*
14715   eval "ac_cv_lib_$ac_lib_var=no"
14716 fi
14717 rm -f conftest*
14718 LIBS="$ac_save_LIBS"
14719
14720 fi
14721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14722   echo "$ac_t""yes" 1>&6
14723   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14724                                         cat >> confdefs.h <<\EOF
14725 #define HAVE_SCHED_YIELD 1
14726 EOF
14727
14728                                         ac_cv_func_sched_yield=yes
14729 else
14730   echo "$ac_t""no" 1>&6
14731 ac_cv_func_sched_yield=no
14732 fi
14733
14734                         fi
14735                         if test $ac_cv_func_sched_yield = no -a \
14736                                 $ac_cv_func_pthread_yield = no -a \
14737                                 "$ac_cv_func_thr_yield" = no ; then
14738                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14739                         fi
14740
14741                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14742 do
14743 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14744 echo "configure:14745: checking for $ac_func" >&5
14745 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14746   echo $ac_n "(cached) $ac_c" 1>&6
14747 else
14748   cat > conftest.$ac_ext <<EOF
14749 #line 14750 "configure"
14750 #include "confdefs.h"
14751 /* System header to define __stub macros and hopefully few prototypes,
14752     which can conflict with char $ac_func(); below.  */
14753 #include <assert.h>
14754 /* Override any gcc2 internal prototype to avoid an error.  */
14755 /* We use char because int might match the return type of a gcc2
14756     builtin and then its argument prototype would still apply.  */
14757 char $ac_func();
14758 char (*f)();
14759
14760 int main() {
14761
14762 /* The GNU C library defines this for functions which it implements
14763     to always fail with ENOSYS.  Some functions are actually named
14764     something starting with __ and the normal name is an alias.  */
14765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14766 choke me
14767 #else
14768 f = $ac_func;
14769 #endif
14770
14771 ; return 0; }
14772 EOF
14773 if { (eval echo configure:14774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14774   rm -rf conftest*
14775   eval "ac_cv_func_$ac_func=yes"
14776 else
14777   echo "configure: failed program was:" >&5
14778   cat conftest.$ac_ext >&5
14779   rm -rf conftest*
14780   eval "ac_cv_func_$ac_func=no"
14781 fi
14782 rm -f conftest*
14783 fi
14784
14785 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14786   echo "$ac_t""yes" 1>&6
14787     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14788   cat >> confdefs.h <<EOF
14789 #define $ac_tr_func 1
14790 EOF
14791  
14792 else
14793   echo "$ac_t""no" 1>&6
14794 fi
14795 done
14796
14797
14798                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14799 echo "configure:14800: checking for pthread_detach with <pthread.h>" >&5
14800 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14801   echo $ac_n "(cached) $ac_c" 1>&6
14802 else
14803   
14804                                                                 cat > conftest.$ac_ext <<EOF
14805 #line 14806 "configure"
14806 #include "confdefs.h"
14807
14808 #include <pthread.h>
14809 #ifndef NULL
14810 #define NULL (void*)0
14811 #endif
14812
14813 int main() {
14814 pthread_detach(NULL);
14815 ; return 0; }
14816 EOF
14817 if { (eval echo configure:14818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14818   rm -rf conftest*
14819   ol_cv_func_pthread_detach=yes
14820 else
14821   echo "configure: failed program was:" >&5
14822   cat conftest.$ac_ext >&5
14823   rm -rf conftest*
14824   ol_cv_func_pthread_detach=no
14825 fi
14826 rm -f conftest*
14827                         
14828 fi
14829
14830 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14831
14832                         if test $ol_cv_func_pthread_detach = no ; then
14833                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14834                         fi
14835
14836                         cat >> confdefs.h <<\EOF
14837 #define HAVE_PTHREAD_DETACH 1
14838 EOF
14839
14840
14841                                                 for ac_func in \
14842                                 pthread_setconcurrency \
14843                                 pthread_getconcurrency \
14844                                 thr_setconcurrency \
14845                                 thr_getconcurrency \
14846                         
14847 do
14848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14849 echo "configure:14850: checking for $ac_func" >&5
14850 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14851   echo $ac_n "(cached) $ac_c" 1>&6
14852 else
14853   cat > conftest.$ac_ext <<EOF
14854 #line 14855 "configure"
14855 #include "confdefs.h"
14856 /* System header to define __stub macros and hopefully few prototypes,
14857     which can conflict with char $ac_func(); below.  */
14858 #include <assert.h>
14859 /* Override any gcc2 internal prototype to avoid an error.  */
14860 /* We use char because int might match the return type of a gcc2
14861     builtin and then its argument prototype would still apply.  */
14862 char $ac_func();
14863 char (*f)();
14864
14865 int main() {
14866
14867 /* The GNU C library defines this for functions which it implements
14868     to always fail with ENOSYS.  Some functions are actually named
14869     something starting with __ and the normal name is an alias.  */
14870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14871 choke me
14872 #else
14873 f = $ac_func;
14874 #endif
14875
14876 ; return 0; }
14877 EOF
14878 if { (eval echo configure:14879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14879   rm -rf conftest*
14880   eval "ac_cv_func_$ac_func=yes"
14881 else
14882   echo "configure: failed program was:" >&5
14883   cat conftest.$ac_ext >&5
14884   rm -rf conftest*
14885   eval "ac_cv_func_$ac_func=no"
14886 fi
14887 rm -f conftest*
14888 fi
14889
14890 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14891   echo "$ac_t""yes" 1>&6
14892     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14893   cat >> confdefs.h <<EOF
14894 #define $ac_tr_func 1
14895 EOF
14896  
14897 else
14898   echo "$ac_t""no" 1>&6
14899 fi
14900 done
14901
14902
14903                         
14904         for ac_func in pthread_kill_other_threads_np
14905 do
14906 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14907 echo "configure:14908: checking for $ac_func" >&5
14908 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14909   echo $ac_n "(cached) $ac_c" 1>&6
14910 else
14911   cat > conftest.$ac_ext <<EOF
14912 #line 14913 "configure"
14913 #include "confdefs.h"
14914 /* System header to define __stub macros and hopefully few prototypes,
14915     which can conflict with char $ac_func(); below.  */
14916 #include <assert.h>
14917 /* Override any gcc2 internal prototype to avoid an error.  */
14918 /* We use char because int might match the return type of a gcc2
14919     builtin and then its argument prototype would still apply.  */
14920 char $ac_func();
14921 char (*f)();
14922
14923 int main() {
14924
14925 /* The GNU C library defines this for functions which it implements
14926     to always fail with ENOSYS.  Some functions are actually named
14927     something starting with __ and the normal name is an alias.  */
14928 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14929 choke me
14930 #else
14931 f = $ac_func;
14932 #endif
14933
14934 ; return 0; }
14935 EOF
14936 if { (eval echo configure:14937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14937   rm -rf conftest*
14938   eval "ac_cv_func_$ac_func=yes"
14939 else
14940   echo "configure: failed program was:" >&5
14941   cat conftest.$ac_ext >&5
14942   rm -rf conftest*
14943   eval "ac_cv_func_$ac_func=no"
14944 fi
14945 rm -f conftest*
14946 fi
14947
14948 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14949   echo "$ac_t""yes" 1>&6
14950     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14951   cat >> confdefs.h <<EOF
14952 #define $ac_tr_func 1
14953 EOF
14954  
14955 else
14956   echo "$ac_t""no" 1>&6
14957 fi
14958 done
14959
14960         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14961 echo "configure:14962: checking for LinuxThreads implementation" >&5
14962 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14963   echo $ac_n "(cached) $ac_c" 1>&6
14964 else
14965   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14966 fi
14967
14968 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14969
14970                         
14971         
14972         
14973         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14974 echo "configure:14975: checking for LinuxThreads consistency" >&5
14975 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14976   echo $ac_n "(cached) $ac_c" 1>&6
14977 else
14978   
14979                 if test $ol_cv_header_linux_threads = yes -a \
14980                         $ol_cv_sys_linux_threads = yes; then
14981                         ol_cv_linux_threads=yes
14982                 elif test $ol_cv_header_linux_threads = no -a \
14983                         $ol_cv_sys_linux_threads = no; then
14984                         ol_cv_linux_threads=no
14985                 else
14986                         ol_cv_linux_threads=error
14987                 fi
14988         
14989 fi
14990
14991 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14992
14993
14994                         if test $ol_cv_linux_threads = error; then
14995                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14996                         fi
14997
14998                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14999 echo "configure:15000: checking if pthread_create() works" >&5
15000 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15001   echo $ac_n "(cached) $ac_c" 1>&6
15002 else
15003   
15004                         if test "$cross_compiling" = yes; then
15005                                 ol_cv_pthread_create_works=yes
15006 else
15007   cat > conftest.$ac_ext <<EOF
15008 #line 15009 "configure"
15009 #include "confdefs.h"
15010 /* pthread test headers */
15011 #include <pthread.h>
15012 #if HAVE_PTHREADS < 7
15013 #include <errno.h>
15014 #endif
15015 #ifndef NULL
15016 #define NULL (void*)0
15017 #endif
15018
15019 static void *task(p)
15020         void *p;
15021 {
15022         return (void *) (p == NULL);
15023 }
15024
15025
15026 int main(argc, argv)
15027         int argc;
15028         char **argv;
15029 {
15030
15031         /* pthread test function */
15032 #ifndef PTHREAD_CREATE_DETACHED
15033 #define PTHREAD_CREATE_DETACHED 1
15034 #endif
15035         pthread_t t;
15036         int status;
15037         int detach = PTHREAD_CREATE_DETACHED;
15038
15039 #if HAVE_PTHREADS > 4
15040         /* Final pthreads */
15041         pthread_attr_t attr;
15042
15043         status = pthread_attr_init(&attr);
15044         if( status ) return status;
15045
15046 #if HAVE_PTHREADS < 7
15047         status = pthread_attr_setdetachstate(&attr, &detach);
15048         if( status < 0 ) status = errno;
15049 #else
15050         status = pthread_attr_setdetachstate(&attr, detach);
15051 #endif
15052         if( status ) return status;
15053         status = pthread_create( &t, &attr, task, NULL );
15054 #if HAVE_PTHREADS < 7
15055         if( status < 0 ) status = errno;
15056 #endif
15057         if( status ) return status;
15058 #else
15059         /* Draft 4 pthreads */
15060         status = pthread_create( &t, pthread_attr_default, task, NULL );
15061         if( status ) return errno;
15062
15063         /* give thread a chance to complete */
15064         /* it should remain joinable and hence detachable */
15065         sleep( 1 );
15066
15067         status = pthread_detach( &t );
15068         if( status ) return errno;
15069 #endif
15070
15071 #ifdef HAVE_LINUX_THREADS
15072         pthread_kill_other_threads_np();
15073 #endif
15074
15075         return 0;
15076
15077 }
15078
15079 EOF
15080 if { (eval echo configure:15081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15081 then
15082   ol_cv_pthread_create_works=yes
15083 else
15084   echo "configure: failed program was:" >&5
15085   cat conftest.$ac_ext >&5
15086   rm -fr conftest*
15087   ol_cv_pthread_create_works=no
15088 fi
15089 rm -fr conftest*
15090 fi
15091
15092 fi
15093
15094 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15095
15096                         if test $ol_cv_pthread_create_works = no ; then
15097                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15098                         fi
15099
15100                                                 if test $ol_with_yielding_select = auto ; then
15101                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15102 echo "configure:15103: checking if select yields when using pthreads" >&5
15103 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15104   echo $ac_n "(cached) $ac_c" 1>&6
15105 else
15106   
15107                                 if test "$cross_compiling" = yes; then
15108   ol_cv_pthread_select_yields=cross
15109 else
15110   cat > conftest.$ac_ext <<EOF
15111 #line 15112 "configure"
15112 #include "confdefs.h"
15113
15114 #include <sys/types.h>
15115 #include <sys/time.h>
15116 #include <unistd.h>
15117 #include <pthread.h>
15118 #ifndef NULL
15119 #define NULL (void*) 0
15120 #endif
15121
15122 static int fildes[2];
15123
15124 static void *task(p)
15125         void *p;
15126 {
15127         int i;
15128         struct timeval tv;
15129
15130         fd_set rfds;
15131
15132         tv.tv_sec=10;
15133         tv.tv_usec=0;
15134
15135         FD_ZERO(&rfds);
15136         FD_SET(fildes[0], &rfds);
15137
15138         /* we're not interested in any fds */
15139         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15140
15141         if(i < 0) {
15142                 perror("select");
15143                 exit(10);
15144         }
15145
15146         exit(0); /* if we exit here, the select blocked the whole process */
15147 }
15148
15149 int main(argc, argv)
15150         int argc;
15151         char **argv;
15152 {
15153         pthread_t t;
15154
15155         /* create a pipe to select */
15156         if(pipe(&fildes[0])) {
15157                 perror("select");
15158                 exit(1);
15159         }
15160
15161 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15162         (void) pthread_setconcurrency(2);
15163 #else
15164 #ifdef HAVE_THR_SETCONCURRENCY
15165         /* Set Solaris LWP concurrency to 2 */
15166         thr_setconcurrency(2);
15167 #endif
15168 #endif
15169
15170 #if HAVE_PTHREADS < 6
15171         pthread_create(&t, pthread_attr_default, task, NULL);
15172 #else
15173         pthread_create(&t, NULL, task, NULL);
15174 #endif
15175
15176         /* make sure task runs first */
15177 #if HAVE_THR_YIELD
15178         thr_yield();
15179 #elif defined( HAVE_SCHED_YIELD )
15180         sched_yield();
15181 #elif defined( HAVE_PTHREAD_YIELD )
15182         pthread_yield();
15183 #endif
15184
15185         exit(2);
15186 }
15187 EOF
15188 if { (eval echo configure:15189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15189 then
15190   ol_cv_pthread_select_yields=no
15191 else
15192   echo "configure: failed program was:" >&5
15193   cat conftest.$ac_ext >&5
15194   rm -fr conftest*
15195   ol_cv_pthread_select_yields=yes
15196 fi
15197 rm -fr conftest*
15198 fi
15199
15200 fi
15201
15202 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15203
15204                                 if test $ol_cv_pthread_select_yields = cross ; then
15205                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15206                                 fi
15207
15208                                 if test $ol_cv_pthread_select_yields = yes ; then
15209                                         ol_with_yielding_select=yes
15210                                 fi
15211                         fi
15212
15213                                                 CPPFLAGS="$save_CPPFLAGS"
15214                         LIBS="$save_LIBS"
15215                 else
15216                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15217                 fi
15218         fi
15219
15220         if test $ol_with_threads = posix ; then
15221                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15222         fi
15223 fi
15224
15225 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15226         -o $ol_with_threads = mach ; then
15227
15228                 for ac_hdr in mach/cthreads.h cthreads.h
15229 do
15230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15232 echo "configure:15233: checking for $ac_hdr" >&5
15233 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15234   echo $ac_n "(cached) $ac_c" 1>&6
15235 else
15236   cat > conftest.$ac_ext <<EOF
15237 #line 15238 "configure"
15238 #include "confdefs.h"
15239 #include <$ac_hdr>
15240 EOF
15241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15242 { (eval echo configure:15243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15244 if test -z "$ac_err"; then
15245   rm -rf conftest*
15246   eval "ac_cv_header_$ac_safe=yes"
15247 else
15248   echo "$ac_err" >&5
15249   echo "configure: failed program was:" >&5
15250   cat conftest.$ac_ext >&5
15251   rm -rf conftest*
15252   eval "ac_cv_header_$ac_safe=no"
15253 fi
15254 rm -f conftest*
15255 fi
15256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15257   echo "$ac_t""yes" 1>&6
15258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15259   cat >> confdefs.h <<EOF
15260 #define $ac_tr_hdr 1
15261 EOF
15262  
15263 else
15264   echo "$ac_t""no" 1>&6
15265 fi
15266 done
15267
15268         if test $ac_cv_header_mach_cthreads_h = yes ; then
15269                 ol_with_threads=found
15270
15271                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15272 echo "configure:15273: checking for cthread_fork" >&5
15273 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15274   echo $ac_n "(cached) $ac_c" 1>&6
15275 else
15276   cat > conftest.$ac_ext <<EOF
15277 #line 15278 "configure"
15278 #include "confdefs.h"
15279 /* System header to define __stub macros and hopefully few prototypes,
15280     which can conflict with char cthread_fork(); below.  */
15281 #include <assert.h>
15282 /* Override any gcc2 internal prototype to avoid an error.  */
15283 /* We use char because int might match the return type of a gcc2
15284     builtin and then its argument prototype would still apply.  */
15285 char cthread_fork();
15286 char (*f)();
15287
15288 int main() {
15289
15290 /* The GNU C library defines this for functions which it implements
15291     to always fail with ENOSYS.  Some functions are actually named
15292     something starting with __ and the normal name is an alias.  */
15293 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15294 choke me
15295 #else
15296 f = cthread_fork;
15297 #endif
15298
15299 ; return 0; }
15300 EOF
15301 if { (eval echo configure:15302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15302   rm -rf conftest*
15303   eval "ac_cv_func_cthread_fork=yes"
15304 else
15305   echo "configure: failed program was:" >&5
15306   cat conftest.$ac_ext >&5
15307   rm -rf conftest*
15308   eval "ac_cv_func_cthread_fork=no"
15309 fi
15310 rm -f conftest*
15311 fi
15312
15313 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15314   echo "$ac_t""yes" 1>&6
15315   ol_link_threads=yes
15316 else
15317   echo "$ac_t""no" 1>&6
15318 fi
15319
15320
15321                 if test $ol_link_threads = no ; then
15322                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15323 echo "configure:15324: checking for cthread_fork with -all_load" >&5
15324 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15325   echo $ac_n "(cached) $ac_c" 1>&6
15326 else
15327   
15328                                                                 save_LIBS="$LIBS"
15329                                 LIBS="-all_load $LIBS"
15330                                 cat > conftest.$ac_ext <<EOF
15331 #line 15332 "configure"
15332 #include "confdefs.h"
15333 #include <mach/cthreads.h>
15334 int main() {
15335
15336                                         cthread_fork((void *)0, (void *)0);
15337                                         
15338 ; return 0; }
15339 EOF
15340 if { (eval echo configure:15341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15341   rm -rf conftest*
15342   ol_cv_cthread_all_load=yes
15343 else
15344   echo "configure: failed program was:" >&5
15345   cat conftest.$ac_ext >&5
15346   rm -rf conftest*
15347   ol_cv_cthread_all_load=no
15348 fi
15349 rm -f conftest*
15350                                                                 LIBS="$save_LIBS"
15351                         
15352 fi
15353
15354 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15355
15356                         if test $ol_cv_cthread_all_load = yes ; then
15357                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15358                                 ol_link_threads=mach
15359                                 ol_with_threads=found
15360                         fi
15361                 fi
15362
15363         elif test $ac_cv_header_cthreads_h = yes ; then
15364                                 
15365                 ol_with_threads=found
15366  
15367                                 save_LIBS="$LIBS"
15368                 LIBS="$LIBS -lthreads"
15369                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15370 echo "configure:15371: checking for cthread_fork" >&5
15371 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15372   echo $ac_n "(cached) $ac_c" 1>&6
15373 else
15374   cat > conftest.$ac_ext <<EOF
15375 #line 15376 "configure"
15376 #include "confdefs.h"
15377 /* System header to define __stub macros and hopefully few prototypes,
15378     which can conflict with char cthread_fork(); below.  */
15379 #include <assert.h>
15380 /* Override any gcc2 internal prototype to avoid an error.  */
15381 /* We use char because int might match the return type of a gcc2
15382     builtin and then its argument prototype would still apply.  */
15383 char cthread_fork();
15384 char (*f)();
15385
15386 int main() {
15387
15388 /* The GNU C library defines this for functions which it implements
15389     to always fail with ENOSYS.  Some functions are actually named
15390     something starting with __ and the normal name is an alias.  */
15391 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15392 choke me
15393 #else
15394 f = cthread_fork;
15395 #endif
15396
15397 ; return 0; }
15398 EOF
15399 if { (eval echo configure:15400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15400   rm -rf conftest*
15401   eval "ac_cv_func_cthread_fork=yes"
15402 else
15403   echo "configure: failed program was:" >&5
15404   cat conftest.$ac_ext >&5
15405   rm -rf conftest*
15406   eval "ac_cv_func_cthread_fork=no"
15407 fi
15408 rm -f conftest*
15409 fi
15410
15411 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15412   echo "$ac_t""yes" 1>&6
15413   ol_link_threads=yes
15414 else
15415   echo "$ac_t""no" 1>&6
15416 fi
15417
15418                 LIBS="$save_LIBS"
15419
15420                 if test $ol_link_threads = yes ; then
15421                         LTHREAD_LIBS="-lthreads"
15422                         ol_link_threads=mach
15423                         ol_with_threads=found
15424                 else
15425                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15426                 fi
15427
15428         elif test $ol_with_threads = mach ; then
15429                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15430         fi
15431
15432         if test $ol_link_threads = mach ; then
15433                 cat >> confdefs.h <<\EOF
15434 #define HAVE_MACH_CTHREADS 1
15435 EOF
15436
15437         elif test $ol_with_threads = found ; then
15438                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15439         fi
15440 fi
15441
15442 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15443         -o $ol_with_threads = pth ; then
15444
15445         for ac_hdr in pth.h
15446 do
15447 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15448 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15449 echo "configure:15450: checking for $ac_hdr" >&5
15450 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15451   echo $ac_n "(cached) $ac_c" 1>&6
15452 else
15453   cat > conftest.$ac_ext <<EOF
15454 #line 15455 "configure"
15455 #include "confdefs.h"
15456 #include <$ac_hdr>
15457 EOF
15458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15459 { (eval echo configure:15460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15461 if test -z "$ac_err"; then
15462   rm -rf conftest*
15463   eval "ac_cv_header_$ac_safe=yes"
15464 else
15465   echo "$ac_err" >&5
15466   echo "configure: failed program was:" >&5
15467   cat conftest.$ac_ext >&5
15468   rm -rf conftest*
15469   eval "ac_cv_header_$ac_safe=no"
15470 fi
15471 rm -f conftest*
15472 fi
15473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15474   echo "$ac_t""yes" 1>&6
15475     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15476   cat >> confdefs.h <<EOF
15477 #define $ac_tr_hdr 1
15478 EOF
15479  
15480 else
15481   echo "$ac_t""no" 1>&6
15482 fi
15483 done
15484
15485
15486         if test $ac_cv_header_pth_h = yes ; then
15487                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15488 echo "configure:15489: checking for pth_version in -lpth" >&5
15489 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15491   echo $ac_n "(cached) $ac_c" 1>&6
15492 else
15493   ac_save_LIBS="$LIBS"
15494 LIBS="-lpth  $LIBS"
15495 cat > conftest.$ac_ext <<EOF
15496 #line 15497 "configure"
15497 #include "confdefs.h"
15498 /* Override any gcc2 internal prototype to avoid an error.  */
15499 /* We use char because int might match the return type of a gcc2
15500     builtin and then its argument prototype would still apply.  */
15501 char pth_version();
15502
15503 int main() {
15504 pth_version()
15505 ; return 0; }
15506 EOF
15507 if { (eval echo configure:15508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15508   rm -rf conftest*
15509   eval "ac_cv_lib_$ac_lib_var=yes"
15510 else
15511   echo "configure: failed program was:" >&5
15512   cat conftest.$ac_ext >&5
15513   rm -rf conftest*
15514   eval "ac_cv_lib_$ac_lib_var=no"
15515 fi
15516 rm -f conftest*
15517 LIBS="$ac_save_LIBS"
15518
15519 fi
15520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15521   echo "$ac_t""yes" 1>&6
15522   have_pth=yes
15523 else
15524   echo "$ac_t""no" 1>&6
15525 have_pth=no
15526 fi
15527
15528
15529                 if test $have_pth = yes ; then
15530                         cat >> confdefs.h <<\EOF
15531 #define HAVE_GNU_PTH 1
15532 EOF
15533
15534                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15535                         ol_link_threads=pth
15536                         ol_with_threads=found
15537
15538                         if test $ol_with_yielding_select = auto ; then
15539                                 ol_with_yielding_select=yes
15540                         fi
15541                 fi
15542         fi
15543 fi
15544
15545 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15546         -o $ol_with_threads = lwp ; then
15547
15548                 for ac_hdr in thread.h synch.h
15549 do
15550 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15551 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15552 echo "configure:15553: checking for $ac_hdr" >&5
15553 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15554   echo $ac_n "(cached) $ac_c" 1>&6
15555 else
15556   cat > conftest.$ac_ext <<EOF
15557 #line 15558 "configure"
15558 #include "confdefs.h"
15559 #include <$ac_hdr>
15560 EOF
15561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15562 { (eval echo configure:15563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15564 if test -z "$ac_err"; then
15565   rm -rf conftest*
15566   eval "ac_cv_header_$ac_safe=yes"
15567 else
15568   echo "$ac_err" >&5
15569   echo "configure: failed program was:" >&5
15570   cat conftest.$ac_ext >&5
15571   rm -rf conftest*
15572   eval "ac_cv_header_$ac_safe=no"
15573 fi
15574 rm -f conftest*
15575 fi
15576 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15577   echo "$ac_t""yes" 1>&6
15578     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15579   cat >> confdefs.h <<EOF
15580 #define $ac_tr_hdr 1
15581 EOF
15582  
15583 else
15584   echo "$ac_t""no" 1>&6
15585 fi
15586 done
15587
15588         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15589                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15590 echo "configure:15591: checking for thr_create in -lthread" >&5
15591 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15592 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15593   echo $ac_n "(cached) $ac_c" 1>&6
15594 else
15595   ac_save_LIBS="$LIBS"
15596 LIBS="-lthread  $LIBS"
15597 cat > conftest.$ac_ext <<EOF
15598 #line 15599 "configure"
15599 #include "confdefs.h"
15600 /* Override any gcc2 internal prototype to avoid an error.  */
15601 /* We use char because int might match the return type of a gcc2
15602     builtin and then its argument prototype would still apply.  */
15603 char thr_create();
15604
15605 int main() {
15606 thr_create()
15607 ; return 0; }
15608 EOF
15609 if { (eval echo configure:15610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15610   rm -rf conftest*
15611   eval "ac_cv_lib_$ac_lib_var=yes"
15612 else
15613   echo "configure: failed program was:" >&5
15614   cat conftest.$ac_ext >&5
15615   rm -rf conftest*
15616   eval "ac_cv_lib_$ac_lib_var=no"
15617 fi
15618 rm -f conftest*
15619 LIBS="$ac_save_LIBS"
15620
15621 fi
15622 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15623   echo "$ac_t""yes" 1>&6
15624   have_thr=yes
15625 else
15626   echo "$ac_t""no" 1>&6
15627 have_thr=no
15628 fi
15629
15630
15631                 if test $have_thr = yes ; then
15632                         cat >> confdefs.h <<\EOF
15633 #define HAVE_THR 1
15634 EOF
15635
15636                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15637                         ol_link_threads=thr
15638
15639                         if test $ol_with_yielding_select = auto ; then
15640                                 ol_with_yielding_select=yes
15641                         fi
15642
15643                                                 for ac_func in \
15644                                 thr_setconcurrency \
15645                                 thr_getconcurrency \
15646                         
15647 do
15648 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15649 echo "configure:15650: checking for $ac_func" >&5
15650 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15651   echo $ac_n "(cached) $ac_c" 1>&6
15652 else
15653   cat > conftest.$ac_ext <<EOF
15654 #line 15655 "configure"
15655 #include "confdefs.h"
15656 /* System header to define __stub macros and hopefully few prototypes,
15657     which can conflict with char $ac_func(); below.  */
15658 #include <assert.h>
15659 /* Override any gcc2 internal prototype to avoid an error.  */
15660 /* We use char because int might match the return type of a gcc2
15661     builtin and then its argument prototype would still apply.  */
15662 char $ac_func();
15663 char (*f)();
15664
15665 int main() {
15666
15667 /* The GNU C library defines this for functions which it implements
15668     to always fail with ENOSYS.  Some functions are actually named
15669     something starting with __ and the normal name is an alias.  */
15670 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15671 choke me
15672 #else
15673 f = $ac_func;
15674 #endif
15675
15676 ; return 0; }
15677 EOF
15678 if { (eval echo configure:15679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15679   rm -rf conftest*
15680   eval "ac_cv_func_$ac_func=yes"
15681 else
15682   echo "configure: failed program was:" >&5
15683   cat conftest.$ac_ext >&5
15684   rm -rf conftest*
15685   eval "ac_cv_func_$ac_func=no"
15686 fi
15687 rm -f conftest*
15688 fi
15689
15690 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15691   echo "$ac_t""yes" 1>&6
15692     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15693   cat >> confdefs.h <<EOF
15694 #define $ac_tr_func 1
15695 EOF
15696  
15697 else
15698   echo "$ac_t""no" 1>&6
15699 fi
15700 done
15701
15702                 fi
15703         fi
15704
15705                 for ac_hdr in lwp/lwp.h
15706 do
15707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15709 echo "configure:15710: checking for $ac_hdr" >&5
15710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15711   echo $ac_n "(cached) $ac_c" 1>&6
15712 else
15713   cat > conftest.$ac_ext <<EOF
15714 #line 15715 "configure"
15715 #include "confdefs.h"
15716 #include <$ac_hdr>
15717 EOF
15718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15719 { (eval echo configure:15720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15721 if test -z "$ac_err"; then
15722   rm -rf conftest*
15723   eval "ac_cv_header_$ac_safe=yes"
15724 else
15725   echo "$ac_err" >&5
15726   echo "configure: failed program was:" >&5
15727   cat conftest.$ac_ext >&5
15728   rm -rf conftest*
15729   eval "ac_cv_header_$ac_safe=no"
15730 fi
15731 rm -f conftest*
15732 fi
15733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15734   echo "$ac_t""yes" 1>&6
15735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15736   cat >> confdefs.h <<EOF
15737 #define $ac_tr_hdr 1
15738 EOF
15739  
15740 else
15741   echo "$ac_t""no" 1>&6
15742 fi
15743 done
15744
15745         if test $ac_cv_header_lwp_lwp_h = yes ; then
15746                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15747 echo "configure:15748: checking for lwp_create in -llwp" >&5
15748 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15749 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15750   echo $ac_n "(cached) $ac_c" 1>&6
15751 else
15752   ac_save_LIBS="$LIBS"
15753 LIBS="-llwp  $LIBS"
15754 cat > conftest.$ac_ext <<EOF
15755 #line 15756 "configure"
15756 #include "confdefs.h"
15757 /* Override any gcc2 internal prototype to avoid an error.  */
15758 /* We use char because int might match the return type of a gcc2
15759     builtin and then its argument prototype would still apply.  */
15760 char lwp_create();
15761
15762 int main() {
15763 lwp_create()
15764 ; return 0; }
15765 EOF
15766 if { (eval echo configure:15767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15767   rm -rf conftest*
15768   eval "ac_cv_lib_$ac_lib_var=yes"
15769 else
15770   echo "configure: failed program was:" >&5
15771   cat conftest.$ac_ext >&5
15772   rm -rf conftest*
15773   eval "ac_cv_lib_$ac_lib_var=no"
15774 fi
15775 rm -f conftest*
15776 LIBS="$ac_save_LIBS"
15777
15778 fi
15779 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15780   echo "$ac_t""yes" 1>&6
15781   have_lwp=yes
15782 else
15783   echo "$ac_t""no" 1>&6
15784 have_lwp=no
15785 fi
15786
15787
15788                 if test $have_lwp = yes ; then
15789                         cat >> confdefs.h <<\EOF
15790 #define HAVE_LWP 1
15791 EOF
15792
15793                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15794                         ol_link_threads=lwp
15795
15796                         if test $ol_with_yielding_select = auto ; then
15797                                 ol_with_yielding_select=no
15798                         fi
15799                 fi
15800         fi
15801 fi
15802
15803 if test $ol_with_yielding_select = yes ; then
15804         cat >> confdefs.h <<\EOF
15805 #define HAVE_YIELDING_SELECT 1
15806 EOF
15807
15808 fi
15809
15810 if test $ol_with_threads = manual ; then
15811                 ol_link_threads=yes
15812
15813         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15814
15815         for ac_hdr in pthread.h sched.h
15816 do
15817 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15818 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15819 echo "configure:15820: checking for $ac_hdr" >&5
15820 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15821   echo $ac_n "(cached) $ac_c" 1>&6
15822 else
15823   cat > conftest.$ac_ext <<EOF
15824 #line 15825 "configure"
15825 #include "confdefs.h"
15826 #include <$ac_hdr>
15827 EOF
15828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15829 { (eval echo configure:15830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15831 if test -z "$ac_err"; then
15832   rm -rf conftest*
15833   eval "ac_cv_header_$ac_safe=yes"
15834 else
15835   echo "$ac_err" >&5
15836   echo "configure: failed program was:" >&5
15837   cat conftest.$ac_ext >&5
15838   rm -rf conftest*
15839   eval "ac_cv_header_$ac_safe=no"
15840 fi
15841 rm -f conftest*
15842 fi
15843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15844   echo "$ac_t""yes" 1>&6
15845     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15846   cat >> confdefs.h <<EOF
15847 #define $ac_tr_hdr 1
15848 EOF
15849  
15850 else
15851   echo "$ac_t""no" 1>&6
15852 fi
15853 done
15854
15855         for ac_func in sched_yield pthread_yield
15856 do
15857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15858 echo "configure:15859: checking for $ac_func" >&5
15859 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15860   echo $ac_n "(cached) $ac_c" 1>&6
15861 else
15862   cat > conftest.$ac_ext <<EOF
15863 #line 15864 "configure"
15864 #include "confdefs.h"
15865 /* System header to define __stub macros and hopefully few prototypes,
15866     which can conflict with char $ac_func(); below.  */
15867 #include <assert.h>
15868 /* Override any gcc2 internal prototype to avoid an error.  */
15869 /* We use char because int might match the return type of a gcc2
15870     builtin and then its argument prototype would still apply.  */
15871 char $ac_func();
15872 char (*f)();
15873
15874 int main() {
15875
15876 /* The GNU C library defines this for functions which it implements
15877     to always fail with ENOSYS.  Some functions are actually named
15878     something starting with __ and the normal name is an alias.  */
15879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15880 choke me
15881 #else
15882 f = $ac_func;
15883 #endif
15884
15885 ; return 0; }
15886 EOF
15887 if { (eval echo configure:15888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15888   rm -rf conftest*
15889   eval "ac_cv_func_$ac_func=yes"
15890 else
15891   echo "configure: failed program was:" >&5
15892   cat conftest.$ac_ext >&5
15893   rm -rf conftest*
15894   eval "ac_cv_func_$ac_func=no"
15895 fi
15896 rm -f conftest*
15897 fi
15898
15899 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15900   echo "$ac_t""yes" 1>&6
15901     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15902   cat >> confdefs.h <<EOF
15903 #define $ac_tr_func 1
15904 EOF
15905  
15906 else
15907   echo "$ac_t""no" 1>&6
15908 fi
15909 done
15910
15911         
15912         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15913 echo "configure:15914: checking for LinuxThreads pthread.h" >&5
15914 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15915   echo $ac_n "(cached) $ac_c" 1>&6
15916 else
15917   cat > conftest.$ac_ext <<EOF
15918 #line 15919 "configure"
15919 #include "confdefs.h"
15920 #include <pthread.h>
15921 EOF
15922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15923   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15924   rm -rf conftest*
15925   ol_cv_header_linux_threads=yes
15926 else
15927   rm -rf conftest*
15928   ol_cv_header_linux_threads=no
15929 fi
15930 rm -f conftest*
15931
15932                 
15933 fi
15934
15935 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15936         if test $ol_cv_header_linux_threads = yes; then
15937                 cat >> confdefs.h <<\EOF
15938 #define HAVE_LINUX_THREADS 1
15939 EOF
15940
15941         fi
15942
15943
15944         for ac_hdr in mach/cthreads.h
15945 do
15946 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15947 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15948 echo "configure:15949: checking for $ac_hdr" >&5
15949 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15950   echo $ac_n "(cached) $ac_c" 1>&6
15951 else
15952   cat > conftest.$ac_ext <<EOF
15953 #line 15954 "configure"
15954 #include "confdefs.h"
15955 #include <$ac_hdr>
15956 EOF
15957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15958 { (eval echo configure:15959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15960 if test -z "$ac_err"; then
15961   rm -rf conftest*
15962   eval "ac_cv_header_$ac_safe=yes"
15963 else
15964   echo "$ac_err" >&5
15965   echo "configure: failed program was:" >&5
15966   cat conftest.$ac_ext >&5
15967   rm -rf conftest*
15968   eval "ac_cv_header_$ac_safe=no"
15969 fi
15970 rm -f conftest*
15971 fi
15972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15973   echo "$ac_t""yes" 1>&6
15974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15975   cat >> confdefs.h <<EOF
15976 #define $ac_tr_hdr 1
15977 EOF
15978  
15979 else
15980   echo "$ac_t""no" 1>&6
15981 fi
15982 done
15983
15984         for ac_hdr in lwp/lwp.h
15985 do
15986 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15987 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15988 echo "configure:15989: checking for $ac_hdr" >&5
15989 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15990   echo $ac_n "(cached) $ac_c" 1>&6
15991 else
15992   cat > conftest.$ac_ext <<EOF
15993 #line 15994 "configure"
15994 #include "confdefs.h"
15995 #include <$ac_hdr>
15996 EOF
15997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15998 { (eval echo configure:15999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15999 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16000 if test -z "$ac_err"; then
16001   rm -rf conftest*
16002   eval "ac_cv_header_$ac_safe=yes"
16003 else
16004   echo "$ac_err" >&5
16005   echo "configure: failed program was:" >&5
16006   cat conftest.$ac_ext >&5
16007   rm -rf conftest*
16008   eval "ac_cv_header_$ac_safe=no"
16009 fi
16010 rm -f conftest*
16011 fi
16012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16013   echo "$ac_t""yes" 1>&6
16014     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16015   cat >> confdefs.h <<EOF
16016 #define $ac_tr_hdr 1
16017 EOF
16018  
16019 else
16020   echo "$ac_t""no" 1>&6
16021 fi
16022 done
16023
16024         for ac_hdr in thread.h synch.h
16025 do
16026 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16027 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16028 echo "configure:16029: checking for $ac_hdr" >&5
16029 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16030   echo $ac_n "(cached) $ac_c" 1>&6
16031 else
16032   cat > conftest.$ac_ext <<EOF
16033 #line 16034 "configure"
16034 #include "confdefs.h"
16035 #include <$ac_hdr>
16036 EOF
16037 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16038 { (eval echo configure:16039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16039 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16040 if test -z "$ac_err"; then
16041   rm -rf conftest*
16042   eval "ac_cv_header_$ac_safe=yes"
16043 else
16044   echo "$ac_err" >&5
16045   echo "configure: failed program was:" >&5
16046   cat conftest.$ac_ext >&5
16047   rm -rf conftest*
16048   eval "ac_cv_header_$ac_safe=no"
16049 fi
16050 rm -f conftest*
16051 fi
16052 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16053   echo "$ac_t""yes" 1>&6
16054     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16055   cat >> confdefs.h <<EOF
16056 #define $ac_tr_hdr 1
16057 EOF
16058  
16059 else
16060   echo "$ac_t""no" 1>&6
16061 fi
16062 done
16063
16064 fi
16065
16066 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16067                         cat >> confdefs.h <<\EOF
16068 #define REENTRANT 1
16069 EOF
16070
16071         cat >> confdefs.h <<\EOF
16072 #define _REENTRANT 1
16073 EOF
16074
16075         cat >> confdefs.h <<\EOF
16076 #define THREAD_SAFE 1
16077 EOF
16078
16079         cat >> confdefs.h <<\EOF
16080 #define _THREAD_SAFE 1
16081 EOF
16082
16083         cat >> confdefs.h <<\EOF
16084 #define THREADSAFE 1
16085 EOF
16086
16087         cat >> confdefs.h <<\EOF
16088 #define _THREADSAFE 1
16089 EOF
16090
16091         cat >> confdefs.h <<\EOF
16092 #define _SGI_MP_SOURCE 1
16093 EOF
16094
16095
16096                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16097 echo "configure:16098: checking for thread specific errno" >&5
16098 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16099   echo $ac_n "(cached) $ac_c" 1>&6
16100 else
16101   
16102                 cat > conftest.$ac_ext <<EOF
16103 #line 16104 "configure"
16104 #include "confdefs.h"
16105 #include <errno.h>
16106 int main() {
16107 errno = 0;
16108 ; return 0; }
16109 EOF
16110 if { (eval echo configure:16111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16111   rm -rf conftest*
16112   ol_cv_errno_thread_specific=yes
16113 else
16114   echo "configure: failed program was:" >&5
16115   cat conftest.$ac_ext >&5
16116   rm -rf conftest*
16117   ol_cv_errno_thread_specific=no
16118 fi
16119 rm -f conftest*
16120         
16121 fi
16122
16123 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16124
16125                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16126 echo "configure:16127: checking for thread specific h_errno" >&5
16127 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16128   echo $ac_n "(cached) $ac_c" 1>&6
16129 else
16130   
16131                 cat > conftest.$ac_ext <<EOF
16132 #line 16133 "configure"
16133 #include "confdefs.h"
16134 #include <netdb.h>
16135 int main() {
16136 h_errno = 0;
16137 ; return 0; }
16138 EOF
16139 if { (eval echo configure:16140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16140   rm -rf conftest*
16141   ol_cv_h_errno_thread_specific=yes
16142 else
16143   echo "configure: failed program was:" >&5
16144   cat conftest.$ac_ext >&5
16145   rm -rf conftest*
16146   ol_cv_h_errno_thread_specific=no
16147 fi
16148 rm -f conftest*
16149         
16150 fi
16151
16152 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16153
16154         if test $ol_cv_errno_thread_specific != yes \
16155                 -o $ol_cv_h_errno_thread_specific != yes ; then
16156                 LIBS="$LTHREAD_LIBS $LIBS"
16157                 LTHREAD_LIBS=""
16158         fi
16159
16160 fi  
16161
16162 if test $ol_link_threads = no ; then
16163         if test $ol_with_threads = yes ; then
16164                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16165         fi
16166
16167         if test $ol_with_threads = auto ; then
16168                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16169                 ol_with_threads=no
16170         fi
16171
16172         cat >> confdefs.h <<\EOF
16173 #define NO_THREADS 1
16174 EOF
16175
16176         LTHREAD_LIBS=""
16177 fi
16178
16179 if test $ol_link_threads != no ; then
16180         cat >> confdefs.h <<\EOF
16181 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16182 EOF
16183
16184 fi
16185
16186 for ac_func in \
16187         ctime_r                 \
16188         gethostbyname_r gethostbyaddr_r \
16189
16190 do
16191 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16192 echo "configure:16193: checking for $ac_func" >&5
16193 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16194   echo $ac_n "(cached) $ac_c" 1>&6
16195 else
16196   cat > conftest.$ac_ext <<EOF
16197 #line 16198 "configure"
16198 #include "confdefs.h"
16199 /* System header to define __stub macros and hopefully few prototypes,
16200     which can conflict with char $ac_func(); below.  */
16201 #include <assert.h>
16202 /* Override any gcc2 internal prototype to avoid an error.  */
16203 /* We use char because int might match the return type of a gcc2
16204     builtin and then its argument prototype would still apply.  */
16205 char $ac_func();
16206 char (*f)();
16207
16208 int main() {
16209
16210 /* The GNU C library defines this for functions which it implements
16211     to always fail with ENOSYS.  Some functions are actually named
16212     something starting with __ and the normal name is an alias.  */
16213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16214 choke me
16215 #else
16216 f = $ac_func;
16217 #endif
16218
16219 ; return 0; }
16220 EOF
16221 if { (eval echo configure:16222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16222   rm -rf conftest*
16223   eval "ac_cv_func_$ac_func=yes"
16224 else
16225   echo "configure: failed program was:" >&5
16226   cat conftest.$ac_ext >&5
16227   rm -rf conftest*
16228   eval "ac_cv_func_$ac_func=no"
16229 fi
16230 rm -f conftest*
16231 fi
16232
16233 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16234   echo "$ac_t""yes" 1>&6
16235     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16236   cat >> confdefs.h <<EOF
16237 #define $ac_tr_func 1
16238 EOF
16239  
16240 else
16241   echo "$ac_t""no" 1>&6
16242 fi
16243 done
16244
16245
16246 if test "$ac_cv_func_ctime_r" = no ; then
16247         ol_cv_func_ctime_r_nargs=0
16248 else
16249         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16250 echo "configure:16251: checking number of arguments of ctime_r" >&5
16251 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16252   echo $ac_n "(cached) $ac_c" 1>&6
16253 else
16254   cat > conftest.$ac_ext <<EOF
16255 #line 16256 "configure"
16256 #include "confdefs.h"
16257 #include <time.h>
16258 int main() {
16259 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16260 ; return 0; }
16261 EOF
16262 if { (eval echo configure:16263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16263   rm -rf conftest*
16264   ol_cv_func_ctime_r_nargs3=yes
16265 else
16266   echo "configure: failed program was:" >&5
16267   cat conftest.$ac_ext >&5
16268   rm -rf conftest*
16269   ol_cv_func_ctime_r_nargs3=no
16270 fi
16271 rm -f conftest*
16272
16273         cat > conftest.$ac_ext <<EOF
16274 #line 16275 "configure"
16275 #include "confdefs.h"
16276 #include <time.h>
16277 int main() {
16278 time_t ti; char *buffer; ctime_r(&ti,buffer);
16279 ; return 0; }
16280 EOF
16281 if { (eval echo configure:16282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16282   rm -rf conftest*
16283   ol_cv_func_ctime_r_nargs2=yes
16284 else
16285   echo "configure: failed program was:" >&5
16286   cat conftest.$ac_ext >&5
16287   rm -rf conftest*
16288   ol_cv_func_ctime_r_nargs2=no
16289 fi
16290 rm -f conftest*
16291
16292         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16293                 $ol_cv_func_ctime_r_nargs2 = no ; then
16294
16295                 ol_cv_func_ctime_r_nargs=3
16296
16297         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16298                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16299
16300                 ol_cv_func_ctime_r_nargs=2
16301
16302         else
16303                 ol_cv_func_ctime_r_nargs=0
16304         fi
16305   
16306 fi
16307
16308 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16309
16310   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16311         cat >> confdefs.h <<EOF
16312 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16313 EOF
16314
16315   fi
16316
16317 fi
16318
16319 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16320         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16321 echo "configure:16322: checking number of arguments of gethostbyname_r" >&5
16322 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16323   echo $ac_n "(cached) $ac_c" 1>&6
16324 else
16325   cat > conftest.$ac_ext <<EOF
16326 #line 16327 "configure"
16327 #include "confdefs.h"
16328 #include <sys/types.h>
16329 #include <sys/socket.h>
16330 #include <netinet/in.h>
16331 #include <netdb.h>
16332 #define BUFSIZE (sizeof(struct hostent)+10)
16333 int main() {
16334 struct hostent hent; char buffer[BUFSIZE];
16335                 int bufsize=BUFSIZE;int h_errno;
16336                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16337                         buffer, bufsize, &h_errno);
16338 ; return 0; }
16339 EOF
16340 if { (eval echo configure:16341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16341   rm -rf conftest*
16342   ol_cv_func_gethostbyname_r_nargs5=yes
16343 else
16344   echo "configure: failed program was:" >&5
16345   cat conftest.$ac_ext >&5
16346   rm -rf conftest*
16347   ol_cv_func_gethostbyname_r_nargs5=no
16348 fi
16349 rm -f conftest*
16350
16351         cat > conftest.$ac_ext <<EOF
16352 #line 16353 "configure"
16353 #include "confdefs.h"
16354 #include <sys/types.h>
16355 #include <sys/socket.h>
16356 #include <netinet/in.h>
16357 #include <netdb.h>
16358 #define BUFSIZE (sizeof(struct hostent)+10)
16359 int main() {
16360 struct hostent hent;struct hostent *rhent;
16361                 char buffer[BUFSIZE];
16362                 int bufsize=BUFSIZE;int h_errno;
16363                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16364                         &rhent, &h_errno);
16365 ; return 0; }
16366 EOF
16367 if { (eval echo configure:16368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16368   rm -rf conftest*
16369   ol_cv_func_gethostbyname_r_nargs6=yes
16370 else
16371   echo "configure: failed program was:" >&5
16372   cat conftest.$ac_ext >&5
16373   rm -rf conftest*
16374   ol_cv_func_gethostbyname_r_nargs6=no
16375 fi
16376 rm -f conftest*
16377
16378         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16379                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16380
16381                 ol_cv_func_gethostbyname_r_nargs=5
16382
16383         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16384                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16385
16386                 ol_cv_func_gethostbyname_r_nargs=6
16387
16388         else
16389                 ol_cv_func_gethostbyname_r_nargs=0
16390         fi
16391   
16392 fi
16393
16394 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16395   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16396         cat >> confdefs.h <<EOF
16397 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16398 EOF
16399
16400   fi
16401
16402 else
16403         ol_cv_func_gethostbyname_r_nargs=0
16404 fi
16405  
16406 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16407         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16408 echo "configure:16409: checking number of arguments of gethostbyaddr_r" >&5
16409 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16410   echo $ac_n "(cached) $ac_c" 1>&6
16411 else
16412   cat > conftest.$ac_ext <<EOF
16413 #line 16414 "configure"
16414 #include "confdefs.h"
16415 #include <sys/types.h>
16416 #include <sys/socket.h>
16417 #include <netinet/in.h>
16418 #include <netdb.h>
16419 #define BUFSIZE (sizeof(struct hostent)+10)
16420 int main() {
16421 struct hostent hent; char buffer[BUFSIZE]; 
16422             struct in_addr add;
16423             size_t alen=sizeof(struct in_addr);
16424             int bufsize=BUFSIZE;int h_errno;
16425                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16426                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16427 ; return 0; }
16428 EOF
16429 if { (eval echo configure:16430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16430   rm -rf conftest*
16431   ol_cv_func_gethostbyaddr_r_nargs7=yes
16432 else
16433   echo "configure: failed program was:" >&5
16434   cat conftest.$ac_ext >&5
16435   rm -rf conftest*
16436   ol_cv_func_gethostbyaddr_r_nargs7=no
16437 fi
16438 rm -f conftest*
16439
16440         cat > conftest.$ac_ext <<EOF
16441 #line 16442 "configure"
16442 #include "confdefs.h"
16443 #include <sys/types.h>
16444 #include <sys/socket.h>
16445 #include <netinet/in.h>
16446 #include <netdb.h>
16447 #define BUFSIZE (sizeof(struct hostent)+10)
16448 int main() {
16449 struct hostent hent;
16450                 struct hostent *rhent; char buffer[BUFSIZE]; 
16451                 struct in_addr add;
16452                 size_t alen=sizeof(struct in_addr);
16453                 int bufsize=BUFSIZE;int h_errno;
16454                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16455                         alen, AF_INET, &hent, buffer, bufsize, 
16456                         &rhent, &h_errno);
16457 ; return 0; }
16458 EOF
16459 if { (eval echo configure:16460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16460   rm -rf conftest*
16461   ol_cv_func_gethostbyaddr_r_nargs8=yes
16462 else
16463   echo "configure: failed program was:" >&5
16464   cat conftest.$ac_ext >&5
16465   rm -rf conftest*
16466   ol_cv_func_gethostbyaddr_r_nargs8=no
16467 fi
16468 rm -f conftest*
16469
16470         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16471                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16472
16473                 ol_cv_func_gethostbyaddr_r_nargs=7
16474
16475         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16476                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16477
16478                 ol_cv_func_gethostbyaddr_r_nargs=8
16479
16480         else
16481                 ol_cv_func_gethostbyaddr_r_nargs=0
16482         fi
16483   
16484 fi
16485
16486 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16487   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16488     cat >> confdefs.h <<EOF
16489 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16490 EOF
16491
16492   fi
16493
16494 else
16495         ol_cv_func_gethostbyaddr_r_nargs=0
16496 fi
16497
16498 ol_link_ldbm=no 
16499
16500 if test $ol_with_ldbm_api = auto \
16501         -o $ol_with_ldbm_api = berkeley \
16502         -o $ol_with_ldbm_api = bcompat ; then
16503
16504         if test $ol_with_ldbm_api = bcompat; then \
16505                 for ac_hdr in db_185.h db.h
16506 do
16507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16509 echo "configure:16510: checking for $ac_hdr" >&5
16510 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16511   echo $ac_n "(cached) $ac_c" 1>&6
16512 else
16513   cat > conftest.$ac_ext <<EOF
16514 #line 16515 "configure"
16515 #include "confdefs.h"
16516 #include <$ac_hdr>
16517 EOF
16518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16519 { (eval echo configure:16520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16521 if test -z "$ac_err"; then
16522   rm -rf conftest*
16523   eval "ac_cv_header_$ac_safe=yes"
16524 else
16525   echo "$ac_err" >&5
16526   echo "configure: failed program was:" >&5
16527   cat conftest.$ac_ext >&5
16528   rm -rf conftest*
16529   eval "ac_cv_header_$ac_safe=no"
16530 fi
16531 rm -f conftest*
16532 fi
16533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16534   echo "$ac_t""yes" 1>&6
16535     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16536   cat >> confdefs.h <<EOF
16537 #define $ac_tr_hdr 1
16538 EOF
16539  
16540 else
16541   echo "$ac_t""no" 1>&6
16542 fi
16543 done
16544
16545 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16546         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16547 echo "configure:16548: checking if Berkeley DB header compatibility" >&5
16548 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16549   echo $ac_n "(cached) $ac_c" 1>&6
16550 else
16551   
16552                 cat > conftest.$ac_ext <<EOF
16553 #line 16554 "configure"
16554 #include "confdefs.h"
16555
16556 #if HAVE_DB_185_H
16557 #       include <db_185.h>
16558 #else
16559 #       include <db.h>
16560 #endif
16561
16562  /* this check could be improved */
16563 #ifndef DB_VERSION_MAJOR
16564 #       define DB_VERSION_MAJOR 1
16565 #endif
16566
16567 #if DB_VERSION_MAJOR == 1 
16568         __db_version_1
16569 #endif
16570
16571 EOF
16572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16573   egrep "__db_version_1" >/dev/null 2>&1; then
16574   rm -rf conftest*
16575   ol_cv_header_db1=yes
16576 else
16577   rm -rf conftest*
16578   ol_cv_header_db1=no
16579 fi
16580 rm -f conftest*
16581
16582 fi
16583
16584 echo "$ac_t""$ol_cv_header_db1" 1>&6
16585
16586         if test $ol_cv_header_db1 = yes ; then
16587                 ol_cv_lib_db=no
16588 if test $ol_cv_lib_db = no ; then
16589         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16590 echo "configure:16591: checking for Berkeley DB link (default)" >&5
16591 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16592   echo $ac_n "(cached) $ac_c" 1>&6
16593 else
16594   
16595         ol_DB_LIB=
16596         ol_LIBS=$LIBS
16597         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16598
16599         cat > conftest.$ac_ext <<EOF
16600 #line 16601 "configure"
16601 #include "confdefs.h"
16602
16603 #ifdef HAVE_DB_185_H
16604 # include <db_185.h>
16605 #else
16606 # include <db.h>
16607 #endif
16608
16609 #ifndef DB_VERSION_MAJOR
16610 # define DB_VERSION_MAJOR 1
16611 #endif
16612
16613 #ifndef NULL
16614 #define NULL ((void*)0)
16615 #endif
16616
16617 int main() {
16618
16619 #if DB_VERSION_MAJOR > 1
16620         {
16621                 char *version;
16622                 int major, minor, patch;
16623
16624                 version = db_version( &major, &minor, &patch );
16625
16626                 if( major != DB_VERSION_MAJOR ||
16627                         minor < DB_VERSION_MINOR )
16628                 {
16629                         printf("Berkeley DB version mismatch\n"
16630                                 "\texpected: %s\n\tgot: %s\n",
16631                                 DB_VERSION_STRING, version);
16632                         return 1;
16633                 }
16634         }
16635 #endif
16636
16637 #if DB_VERSION_MAJOR > 2
16638         db_env_create( NULL, 0 );
16639 #elif DB_VERSION_MAJOR > 1
16640         db_appexit( NULL );
16641 #else
16642         (void) dbopen( NULL, 0, 0, 0, NULL);
16643 #endif
16644
16645 ; return 0; }
16646 EOF
16647 if { (eval echo configure:16648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16648   rm -rf conftest*
16649   ol_cv_db_none=yes
16650 else
16651   echo "configure: failed program was:" >&5
16652   cat conftest.$ac_ext >&5
16653   rm -rf conftest*
16654   ol_cv_db_none=no
16655 fi
16656 rm -f conftest*
16657
16658         LIBS="$ol_LIBS"
16659
16660 fi
16661
16662 echo "$ac_t""$ol_cv_db_none" 1>&6
16663
16664         if test $ol_cv_db_none = yes ; then
16665                 ol_cv_lib_db=yes
16666         fi
16667 fi
16668
16669 if test $ol_cv_lib_db = no ; then
16670         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16671 echo "configure:16672: checking for Berkeley DB link (-ldb4)" >&5
16672 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16673   echo $ac_n "(cached) $ac_c" 1>&6
16674 else
16675   
16676         ol_DB_LIB=-ldb4
16677         ol_LIBS=$LIBS
16678         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16679
16680         cat > conftest.$ac_ext <<EOF
16681 #line 16682 "configure"
16682 #include "confdefs.h"
16683
16684 #ifdef HAVE_DB_185_H
16685 # include <db_185.h>
16686 #else
16687 # include <db.h>
16688 #endif
16689
16690 #ifndef DB_VERSION_MAJOR
16691 # define DB_VERSION_MAJOR 1
16692 #endif
16693
16694 #ifndef NULL
16695 #define NULL ((void*)0)
16696 #endif
16697
16698 int main() {
16699
16700 #if DB_VERSION_MAJOR > 1
16701         {
16702                 char *version;
16703                 int major, minor, patch;
16704
16705                 version = db_version( &major, &minor, &patch );
16706
16707                 if( major != DB_VERSION_MAJOR ||
16708                         minor < DB_VERSION_MINOR )
16709                 {
16710                         printf("Berkeley DB version mismatch\n"
16711                                 "\texpected: %s\n\tgot: %s\n",
16712                                 DB_VERSION_STRING, version);
16713                         return 1;
16714                 }
16715         }
16716 #endif
16717
16718 #if DB_VERSION_MAJOR > 2
16719         db_env_create( NULL, 0 );
16720 #elif DB_VERSION_MAJOR > 1
16721         db_appexit( NULL );
16722 #else
16723         (void) dbopen( NULL, 0, 0, 0, NULL);
16724 #endif
16725
16726 ; return 0; }
16727 EOF
16728 if { (eval echo configure:16729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16729   rm -rf conftest*
16730   ol_cv_db_db4=yes
16731 else
16732   echo "configure: failed program was:" >&5
16733   cat conftest.$ac_ext >&5
16734   rm -rf conftest*
16735   ol_cv_db_db4=no
16736 fi
16737 rm -f conftest*
16738
16739         LIBS="$ol_LIBS"
16740
16741 fi
16742
16743 echo "$ac_t""$ol_cv_db_db4" 1>&6
16744
16745         if test $ol_cv_db_db4 = yes ; then
16746                 ol_cv_lib_db=-ldb4
16747         fi
16748 fi
16749
16750 if test $ol_cv_lib_db = no ; then
16751         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16752 echo "configure:16753: checking for Berkeley DB link (-ldb-4)" >&5
16753 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16754   echo $ac_n "(cached) $ac_c" 1>&6
16755 else
16756   
16757         ol_DB_LIB=-ldb-4
16758         ol_LIBS=$LIBS
16759         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16760
16761         cat > conftest.$ac_ext <<EOF
16762 #line 16763 "configure"
16763 #include "confdefs.h"
16764
16765 #ifdef HAVE_DB_185_H
16766 # include <db_185.h>
16767 #else
16768 # include <db.h>
16769 #endif
16770
16771 #ifndef DB_VERSION_MAJOR
16772 # define DB_VERSION_MAJOR 1
16773 #endif
16774
16775 #ifndef NULL
16776 #define NULL ((void*)0)
16777 #endif
16778
16779 int main() {
16780
16781 #if DB_VERSION_MAJOR > 1
16782         {
16783                 char *version;
16784                 int major, minor, patch;
16785
16786                 version = db_version( &major, &minor, &patch );
16787
16788                 if( major != DB_VERSION_MAJOR ||
16789                         minor < DB_VERSION_MINOR )
16790                 {
16791                         printf("Berkeley DB version mismatch\n"
16792                                 "\texpected: %s\n\tgot: %s\n",
16793                                 DB_VERSION_STRING, version);
16794                         return 1;
16795                 }
16796         }
16797 #endif
16798
16799 #if DB_VERSION_MAJOR > 2
16800         db_env_create( NULL, 0 );
16801 #elif DB_VERSION_MAJOR > 1
16802         db_appexit( NULL );
16803 #else
16804         (void) dbopen( NULL, 0, 0, 0, NULL);
16805 #endif
16806
16807 ; return 0; }
16808 EOF
16809 if { (eval echo configure:16810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16810   rm -rf conftest*
16811   ol_cv_db_db_4=yes
16812 else
16813   echo "configure: failed program was:" >&5
16814   cat conftest.$ac_ext >&5
16815   rm -rf conftest*
16816   ol_cv_db_db_4=no
16817 fi
16818 rm -f conftest*
16819
16820         LIBS="$ol_LIBS"
16821
16822 fi
16823
16824 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16825
16826         if test $ol_cv_db_db_4 = yes ; then
16827                 ol_cv_lib_db=-ldb-4
16828         fi
16829 fi
16830
16831 if test $ol_cv_lib_db = no ; then
16832         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16833 echo "configure:16834: checking for Berkeley DB link (-ldb)" >&5
16834 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16835   echo $ac_n "(cached) $ac_c" 1>&6
16836 else
16837   
16838         ol_DB_LIB=-ldb
16839         ol_LIBS=$LIBS
16840         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16841
16842         cat > conftest.$ac_ext <<EOF
16843 #line 16844 "configure"
16844 #include "confdefs.h"
16845
16846 #ifdef HAVE_DB_185_H
16847 # include <db_185.h>
16848 #else
16849 # include <db.h>
16850 #endif
16851
16852 #ifndef DB_VERSION_MAJOR
16853 # define DB_VERSION_MAJOR 1
16854 #endif
16855
16856 #ifndef NULL
16857 #define NULL ((void*)0)
16858 #endif
16859
16860 int main() {
16861
16862 #if DB_VERSION_MAJOR > 1
16863         {
16864                 char *version;
16865                 int major, minor, patch;
16866
16867                 version = db_version( &major, &minor, &patch );
16868
16869                 if( major != DB_VERSION_MAJOR ||
16870                         minor < DB_VERSION_MINOR )
16871                 {
16872                         printf("Berkeley DB version mismatch\n"
16873                                 "\texpected: %s\n\tgot: %s\n",
16874                                 DB_VERSION_STRING, version);
16875                         return 1;
16876                 }
16877         }
16878 #endif
16879
16880 #if DB_VERSION_MAJOR > 2
16881         db_env_create( NULL, 0 );
16882 #elif DB_VERSION_MAJOR > 1
16883         db_appexit( NULL );
16884 #else
16885         (void) dbopen( NULL, 0, 0, 0, NULL);
16886 #endif
16887
16888 ; return 0; }
16889 EOF
16890 if { (eval echo configure:16891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16891   rm -rf conftest*
16892   ol_cv_db_db=yes
16893 else
16894   echo "configure: failed program was:" >&5
16895   cat conftest.$ac_ext >&5
16896   rm -rf conftest*
16897   ol_cv_db_db=no
16898 fi
16899 rm -f conftest*
16900
16901         LIBS="$ol_LIBS"
16902
16903 fi
16904
16905 echo "$ac_t""$ol_cv_db_db" 1>&6
16906
16907         if test $ol_cv_db_db = yes ; then
16908                 ol_cv_lib_db=-ldb
16909         fi
16910 fi
16911
16912 if test $ol_cv_lib_db = no ; then
16913         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
16914 echo "configure:16915: checking for Berkeley DB link (-ldb3)" >&5
16915 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
16916   echo $ac_n "(cached) $ac_c" 1>&6
16917 else
16918   
16919         ol_DB_LIB=-ldb3
16920         ol_LIBS=$LIBS
16921         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16922
16923         cat > conftest.$ac_ext <<EOF
16924 #line 16925 "configure"
16925 #include "confdefs.h"
16926
16927 #ifdef HAVE_DB_185_H
16928 # include <db_185.h>
16929 #else
16930 # include <db.h>
16931 #endif
16932
16933 #ifndef DB_VERSION_MAJOR
16934 # define DB_VERSION_MAJOR 1
16935 #endif
16936
16937 #ifndef NULL
16938 #define NULL ((void*)0)
16939 #endif
16940
16941 int main() {
16942
16943 #if DB_VERSION_MAJOR > 1
16944         {
16945                 char *version;
16946                 int major, minor, patch;
16947
16948                 version = db_version( &major, &minor, &patch );
16949
16950                 if( major != DB_VERSION_MAJOR ||
16951                         minor < DB_VERSION_MINOR )
16952                 {
16953                         printf("Berkeley DB version mismatch\n"
16954                                 "\texpected: %s\n\tgot: %s\n",
16955                                 DB_VERSION_STRING, version);
16956                         return 1;
16957                 }
16958         }
16959 #endif
16960
16961 #if DB_VERSION_MAJOR > 2
16962         db_env_create( NULL, 0 );
16963 #elif DB_VERSION_MAJOR > 1
16964         db_appexit( NULL );
16965 #else
16966         (void) dbopen( NULL, 0, 0, 0, NULL);
16967 #endif
16968
16969 ; return 0; }
16970 EOF
16971 if { (eval echo configure:16972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16972   rm -rf conftest*
16973   ol_cv_db_db3=yes
16974 else
16975   echo "configure: failed program was:" >&5
16976   cat conftest.$ac_ext >&5
16977   rm -rf conftest*
16978   ol_cv_db_db3=no
16979 fi
16980 rm -f conftest*
16981
16982         LIBS="$ol_LIBS"
16983
16984 fi
16985
16986 echo "$ac_t""$ol_cv_db_db3" 1>&6
16987
16988         if test $ol_cv_db_db3 = yes ; then
16989                 ol_cv_lib_db=-ldb3
16990         fi
16991 fi
16992
16993 if test $ol_cv_lib_db = no ; then
16994         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
16995 echo "configure:16996: checking for Berkeley DB link (-ldb-3)" >&5
16996 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
16997   echo $ac_n "(cached) $ac_c" 1>&6
16998 else
16999   
17000         ol_DB_LIB=-ldb-3
17001         ol_LIBS=$LIBS
17002         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17003
17004         cat > conftest.$ac_ext <<EOF
17005 #line 17006 "configure"
17006 #include "confdefs.h"
17007
17008 #ifdef HAVE_DB_185_H
17009 # include <db_185.h>
17010 #else
17011 # include <db.h>
17012 #endif
17013
17014 #ifndef DB_VERSION_MAJOR
17015 # define DB_VERSION_MAJOR 1
17016 #endif
17017
17018 #ifndef NULL
17019 #define NULL ((void*)0)
17020 #endif
17021
17022 int main() {
17023
17024 #if DB_VERSION_MAJOR > 1
17025         {
17026                 char *version;
17027                 int major, minor, patch;
17028
17029                 version = db_version( &major, &minor, &patch );
17030
17031                 if( major != DB_VERSION_MAJOR ||
17032                         minor < DB_VERSION_MINOR )
17033                 {
17034                         printf("Berkeley DB version mismatch\n"
17035                                 "\texpected: %s\n\tgot: %s\n",
17036                                 DB_VERSION_STRING, version);
17037                         return 1;
17038                 }
17039         }
17040 #endif
17041
17042 #if DB_VERSION_MAJOR > 2
17043         db_env_create( NULL, 0 );
17044 #elif DB_VERSION_MAJOR > 1
17045         db_appexit( NULL );
17046 #else
17047         (void) dbopen( NULL, 0, 0, 0, NULL);
17048 #endif
17049
17050 ; return 0; }
17051 EOF
17052 if { (eval echo configure:17053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17053   rm -rf conftest*
17054   ol_cv_db_db_3=yes
17055 else
17056   echo "configure: failed program was:" >&5
17057   cat conftest.$ac_ext >&5
17058   rm -rf conftest*
17059   ol_cv_db_db_3=no
17060 fi
17061 rm -f conftest*
17062
17063         LIBS="$ol_LIBS"
17064
17065 fi
17066
17067 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17068
17069         if test $ol_cv_db_db_3 = yes ; then
17070                 ol_cv_lib_db=-ldb-3
17071         fi
17072 fi
17073
17074 if test $ol_cv_lib_db = no ; then
17075         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17076 echo "configure:17077: checking for Berkeley DB link (-ldb2)" >&5
17077 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17078   echo $ac_n "(cached) $ac_c" 1>&6
17079 else
17080   
17081         ol_DB_LIB=-ldb2
17082         ol_LIBS=$LIBS
17083         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17084
17085         cat > conftest.$ac_ext <<EOF
17086 #line 17087 "configure"
17087 #include "confdefs.h"
17088
17089 #ifdef HAVE_DB_185_H
17090 # include <db_185.h>
17091 #else
17092 # include <db.h>
17093 #endif
17094
17095 #ifndef DB_VERSION_MAJOR
17096 # define DB_VERSION_MAJOR 1
17097 #endif
17098
17099 #ifndef NULL
17100 #define NULL ((void*)0)
17101 #endif
17102
17103 int main() {
17104
17105 #if DB_VERSION_MAJOR > 1
17106         {
17107                 char *version;
17108                 int major, minor, patch;
17109
17110                 version = db_version( &major, &minor, &patch );
17111
17112                 if( major != DB_VERSION_MAJOR ||
17113                         minor < DB_VERSION_MINOR )
17114                 {
17115                         printf("Berkeley DB version mismatch\n"
17116                                 "\texpected: %s\n\tgot: %s\n",
17117                                 DB_VERSION_STRING, version);
17118                         return 1;
17119                 }
17120         }
17121 #endif
17122
17123 #if DB_VERSION_MAJOR > 2
17124         db_env_create( NULL, 0 );
17125 #elif DB_VERSION_MAJOR > 1
17126         db_appexit( NULL );
17127 #else
17128         (void) dbopen( NULL, 0, 0, 0, NULL);
17129 #endif
17130
17131 ; return 0; }
17132 EOF
17133 if { (eval echo configure:17134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17134   rm -rf conftest*
17135   ol_cv_db_db2=yes
17136 else
17137   echo "configure: failed program was:" >&5
17138   cat conftest.$ac_ext >&5
17139   rm -rf conftest*
17140   ol_cv_db_db2=no
17141 fi
17142 rm -f conftest*
17143
17144         LIBS="$ol_LIBS"
17145
17146 fi
17147
17148 echo "$ac_t""$ol_cv_db_db2" 1>&6
17149
17150         if test $ol_cv_db_db2 = yes ; then
17151                 ol_cv_lib_db=-ldb2
17152         fi
17153 fi
17154
17155 if test $ol_cv_lib_db = no ; then
17156         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17157 echo "configure:17158: checking for Berkeley DB link (-ldb-2)" >&5
17158 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17159   echo $ac_n "(cached) $ac_c" 1>&6
17160 else
17161   
17162         ol_DB_LIB=-ldb-2
17163         ol_LIBS=$LIBS
17164         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17165
17166         cat > conftest.$ac_ext <<EOF
17167 #line 17168 "configure"
17168 #include "confdefs.h"
17169
17170 #ifdef HAVE_DB_185_H
17171 # include <db_185.h>
17172 #else
17173 # include <db.h>
17174 #endif
17175
17176 #ifndef DB_VERSION_MAJOR
17177 # define DB_VERSION_MAJOR 1
17178 #endif
17179
17180 #ifndef NULL
17181 #define NULL ((void*)0)
17182 #endif
17183
17184 int main() {
17185
17186 #if DB_VERSION_MAJOR > 1
17187         {
17188                 char *version;
17189                 int major, minor, patch;
17190
17191                 version = db_version( &major, &minor, &patch );
17192
17193                 if( major != DB_VERSION_MAJOR ||
17194                         minor < DB_VERSION_MINOR )
17195                 {
17196                         printf("Berkeley DB version mismatch\n"
17197                                 "\texpected: %s\n\tgot: %s\n",
17198                                 DB_VERSION_STRING, version);
17199                         return 1;
17200                 }
17201         }
17202 #endif
17203
17204 #if DB_VERSION_MAJOR > 2
17205         db_env_create( NULL, 0 );
17206 #elif DB_VERSION_MAJOR > 1
17207         db_appexit( NULL );
17208 #else
17209         (void) dbopen( NULL, 0, 0, 0, NULL);
17210 #endif
17211
17212 ; return 0; }
17213 EOF
17214 if { (eval echo configure:17215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17215   rm -rf conftest*
17216   ol_cv_db_db_2=yes
17217 else
17218   echo "configure: failed program was:" >&5
17219   cat conftest.$ac_ext >&5
17220   rm -rf conftest*
17221   ol_cv_db_db_2=no
17222 fi
17223 rm -f conftest*
17224
17225         LIBS="$ol_LIBS"
17226
17227 fi
17228
17229 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17230
17231         if test $ol_cv_db_db_2 = yes ; then
17232                 ol_cv_lib_db=-ldb-2
17233         fi
17234 fi
17235
17236 if test $ol_cv_lib_db = no ; then
17237         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17238 echo "configure:17239: checking for Berkeley DB link (-ldb1)" >&5
17239 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17240   echo $ac_n "(cached) $ac_c" 1>&6
17241 else
17242   
17243         ol_DB_LIB=-ldb1
17244         ol_LIBS=$LIBS
17245         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17246
17247         cat > conftest.$ac_ext <<EOF
17248 #line 17249 "configure"
17249 #include "confdefs.h"
17250
17251 #ifdef HAVE_DB_185_H
17252 # include <db_185.h>
17253 #else
17254 # include <db.h>
17255 #endif
17256
17257 #ifndef DB_VERSION_MAJOR
17258 # define DB_VERSION_MAJOR 1
17259 #endif
17260
17261 #ifndef NULL
17262 #define NULL ((void*)0)
17263 #endif
17264
17265 int main() {
17266
17267 #if DB_VERSION_MAJOR > 1
17268         {
17269                 char *version;
17270                 int major, minor, patch;
17271
17272                 version = db_version( &major, &minor, &patch );
17273
17274                 if( major != DB_VERSION_MAJOR ||
17275                         minor < DB_VERSION_MINOR )
17276                 {
17277                         printf("Berkeley DB version mismatch\n"
17278                                 "\texpected: %s\n\tgot: %s\n",
17279                                 DB_VERSION_STRING, version);
17280                         return 1;
17281                 }
17282         }
17283 #endif
17284
17285 #if DB_VERSION_MAJOR > 2
17286         db_env_create( NULL, 0 );
17287 #elif DB_VERSION_MAJOR > 1
17288         db_appexit( NULL );
17289 #else
17290         (void) dbopen( NULL, 0, 0, 0, NULL);
17291 #endif
17292
17293 ; return 0; }
17294 EOF
17295 if { (eval echo configure:17296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17296   rm -rf conftest*
17297   ol_cv_db_db1=yes
17298 else
17299   echo "configure: failed program was:" >&5
17300   cat conftest.$ac_ext >&5
17301   rm -rf conftest*
17302   ol_cv_db_db1=no
17303 fi
17304 rm -f conftest*
17305
17306         LIBS="$ol_LIBS"
17307
17308 fi
17309
17310 echo "$ac_t""$ol_cv_db_db1" 1>&6
17311
17312         if test $ol_cv_db_db1 = yes ; then
17313                 ol_cv_lib_db=-ldb1
17314         fi
17315 fi
17316
17317 if test $ol_cv_lib_db = no ; then
17318         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17319 echo "configure:17320: checking for Berkeley DB link (-ldb-1)" >&5
17320 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17321   echo $ac_n "(cached) $ac_c" 1>&6
17322 else
17323   
17324         ol_DB_LIB=-ldb-1
17325         ol_LIBS=$LIBS
17326         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17327
17328         cat > conftest.$ac_ext <<EOF
17329 #line 17330 "configure"
17330 #include "confdefs.h"
17331
17332 #ifdef HAVE_DB_185_H
17333 # include <db_185.h>
17334 #else
17335 # include <db.h>
17336 #endif
17337
17338 #ifndef DB_VERSION_MAJOR
17339 # define DB_VERSION_MAJOR 1
17340 #endif
17341
17342 #ifndef NULL
17343 #define NULL ((void*)0)
17344 #endif
17345
17346 int main() {
17347
17348 #if DB_VERSION_MAJOR > 1
17349         {
17350                 char *version;
17351                 int major, minor, patch;
17352
17353                 version = db_version( &major, &minor, &patch );
17354
17355                 if( major != DB_VERSION_MAJOR ||
17356                         minor < DB_VERSION_MINOR )
17357                 {
17358                         printf("Berkeley DB version mismatch\n"
17359                                 "\texpected: %s\n\tgot: %s\n",
17360                                 DB_VERSION_STRING, version);
17361                         return 1;
17362                 }
17363         }
17364 #endif
17365
17366 #if DB_VERSION_MAJOR > 2
17367         db_env_create( NULL, 0 );
17368 #elif DB_VERSION_MAJOR > 1
17369         db_appexit( NULL );
17370 #else
17371         (void) dbopen( NULL, 0, 0, 0, NULL);
17372 #endif
17373
17374 ; return 0; }
17375 EOF
17376 if { (eval echo configure:17377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17377   rm -rf conftest*
17378   ol_cv_db_db_1=yes
17379 else
17380   echo "configure: failed program was:" >&5
17381   cat conftest.$ac_ext >&5
17382   rm -rf conftest*
17383   ol_cv_db_db_1=no
17384 fi
17385 rm -f conftest*
17386
17387         LIBS="$ol_LIBS"
17388
17389 fi
17390
17391 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17392
17393         if test $ol_cv_db_db_1 = yes ; then
17394                 ol_cv_lib_db=-ldb-1
17395         fi
17396 fi
17397
17398
17399                 if test "$ol_cv_lib_db" != no ; then
17400                         ol_cv_berkeley_db=yes
17401                 fi
17402         fi
17403 fi
17404
17405         else
17406                 ol_cv_berkeley_db=no
17407 for ac_hdr in db.h
17408 do
17409 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17410 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17411 echo "configure:17412: checking for $ac_hdr" >&5
17412 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17413   echo $ac_n "(cached) $ac_c" 1>&6
17414 else
17415   cat > conftest.$ac_ext <<EOF
17416 #line 17417 "configure"
17417 #include "confdefs.h"
17418 #include <$ac_hdr>
17419 EOF
17420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17421 { (eval echo configure:17422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17423 if test -z "$ac_err"; then
17424   rm -rf conftest*
17425   eval "ac_cv_header_$ac_safe=yes"
17426 else
17427   echo "$ac_err" >&5
17428   echo "configure: failed program was:" >&5
17429   cat conftest.$ac_ext >&5
17430   rm -rf conftest*
17431   eval "ac_cv_header_$ac_safe=no"
17432 fi
17433 rm -f conftest*
17434 fi
17435 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17436   echo "$ac_t""yes" 1>&6
17437     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17438   cat >> confdefs.h <<EOF
17439 #define $ac_tr_hdr 1
17440 EOF
17441  
17442 else
17443   echo "$ac_t""no" 1>&6
17444 fi
17445 done
17446
17447 if test $ac_cv_header_db_h = yes; then
17448         ol_cv_lib_db=no
17449 if test $ol_cv_lib_db = no ; then
17450         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17451 echo "configure:17452: checking for Berkeley DB link (default)" >&5
17452 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17453   echo $ac_n "(cached) $ac_c" 1>&6
17454 else
17455   
17456         ol_DB_LIB=
17457         ol_LIBS=$LIBS
17458         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17459
17460         cat > conftest.$ac_ext <<EOF
17461 #line 17462 "configure"
17462 #include "confdefs.h"
17463
17464 #ifdef HAVE_DB_185_H
17465 # include <db_185.h>
17466 #else
17467 # include <db.h>
17468 #endif
17469
17470 #ifndef DB_VERSION_MAJOR
17471 # define DB_VERSION_MAJOR 1
17472 #endif
17473
17474 #ifndef NULL
17475 #define NULL ((void*)0)
17476 #endif
17477
17478 int main() {
17479
17480 #if DB_VERSION_MAJOR > 1
17481         {
17482                 char *version;
17483                 int major, minor, patch;
17484
17485                 version = db_version( &major, &minor, &patch );
17486
17487                 if( major != DB_VERSION_MAJOR ||
17488                         minor < DB_VERSION_MINOR )
17489                 {
17490                         printf("Berkeley DB version mismatch\n"
17491                                 "\texpected: %s\n\tgot: %s\n",
17492                                 DB_VERSION_STRING, version);
17493                         return 1;
17494                 }
17495         }
17496 #endif
17497
17498 #if DB_VERSION_MAJOR > 2
17499         db_env_create( NULL, 0 );
17500 #elif DB_VERSION_MAJOR > 1
17501         db_appexit( NULL );
17502 #else
17503         (void) dbopen( NULL, 0, 0, 0, NULL);
17504 #endif
17505
17506 ; return 0; }
17507 EOF
17508 if { (eval echo configure:17509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17509   rm -rf conftest*
17510   ol_cv_db_none=yes
17511 else
17512   echo "configure: failed program was:" >&5
17513   cat conftest.$ac_ext >&5
17514   rm -rf conftest*
17515   ol_cv_db_none=no
17516 fi
17517 rm -f conftest*
17518
17519         LIBS="$ol_LIBS"
17520
17521 fi
17522
17523 echo "$ac_t""$ol_cv_db_none" 1>&6
17524
17525         if test $ol_cv_db_none = yes ; then
17526                 ol_cv_lib_db=yes
17527         fi
17528 fi
17529
17530 if test $ol_cv_lib_db = no ; then
17531         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17532 echo "configure:17533: checking for Berkeley DB link (-ldb4)" >&5
17533 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17534   echo $ac_n "(cached) $ac_c" 1>&6
17535 else
17536   
17537         ol_DB_LIB=-ldb4
17538         ol_LIBS=$LIBS
17539         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17540
17541         cat > conftest.$ac_ext <<EOF
17542 #line 17543 "configure"
17543 #include "confdefs.h"
17544
17545 #ifdef HAVE_DB_185_H
17546 # include <db_185.h>
17547 #else
17548 # include <db.h>
17549 #endif
17550
17551 #ifndef DB_VERSION_MAJOR
17552 # define DB_VERSION_MAJOR 1
17553 #endif
17554
17555 #ifndef NULL
17556 #define NULL ((void*)0)
17557 #endif
17558
17559 int main() {
17560
17561 #if DB_VERSION_MAJOR > 1
17562         {
17563                 char *version;
17564                 int major, minor, patch;
17565
17566                 version = db_version( &major, &minor, &patch );
17567
17568                 if( major != DB_VERSION_MAJOR ||
17569                         minor < DB_VERSION_MINOR )
17570                 {
17571                         printf("Berkeley DB version mismatch\n"
17572                                 "\texpected: %s\n\tgot: %s\n",
17573                                 DB_VERSION_STRING, version);
17574                         return 1;
17575                 }
17576         }
17577 #endif
17578
17579 #if DB_VERSION_MAJOR > 2
17580         db_env_create( NULL, 0 );
17581 #elif DB_VERSION_MAJOR > 1
17582         db_appexit( NULL );
17583 #else
17584         (void) dbopen( NULL, 0, 0, 0, NULL);
17585 #endif
17586
17587 ; return 0; }
17588 EOF
17589 if { (eval echo configure:17590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17590   rm -rf conftest*
17591   ol_cv_db_db4=yes
17592 else
17593   echo "configure: failed program was:" >&5
17594   cat conftest.$ac_ext >&5
17595   rm -rf conftest*
17596   ol_cv_db_db4=no
17597 fi
17598 rm -f conftest*
17599
17600         LIBS="$ol_LIBS"
17601
17602 fi
17603
17604 echo "$ac_t""$ol_cv_db_db4" 1>&6
17605
17606         if test $ol_cv_db_db4 = yes ; then
17607                 ol_cv_lib_db=-ldb4
17608         fi
17609 fi
17610
17611 if test $ol_cv_lib_db = no ; then
17612         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17613 echo "configure:17614: checking for Berkeley DB link (-ldb-4)" >&5
17614 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17615   echo $ac_n "(cached) $ac_c" 1>&6
17616 else
17617   
17618         ol_DB_LIB=-ldb-4
17619         ol_LIBS=$LIBS
17620         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17621
17622         cat > conftest.$ac_ext <<EOF
17623 #line 17624 "configure"
17624 #include "confdefs.h"
17625
17626 #ifdef HAVE_DB_185_H
17627 # include <db_185.h>
17628 #else
17629 # include <db.h>
17630 #endif
17631
17632 #ifndef DB_VERSION_MAJOR
17633 # define DB_VERSION_MAJOR 1
17634 #endif
17635
17636 #ifndef NULL
17637 #define NULL ((void*)0)
17638 #endif
17639
17640 int main() {
17641
17642 #if DB_VERSION_MAJOR > 1
17643         {
17644                 char *version;
17645                 int major, minor, patch;
17646
17647                 version = db_version( &major, &minor, &patch );
17648
17649                 if( major != DB_VERSION_MAJOR ||
17650                         minor < DB_VERSION_MINOR )
17651                 {
17652                         printf("Berkeley DB version mismatch\n"
17653                                 "\texpected: %s\n\tgot: %s\n",
17654                                 DB_VERSION_STRING, version);
17655                         return 1;
17656                 }
17657         }
17658 #endif
17659
17660 #if DB_VERSION_MAJOR > 2
17661         db_env_create( NULL, 0 );
17662 #elif DB_VERSION_MAJOR > 1
17663         db_appexit( NULL );
17664 #else
17665         (void) dbopen( NULL, 0, 0, 0, NULL);
17666 #endif
17667
17668 ; return 0; }
17669 EOF
17670 if { (eval echo configure:17671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17671   rm -rf conftest*
17672   ol_cv_db_db_4=yes
17673 else
17674   echo "configure: failed program was:" >&5
17675   cat conftest.$ac_ext >&5
17676   rm -rf conftest*
17677   ol_cv_db_db_4=no
17678 fi
17679 rm -f conftest*
17680
17681         LIBS="$ol_LIBS"
17682
17683 fi
17684
17685 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17686
17687         if test $ol_cv_db_db_4 = yes ; then
17688                 ol_cv_lib_db=-ldb-4
17689         fi
17690 fi
17691
17692 if test $ol_cv_lib_db = no ; then
17693         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17694 echo "configure:17695: checking for Berkeley DB link (-ldb)" >&5
17695 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17696   echo $ac_n "(cached) $ac_c" 1>&6
17697 else
17698   
17699         ol_DB_LIB=-ldb
17700         ol_LIBS=$LIBS
17701         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17702
17703         cat > conftest.$ac_ext <<EOF
17704 #line 17705 "configure"
17705 #include "confdefs.h"
17706
17707 #ifdef HAVE_DB_185_H
17708 # include <db_185.h>
17709 #else
17710 # include <db.h>
17711 #endif
17712
17713 #ifndef DB_VERSION_MAJOR
17714 # define DB_VERSION_MAJOR 1
17715 #endif
17716
17717 #ifndef NULL
17718 #define NULL ((void*)0)
17719 #endif
17720
17721 int main() {
17722
17723 #if DB_VERSION_MAJOR > 1
17724         {
17725                 char *version;
17726                 int major, minor, patch;
17727
17728                 version = db_version( &major, &minor, &patch );
17729
17730                 if( major != DB_VERSION_MAJOR ||
17731                         minor < DB_VERSION_MINOR )
17732                 {
17733                         printf("Berkeley DB version mismatch\n"
17734                                 "\texpected: %s\n\tgot: %s\n",
17735                                 DB_VERSION_STRING, version);
17736                         return 1;
17737                 }
17738         }
17739 #endif
17740
17741 #if DB_VERSION_MAJOR > 2
17742         db_env_create( NULL, 0 );
17743 #elif DB_VERSION_MAJOR > 1
17744         db_appexit( NULL );
17745 #else
17746         (void) dbopen( NULL, 0, 0, 0, NULL);
17747 #endif
17748
17749 ; return 0; }
17750 EOF
17751 if { (eval echo configure:17752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17752   rm -rf conftest*
17753   ol_cv_db_db=yes
17754 else
17755   echo "configure: failed program was:" >&5
17756   cat conftest.$ac_ext >&5
17757   rm -rf conftest*
17758   ol_cv_db_db=no
17759 fi
17760 rm -f conftest*
17761
17762         LIBS="$ol_LIBS"
17763
17764 fi
17765
17766 echo "$ac_t""$ol_cv_db_db" 1>&6
17767
17768         if test $ol_cv_db_db = yes ; then
17769                 ol_cv_lib_db=-ldb
17770         fi
17771 fi
17772
17773 if test $ol_cv_lib_db = no ; then
17774         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17775 echo "configure:17776: checking for Berkeley DB link (-ldb3)" >&5
17776 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17777   echo $ac_n "(cached) $ac_c" 1>&6
17778 else
17779   
17780         ol_DB_LIB=-ldb3
17781         ol_LIBS=$LIBS
17782         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17783
17784         cat > conftest.$ac_ext <<EOF
17785 #line 17786 "configure"
17786 #include "confdefs.h"
17787
17788 #ifdef HAVE_DB_185_H
17789 # include <db_185.h>
17790 #else
17791 # include <db.h>
17792 #endif
17793
17794 #ifndef DB_VERSION_MAJOR
17795 # define DB_VERSION_MAJOR 1
17796 #endif
17797
17798 #ifndef NULL
17799 #define NULL ((void*)0)
17800 #endif
17801
17802 int main() {
17803
17804 #if DB_VERSION_MAJOR > 1
17805         {
17806                 char *version;
17807                 int major, minor, patch;
17808
17809                 version = db_version( &major, &minor, &patch );
17810
17811                 if( major != DB_VERSION_MAJOR ||
17812                         minor < DB_VERSION_MINOR )
17813                 {
17814                         printf("Berkeley DB version mismatch\n"
17815                                 "\texpected: %s\n\tgot: %s\n",
17816                                 DB_VERSION_STRING, version);
17817                         return 1;
17818                 }
17819         }
17820 #endif
17821
17822 #if DB_VERSION_MAJOR > 2
17823         db_env_create( NULL, 0 );
17824 #elif DB_VERSION_MAJOR > 1
17825         db_appexit( NULL );
17826 #else
17827         (void) dbopen( NULL, 0, 0, 0, NULL);
17828 #endif
17829
17830 ; return 0; }
17831 EOF
17832 if { (eval echo configure:17833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17833   rm -rf conftest*
17834   ol_cv_db_db3=yes
17835 else
17836   echo "configure: failed program was:" >&5
17837   cat conftest.$ac_ext >&5
17838   rm -rf conftest*
17839   ol_cv_db_db3=no
17840 fi
17841 rm -f conftest*
17842
17843         LIBS="$ol_LIBS"
17844
17845 fi
17846
17847 echo "$ac_t""$ol_cv_db_db3" 1>&6
17848
17849         if test $ol_cv_db_db3 = yes ; then
17850                 ol_cv_lib_db=-ldb3
17851         fi
17852 fi
17853
17854 if test $ol_cv_lib_db = no ; then
17855         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17856 echo "configure:17857: checking for Berkeley DB link (-ldb-3)" >&5
17857 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17858   echo $ac_n "(cached) $ac_c" 1>&6
17859 else
17860   
17861         ol_DB_LIB=-ldb-3
17862         ol_LIBS=$LIBS
17863         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17864
17865         cat > conftest.$ac_ext <<EOF
17866 #line 17867 "configure"
17867 #include "confdefs.h"
17868
17869 #ifdef HAVE_DB_185_H
17870 # include <db_185.h>
17871 #else
17872 # include <db.h>
17873 #endif
17874
17875 #ifndef DB_VERSION_MAJOR
17876 # define DB_VERSION_MAJOR 1
17877 #endif
17878
17879 #ifndef NULL
17880 #define NULL ((void*)0)
17881 #endif
17882
17883 int main() {
17884
17885 #if DB_VERSION_MAJOR > 1
17886         {
17887                 char *version;
17888                 int major, minor, patch;
17889
17890                 version = db_version( &major, &minor, &patch );
17891
17892                 if( major != DB_VERSION_MAJOR ||
17893                         minor < DB_VERSION_MINOR )
17894                 {
17895                         printf("Berkeley DB version mismatch\n"
17896                                 "\texpected: %s\n\tgot: %s\n",
17897                                 DB_VERSION_STRING, version);
17898                         return 1;
17899                 }
17900         }
17901 #endif
17902
17903 #if DB_VERSION_MAJOR > 2
17904         db_env_create( NULL, 0 );
17905 #elif DB_VERSION_MAJOR > 1
17906         db_appexit( NULL );
17907 #else
17908         (void) dbopen( NULL, 0, 0, 0, NULL);
17909 #endif
17910
17911 ; return 0; }
17912 EOF
17913 if { (eval echo configure:17914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17914   rm -rf conftest*
17915   ol_cv_db_db_3=yes
17916 else
17917   echo "configure: failed program was:" >&5
17918   cat conftest.$ac_ext >&5
17919   rm -rf conftest*
17920   ol_cv_db_db_3=no
17921 fi
17922 rm -f conftest*
17923
17924         LIBS="$ol_LIBS"
17925
17926 fi
17927
17928 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17929
17930         if test $ol_cv_db_db_3 = yes ; then
17931                 ol_cv_lib_db=-ldb-3
17932         fi
17933 fi
17934
17935 if test $ol_cv_lib_db = no ; then
17936         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17937 echo "configure:17938: checking for Berkeley DB link (-ldb2)" >&5
17938 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17939   echo $ac_n "(cached) $ac_c" 1>&6
17940 else
17941   
17942         ol_DB_LIB=-ldb2
17943         ol_LIBS=$LIBS
17944         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17945
17946         cat > conftest.$ac_ext <<EOF
17947 #line 17948 "configure"
17948 #include "confdefs.h"
17949
17950 #ifdef HAVE_DB_185_H
17951 # include <db_185.h>
17952 #else
17953 # include <db.h>
17954 #endif
17955
17956 #ifndef DB_VERSION_MAJOR
17957 # define DB_VERSION_MAJOR 1
17958 #endif
17959
17960 #ifndef NULL
17961 #define NULL ((void*)0)
17962 #endif
17963
17964 int main() {
17965
17966 #if DB_VERSION_MAJOR > 1
17967         {
17968                 char *version;
17969                 int major, minor, patch;
17970
17971                 version = db_version( &major, &minor, &patch );
17972
17973                 if( major != DB_VERSION_MAJOR ||
17974                         minor < DB_VERSION_MINOR )
17975                 {
17976                         printf("Berkeley DB version mismatch\n"
17977                                 "\texpected: %s\n\tgot: %s\n",
17978                                 DB_VERSION_STRING, version);
17979                         return 1;
17980                 }
17981         }
17982 #endif
17983
17984 #if DB_VERSION_MAJOR > 2
17985         db_env_create( NULL, 0 );
17986 #elif DB_VERSION_MAJOR > 1
17987         db_appexit( NULL );
17988 #else
17989         (void) dbopen( NULL, 0, 0, 0, NULL);
17990 #endif
17991
17992 ; return 0; }
17993 EOF
17994 if { (eval echo configure:17995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17995   rm -rf conftest*
17996   ol_cv_db_db2=yes
17997 else
17998   echo "configure: failed program was:" >&5
17999   cat conftest.$ac_ext >&5
18000   rm -rf conftest*
18001   ol_cv_db_db2=no
18002 fi
18003 rm -f conftest*
18004
18005         LIBS="$ol_LIBS"
18006
18007 fi
18008
18009 echo "$ac_t""$ol_cv_db_db2" 1>&6
18010
18011         if test $ol_cv_db_db2 = yes ; then
18012                 ol_cv_lib_db=-ldb2
18013         fi
18014 fi
18015
18016 if test $ol_cv_lib_db = no ; then
18017         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18018 echo "configure:18019: checking for Berkeley DB link (-ldb-2)" >&5
18019 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18020   echo $ac_n "(cached) $ac_c" 1>&6
18021 else
18022   
18023         ol_DB_LIB=-ldb-2
18024         ol_LIBS=$LIBS
18025         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18026
18027         cat > conftest.$ac_ext <<EOF
18028 #line 18029 "configure"
18029 #include "confdefs.h"
18030
18031 #ifdef HAVE_DB_185_H
18032 # include <db_185.h>
18033 #else
18034 # include <db.h>
18035 #endif
18036
18037 #ifndef DB_VERSION_MAJOR
18038 # define DB_VERSION_MAJOR 1
18039 #endif
18040
18041 #ifndef NULL
18042 #define NULL ((void*)0)
18043 #endif
18044
18045 int main() {
18046
18047 #if DB_VERSION_MAJOR > 1
18048         {
18049                 char *version;
18050                 int major, minor, patch;
18051
18052                 version = db_version( &major, &minor, &patch );
18053
18054                 if( major != DB_VERSION_MAJOR ||
18055                         minor < DB_VERSION_MINOR )
18056                 {
18057                         printf("Berkeley DB version mismatch\n"
18058                                 "\texpected: %s\n\tgot: %s\n",
18059                                 DB_VERSION_STRING, version);
18060                         return 1;
18061                 }
18062         }
18063 #endif
18064
18065 #if DB_VERSION_MAJOR > 2
18066         db_env_create( NULL, 0 );
18067 #elif DB_VERSION_MAJOR > 1
18068         db_appexit( NULL );
18069 #else
18070         (void) dbopen( NULL, 0, 0, 0, NULL);
18071 #endif
18072
18073 ; return 0; }
18074 EOF
18075 if { (eval echo configure:18076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18076   rm -rf conftest*
18077   ol_cv_db_db_2=yes
18078 else
18079   echo "configure: failed program was:" >&5
18080   cat conftest.$ac_ext >&5
18081   rm -rf conftest*
18082   ol_cv_db_db_2=no
18083 fi
18084 rm -f conftest*
18085
18086         LIBS="$ol_LIBS"
18087
18088 fi
18089
18090 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18091
18092         if test $ol_cv_db_db_2 = yes ; then
18093                 ol_cv_lib_db=-ldb-2
18094         fi
18095 fi
18096
18097 if test $ol_cv_lib_db = no ; then
18098         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18099 echo "configure:18100: checking for Berkeley DB link (-ldb1)" >&5
18100 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18101   echo $ac_n "(cached) $ac_c" 1>&6
18102 else
18103   
18104         ol_DB_LIB=-ldb1
18105         ol_LIBS=$LIBS
18106         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18107
18108         cat > conftest.$ac_ext <<EOF
18109 #line 18110 "configure"
18110 #include "confdefs.h"
18111
18112 #ifdef HAVE_DB_185_H
18113 # include <db_185.h>
18114 #else
18115 # include <db.h>
18116 #endif
18117
18118 #ifndef DB_VERSION_MAJOR
18119 # define DB_VERSION_MAJOR 1
18120 #endif
18121
18122 #ifndef NULL
18123 #define NULL ((void*)0)
18124 #endif
18125
18126 int main() {
18127
18128 #if DB_VERSION_MAJOR > 1
18129         {
18130                 char *version;
18131                 int major, minor, patch;
18132
18133                 version = db_version( &major, &minor, &patch );
18134
18135                 if( major != DB_VERSION_MAJOR ||
18136                         minor < DB_VERSION_MINOR )
18137                 {
18138                         printf("Berkeley DB version mismatch\n"
18139                                 "\texpected: %s\n\tgot: %s\n",
18140                                 DB_VERSION_STRING, version);
18141                         return 1;
18142                 }
18143         }
18144 #endif
18145
18146 #if DB_VERSION_MAJOR > 2
18147         db_env_create( NULL, 0 );
18148 #elif DB_VERSION_MAJOR > 1
18149         db_appexit( NULL );
18150 #else
18151         (void) dbopen( NULL, 0, 0, 0, NULL);
18152 #endif
18153
18154 ; return 0; }
18155 EOF
18156 if { (eval echo configure:18157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18157   rm -rf conftest*
18158   ol_cv_db_db1=yes
18159 else
18160   echo "configure: failed program was:" >&5
18161   cat conftest.$ac_ext >&5
18162   rm -rf conftest*
18163   ol_cv_db_db1=no
18164 fi
18165 rm -f conftest*
18166
18167         LIBS="$ol_LIBS"
18168
18169 fi
18170
18171 echo "$ac_t""$ol_cv_db_db1" 1>&6
18172
18173         if test $ol_cv_db_db1 = yes ; then
18174                 ol_cv_lib_db=-ldb1
18175         fi
18176 fi
18177
18178 if test $ol_cv_lib_db = no ; then
18179         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18180 echo "configure:18181: checking for Berkeley DB link (-ldb-1)" >&5
18181 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18182   echo $ac_n "(cached) $ac_c" 1>&6
18183 else
18184   
18185         ol_DB_LIB=-ldb-1
18186         ol_LIBS=$LIBS
18187         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18188
18189         cat > conftest.$ac_ext <<EOF
18190 #line 18191 "configure"
18191 #include "confdefs.h"
18192
18193 #ifdef HAVE_DB_185_H
18194 # include <db_185.h>
18195 #else
18196 # include <db.h>
18197 #endif
18198
18199 #ifndef DB_VERSION_MAJOR
18200 # define DB_VERSION_MAJOR 1
18201 #endif
18202
18203 #ifndef NULL
18204 #define NULL ((void*)0)
18205 #endif
18206
18207 int main() {
18208
18209 #if DB_VERSION_MAJOR > 1
18210         {
18211                 char *version;
18212                 int major, minor, patch;
18213
18214                 version = db_version( &major, &minor, &patch );
18215
18216                 if( major != DB_VERSION_MAJOR ||
18217                         minor < DB_VERSION_MINOR )
18218                 {
18219                         printf("Berkeley DB version mismatch\n"
18220                                 "\texpected: %s\n\tgot: %s\n",
18221                                 DB_VERSION_STRING, version);
18222                         return 1;
18223                 }
18224         }
18225 #endif
18226
18227 #if DB_VERSION_MAJOR > 2
18228         db_env_create( NULL, 0 );
18229 #elif DB_VERSION_MAJOR > 1
18230         db_appexit( NULL );
18231 #else
18232         (void) dbopen( NULL, 0, 0, 0, NULL);
18233 #endif
18234
18235 ; return 0; }
18236 EOF
18237 if { (eval echo configure:18238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18238   rm -rf conftest*
18239   ol_cv_db_db_1=yes
18240 else
18241   echo "configure: failed program was:" >&5
18242   cat conftest.$ac_ext >&5
18243   rm -rf conftest*
18244   ol_cv_db_db_1=no
18245 fi
18246 rm -f conftest*
18247
18248         LIBS="$ol_LIBS"
18249
18250 fi
18251
18252 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18253
18254         if test $ol_cv_db_db_1 = yes ; then
18255                 ol_cv_lib_db=-ldb-1
18256         fi
18257 fi
18258
18259
18260         if test "$ol_cv_lib_db" != no ; then
18261                 ol_cv_berkeley_db=yes
18262                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18263 echo "configure:18264: checking for Berkeley DB thread support" >&5
18264 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18265   echo $ac_n "(cached) $ac_c" 1>&6
18266 else
18267   
18268         ol_LIBS="$LIBS"
18269         LIBS="$LTHREAD_LIBS $LIBS"
18270         if test $ol_cv_lib_db != yes ; then
18271                 LIBS="$ol_cv_lib_db $LIBS"
18272         fi
18273
18274         if test "$cross_compiling" = yes; then
18275   ol_cv_berkeley_db_thread=cross
18276 else
18277   cat > conftest.$ac_ext <<EOF
18278 #line 18279 "configure"
18279 #include "confdefs.h"
18280
18281 #ifdef HAVE_DB_185_H
18282         choke me;
18283 #else
18284 #include <db.h>
18285 #endif
18286 #ifndef NULL
18287 #define NULL ((void *)0)
18288 #endif
18289 main()
18290 {
18291         int rc;
18292         u_int32_t flags = DB_CREATE |
18293 #ifdef DB_PRIVATE
18294                 DB_PRIVATE |
18295 #endif
18296                 DB_THREAD;
18297
18298 #if DB_VERSION_MAJOR > 2
18299         DB_ENV *env = NULL;
18300
18301         rc = db_env_create( &env, 0 );
18302
18303         flags |= DB_INIT_MPOOL;
18304 #ifdef DB_MPOOL_PRIVATE
18305         flags |= DB_MPOOL_PRIVATE;
18306 #endif
18307
18308         if( rc ) {
18309                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18310                 return rc;
18311         }
18312
18313 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18314         rc = env->open( env, NULL, flags, 0 );
18315 #else
18316         rc = env->open( env, NULL, NULL, flags, 0 );
18317 #endif
18318
18319         if ( rc == 0 ) {
18320                 rc = env->close( env, 0 );
18321         }
18322
18323         if( rc ) {
18324                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18325                 return rc;
18326         }
18327
18328 #else
18329         DB_ENV env;
18330         memset( &env, '\0', sizeof(env) );
18331
18332         rc = db_appinit( NULL, NULL, &env, flags );
18333
18334         if( rc == 0 ) {
18335                 db_appexit( &env );
18336         }
18337
18338         unlink("__db_mpool.share");
18339         unlink("__db_lock.share");
18340 #endif
18341
18342         return rc;
18343 }
18344 EOF
18345 if { (eval echo configure:18346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18346 then
18347   ol_cv_berkeley_db_thread=yes
18348 else
18349   echo "configure: failed program was:" >&5
18350   cat conftest.$ac_ext >&5
18351   rm -fr conftest*
18352   ol_cv_berkeley_db_thread=no
18353 fi
18354 rm -fr conftest*
18355 fi
18356
18357
18358         LIBS="$ol_LIBS"
18359
18360 fi
18361
18362 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18363
18364         if test $ol_cv_berkeley_db_thread != no ; then
18365                 cat >> confdefs.h <<\EOF
18366 #define HAVE_BERKELEY_DB_THREAD 1
18367 EOF
18368
18369         fi
18370
18371         fi
18372 fi
18373
18374         fi
18375
18376         if test $ol_cv_berkeley_db != no ; then
18377                 cat >> confdefs.h <<\EOF
18378 #define HAVE_BERKELEY_DB 1
18379 EOF
18380
18381
18382                 ol_link_ldbm=berkeley
18383                 ol_with_ldbm_api=berkeley
18384
18385                 if test $ol_with_ldbm_type = hash ; then
18386                         cat >> confdefs.h <<\EOF
18387 #define LDBM_USE_DBHASH 1
18388 EOF
18389
18390                 else
18391                         cat >> confdefs.h <<\EOF
18392 #define LDBM_USE_DBBTREE 1
18393 EOF
18394
18395                 fi
18396
18397                                                 if test $ol_cv_lib_db != yes ; then
18398                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18399                 fi
18400         fi
18401 fi
18402
18403 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18404         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18405 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18406         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18407 echo "configure:18408: checking Berkeley DB version for BDB backend" >&5
18408 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18409   echo $ac_n "(cached) $ac_c" 1>&6
18410 else
18411   
18412         cat > conftest.$ac_ext <<EOF
18413 #line 18414 "configure"
18414 #include "confdefs.h"
18415
18416 #include <db.h>
18417
18418  /* this check could be improved */
18419 #ifndef DB_VERSION_MAJOR
18420 #       define DB_VERSION_MAJOR 1
18421 #endif
18422
18423 /* require 4.0 or later */
18424 #if DB_VERSION_MAJOR >= 4 
18425         __db_version_compat
18426 #endif
18427         
18428 EOF
18429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18430   egrep "__db_version_compat" >/dev/null 2>&1; then
18431   rm -rf conftest*
18432   ol_cv_bdb_compat=yes
18433 else
18434   rm -rf conftest*
18435   ol_cv_bdb_compat=no
18436 fi
18437 rm -f conftest*
18438
18439 fi
18440
18441 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18442
18443
18444         if test $ol_cv_bdb_compat = yes ; then
18445                 ol_enable_bdb=yes
18446         elif test $ol_enable_bdb = yes ; then
18447                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18448         else
18449                 ol_enable_bdb=no
18450         fi
18451 fi
18452
18453 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18454         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18455         ol_with_ldbm_api=none
18456 fi
18457
18458 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18459         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18460 echo "configure:18461: checking for MDBM library" >&5
18461 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18462   echo $ac_n "(cached) $ac_c" 1>&6
18463 else
18464         ol_LIBS="$LIBS"
18465         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18466 echo "configure:18467: checking for mdbm_set_chain" >&5
18467 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18468   echo $ac_n "(cached) $ac_c" 1>&6
18469 else
18470   cat > conftest.$ac_ext <<EOF
18471 #line 18472 "configure"
18472 #include "confdefs.h"
18473 /* System header to define __stub macros and hopefully few prototypes,
18474     which can conflict with char mdbm_set_chain(); below.  */
18475 #include <assert.h>
18476 /* Override any gcc2 internal prototype to avoid an error.  */
18477 /* We use char because int might match the return type of a gcc2
18478     builtin and then its argument prototype would still apply.  */
18479 char mdbm_set_chain();
18480 char (*f)();
18481
18482 int main() {
18483
18484 /* The GNU C library defines this for functions which it implements
18485     to always fail with ENOSYS.  Some functions are actually named
18486     something starting with __ and the normal name is an alias.  */
18487 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18488 choke me
18489 #else
18490 f = mdbm_set_chain;
18491 #endif
18492
18493 ; return 0; }
18494 EOF
18495 if { (eval echo configure:18496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18496   rm -rf conftest*
18497   eval "ac_cv_func_mdbm_set_chain=yes"
18498 else
18499   echo "configure: failed program was:" >&5
18500   cat conftest.$ac_ext >&5
18501   rm -rf conftest*
18502   eval "ac_cv_func_mdbm_set_chain=no"
18503 fi
18504 rm -f conftest*
18505 fi
18506
18507 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18508   echo "$ac_t""yes" 1>&6
18509   ol_cv_lib_mdbm=yes
18510 else
18511   echo "$ac_t""no" 1>&6
18512
18513                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18514 echo "configure:18515: checking for mdbm_set_chain in -lmdbm" >&5
18515 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18516 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18517   echo $ac_n "(cached) $ac_c" 1>&6
18518 else
18519   ac_save_LIBS="$LIBS"
18520 LIBS="-lmdbm  $LIBS"
18521 cat > conftest.$ac_ext <<EOF
18522 #line 18523 "configure"
18523 #include "confdefs.h"
18524 /* Override any gcc2 internal prototype to avoid an error.  */
18525 /* We use char because int might match the return type of a gcc2
18526     builtin and then its argument prototype would still apply.  */
18527 char mdbm_set_chain();
18528
18529 int main() {
18530 mdbm_set_chain()
18531 ; return 0; }
18532 EOF
18533 if { (eval echo configure:18534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18534   rm -rf conftest*
18535   eval "ac_cv_lib_$ac_lib_var=yes"
18536 else
18537   echo "configure: failed program was:" >&5
18538   cat conftest.$ac_ext >&5
18539   rm -rf conftest*
18540   eval "ac_cv_lib_$ac_lib_var=no"
18541 fi
18542 rm -f conftest*
18543 LIBS="$ac_save_LIBS"
18544
18545 fi
18546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18547   echo "$ac_t""yes" 1>&6
18548   ol_cv_lib_mdbm=-lmdbm
18549 else
18550   echo "$ac_t""no" 1>&6
18551 ol_cv_lib_mdbm=no
18552 fi
18553
18554         
18555 fi
18556
18557         LIBS="$ol_LIBS"
18558
18559 fi
18560
18561 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18562
18563
18564  for ac_hdr in mdbm.h
18565 do
18566 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18567 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18568 echo "configure:18569: checking for $ac_hdr" >&5
18569 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18570   echo $ac_n "(cached) $ac_c" 1>&6
18571 else
18572   cat > conftest.$ac_ext <<EOF
18573 #line 18574 "configure"
18574 #include "confdefs.h"
18575 #include <$ac_hdr>
18576 EOF
18577 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18578 { (eval echo configure:18579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18579 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18580 if test -z "$ac_err"; then
18581   rm -rf conftest*
18582   eval "ac_cv_header_$ac_safe=yes"
18583 else
18584   echo "$ac_err" >&5
18585   echo "configure: failed program was:" >&5
18586   cat conftest.$ac_ext >&5
18587   rm -rf conftest*
18588   eval "ac_cv_header_$ac_safe=no"
18589 fi
18590 rm -f conftest*
18591 fi
18592 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18593   echo "$ac_t""yes" 1>&6
18594     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18595   cat >> confdefs.h <<EOF
18596 #define $ac_tr_hdr 1
18597 EOF
18598  
18599 else
18600   echo "$ac_t""no" 1>&6
18601 fi
18602 done
18603
18604  echo $ac_n "checking for db""... $ac_c" 1>&6
18605 echo "configure:18606: checking for db" >&5
18606 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18607   echo $ac_n "(cached) $ac_c" 1>&6
18608 else
18609   
18610         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18611                 ol_cv_mdbm=no
18612         else
18613                 ol_cv_mdbm=yes
18614         fi
18615
18616 fi
18617
18618 echo "$ac_t""$ol_cv_mdbm" 1>&6
18619  if test $ol_cv_mdbm = yes ; then
18620         cat >> confdefs.h <<\EOF
18621 #define HAVE_MDBM 1
18622 EOF
18623
18624  fi
18625
18626
18627         if test $ol_cv_mdbm = yes ; then
18628                 ol_link_ldbm=mdbm
18629                 ol_with_ldbm_api=mdbm
18630                 if test $ol_cv_lib_mdbm != yes ; then
18631                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18632                 fi
18633         fi
18634 fi
18635
18636 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18637         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18638 echo "configure:18639: checking for GDBM library" >&5
18639 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18640   echo $ac_n "(cached) $ac_c" 1>&6
18641 else
18642         ol_LIBS="$LIBS"
18643         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18644 echo "configure:18645: checking for gdbm_open" >&5
18645 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18646   echo $ac_n "(cached) $ac_c" 1>&6
18647 else
18648   cat > conftest.$ac_ext <<EOF
18649 #line 18650 "configure"
18650 #include "confdefs.h"
18651 /* System header to define __stub macros and hopefully few prototypes,
18652     which can conflict with char gdbm_open(); below.  */
18653 #include <assert.h>
18654 /* Override any gcc2 internal prototype to avoid an error.  */
18655 /* We use char because int might match the return type of a gcc2
18656     builtin and then its argument prototype would still apply.  */
18657 char gdbm_open();
18658 char (*f)();
18659
18660 int main() {
18661
18662 /* The GNU C library defines this for functions which it implements
18663     to always fail with ENOSYS.  Some functions are actually named
18664     something starting with __ and the normal name is an alias.  */
18665 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18666 choke me
18667 #else
18668 f = gdbm_open;
18669 #endif
18670
18671 ; return 0; }
18672 EOF
18673 if { (eval echo configure:18674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18674   rm -rf conftest*
18675   eval "ac_cv_func_gdbm_open=yes"
18676 else
18677   echo "configure: failed program was:" >&5
18678   cat conftest.$ac_ext >&5
18679   rm -rf conftest*
18680   eval "ac_cv_func_gdbm_open=no"
18681 fi
18682 rm -f conftest*
18683 fi
18684
18685 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18686   echo "$ac_t""yes" 1>&6
18687   ol_cv_lib_gdbm=yes
18688 else
18689   echo "$ac_t""no" 1>&6
18690
18691                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18692 echo "configure:18693: checking for gdbm_open in -lgdbm" >&5
18693 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18695   echo $ac_n "(cached) $ac_c" 1>&6
18696 else
18697   ac_save_LIBS="$LIBS"
18698 LIBS="-lgdbm  $LIBS"
18699 cat > conftest.$ac_ext <<EOF
18700 #line 18701 "configure"
18701 #include "confdefs.h"
18702 /* Override any gcc2 internal prototype to avoid an error.  */
18703 /* We use char because int might match the return type of a gcc2
18704     builtin and then its argument prototype would still apply.  */
18705 char gdbm_open();
18706
18707 int main() {
18708 gdbm_open()
18709 ; return 0; }
18710 EOF
18711 if { (eval echo configure:18712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18712   rm -rf conftest*
18713   eval "ac_cv_lib_$ac_lib_var=yes"
18714 else
18715   echo "configure: failed program was:" >&5
18716   cat conftest.$ac_ext >&5
18717   rm -rf conftest*
18718   eval "ac_cv_lib_$ac_lib_var=no"
18719 fi
18720 rm -f conftest*
18721 LIBS="$ac_save_LIBS"
18722
18723 fi
18724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18725   echo "$ac_t""yes" 1>&6
18726   ol_cv_lib_gdbm=-lgdbm
18727 else
18728   echo "$ac_t""no" 1>&6
18729 ol_cv_lib_gdbm=no
18730 fi
18731
18732         
18733 fi
18734
18735         LIBS="$ol_LIBS"
18736
18737 fi
18738
18739 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18740
18741
18742  for ac_hdr in gdbm.h
18743 do
18744 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18745 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18746 echo "configure:18747: checking for $ac_hdr" >&5
18747 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18748   echo $ac_n "(cached) $ac_c" 1>&6
18749 else
18750   cat > conftest.$ac_ext <<EOF
18751 #line 18752 "configure"
18752 #include "confdefs.h"
18753 #include <$ac_hdr>
18754 EOF
18755 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18756 { (eval echo configure:18757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18757 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18758 if test -z "$ac_err"; then
18759   rm -rf conftest*
18760   eval "ac_cv_header_$ac_safe=yes"
18761 else
18762   echo "$ac_err" >&5
18763   echo "configure: failed program was:" >&5
18764   cat conftest.$ac_ext >&5
18765   rm -rf conftest*
18766   eval "ac_cv_header_$ac_safe=no"
18767 fi
18768 rm -f conftest*
18769 fi
18770 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18771   echo "$ac_t""yes" 1>&6
18772     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18773   cat >> confdefs.h <<EOF
18774 #define $ac_tr_hdr 1
18775 EOF
18776  
18777 else
18778   echo "$ac_t""no" 1>&6
18779 fi
18780 done
18781
18782  echo $ac_n "checking for db""... $ac_c" 1>&6
18783 echo "configure:18784: checking for db" >&5
18784 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18785   echo $ac_n "(cached) $ac_c" 1>&6
18786 else
18787   
18788         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18789                 ol_cv_gdbm=no
18790         else
18791                 ol_cv_gdbm=yes
18792         fi
18793
18794 fi
18795
18796 echo "$ac_t""$ol_cv_gdbm" 1>&6
18797  if test $ol_cv_gdbm = yes ; then
18798         cat >> confdefs.h <<\EOF
18799 #define HAVE_GDBM 1
18800 EOF
18801
18802  fi
18803
18804
18805         if test $ol_cv_gdbm = yes ; then
18806                 ol_link_ldbm=gdbm
18807                 ol_with_ldbm_api=gdbm
18808
18809                 if test $ol_cv_lib_gdbm != yes ; then
18810                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18811                 fi
18812         fi
18813 fi
18814
18815 if test $ol_with_ldbm_api = ndbm ; then
18816         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18817 echo "configure:18818: checking for NDBM library" >&5
18818 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18819   echo $ac_n "(cached) $ac_c" 1>&6
18820 else
18821         ol_LIBS="$LIBS"
18822         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18823 echo "configure:18824: checking for dbm_open" >&5
18824 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18825   echo $ac_n "(cached) $ac_c" 1>&6
18826 else
18827   cat > conftest.$ac_ext <<EOF
18828 #line 18829 "configure"
18829 #include "confdefs.h"
18830 /* System header to define __stub macros and hopefully few prototypes,
18831     which can conflict with char dbm_open(); below.  */
18832 #include <assert.h>
18833 /* Override any gcc2 internal prototype to avoid an error.  */
18834 /* We use char because int might match the return type of a gcc2
18835     builtin and then its argument prototype would still apply.  */
18836 char dbm_open();
18837 char (*f)();
18838
18839 int main() {
18840
18841 /* The GNU C library defines this for functions which it implements
18842     to always fail with ENOSYS.  Some functions are actually named
18843     something starting with __ and the normal name is an alias.  */
18844 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18845 choke me
18846 #else
18847 f = dbm_open;
18848 #endif
18849
18850 ; return 0; }
18851 EOF
18852 if { (eval echo configure:18853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18853   rm -rf conftest*
18854   eval "ac_cv_func_dbm_open=yes"
18855 else
18856   echo "configure: failed program was:" >&5
18857   cat conftest.$ac_ext >&5
18858   rm -rf conftest*
18859   eval "ac_cv_func_dbm_open=no"
18860 fi
18861 rm -f conftest*
18862 fi
18863
18864 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18865   echo "$ac_t""yes" 1>&6
18866   ol_cv_lib_ndbm=yes
18867 else
18868   echo "$ac_t""no" 1>&6
18869
18870                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18871 echo "configure:18872: checking for dbm_open in -lndbm" >&5
18872 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18873 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18874   echo $ac_n "(cached) $ac_c" 1>&6
18875 else
18876   ac_save_LIBS="$LIBS"
18877 LIBS="-lndbm  $LIBS"
18878 cat > conftest.$ac_ext <<EOF
18879 #line 18880 "configure"
18880 #include "confdefs.h"
18881 /* Override any gcc2 internal prototype to avoid an error.  */
18882 /* We use char because int might match the return type of a gcc2
18883     builtin and then its argument prototype would still apply.  */
18884 char dbm_open();
18885
18886 int main() {
18887 dbm_open()
18888 ; return 0; }
18889 EOF
18890 if { (eval echo configure:18891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18891   rm -rf conftest*
18892   eval "ac_cv_lib_$ac_lib_var=yes"
18893 else
18894   echo "configure: failed program was:" >&5
18895   cat conftest.$ac_ext >&5
18896   rm -rf conftest*
18897   eval "ac_cv_lib_$ac_lib_var=no"
18898 fi
18899 rm -f conftest*
18900 LIBS="$ac_save_LIBS"
18901
18902 fi
18903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18904   echo "$ac_t""yes" 1>&6
18905   ol_cv_lib_ndbm=-lndbm
18906 else
18907   echo "$ac_t""no" 1>&6
18908
18909                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18910 echo "configure:18911: checking for dbm_open in -ldbm" >&5
18911 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18912 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18913   echo $ac_n "(cached) $ac_c" 1>&6
18914 else
18915   ac_save_LIBS="$LIBS"
18916 LIBS="-ldbm  $LIBS"
18917 cat > conftest.$ac_ext <<EOF
18918 #line 18919 "configure"
18919 #include "confdefs.h"
18920 /* Override any gcc2 internal prototype to avoid an error.  */
18921 /* We use char because int might match the return type of a gcc2
18922     builtin and then its argument prototype would still apply.  */
18923 char dbm_open();
18924
18925 int main() {
18926 dbm_open()
18927 ; return 0; }
18928 EOF
18929 if { (eval echo configure:18930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18930   rm -rf conftest*
18931   eval "ac_cv_lib_$ac_lib_var=yes"
18932 else
18933   echo "configure: failed program was:" >&5
18934   cat conftest.$ac_ext >&5
18935   rm -rf conftest*
18936   eval "ac_cv_lib_$ac_lib_var=no"
18937 fi
18938 rm -f conftest*
18939 LIBS="$ac_save_LIBS"
18940
18941 fi
18942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18943   echo "$ac_t""yes" 1>&6
18944   ol_cv_lib_ndbm=-ldbm
18945 else
18946   echo "$ac_t""no" 1>&6
18947 ol_cv_lib_ndbm=no
18948 fi
18949                 
18950 fi
18951
18952         
18953 fi
18954
18955         LIBS="$ol_LIBS"
18956
18957 fi
18958
18959 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18960
18961
18962  for ac_hdr in ndbm.h
18963 do
18964 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18965 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18966 echo "configure:18967: checking for $ac_hdr" >&5
18967 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18968   echo $ac_n "(cached) $ac_c" 1>&6
18969 else
18970   cat > conftest.$ac_ext <<EOF
18971 #line 18972 "configure"
18972 #include "confdefs.h"
18973 #include <$ac_hdr>
18974 EOF
18975 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18976 { (eval echo configure:18977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18977 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18978 if test -z "$ac_err"; then
18979   rm -rf conftest*
18980   eval "ac_cv_header_$ac_safe=yes"
18981 else
18982   echo "$ac_err" >&5
18983   echo "configure: failed program was:" >&5
18984   cat conftest.$ac_ext >&5
18985   rm -rf conftest*
18986   eval "ac_cv_header_$ac_safe=no"
18987 fi
18988 rm -f conftest*
18989 fi
18990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18991   echo "$ac_t""yes" 1>&6
18992     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18993   cat >> confdefs.h <<EOF
18994 #define $ac_tr_hdr 1
18995 EOF
18996  
18997 else
18998   echo "$ac_t""no" 1>&6
18999 fi
19000 done
19001
19002  echo $ac_n "checking for db""... $ac_c" 1>&6
19003 echo "configure:19004: checking for db" >&5
19004 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19005   echo $ac_n "(cached) $ac_c" 1>&6
19006 else
19007   
19008         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19009                 ol_cv_ndbm=no
19010         else
19011                 ol_cv_ndbm=yes
19012         fi
19013
19014 fi
19015
19016 echo "$ac_t""$ol_cv_ndbm" 1>&6
19017  if test $ol_cv_ndbm = yes ; then
19018         cat >> confdefs.h <<\EOF
19019 #define HAVE_NDBM 1
19020 EOF
19021
19022  fi
19023
19024
19025         if test $ol_cv_ndbm = yes ; then
19026                 ol_link_ldbm=ndbm
19027                 ol_with_ldbm_api=ndbm
19028
19029                 if test $ol_cv_lib_ndbm != yes ; then
19030                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19031                 fi
19032         fi
19033 fi
19034
19035 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19036         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19037         if test $ol_enable_ldbm = yes ; then
19038                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19039         fi
19040
19041         echo "configure: warning: disabling LDBM" 1>&2
19042         ol_enable_ldbm=no
19043 fi
19044
19045 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19046         BUILD_LIBS_DYNAMIC=shared
19047         cat >> confdefs.h <<\EOF
19048 #define LDAP_LIBS_DYNAMIC 1
19049 EOF
19050
19051 else
19052         BUILD_LIBS_DYNAMIC=static
19053 fi
19054
19055 if test $ol_enable_wrappers != no ; then
19056         for ac_hdr in tcpd.h
19057 do
19058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19060 echo "configure:19061: checking for $ac_hdr" >&5
19061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19062   echo $ac_n "(cached) $ac_c" 1>&6
19063 else
19064   cat > conftest.$ac_ext <<EOF
19065 #line 19066 "configure"
19066 #include "confdefs.h"
19067 #include <$ac_hdr>
19068 EOF
19069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19070 { (eval echo configure:19071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19072 if test -z "$ac_err"; then
19073   rm -rf conftest*
19074   eval "ac_cv_header_$ac_safe=yes"
19075 else
19076   echo "$ac_err" >&5
19077   echo "configure: failed program was:" >&5
19078   cat conftest.$ac_ext >&5
19079   rm -rf conftest*
19080   eval "ac_cv_header_$ac_safe=no"
19081 fi
19082 rm -f conftest*
19083 fi
19084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19085   echo "$ac_t""yes" 1>&6
19086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19087   cat >> confdefs.h <<EOF
19088 #define $ac_tr_hdr 1
19089 EOF
19090  
19091                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19092 echo "configure:19093: checking for TCP wrappers library" >&5
19093                 save_LIBS="$LIBS"
19094                 LIBS="$LIBS -lwrap"
19095                 cat > conftest.$ac_ext <<EOF
19096 #line 19097 "configure"
19097 #include "confdefs.h"
19098
19099 #include <tcpd.h>
19100 int allow_severity = 0;
19101 int deny_severity  = 0;
19102
19103 struct request_info *req;
19104                 
19105 int main() {
19106
19107 hosts_access(req)
19108                 
19109 ; return 0; }
19110 EOF
19111 if { (eval echo configure:19112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19112   rm -rf conftest*
19113   echo "$ac_t""-lwrap" 1>&6
19114                 have_wrappers=yes
19115                 LIBS="$save_LIBS"
19116 else
19117   echo "configure: failed program was:" >&5
19118   cat conftest.$ac_ext >&5
19119   rm -rf conftest*
19120   
19121                                 LIBS="$LIBS -lnsl"
19122                 cat > conftest.$ac_ext <<EOF
19123 #line 19124 "configure"
19124 #include "confdefs.h"
19125
19126 #include <tcpd.h>
19127 int allow_severity = 0;
19128 int deny_severity  = 0;
19129
19130 struct request_info *req;
19131                 
19132 int main() {
19133
19134 hosts_access(req)
19135                 
19136 ; return 0; }
19137 EOF
19138 if { (eval echo configure:19139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19139   rm -rf conftest*
19140   echo "$ac_t""-lwrap -lnsl" 1>&6
19141                 have_wrappers=yes
19142                 LIBS="$save_LIBS -lnsl"
19143 else
19144   echo "configure: failed program was:" >&5
19145   cat conftest.$ac_ext >&5
19146   rm -rf conftest*
19147   
19148                 echo "$ac_t""no" 1>&6
19149                 have_wrappers=no
19150                 LIBS=$save_LIBS
19151 fi
19152 rm -f conftest*
19153 fi
19154 rm -f conftest*
19155 else
19156   echo "$ac_t""no" 1>&6
19157 have_wrappers=no
19158 fi
19159 done
19160
19161
19162         if test $have_wrappers = yes ; then
19163                 cat >> confdefs.h <<\EOF
19164 #define HAVE_TCPD 1
19165 EOF
19166
19167                 WRAP_LIBS="-lwrap"
19168         elif test $ol_enable_wrappers = yes ; then
19169                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19170         else
19171                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19172                 WRAP_LIBS=""
19173         fi
19174 fi
19175
19176 if test $ol_enable_syslog != no ; then
19177         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19178 echo "configure:19179: checking for openlog" >&5
19179 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19180   echo $ac_n "(cached) $ac_c" 1>&6
19181 else
19182   cat > conftest.$ac_ext <<EOF
19183 #line 19184 "configure"
19184 #include "confdefs.h"
19185 /* System header to define __stub macros and hopefully few prototypes,
19186     which can conflict with char openlog(); below.  */
19187 #include <assert.h>
19188 /* Override any gcc2 internal prototype to avoid an error.  */
19189 /* We use char because int might match the return type of a gcc2
19190     builtin and then its argument prototype would still apply.  */
19191 char openlog();
19192 char (*f)();
19193
19194 int main() {
19195
19196 /* The GNU C library defines this for functions which it implements
19197     to always fail with ENOSYS.  Some functions are actually named
19198     something starting with __ and the normal name is an alias.  */
19199 #if defined (__stub_openlog) || defined (__stub___openlog)
19200 choke me
19201 #else
19202 f = openlog;
19203 #endif
19204
19205 ; return 0; }
19206 EOF
19207 if { (eval echo configure:19208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19208   rm -rf conftest*
19209   eval "ac_cv_func_openlog=yes"
19210 else
19211   echo "configure: failed program was:" >&5
19212   cat conftest.$ac_ext >&5
19213   rm -rf conftest*
19214   eval "ac_cv_func_openlog=no"
19215 fi
19216 rm -f conftest*
19217 fi
19218
19219 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19220   echo "$ac_t""yes" 1>&6
19221   :
19222 else
19223   echo "$ac_t""no" 1>&6
19224 fi
19225
19226         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19227                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19228         fi
19229         ol_enable_syslog=$ac_cv_func_openlog
19230 fi
19231
19232
19233 ol_link_sql=no
19234 if test $ol_enable_sql != no ; then
19235         for ac_hdr in sql.h sqlext.h
19236 do
19237 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19238 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19239 echo "configure:19240: checking for $ac_hdr" >&5
19240 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19241   echo $ac_n "(cached) $ac_c" 1>&6
19242 else
19243   cat > conftest.$ac_ext <<EOF
19244 #line 19245 "configure"
19245 #include "confdefs.h"
19246 #include <$ac_hdr>
19247 EOF
19248 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19249 { (eval echo configure:19250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19250 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19251 if test -z "$ac_err"; then
19252   rm -rf conftest*
19253   eval "ac_cv_header_$ac_safe=yes"
19254 else
19255   echo "$ac_err" >&5
19256   echo "configure: failed program was:" >&5
19257   cat conftest.$ac_ext >&5
19258   rm -rf conftest*
19259   eval "ac_cv_header_$ac_safe=no"
19260 fi
19261 rm -f conftest*
19262 fi
19263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19264   echo "$ac_t""yes" 1>&6
19265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19266   cat >> confdefs.h <<EOF
19267 #define $ac_tr_hdr 1
19268 EOF
19269  
19270 else
19271   echo "$ac_t""no" 1>&6
19272 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
19273         
19274 fi
19275 done
19276
19277
19278         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19279 echo "configure:19280: checking for SQLDriverConnect in -liodbc" >&5
19280 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19281 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19282   echo $ac_n "(cached) $ac_c" 1>&6
19283 else
19284   ac_save_LIBS="$LIBS"
19285 LIBS="-liodbc  $LIBS"
19286 cat > conftest.$ac_ext <<EOF
19287 #line 19288 "configure"
19288 #include "confdefs.h"
19289 /* Override any gcc2 internal prototype to avoid an error.  */
19290 /* We use char because int might match the return type of a gcc2
19291     builtin and then its argument prototype would still apply.  */
19292 char SQLDriverConnect();
19293
19294 int main() {
19295 SQLDriverConnect()
19296 ; return 0; }
19297 EOF
19298 if { (eval echo configure:19299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19299   rm -rf conftest*
19300   eval "ac_cv_lib_$ac_lib_var=yes"
19301 else
19302   echo "configure: failed program was:" >&5
19303   cat conftest.$ac_ext >&5
19304   rm -rf conftest*
19305   eval "ac_cv_lib_$ac_lib_var=no"
19306 fi
19307 rm -f conftest*
19308 LIBS="$ac_save_LIBS"
19309
19310 fi
19311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19312   echo "$ac_t""yes" 1>&6
19313   have_iodbc=yes
19314 else
19315   echo "$ac_t""no" 1>&6
19316 have_iodbc=no
19317 fi
19318
19319         if test $have_iodbc = yes ; then
19320                 ol_link_sql="-liodbc"
19321         else
19322                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19323 echo "configure:19324: checking for SQLDriverConnect in -lodbc" >&5
19324 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19326   echo $ac_n "(cached) $ac_c" 1>&6
19327 else
19328   ac_save_LIBS="$LIBS"
19329 LIBS="-lodbc  $LIBS"
19330 cat > conftest.$ac_ext <<EOF
19331 #line 19332 "configure"
19332 #include "confdefs.h"
19333 /* Override any gcc2 internal prototype to avoid an error.  */
19334 /* We use char because int might match the return type of a gcc2
19335     builtin and then its argument prototype would still apply.  */
19336 char SQLDriverConnect();
19337
19338 int main() {
19339 SQLDriverConnect()
19340 ; return 0; }
19341 EOF
19342 if { (eval echo configure:19343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19343   rm -rf conftest*
19344   eval "ac_cv_lib_$ac_lib_var=yes"
19345 else
19346   echo "configure: failed program was:" >&5
19347   cat conftest.$ac_ext >&5
19348   rm -rf conftest*
19349   eval "ac_cv_lib_$ac_lib_var=no"
19350 fi
19351 rm -f conftest*
19352 LIBS="$ac_save_LIBS"
19353
19354 fi
19355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19356   echo "$ac_t""yes" 1>&6
19357   have_odbc=yes
19358 else
19359   echo "$ac_t""no" 1>&6
19360 have_odbc=no
19361 fi
19362
19363                 if test $have_odbc = yes ; then
19364                         ol_link_sql="-lodbc"
19365                 fi
19366         fi
19367
19368         if test $ol_link_sql != no ; then
19369                 SLAPD_SQL_LIBS="$ol_link_sql"
19370
19371         elif test $ol_enable_sql != auto ; then
19372                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19373         fi
19374 fi
19375
19376 if test $ol_enable_tcl != no ; then
19377         for ac_hdr in tcl.h
19378 do
19379 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19380 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19381 echo "configure:19382: checking for $ac_hdr" >&5
19382 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19383   echo $ac_n "(cached) $ac_c" 1>&6
19384 else
19385   cat > conftest.$ac_ext <<EOF
19386 #line 19387 "configure"
19387 #include "confdefs.h"
19388 #include <$ac_hdr>
19389 EOF
19390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19391 { (eval echo configure:19392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19393 if test -z "$ac_err"; then
19394   rm -rf conftest*
19395   eval "ac_cv_header_$ac_safe=yes"
19396 else
19397   echo "$ac_err" >&5
19398   echo "configure: failed program was:" >&5
19399   cat conftest.$ac_ext >&5
19400   rm -rf conftest*
19401   eval "ac_cv_header_$ac_safe=no"
19402 fi
19403 rm -f conftest*
19404 fi
19405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19406   echo "$ac_t""yes" 1>&6
19407     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19408   cat >> confdefs.h <<EOF
19409 #define $ac_tr_hdr 1
19410 EOF
19411  
19412 else
19413   echo "$ac_t""no" 1>&6
19414 fi
19415 done
19416
19417
19418         if test $ac_cv_header_tcl_h != yes ; then
19419                 have_tcl=no
19420         else
19421                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19422                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19423 echo "configure:19424: checking for main in -l$lib" >&5
19424 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19426   echo $ac_n "(cached) $ac_c" 1>&6
19427 else
19428   ac_save_LIBS="$LIBS"
19429 LIBS="-l$lib  $LIBS"
19430 cat > conftest.$ac_ext <<EOF
19431 #line 19432 "configure"
19432 #include "confdefs.h"
19433
19434 int main() {
19435 main()
19436 ; return 0; }
19437 EOF
19438 if { (eval echo configure:19439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19439   rm -rf conftest*
19440   eval "ac_cv_lib_$ac_lib_var=yes"
19441 else
19442   echo "configure: failed program was:" >&5
19443   cat conftest.$ac_ext >&5
19444   rm -rf conftest*
19445   eval "ac_cv_lib_$ac_lib_var=no"
19446 fi
19447 rm -f conftest*
19448 LIBS="$ac_save_LIBS"
19449
19450 fi
19451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19452   echo "$ac_t""yes" 1>&6
19453   have_tcl=yes
19454                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19455                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19456                            else
19457                                         MOD_TCL_LIB="-l${lib}"
19458                            fi;break
19459 else
19460   echo "$ac_t""no" 1>&6
19461 have_tcl=no
19462 fi
19463
19464                 done
19465         fi
19466
19467         if test $have_tcl != yes ; then
19468                 echo "configure: warning: could not find -ltcl" 1>&2
19469                 if test $ol_enable_tcl = yes ; then
19470                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19471                 fi
19472
19473                 ol_enable_tcl=no
19474         fi
19475 fi
19476
19477 ol_link_termcap=no
19478 for ac_hdr in termcap.h ncurses.h
19479 do
19480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19482 echo "configure:19483: checking for $ac_hdr" >&5
19483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19484   echo $ac_n "(cached) $ac_c" 1>&6
19485 else
19486   cat > conftest.$ac_ext <<EOF
19487 #line 19488 "configure"
19488 #include "confdefs.h"
19489 #include <$ac_hdr>
19490 EOF
19491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19492 { (eval echo configure:19493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19494 if test -z "$ac_err"; then
19495   rm -rf conftest*
19496   eval "ac_cv_header_$ac_safe=yes"
19497 else
19498   echo "$ac_err" >&5
19499   echo "configure: failed program was:" >&5
19500   cat conftest.$ac_ext >&5
19501   rm -rf conftest*
19502   eval "ac_cv_header_$ac_safe=no"
19503 fi
19504 rm -f conftest*
19505 fi
19506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19507   echo "$ac_t""yes" 1>&6
19508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19509   cat >> confdefs.h <<EOF
19510 #define $ac_tr_hdr 1
19511 EOF
19512  
19513 else
19514   echo "$ac_t""no" 1>&6
19515 fi
19516 done
19517
19518
19519 if test $ol_link_termcap = no ; then
19520         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19521 echo "configure:19522: checking for tputs in -ltermcap" >&5
19522 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19523 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19524   echo $ac_n "(cached) $ac_c" 1>&6
19525 else
19526   ac_save_LIBS="$LIBS"
19527 LIBS="-ltermcap  $LIBS"
19528 cat > conftest.$ac_ext <<EOF
19529 #line 19530 "configure"
19530 #include "confdefs.h"
19531 /* Override any gcc2 internal prototype to avoid an error.  */
19532 /* We use char because int might match the return type of a gcc2
19533     builtin and then its argument prototype would still apply.  */
19534 char tputs();
19535
19536 int main() {
19537 tputs()
19538 ; return 0; }
19539 EOF
19540 if { (eval echo configure:19541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19541   rm -rf conftest*
19542   eval "ac_cv_lib_$ac_lib_var=yes"
19543 else
19544   echo "configure: failed program was:" >&5
19545   cat conftest.$ac_ext >&5
19546   rm -rf conftest*
19547   eval "ac_cv_lib_$ac_lib_var=no"
19548 fi
19549 rm -f conftest*
19550 LIBS="$ac_save_LIBS"
19551
19552 fi
19553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19554   echo "$ac_t""yes" 1>&6
19555   have_termcap=yes
19556 else
19557   echo "$ac_t""no" 1>&6
19558 have_termcap=no
19559 fi
19560
19561         if test $have_termcap = yes ; then
19562                 cat >> confdefs.h <<\EOF
19563 #define HAVE_TERMCAP 1
19564 EOF
19565
19566                 ol_link_termcap=yes
19567                 TERMCAP_LIBS=-ltermcap
19568         fi
19569 fi
19570
19571 if test $ol_link_termcap = no ; then
19572         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19573 echo "configure:19574: checking for initscr in -lncurses" >&5
19574 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19575 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19576   echo $ac_n "(cached) $ac_c" 1>&6
19577 else
19578   ac_save_LIBS="$LIBS"
19579 LIBS="-lncurses  $LIBS"
19580 cat > conftest.$ac_ext <<EOF
19581 #line 19582 "configure"
19582 #include "confdefs.h"
19583 /* Override any gcc2 internal prototype to avoid an error.  */
19584 /* We use char because int might match the return type of a gcc2
19585     builtin and then its argument prototype would still apply.  */
19586 char initscr();
19587
19588 int main() {
19589 initscr()
19590 ; return 0; }
19591 EOF
19592 if { (eval echo configure:19593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19593   rm -rf conftest*
19594   eval "ac_cv_lib_$ac_lib_var=yes"
19595 else
19596   echo "configure: failed program was:" >&5
19597   cat conftest.$ac_ext >&5
19598   rm -rf conftest*
19599   eval "ac_cv_lib_$ac_lib_var=no"
19600 fi
19601 rm -f conftest*
19602 LIBS="$ac_save_LIBS"
19603
19604 fi
19605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19606   echo "$ac_t""yes" 1>&6
19607   have_ncurses=yes
19608 else
19609   echo "$ac_t""no" 1>&6
19610 have_ncurses=no
19611 fi
19612
19613         if test $have_ncurses = yes ; then
19614                 cat >> confdefs.h <<\EOF
19615 #define HAVE_NCURSES 1
19616 EOF
19617
19618                 ol_link_termcap=yes
19619                 TERMCAP_LIBS=-lncurses
19620         fi
19621 fi
19622
19623 if test $ol_link_termcap = no ; then
19624         cat >> confdefs.h <<\EOF
19625 #define NO_TERMCAP 1
19626 EOF
19627
19628         TERMCAP_LIBS=
19629 fi
19630
19631 ol_link_sasl=no
19632 ol_link_spasswd=no
19633 if test $ol_with_cyrus_sasl != no ; then
19634         for ac_hdr in sasl/sasl.h sasl.h
19635 do
19636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19638 echo "configure:19639: checking for $ac_hdr" >&5
19639 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19640   echo $ac_n "(cached) $ac_c" 1>&6
19641 else
19642   cat > conftest.$ac_ext <<EOF
19643 #line 19644 "configure"
19644 #include "confdefs.h"
19645 #include <$ac_hdr>
19646 EOF
19647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19648 { (eval echo configure:19649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19650 if test -z "$ac_err"; then
19651   rm -rf conftest*
19652   eval "ac_cv_header_$ac_safe=yes"
19653 else
19654   echo "$ac_err" >&5
19655   echo "configure: failed program was:" >&5
19656   cat conftest.$ac_ext >&5
19657   rm -rf conftest*
19658   eval "ac_cv_header_$ac_safe=no"
19659 fi
19660 rm -f conftest*
19661 fi
19662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19663   echo "$ac_t""yes" 1>&6
19664     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19665   cat >> confdefs.h <<EOF
19666 #define $ac_tr_hdr 1
19667 EOF
19668  
19669 else
19670   echo "$ac_t""no" 1>&6
19671 fi
19672 done
19673
19674
19675         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19676                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19677 echo "configure:19678: checking for sasl_client_init in -lsasl2" >&5
19678 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19680   echo $ac_n "(cached) $ac_c" 1>&6
19681 else
19682   ac_save_LIBS="$LIBS"
19683 LIBS="-lsasl2  $LIBS"
19684 cat > conftest.$ac_ext <<EOF
19685 #line 19686 "configure"
19686 #include "confdefs.h"
19687 /* Override any gcc2 internal prototype to avoid an error.  */
19688 /* We use char because int might match the return type of a gcc2
19689     builtin and then its argument prototype would still apply.  */
19690 char sasl_client_init();
19691
19692 int main() {
19693 sasl_client_init()
19694 ; return 0; }
19695 EOF
19696 if { (eval echo configure:19697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19697   rm -rf conftest*
19698   eval "ac_cv_lib_$ac_lib_var=yes"
19699 else
19700   echo "configure: failed program was:" >&5
19701   cat conftest.$ac_ext >&5
19702   rm -rf conftest*
19703   eval "ac_cv_lib_$ac_lib_var=no"
19704 fi
19705 rm -f conftest*
19706 LIBS="$ac_save_LIBS"
19707
19708 fi
19709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19710   echo "$ac_t""yes" 1>&6
19711   ol_link_sasl="-lsasl2"
19712 else
19713   echo "$ac_t""no" 1>&6
19714 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19715 echo "configure:19716: checking for sasl_client_init in -lsasl" >&5
19716 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19718   echo $ac_n "(cached) $ac_c" 1>&6
19719 else
19720   ac_save_LIBS="$LIBS"
19721 LIBS="-lsasl  $LIBS"
19722 cat > conftest.$ac_ext <<EOF
19723 #line 19724 "configure"
19724 #include "confdefs.h"
19725 /* Override any gcc2 internal prototype to avoid an error.  */
19726 /* We use char because int might match the return type of a gcc2
19727     builtin and then its argument prototype would still apply.  */
19728 char sasl_client_init();
19729
19730 int main() {
19731 sasl_client_init()
19732 ; return 0; }
19733 EOF
19734 if { (eval echo configure:19735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19735   rm -rf conftest*
19736   eval "ac_cv_lib_$ac_lib_var=yes"
19737 else
19738   echo "configure: failed program was:" >&5
19739   cat conftest.$ac_ext >&5
19740   rm -rf conftest*
19741   eval "ac_cv_lib_$ac_lib_var=no"
19742 fi
19743 rm -f conftest*
19744 LIBS="$ac_save_LIBS"
19745
19746 fi
19747 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19748   echo "$ac_t""yes" 1>&6
19749   ol_link_sasl="-lsasl"
19750 else
19751   echo "$ac_t""no" 1>&6
19752 fi
19753
19754 fi
19755
19756         fi
19757
19758         if test $ol_link_sasl = no ; then
19759                 if test $ol_with_cyrus_sasl != auto ; then
19760                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19761                 else
19762                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19763                         echo "configure: warning: SASL authentication not supported!" 1>&2
19764                         if test $ol_link_tls = no ; then
19765                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19766                         fi
19767                 fi
19768         else
19769                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19770 echo "configure:19771: checking Cyrus SASL library version" >&5
19771 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19772   echo $ac_n "(cached) $ac_c" 1>&6
19773 else
19774   
19775         cat > conftest.$ac_ext <<EOF
19776 #line 19777 "configure"
19777 #include "confdefs.h"
19778
19779 #ifdef HAVE_SASL_SASL_H
19780 #include <sasl/sasl.h>
19781 #else
19782 #include <sasl.h>
19783 #endif
19784
19785 /* require 2.1.3 or later */
19786 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19787         char *__sasl_compat = "1.5.x okay";
19788 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19789         __sasl_compat "2.2+ or better okay (we guess)";
19790 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19791         && SASL_VERSION_STEP >=3
19792         __sasl_compat = "2.1.3+ or better okay";
19793 #endif
19794         
19795 EOF
19796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19797   egrep "__sasl_compat" >/dev/null 2>&1; then
19798   rm -rf conftest*
19799   ol_cv_sasl_compat=yes
19800 else
19801   rm -rf conftest*
19802   ol_cv_sasl_compat=no
19803 fi
19804 rm -f conftest*
19805
19806 fi
19807
19808 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19809
19810                 if test $ol_cv_sasl_compat = no ; then
19811                         ol_link_sasl=no
19812                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19813                 fi
19814
19815                 cat >> confdefs.h <<\EOF
19816 #define HAVE_CYRUS_SASL 1
19817 EOF
19818
19819                 SASL_LIBS="$ol_link_sasl"
19820                 if test $ol_enable_spasswd != no ; then
19821                         ol_link_spasswd=yes
19822                 fi
19823
19824                 ac_save_LIBS="$LIBS"
19825                 LIBS="$LIBS $ol_link_sasl"
19826                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
19827 echo "configure:19828: checking for sasl_version" >&5
19828 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
19829   echo $ac_n "(cached) $ac_c" 1>&6
19830 else
19831   cat > conftest.$ac_ext <<EOF
19832 #line 19833 "configure"
19833 #include "confdefs.h"
19834 /* System header to define __stub macros and hopefully few prototypes,
19835     which can conflict with char sasl_version(); below.  */
19836 #include <assert.h>
19837 /* Override any gcc2 internal prototype to avoid an error.  */
19838 /* We use char because int might match the return type of a gcc2
19839     builtin and then its argument prototype would still apply.  */
19840 char sasl_version();
19841 char (*f)();
19842
19843 int main() {
19844
19845 /* The GNU C library defines this for functions which it implements
19846     to always fail with ENOSYS.  Some functions are actually named
19847     something starting with __ and the normal name is an alias.  */
19848 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
19849 choke me
19850 #else
19851 f = sasl_version;
19852 #endif
19853
19854 ; return 0; }
19855 EOF
19856 if { (eval echo configure:19857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19857   rm -rf conftest*
19858   eval "ac_cv_func_sasl_version=yes"
19859 else
19860   echo "configure: failed program was:" >&5
19861   cat conftest.$ac_ext >&5
19862   rm -rf conftest*
19863   eval "ac_cv_func_sasl_version=no"
19864 fi
19865 rm -f conftest*
19866 fi
19867
19868 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
19869   echo "$ac_t""yes" 1>&6
19870   cat >> confdefs.h <<\EOF
19871 #define HAVE_SASL_VERSION 1
19872 EOF
19873
19874 else
19875   echo "$ac_t""no" 1>&6
19876 fi
19877
19878                 LIBS="$ac_save_LIBS"
19879         fi
19880
19881 else
19882         echo "configure: warning: SASL authentication not supported!" 1>&2
19883         if test $ol_link_tls = no ; then
19884                 echo "configure: warning: Strong authentication not supported!" 1>&2
19885         fi
19886 fi
19887
19888 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19889         dev=no
19890         if test -r /dev/urandom ; then
19891                 dev="/dev/urandom";
19892         elif test -r /idev/urandom ; then
19893                 dev="/idev/urandom";
19894         elif test -r /dev/srandom ; then
19895                 dev="/dev/srandom";
19896         elif test -r /dev/random ; then
19897                 dev="/dev/random";
19898         elif test -r /idev/random ; then
19899                 dev="/idev/random";
19900         fi
19901
19902         if test $dev != no ; then
19903                 cat >> confdefs.h <<EOF
19904 #define URANDOM_DEVICE "$dev"
19905 EOF
19906
19907         fi
19908 fi
19909
19910 ol_link_fetch=no
19911 if test $ol_with_fetch != no ; then
19912         ol_LIBS=$LIBS
19913 LIBS="-lfetch -lcom_err $LIBS"
19914 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19915 echo "configure:19916: checking fetch(3) library" >&5
19916 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19917   echo $ac_n "(cached) $ac_c" 1>&6
19918 else
19919   
19920         cat > conftest.$ac_ext <<EOF
19921 #line 19922 "configure"
19922 #include "confdefs.h"
19923
19924 #include <sys/param.h>
19925 #include <stdio.h>
19926 #include <fetch.h>
19927 int main() {
19928 struct url *u = fetchParseURL("file:///"); 
19929 ; return 0; }
19930 EOF
19931 if { (eval echo configure:19932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19932   rm -rf conftest*
19933   ol_cv_lib_fetch=yes
19934 else
19935   echo "configure: failed program was:" >&5
19936   cat conftest.$ac_ext >&5
19937   rm -rf conftest*
19938   ol_cv_lib_fetch=no
19939 fi
19940 rm -f conftest*
19941 fi
19942
19943 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19944 LIBS=$ol_LIBS
19945 if test $ol_cv_lib_fetch != no ; then
19946         ol_link_fetch="-lfetch -lcom_err"
19947         cat >> confdefs.h <<\EOF
19948 #define HAVE_FETCH 1
19949 EOF
19950
19951 fi
19952
19953
19954         if test $ol_cv_lib_fetch != no ; then
19955                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19956                 ol_link_fetch=freebsd
19957
19958         elif test $ol_with_fetch != auto ; then
19959                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19960         fi 
19961 fi
19962
19963 ol_link_readline=no
19964 if test $ol_with_readline != no ; then
19965         for ac_hdr in readline/readline.h readline/history.h
19966 do
19967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19969 echo "configure:19970: checking for $ac_hdr" >&5
19970 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19971   echo $ac_n "(cached) $ac_c" 1>&6
19972 else
19973   cat > conftest.$ac_ext <<EOF
19974 #line 19975 "configure"
19975 #include "confdefs.h"
19976 #include <$ac_hdr>
19977 EOF
19978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19979 { (eval echo configure:19980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19981 if test -z "$ac_err"; then
19982   rm -rf conftest*
19983   eval "ac_cv_header_$ac_safe=yes"
19984 else
19985   echo "$ac_err" >&5
19986   echo "configure: failed program was:" >&5
19987   cat conftest.$ac_ext >&5
19988   rm -rf conftest*
19989   eval "ac_cv_header_$ac_safe=no"
19990 fi
19991 rm -f conftest*
19992 fi
19993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19994   echo "$ac_t""yes" 1>&6
19995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19996   cat >> confdefs.h <<EOF
19997 #define $ac_tr_hdr 1
19998 EOF
19999  
20000 else
20001   echo "$ac_t""no" 1>&6
20002 fi
20003 done
20004
20005
20006         if test $ac_cv_header_readline_readline_h = yes ; then
20007                 save_LIBS="$LIBS"
20008                 LIBS="$TERMCAP_LIBS $LIBS"
20009                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20010 echo "configure:20011: checking for readline in -lreadline" >&5
20011 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20012 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20013   echo $ac_n "(cached) $ac_c" 1>&6
20014 else
20015   ac_save_LIBS="$LIBS"
20016 LIBS="-lreadline  $LIBS"
20017 cat > conftest.$ac_ext <<EOF
20018 #line 20019 "configure"
20019 #include "confdefs.h"
20020 /* Override any gcc2 internal prototype to avoid an error.  */
20021 /* We use char because int might match the return type of a gcc2
20022     builtin and then its argument prototype would still apply.  */
20023 char readline();
20024
20025 int main() {
20026 readline()
20027 ; return 0; }
20028 EOF
20029 if { (eval echo configure:20030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20030   rm -rf conftest*
20031   eval "ac_cv_lib_$ac_lib_var=yes"
20032 else
20033   echo "configure: failed program was:" >&5
20034   cat conftest.$ac_ext >&5
20035   rm -rf conftest*
20036   eval "ac_cv_lib_$ac_lib_var=no"
20037 fi
20038 rm -f conftest*
20039 LIBS="$ac_save_LIBS"
20040
20041 fi
20042 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20043   echo "$ac_t""yes" 1>&6
20044   have_readline=yes
20045 else
20046   echo "$ac_t""no" 1>&6
20047 have_readline=no
20048 fi
20049
20050                 LIBS="$save_LIBS"
20051                         
20052                 if test $have_readline = yes ; then
20053                         ol_with_readline=found
20054                         ol_link_readline=yes
20055
20056                         READLINE_LIBS="-lreadline"
20057                 fi
20058         fi
20059 fi
20060
20061 if test $ol_link_readline = yes ; then
20062         cat >> confdefs.h <<\EOF
20063 #define HAVE_READLINE 1
20064 EOF
20065
20066 fi
20067
20068
20069 if test $ol_enable_crypt != no ; then
20070         save_LIBS="$LIBS"
20071         LIBS="$TLS_LIBS $LIBS"
20072
20073         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20074 echo "configure:20075: checking for crypt" >&5
20075 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20076   echo $ac_n "(cached) $ac_c" 1>&6
20077 else
20078   cat > conftest.$ac_ext <<EOF
20079 #line 20080 "configure"
20080 #include "confdefs.h"
20081 /* System header to define __stub macros and hopefully few prototypes,
20082     which can conflict with char crypt(); below.  */
20083 #include <assert.h>
20084 /* Override any gcc2 internal prototype to avoid an error.  */
20085 /* We use char because int might match the return type of a gcc2
20086     builtin and then its argument prototype would still apply.  */
20087 char crypt();
20088 char (*f)();
20089
20090 int main() {
20091
20092 /* The GNU C library defines this for functions which it implements
20093     to always fail with ENOSYS.  Some functions are actually named
20094     something starting with __ and the normal name is an alias.  */
20095 #if defined (__stub_crypt) || defined (__stub___crypt)
20096 choke me
20097 #else
20098 f = crypt;
20099 #endif
20100
20101 ; return 0; }
20102 EOF
20103 if { (eval echo configure:20104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20104   rm -rf conftest*
20105   eval "ac_cv_func_crypt=yes"
20106 else
20107   echo "configure: failed program was:" >&5
20108   cat conftest.$ac_ext >&5
20109   rm -rf conftest*
20110   eval "ac_cv_func_crypt=no"
20111 fi
20112 rm -f conftest*
20113 fi
20114
20115 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20116   echo "$ac_t""yes" 1>&6
20117   have_crypt=yes
20118 else
20119   echo "$ac_t""no" 1>&6
20120
20121                 LIBS="$save_LIBS"
20122                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20123 echo "configure:20124: checking for crypt in -lcrypt" >&5
20124 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20126   echo $ac_n "(cached) $ac_c" 1>&6
20127 else
20128   ac_save_LIBS="$LIBS"
20129 LIBS="-lcrypt  $LIBS"
20130 cat > conftest.$ac_ext <<EOF
20131 #line 20132 "configure"
20132 #include "confdefs.h"
20133 /* Override any gcc2 internal prototype to avoid an error.  */
20134 /* We use char because int might match the return type of a gcc2
20135     builtin and then its argument prototype would still apply.  */
20136 char crypt();
20137
20138 int main() {
20139 crypt()
20140 ; return 0; }
20141 EOF
20142 if { (eval echo configure:20143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20143   rm -rf conftest*
20144   eval "ac_cv_lib_$ac_lib_var=yes"
20145 else
20146   echo "configure: failed program was:" >&5
20147   cat conftest.$ac_ext >&5
20148   rm -rf conftest*
20149   eval "ac_cv_lib_$ac_lib_var=no"
20150 fi
20151 rm -f conftest*
20152 LIBS="$ac_save_LIBS"
20153
20154 fi
20155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20156   echo "$ac_t""yes" 1>&6
20157   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20158                         have_crypt=yes
20159 else
20160   echo "$ac_t""no" 1>&6
20161 have_crypt=no
20162 fi
20163
20164 fi
20165
20166
20167         LIBS="$save_LIBS"
20168
20169         if test $have_crypt = yes ; then
20170                 cat >> confdefs.h <<\EOF
20171 #define HAVE_CRYPT 1
20172 EOF
20173
20174         else
20175                 echo "configure: warning: could not find crypt" 1>&2
20176                 if test $ol_enable_crypt = yes ; then
20177                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20178                 fi
20179
20180                 echo "configure: warning: disabling crypt support" 1>&2
20181                 ol_enable_crypt=no
20182         fi
20183 fi
20184
20185 if test $ol_enable_proctitle != no ; then
20186         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20187 echo "configure:20188: checking for setproctitle" >&5
20188 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20189   echo $ac_n "(cached) $ac_c" 1>&6
20190 else
20191   cat > conftest.$ac_ext <<EOF
20192 #line 20193 "configure"
20193 #include "confdefs.h"
20194 /* System header to define __stub macros and hopefully few prototypes,
20195     which can conflict with char setproctitle(); below.  */
20196 #include <assert.h>
20197 /* Override any gcc2 internal prototype to avoid an error.  */
20198 /* We use char because int might match the return type of a gcc2
20199     builtin and then its argument prototype would still apply.  */
20200 char setproctitle();
20201 char (*f)();
20202
20203 int main() {
20204
20205 /* The GNU C library defines this for functions which it implements
20206     to always fail with ENOSYS.  Some functions are actually named
20207     something starting with __ and the normal name is an alias.  */
20208 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20209 choke me
20210 #else
20211 f = setproctitle;
20212 #endif
20213
20214 ; return 0; }
20215 EOF
20216 if { (eval echo configure:20217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20217   rm -rf conftest*
20218   eval "ac_cv_func_setproctitle=yes"
20219 else
20220   echo "configure: failed program was:" >&5
20221   cat conftest.$ac_ext >&5
20222   rm -rf conftest*
20223   eval "ac_cv_func_setproctitle=no"
20224 fi
20225 rm -f conftest*
20226 fi
20227
20228 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20229   echo "$ac_t""yes" 1>&6
20230   have_setproctitle=yes
20231 else
20232   echo "$ac_t""no" 1>&6
20233
20234                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20235 echo "configure:20236: checking for setproctitle in -lutil" >&5
20236 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20237 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20238   echo $ac_n "(cached) $ac_c" 1>&6
20239 else
20240   ac_save_LIBS="$LIBS"
20241 LIBS="-lutil  $LIBS"
20242 cat > conftest.$ac_ext <<EOF
20243 #line 20244 "configure"
20244 #include "confdefs.h"
20245 /* Override any gcc2 internal prototype to avoid an error.  */
20246 /* We use char because int might match the return type of a gcc2
20247     builtin and then its argument prototype would still apply.  */
20248 char setproctitle();
20249
20250 int main() {
20251 setproctitle()
20252 ; return 0; }
20253 EOF
20254 if { (eval echo configure:20255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20255   rm -rf conftest*
20256   eval "ac_cv_lib_$ac_lib_var=yes"
20257 else
20258   echo "configure: failed program was:" >&5
20259   cat conftest.$ac_ext >&5
20260   rm -rf conftest*
20261   eval "ac_cv_lib_$ac_lib_var=no"
20262 fi
20263 rm -f conftest*
20264 LIBS="$ac_save_LIBS"
20265
20266 fi
20267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20268   echo "$ac_t""yes" 1>&6
20269   have_setproctitle=yes
20270                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20271 else
20272   echo "$ac_t""no" 1>&6
20273 have_setproctitle=no
20274                         LIBOBJS="$LIBOBJS setproctitle.o"
20275                         LIBSRCS="$LIBSRCS setproctitle.c"
20276 fi
20277
20278 fi
20279
20280
20281         if test $have_setproctitle = yes ; then
20282                 cat >> confdefs.h <<\EOF
20283 #define HAVE_SETPROCTITLE 1
20284 EOF
20285
20286         fi
20287 fi
20288
20289 if test $ol_enable_slp != no ; then
20290         for ac_hdr in slp.h 
20291 do
20292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20294 echo "configure:20295: checking for $ac_hdr" >&5
20295 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20296   echo $ac_n "(cached) $ac_c" 1>&6
20297 else
20298   cat > conftest.$ac_ext <<EOF
20299 #line 20300 "configure"
20300 #include "confdefs.h"
20301 #include <$ac_hdr>
20302 EOF
20303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20304 { (eval echo configure:20305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20306 if test -z "$ac_err"; then
20307   rm -rf conftest*
20308   eval "ac_cv_header_$ac_safe=yes"
20309 else
20310   echo "$ac_err" >&5
20311   echo "configure: failed program was:" >&5
20312   cat conftest.$ac_ext >&5
20313   rm -rf conftest*
20314   eval "ac_cv_header_$ac_safe=no"
20315 fi
20316 rm -f conftest*
20317 fi
20318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20319   echo "$ac_t""yes" 1>&6
20320     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20321   cat >> confdefs.h <<EOF
20322 #define $ac_tr_hdr 1
20323 EOF
20324  
20325 else
20326   echo "$ac_t""no" 1>&6
20327 fi
20328 done
20329
20330
20331         if test $ac_cv_header_slp_h = yes ; then
20332                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20333 echo "configure:20334: checking for SLPOpen in -lslp" >&5
20334 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20335 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20336   echo $ac_n "(cached) $ac_c" 1>&6
20337 else
20338   ac_save_LIBS="$LIBS"
20339 LIBS="-lslp  $LIBS"
20340 cat > conftest.$ac_ext <<EOF
20341 #line 20342 "configure"
20342 #include "confdefs.h"
20343 /* Override any gcc2 internal prototype to avoid an error.  */
20344 /* We use char because int might match the return type of a gcc2
20345     builtin and then its argument prototype would still apply.  */
20346 char SLPOpen();
20347
20348 int main() {
20349 SLPOpen()
20350 ; return 0; }
20351 EOF
20352 if { (eval echo configure:20353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20353   rm -rf conftest*
20354   eval "ac_cv_lib_$ac_lib_var=yes"
20355 else
20356   echo "configure: failed program was:" >&5
20357   cat conftest.$ac_ext >&5
20358   rm -rf conftest*
20359   eval "ac_cv_lib_$ac_lib_var=no"
20360 fi
20361 rm -f conftest*
20362 LIBS="$ac_save_LIBS"
20363
20364 fi
20365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20366   echo "$ac_t""yes" 1>&6
20367   have_slp=yes
20368 else
20369   echo "$ac_t""no" 1>&6
20370 have_slp=no
20371 fi
20372
20373                 if test $have_slp = yes ; then
20374                         cat >> confdefs.h <<\EOF
20375 #define HAVE_SLP 1
20376 EOF
20377
20378                         SLAPD_SLP_LIBS=-lslp
20379                 fi
20380
20381         elif test $ol_enable_slp = yes ; then
20382                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20383         fi
20384 fi
20385
20386 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20387 echo "configure:20388: checking for ANSI C header files" >&5
20388 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20389   echo $ac_n "(cached) $ac_c" 1>&6
20390 else
20391   cat > conftest.$ac_ext <<EOF
20392 #line 20393 "configure"
20393 #include "confdefs.h"
20394 #include <stdlib.h>
20395 #include <stdarg.h>
20396 #include <string.h>
20397 #include <float.h>
20398 EOF
20399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20400 { (eval echo configure:20401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20402 if test -z "$ac_err"; then
20403   rm -rf conftest*
20404   ac_cv_header_stdc=yes
20405 else
20406   echo "$ac_err" >&5
20407   echo "configure: failed program was:" >&5
20408   cat conftest.$ac_ext >&5
20409   rm -rf conftest*
20410   ac_cv_header_stdc=no
20411 fi
20412 rm -f conftest*
20413
20414 if test $ac_cv_header_stdc = yes; then
20415   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20416 cat > conftest.$ac_ext <<EOF
20417 #line 20418 "configure"
20418 #include "confdefs.h"
20419 #include <string.h>
20420 EOF
20421 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20422   egrep "memchr" >/dev/null 2>&1; then
20423   :
20424 else
20425   rm -rf conftest*
20426   ac_cv_header_stdc=no
20427 fi
20428 rm -f conftest*
20429
20430 fi
20431
20432 if test $ac_cv_header_stdc = yes; then
20433   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20434 cat > conftest.$ac_ext <<EOF
20435 #line 20436 "configure"
20436 #include "confdefs.h"
20437 #include <stdlib.h>
20438 EOF
20439 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20440   egrep "free" >/dev/null 2>&1; then
20441   :
20442 else
20443   rm -rf conftest*
20444   ac_cv_header_stdc=no
20445 fi
20446 rm -f conftest*
20447
20448 fi
20449
20450 if test $ac_cv_header_stdc = yes; then
20451   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20452 if test "$cross_compiling" = yes; then
20453   :
20454 else
20455   cat > conftest.$ac_ext <<EOF
20456 #line 20457 "configure"
20457 #include "confdefs.h"
20458 #include <ctype.h>
20459 #if ((' ' & 0x0FF) == 0x020)
20460 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20461 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20462 #else
20463 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20464  || ('j' <= (c) && (c) <= 'r') \
20465  || ('s' <= (c) && (c) <= 'z'))
20466 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20467 #endif
20468 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20469 int main () { int i; for (i = 0; i < 256; i++)
20470 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20471 exit (0); }
20472
20473 EOF
20474 if { (eval echo configure:20475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20475 then
20476   :
20477 else
20478   echo "configure: failed program was:" >&5
20479   cat conftest.$ac_ext >&5
20480   rm -fr conftest*
20481   ac_cv_header_stdc=no
20482 fi
20483 rm -fr conftest*
20484 fi
20485
20486 fi
20487 fi
20488
20489 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20490 if test $ac_cv_header_stdc = yes; then
20491   cat >> confdefs.h <<\EOF
20492 #define STDC_HEADERS 1
20493 EOF
20494
20495 fi
20496
20497 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20498 echo "configure:20499: checking for mode_t" >&5
20499 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20500   echo $ac_n "(cached) $ac_c" 1>&6
20501 else
20502   cat > conftest.$ac_ext <<EOF
20503 #line 20504 "configure"
20504 #include "confdefs.h"
20505 #include <sys/types.h>
20506 #if STDC_HEADERS
20507 #include <stdlib.h>
20508 #include <stddef.h>
20509 #endif
20510
20511 EOF
20512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20513   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20514   rm -rf conftest*
20515   eval "ac_cv_type_mode_t=yes"
20516 else
20517   rm -rf conftest*
20518   eval "ac_cv_type_mode_t=no"
20519 fi
20520 rm -f conftest*
20521
20522 fi
20523 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20524   echo "$ac_t""yes" 1>&6
20525 else
20526   echo "$ac_t""no" 1>&6
20527   cat >> confdefs.h <<EOF
20528 #define mode_t int
20529 EOF
20530
20531 fi
20532
20533 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20534 echo "configure:20535: checking for off_t" >&5
20535 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20536   echo $ac_n "(cached) $ac_c" 1>&6
20537 else
20538   cat > conftest.$ac_ext <<EOF
20539 #line 20540 "configure"
20540 #include "confdefs.h"
20541 #include <sys/types.h>
20542 #if STDC_HEADERS
20543 #include <stdlib.h>
20544 #include <stddef.h>
20545 #endif
20546
20547 EOF
20548 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20549   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20550   rm -rf conftest*
20551   eval "ac_cv_type_off_t=yes"
20552 else
20553   rm -rf conftest*
20554   eval "ac_cv_type_off_t=no"
20555 fi
20556 rm -f conftest*
20557
20558 fi
20559 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20560   echo "$ac_t""yes" 1>&6
20561 else
20562   echo "$ac_t""no" 1>&6
20563   cat >> confdefs.h <<EOF
20564 #define off_t long
20565 EOF
20566
20567 fi
20568
20569 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20570 echo "configure:20571: checking for pid_t" >&5
20571 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20572   echo $ac_n "(cached) $ac_c" 1>&6
20573 else
20574   cat > conftest.$ac_ext <<EOF
20575 #line 20576 "configure"
20576 #include "confdefs.h"
20577 #include <sys/types.h>
20578 #if STDC_HEADERS
20579 #include <stdlib.h>
20580 #include <stddef.h>
20581 #endif
20582
20583 EOF
20584 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20585   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20586   rm -rf conftest*
20587   eval "ac_cv_type_pid_t=yes"
20588 else
20589   rm -rf conftest*
20590   eval "ac_cv_type_pid_t=no"
20591 fi
20592 rm -f conftest*
20593
20594 fi
20595 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20596   echo "$ac_t""yes" 1>&6
20597 else
20598   echo "$ac_t""no" 1>&6
20599   cat >> confdefs.h <<EOF
20600 #define pid_t int
20601 EOF
20602
20603 fi
20604
20605 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20606 echo "configure:20607: checking for ptrdiff_t" >&5
20607 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20608   echo $ac_n "(cached) $ac_c" 1>&6
20609 else
20610   cat > conftest.$ac_ext <<EOF
20611 #line 20612 "configure"
20612 #include "confdefs.h"
20613 #include <stddef.h>
20614 int main() {
20615 ptrdiff_t p
20616 ; return 0; }
20617 EOF
20618 if { (eval echo configure:20619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20619   rm -rf conftest*
20620   am_cv_type_ptrdiff_t=yes
20621 else
20622   echo "configure: failed program was:" >&5
20623   cat conftest.$ac_ext >&5
20624   rm -rf conftest*
20625   am_cv_type_ptrdiff_t=no
20626 fi
20627 rm -f conftest*
20628 fi
20629
20630 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20631    if test $am_cv_type_ptrdiff_t = yes; then
20632      cat >> confdefs.h <<\EOF
20633 #define HAVE_PTRDIFF_T 1
20634 EOF
20635
20636    fi
20637
20638 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20639 echo "configure:20640: checking return type of signal handlers" >&5
20640 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20641   echo $ac_n "(cached) $ac_c" 1>&6
20642 else
20643   cat > conftest.$ac_ext <<EOF
20644 #line 20645 "configure"
20645 #include "confdefs.h"
20646 #include <sys/types.h>
20647 #include <signal.h>
20648 #ifdef signal
20649 #undef signal
20650 #endif
20651 #ifdef __cplusplus
20652 extern "C" void (*signal (int, void (*)(int)))(int);
20653 #else
20654 void (*signal ()) ();
20655 #endif
20656
20657 int main() {
20658 int i;
20659 ; return 0; }
20660 EOF
20661 if { (eval echo configure:20662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20662   rm -rf conftest*
20663   ac_cv_type_signal=void
20664 else
20665   echo "configure: failed program was:" >&5
20666   cat conftest.$ac_ext >&5
20667   rm -rf conftest*
20668   ac_cv_type_signal=int
20669 fi
20670 rm -f conftest*
20671 fi
20672
20673 echo "$ac_t""$ac_cv_type_signal" 1>&6
20674 cat >> confdefs.h <<EOF
20675 #define RETSIGTYPE $ac_cv_type_signal
20676 EOF
20677
20678
20679 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20680 echo "configure:20681: checking for size_t" >&5
20681 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20682   echo $ac_n "(cached) $ac_c" 1>&6
20683 else
20684   cat > conftest.$ac_ext <<EOF
20685 #line 20686 "configure"
20686 #include "confdefs.h"
20687 #include <sys/types.h>
20688 #if STDC_HEADERS
20689 #include <stdlib.h>
20690 #include <stddef.h>
20691 #endif
20692
20693 EOF
20694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20695   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20696   rm -rf conftest*
20697   eval "ac_cv_type_size_t=yes"
20698 else
20699   rm -rf conftest*
20700   eval "ac_cv_type_size_t=no"
20701 fi
20702 rm -f conftest*
20703
20704 fi
20705 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20706   echo "$ac_t""yes" 1>&6
20707 else
20708   echo "$ac_t""no" 1>&6
20709   cat >> confdefs.h <<EOF
20710 #define size_t unsigned
20711 EOF
20712
20713 fi
20714
20715
20716 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20717 echo "configure:20718: checking for ssize_t" >&5
20718 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20719   echo $ac_n "(cached) $ac_c" 1>&6
20720 else
20721   cat > conftest.$ac_ext <<EOF
20722 #line 20723 "configure"
20723 #include "confdefs.h"
20724 #include <sys/types.h>
20725 #if STDC_HEADERS
20726 #include <stdlib.h>
20727 #include <stddef.h>
20728 #endif
20729
20730 EOF
20731 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20732   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20733   rm -rf conftest*
20734   eval "ac_cv_type_ssize_t=yes"
20735 else
20736   rm -rf conftest*
20737   eval "ac_cv_type_ssize_t=no"
20738 fi
20739 rm -f conftest*
20740
20741 fi
20742 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20743   echo "$ac_t""yes" 1>&6
20744 else
20745   echo "$ac_t""no" 1>&6
20746   cat >> confdefs.h <<EOF
20747 #define ssize_t signed int
20748 EOF
20749
20750 fi
20751
20752 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20753 echo "configure:20754: checking for caddr_t" >&5
20754 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20755   echo $ac_n "(cached) $ac_c" 1>&6
20756 else
20757   cat > conftest.$ac_ext <<EOF
20758 #line 20759 "configure"
20759 #include "confdefs.h"
20760 #include <sys/types.h>
20761 #if STDC_HEADERS
20762 #include <stdlib.h>
20763 #include <stddef.h>
20764 #endif
20765
20766 EOF
20767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20768   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20769   rm -rf conftest*
20770   eval "ac_cv_type_caddr_t=yes"
20771 else
20772   rm -rf conftest*
20773   eval "ac_cv_type_caddr_t=no"
20774 fi
20775 rm -f conftest*
20776
20777 fi
20778 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20779   echo "$ac_t""yes" 1>&6
20780 else
20781   echo "$ac_t""no" 1>&6
20782   cat >> confdefs.h <<EOF
20783 #define caddr_t char *
20784 EOF
20785
20786 fi
20787
20788
20789 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20790 echo "configure:20791: checking for socklen_t" >&5
20791 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20792   echo $ac_n "(cached) $ac_c" 1>&6
20793 else
20794   cat > conftest.$ac_ext <<EOF
20795 #line 20796 "configure"
20796 #include "confdefs.h"
20797
20798 #ifdef HAVE_SYS_TYPES_H
20799 #include <sys/types.h>
20800 #endif
20801 #ifdef HAVE_SYS_SOCKET_H
20802 #include <sys/socket.h>
20803 #endif
20804
20805 int main() {
20806 socklen_t len;
20807 ; return 0; }
20808 EOF
20809 if { (eval echo configure:20810: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20810   rm -rf conftest*
20811   ol_cv_type_socklen_t=yes
20812 else
20813   echo "configure: failed program was:" >&5
20814   cat conftest.$ac_ext >&5
20815   rm -rf conftest*
20816   ol_cv_type_socklen_t=no
20817 fi
20818 rm -f conftest*
20819 fi
20820
20821 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20822   if test $ol_cv_type_socklen_t = no; then
20823     cat >> confdefs.h <<\EOF
20824 #define socklen_t int
20825 EOF
20826
20827   fi
20828  
20829 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20830 echo "configure:20831: checking for member st_blksize in aggregate type struct stat" >&5
20831 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20832   echo $ac_n "(cached) $ac_c" 1>&6
20833 else
20834   cat > conftest.$ac_ext <<EOF
20835 #line 20836 "configure"
20836 #include "confdefs.h"
20837 #include <sys/types.h>
20838 #include <sys/stat.h>
20839 int main() {
20840 struct stat foo; foo.st_blksize;
20841 ; return 0; }
20842 EOF
20843 if { (eval echo configure:20844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20844   rm -rf conftest*
20845   ac_cv_c_struct_member_st_blksize=yes
20846 else
20847   echo "configure: failed program was:" >&5
20848   cat conftest.$ac_ext >&5
20849   rm -rf conftest*
20850   ac_cv_c_struct_member_st_blksize=no
20851 fi
20852 rm -f conftest*
20853 fi
20854
20855 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20856 st_blksize="$ac_cv_c_struct_member_st_blksize"
20857 if test $ac_cv_c_struct_member_st_blksize = yes; then
20858   cat >> confdefs.h <<\EOF
20859 #define HAVE_ST_BLKSIZE 1
20860 EOF
20861
20862 fi
20863
20864 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20865 echo "configure:20866: checking whether time.h and sys/time.h may both be included" >&5
20866 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20867   echo $ac_n "(cached) $ac_c" 1>&6
20868 else
20869   cat > conftest.$ac_ext <<EOF
20870 #line 20871 "configure"
20871 #include "confdefs.h"
20872 #include <sys/types.h>
20873 #include <sys/time.h>
20874 #include <time.h>
20875 int main() {
20876 struct tm *tp;
20877 ; return 0; }
20878 EOF
20879 if { (eval echo configure:20880: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20880   rm -rf conftest*
20881   ac_cv_header_time=yes
20882 else
20883   echo "configure: failed program was:" >&5
20884   cat conftest.$ac_ext >&5
20885   rm -rf conftest*
20886   ac_cv_header_time=no
20887 fi
20888 rm -f conftest*
20889 fi
20890
20891 echo "$ac_t""$ac_cv_header_time" 1>&6
20892 if test $ac_cv_header_time = yes; then
20893   cat >> confdefs.h <<\EOF
20894 #define TIME_WITH_SYS_TIME 1
20895 EOF
20896
20897 fi
20898
20899 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20900 echo "configure:20901: checking whether struct tm is in sys/time.h or time.h" >&5
20901 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20902   echo $ac_n "(cached) $ac_c" 1>&6
20903 else
20904   cat > conftest.$ac_ext <<EOF
20905 #line 20906 "configure"
20906 #include "confdefs.h"
20907 #include <sys/types.h>
20908 #include <time.h>
20909 int main() {
20910 struct tm *tp; tp->tm_sec;
20911 ; return 0; }
20912 EOF
20913 if { (eval echo configure:20914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20914   rm -rf conftest*
20915   ac_cv_struct_tm=time.h
20916 else
20917   echo "configure: failed program was:" >&5
20918   cat conftest.$ac_ext >&5
20919   rm -rf conftest*
20920   ac_cv_struct_tm=sys/time.h
20921 fi
20922 rm -f conftest*
20923 fi
20924
20925 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20926 if test $ac_cv_struct_tm = sys/time.h; then
20927   cat >> confdefs.h <<\EOF
20928 #define TM_IN_SYS_TIME 1
20929 EOF
20930
20931 fi
20932
20933 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20934 echo "configure:20935: checking for uid_t in sys/types.h" >&5
20935 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20936   echo $ac_n "(cached) $ac_c" 1>&6
20937 else
20938   cat > conftest.$ac_ext <<EOF
20939 #line 20940 "configure"
20940 #include "confdefs.h"
20941 #include <sys/types.h>
20942 EOF
20943 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20944   egrep "uid_t" >/dev/null 2>&1; then
20945   rm -rf conftest*
20946   ac_cv_type_uid_t=yes
20947 else
20948   rm -rf conftest*
20949   ac_cv_type_uid_t=no
20950 fi
20951 rm -f conftest*
20952
20953 fi
20954
20955 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20956 if test $ac_cv_type_uid_t = no; then
20957   cat >> confdefs.h <<\EOF
20958 #define uid_t int
20959 EOF
20960
20961   cat >> confdefs.h <<\EOF
20962 #define gid_t int
20963 EOF
20964
20965 fi
20966
20967 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20968 echo "configure:20969: checking for sig_atomic_t" >&5
20969 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20970   echo $ac_n "(cached) $ac_c" 1>&6
20971 else
20972   cat > conftest.$ac_ext <<EOF
20973 #line 20974 "configure"
20974 #include "confdefs.h"
20975 #include <signal.h>
20976 int main() {
20977 sig_atomic_t atomic;
20978 ; return 0; }
20979 EOF
20980 if { (eval echo configure:20981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20981   rm -rf conftest*
20982   ol_cv_type_sig_atomic_t=yes
20983 else
20984   echo "configure: failed program was:" >&5
20985   cat conftest.$ac_ext >&5
20986   rm -rf conftest*
20987   ol_cv_type_sig_atomic_t=no
20988 fi
20989 rm -f conftest*
20990 fi
20991
20992 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20993   if test $ol_cv_type_sig_atomic_t = no; then
20994     cat >> confdefs.h <<\EOF
20995 #define sig_atomic_t int
20996 EOF
20997
20998   fi
20999  
21000
21001
21002 # test for pw_gecos in struct passwd
21003 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21004 echo "configure:21005: checking struct passwd for pw_gecos" >&5
21005 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21006   echo $ac_n "(cached) $ac_c" 1>&6
21007 else
21008   
21009         cat > conftest.$ac_ext <<EOF
21010 #line 21011 "configure"
21011 #include "confdefs.h"
21012 #include <pwd.h>
21013 int main() {
21014
21015         struct passwd pwd;
21016         pwd.pw_gecos = pwd.pw_name;
21017
21018 ; return 0; }
21019 EOF
21020 if { (eval echo configure:21021: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21021   rm -rf conftest*
21022   ol_cv_struct_passwd_pw_gecos=yes
21023 else
21024   echo "configure: failed program was:" >&5
21025   cat conftest.$ac_ext >&5
21026   rm -rf conftest*
21027   ol_cv_struct_passwd_pw_gecos=no
21028 fi
21029 rm -f conftest*
21030 fi
21031
21032 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21033 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21034         cat >> confdefs.h <<\EOF
21035 #define HAVE_PW_GECOS 1
21036 EOF
21037
21038 fi
21039
21040 # test for pw_passwd in struct passwd
21041 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21042 echo "configure:21043: checking struct passwd for pw_passwd" >&5
21043 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21044   echo $ac_n "(cached) $ac_c" 1>&6
21045 else
21046   
21047         cat > conftest.$ac_ext <<EOF
21048 #line 21049 "configure"
21049 #include "confdefs.h"
21050 #include <pwd.h>
21051 int main() {
21052
21053         struct passwd pwd;
21054         pwd.pw_passwd = pwd.pw_name;
21055
21056 ; return 0; }
21057 EOF
21058 if { (eval echo configure:21059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21059   rm -rf conftest*
21060   ol_cv_struct_passwd_pw_passwd=yes
21061 else
21062   echo "configure: failed program was:" >&5
21063   cat conftest.$ac_ext >&5
21064   rm -rf conftest*
21065   ol_cv_struct_passwd_pw_passwd=no
21066 fi
21067 rm -f conftest*
21068 fi
21069
21070 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21071 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21072         cat >> confdefs.h <<\EOF
21073 #define HAVE_PW_PASSWD 1
21074 EOF
21075
21076 fi
21077
21078
21079 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21080 echo "configure:21081: checking if toupper() requires islower()" >&5
21081 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21082   echo $ac_n "(cached) $ac_c" 1>&6
21083 else
21084   
21085         if test "$cross_compiling" = yes; then
21086   ol_cv_c_upper_lower=safe
21087 else
21088   cat > conftest.$ac_ext <<EOF
21089 #line 21090 "configure"
21090 #include "confdefs.h"
21091
21092 #include <ctype.h>
21093 main()
21094 {
21095         if ('C' == toupper('C'))
21096                 exit(0);
21097         else
21098                 exit(1);
21099 }
21100 EOF
21101 if { (eval echo configure:21102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21102 then
21103   ol_cv_c_upper_lower=no
21104 else
21105   echo "configure: failed program was:" >&5
21106   cat conftest.$ac_ext >&5
21107   rm -fr conftest*
21108   ol_cv_c_upper_lower=yes
21109 fi
21110 rm -fr conftest*
21111 fi
21112
21113 fi
21114
21115 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21116 if test $ol_cv_c_upper_lower != no ; then
21117         cat >> confdefs.h <<\EOF
21118 #define C_UPPER_LOWER 1
21119 EOF
21120
21121 fi
21122
21123 echo $ac_n "checking for working const""... $ac_c" 1>&6
21124 echo "configure:21125: checking for working const" >&5
21125 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21126   echo $ac_n "(cached) $ac_c" 1>&6
21127 else
21128   cat > conftest.$ac_ext <<EOF
21129 #line 21130 "configure"
21130 #include "confdefs.h"
21131
21132 int main() {
21133
21134 /* Ultrix mips cc rejects this.  */
21135 typedef int charset[2]; const charset x;
21136 /* SunOS 4.1.1 cc rejects this.  */
21137 char const *const *ccp;
21138 char **p;
21139 /* NEC SVR4.0.2 mips cc rejects this.  */
21140 struct point {int x, y;};
21141 static struct point const zero = {0,0};
21142 /* AIX XL C 1.02.0.0 rejects this.
21143    It does not let you subtract one const X* pointer from another in an arm
21144    of an if-expression whose if-part is not a constant expression */
21145 const char *g = "string";
21146 ccp = &g + (g ? g-g : 0);
21147 /* HPUX 7.0 cc rejects these. */
21148 ++ccp;
21149 p = (char**) ccp;
21150 ccp = (char const *const *) p;
21151 { /* SCO 3.2v4 cc rejects this.  */
21152   char *t;
21153   char const *s = 0 ? (char *) 0 : (char const *) 0;
21154
21155   *t++ = 0;
21156 }
21157 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21158   int x[] = {25, 17};
21159   const int *foo = &x[0];
21160   ++foo;
21161 }
21162 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21163   typedef const int *iptr;
21164   iptr p = 0;
21165   ++p;
21166 }
21167 { /* AIX XL C 1.02.0.0 rejects this saying
21168      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21169   struct s { int j; const int *ap[3]; };
21170   struct s *b; b->j = 5;
21171 }
21172 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21173   const int foo = 10;
21174 }
21175
21176 ; return 0; }
21177 EOF
21178 if { (eval echo configure:21179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21179   rm -rf conftest*
21180   ac_cv_c_const=yes
21181 else
21182   echo "configure: failed program was:" >&5
21183   cat conftest.$ac_ext >&5
21184   rm -rf conftest*
21185   ac_cv_c_const=no
21186 fi
21187 rm -f conftest*
21188 fi
21189
21190 echo "$ac_t""$ac_cv_c_const" 1>&6
21191 if test $ac_cv_c_const = no; then
21192   cat >> confdefs.h <<\EOF
21193 #define const 
21194 EOF
21195
21196 fi
21197
21198 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21199 echo "configure:21200: checking if compiler understands volatile" >&5
21200 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21201   echo $ac_n "(cached) $ac_c" 1>&6
21202 else
21203   cat > conftest.$ac_ext <<EOF
21204 #line 21205 "configure"
21205 #include "confdefs.h"
21206 int x, y, z;
21207 int main() {
21208 volatile int a; int * volatile b = x ? &y : &z;
21209       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21210       *b = 0;
21211 ; return 0; }
21212 EOF
21213 if { (eval echo configure:21214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21214   rm -rf conftest*
21215   ol_cv_c_volatile=yes
21216 else
21217   echo "configure: failed program was:" >&5
21218   cat conftest.$ac_ext >&5
21219   rm -rf conftest*
21220   ol_cv_c_volatile=no
21221 fi
21222 rm -f conftest*
21223 fi
21224
21225 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21226   if test $ol_cv_c_volatile = yes; then
21227     : 
21228   else
21229     cat >> confdefs.h <<\EOF
21230 #define volatile 
21231 EOF
21232
21233   fi
21234  
21235
21236 if test $cross_compiling = yes ; then
21237         cat >> confdefs.h <<\EOF
21238 #define CROSS_COMPILING 1
21239 EOF
21240
21241 else
21242         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21243 echo "configure:21244: checking whether byte ordering is bigendian" >&5
21244 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21245   echo $ac_n "(cached) $ac_c" 1>&6
21246 else
21247   ac_cv_c_bigendian=unknown
21248 # See if sys/param.h defines the BYTE_ORDER macro.
21249 cat > conftest.$ac_ext <<EOF
21250 #line 21251 "configure"
21251 #include "confdefs.h"
21252 #include <sys/types.h>
21253 #include <sys/param.h>
21254 int main() {
21255
21256 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21257  bogus endian macros
21258 #endif
21259 ; return 0; }
21260 EOF
21261 if { (eval echo configure:21262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21262   rm -rf conftest*
21263   # It does; now see whether it defined to BIG_ENDIAN or not.
21264 cat > conftest.$ac_ext <<EOF
21265 #line 21266 "configure"
21266 #include "confdefs.h"
21267 #include <sys/types.h>
21268 #include <sys/param.h>
21269 int main() {
21270
21271 #if BYTE_ORDER != BIG_ENDIAN
21272  not big endian
21273 #endif
21274 ; return 0; }
21275 EOF
21276 if { (eval echo configure:21277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21277   rm -rf conftest*
21278   ac_cv_c_bigendian=yes
21279 else
21280   echo "configure: failed program was:" >&5
21281   cat conftest.$ac_ext >&5
21282   rm -rf conftest*
21283   ac_cv_c_bigendian=no
21284 fi
21285 rm -f conftest*
21286 else
21287   echo "configure: failed program was:" >&5
21288   cat conftest.$ac_ext >&5
21289 fi
21290 rm -f conftest*
21291 if test $ac_cv_c_bigendian = unknown; then
21292 if test "$cross_compiling" = yes; then
21293     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21294 else
21295   cat > conftest.$ac_ext <<EOF
21296 #line 21297 "configure"
21297 #include "confdefs.h"
21298 main () {
21299   /* Are we little or big endian?  From Harbison&Steele.  */
21300   union
21301   {
21302     long l;
21303     char c[sizeof (long)];
21304   } u;
21305   u.l = 1;
21306   exit (u.c[sizeof (long) - 1] == 1);
21307 }
21308 EOF
21309 if { (eval echo configure:21310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21310 then
21311   ac_cv_c_bigendian=no
21312 else
21313   echo "configure: failed program was:" >&5
21314   cat conftest.$ac_ext >&5
21315   rm -fr conftest*
21316   ac_cv_c_bigendian=yes
21317 fi
21318 rm -fr conftest*
21319 fi
21320
21321 fi
21322 fi
21323
21324 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21325 if test $ac_cv_c_bigendian = yes; then
21326   cat >> confdefs.h <<\EOF
21327 #define WORDS_BIGENDIAN 1
21328 EOF
21329
21330 fi
21331
21332 fi
21333
21334 echo $ac_n "checking size of short""... $ac_c" 1>&6
21335 echo "configure:21336: checking size of short" >&5 
21336 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21337   echo $ac_n "(cached) $ac_c" 1>&6
21338 else
21339   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21340   cat > conftest.$ac_ext <<EOF
21341 #line 21342 "configure"
21342 #include "confdefs.h"
21343 #include "confdefs.h" 
21344 #include <sys/types.h> 
21345  
21346
21347 int main() {
21348 switch (0) case 0: case (sizeof (short) == $ac_size):;
21349 ; return 0; }
21350 EOF
21351 if { (eval echo configure:21352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21352   rm -rf conftest*
21353   ac_cv_sizeof_short=$ac_size
21354 else
21355   echo "configure: failed program was:" >&5
21356   cat conftest.$ac_ext >&5
21357 fi
21358 rm -f conftest* 
21359   if test x$ac_cv_sizeof_short != x ; then break; fi 
21360 done 
21361
21362 fi
21363  
21364 if test x$ac_cv_sizeof_short = x ; then 
21365   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21366 fi 
21367 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21368 cat >> confdefs.h <<EOF
21369 #define SIZEOF_SHORT $ac_cv_sizeof_short
21370 EOF
21371  
21372  
21373 echo $ac_n "checking size of int""... $ac_c" 1>&6
21374 echo "configure:21375: checking size of int" >&5 
21375 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21376   echo $ac_n "(cached) $ac_c" 1>&6
21377 else
21378   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21379   cat > conftest.$ac_ext <<EOF
21380 #line 21381 "configure"
21381 #include "confdefs.h"
21382 #include "confdefs.h" 
21383 #include <sys/types.h> 
21384  
21385
21386 int main() {
21387 switch (0) case 0: case (sizeof (int) == $ac_size):;
21388 ; return 0; }
21389 EOF
21390 if { (eval echo configure:21391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21391   rm -rf conftest*
21392   ac_cv_sizeof_int=$ac_size
21393 else
21394   echo "configure: failed program was:" >&5
21395   cat conftest.$ac_ext >&5
21396 fi
21397 rm -f conftest* 
21398   if test x$ac_cv_sizeof_int != x ; then break; fi 
21399 done 
21400
21401 fi
21402  
21403 if test x$ac_cv_sizeof_int = x ; then 
21404   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21405 fi 
21406 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21407 cat >> confdefs.h <<EOF
21408 #define SIZEOF_INT $ac_cv_sizeof_int
21409 EOF
21410  
21411  
21412 echo $ac_n "checking size of long""... $ac_c" 1>&6
21413 echo "configure:21414: checking size of long" >&5 
21414 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21415   echo $ac_n "(cached) $ac_c" 1>&6
21416 else
21417   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21418   cat > conftest.$ac_ext <<EOF
21419 #line 21420 "configure"
21420 #include "confdefs.h"
21421 #include "confdefs.h" 
21422 #include <sys/types.h> 
21423  
21424
21425 int main() {
21426 switch (0) case 0: case (sizeof (long) == $ac_size):;
21427 ; return 0; }
21428 EOF
21429 if { (eval echo configure:21430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21430   rm -rf conftest*
21431   ac_cv_sizeof_long=$ac_size
21432 else
21433   echo "configure: failed program was:" >&5
21434   cat conftest.$ac_ext >&5
21435 fi
21436 rm -f conftest* 
21437   if test x$ac_cv_sizeof_long != x ; then break; fi 
21438 done 
21439
21440 fi
21441  
21442 if test x$ac_cv_sizeof_long = x ; then 
21443   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21444 fi 
21445 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21446 cat >> confdefs.h <<EOF
21447 #define SIZEOF_LONG $ac_cv_sizeof_long
21448 EOF
21449  
21450
21451
21452 if test "$ac_cv_sizeof_int" -lt 4 ; then
21453         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21454
21455         cat >> confdefs.h <<\EOF
21456 #define LBER_INT_T long
21457 EOF
21458
21459 else
21460         cat >> confdefs.h <<\EOF
21461 #define LBER_INT_T int
21462 EOF
21463
21464 fi
21465
21466 cat >> confdefs.h <<\EOF
21467 #define LBER_LEN_T long
21468 EOF
21469
21470 cat >> confdefs.h <<\EOF
21471 #define LBER_SOCKET_T int
21472 EOF
21473
21474 cat >> confdefs.h <<\EOF
21475 #define LBER_TAG_T long
21476 EOF
21477
21478
21479 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21480 echo "configure:21481: checking for 8-bit clean memcmp" >&5
21481 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21482   echo $ac_n "(cached) $ac_c" 1>&6
21483 else
21484   if test "$cross_compiling" = yes; then
21485   ac_cv_func_memcmp_clean=no
21486 else
21487   cat > conftest.$ac_ext <<EOF
21488 #line 21489 "configure"
21489 #include "confdefs.h"
21490
21491 main()
21492 {
21493   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21494   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21495 }
21496
21497 EOF
21498 if { (eval echo configure:21499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21499 then
21500   ac_cv_func_memcmp_clean=yes
21501 else
21502   echo "configure: failed program was:" >&5
21503   cat conftest.$ac_ext >&5
21504   rm -fr conftest*
21505   ac_cv_func_memcmp_clean=no
21506 fi
21507 rm -fr conftest*
21508 fi
21509
21510 fi
21511
21512 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21513 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21514
21515 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21516 echo "configure:21517: checking for strftime" >&5
21517 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21518   echo $ac_n "(cached) $ac_c" 1>&6
21519 else
21520   cat > conftest.$ac_ext <<EOF
21521 #line 21522 "configure"
21522 #include "confdefs.h"
21523 /* System header to define __stub macros and hopefully few prototypes,
21524     which can conflict with char strftime(); below.  */
21525 #include <assert.h>
21526 /* Override any gcc2 internal prototype to avoid an error.  */
21527 /* We use char because int might match the return type of a gcc2
21528     builtin and then its argument prototype would still apply.  */
21529 char strftime();
21530 char (*f)();
21531
21532 int main() {
21533
21534 /* The GNU C library defines this for functions which it implements
21535     to always fail with ENOSYS.  Some functions are actually named
21536     something starting with __ and the normal name is an alias.  */
21537 #if defined (__stub_strftime) || defined (__stub___strftime)
21538 choke me
21539 #else
21540 f = strftime;
21541 #endif
21542
21543 ; return 0; }
21544 EOF
21545 if { (eval echo configure:21546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21546   rm -rf conftest*
21547   eval "ac_cv_func_strftime=yes"
21548 else
21549   echo "configure: failed program was:" >&5
21550   cat conftest.$ac_ext >&5
21551   rm -rf conftest*
21552   eval "ac_cv_func_strftime=no"
21553 fi
21554 rm -f conftest*
21555 fi
21556
21557 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21558   echo "$ac_t""yes" 1>&6
21559   cat >> confdefs.h <<\EOF
21560 #define HAVE_STRFTIME 1
21561 EOF
21562
21563 else
21564   echo "$ac_t""no" 1>&6
21565 # strftime is in -lintl on SCO UNIX.
21566 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21567 echo "configure:21568: checking for strftime in -lintl" >&5
21568 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21569 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21570   echo $ac_n "(cached) $ac_c" 1>&6
21571 else
21572   ac_save_LIBS="$LIBS"
21573 LIBS="-lintl  $LIBS"
21574 cat > conftest.$ac_ext <<EOF
21575 #line 21576 "configure"
21576 #include "confdefs.h"
21577 /* Override any gcc2 internal prototype to avoid an error.  */
21578 /* We use char because int might match the return type of a gcc2
21579     builtin and then its argument prototype would still apply.  */
21580 char strftime();
21581
21582 int main() {
21583 strftime()
21584 ; return 0; }
21585 EOF
21586 if { (eval echo configure:21587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21587   rm -rf conftest*
21588   eval "ac_cv_lib_$ac_lib_var=yes"
21589 else
21590   echo "configure: failed program was:" >&5
21591   cat conftest.$ac_ext >&5
21592   rm -rf conftest*
21593   eval "ac_cv_lib_$ac_lib_var=no"
21594 fi
21595 rm -f conftest*
21596 LIBS="$ac_save_LIBS"
21597
21598 fi
21599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21600   echo "$ac_t""yes" 1>&6
21601   cat >> confdefs.h <<\EOF
21602 #define HAVE_STRFTIME 1
21603 EOF
21604
21605 LIBS="-lintl $LIBS"
21606 else
21607   echo "$ac_t""no" 1>&6
21608 fi
21609
21610 fi
21611
21612
21613 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21614 echo "configure:21615: checking for inet_aton()" >&5
21615 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21616   echo $ac_n "(cached) $ac_c" 1>&6
21617 else
21618   cat > conftest.$ac_ext <<EOF
21619 #line 21620 "configure"
21620 #include "confdefs.h"
21621
21622 #ifdef HAVE_SYS_TYPES_H
21623 #       include <sys/types.h>
21624 #endif
21625 #ifdef HAVE_SYS_SOCKET_H
21626 #       include <sys/socket.h>
21627 #       ifdef HAVE_SYS_SELECT_H
21628 #               include <sys/select.h>
21629 #       endif
21630 #       include <netinet/in.h>
21631 #       ifdef HAVE_ARPA_INET_H
21632 #               include <arpa/inet.h>
21633 #       endif
21634 #endif
21635
21636 int main() {
21637 struct in_addr in;
21638 int rc = inet_aton( "255.255.255.255", &in );
21639 ; return 0; }
21640 EOF
21641 if { (eval echo configure:21642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21642   rm -rf conftest*
21643   ol_cv_func_inet_aton=yes
21644 else
21645   echo "configure: failed program was:" >&5
21646   cat conftest.$ac_ext >&5
21647   rm -rf conftest*
21648   ol_cv_func_inet_aton=no
21649 fi
21650 rm -f conftest*
21651 fi
21652
21653 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21654   if test $ol_cv_func_inet_aton != no; then
21655     cat >> confdefs.h <<\EOF
21656 #define HAVE_INET_ATON 1
21657 EOF
21658
21659   fi
21660  
21661
21662 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21663 echo "configure:21664: checking for _spawnlp" >&5
21664 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21665   echo $ac_n "(cached) $ac_c" 1>&6
21666 else
21667   cat > conftest.$ac_ext <<EOF
21668 #line 21669 "configure"
21669 #include "confdefs.h"
21670 /* System header to define __stub macros and hopefully few prototypes,
21671     which can conflict with char _spawnlp(); below.  */
21672 #include <assert.h>
21673 /* Override any gcc2 internal prototype to avoid an error.  */
21674 /* We use char because int might match the return type of a gcc2
21675     builtin and then its argument prototype would still apply.  */
21676 char _spawnlp();
21677 char (*f)();
21678
21679 int main() {
21680
21681 /* The GNU C library defines this for functions which it implements
21682     to always fail with ENOSYS.  Some functions are actually named
21683     something starting with __ and the normal name is an alias.  */
21684 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21685 choke me
21686 #else
21687 f = _spawnlp;
21688 #endif
21689
21690 ; return 0; }
21691 EOF
21692 if { (eval echo configure:21693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21693   rm -rf conftest*
21694   eval "ac_cv_func__spawnlp=yes"
21695 else
21696   echo "configure: failed program was:" >&5
21697   cat conftest.$ac_ext >&5
21698   rm -rf conftest*
21699   eval "ac_cv_func__spawnlp=no"
21700 fi
21701 rm -f conftest*
21702 fi
21703
21704 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21705   echo "$ac_t""yes" 1>&6
21706   cat >> confdefs.h <<\EOF
21707 #define HAVE_SPAWNLP 1
21708 EOF
21709
21710 else
21711   echo "$ac_t""no" 1>&6
21712 fi
21713
21714
21715 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21716 echo "configure:21717: checking for _snprintf" >&5
21717 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21718   echo $ac_n "(cached) $ac_c" 1>&6
21719 else
21720   cat > conftest.$ac_ext <<EOF
21721 #line 21722 "configure"
21722 #include "confdefs.h"
21723 /* System header to define __stub macros and hopefully few prototypes,
21724     which can conflict with char _snprintf(); below.  */
21725 #include <assert.h>
21726 /* Override any gcc2 internal prototype to avoid an error.  */
21727 /* We use char because int might match the return type of a gcc2
21728     builtin and then its argument prototype would still apply.  */
21729 char _snprintf();
21730 char (*f)();
21731
21732 int main() {
21733
21734 /* The GNU C library defines this for functions which it implements
21735     to always fail with ENOSYS.  Some functions are actually named
21736     something starting with __ and the normal name is an alias.  */
21737 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21738 choke me
21739 #else
21740 f = _snprintf;
21741 #endif
21742
21743 ; return 0; }
21744 EOF
21745 if { (eval echo configure:21746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21746   rm -rf conftest*
21747   eval "ac_cv_func__snprintf=yes"
21748 else
21749   echo "configure: failed program was:" >&5
21750   cat conftest.$ac_ext >&5
21751   rm -rf conftest*
21752   eval "ac_cv_func__snprintf=no"
21753 fi
21754 rm -f conftest*
21755 fi
21756
21757 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21758   echo "$ac_t""yes" 1>&6
21759   ac_cv_func_snprintf=yes
21760         cat >> confdefs.h <<\EOF
21761 #define snprintf _snprintf
21762 EOF
21763
21764
21765 else
21766   echo "$ac_t""no" 1>&6
21767 fi
21768
21769
21770 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21771 echo "configure:21772: checking for _vsnprintf" >&5
21772 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21773   echo $ac_n "(cached) $ac_c" 1>&6
21774 else
21775   cat > conftest.$ac_ext <<EOF
21776 #line 21777 "configure"
21777 #include "confdefs.h"
21778 /* System header to define __stub macros and hopefully few prototypes,
21779     which can conflict with char _vsnprintf(); below.  */
21780 #include <assert.h>
21781 /* Override any gcc2 internal prototype to avoid an error.  */
21782 /* We use char because int might match the return type of a gcc2
21783     builtin and then its argument prototype would still apply.  */
21784 char _vsnprintf();
21785 char (*f)();
21786
21787 int main() {
21788
21789 /* The GNU C library defines this for functions which it implements
21790     to always fail with ENOSYS.  Some functions are actually named
21791     something starting with __ and the normal name is an alias.  */
21792 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21793 choke me
21794 #else
21795 f = _vsnprintf;
21796 #endif
21797
21798 ; return 0; }
21799 EOF
21800 if { (eval echo configure:21801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21801   rm -rf conftest*
21802   eval "ac_cv_func__vsnprintf=yes"
21803 else
21804   echo "configure: failed program was:" >&5
21805   cat conftest.$ac_ext >&5
21806   rm -rf conftest*
21807   eval "ac_cv_func__vsnprintf=no"
21808 fi
21809 rm -f conftest*
21810 fi
21811
21812 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21813   echo "$ac_t""yes" 1>&6
21814   ac_cv_func_vsnprintf=yes
21815         cat >> confdefs.h <<\EOF
21816 #define vsnprintf _vsnprintf
21817 EOF
21818
21819
21820 else
21821   echo "$ac_t""no" 1>&6
21822 fi
21823
21824
21825 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21826 echo "configure:21827: checking for vprintf" >&5
21827 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21828   echo $ac_n "(cached) $ac_c" 1>&6
21829 else
21830   cat > conftest.$ac_ext <<EOF
21831 #line 21832 "configure"
21832 #include "confdefs.h"
21833 /* System header to define __stub macros and hopefully few prototypes,
21834     which can conflict with char vprintf(); below.  */
21835 #include <assert.h>
21836 /* Override any gcc2 internal prototype to avoid an error.  */
21837 /* We use char because int might match the return type of a gcc2
21838     builtin and then its argument prototype would still apply.  */
21839 char vprintf();
21840 char (*f)();
21841
21842 int main() {
21843
21844 /* The GNU C library defines this for functions which it implements
21845     to always fail with ENOSYS.  Some functions are actually named
21846     something starting with __ and the normal name is an alias.  */
21847 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21848 choke me
21849 #else
21850 f = vprintf;
21851 #endif
21852
21853 ; return 0; }
21854 EOF
21855 if { (eval echo configure:21856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21856   rm -rf conftest*
21857   eval "ac_cv_func_vprintf=yes"
21858 else
21859   echo "configure: failed program was:" >&5
21860   cat conftest.$ac_ext >&5
21861   rm -rf conftest*
21862   eval "ac_cv_func_vprintf=no"
21863 fi
21864 rm -f conftest*
21865 fi
21866
21867 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21868   echo "$ac_t""yes" 1>&6
21869   cat >> confdefs.h <<\EOF
21870 #define HAVE_VPRINTF 1
21871 EOF
21872
21873 else
21874   echo "$ac_t""no" 1>&6
21875 fi
21876
21877 if test "$ac_cv_func_vprintf" != yes; then
21878 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21879 echo "configure:21880: checking for _doprnt" >&5
21880 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21881   echo $ac_n "(cached) $ac_c" 1>&6
21882 else
21883   cat > conftest.$ac_ext <<EOF
21884 #line 21885 "configure"
21885 #include "confdefs.h"
21886 /* System header to define __stub macros and hopefully few prototypes,
21887     which can conflict with char _doprnt(); below.  */
21888 #include <assert.h>
21889 /* Override any gcc2 internal prototype to avoid an error.  */
21890 /* We use char because int might match the return type of a gcc2
21891     builtin and then its argument prototype would still apply.  */
21892 char _doprnt();
21893 char (*f)();
21894
21895 int main() {
21896
21897 /* The GNU C library defines this for functions which it implements
21898     to always fail with ENOSYS.  Some functions are actually named
21899     something starting with __ and the normal name is an alias.  */
21900 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21901 choke me
21902 #else
21903 f = _doprnt;
21904 #endif
21905
21906 ; return 0; }
21907 EOF
21908 if { (eval echo configure:21909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21909   rm -rf conftest*
21910   eval "ac_cv_func__doprnt=yes"
21911 else
21912   echo "configure: failed program was:" >&5
21913   cat conftest.$ac_ext >&5
21914   rm -rf conftest*
21915   eval "ac_cv_func__doprnt=no"
21916 fi
21917 rm -f conftest*
21918 fi
21919
21920 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21921   echo "$ac_t""yes" 1>&6
21922   cat >> confdefs.h <<\EOF
21923 #define HAVE_DOPRNT 1
21924 EOF
21925
21926 else
21927   echo "$ac_t""no" 1>&6
21928 fi
21929
21930 fi
21931
21932
21933 if test $ac_cv_func_vprintf = yes ; then
21934                 for ac_func in snprintf vsnprintf
21935 do
21936 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21937 echo "configure:21938: checking for $ac_func" >&5
21938 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21939   echo $ac_n "(cached) $ac_c" 1>&6
21940 else
21941   cat > conftest.$ac_ext <<EOF
21942 #line 21943 "configure"
21943 #include "confdefs.h"
21944 /* System header to define __stub macros and hopefully few prototypes,
21945     which can conflict with char $ac_func(); below.  */
21946 #include <assert.h>
21947 /* Override any gcc2 internal prototype to avoid an error.  */
21948 /* We use char because int might match the return type of a gcc2
21949     builtin and then its argument prototype would still apply.  */
21950 char $ac_func();
21951 char (*f)();
21952
21953 int main() {
21954
21955 /* The GNU C library defines this for functions which it implements
21956     to always fail with ENOSYS.  Some functions are actually named
21957     something starting with __ and the normal name is an alias.  */
21958 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21959 choke me
21960 #else
21961 f = $ac_func;
21962 #endif
21963
21964 ; return 0; }
21965 EOF
21966 if { (eval echo configure:21967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21967   rm -rf conftest*
21968   eval "ac_cv_func_$ac_func=yes"
21969 else
21970   echo "configure: failed program was:" >&5
21971   cat conftest.$ac_ext >&5
21972   rm -rf conftest*
21973   eval "ac_cv_func_$ac_func=no"
21974 fi
21975 rm -f conftest*
21976 fi
21977
21978 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21979   echo "$ac_t""yes" 1>&6
21980     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21981   cat >> confdefs.h <<EOF
21982 #define $ac_tr_func 1
21983 EOF
21984  
21985 else
21986   echo "$ac_t""no" 1>&6
21987 fi
21988 done
21989
21990 fi
21991
21992 for ac_func in \
21993         bcopy                   \
21994         closesocket             \
21995         chroot                  \
21996         endgrent                \
21997         endpwent                \
21998         fcntl                   \
21999         flock                   \
22000         fstat                   \
22001         getdtablesize   \
22002         getgrgid                \
22003         gethostname             \
22004         getpass                 \
22005         getpassphrase   \
22006         getpwuid                \
22007         getpwnam                \
22008         getspnam                \
22009         gettimeofday    \
22010         initgroups              \
22011         lockf                   \
22012         memcpy                  \
22013         memmove                 \
22014         mkstemp                 \
22015         mktemp                  \
22016         pipe                    \
22017         read                    \
22018         recv                    \
22019         recvfrom                \
22020         setpwfile               \
22021         setgid                  \
22022         setegid                 \
22023         setsid                  \
22024         setuid                  \
22025         seteuid                 \
22026         sigaction               \
22027         signal                  \
22028         sigset                  \
22029         strdup                  \
22030         strerror                \
22031         strpbrk                 \
22032         strrchr                 \
22033         strsep                  \
22034         strstr                  \
22035         strtol                  \
22036         strtoul                 \
22037         strspn                  \
22038         sysconf                 \
22039         usleep                  \
22040         waitpid                 \
22041         wait4                   \
22042         write                   \
22043         send                    \
22044         sendmsg                 \
22045         sendto                  \
22046
22047 do
22048 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22049 echo "configure:22050: checking for $ac_func" >&5
22050 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22051   echo $ac_n "(cached) $ac_c" 1>&6
22052 else
22053   cat > conftest.$ac_ext <<EOF
22054 #line 22055 "configure"
22055 #include "confdefs.h"
22056 /* System header to define __stub macros and hopefully few prototypes,
22057     which can conflict with char $ac_func(); below.  */
22058 #include <assert.h>
22059 /* Override any gcc2 internal prototype to avoid an error.  */
22060 /* We use char because int might match the return type of a gcc2
22061     builtin and then its argument prototype would still apply.  */
22062 char $ac_func();
22063 char (*f)();
22064
22065 int main() {
22066
22067 /* The GNU C library defines this for functions which it implements
22068     to always fail with ENOSYS.  Some functions are actually named
22069     something starting with __ and the normal name is an alias.  */
22070 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22071 choke me
22072 #else
22073 f = $ac_func;
22074 #endif
22075
22076 ; return 0; }
22077 EOF
22078 if { (eval echo configure:22079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22079   rm -rf conftest*
22080   eval "ac_cv_func_$ac_func=yes"
22081 else
22082   echo "configure: failed program was:" >&5
22083   cat conftest.$ac_ext >&5
22084   rm -rf conftest*
22085   eval "ac_cv_func_$ac_func=no"
22086 fi
22087 rm -f conftest*
22088 fi
22089
22090 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22091   echo "$ac_t""yes" 1>&6
22092     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22093   cat >> confdefs.h <<EOF
22094 #define $ac_tr_func 1
22095 EOF
22096  
22097 else
22098   echo "$ac_t""no" 1>&6
22099 fi
22100 done
22101
22102
22103 for ac_func in getopt getpeereid
22104 do
22105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22106 echo "configure:22107: checking for $ac_func" >&5
22107 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22108   echo $ac_n "(cached) $ac_c" 1>&6
22109 else
22110   cat > conftest.$ac_ext <<EOF
22111 #line 22112 "configure"
22112 #include "confdefs.h"
22113 /* System header to define __stub macros and hopefully few prototypes,
22114     which can conflict with char $ac_func(); below.  */
22115 #include <assert.h>
22116 /* Override any gcc2 internal prototype to avoid an error.  */
22117 /* We use char because int might match the return type of a gcc2
22118     builtin and then its argument prototype would still apply.  */
22119 char $ac_func();
22120 char (*f)();
22121
22122 int main() {
22123
22124 /* The GNU C library defines this for functions which it implements
22125     to always fail with ENOSYS.  Some functions are actually named
22126     something starting with __ and the normal name is an alias.  */
22127 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22128 choke me
22129 #else
22130 f = $ac_func;
22131 #endif
22132
22133 ; return 0; }
22134 EOF
22135 if { (eval echo configure:22136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22136   rm -rf conftest*
22137   eval "ac_cv_func_$ac_func=yes"
22138 else
22139   echo "configure: failed program was:" >&5
22140   cat conftest.$ac_ext >&5
22141   rm -rf conftest*
22142   eval "ac_cv_func_$ac_func=no"
22143 fi
22144 rm -f conftest*
22145 fi
22146
22147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22148   echo "$ac_t""yes" 1>&6
22149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22150   cat >> confdefs.h <<EOF
22151 #define $ac_tr_func 1
22152 EOF
22153  
22154 else
22155   echo "$ac_t""no" 1>&6
22156 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22157 fi
22158 done
22159
22160
22161
22162 if test "$ac_cv_func_getopt" != yes; then
22163         LIBSRCS="$LIBSRCS getopt.c"
22164 fi
22165 if test "$ac_cv_func_getpeereid" != yes; then
22166         LIBSRCS="$LIBSRCS getpeereid.c"
22167 fi
22168 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22169         if test "$ac_cv_func_snprintf" != yes; then
22170                 cat >> confdefs.h <<\EOF
22171 #define snprintf ber_pvt_snprintf
22172 EOF
22173
22174         fi
22175         if test "$ac_cv_func_vsnprintf" != yes; then
22176                 cat >> confdefs.h <<\EOF
22177 #define vsnprintf ber_pvt_vsnprintf
22178 EOF
22179
22180         fi
22181 fi
22182
22183 # Check Configuration
22184 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22185 echo "configure:22186: checking declaration of sys_errlist" >&5
22186 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22187   echo $ac_n "(cached) $ac_c" 1>&6
22188 else
22189   
22190         cat > conftest.$ac_ext <<EOF
22191 #line 22192 "configure"
22192 #include "confdefs.h"
22193
22194 #include <stdio.h>
22195 #include <sys/types.h>
22196 #include <errno.h>
22197 #ifdef WINNT
22198 #include <stdlib.h>
22199 #endif 
22200 int main() {
22201 char *c = (char *) *sys_errlist
22202 ; return 0; }
22203 EOF
22204 if { (eval echo configure:22205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22205   rm -rf conftest*
22206   ol_cv_dcl_sys_errlist=yes
22207         ol_cv_have_sys_errlist=yes
22208 else
22209   echo "configure: failed program was:" >&5
22210   cat conftest.$ac_ext >&5
22211   rm -rf conftest*
22212   ol_cv_dcl_sys_errlist=no
22213 fi
22214 rm -f conftest*
22215 fi
22216
22217 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22218 #
22219 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22220 if test $ol_cv_dcl_sys_errlist = no ; then
22221         cat >> confdefs.h <<\EOF
22222 #define DECL_SYS_ERRLIST 1
22223 EOF
22224
22225
22226         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22227 echo "configure:22228: checking existence of sys_errlist" >&5
22228 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22229   echo $ac_n "(cached) $ac_c" 1>&6
22230 else
22231   
22232                 cat > conftest.$ac_ext <<EOF
22233 #line 22234 "configure"
22234 #include "confdefs.h"
22235 #include <errno.h>
22236 int main() {
22237 char *c = (char *) *sys_errlist
22238 ; return 0; }
22239 EOF
22240 if { (eval echo configure:22241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22241   rm -rf conftest*
22242   ol_cv_have_sys_errlist=yes
22243 else
22244   echo "configure: failed program was:" >&5
22245   cat conftest.$ac_ext >&5
22246   rm -rf conftest*
22247   ol_cv_have_sys_errlist=no
22248 fi
22249 rm -f conftest*
22250 fi
22251
22252 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22253 fi
22254 if test $ol_cv_have_sys_errlist = yes ; then
22255         cat >> confdefs.h <<\EOF
22256 #define HAVE_SYS_ERRLIST 1
22257 EOF
22258
22259 fi
22260
22261
22262
22263 if test "$ol_enable_slapi" != no ; then
22264                         for ac_hdr in ltdl.h
22265 do
22266 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22267 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22268 echo "configure:22269: checking for $ac_hdr" >&5
22269 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22270   echo $ac_n "(cached) $ac_c" 1>&6
22271 else
22272   cat > conftest.$ac_ext <<EOF
22273 #line 22274 "configure"
22274 #include "confdefs.h"
22275 #include <$ac_hdr>
22276 EOF
22277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22278 { (eval echo configure:22279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22280 if test -z "$ac_err"; then
22281   rm -rf conftest*
22282   eval "ac_cv_header_$ac_safe=yes"
22283 else
22284   echo "$ac_err" >&5
22285   echo "configure: failed program was:" >&5
22286   cat conftest.$ac_ext >&5
22287   rm -rf conftest*
22288   eval "ac_cv_header_$ac_safe=no"
22289 fi
22290 rm -f conftest*
22291 fi
22292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22293   echo "$ac_t""yes" 1>&6
22294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22295   cat >> confdefs.h <<EOF
22296 #define $ac_tr_hdr 1
22297 EOF
22298  
22299 else
22300   echo "$ac_t""no" 1>&6
22301 fi
22302 done
22303
22304
22305         if test $ac_cv_header_ltdl_h != yes ; then
22306                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22307         fi
22308         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
22309 echo "configure:22310: checking for lt_dlinit in -lltdl" >&5
22310 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
22311 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22312   echo $ac_n "(cached) $ac_c" 1>&6
22313 else
22314   ac_save_LIBS="$LIBS"
22315 LIBS="-lltdl  $LIBS"
22316 cat > conftest.$ac_ext <<EOF
22317 #line 22318 "configure"
22318 #include "confdefs.h"
22319 /* Override any gcc2 internal prototype to avoid an error.  */
22320 /* We use char because int might match the return type of a gcc2
22321     builtin and then its argument prototype would still apply.  */
22322 char lt_dlinit();
22323
22324 int main() {
22325 lt_dlinit()
22326 ; return 0; }
22327 EOF
22328 if { (eval echo configure:22329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22329   rm -rf conftest*
22330   eval "ac_cv_lib_$ac_lib_var=yes"
22331 else
22332   echo "configure: failed program was:" >&5
22333   cat conftest.$ac_ext >&5
22334   rm -rf conftest*
22335   eval "ac_cv_lib_$ac_lib_var=no"
22336 fi
22337 rm -f conftest*
22338 LIBS="$ac_save_LIBS"
22339
22340 fi
22341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22342   echo "$ac_t""yes" 1>&6
22343   
22344                 SLAPI_LIBS=-lltdl
22345                 cat >> confdefs.h <<\EOF
22346 #define HAVE_LIBLTDL 1
22347 EOF
22348
22349         
22350 else
22351   echo "$ac_t""no" 1>&6
22352 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
22353 fi
22354
22355
22356         cat >> confdefs.h <<\EOF
22357 #define LDAP_SLAPI 1
22358 EOF
22359
22360 fi
22361
22362 if test "$ol_enable_debug" != no ; then
22363         cat >> confdefs.h <<\EOF
22364 #define LDAP_DEBUG 1
22365 EOF
22366
22367 fi
22368 if test "$ol_enable_syslog" = yes ; then
22369         cat >> confdefs.h <<\EOF
22370 #define LDAP_SYSLOG 1
22371 EOF
22372
22373 fi
22374 if test "$ol_enable_cache" = no ; then
22375         cat >> confdefs.h <<\EOF
22376 #define LDAP_NOCACHE 1
22377 EOF
22378
22379 fi
22380 if test "$ol_link_kbind" != no ; then
22381         cat >> confdefs.h <<\EOF
22382 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22383 EOF
22384
22385 fi
22386 if test "$ol_enable_proctitle" != no ; then
22387         cat >> confdefs.h <<\EOF
22388 #define LDAP_PROCTITLE 1
22389 EOF
22390
22391 fi
22392 if test "$ol_enable_referrals" != no ; then
22393         cat >> confdefs.h <<\EOF
22394 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22395 EOF
22396
22397 fi
22398 if test "$ol_enable_local" != no; then
22399         cat >> confdefs.h <<\EOF
22400 #define LDAP_PF_LOCAL 1
22401 EOF
22402
22403 fi
22404 if test "$ol_link_ipv6" != no; then
22405         cat >> confdefs.h <<\EOF
22406 #define LDAP_PF_INET6 1
22407 EOF
22408
22409 fi
22410 if test "$ol_enable_cleartext" != no ; then
22411         cat >> confdefs.h <<\EOF
22412 #define SLAPD_CLEARTEXT 1
22413 EOF
22414
22415 fi
22416 if test "$ol_enable_crypt" != no ; then
22417         cat >> confdefs.h <<\EOF
22418 #define SLAPD_CRYPT 1
22419 EOF
22420
22421 fi
22422 if test "$ol_link_kpasswd" != no ; then
22423         cat >> confdefs.h <<\EOF
22424 #define SLAPD_KPASSWD 1
22425 EOF
22426
22427 fi
22428 if test "$ol_link_spasswd" != no ; then
22429         cat >> confdefs.h <<\EOF
22430 #define SLAPD_SPASSWD 1
22431 EOF
22432
22433 fi
22434 if test "$ol_enable_multimaster" != no ; then
22435         cat >> confdefs.h <<\EOF
22436 #define SLAPD_MULTIMASTER 1
22437 EOF
22438
22439 fi
22440 if test "$ol_enable_phonetic" != no ; then
22441         cat >> confdefs.h <<\EOF
22442 #define SLAPD_PHONETIC 1
22443 EOF
22444
22445 fi
22446 if test "$ol_enable_rlookups" != no ; then
22447         cat >> confdefs.h <<\EOF
22448 #define SLAPD_RLOOKUPS 1
22449 EOF
22450
22451 fi
22452 if test "$ol_enable_aci" != no ; then
22453         cat >> confdefs.h <<\EOF
22454 #define SLAPD_ACI_ENABLED 1
22455 EOF
22456
22457 fi
22458
22459 if test "$ol_link_modules" != no ; then
22460         cat >> confdefs.h <<\EOF
22461 #define SLAPD_MODULES 1
22462 EOF
22463
22464         BUILD_SLAPD=yes
22465         SLAPD_MODULES_LDFLAGS="-dlopen self"
22466 fi
22467
22468 if test "$ol_enable_bdb" != no ; then
22469         cat >> confdefs.h <<\EOF
22470 #define SLAPD_BDB 1
22471 EOF
22472
22473         BUILD_SLAPD=yes
22474         BUILD_BDB=yes
22475         if test "$ol_with_bdb_module" != static ; then
22476                 cat >> confdefs.h <<\EOF
22477 #define SLAPD_BDB_DYNAMIC 1
22478 EOF
22479
22480                 BUILD_BDB=mod
22481                 BUILD_BDB_DYNAMIC=shared
22482                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22483         else
22484                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22485         fi
22486 fi
22487
22488 if test "$ol_link_dnssrv" != no ; then
22489         cat >> confdefs.h <<\EOF
22490 #define SLAPD_DNSSRV 1
22491 EOF
22492
22493         BUILD_SLAPD=yes
22494         BUILD_DNSSRV=yes
22495         if test "$ol_with_dnssrv_module" != static ; then
22496                 cat >> confdefs.h <<\EOF
22497 #define SLAPD_DNSSRV_DYNAMIC 1
22498 EOF
22499
22500                 BUILD_DNSSRV=mod
22501                 BUILD_DNSSRV_DYNAMIC=shared
22502                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22503         else
22504                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22505         fi
22506 fi
22507
22508 if test "$ol_enable_ldap" != no ; then
22509         cat >> confdefs.h <<\EOF
22510 #define SLAPD_LDAP 1
22511 EOF
22512
22513         BUILD_SLAPD=yes
22514         BUILD_LDAP=yes
22515         if test "$ol_with_ldap_module" != static ; then
22516                 cat >> confdefs.h <<\EOF
22517 #define SLAPD_LDAP_DYNAMIC 1
22518 EOF
22519
22520                 BUILD_LDAP=mod
22521                 BUILD_LDAP_DYNAMIC=shared
22522                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22523         else
22524                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22525         fi
22526 fi
22527
22528 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22529         cat >> confdefs.h <<\EOF
22530 #define SLAPD_LDBM 1
22531 EOF
22532
22533         BUILD_SLAPD=yes
22534         BUILD_LDBM=yes
22535         if test "$ol_with_ldbm_module" != static ; then
22536                 cat >> confdefs.h <<\EOF
22537 #define SLAPD_LDBM_DYNAMIC 1
22538 EOF
22539
22540                 BUILD_LDBM=mod
22541                 BUILD_LDBM_DYNAMIC=shared
22542                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22543         else
22544                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22545         fi
22546 fi
22547
22548 if test "$ol_enable_meta" != no ; then
22549         if test "$ol_enable_ldap" = no ; then
22550                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22551         fi
22552         if test "$ol_enable_rewrite" = no ; then
22553                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22554         fi
22555         cat >> confdefs.h <<\EOF
22556 #define SLAPD_META 1
22557 EOF
22558
22559         BUILD_SLAPD=yes
22560         BUILD_META=yes
22561         BUILD_LDAP=yes
22562         BUILD_REWRITE=yes
22563         if test "$ol_with_meta_module" != static ; then
22564                 cat >> confdefs.h <<\EOF
22565 #define SLAPD_META_DYNAMIC 1
22566 EOF
22567
22568                 BUILD_META=mod
22569                 BUILD_META_DYNAMIC=shared
22570                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22571         else
22572                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22573         fi
22574 fi
22575
22576 if test "$ol_enable_monitor" != no ; then
22577         cat >> confdefs.h <<\EOF
22578 #define SLAPD_MONITOR 1
22579 EOF
22580
22581         BUILD_SLAPD=yes
22582         BUILD_MONITOR=yes
22583         if test "$ol_with_monitor_module" != static ; then
22584                 cat >> confdefs.h <<\EOF
22585 #define SLAPD_MONITOR_DYNAMIC 1
22586 EOF
22587
22588                 BUILD_MONITOR=mod
22589                 BUILD_MONITOR_DYNAMIC=shared
22590                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22591         else
22592                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22593         fi
22594 fi
22595
22596 if test "$ol_enable_null" != no ; then
22597         cat >> confdefs.h <<\EOF
22598 #define SLAPD_NULL 1
22599 EOF
22600
22601         BUILD_SLAPD=yes
22602         BUILD_NULL=yes
22603         if test "$ol_with_null_module" != static ; then
22604                 cat >> confdefs.h <<\EOF
22605 #define SLAPD_NULL_DYNAMIC 1
22606 EOF
22607
22608                 BUILD_NULL=mod
22609                 BUILD_NULL_DYNAMIC=shared
22610                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22611         else
22612                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22613         fi
22614 fi
22615
22616 if test "$ol_enable_passwd" != no ; then
22617         cat >> confdefs.h <<\EOF
22618 #define SLAPD_PASSWD 1
22619 EOF
22620
22621         BUILD_SLAPD=yes
22622         BUILD_PASSWD=yes
22623         if test "$ol_with_passwd_module" != static ; then
22624                 cat >> confdefs.h <<\EOF
22625 #define SLAPD_PASSWD_DYNAMIC 1
22626 EOF
22627
22628                 BUILD_PASSWD=mod
22629                 BUILD_PASSWD_DYNAMIC=shared
22630                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22631         else
22632                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22633         fi
22634 fi
22635
22636 if test "$ol_link_perl" != no ; then
22637         cat >> confdefs.h <<\EOF
22638 #define SLAPD_PERL 1
22639 EOF
22640
22641         BUILD_SLAPD=yes
22642         BUILD_PERL=yes
22643         if test "$ol_with_perl_module" != static ; then
22644                 cat >> confdefs.h <<\EOF
22645 #define SLAPD_PERL_DYNAMIC 1
22646 EOF
22647
22648                 BUILD_PERL=mod
22649                 BUILD_PERL_DYNAMIC=shared
22650                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22651         else
22652                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22653         fi
22654 fi
22655
22656 if test "$ol_enable_shell" != no ; then
22657         if test "$ol_link_thread" != no ; then
22658                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
22659         fi
22660         cat >> confdefs.h <<\EOF
22661 #define SLAPD_SHELL 1
22662 EOF
22663
22664         BUILD_SLAPD=yes
22665         BUILD_SHELL=yes
22666         if test "$ol_with_shell_module" != static ; then
22667                 cat >> confdefs.h <<\EOF
22668 #define SLAPD_SHELL_DYNAMIC 1
22669 EOF
22670
22671                 BUILD_SHELL=mod
22672                 BUILD_SHELL_DYNAMIC=shared
22673                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22674         else
22675                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22676         fi
22677 fi
22678
22679 if test "$ol_enable_tcl" != no ; then
22680         cat >> confdefs.h <<\EOF
22681 #define SLAPD_TCL 1
22682 EOF
22683
22684         BUILD_SLAPD=yes
22685         BUILD_TCL=yes
22686         if test "$ol_with_tcl_module" != static; then
22687                 cat >> confdefs.h <<\EOF
22688 #define SLAPD_TCL_DYNAMIC 1
22689 EOF
22690
22691                 BUILD_TCL=mod
22692                 BUILD_TCL_DYNAMIC=shared
22693                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22694         else
22695                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22696         fi
22697 fi
22698
22699 if test "$ol_link_sql" != no ; then
22700         cat >> confdefs.h <<\EOF
22701 #define SLAPD_SQL 1
22702 EOF
22703
22704         BUILD_SLAPD=yes
22705         BUILD_SQL=yes
22706         if test "$ol_with_sql_module" != static; then
22707                 cat >> confdefs.h <<\EOF
22708 #define SLAPD_SQL_DYNAMIC 1
22709 EOF
22710
22711                 BUILD_SQL=mod
22712                 BUILD_SQL_DYNAMIC=shared
22713                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22714         else
22715                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22716         fi
22717 fi
22718
22719 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22720         $BUILD_SLAPD = yes ; then
22721         BUILD_SLURPD=yes
22722 fi
22723
22724 if test "$ol_enable_rewrite" != no ; then
22725         cat >> confdefs.h <<\EOF
22726 #define ENABLE_REWRITE 1
22727 EOF
22728
22729         BUILD_REWRITE=yes
22730 fi
22731
22732 if test "$ol_enable_slapi" != no ; then
22733         cat >> confdefs.h <<\EOF
22734 #define ENABLE_SLAPI 1
22735 EOF
22736
22737         BUILD_SLAPI=yes
22738         SLAPD_SLAPI_DEPEND=libslapi.a
22739 fi
22740
22741
22742
22743 if test "$ac_cv_mingw32" = yes ; then
22744         PLAT=NT
22745         SLAPD_MODULES_LDFLAGS=
22746 else
22747         PLAT=UNIX
22748 fi
22749
22750 if test -z "$SLAPD_STATIC_BACKENDS"; then
22751         SLAPD_NO_STATIC='#'
22752 else
22753         SLAPD_NO_STATIC=
22754 fi
22755
22756
22757
22758
22759
22760
22761   
22762   
22763   
22764   
22765   
22766   
22767   
22768   
22769   
22770   
22771   
22772   
22773   
22774   
22775   
22776   
22777   
22778   
22779   
22780   
22781   
22782   
22783   
22784   
22785   
22786   
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826 # Check whether --with-xxinstall or --without-xxinstall was given.
22827 if test "${with_xxinstall+set}" = set; then
22828   withval="$with_xxinstall"
22829   :
22830 fi
22831
22832
22833
22834 trap '' 1 2 15
22835
22836 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22837
22838 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22839 # Let make expand exec_prefix.
22840 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22841
22842 # Any assignment to VPATH causes Sun make to only execute
22843 # the first set of double-colon rules, so remove it if not needed.
22844 # If there is a colon in the path, we need to keep it.
22845 if test "x$srcdir" = x.; then
22846   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22847 fi
22848
22849 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22850
22851 DEFS=-DHAVE_CONFIG_H
22852
22853 # Without the "./", some shells look in PATH for config.status.
22854 : ${CONFIG_STATUS=./config.status}
22855
22856 echo creating $CONFIG_STATUS
22857 rm -f $CONFIG_STATUS
22858 cat > $CONFIG_STATUS <<EOF
22859 #! /bin/sh
22860 # Generated automatically by configure.
22861 # Run this file to recreate the current configuration.
22862 # This directory was configured as follows,
22863 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22864 #
22865 # $0 $ac_configure_args
22866 #
22867 # Compiler output produced by configure, useful for debugging
22868 # configure, is in ./config.log if it exists.
22869
22870 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22871 for ac_option
22872 do
22873   case "\$ac_option" in
22874   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22875     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22876     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22877   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22878     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22879     exit 0 ;;
22880   -help | --help | --hel | --he | --h)
22881     echo "\$ac_cs_usage"; exit 0 ;;
22882   *) echo "\$ac_cs_usage"; exit 1 ;;
22883   esac
22884 done
22885
22886 ac_given_srcdir=$srcdir
22887 ac_given_INSTALL="$INSTALL"
22888
22889 trap 'rm -fr `echo "\
22890 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22891 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22892 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22893 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22894 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22895 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22896 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22897 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22898 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22899 include/Makefile:build/top.mk:include/Makefile.in \
22900 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22901 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22902 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22903 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22904 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22905 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22906 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22907 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22908 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22909 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22910 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22911 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22912 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22913 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22914 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22915 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22916 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22917 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22918 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22919 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22920 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22921 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22922 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22923 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22924 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22925 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22926 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22927 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22928 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22929 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22930  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22931 EOF
22932 cat >> $CONFIG_STATUS <<EOF
22933
22934 # Protect against being on the right side of a sed subst in config.status.
22935 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22936  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22937 $ac_vpsub
22938 $extrasub
22939 s%@SHELL@%$SHELL%g
22940 s%@CFLAGS@%$CFLAGS%g
22941 s%@CPPFLAGS@%$CPPFLAGS%g
22942 s%@CXXFLAGS@%$CXXFLAGS%g
22943 s%@FFLAGS@%$FFLAGS%g
22944 s%@DEFS@%$DEFS%g
22945 s%@LDFLAGS@%$LDFLAGS%g
22946 s%@LIBS@%$LIBS%g
22947 s%@exec_prefix@%$exec_prefix%g
22948 s%@prefix@%$prefix%g
22949 s%@program_transform_name@%$program_transform_name%g
22950 s%@bindir@%$bindir%g
22951 s%@sbindir@%$sbindir%g
22952 s%@libexecdir@%$libexecdir%g
22953 s%@datadir@%$datadir%g
22954 s%@sysconfdir@%$sysconfdir%g
22955 s%@sharedstatedir@%$sharedstatedir%g
22956 s%@localstatedir@%$localstatedir%g
22957 s%@libdir@%$libdir%g
22958 s%@includedir@%$includedir%g
22959 s%@oldincludedir@%$oldincludedir%g
22960 s%@infodir@%$infodir%g
22961 s%@mandir@%$mandir%g
22962 s%@host@%$host%g
22963 s%@host_alias@%$host_alias%g
22964 s%@host_cpu@%$host_cpu%g
22965 s%@host_vendor@%$host_vendor%g
22966 s%@host_os@%$host_os%g
22967 s%@target@%$target%g
22968 s%@target_alias@%$target_alias%g
22969 s%@target_cpu@%$target_cpu%g
22970 s%@target_vendor@%$target_vendor%g
22971 s%@target_os@%$target_os%g
22972 s%@build@%$build%g
22973 s%@build_alias@%$build_alias%g
22974 s%@build_cpu@%$build_cpu%g
22975 s%@build_vendor@%$build_vendor%g
22976 s%@build_os@%$build_os%g
22977 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22978 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22979 s%@INSTALL_DATA@%$INSTALL_DATA%g
22980 s%@PACKAGE@%$PACKAGE%g
22981 s%@VERSION@%$VERSION%g
22982 s%@ACLOCAL@%$ACLOCAL%g
22983 s%@AUTOCONF@%$AUTOCONF%g
22984 s%@AUTOMAKE@%$AUTOMAKE%g
22985 s%@AUTOHEADER@%$AUTOHEADER%g
22986 s%@MAKEINFO@%$MAKEINFO%g
22987 s%@install_sh@%$install_sh%g
22988 s%@AMTAR@%$AMTAR%g
22989 s%@AWK@%$AWK%g
22990 s%@AMTARFLAGS@%$AMTARFLAGS%g
22991 s%@SET_MAKE@%$SET_MAKE%g
22992 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22993 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22994 s%@top_builddir@%$top_builddir%g
22995 s%@ldap_subdir@%$ldap_subdir%g
22996 s%@CC@%$CC%g
22997 s%@AR@%$AR%g
22998 s%@LN_S@%$LN_S%g
22999 s%@OBJEXT@%$OBJEXT%g
23000 s%@EXEEXT@%$EXEEXT%g
23001 s%@ECHO@%$ECHO%g
23002 s%@RANLIB@%$RANLIB%g
23003 s%@STRIP@%$STRIP%g
23004 s%@DLLTOOL@%$DLLTOOL%g
23005 s%@AS@%$AS%g
23006 s%@OBJDUMP@%$OBJDUMP%g
23007 s%@CPP@%$CPP%g
23008 s%@LIBTOOL@%$LIBTOOL%g
23009 s%@LTSTATIC@%$LTSTATIC%g
23010 s%@LN_H@%$LN_H%g
23011 s%@PERLBIN@%$PERLBIN%g
23012 s%@OL_MKDEP@%$OL_MKDEP%g
23013 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23014 s%@LIBOBJS@%$LIBOBJS%g
23015 s%@LIBSRCS@%$LIBSRCS%g
23016 s%@PLAT@%$PLAT%g
23017 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23018 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23019 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23020 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23021 s%@BUILD_BDB@%$BUILD_BDB%g
23022 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23023 s%@BUILD_LDAP@%$BUILD_LDAP%g
23024 s%@BUILD_LDBM@%$BUILD_LDBM%g
23025 s%@BUILD_META@%$BUILD_META%g
23026 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23027 s%@BUILD_NULL@%$BUILD_NULL%g
23028 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23029 s%@BUILD_PERL@%$BUILD_PERL%g
23030 s%@BUILD_SHELL@%$BUILD_SHELL%g
23031 s%@BUILD_SQL@%$BUILD_SQL%g
23032 s%@BUILD_TCL@%$BUILD_TCL%g
23033 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23034 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23035 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23036 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23037 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23038 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23039 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23040 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23041 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23042 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23043 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23044 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23045 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23046 s%@LDAP_LIBS@%$LDAP_LIBS%g
23047 s%@LDIF_LIBS@%$LDIF_LIBS%g
23048 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23049 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23050 s%@LDBM_LIBS@%$LDBM_LIBS%g
23051 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23052 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23053 s%@WRAP_LIBS@%$WRAP_LIBS%g
23054 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23055 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23056 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23057 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23058 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23059 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23060 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23061 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23062 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23063 s%@KRB4_LIBS@%$KRB4_LIBS%g
23064 s%@KRB5_LIBS@%$KRB5_LIBS%g
23065 s%@READLINE_LIBS@%$READLINE_LIBS%g
23066 s%@SASL_LIBS@%$SASL_LIBS%g
23067 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23068 s%@TLS_LIBS@%$TLS_LIBS%g
23069 s%@MODULES_LIBS@%$MODULES_LIBS%g
23070 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23071 s%@AUTH_LIBS@%$AUTH_LIBS%g
23072 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23073 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23074 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23075 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23076
23077 CEOF
23078 EOF
23079
23080 cat >> $CONFIG_STATUS <<\EOF
23081
23082 # Split the substitutions into bite-sized pieces for seds with
23083 # small command number limits, like on Digital OSF/1 and HP-UX.
23084 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23085 ac_file=1 # Number of current file.
23086 ac_beg=1 # First line for current file.
23087 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23088 ac_more_lines=:
23089 ac_sed_cmds=""
23090 while $ac_more_lines; do
23091   if test $ac_beg -gt 1; then
23092     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23093   else
23094     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23095   fi
23096   if test ! -s conftest.s$ac_file; then
23097     ac_more_lines=false
23098     rm -f conftest.s$ac_file
23099   else
23100     if test -z "$ac_sed_cmds"; then
23101       ac_sed_cmds="sed -f conftest.s$ac_file"
23102     else
23103       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23104     fi
23105     ac_file=`expr $ac_file + 1`
23106     ac_beg=$ac_end
23107     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23108   fi
23109 done
23110 if test -z "$ac_sed_cmds"; then
23111   ac_sed_cmds=cat
23112 fi
23113 EOF
23114
23115 cat >> $CONFIG_STATUS <<EOF
23116
23117 CONFIG_FILES=\${CONFIG_FILES-"\
23118 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23119 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23120 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23121 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23122 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23123 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23124 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23125 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23126 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23127 include/Makefile:build/top.mk:include/Makefile.in \
23128 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23129 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23130 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23131 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23132 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23133 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23134 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23135 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23136 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23137 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23138 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23139 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23140 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23141 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23142 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23143 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23144 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23145 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23146 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23147 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23148 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23149 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23150 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23151 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23152 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23153 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23154 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23155 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23156 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23157 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23158 "}
23159 EOF
23160 cat >> $CONFIG_STATUS <<\EOF
23161 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23162   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23163   case "$ac_file" in
23164   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23165        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23166   *) ac_file_in="${ac_file}.in" ;;
23167   esac
23168
23169   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23170
23171   # Remove last slash and all that follows it.  Not all systems have dirname.
23172   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23173   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23174     # The file is in a subdirectory.
23175     test ! -d "$ac_dir" && mkdir "$ac_dir"
23176     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23177     # A "../" for each directory in $ac_dir_suffix.
23178     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23179   else
23180     ac_dir_suffix= ac_dots=
23181   fi
23182
23183   case "$ac_given_srcdir" in
23184   .)  srcdir=.
23185       if test -z "$ac_dots"; then top_srcdir=.
23186       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23187   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23188   *) # Relative path.
23189     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23190     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23191   esac
23192
23193   case "$ac_given_INSTALL" in
23194   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23195   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23196   esac
23197
23198   echo creating "$ac_file"
23199   rm -f "$ac_file"
23200   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23201   case "$ac_file" in
23202   *[Mm]akefile*) ac_comsub="1i\\
23203 # $configure_input" ;;
23204   *) ac_comsub= ;;
23205   esac
23206
23207   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23208   sed -e "$ac_comsub
23209 s%@configure_input@%$configure_input%g
23210 s%@srcdir@%$srcdir%g
23211 s%@top_srcdir@%$top_srcdir%g
23212 s%@INSTALL@%$INSTALL%g
23213 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23214 fi; done
23215 rm -f conftest.s*
23216
23217 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23218 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23219 #
23220 # ac_d sets the value in "#define NAME VALUE" lines.
23221 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23222 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23223 ac_dC='\3'
23224 ac_dD='%g'
23225 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23226 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23227 ac_uB='\([      ]\)%\1#\2define\3'
23228 ac_uC=' '
23229 ac_uD='\4%g'
23230 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23231 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23232 ac_eB='$%\1#\2define\3'
23233 ac_eC=' '
23234 ac_eD='%g'
23235
23236 if test "${CONFIG_HEADERS+set}" != set; then
23237 EOF
23238 cat >> $CONFIG_STATUS <<EOF
23239   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23240 EOF
23241 cat >> $CONFIG_STATUS <<\EOF
23242 fi
23243 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23244   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23245   case "$ac_file" in
23246   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23247        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23248   *) ac_file_in="${ac_file}.in" ;;
23249   esac
23250
23251   echo creating $ac_file
23252
23253   rm -f conftest.frag conftest.in conftest.out
23254   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23255   cat $ac_file_inputs > conftest.in
23256
23257 EOF
23258
23259 # Transform confdefs.h into a sed script conftest.vals that substitutes
23260 # the proper values into config.h.in to produce config.h.  And first:
23261 # Protect against being on the right side of a sed subst in config.status.
23262 # Protect against being in an unquoted here document in config.status.
23263 rm -f conftest.vals
23264 cat > conftest.hdr <<\EOF
23265 s/[\\&%]/\\&/g
23266 s%[\\$`]%\\&%g
23267 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23268 s%ac_d%ac_u%gp
23269 s%ac_u%ac_e%gp
23270 EOF
23271 sed -n -f conftest.hdr confdefs.h > conftest.vals
23272 rm -f conftest.hdr
23273
23274 # This sed command replaces #undef with comments.  This is necessary, for
23275 # example, in the case of _POSIX_SOURCE, which is predefined and required
23276 # on some systems where configure will not decide to define it.
23277 cat >> conftest.vals <<\EOF
23278 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23279 EOF
23280
23281 # Break up conftest.vals because some shells have a limit on
23282 # the size of here documents, and old seds have small limits too.
23283
23284 rm -f conftest.tail
23285 while :
23286 do
23287   ac_lines=`grep -c . conftest.vals`
23288   # grep -c gives empty output for an empty file on some AIX systems.
23289   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23290   # Write a limited-size here document to conftest.frag.
23291   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23292   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23293   echo 'CEOF
23294   sed -f conftest.frag conftest.in > conftest.out
23295   rm -f conftest.in
23296   mv conftest.out conftest.in
23297 ' >> $CONFIG_STATUS
23298   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23299   rm -f conftest.vals
23300   mv conftest.tail conftest.vals
23301 done
23302 rm -f conftest.vals
23303
23304 cat >> $CONFIG_STATUS <<\EOF
23305   rm -f conftest.frag conftest.h
23306   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23307   cat conftest.in >> conftest.h
23308   rm -f conftest.in
23309   if cmp -s $ac_file conftest.h 2>/dev/null; then
23310     echo "$ac_file is unchanged"
23311     rm -f conftest.h
23312   else
23313     # Remove last slash and all that follows it.  Not all systems have dirname.
23314       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23315       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23316       # The file is in a subdirectory.
23317       test ! -d "$ac_dir" && mkdir "$ac_dir"
23318     fi
23319     rm -f $ac_file
23320     mv conftest.h $ac_file
23321   fi
23322 fi; done
23323
23324 EOF
23325 cat >> $CONFIG_STATUS <<EOF
23326
23327 EOF
23328 cat >> $CONFIG_STATUS <<\EOF
23329
23330 date > stamp-h
23331 echo Please run \"make depend\" to build dependencies
23332
23333 exit 0
23334 EOF
23335 chmod +x $CONFIG_STATUS
23336 rm -fr confdefs* $ac_clean_files
23337 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23338