]> git.sur5r.net Git - openldap/blob - configure
2d764fb08e2a357c3ceadebe76a0d3c004a9f72d
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.423 2002/06/25 00:18:50 kurt Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-ipv6           enable IPv6 support [auto]"
42 ac_help="$ac_help
43   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
44 ac_help="$ac_help
45   --enable-x-compile      enable cross compiling [no]"
46 ac_help="$ac_help
47   --with-cyrus-sasl       with Cyrus SASL support [auto]"
48 ac_help="$ac_help
49   --with-fetch            with freeBSD fetch URL support [auto]"
50 ac_help="$ac_help
51   --with-kerberos         with Kerberos support [auto]"
52 ac_help="$ac_help
53   --with-readline         with readline support [auto]"
54 ac_help="$ac_help
55   --with-threads          with threads [auto]"
56 ac_help="$ac_help
57   --with-tls              with TLS/SSL support [auto]"
58 ac_help="$ac_help
59   --with-yielding-select  with implicitly yielding select [auto]"
60 ac_help="$ac_help
61
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd [yes]"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
85 ac_help="$ac_help
86     --enable-rlookups     enable reverse lookups of client hostnames [no]"
87 ac_help="$ac_help
88     --enable-slp          enable SLPv2 support [no]"
89 ac_help="$ac_help
90     --enable-wrappers     enable tcp wrapper support [no]"
91 ac_help="$ac_help
92     --enable-bdb          enable Berkeley DB backend [yes]"
93 ac_help="$ac_help
94     --with-bdb-module     module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend [no]"
97 ac_help="$ac_help
98     --with-dnssrv-module  module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend [no]"
101 ac_help="$ac_help
102     --with-ldap-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --enable-ldbm         enable ldbm backend [no]"
105 ac_help="$ac_help
106     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
107 ac_help="$ac_help
108     --with-ldbm-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
111 ac_help="$ac_help
112     --enable-meta         enable metadirectory backend [no]"
113 ac_help="$ac_help
114     --with-meta-module    module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-monitor      enable monitor backend [no]"
117 ac_help="$ac_help
118     --with-monitor-module module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-null         enable null backend [no]"
121 ac_help="$ac_help
122     --with-null-module    module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-passwd       enable passwd backend [no]"
125 ac_help="$ac_help
126     --with-passwd-module  module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-perl         enable perl backend [no]"
129 ac_help="$ac_help
130     --with-perl-module    module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-shell        enable shell backend [no]"
133 ac_help="$ac_help
134     --with-shell-module   module type static|dynamic [static]"
135 ac_help="$ac_help
136     --enable-sql          enable sql backend [no]"
137 ac_help="$ac_help
138     --with-sql-module     module type static|dynamic [static]"
139 ac_help="$ac_help
140     --enable-tcl          enable tcl backend [no]"
141 ac_help="$ac_help
142     --with-tcl-module     module type static|dynamic [static]"
143 ac_help="$ac_help
144
145 SLURPD (Replication Daemon) Options:"
146 ac_help="$ac_help
147   --enable-slurpd         enable building slurpd [auto]"
148 ac_help="$ac_help
149
150 Library Generation & Linking Options"
151 ac_help="$ac_help
152   --enable-static[=PKGS]  build static libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-shared[=PKGS]  build shared libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
157 ac_help="$ac_help
158   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
159
160 # Find the correct PATH separator.  Usually this is `:', but
161 # DJGPP uses `;' like DOS.
162 if test "X${PATH_SEPARATOR+set}" != Xset; then
163   UNAME=${UNAME-`uname 2>/dev/null`}
164   case X$UNAME in
165     *-DOS) lt_cv_sys_path_separator=';' ;;
166     *)     lt_cv_sys_path_separator=':' ;;
167   esac
168   PATH_SEPARATOR=$lt_cv_sys_path_separator
169 fi
170
171
172 # Check that we are running under the correct shell.
173 SHELL=${CONFIG_SHELL-/bin/sh}
174
175 case X$ECHO in
176 X*--fallback-echo)
177   # Remove one level of quotation (which was required for Make).
178   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
179   ;;
180 esac
181
182 echo=${ECHO-echo}
183 if test "X$1" = X--no-reexec; then
184   # Discard the --no-reexec flag, and continue.
185   shift
186 elif test "X$1" = X--fallback-echo; then
187   # Avoid inline document here, it may be left over
188   :
189 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
190   # Yippee, $echo works!
191   :
192 else
193   # Restart under the correct shell.
194   exec $SHELL "$0" --no-reexec ${1+"$@"}
195 fi
196
197 if test "X$1" = X--fallback-echo; then
198   # used as fallback echo
199   shift
200   cat <<EOF
201
202 EOF
203   exit 0
204 fi
205
206 # The HP-UX ksh and POSIX shell print the target directory to stdout
207 # if CDPATH is set.
208 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
209
210 if test -z "$ECHO"; then
211 if test "X${echo_test_string+set}" != Xset; then
212 # find a string as large as possible, as long as the shell can cope with it
213   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
214     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
215     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
216        echo_test_string="`eval $cmd`" &&
217        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
218     then
219       break
220     fi
221   done
222 fi
223
224 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
225    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
226    test "X$echo_testing_string" = "X$echo_test_string"; then
227   :
228 else
229   # The Solaris, AIX, and Digital Unix default echo programs unquote
230   # backslashes.  This makes it impossible to quote backslashes using
231   #   echo "$something" | sed 's/\\/\\\\/g'
232   #
233   # So, first we look for a working echo in the user's PATH.
234
235   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236   for dir in $PATH /usr/ucb; do
237     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
238        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
239        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
240        test "X$echo_testing_string" = "X$echo_test_string"; then
241       echo="$dir/echo"
242       break
243     fi
244   done
245   IFS="$save_ifs"
246
247   if test "X$echo" = Xecho; then
248     # We didn't find a better echo, so look for alternatives.
249     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
250        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
251        test "X$echo_testing_string" = "X$echo_test_string"; then
252       # This shell has a builtin print -r that does the trick.
253       echo='print -r'
254     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
255          test "X$CONFIG_SHELL" != X/bin/ksh; then
256       # If we have ksh, try running configure again with it.
257       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
258       export ORIGINAL_CONFIG_SHELL
259       CONFIG_SHELL=/bin/ksh
260       export CONFIG_SHELL
261       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
262     else
263       # Try using printf.
264       echo='printf %s\n'
265       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
266          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
267          test "X$echo_testing_string" = "X$echo_test_string"; then
268         # Cool, printf works
269         :
270       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
271            test "X$echo_testing_string" = 'X\t' &&
272            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
273            test "X$echo_testing_string" = "X$echo_test_string"; then
274         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
275         export CONFIG_SHELL
276         SHELL="$CONFIG_SHELL"
277         export SHELL
278         echo="$CONFIG_SHELL $0 --fallback-echo"
279       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
280            test "X$echo_testing_string" = 'X\t' &&
281            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
282            test "X$echo_testing_string" = "X$echo_test_string"; then
283         echo="$CONFIG_SHELL $0 --fallback-echo"
284       else
285         # maybe with a smaller string...
286         prev=:
287
288         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
289           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
290           then
291             break
292           fi
293           prev="$cmd"
294         done
295
296         if test "$prev" != 'sed 50q "$0"'; then
297           echo_test_string=`eval $prev`
298           export echo_test_string
299           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
300         else
301           # Oops.  We lost completely, so just stick with echo.
302           echo=echo
303         fi
304       fi
305     fi
306   fi
307 fi
308 fi
309
310 # Copy echo and quote the copy suitably for passing to libtool from
311 # the Makefile, instead of quoting the original, which is used later.
312 ECHO=$echo
313 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
314    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
315 fi
316
317
318 ac_help="$ac_help
319   --disable-libtool-lock  avoid locking (might break parallel builds)"
320 ac_help="$ac_help
321   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
322 ac_help="$ac_help
323
324 See INSTALL file for further details."
325
326 # Initialize some variables set by options.
327 # The variables have the same names as the options, with
328 # dashes changed to underlines.
329 build=NONE
330 cache_file=./config.cache
331 exec_prefix=NONE
332 host=NONE
333 no_create=
334 nonopt=NONE
335 no_recursion=
336 prefix=NONE
337 program_prefix=NONE
338 program_suffix=NONE
339 program_transform_name=s,x,x,
340 silent=
341 site=
342 srcdir=
343 target=NONE
344 verbose=
345 x_includes=NONE
346 x_libraries=NONE
347 bindir='${exec_prefix}/bin'
348 sbindir='${exec_prefix}/sbin'
349 libexecdir='${exec_prefix}/libexec'
350 datadir='${prefix}/share'
351 sysconfdir='${prefix}/etc'
352 sharedstatedir='${prefix}/com'
353 localstatedir='${prefix}/var'
354 libdir='${exec_prefix}/lib'
355 includedir='${prefix}/include'
356 oldincludedir='/usr/include'
357 infodir='${prefix}/info'
358 mandir='${prefix}/man'
359
360 # Initialize some other variables.
361 subdirs=
362 MFLAGS= MAKEFLAGS=
363 SHELL=${CONFIG_SHELL-/bin/sh}
364 # Maximum number of lines to put in a shell here document.
365 ac_max_here_lines=12
366
367 ac_prev=
368 for ac_option
369 do
370
371   # If the previous option needs an argument, assign it.
372   if test -n "$ac_prev"; then
373     eval "$ac_prev=\$ac_option"
374     ac_prev=
375     continue
376   fi
377
378   case "$ac_option" in
379   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
380   *) ac_optarg= ;;
381   esac
382
383   # Accept the important Cygnus configure options, so we can diagnose typos.
384
385   case "$ac_option" in
386
387   -bindir | --bindir | --bindi | --bind | --bin | --bi)
388     ac_prev=bindir ;;
389   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
390     bindir="$ac_optarg" ;;
391
392   -build | --build | --buil | --bui | --bu)
393     ac_prev=build ;;
394   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
395     build="$ac_optarg" ;;
396
397   -cache-file | --cache-file | --cache-fil | --cache-fi \
398   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
399     ac_prev=cache_file ;;
400   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
401   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
402     cache_file="$ac_optarg" ;;
403
404   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
405     ac_prev=datadir ;;
406   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
407   | --da=*)
408     datadir="$ac_optarg" ;;
409
410   -disable-* | --disable-*)
411     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
415     fi
416     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
417     eval "enable_${ac_feature}=no" ;;
418
419   -enable-* | --enable-*)
420     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
421     # Reject names that are not valid shell variable names.
422     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
423       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
424     fi
425     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
426     case "$ac_option" in
427       *=*) ;;
428       *) ac_optarg=yes ;;
429     esac
430     eval "enable_${ac_feature}='$ac_optarg'" ;;
431
432   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
433   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
434   | --exec | --exe | --ex)
435     ac_prev=exec_prefix ;;
436   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
437   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
438   | --exec=* | --exe=* | --ex=*)
439     exec_prefix="$ac_optarg" ;;
440
441   -gas | --gas | --ga | --g)
442     # Obsolete; use --with-gas.
443     with_gas=yes ;;
444
445   -help | --help | --hel | --he)
446     # Omit some internal or obsolete options to make the list less imposing.
447     # This message is too long to be a string in the A/UX 3.1 sh.
448     cat << EOF
449 Usage: configure [options] [host]
450 Options: [defaults in brackets after descriptions]
451 Configuration:
452   --cache-file=FILE       cache test results in FILE
453   --help                  print this message
454   --no-create             do not create output files
455   --quiet, --silent       do not print \`checking...' messages
456   --version               print the version of autoconf that created configure
457 Directory and file names:
458   --prefix=PREFIX         install architecture-independent files in PREFIX
459                           [$ac_default_prefix]
460   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
461                           [same as prefix]
462   --bindir=DIR            user executables in DIR [EPREFIX/bin]
463   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
464   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
465   --datadir=DIR           read-only architecture-independent data in DIR
466                           [PREFIX/share]
467   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
468   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
469                           [PREFIX/com]
470   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
471   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
472   --includedir=DIR        C header files in DIR [PREFIX/include]
473   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
474   --infodir=DIR           info documentation in DIR [PREFIX/info]
475   --mandir=DIR            man documentation in DIR [PREFIX/man]
476   --srcdir=DIR            find the sources in DIR [configure dir or ..]
477   --program-prefix=PREFIX prepend PREFIX to installed program names
478   --program-suffix=SUFFIX append SUFFIX to installed program names
479   --program-transform-name=PROGRAM
480                           run sed PROGRAM on installed program names
481 EOF
482     cat << EOF
483 Host type:
484   --build=BUILD           configure for building on BUILD [BUILD=HOST]
485   --host=HOST             configure for HOST [guessed]
486   --target=TARGET         configure for TARGET [TARGET=HOST]
487 Features and packages:
488   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
489   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
490   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
491   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
492   --x-includes=DIR        X include files are in DIR
493   --x-libraries=DIR       X library files are in DIR
494 EOF
495     if test -n "$ac_help"; then
496       echo "--enable and --with options recognized:$ac_help"
497     fi
498     exit 0 ;;
499
500   -host | --host | --hos | --ho)
501     ac_prev=host ;;
502   -host=* | --host=* | --hos=* | --ho=*)
503     host="$ac_optarg" ;;
504
505   -includedir | --includedir | --includedi | --included | --include \
506   | --includ | --inclu | --incl | --inc)
507     ac_prev=includedir ;;
508   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
509   | --includ=* | --inclu=* | --incl=* | --inc=*)
510     includedir="$ac_optarg" ;;
511
512   -infodir | --infodir | --infodi | --infod | --info | --inf)
513     ac_prev=infodir ;;
514   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
515     infodir="$ac_optarg" ;;
516
517   -libdir | --libdir | --libdi | --libd)
518     ac_prev=libdir ;;
519   -libdir=* | --libdir=* | --libdi=* | --libd=*)
520     libdir="$ac_optarg" ;;
521
522   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
523   | --libexe | --libex | --libe)
524     ac_prev=libexecdir ;;
525   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
526   | --libexe=* | --libex=* | --libe=*)
527     libexecdir="$ac_optarg" ;;
528
529   -localstatedir | --localstatedir | --localstatedi | --localstated \
530   | --localstate | --localstat | --localsta | --localst \
531   | --locals | --local | --loca | --loc | --lo)
532     ac_prev=localstatedir ;;
533   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
534   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
535   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
536     localstatedir="$ac_optarg" ;;
537
538   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
539     ac_prev=mandir ;;
540   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
541     mandir="$ac_optarg" ;;
542
543   -nfp | --nfp | --nf)
544     # Obsolete; use --without-fp.
545     with_fp=no ;;
546
547   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
548   | --no-cr | --no-c)
549     no_create=yes ;;
550
551   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
552   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
553     no_recursion=yes ;;
554
555   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
556   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
557   | --oldin | --oldi | --old | --ol | --o)
558     ac_prev=oldincludedir ;;
559   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
560   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
561   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
562     oldincludedir="$ac_optarg" ;;
563
564   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
565     ac_prev=prefix ;;
566   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
567     prefix="$ac_optarg" ;;
568
569   -program-prefix | --program-prefix | --program-prefi | --program-pref \
570   | --program-pre | --program-pr | --program-p)
571     ac_prev=program_prefix ;;
572   -program-prefix=* | --program-prefix=* | --program-prefi=* \
573   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
574     program_prefix="$ac_optarg" ;;
575
576   -program-suffix | --program-suffix | --program-suffi | --program-suff \
577   | --program-suf | --program-su | --program-s)
578     ac_prev=program_suffix ;;
579   -program-suffix=* | --program-suffix=* | --program-suffi=* \
580   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
581     program_suffix="$ac_optarg" ;;
582
583   -program-transform-name | --program-transform-name \
584   | --program-transform-nam | --program-transform-na \
585   | --program-transform-n | --program-transform- \
586   | --program-transform | --program-transfor \
587   | --program-transfo | --program-transf \
588   | --program-trans | --program-tran \
589   | --progr-tra | --program-tr | --program-t)
590     ac_prev=program_transform_name ;;
591   -program-transform-name=* | --program-transform-name=* \
592   | --program-transform-nam=* | --program-transform-na=* \
593   | --program-transform-n=* | --program-transform-=* \
594   | --program-transform=* | --program-transfor=* \
595   | --program-transfo=* | --program-transf=* \
596   | --program-trans=* | --program-tran=* \
597   | --progr-tra=* | --program-tr=* | --program-t=*)
598     program_transform_name="$ac_optarg" ;;
599
600   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
601   | -silent | --silent | --silen | --sile | --sil)
602     silent=yes ;;
603
604   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
605     ac_prev=sbindir ;;
606   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
607   | --sbi=* | --sb=*)
608     sbindir="$ac_optarg" ;;
609
610   -sharedstatedir | --sharedstatedir | --sharedstatedi \
611   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
612   | --sharedst | --shareds | --shared | --share | --shar \
613   | --sha | --sh)
614     ac_prev=sharedstatedir ;;
615   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
616   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
617   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
618   | --sha=* | --sh=*)
619     sharedstatedir="$ac_optarg" ;;
620
621   -site | --site | --sit)
622     ac_prev=site ;;
623   -site=* | --site=* | --sit=*)
624     site="$ac_optarg" ;;
625
626   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
627     ac_prev=srcdir ;;
628   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
629     srcdir="$ac_optarg" ;;
630
631   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
632   | --syscon | --sysco | --sysc | --sys | --sy)
633     ac_prev=sysconfdir ;;
634   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
635   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
636     sysconfdir="$ac_optarg" ;;
637
638   -target | --target | --targe | --targ | --tar | --ta | --t)
639     ac_prev=target ;;
640   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
641     target="$ac_optarg" ;;
642
643   -v | -verbose | --verbose | --verbos | --verbo | --verb)
644     verbose=yes ;;
645
646   -version | --version | --versio | --versi | --vers)
647     echo "configure generated by autoconf version 2.13.1"
648     exit 0 ;;
649
650   -with-* | --with-*)
651     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
652     # Reject names that are not valid shell variable names.
653     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
654       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
655     fi
656     ac_package=`echo $ac_package| sed 's/-/_/g'`
657     case "$ac_option" in
658       *=*) ;;
659       *) ac_optarg=yes ;;
660     esac
661     eval "with_${ac_package}='$ac_optarg'" ;;
662
663   -without-* | --without-*)
664     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
665     # Reject names that are not valid shell variable names.
666     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
667       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
668     fi
669     ac_package=`echo $ac_package| sed 's/-/_/g'`
670     eval "with_${ac_package}=no" ;;
671
672   --x)
673     # Obsolete; use --with-x.
674     with_x=yes ;;
675
676   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
677   | --x-incl | --x-inc | --x-in | --x-i)
678     ac_prev=x_includes ;;
679   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
680   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
681     x_includes="$ac_optarg" ;;
682
683   -x-libraries | --x-libraries | --x-librarie | --x-librari \
684   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
685     ac_prev=x_libraries ;;
686   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
687   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
688     x_libraries="$ac_optarg" ;;
689
690   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
691     ;;
692
693   *)
694     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
695       echo "configure: warning: $ac_option: invalid host type" 1>&2
696     fi
697     if test "x$nonopt" != xNONE; then
698       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
699     fi
700     nonopt="$ac_option"
701     ;;
702
703   esac
704 done
705
706 if test -n "$ac_prev"; then
707   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
708 fi
709
710 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
711
712 # File descriptor usage:
713 # 0 standard input
714 # 1 file creation
715 # 2 errors and warnings
716 # 3 some systems may open it to /dev/tty
717 # 4 used on the Kubota Titan
718 # 6 checking for... messages and results
719 # 5 compiler messages saved in config.log
720 if test "$silent" = yes; then
721   exec 6>/dev/null
722 else
723   exec 6>&1
724 fi
725 exec 5>./config.log
726
727 echo "\
728 This file contains any messages produced by compilers while
729 running configure, to aid debugging if configure makes a mistake.
730 " 1>&5
731
732 # Strip out --no-create and --no-recursion so they do not pile up.
733 # Also quote any args containing shell metacharacters.
734 ac_configure_args=
735 for ac_arg
736 do
737   case "$ac_arg" in
738   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
739   | --no-cr | --no-c) ;;
740   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
741   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
742   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
743   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
744   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
745   esac
746 done
747
748 # NLS nuisances.
749 # Only set these to C if already set.  These must not be set unconditionally
750 # because not all systems understand e.g. LANG=C (notably SCO).
751 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
752 # Non-C LC_CTYPE values break the ctype check.
753 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
754 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
755 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
756 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
757
758 # confdefs.h avoids OS command line length limits that DEFS can exceed.
759 rm -rf conftest* confdefs.h
760 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
761 echo > confdefs.h
762
763 # A filename unique to this package, relative to the directory that
764 # configure is in, which we can look for to find out if srcdir is correct.
765 ac_unique_file=build/version.sh
766
767 # Find the source files, if location was not specified.
768 if test -z "$srcdir"; then
769   ac_srcdir_defaulted=yes
770   # Try the directory containing this script, then its parent.
771   ac_prog=$0
772   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
773   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
774   srcdir=$ac_confdir
775   if test ! -r $srcdir/$ac_unique_file; then
776     srcdir=..
777   fi
778 else
779   ac_srcdir_defaulted=no
780 fi
781 if test ! -r $srcdir/$ac_unique_file; then
782   if test "$ac_srcdir_defaulted" = yes; then
783     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
784   else
785     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
786   fi
787 fi
788 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
789
790 # Prefer explicitly selected file to automatically selected ones.
791 if test -z "$CONFIG_SITE"; then
792   if test "x$prefix" != xNONE; then
793     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
794   else
795     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
796   fi
797 fi
798 for ac_site_file in $CONFIG_SITE; do
799   if test -r "$ac_site_file"; then
800     echo "loading site script $ac_site_file"
801     . "$ac_site_file"
802   fi
803 done
804
805
806 ac_ext=c
807 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
808 ac_cpp='$CPP $CPPFLAGS'
809 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
810 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
811 cross_compiling=$ac_cv_prog_cc_cross
812
813 ac_exeext=
814 ac_objext=o
815 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
816   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
817   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
818     ac_n= ac_c='
819 ' ac_t='        '
820   else
821     ac_n=-n ac_c= ac_t=
822   fi
823 else
824   ac_n= ac_c='\c' ac_t=
825 fi
826
827
828 # set unset (borrowed from autoconf 2.49c)
829 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
830   ol_unset=unset
831 else
832   ol_unset=false
833 fi
834 # unset CDPATH
835 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
836
837 ac_aux_dir=
838 for ac_dir in build $srcdir/build; do
839   if test -f $ac_dir/install-sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install-sh -c"
842     break
843   elif test -f $ac_dir/install.sh; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/install.sh -c"
846     break
847   elif test -f $ac_dir/shtool; then
848     ac_aux_dir=$ac_dir
849     ac_install_sh="$ac_aux_dir/shtool install -c"
850     break
851   fi
852 done
853 if test -z "$ac_aux_dir"; then
854   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
855 fi
856 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
857 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
858 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
859
860 eval `$ac_aux_dir/version.sh`
861 if test -z "$OL_STRING"; then
862         { echo "configure: error: could not determine version" 1>&2; exit 1; }
863 fi
864
865 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
866         ac_cv_shtool="$ac_aux_dir/shtool"
867 else
868         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
869 fi
870
871 SHTOOL="$ac_cv_shtool"
872
873 TB=`$SHTOOL echo -e %B`
874 TN=`$SHTOOL echo -e %b`
875
876 echo "Configuring $TB$OL_STRING$TN ..."
877
878
879 echo $ac_n "checking host system type""... $ac_c" 1>&6
880 echo "configure:881: checking host system type" >&5
881 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
882
883 # Make sure we can run config.sub.
884   if $ac_config_sub sun4 >/dev/null 2>&1; then :
885     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
886   fi
887
888   ac_cv_host_alias=$host
889   case "$ac_cv_host_alias" in
890   NONE)
891     case $nonopt in
892     NONE)
893       if ac_cv_host_alias=`$ac_config_guess`; then :
894       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
895       fi ;;
896     *) ac_cv_host_alias=$nonopt ;;
897     esac ;;
898   esac
899
900   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
901   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
902   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
903   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
904 else
905   echo $ac_n "(cached) $ac_c" 1>&6
906 fi
907
908 echo "$ac_t""$ac_cv_host" 1>&6
909
910 host=$ac_cv_host
911 host_alias=$ac_cv_host_alias
912 host_cpu=$ac_cv_host_cpu
913 host_vendor=$ac_cv_host_vendor
914 host_os=$ac_cv_host_os
915
916
917
918
919
920 echo $ac_n "checking target system type""... $ac_c" 1>&6
921 echo "configure:922: checking target system type" >&5
922 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
923
924 # Make sure we can run config.sub.
925   if $ac_config_sub sun4 >/dev/null 2>&1; then :
926     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
927   fi
928
929   ac_cv_target_alias=$target
930   case "$ac_cv_target_alias" in
931   NONE)
932     case $nonopt in
933     NONE)
934       ac_cv_target_alias=$host_alias ;;
935
936     *) ac_cv_target_alias=$nonopt ;;
937     esac ;;
938   esac
939
940   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
941   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
942   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
943   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
944 else
945   echo $ac_n "(cached) $ac_c" 1>&6
946 fi
947
948 echo "$ac_t""$ac_cv_target" 1>&6
949
950 target=$ac_cv_target
951 target_alias=$ac_cv_target_alias
952 target_cpu=$ac_cv_target_cpu
953 target_vendor=$ac_cv_target_vendor
954 target_os=$ac_cv_target_os
955
956
957
958
959
960 echo $ac_n "checking build system type""... $ac_c" 1>&6
961 echo "configure:962: checking build system type" >&5
962 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
963
964 # Make sure we can run config.sub.
965   if $ac_config_sub sun4 >/dev/null 2>&1; then :
966     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
967   fi
968
969   ac_cv_build_alias=$build
970   case "$ac_cv_build_alias" in
971   NONE)
972     case $nonopt in
973     NONE)
974       ac_cv_build_alias=$host_alias ;;
975
976     *) ac_cv_build_alias=$nonopt ;;
977     esac ;;
978   esac
979
980   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
981   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
982   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
983   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
984 else
985   echo $ac_n "(cached) $ac_c" 1>&6
986 fi
987
988 echo "$ac_t""$ac_cv_build" 1>&6
989
990 build=$ac_cv_build
991 build_alias=$ac_cv_build_alias
992 build_cpu=$ac_cv_build_cpu
993 build_vendor=$ac_cv_build_vendor
994 build_os=$ac_cv_build_os
995
996
997
998
999
1000 # Do some error checking and defaulting for the host and target type.
1001 # The inputs are:
1002 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1003 #
1004 # The rules are:
1005 # 1. You are not allowed to specify --host, --target, and nonopt at the
1006 #    same time.
1007 # 2. Host defaults to nonopt.
1008 # 3. If nonopt is not specified, then host defaults to the current host,
1009 #    as determined by config.guess.
1010 # 4. Target and build default to nonopt.
1011 # 5. If nonopt is not specified, then target and build default to host.
1012
1013 # The aliases save the names the user supplied, while $host etc.
1014 # will get canonicalized.
1015 case $host---$target---$nonopt in
1016 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1017 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1018 esac
1019
1020 test "$host_alias" != "$target_alias" &&
1021   test "$program_prefix$program_suffix$program_transform_name" = \
1022     NONENONEs,x,x, &&
1023   program_prefix=${target_alias}-
1024
1025
1026 # Find a good install program.  We prefer a C program (faster),
1027 # so one script is as good as another.  But avoid the broken or
1028 # incompatible versions:
1029 # SysV /etc/install, /usr/sbin/install
1030 # SunOS /usr/etc/install
1031 # IRIX /sbin/install
1032 # AIX /bin/install
1033 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1034 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1035 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1036 # ./install, which can be erroneously created by make from ./install.sh.
1037 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1038 echo "configure:1039: checking for a BSD compatible install" >&5
1039 if test -z "$INSTALL"; then
1040 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1041   echo $ac_n "(cached) $ac_c" 1>&6
1042 else
1043     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1044   for ac_dir in $PATH; do
1045     # Account for people who put trailing slashes in PATH elements.
1046     case "$ac_dir/" in
1047     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1048     *)
1049       # OSF1 and SCO ODT 3.0 have their own names for install.
1050       # Don't use installbsd from OSF since it installs stuff as root
1051       # by default.
1052       for ac_prog in ginstall scoinst install; do
1053         if test -f $ac_dir/$ac_prog; then
1054           if test $ac_prog = install &&
1055             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # AIX install.  It has an incompatible calling convention.
1057             :
1058           elif test $ac_prog = install &&
1059             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # program-specific install script used by HP pwplus--don't use.
1061             :
1062           else
1063             ac_cv_path_install="$ac_dir/$ac_prog -c"
1064             break 2
1065           fi
1066         fi
1067       done
1068       ;;
1069     esac
1070   done
1071   IFS="$ac_save_IFS"
1072
1073 fi
1074   if test "${ac_cv_path_install+set}" = set; then
1075     INSTALL="$ac_cv_path_install"
1076   else
1077     # As a last resort, use the slow shell script.  We don't cache a
1078     # path for INSTALL within a source directory, because that will
1079     # break other packages using the cache if that directory is
1080     # removed, or if the path is relative.
1081     INSTALL="$ac_install_sh"
1082   fi
1083 fi
1084 echo "$ac_t""$INSTALL" 1>&6
1085
1086 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1087 # It thinks the first close brace ends the variable substitution.
1088 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1089
1090 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1091
1092 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1093
1094 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1095 echo "configure:1096: checking whether build environment is sane" >&5
1096 # Just in case
1097 sleep 1
1098 echo timestamp > conftestfile
1099 # Do `set' in a subshell so we don't clobber the current shell's
1100 # arguments.  Must try -L first in case configure is actually a
1101 # symlink; some systems play weird games with the mod time of symlinks
1102 # (eg FreeBSD returns the mod time of the symlink's containing
1103 # directory).
1104 if (
1105    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1106    if test "$*" = "X"; then
1107       # -L didn't work.
1108       set X `ls -t $srcdir/configure conftestfile`
1109    fi
1110    if test "$*" != "X $srcdir/configure conftestfile" \
1111       && test "$*" != "X conftestfile $srcdir/configure"; then
1112
1113       # If neither matched, then we have a broken ls.  This can happen
1114       # if, for instance, CONFIG_SHELL is bash and it inherits a
1115       # broken ls alias from the environment.  This has actually
1116       # happened.  Such a system could not be considered "sane".
1117       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1118 alias in your environment" 1>&2; exit 1; }
1119    fi
1120
1121    test "$2" = conftestfile
1122    )
1123 then
1124    # Ok.
1125    :
1126 else
1127    { echo "configure: error: newly created file is older than distributed files!
1128 Check your system clock" 1>&2; exit 1; }
1129 fi
1130 rm -f conftest*
1131 echo "$ac_t""yes" 1>&6
1132 if test "$program_transform_name" = s,x,x,; then
1133   program_transform_name=
1134 else
1135   # Double any \ or $.  echo might interpret backslashes.
1136   cat <<\EOF_SED > conftestsed
1137 s,\\,\\\\,g; s,\$,$$,g
1138 EOF_SED
1139   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1140   rm -f conftestsed
1141 fi
1142 test "$program_prefix" != NONE &&
1143   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1144 # Use a double $ so make ignores it.
1145 test "$program_suffix" != NONE &&
1146   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1147
1148 # sed with no file args requires a program.
1149 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1150
1151 for ac_prog in mawk gawk nawk awk
1152 do
1153 # Extract the first word of "$ac_prog", so it can be a program name with args.
1154 set dummy $ac_prog; ac_word=$2
1155 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1156 echo "configure:1157: checking for $ac_word" >&5
1157 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1158   echo $ac_n "(cached) $ac_c" 1>&6
1159 else
1160   if test -n "$AWK"; then
1161   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1162 else
1163   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1164   ac_dummy="$PATH"
1165   for ac_dir in $ac_dummy; do
1166     test -z "$ac_dir" && ac_dir=.
1167     if test -f $ac_dir/$ac_word; then
1168       ac_cv_prog_AWK="$ac_prog"
1169       break
1170     fi
1171   done
1172   IFS="$ac_save_ifs"
1173 fi
1174 fi
1175 AWK="$ac_cv_prog_AWK"
1176 if test -n "$AWK"; then
1177   echo "$ac_t""$AWK" 1>&6
1178 else
1179   echo "$ac_t""no" 1>&6
1180 fi
1181
1182 test -n "$AWK" && break
1183 done
1184
1185 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1186 echo "configure:1187: checking whether ${MAKE-make} sets \${MAKE}" >&5
1187 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1188 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1189   echo $ac_n "(cached) $ac_c" 1>&6
1190 else
1191   cat > conftestmake <<\EOF
1192 all:
1193         @echo 'ac_maketemp="${MAKE}"'
1194 EOF
1195 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1196 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1197 if test -n "$ac_maketemp"; then
1198   eval ac_cv_prog_make_${ac_make}_set=yes
1199 else
1200   eval ac_cv_prog_make_${ac_make}_set=no
1201 fi
1202 rm -f conftestmake
1203 fi
1204 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1205   echo "$ac_t""yes" 1>&6
1206   SET_MAKE=
1207 else
1208   echo "$ac_t""no" 1>&6
1209   SET_MAKE="MAKE=${MAKE-make}"
1210 fi
1211
1212
1213
1214 PACKAGE=$OL_PACKAGE
1215
1216 VERSION=$OL_VERSION
1217
1218 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1219   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1220 fi
1221
1222
1223
1224 missing_dir=`cd $ac_aux_dir && pwd`
1225 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1226 echo "configure:1227: checking for working aclocal" >&5
1227 # Run test in a subshell; some versions of sh will print an error if
1228 # an executable is not found, even if stderr is redirected.
1229 # Redirect stdin to placate older versions of autoconf.  Sigh.
1230 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1231    ACLOCAL=aclocal
1232    echo "$ac_t""found" 1>&6
1233 else
1234    ACLOCAL="$missing_dir/missing aclocal"
1235    echo "$ac_t""missing" 1>&6
1236 fi
1237
1238 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1239 echo "configure:1240: checking for working autoconf" >&5
1240 # Run test in a subshell; some versions of sh will print an error if
1241 # an executable is not found, even if stderr is redirected.
1242 # Redirect stdin to placate older versions of autoconf.  Sigh.
1243 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1244    AUTOCONF=autoconf
1245    echo "$ac_t""found" 1>&6
1246 else
1247    AUTOCONF="$missing_dir/missing autoconf"
1248    echo "$ac_t""missing" 1>&6
1249 fi
1250
1251 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1252 echo "configure:1253: checking for working automake" >&5
1253 # Run test in a subshell; some versions of sh will print an error if
1254 # an executable is not found, even if stderr is redirected.
1255 # Redirect stdin to placate older versions of autoconf.  Sigh.
1256 if (automake --version) < /dev/null > /dev/null 2>&1; then
1257    AUTOMAKE=automake
1258    echo "$ac_t""found" 1>&6
1259 else
1260    AUTOMAKE="$missing_dir/missing automake"
1261    echo "$ac_t""missing" 1>&6
1262 fi
1263
1264 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1265 echo "configure:1266: checking for working autoheader" >&5
1266 # Run test in a subshell; some versions of sh will print an error if
1267 # an executable is not found, even if stderr is redirected.
1268 # Redirect stdin to placate older versions of autoconf.  Sigh.
1269 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1270    AUTOHEADER=autoheader
1271    echo "$ac_t""found" 1>&6
1272 else
1273    AUTOHEADER="$missing_dir/missing autoheader"
1274    echo "$ac_t""missing" 1>&6
1275 fi
1276
1277 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1278 echo "configure:1279: checking for working makeinfo" >&5
1279 # Run test in a subshell; some versions of sh will print an error if
1280 # an executable is not found, even if stderr is redirected.
1281 # Redirect stdin to placate older versions of autoconf.  Sigh.
1282 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1283    MAKEINFO=makeinfo
1284    echo "$ac_t""found" 1>&6
1285 else
1286    MAKEINFO="$missing_dir/missing makeinfo"
1287    echo "$ac_t""missing" 1>&6
1288 fi
1289
1290 install_sh="$missing_dir/install-sh"
1291 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1292
1293 for ac_prog in gnutar gtar tar
1294 do
1295 # Extract the first word of "$ac_prog", so it can be a program name with args.
1296 set dummy $ac_prog; ac_word=$2
1297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1298 echo "configure:1299: checking for $ac_word" >&5
1299 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1300   echo $ac_n "(cached) $ac_c" 1>&6
1301 else
1302   if test -n "$AMTAR"; then
1303   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1304 else
1305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1306   ac_dummy="$PATH"
1307   for ac_dir in $ac_dummy; do
1308     test -z "$ac_dir" && ac_dir=.
1309     if test -f $ac_dir/$ac_word; then
1310       ac_cv_prog_AMTAR="$ac_prog"
1311       break
1312     fi
1313   done
1314   IFS="$ac_save_ifs"
1315 fi
1316 fi
1317 AMTAR="$ac_cv_prog_AMTAR"
1318 if test -n "$AMTAR"; then
1319   echo "$ac_t""$AMTAR" 1>&6
1320 else
1321   echo "$ac_t""no" 1>&6
1322 fi
1323
1324 test -n "$AMTAR" && break
1325 done
1326
1327
1328 AMTARFLAGS=
1329 if test -n "$AMTAR"; then
1330   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1331         AMTARFLAGS=o
1332   fi
1333 fi
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_PACKAGE "$PACKAGE"
1337 EOF
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_VERSION "$VERSION"
1341 EOF
1342
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION $OL_API_INC
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1358 EOF
1359
1360
1361 OPENLDAP_LIBVERSION=$OL_API_LIB
1362
1363 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1364
1365
1366
1367 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1368 echo "configure:1369: checking configure arguments" >&5
1369
1370
1371 top_builddir=`pwd`
1372
1373 ldap_subdir="/openldap"
1374
1375 # Check whether --with-subdir or --without-subdir was given.
1376 if test "${with_subdir+set}" = set; then
1377   withval="$with_subdir"
1378   case "$withval" in
1379         no) ldap_subdir=""
1380                 ;;
1381         yes)
1382                 ;;
1383         /*|\\*)
1384                 ldap_subdir="$withval"
1385                 ;;
1386         *)
1387                 ldap_subdir="/$withval"
1388                 ;;
1389 esac
1390
1391 fi
1392
1393
1394 # OpenLDAP --enable-debug
1395         # Check whether --enable-debug or --disable-debug was given.
1396 if test "${enable_debug+set}" = set; then
1397   enableval="$enable_debug"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no ; do
1401                 if test "$enableval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1407         fi
1408         ol_enable_debug="$ol_arg"
1409
1410 else
1411         ol_enable_debug="yes"
1412 fi
1413 # end --enable-debug
1414 # OpenLDAP --enable-syslog
1415         # Check whether --enable-syslog or --disable-syslog was given.
1416 if test "${enable_syslog+set}" = set; then
1417   enableval="$enable_syslog"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1427         fi
1428         ol_enable_syslog="$ol_arg"
1429
1430 else
1431         ol_enable_syslog="auto"
1432 fi
1433 # end --enable-syslog
1434 # OpenLDAP --enable-proctitle
1435         # Check whether --enable-proctitle or --disable-proctitle was given.
1436 if test "${enable_proctitle+set}" = set; then
1437   enableval="$enable_proctitle"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1447         fi
1448         ol_enable_proctitle="$ol_arg"
1449
1450 else
1451         ol_enable_proctitle="yes"
1452 fi
1453 # end --enable-proctitle
1454 # OpenLDAP --enable-cache
1455         # Check whether --enable-cache or --disable-cache was given.
1456 if test "${enable_cache+set}" = set; then
1457   enableval="$enable_cache"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1467         fi
1468         ol_enable_cache="$ol_arg"
1469
1470 else
1471         ol_enable_cache="no"
1472 fi
1473 # end --enable-cache
1474 # OpenLDAP --enable-referrals
1475         # Check whether --enable-referrals or --disable-referrals was given.
1476 if test "${enable_referrals+set}" = set; then
1477   enableval="$enable_referrals"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1487         fi
1488         ol_enable_referrals="$ol_arg"
1489
1490 else
1491         ol_enable_referrals="no"
1492 fi
1493 # end --enable-referrals
1494 ol_enable_kbind=${ol_enable_kbind-no}
1495 # OpenLDAP --enable-ipv6
1496         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1497 if test "${enable_ipv6+set}" = set; then
1498   enableval="$enable_ipv6"
1499   
1500         ol_arg=invalid
1501         for ol_val in auto yes no ; do
1502                 if test "$enableval" = "$ol_val" ; then
1503                         ol_arg="$ol_val"
1504                 fi
1505         done
1506         if test "$ol_arg" = "invalid" ; then
1507                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1508         fi
1509         ol_enable_ipv6="$ol_arg"
1510
1511 else
1512         ol_enable_ipv6="auto"
1513 fi
1514 # end --enable-ipv6
1515 # OpenLDAP --enable-local
1516         # Check whether --enable-local or --disable-local was given.
1517 if test "${enable_local+set}" = set; then
1518   enableval="$enable_local"
1519   
1520         ol_arg=invalid
1521         for ol_val in auto yes no ; do
1522                 if test "$enableval" = "$ol_val" ; then
1523                         ol_arg="$ol_val"
1524                 fi
1525         done
1526         if test "$ol_arg" = "invalid" ; then
1527                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1528         fi
1529         ol_enable_local="$ol_arg"
1530
1531 else
1532         ol_enable_local="auto"
1533 fi
1534 # end --enable-local
1535 # OpenLDAP --enable-x_compile
1536         # Check whether --enable-x_compile or --disable-x_compile was given.
1537 if test "${enable_x_compile+set}" = set; then
1538   enableval="$enable_x_compile"
1539   
1540         ol_arg=invalid
1541         for ol_val in yes no ; do
1542                 if test "$enableval" = "$ol_val" ; then
1543                         ol_arg="$ol_val"
1544                 fi
1545         done
1546         if test "$ol_arg" = "invalid" ; then
1547                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1548         fi
1549         ol_enable_x_compile="$ol_arg"
1550
1551 else
1552         ol_enable_x_compile="no"
1553 fi
1554 # end --enable-x_compile
1555
1556
1557 # OpenLDAP --with-cyrus_sasl
1558         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1559 if test "${with_cyrus_sasl+set}" = set; then
1560   withval="$with_cyrus_sasl"
1561   
1562         ol_arg=invalid
1563         for ol_val in auto yes no  ; do
1564                 if test "$withval" = "$ol_val" ; then
1565                         ol_arg="$ol_val"
1566                 fi
1567         done
1568         if test "$ol_arg" = "invalid" ; then
1569                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1570         fi
1571         ol_with_cyrus_sasl="$ol_arg"
1572
1573 else
1574         ol_with_cyrus_sasl="auto"
1575 fi
1576 # end --with-cyrus_sasl
1577
1578 # OpenLDAP --with-fetch
1579         # Check whether --with-fetch or --without-fetch was given.
1580 if test "${with_fetch+set}" = set; then
1581   withval="$with_fetch"
1582   
1583         ol_arg=invalid
1584         for ol_val in auto yes no  ; do
1585                 if test "$withval" = "$ol_val" ; then
1586                         ol_arg="$ol_val"
1587                 fi
1588         done
1589         if test "$ol_arg" = "invalid" ; then
1590                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1591         fi
1592         ol_with_fetch="$ol_arg"
1593
1594 else
1595         ol_with_fetch="auto"
1596 fi
1597 # end --with-fetch
1598
1599 # OpenLDAP --with-kerberos
1600         # Check whether --with-kerberos or --without-kerberos was given.
1601 if test "${with_kerberos+set}" = set; then
1602   withval="$with_kerberos"
1603   
1604         ol_arg=invalid
1605         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1606                 if test "$withval" = "$ol_val" ; then
1607                         ol_arg="$ol_val"
1608                 fi
1609         done
1610         if test "$ol_arg" = "invalid" ; then
1611                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1612         fi
1613         ol_with_kerberos="$ol_arg"
1614
1615 else
1616         ol_with_kerberos="auto"
1617 fi
1618 # end --with-kerberos
1619
1620 # OpenLDAP --with-readline
1621         # Check whether --with-readline or --without-readline was given.
1622 if test "${with_readline+set}" = set; then
1623   withval="$with_readline"
1624   
1625         ol_arg=invalid
1626         for ol_val in auto yes no  ; do
1627                 if test "$withval" = "$ol_val" ; then
1628                         ol_arg="$ol_val"
1629                 fi
1630         done
1631         if test "$ol_arg" = "invalid" ; then
1632                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1633         fi
1634         ol_with_readline="$ol_arg"
1635
1636 else
1637         ol_with_readline="auto"
1638 fi
1639 # end --with-readline
1640
1641 # OpenLDAP --with-threads
1642         # Check whether --with-threads or --without-threads was given.
1643 if test "${with_threads+set}" = set; then
1644   withval="$with_threads"
1645   
1646         ol_arg=invalid
1647         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1648                 if test "$withval" = "$ol_val" ; then
1649                         ol_arg="$ol_val"
1650                 fi
1651         done
1652         if test "$ol_arg" = "invalid" ; then
1653                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1654         fi
1655         ol_with_threads="$ol_arg"
1656
1657 else
1658         ol_with_threads="auto"
1659 fi
1660 # end --with-threads
1661
1662 # OpenLDAP --with-tls
1663         # Check whether --with-tls or --without-tls was given.
1664 if test "${with_tls+set}" = set; then
1665   withval="$with_tls"
1666   
1667         ol_arg=invalid
1668         for ol_val in auto ssleay openssl yes no  ; do
1669                 if test "$withval" = "$ol_val" ; then
1670                         ol_arg="$ol_val"
1671                 fi
1672         done
1673         if test "$ol_arg" = "invalid" ; then
1674                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1675         fi
1676         ol_with_tls="$ol_arg"
1677
1678 else
1679         ol_with_tls="auto"
1680 fi
1681 # end --with-tls
1682
1683 # OpenLDAP --with-yielding_select
1684         # Check whether --with-yielding_select or --without-yielding_select was given.
1685 if test "${with_yielding_select+set}" = set; then
1686   withval="$with_yielding_select"
1687   
1688         ol_arg=invalid
1689         for ol_val in auto yes no manual  ; do
1690                 if test "$withval" = "$ol_val" ; then
1691                         ol_arg="$ol_val"
1692                 fi
1693         done
1694         if test "$ol_arg" = "invalid" ; then
1695                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1696         fi
1697         ol_with_yielding_select="$ol_arg"
1698
1699 else
1700         ol_with_yielding_select="auto"
1701 fi
1702 # end --with-yielding_select
1703
1704
1705
1706 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1707 if test "${with_xxslapdoptions+set}" = set; then
1708   withval="$with_xxslapdoptions"
1709   :
1710 fi
1711
1712 # OpenLDAP --enable-slapd
1713         # Check whether --enable-slapd or --disable-slapd was given.
1714 if test "${enable_slapd+set}" = set; then
1715   enableval="$enable_slapd"
1716   
1717         ol_arg=invalid
1718         for ol_val in auto yes no ; do
1719                 if test "$enableval" = "$ol_val" ; then
1720                         ol_arg="$ol_val"
1721                 fi
1722         done
1723         if test "$ol_arg" = "invalid" ; then
1724                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1725         fi
1726         ol_enable_slapd="$ol_arg"
1727
1728 else
1729         ol_enable_slapd="yes"
1730 fi
1731 # end --enable-slapd
1732 # OpenLDAP --enable-aci
1733         # Check whether --enable-aci or --disable-aci was given.
1734 if test "${enable_aci+set}" = set; then
1735   enableval="$enable_aci"
1736   
1737         ol_arg=invalid
1738         for ol_val in auto yes no ; do
1739                 if test "$enableval" = "$ol_val" ; then
1740                         ol_arg="$ol_val"
1741                 fi
1742         done
1743         if test "$ol_arg" = "invalid" ; then
1744                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1745         fi
1746         ol_enable_aci="$ol_arg"
1747
1748 else
1749         ol_enable_aci="no"
1750 fi
1751 # end --enable-aci
1752 # OpenLDAP --enable-cleartext
1753         # Check whether --enable-cleartext or --disable-cleartext was given.
1754 if test "${enable_cleartext+set}" = set; then
1755   enableval="$enable_cleartext"
1756   
1757         ol_arg=invalid
1758         for ol_val in auto yes no ; do
1759                 if test "$enableval" = "$ol_val" ; then
1760                         ol_arg="$ol_val"
1761                 fi
1762         done
1763         if test "$ol_arg" = "invalid" ; then
1764                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1765         fi
1766         ol_enable_cleartext="$ol_arg"
1767
1768 else
1769         ol_enable_cleartext="yes"
1770 fi
1771 # end --enable-cleartext
1772 # OpenLDAP --enable-crypt
1773         # Check whether --enable-crypt or --disable-crypt was given.
1774 if test "${enable_crypt+set}" = set; then
1775   enableval="$enable_crypt"
1776   
1777         ol_arg=invalid
1778         for ol_val in auto yes no ; do
1779                 if test "$enableval" = "$ol_val" ; then
1780                         ol_arg="$ol_val"
1781                 fi
1782         done
1783         if test "$ol_arg" = "invalid" ; then
1784                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1785         fi
1786         ol_enable_crypt="$ol_arg"
1787
1788 else
1789         ol_enable_crypt="no"
1790 fi
1791 # end --enable-crypt
1792 # OpenLDAP --enable-dynamic
1793         # Check whether --enable-dynamic or --disable-dynamic was given.
1794 if test "${enable_dynamic+set}" = set; then
1795   enableval="$enable_dynamic"
1796   
1797         ol_arg=invalid
1798         for ol_val in auto yes no ; do
1799                 if test "$enableval" = "$ol_val" ; then
1800                         ol_arg="$ol_val"
1801                 fi
1802         done
1803         if test "$ol_arg" = "invalid" ; then
1804                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1805         fi
1806         ol_enable_dynamic="$ol_arg"
1807
1808 else
1809         ol_enable_dynamic="no"
1810 fi
1811 # end --enable-dynamic
1812 # OpenLDAP --enable-kpasswd
1813         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1814 if test "${enable_kpasswd+set}" = set; then
1815   enableval="$enable_kpasswd"
1816   
1817         ol_arg=invalid
1818         for ol_val in auto yes no ; do
1819                 if test "$enableval" = "$ol_val" ; then
1820                         ol_arg="$ol_val"
1821                 fi
1822         done
1823         if test "$ol_arg" = "invalid" ; then
1824                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1825         fi
1826         ol_enable_kpasswd="$ol_arg"
1827
1828 else
1829         ol_enable_kpasswd="no"
1830 fi
1831 # end --enable-kpasswd
1832 # OpenLDAP --enable-lmpasswd
1833         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1834 if test "${enable_lmpasswd+set}" = set; then
1835   enableval="$enable_lmpasswd"
1836   
1837         ol_arg=invalid
1838         for ol_val in auto yes no ; do
1839                 if test "$enableval" = "$ol_val" ; then
1840                         ol_arg="$ol_val"
1841                 fi
1842         done
1843         if test "$ol_arg" = "invalid" ; then
1844                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1845         fi
1846         ol_enable_lmpasswd="$ol_arg"
1847
1848 else
1849         ol_enable_lmpasswd="no"
1850 fi
1851 # end --enable-lmpasswd
1852 # OpenLDAP --enable-spasswd
1853         # Check whether --enable-spasswd or --disable-spasswd was given.
1854 if test "${enable_spasswd+set}" = set; then
1855   enableval="$enable_spasswd"
1856   
1857         ol_arg=invalid
1858         for ol_val in auto yes no ; do
1859                 if test "$enableval" = "$ol_val" ; then
1860                         ol_arg="$ol_val"
1861                 fi
1862         done
1863         if test "$ol_arg" = "invalid" ; then
1864                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1865         fi
1866         ol_enable_spasswd="$ol_arg"
1867
1868 else
1869         ol_enable_spasswd="no"
1870 fi
1871 # end --enable-spasswd
1872 # OpenLDAP --enable-modules
1873         # Check whether --enable-modules or --disable-modules was given.
1874 if test "${enable_modules+set}" = set; then
1875   enableval="$enable_modules"
1876   
1877         ol_arg=invalid
1878         for ol_val in auto yes no ; do
1879                 if test "$enableval" = "$ol_val" ; then
1880                         ol_arg="$ol_val"
1881                 fi
1882         done
1883         if test "$ol_arg" = "invalid" ; then
1884                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1885         fi
1886         ol_enable_modules="$ol_arg"
1887
1888 else
1889         ol_enable_modules="no"
1890 fi
1891 # end --enable-modules
1892 ol_enable_multimaster=${ol_enable_multimaster-no}
1893 # OpenLDAP --enable-phonetic
1894         # Check whether --enable-phonetic or --disable-phonetic was given.
1895 if test "${enable_phonetic+set}" = set; then
1896   enableval="$enable_phonetic"
1897   
1898         ol_arg=invalid
1899         for ol_val in auto yes no ; do
1900                 if test "$enableval" = "$ol_val" ; then
1901                         ol_arg="$ol_val"
1902                 fi
1903         done
1904         if test "$ol_arg" = "invalid" ; then
1905                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1906         fi
1907         ol_enable_phonetic="$ol_arg"
1908
1909 else
1910         ol_enable_phonetic="no"
1911 fi
1912 # end --enable-phonetic
1913 # OpenLDAP --enable-rewrite
1914         # Check whether --enable-rewrite or --disable-rewrite was given.
1915 if test "${enable_rewrite+set}" = set; then
1916   enableval="$enable_rewrite"
1917   
1918         ol_arg=invalid
1919         for ol_val in auto yes no ; do
1920                 if test "$enableval" = "$ol_val" ; then
1921                         ol_arg="$ol_val"
1922                 fi
1923         done
1924         if test "$ol_arg" = "invalid" ; then
1925                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1926         fi
1927         ol_enable_rewrite="$ol_arg"
1928
1929 else
1930         ol_enable_rewrite="no"
1931 fi
1932 # end --enable-rewrite
1933 # OpenLDAP --enable-rlookups
1934         # Check whether --enable-rlookups or --disable-rlookups was given.
1935 if test "${enable_rlookups+set}" = set; then
1936   enableval="$enable_rlookups"
1937   
1938         ol_arg=invalid
1939         for ol_val in auto yes no ; do
1940                 if test "$enableval" = "$ol_val" ; then
1941                         ol_arg="$ol_val"
1942                 fi
1943         done
1944         if test "$ol_arg" = "invalid" ; then
1945                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1946         fi
1947         ol_enable_rlookups="$ol_arg"
1948
1949 else
1950         ol_enable_rlookups="no"
1951 fi
1952 # end --enable-rlookups
1953 # OpenLDAP --enable-slp
1954         # Check whether --enable-slp or --disable-slp was given.
1955 if test "${enable_slp+set}" = set; then
1956   enableval="$enable_slp"
1957   
1958         ol_arg=invalid
1959         for ol_val in auto yes no ; do
1960                 if test "$enableval" = "$ol_val" ; then
1961                         ol_arg="$ol_val"
1962                 fi
1963         done
1964         if test "$ol_arg" = "invalid" ; then
1965                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1966         fi
1967         ol_enable_slp="$ol_arg"
1968
1969 else
1970         ol_enable_slp="no"
1971 fi
1972 # end --enable-slp
1973 # OpenLDAP --enable-wrappers
1974         # Check whether --enable-wrappers or --disable-wrappers was given.
1975 if test "${enable_wrappers+set}" = set; then
1976   enableval="$enable_wrappers"
1977   
1978         ol_arg=invalid
1979         for ol_val in auto yes no ; do
1980                 if test "$enableval" = "$ol_val" ; then
1981                         ol_arg="$ol_val"
1982                 fi
1983         done
1984         if test "$ol_arg" = "invalid" ; then
1985                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1986         fi
1987         ol_enable_wrappers="$ol_arg"
1988
1989 else
1990         ol_enable_wrappers="no"
1991 fi
1992 # end --enable-wrappers
1993
1994 # OpenLDAP --enable-bdb
1995         # Check whether --enable-bdb or --disable-bdb was given.
1996 if test "${enable_bdb+set}" = set; then
1997   enableval="$enable_bdb"
1998   
1999         ol_arg=invalid
2000         for ol_val in auto yes no ; do
2001                 if test "$enableval" = "$ol_val" ; then
2002                         ol_arg="$ol_val"
2003                 fi
2004         done
2005         if test "$ol_arg" = "invalid" ; then
2006                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2007         fi
2008         ol_enable_bdb="$ol_arg"
2009
2010 else
2011         ol_enable_bdb="yes"
2012 fi
2013 # end --enable-bdb
2014 # OpenLDAP --with-bdb_module
2015         # Check whether --with-bdb_module or --without-bdb_module was given.
2016 if test "${with_bdb_module+set}" = set; then
2017   withval="$with_bdb_module"
2018   
2019         ol_arg=invalid
2020         for ol_val in static dynamic ; do
2021                 if test "$withval" = "$ol_val" ; then
2022                         ol_arg="$ol_val"
2023                 fi
2024         done
2025         if test "$ol_arg" = "invalid" ; then
2026                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2027         fi
2028         ol_with_bdb_module="$ol_arg"
2029
2030 else
2031         ol_with_bdb_module="static"
2032 fi
2033 # end --with-bdb_module
2034
2035 # OpenLDAP --enable-dnssrv
2036         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2037 if test "${enable_dnssrv+set}" = set; then
2038   enableval="$enable_dnssrv"
2039   
2040         ol_arg=invalid
2041         for ol_val in auto yes no ; do
2042                 if test "$enableval" = "$ol_val" ; then
2043                         ol_arg="$ol_val"
2044                 fi
2045         done
2046         if test "$ol_arg" = "invalid" ; then
2047                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2048         fi
2049         ol_enable_dnssrv="$ol_arg"
2050
2051 else
2052         ol_enable_dnssrv="no"
2053 fi
2054 # end --enable-dnssrv
2055 # OpenLDAP --with-dnssrv_module
2056         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2057 if test "${with_dnssrv_module+set}" = set; then
2058   withval="$with_dnssrv_module"
2059   
2060         ol_arg=invalid
2061         for ol_val in static dynamic ; do
2062                 if test "$withval" = "$ol_val" ; then
2063                         ol_arg="$ol_val"
2064                 fi
2065         done
2066         if test "$ol_arg" = "invalid" ; then
2067                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2068         fi
2069         ol_with_dnssrv_module="$ol_arg"
2070
2071 else
2072         ol_with_dnssrv_module="static"
2073 fi
2074 # end --with-dnssrv_module
2075
2076 # OpenLDAP --enable-ldap
2077         # Check whether --enable-ldap or --disable-ldap was given.
2078 if test "${enable_ldap+set}" = set; then
2079   enableval="$enable_ldap"
2080   
2081         ol_arg=invalid
2082         for ol_val in auto yes no ; do
2083                 if test "$enableval" = "$ol_val" ; then
2084                         ol_arg="$ol_val"
2085                 fi
2086         done
2087         if test "$ol_arg" = "invalid" ; then
2088                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2089         fi
2090         ol_enable_ldap="$ol_arg"
2091
2092 else
2093         ol_enable_ldap="no"
2094 fi
2095 # end --enable-ldap
2096 # OpenLDAP --with-ldap_module
2097         # Check whether --with-ldap_module or --without-ldap_module was given.
2098 if test "${with_ldap_module+set}" = set; then
2099   withval="$with_ldap_module"
2100   
2101         ol_arg=invalid
2102         for ol_val in static dynamic ; do
2103                 if test "$withval" = "$ol_val" ; then
2104                         ol_arg="$ol_val"
2105                 fi
2106         done
2107         if test "$ol_arg" = "invalid" ; then
2108                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2109         fi
2110         ol_with_ldap_module="$ol_arg"
2111
2112 else
2113         ol_with_ldap_module="static"
2114 fi
2115 # end --with-ldap_module
2116
2117 # OpenLDAP --enable-ldbm
2118         # Check whether --enable-ldbm or --disable-ldbm was given.
2119 if test "${enable_ldbm+set}" = set; then
2120   enableval="$enable_ldbm"
2121   
2122         ol_arg=invalid
2123         for ol_val in auto yes no ; do
2124                 if test "$enableval" = "$ol_val" ; then
2125                         ol_arg="$ol_val"
2126                 fi
2127         done
2128         if test "$ol_arg" = "invalid" ; then
2129                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2130         fi
2131         ol_enable_ldbm="$ol_arg"
2132
2133 else
2134         ol_enable_ldbm="no"
2135 fi
2136 # end --enable-ldbm
2137 # OpenLDAP --with-ldbm_api
2138         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2139 if test "${with_ldbm_api+set}" = set; then
2140   withval="$with_ldbm_api"
2141   
2142         ol_arg=invalid
2143         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2144                 if test "$withval" = "$ol_val" ; then
2145                         ol_arg="$ol_val"
2146                 fi
2147         done
2148         if test "$ol_arg" = "invalid" ; then
2149                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2150         fi
2151         ol_with_ldbm_api="$ol_arg"
2152
2153 else
2154         ol_with_ldbm_api="auto"
2155 fi
2156 # end --with-ldbm_api
2157
2158 # OpenLDAP --with-ldbm_module
2159         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2160 if test "${with_ldbm_module+set}" = set; then
2161   withval="$with_ldbm_module"
2162   
2163         ol_arg=invalid
2164         for ol_val in static dynamic ; do
2165                 if test "$withval" = "$ol_val" ; then
2166                         ol_arg="$ol_val"
2167                 fi
2168         done
2169         if test "$ol_arg" = "invalid" ; then
2170                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2171         fi
2172         ol_with_ldbm_module="$ol_arg"
2173
2174 else
2175         ol_with_ldbm_module="static"
2176 fi
2177 # end --with-ldbm_module
2178
2179 # OpenLDAP --with-ldbm_type
2180         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2181 if test "${with_ldbm_type+set}" = set; then
2182   withval="$with_ldbm_type"
2183   
2184         ol_arg=invalid
2185         for ol_val in auto btree hash ; do
2186                 if test "$withval" = "$ol_val" ; then
2187                         ol_arg="$ol_val"
2188                 fi
2189         done
2190         if test "$ol_arg" = "invalid" ; then
2191                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2192         fi
2193         ol_with_ldbm_type="$ol_arg"
2194
2195 else
2196         ol_with_ldbm_type="auto"
2197 fi
2198 # end --with-ldbm_type
2199
2200 # OpenLDAP --enable-meta
2201         # Check whether --enable-meta or --disable-meta was given.
2202 if test "${enable_meta+set}" = set; then
2203   enableval="$enable_meta"
2204   
2205         ol_arg=invalid
2206         for ol_val in auto yes no ; do
2207                 if test "$enableval" = "$ol_val" ; then
2208                         ol_arg="$ol_val"
2209                 fi
2210         done
2211         if test "$ol_arg" = "invalid" ; then
2212                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2213         fi
2214         ol_enable_meta="$ol_arg"
2215
2216 else
2217         ol_enable_meta="no"
2218 fi
2219 # end --enable-meta
2220 # OpenLDAP --with-meta_module
2221         # Check whether --with-meta_module or --without-meta_module was given.
2222 if test "${with_meta_module+set}" = set; then
2223   withval="$with_meta_module"
2224   
2225         ol_arg=invalid
2226         for ol_val in static dynamic ; do
2227                 if test "$withval" = "$ol_val" ; then
2228                         ol_arg="$ol_val"
2229                 fi
2230         done
2231         if test "$ol_arg" = "invalid" ; then
2232                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2233         fi
2234         ol_with_meta_module="$ol_arg"
2235
2236 else
2237         ol_with_meta_module="static"
2238 fi
2239 # end --with-meta_module
2240
2241 # OpenLDAP --enable-monitor
2242         # Check whether --enable-monitor or --disable-monitor was given.
2243 if test "${enable_monitor+set}" = set; then
2244   enableval="$enable_monitor"
2245   
2246         ol_arg=invalid
2247         for ol_val in auto yes no ; do
2248                 if test "$enableval" = "$ol_val" ; then
2249                         ol_arg="$ol_val"
2250                 fi
2251         done
2252         if test "$ol_arg" = "invalid" ; then
2253                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2254         fi
2255         ol_enable_monitor="$ol_arg"
2256
2257 else
2258         ol_enable_monitor="no"
2259 fi
2260 # end --enable-monitor
2261 # OpenLDAP --with-monitor_module
2262         # Check whether --with-monitor_module or --without-monitor_module was given.
2263 if test "${with_monitor_module+set}" = set; then
2264   withval="$with_monitor_module"
2265   
2266         ol_arg=invalid
2267         for ol_val in static dynamic ; do
2268                 if test "$withval" = "$ol_val" ; then
2269                         ol_arg="$ol_val"
2270                 fi
2271         done
2272         if test "$ol_arg" = "invalid" ; then
2273                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2274         fi
2275         ol_with_monitor_module="$ol_arg"
2276
2277 else
2278         ol_with_monitor_module="static"
2279 fi
2280 # end --with-monitor_module
2281
2282 # OpenLDAP --enable-null
2283         # Check whether --enable-null or --disable-null was given.
2284 if test "${enable_null+set}" = set; then
2285   enableval="$enable_null"
2286   
2287         ol_arg=invalid
2288         for ol_val in auto yes no ; do
2289                 if test "$enableval" = "$ol_val" ; then
2290                         ol_arg="$ol_val"
2291                 fi
2292         done
2293         if test "$ol_arg" = "invalid" ; then
2294                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2295         fi
2296         ol_enable_null="$ol_arg"
2297
2298 else
2299         ol_enable_null="no"
2300 fi
2301 # end --enable-null
2302 # OpenLDAP --with-null_module
2303         # Check whether --with-null_module or --without-null_module was given.
2304 if test "${with_null_module+set}" = set; then
2305   withval="$with_null_module"
2306   
2307         ol_arg=invalid
2308         for ol_val in static dynamic ; do
2309                 if test "$withval" = "$ol_val" ; then
2310                         ol_arg="$ol_val"
2311                 fi
2312         done
2313         if test "$ol_arg" = "invalid" ; then
2314                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2315         fi
2316         ol_with_null_module="$ol_arg"
2317
2318 else
2319         ol_with_null_module="static"
2320 fi
2321 # end --with-null_module
2322
2323 # OpenLDAP --enable-passwd
2324         # Check whether --enable-passwd or --disable-passwd was given.
2325 if test "${enable_passwd+set}" = set; then
2326   enableval="$enable_passwd"
2327   
2328         ol_arg=invalid
2329         for ol_val in auto yes no ; do
2330                 if test "$enableval" = "$ol_val" ; then
2331                         ol_arg="$ol_val"
2332                 fi
2333         done
2334         if test "$ol_arg" = "invalid" ; then
2335                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2336         fi
2337         ol_enable_passwd="$ol_arg"
2338
2339 else
2340         ol_enable_passwd="no"
2341 fi
2342 # end --enable-passwd
2343 # OpenLDAP --with-passwd_module
2344         # Check whether --with-passwd_module or --without-passwd_module was given.
2345 if test "${with_passwd_module+set}" = set; then
2346   withval="$with_passwd_module"
2347   
2348         ol_arg=invalid
2349         for ol_val in static dynamic ; do
2350                 if test "$withval" = "$ol_val" ; then
2351                         ol_arg="$ol_val"
2352                 fi
2353         done
2354         if test "$ol_arg" = "invalid" ; then
2355                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2356         fi
2357         ol_with_passwd_module="$ol_arg"
2358
2359 else
2360         ol_with_passwd_module="static"
2361 fi
2362 # end --with-passwd_module
2363
2364 # OpenLDAP --enable-perl
2365         # Check whether --enable-perl or --disable-perl was given.
2366 if test "${enable_perl+set}" = set; then
2367   enableval="$enable_perl"
2368   
2369         ol_arg=invalid
2370         for ol_val in auto yes no ; do
2371                 if test "$enableval" = "$ol_val" ; then
2372                         ol_arg="$ol_val"
2373                 fi
2374         done
2375         if test "$ol_arg" = "invalid" ; then
2376                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2377         fi
2378         ol_enable_perl="$ol_arg"
2379
2380 else
2381         ol_enable_perl="no"
2382 fi
2383 # end --enable-perl
2384 # OpenLDAP --with-perl_module
2385         # Check whether --with-perl_module or --without-perl_module was given.
2386 if test "${with_perl_module+set}" = set; then
2387   withval="$with_perl_module"
2388   
2389         ol_arg=invalid
2390         for ol_val in static dynamic ; do
2391                 if test "$withval" = "$ol_val" ; then
2392                         ol_arg="$ol_val"
2393                 fi
2394         done
2395         if test "$ol_arg" = "invalid" ; then
2396                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2397         fi
2398         ol_with_perl_module="$ol_arg"
2399
2400 else
2401         ol_with_perl_module="static"
2402 fi
2403 # end --with-perl_module
2404
2405 # OpenLDAP --enable-shell
2406         # Check whether --enable-shell or --disable-shell was given.
2407 if test "${enable_shell+set}" = set; then
2408   enableval="$enable_shell"
2409   
2410         ol_arg=invalid
2411         for ol_val in auto yes no ; do
2412                 if test "$enableval" = "$ol_val" ; then
2413                         ol_arg="$ol_val"
2414                 fi
2415         done
2416         if test "$ol_arg" = "invalid" ; then
2417                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2418         fi
2419         ol_enable_shell="$ol_arg"
2420
2421 else
2422         ol_enable_shell="no"
2423 fi
2424 # end --enable-shell
2425 # OpenLDAP --with-shell_module
2426         # Check whether --with-shell_module or --without-shell_module was given.
2427 if test "${with_shell_module+set}" = set; then
2428   withval="$with_shell_module"
2429   
2430         ol_arg=invalid
2431         for ol_val in static dynamic ; do
2432                 if test "$withval" = "$ol_val" ; then
2433                         ol_arg="$ol_val"
2434                 fi
2435         done
2436         if test "$ol_arg" = "invalid" ; then
2437                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2438         fi
2439         ol_with_shell_module="$ol_arg"
2440
2441 else
2442         ol_with_shell_module="static"
2443 fi
2444 # end --with-shell_module
2445
2446 # OpenLDAP --enable-sql
2447         # Check whether --enable-sql or --disable-sql was given.
2448 if test "${enable_sql+set}" = set; then
2449   enableval="$enable_sql"
2450   
2451         ol_arg=invalid
2452         for ol_val in auto yes no ; do
2453                 if test "$enableval" = "$ol_val" ; then
2454                         ol_arg="$ol_val"
2455                 fi
2456         done
2457         if test "$ol_arg" = "invalid" ; then
2458                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2459         fi
2460         ol_enable_sql="$ol_arg"
2461
2462 else
2463         ol_enable_sql="no"
2464 fi
2465 # end --enable-sql
2466 # OpenLDAP --with-sql_module
2467         # Check whether --with-sql_module or --without-sql_module was given.
2468 if test "${with_sql_module+set}" = set; then
2469   withval="$with_sql_module"
2470   
2471         ol_arg=invalid
2472         for ol_val in static dynamic ; do
2473                 if test "$withval" = "$ol_val" ; then
2474                         ol_arg="$ol_val"
2475                 fi
2476         done
2477         if test "$ol_arg" = "invalid" ; then
2478                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2479         fi
2480         ol_with_sql_module="$ol_arg"
2481
2482 else
2483         ol_with_sql_module="static"
2484 fi
2485 # end --with-sql_module
2486
2487 # OpenLDAP --enable-tcl
2488         # Check whether --enable-tcl or --disable-tcl was given.
2489 if test "${enable_tcl+set}" = set; then
2490   enableval="$enable_tcl"
2491   
2492         ol_arg=invalid
2493         for ol_val in auto yes no ; do
2494                 if test "$enableval" = "$ol_val" ; then
2495                         ol_arg="$ol_val"
2496                 fi
2497         done
2498         if test "$ol_arg" = "invalid" ; then
2499                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2500         fi
2501         ol_enable_tcl="$ol_arg"
2502
2503 else
2504         ol_enable_tcl="no"
2505 fi
2506 # end --enable-tcl
2507 # OpenLDAP --with-tcl_module
2508         # Check whether --with-tcl_module or --without-tcl_module was given.
2509 if test "${with_tcl_module+set}" = set; then
2510   withval="$with_tcl_module"
2511   
2512         ol_arg=invalid
2513         for ol_val in static dynamic ; do
2514                 if test "$withval" = "$ol_val" ; then
2515                         ol_arg="$ol_val"
2516                 fi
2517         done
2518         if test "$ol_arg" = "invalid" ; then
2519                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2520         fi
2521         ol_with_tcl_module="$ol_arg"
2522
2523 else
2524         ol_with_tcl_module="static"
2525 fi
2526 # end --with-tcl_module
2527
2528
2529 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2530 if test "${with_xxslurpdoptions+set}" = set; then
2531   withval="$with_xxslurpdoptions"
2532   :
2533 fi
2534
2535 # OpenLDAP --enable-slurpd
2536         # Check whether --enable-slurpd or --disable-slurpd was given.
2537 if test "${enable_slurpd+set}" = set; then
2538   enableval="$enable_slurpd"
2539   
2540         ol_arg=invalid
2541         for ol_val in auto yes no ; do
2542                 if test "$enableval" = "$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 $enableval for --enable-slurpd" 1>&2; exit 1; }
2548         fi
2549         ol_enable_slurpd="$ol_arg"
2550
2551 else
2552         ol_enable_slurpd="auto"
2553 fi
2554 # end --enable-slurpd
2555
2556 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2557 if test "${with_xxliboptions+set}" = set; then
2558   withval="$with_xxliboptions"
2559   :
2560 fi
2561
2562 # Check whether --enable-static or --disable-static was given.
2563 if test "${enable_static+set}" = set; then
2564   enableval="$enable_static"
2565   p=${PACKAGE-default}
2566 case $enableval in
2567 yes) enable_static=yes ;;
2568 no) enable_static=no ;;
2569 *)
2570   enable_static=no
2571   # Look at the argument we got.  We use all the common list separators.
2572   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2573   for pkg in $enableval; do
2574     if test "X$pkg" = "X$p"; then
2575       enable_static=yes
2576     fi
2577   done
2578   IFS="$ac_save_ifs"
2579   ;;
2580 esac
2581 else
2582   enable_static=yes
2583 fi
2584
2585 # Check whether --enable-shared or --disable-shared was given.
2586 if test "${enable_shared+set}" = set; then
2587   enableval="$enable_shared"
2588   p=${PACKAGE-default}
2589 case $enableval in
2590 yes) enable_shared=yes ;;
2591 no) enable_shared=no ;;
2592 *)
2593   enable_shared=no
2594   # Look at the argument we got.  We use all the common list separators.
2595   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2596   for pkg in $enableval; do
2597     if test "X$pkg" = "X$p"; then
2598       enable_shared=yes
2599     fi
2600   done
2601   IFS="$ac_save_ifs"
2602   ;;
2603 esac
2604 else
2605   enable_shared=yes
2606 fi
2607
2608
2609
2610 # validate options
2611 if test $ol_enable_slapd = no ; then
2612                 if test $ol_enable_bdb = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2614         fi
2615         if test $ol_enable_dnssrv = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2617         fi
2618         if test $ol_enable_ldap = yes ; then
2619                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2620         fi
2621         if test $ol_enable_ldbm = yes ; then
2622                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2623         fi
2624         if test $ol_enable_meta = yes ; then
2625                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2626         fi
2627         if test $ol_enable_monitor = yes ; then
2628                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2629         fi
2630         if test $ol_enable_null = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2632         fi
2633         if test $ol_enable_passwd = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2635         fi
2636         if test $ol_enable_perl = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2638         fi
2639         if test $ol_enable_shell = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2641         fi
2642         if test $ol_enable_tcl = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2644         fi
2645         if test $ol_enable_sql = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2647         fi
2648         if test $ol_enable_modules = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2650         fi
2651         if test $ol_enable_multimaster = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2653         fi
2654         if test $ol_enable_wrappers = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2656         fi
2657         if test $ol_enable_phonetic = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2659         fi
2660         if test $ol_enable_rlookups = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2662         fi
2663         if test $ol_enable_aci = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2665         fi
2666         if test $ol_with_ldbm_api != auto ; then
2667                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2668         fi
2669         if test $ol_with_ldbm_type != auto ; then
2670                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2671         fi
2672         if test $ol_with_bdb_module != static ; then
2673                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2674         fi
2675         if test $ol_with_dnssrv_module != static ; then
2676                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2677         fi
2678         if test $ol_with_ldap_module != static ; then
2679                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2680         fi
2681         if test $ol_with_ldbm_module != static ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2683         fi
2684         if test $ol_with_meta_module != static ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2686         fi
2687         if test $ol_with_monitor_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2689         fi
2690         if test $ol_with_null_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2692         fi
2693         if test $ol_with_passwd_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2695         fi
2696         if test $ol_with_perl_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2698         fi
2699         if test $ol_with_shell_module != static ; then
2700                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2701         fi
2702         if test $ol_with_tcl_module != static ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2704         fi
2705         if test $ol_with_sql_module != static ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2707         fi
2708         if test $ol_enable_slurpd = yes ; then
2709                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2710         fi
2711         if test $ol_enable_rewrite = yes ; then
2712                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2713         fi
2714
2715         # force settings to no
2716         ol_enable_bdb=no
2717         ol_enable_dnssrv=no
2718         ol_enable_ldap=no
2719         ol_enable_ldbm=no
2720         ol_enable_meta=no
2721         ol_enable_monitor=no
2722         ol_enable_null=no
2723         ol_enable_passwd=no
2724         ol_enable_perl=no
2725         ol_enable_shell=no
2726         ol_enable_tcl=no
2727         ol_enable_sql=no
2728
2729         ol_enable_modules=no
2730         ol_enable_multimaster=no
2731         ol_enable_phonetic=no
2732         ol_enable_rlookups=no
2733         ol_enable_aci=no
2734         ol_enable_wrappers=no
2735         ol_enable_dynamic=no
2736
2737         ol_with_ldbm_api=no
2738         ol_with_ldbm_type=no
2739
2740         ol_with_bdb_module=static
2741         ol_with_dnssrv_module=static
2742         ol_with_ldap_module=static
2743         ol_with_ldbm_module=static
2744         ol_with_meta_module=static
2745         ol_with_monitor_module=static
2746         ol_with_null_module=static
2747         ol_with_passwd_module=static
2748         ol_with_perl_module=static
2749         ol_with_shell_module=static
2750         ol_with_tcl_module=static
2751         ol_with_sql_module=static
2752
2753         ol_enable_slurpd=no
2754
2755         ol_enable_rewrite=no
2756
2757 elif test $ol_enable_ldbm = no ; then
2758         
2759         if test $ol_with_ldbm_api != auto ; then
2760                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2761         fi
2762
2763         if test $ol_with_ldbm_type != auto ; then
2764                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2765         fi
2766
2767         if test $ol_with_ldbm_module != static ; then
2768                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2769         fi
2770
2771         if test $ol_enable_modules != yes -a \
2772                 $ol_enable_bdb = no -a \
2773                 $ol_enable_dnssrv = no -a \
2774                 $ol_enable_ldap = no -a \
2775                 $ol_enable_meta = no -a \
2776                 $ol_enable_monitor = no -a \
2777                 $ol_enable_null = no -a \
2778                 $ol_enable_passwd = no -a \
2779                 $ol_enable_perl = no -a \
2780                 $ol_enable_shell = no -a \
2781                 $ol_enable_sql = no -a \
2782                 $ol_enable_tcl = no ; then
2783
2784                 if test $ol_enable_slapd = yes ; then
2785                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2786                 else
2787                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2788                         ol_enable_slapd=no
2789                 fi
2790         fi
2791
2792         ol_with_ldbm_api=no
2793         ol_with_ldbm_type=no
2794         ol_with_ldbm_module=static
2795
2796         if test $ol_enable_bdb != no ; then
2797                 ol_with_ldbm_api=berkeley
2798         fi
2799
2800 else
2801                 if test $ol_with_ldbm_api = gdbm -a \
2802                 $ol_with_ldbm_type = btree ; then
2803                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2804         fi
2805         if test $ol_with_ldbm_api = mdbm -a \
2806                 $ol_with_ldbm_type = btree ; then
2807                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2808         fi
2809         if test $ol_with_ldbm_api = ndbm -a \
2810                 $ol_with_ldbm_type = btree ; then
2811                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2812         fi
2813
2814         if test $ol_enable_bdb = yes ; then
2815                 if test $ol_with_ldbm_api = auto ; then
2816                         ol_with_ldbm_api=berkeley
2817                 elif test $ol_with_ldbm_api != berkeley ; then
2818                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2819                 fi
2820
2821         elif test $ol_enable_bdb = auto ; then
2822                 if test $ol_with_ldbm_api != berkeley \
2823                         -o $ol_with_ldbm_api != auto ; then
2824                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2825                         ol_enable_bdb=no
2826                 fi
2827         fi
2828 fi
2829
2830 if test $ol_enable_slurpd = yes ; then
2831                 if test $ol_with_threads = no ; then
2832                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2833         fi
2834 fi
2835
2836 if test $ol_enable_lmpasswd = yes ; then
2837         if test $ol_with_tls = no ; then
2838                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2839         fi
2840 fi
2841
2842 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2843         if test $ol_with_kerberos = no ; then
2844                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2845         elif test $ol_with_kerberos = auto ; then
2846                 ol_with_kerberos=yes
2847         fi
2848
2849 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2850         if test $ol_with_kerberos = auto ; then
2851                 ol_with_kerberos=no
2852         elif test $ol_with_kerberos != no ; then
2853                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2854                 ol_with_kerberos=no
2855         fi
2856 fi
2857
2858 if test $ol_enable_spasswd = yes ; then
2859         if test $ol_with_cyrus_sasl = no ; then
2860                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2861         fi
2862         ol_with_cyrus_sasl=yes
2863 fi
2864
2865 echo "$ac_t""done" 1>&6
2866
2867 LDAP_LIBS=
2868 LDIF_LIBS=
2869 LDBM_LIB=
2870 LDBM_LIBS=
2871 LTHREAD_LIBS=
2872 LUTIL_LIBS=
2873
2874 SLAPD_LIBS=
2875 SLURPD_LIBS=
2876
2877 BUILD_SLAPD=no
2878 BUILD_SLURPD=no
2879
2880 BUILD_THREAD=no
2881
2882 BUILD_BDB=no
2883 BUILD_DNSSRV=no
2884 BUILD_LDAP=no
2885 BUILD_LDBM=no
2886 BUILD_META=no
2887 BUILD_MONITOR=no
2888 BUILD_NULL=no
2889 BUILD_PASSWD=no
2890 BUILD_PERL=no
2891 BUILD_SHELL=no
2892 BUILD_SQL=no
2893 BUILD_TCL=no
2894
2895 BUILD_BDB_DYNAMIC=static
2896 BUILD_DNSSRV_DYNAMIC=static
2897 BUILD_LDAP_DYNAMIC=static
2898 BUILD_LDBM_DYNAMIC=static
2899 BUILD_META_DYNAMIC=static
2900 BUILD_MONITOR_DYNAMIC=static
2901 BUILD_NULL_DYNAMIC=static
2902 BUILD_PASSWD_DYNAMIC=static
2903 BUILD_PERL_DYNAMIC=static
2904 BUILD_SHELL_DYNAMIC=static
2905 BUILD_TCL_DYNAMIC=static
2906 BUILD_SQL_DYNAMIC=static
2907
2908 SLAPD_MODULES_LDFLAGS=
2909 SLAPD_MODULES_CPPFLAGS=
2910
2911 SLAPD_STATIC_BACKENDS=
2912 SLAPD_DYNAMIC_BACKENDS=
2913
2914 SLAPD_PERL_LDFLAGS=
2915 MOD_PERL_LDFLAGS=
2916 PERL_CPPFLAGS=
2917
2918 SLAPD_SQL_LDFLAGS=
2919 SLAPD_SQL_LIBS=
2920 SLAPD_SQL_INCLUDES=
2921
2922 MOD_TCL_LIB=
2923 KRB4_LIBS=
2924 KRB5_LIBS=
2925 READLINE_LIBS=
2926 SASL_LIBS=
2927 TERMCAP_LIBS=
2928 TLS_LIBS=
2929 MODULES_LIBS=
2930 AUTH_LIBS=
2931
2932 SLAPD_SLP_LIBS=
2933
2934
2935 # Find a good install program.  We prefer a C program (faster),
2936 # so one script is as good as another.  But avoid the broken or
2937 # incompatible versions:
2938 # SysV /etc/install, /usr/sbin/install
2939 # SunOS /usr/etc/install
2940 # IRIX /sbin/install
2941 # AIX /bin/install
2942 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2943 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2944 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2945 # ./install, which can be erroneously created by make from ./install.sh.
2946 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2947 echo "configure:2948: checking for a BSD compatible install" >&5
2948 if test -z "$INSTALL"; then
2949 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2950   echo $ac_n "(cached) $ac_c" 1>&6
2951 else
2952     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2953   for ac_dir in $PATH; do
2954     # Account for people who put trailing slashes in PATH elements.
2955     case "$ac_dir/" in
2956     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2957     *)
2958       # OSF1 and SCO ODT 3.0 have their own names for install.
2959       # Don't use installbsd from OSF since it installs stuff as root
2960       # by default.
2961       for ac_prog in ginstall scoinst install; do
2962         if test -f $ac_dir/$ac_prog; then
2963           if test $ac_prog = install &&
2964             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2965             # AIX install.  It has an incompatible calling convention.
2966             :
2967           elif test $ac_prog = install &&
2968             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2969             # program-specific install script used by HP pwplus--don't use.
2970             :
2971           else
2972             ac_cv_path_install="$ac_dir/$ac_prog -c"
2973             break 2
2974           fi
2975         fi
2976       done
2977       ;;
2978     esac
2979   done
2980   IFS="$ac_save_IFS"
2981
2982 fi
2983   if test "${ac_cv_path_install+set}" = set; then
2984     INSTALL="$ac_cv_path_install"
2985   else
2986     # As a last resort, use the slow shell script.  We don't cache a
2987     # path for INSTALL within a source directory, because that will
2988     # break other packages using the cache if that directory is
2989     # removed, or if the path is relative.
2990     INSTALL="$ac_install_sh"
2991   fi
2992 fi
2993 echo "$ac_t""$INSTALL" 1>&6
2994
2995 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2996 # It thinks the first close brace ends the variable substitution.
2997 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2998
2999 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3000
3001 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3002
3003
3004 cat >> confdefs.h <<\EOF
3005 #define HAVE_MKVERSION 1
3006 EOF
3007
3008
3009
3010
3011 ol_aix_threads=no
3012 case "$target" in
3013 *-*-aix*)       if test -z "$CC" ; then
3014                 case "$ol_with_threads" in
3015                 auto | yes |  posix) ol_aix_threads=yes ;;
3016                 esac
3017         fi
3018 ;;
3019 esac
3020
3021 if test $ol_aix_threads = yes ; then
3022         if test -z "${CC}" ; then
3023                 for ac_prog in cc_r xlc_r cc
3024 do
3025 # Extract the first word of "$ac_prog", so it can be a program name with args.
3026 set dummy $ac_prog; ac_word=$2
3027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3028 echo "configure:3029: checking for $ac_word" >&5
3029 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3030   echo $ac_n "(cached) $ac_c" 1>&6
3031 else
3032   if test -n "$CC"; then
3033   ac_cv_prog_CC="$CC" # Let the user override the test.
3034 else
3035   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3036   ac_dummy="$PATH"
3037   for ac_dir in $ac_dummy; do
3038     test -z "$ac_dir" && ac_dir=.
3039     if test -f $ac_dir/$ac_word; then
3040       ac_cv_prog_CC="$ac_prog"
3041       break
3042     fi
3043   done
3044   IFS="$ac_save_ifs"
3045 fi
3046 fi
3047 CC="$ac_cv_prog_CC"
3048 if test -n "$CC"; then
3049   echo "$ac_t""$CC" 1>&6
3050 else
3051   echo "$ac_t""no" 1>&6
3052 fi
3053
3054 test -n "$CC" && break
3055 done
3056
3057
3058                 if test "$CC" = cc ; then
3059                                                 if test $ol_with_threads != auto ; then
3060                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3061                         else
3062                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3063                         fi
3064                         ol_with_threads=no
3065                 fi
3066         fi
3067
3068         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3069                 ol_with_threads=posix
3070                 ol_cv_pthread_create=yes
3071         fi
3072 fi
3073
3074 if test -z "${CC}"; then
3075         for ac_prog in cc gcc
3076 do
3077 # Extract the first word of "$ac_prog", so it can be a program name with args.
3078 set dummy $ac_prog; ac_word=$2
3079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3080 echo "configure:3081: checking for $ac_word" >&5
3081 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3082   echo $ac_n "(cached) $ac_c" 1>&6
3083 else
3084   if test -n "$CC"; then
3085   ac_cv_prog_CC="$CC" # Let the user override the test.
3086 else
3087   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3088   ac_dummy="$PATH"
3089   for ac_dir in $ac_dummy; do
3090     test -z "$ac_dir" && ac_dir=.
3091     if test -f $ac_dir/$ac_word; then
3092       ac_cv_prog_CC="$ac_prog"
3093       break
3094     fi
3095   done
3096   IFS="$ac_save_ifs"
3097 fi
3098 fi
3099 CC="$ac_cv_prog_CC"
3100 if test -n "$CC"; then
3101   echo "$ac_t""$CC" 1>&6
3102 else
3103   echo "$ac_t""no" 1>&6
3104 fi
3105
3106 test -n "$CC" && break
3107 done
3108 test -n "$CC" || CC="missing"
3109
3110
3111         if test "${CC}" = "missing" ; then
3112                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3113         fi
3114 fi
3115
3116 if test -z "${AR}"; then
3117         for ac_prog in ar gar
3118 do
3119 # Extract the first word of "$ac_prog", so it can be a program name with args.
3120 set dummy $ac_prog; ac_word=$2
3121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3122 echo "configure:3123: checking for $ac_word" >&5
3123 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   if test -n "$AR"; then
3127   ac_cv_prog_AR="$AR" # Let the user override the test.
3128 else
3129   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3130   ac_dummy="$PATH"
3131   for ac_dir in $ac_dummy; do
3132     test -z "$ac_dir" && ac_dir=.
3133     if test -f $ac_dir/$ac_word; then
3134       ac_cv_prog_AR="$ac_prog"
3135       break
3136     fi
3137   done
3138   IFS="$ac_save_ifs"
3139 fi
3140 fi
3141 AR="$ac_cv_prog_AR"
3142 if test -n "$AR"; then
3143   echo "$ac_t""$AR" 1>&6
3144 else
3145   echo "$ac_t""no" 1>&6
3146 fi
3147
3148 test -n "$AR" && break
3149 done
3150 test -n "$AR" || AR="missing"
3151
3152
3153         if test "${AR}" = "missing" ; then
3154                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3155         fi
3156 fi
3157
3158
3159
3160 # Find the correct PATH separator.  Usually this is `:', but
3161 # DJGPP uses `;' like DOS.
3162 if test "X${PATH_SEPARATOR+set}" != Xset; then
3163   UNAME=${UNAME-`uname 2>/dev/null`}
3164   case X$UNAME in
3165     *-DOS) lt_cv_sys_path_separator=';' ;;
3166     *)     lt_cv_sys_path_separator=':' ;;
3167   esac
3168   PATH_SEPARATOR=$lt_cv_sys_path_separator
3169 fi
3170
3171 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3172 echo "configure:3173: checking for Cygwin environment" >&5
3173 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3174   echo $ac_n "(cached) $ac_c" 1>&6
3175 else
3176   cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179
3180 int main() {
3181
3182 #ifndef __CYGWIN__
3183 #define __CYGWIN__ __CYGWIN32__
3184 #endif
3185 return __CYGWIN__;
3186 ; return 0; }
3187 EOF
3188 if { (eval echo configure:3189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3189   rm -rf conftest*
3190   ac_cv_cygwin=yes
3191 else
3192   echo "configure: failed program was:" >&5
3193   cat conftest.$ac_ext >&5
3194   rm -rf conftest*
3195   ac_cv_cygwin=no
3196 fi
3197 rm -f conftest*
3198 fi
3199
3200 echo "$ac_t""$ac_cv_cygwin" 1>&6
3201 CYGWIN=
3202 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3203 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3204 echo "configure:3205: checking for mingw32 environment" >&5
3205 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208   cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211
3212 int main() {
3213 return __MINGW32__;
3214 ; return 0; }
3215 EOF
3216 if { (eval echo configure:3217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3217   rm -rf conftest*
3218   ac_cv_mingw32=yes
3219 else
3220   echo "configure: failed program was:" >&5
3221   cat conftest.$ac_ext >&5
3222   rm -rf conftest*
3223   ac_cv_mingw32=no
3224 fi
3225 rm -f conftest*
3226 fi
3227
3228 echo "$ac_t""$ac_cv_mingw32" 1>&6
3229 MINGW32=
3230 test "$ac_cv_mingw32" = yes && MINGW32=yes
3231 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3232 echo "configure:3233: checking for EMX OS/2 environment" >&5
3233 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3234   echo $ac_n "(cached) $ac_c" 1>&6
3235 else
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239
3240 int main() {
3241 return __EMX__;
3242 ; return 0; }
3243 EOF
3244 if { (eval echo configure:3245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3245   rm -rf conftest*
3246   ac_cv_emxos2=yes
3247 else
3248   echo "configure: failed program was:" >&5
3249   cat conftest.$ac_ext >&5
3250   rm -rf conftest*
3251   ac_cv_emxos2=no
3252 fi
3253 rm -f conftest*
3254 fi
3255
3256 echo "$ac_t""$ac_cv_emxos2" 1>&6
3257 EMXOS2=
3258 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3259 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3260 echo "configure:3261: checking how to run the C preprocessor" >&5
3261 # On Suns, sometimes $CPP names a directory.
3262 if test -n "$CPP" && test -d "$CPP"; then
3263   CPP=
3264 fi
3265 if test -z "$CPP"; then
3266 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269     # This must be in double quotes, not single quotes, because CPP may get
3270   # substituted into the Makefile and "${CC-cc}" will confuse make.
3271   CPP="${CC-cc} -E"
3272   # On the NeXT, cc -E runs the code through the compiler's parser,
3273   # not just through cpp.
3274   cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 #include <assert.h>
3278 Syntax Error
3279 EOF
3280 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3281 { (eval echo configure:3282: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3282 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3283 if test -z "$ac_err"; then
3284   :
3285 else
3286   echo "$ac_err" >&5
3287   echo "configure: failed program was:" >&5
3288   cat conftest.$ac_ext >&5
3289   rm -rf conftest*
3290   CPP="${CC-cc} -E -traditional-cpp"
3291   cat > conftest.$ac_ext <<EOF
3292 #line 3293 "configure"
3293 #include "confdefs.h"
3294 #include <assert.h>
3295 Syntax Error
3296 EOF
3297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3298 { (eval echo configure:3299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3300 if test -z "$ac_err"; then
3301   :
3302 else
3303   echo "$ac_err" >&5
3304   echo "configure: failed program was:" >&5
3305   cat conftest.$ac_ext >&5
3306   rm -rf conftest*
3307   CPP="${CC-cc} -nologo -E"
3308   cat > conftest.$ac_ext <<EOF
3309 #line 3310 "configure"
3310 #include "confdefs.h"
3311 #include <assert.h>
3312 Syntax Error
3313 EOF
3314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3315 { (eval echo configure:3316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3317 if test -z "$ac_err"; then
3318   :
3319 else
3320   echo "$ac_err" >&5
3321   echo "configure: failed program was:" >&5
3322   cat conftest.$ac_ext >&5
3323   rm -rf conftest*
3324   CPP=/lib/cpp
3325 fi
3326 rm -f conftest*
3327 fi
3328 rm -f conftest*
3329 fi
3330 rm -f conftest*
3331   ac_cv_prog_CPP="$CPP"
3332 fi
3333   CPP="$ac_cv_prog_CPP"
3334 else
3335   ac_cv_prog_CPP="$CPP"
3336 fi
3337 echo "$ac_t""$CPP" 1>&6
3338
3339 # Check whether --enable-fast-install or --disable-fast-install was given.
3340 if test "${enable_fast_install+set}" = set; then
3341   enableval="$enable_fast_install"
3342   p=${PACKAGE-default}
3343 case $enableval in
3344 yes) enable_fast_install=yes ;;
3345 no) enable_fast_install=no ;;
3346 *)
3347   enable_fast_install=no
3348   # Look at the argument we got.  We use all the common list separators.
3349   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3350   for pkg in $enableval; do
3351     if test "X$pkg" = "X$p"; then
3352       enable_fast_install=yes
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356   ;;
3357 esac
3358 else
3359   enable_fast_install=yes
3360 fi
3361
3362 # Extract the first word of "gcc", so it can be a program name with args.
3363 set dummy gcc; ac_word=$2
3364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $ac_word" >&5
3366 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3367   echo $ac_n "(cached) $ac_c" 1>&6
3368 else
3369   if test -n "$CC"; then
3370   ac_cv_prog_CC="$CC" # Let the user override the test.
3371 else
3372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3373   ac_dummy="$PATH"
3374   for ac_dir in $ac_dummy; do
3375     test -z "$ac_dir" && ac_dir=.
3376     if test -f $ac_dir/$ac_word; then
3377       ac_cv_prog_CC="gcc"
3378       break
3379     fi
3380   done
3381   IFS="$ac_save_ifs"
3382 fi
3383 fi
3384 CC="$ac_cv_prog_CC"
3385 if test -n "$CC"; then
3386   echo "$ac_t""$CC" 1>&6
3387 else
3388   echo "$ac_t""no" 1>&6
3389 fi
3390
3391 if test -z "$CC"; then
3392   # Extract the first word of "cc", so it can be a program name with args.
3393 set dummy cc; ac_word=$2
3394 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3395 echo "configure:3396: checking for $ac_word" >&5
3396 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3397   echo $ac_n "(cached) $ac_c" 1>&6
3398 else
3399   if test -n "$CC"; then
3400   ac_cv_prog_CC="$CC" # Let the user override the test.
3401 else
3402   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3403   ac_prog_rejected=no
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3409         ac_prog_rejected=yes
3410         continue
3411       fi
3412       ac_cv_prog_CC="cc"
3413       break
3414     fi
3415   done
3416   IFS="$ac_save_ifs"
3417 if test $ac_prog_rejected = yes; then
3418   # We found a bogon in the path, so make sure we never use it.
3419   set dummy $ac_cv_prog_CC
3420   shift
3421   if test $# -gt 0; then
3422     # We chose a different compiler from the bogus one.
3423     # However, it has the same basename, so the bogon will be chosen
3424     # first if we set CC to just the basename; use the full file name.
3425     shift
3426     set dummy "$ac_dir/$ac_word" "$@"
3427     shift
3428     ac_cv_prog_CC="$@"
3429   fi
3430 fi
3431 fi
3432 fi
3433 CC="$ac_cv_prog_CC"
3434 if test -n "$CC"; then
3435   echo "$ac_t""$CC" 1>&6
3436 else
3437   echo "$ac_t""no" 1>&6
3438 fi
3439
3440   if test -z "$CC"; then
3441     case "`uname -s`" in
3442     *win32* | *WIN32* | *CYGWIN*)
3443       # Extract the first word of "cl", so it can be a program name with args.
3444 set dummy cl; ac_word=$2
3445 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_word" >&5
3447 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3448   echo $ac_n "(cached) $ac_c" 1>&6
3449 else
3450   if test -n "$CC"; then
3451   ac_cv_prog_CC="$CC" # Let the user override the test.
3452 else
3453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3454   ac_dummy="$PATH"
3455   for ac_dir in $ac_dummy; do
3456     test -z "$ac_dir" && ac_dir=.
3457     if test -f $ac_dir/$ac_word; then
3458       ac_cv_prog_CC="cl"
3459       break
3460     fi
3461   done
3462   IFS="$ac_save_ifs"
3463 fi
3464 fi
3465 CC="$ac_cv_prog_CC"
3466 if test -n "$CC"; then
3467   echo "$ac_t""$CC" 1>&6
3468 else
3469   echo "$ac_t""no" 1>&6
3470 fi
3471  ;;
3472     esac
3473   fi
3474   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3475 fi
3476
3477 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3478 echo "configure:3479: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3479
3480 ac_ext=c
3481 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3482 ac_cpp='$CPP $CPPFLAGS'
3483 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3484 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3485 cross_compiling=$ac_cv_prog_cc_cross
3486
3487 cat > conftest.$ac_ext << EOF
3488
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491
3492 main(){return(0);}
3493 EOF
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3495   ac_cv_prog_cc_works=yes
3496   # If we can't run a trivial program, we are probably using a cross compiler.
3497   if (./conftest; exit) 2>/dev/null; then
3498     ac_cv_prog_cc_cross=no
3499   else
3500     ac_cv_prog_cc_cross=yes
3501   fi
3502 else
3503   echo "configure: failed program was:" >&5
3504   cat conftest.$ac_ext >&5
3505   ac_cv_prog_cc_works=no
3506 fi
3507 rm -fr conftest*
3508 ac_ext=c
3509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3510 ac_cpp='$CPP $CPPFLAGS'
3511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3513 cross_compiling=$ac_cv_prog_cc_cross
3514
3515 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3516 if test $ac_cv_prog_cc_works = no; then
3517   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3518 fi
3519 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3520 echo "configure:3521: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3521 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3522 cross_compiling=$ac_cv_prog_cc_cross
3523
3524 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether we are using GNU C" >&5
3526 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   cat > conftest.c <<EOF
3530 #ifdef __GNUC__
3531   yes;
3532 #endif
3533 EOF
3534 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3535   ac_cv_prog_gcc=yes
3536 else
3537   ac_cv_prog_gcc=no
3538 fi
3539 fi
3540
3541 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3542
3543 if test $ac_cv_prog_gcc = yes; then
3544   GCC=yes
3545 else
3546   GCC=
3547 fi
3548
3549 ac_test_CFLAGS="${CFLAGS+set}"
3550 ac_save_CFLAGS="$CFLAGS"
3551 CFLAGS=
3552 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3553 echo "configure:3554: checking whether ${CC-cc} accepts -g" >&5
3554 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3555   echo $ac_n "(cached) $ac_c" 1>&6
3556 else
3557   echo 'void f(){}' > conftest.c
3558 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3559   ac_cv_prog_cc_g=yes
3560 else
3561   ac_cv_prog_cc_g=no
3562 fi
3563 rm -f conftest*
3564
3565 fi
3566
3567 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3568 if test "$ac_test_CFLAGS" = set; then
3569   CFLAGS="$ac_save_CFLAGS"
3570 elif test $ac_cv_prog_cc_g = yes; then
3571   if test "$GCC" = yes; then
3572     CFLAGS="-g -O2"
3573   else
3574     CFLAGS="-g"
3575   fi
3576 else
3577   if test "$GCC" = yes; then
3578     CFLAGS="-O2"
3579   else
3580     CFLAGS=
3581   fi
3582 fi
3583
3584 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3585 if test "${with_gnu_ld+set}" = set; then
3586   withval="$with_gnu_ld"
3587   test "$withval" = no || with_gnu_ld=yes
3588 else
3589   with_gnu_ld=no
3590 fi
3591
3592 ac_prog=ld
3593 if test "$GCC" = yes; then
3594   # Check if gcc -print-prog-name=ld gives a path.
3595   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3596 echo "configure:3597: checking for ld used by GCC" >&5
3597   case $host in
3598   *-*-mingw*)
3599     # gcc leaves a trailing carriage return which upsets mingw
3600     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3601   *)
3602     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3603   esac
3604   case $ac_prog in
3605     # Accept absolute paths.
3606     [\\/]* | [A-Za-z]:[\\/]*)
3607       re_direlt='/[^/][^/]*/\.\./'
3608       # Canonicalize the path of ld
3609       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3610       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3611         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3612       done
3613       test -z "$LD" && LD="$ac_prog"
3614       ;;
3615   "")
3616     # If it fails, then pretend we aren't using GCC.
3617     ac_prog=ld
3618     ;;
3619   *)
3620     # If it is relative, then search for the first ld in PATH.
3621     with_gnu_ld=unknown
3622     ;;
3623   esac
3624 elif test "$with_gnu_ld" = yes; then
3625   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking for GNU ld" >&5
3627 else
3628   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3629 echo "configure:3630: checking for non-GNU ld" >&5
3630 fi
3631 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3632   echo $ac_n "(cached) $ac_c" 1>&6
3633 else
3634   if test -z "$LD"; then
3635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3636   for ac_dir in $PATH; do
3637     test -z "$ac_dir" && ac_dir=.
3638     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3639       lt_cv_path_LD="$ac_dir/$ac_prog"
3640       # Check to see if the program is GNU ld.  I'd rather use --version,
3641       # but apparently some GNU ld's only accept -v.
3642       # Break only if it was the GNU/non-GNU ld that we prefer.
3643       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3644         test "$with_gnu_ld" != no && break
3645       else
3646         test "$with_gnu_ld" != yes && break
3647       fi
3648     fi
3649   done
3650   IFS="$ac_save_ifs"
3651 else
3652   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3653 fi
3654 fi
3655
3656 LD="$lt_cv_path_LD"
3657 if test -n "$LD"; then
3658   echo "$ac_t""$LD" 1>&6
3659 else
3660   echo "$ac_t""no" 1>&6
3661 fi
3662 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3663 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3664 echo "configure:3665: checking if the linker ($LD) is GNU ld" >&5
3665 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3666   echo $ac_n "(cached) $ac_c" 1>&6
3667 else
3668   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3669 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3670   lt_cv_prog_gnu_ld=yes
3671 else
3672   lt_cv_prog_gnu_ld=no
3673 fi
3674 fi
3675
3676 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3677 with_gnu_ld=$lt_cv_prog_gnu_ld
3678
3679
3680 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3681 echo "configure:3682: checking for $LD option to reload object files" >&5
3682 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   lt_cv_ld_reload_flag='-r'
3686 fi
3687
3688 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3689 reload_flag=$lt_cv_ld_reload_flag
3690 test -n "$reload_flag" && reload_flag=" $reload_flag"
3691
3692 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3693 echo "configure:3694: checking for BSD-compatible nm" >&5
3694 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   if test -n "$NM"; then
3698   # Let the user override the test.
3699   lt_cv_path_NM="$NM"
3700 else
3701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3702   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3703     test -z "$ac_dir" && ac_dir=.
3704     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3705     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3706       # Check to see if the nm accepts a BSD-compat flag.
3707       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3708       #   nm: unknown option "B" ignored
3709       # Tru64's nm complains that /dev/null is an invalid object file
3710       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3711         lt_cv_path_NM="$tmp_nm -B"
3712         break
3713       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3714         lt_cv_path_NM="$tmp_nm -p"
3715         break
3716       else
3717         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3718         continue # so that we can try to find one that supports BSD flags
3719       fi
3720     fi
3721   done
3722   IFS="$ac_save_ifs"
3723   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3724 fi
3725 fi
3726
3727 NM="$lt_cv_path_NM"
3728 echo "$ac_t""$NM" 1>&6
3729
3730 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3731 echo "configure:3732: checking whether ln -s works" >&5
3732 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3733   echo $ac_n "(cached) $ac_c" 1>&6
3734 else
3735   rm -f conftestdata
3736 if ln -s X conftestdata 2>/dev/null
3737 then
3738   rm -f conftestdata
3739   ac_cv_prog_LN_S="ln -s"
3740 else
3741   ac_cv_prog_LN_S=ln
3742 fi
3743 fi
3744 LN_S="$ac_cv_prog_LN_S"
3745 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3746   echo "$ac_t""yes" 1>&6
3747 else
3748   echo "$ac_t""no" 1>&6
3749 fi
3750
3751 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3752 echo "configure:3753: checking how to recognise dependant libraries" >&5
3753 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3754   echo $ac_n "(cached) $ac_c" 1>&6
3755 else
3756   lt_cv_file_magic_cmd='$MAGIC_CMD'
3757 lt_cv_file_magic_test_file=
3758 lt_cv_deplibs_check_method='unknown'
3759 # Need to set the preceding variable on all platforms that support
3760 # interlibrary dependencies.
3761 # 'none' -- dependencies not supported.
3762 # `unknown' -- same as none, but documents that we really don't know.
3763 # 'pass_all' -- all dependencies passed with no checks.
3764 # 'test_compile' -- check by making test program.
3765 # 'file_magic [[regex]]' -- check by looking for files in library path
3766 # which responds to the $file_magic_cmd with a given egrep regex.
3767 # If you have `file' or equivalent on your system and you're not sure
3768 # whether `pass_all' will *always* work, you probably want this one.
3769
3770 case $host_os in
3771 aix4* | aix5*)
3772   lt_cv_deplibs_check_method=pass_all
3773   ;;
3774
3775 beos*)
3776   lt_cv_deplibs_check_method=pass_all
3777   ;;
3778
3779 bsdi4*)
3780   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3781   lt_cv_file_magic_cmd='/usr/bin/file -L'
3782   lt_cv_file_magic_test_file=/shlib/libc.so
3783   ;;
3784
3785 cygwin* | mingw* | pw32*)
3786   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3787   lt_cv_file_magic_cmd='$OBJDUMP -f'
3788   ;;
3789
3790 darwin* | rhapsody*)
3791   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3792   lt_cv_file_magic_cmd='/usr/bin/file -L'
3793   case "$host_os" in
3794   rhapsody* | darwin1.[012])
3795     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3796     ;;
3797   *) # Darwin 1.3 on
3798     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3799     ;;
3800   esac
3801   ;;
3802
3803 freebsd*)
3804   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3805     case $host_cpu in
3806     i*86 )
3807       # Not sure whether the presence of OpenBSD here was a mistake.
3808       # Let's accept both of them until this is cleared up.
3809       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3810       lt_cv_file_magic_cmd=/usr/bin/file
3811       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3812       ;;
3813     esac
3814   else
3815     lt_cv_deplibs_check_method=pass_all
3816   fi
3817   ;;
3818
3819 gnu*)
3820   lt_cv_deplibs_check_method=pass_all
3821   ;;
3822
3823 hpux10.20*|hpux11*)
3824   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3825   lt_cv_file_magic_cmd=/usr/bin/file
3826   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3827   ;;
3828
3829 irix5* | irix6*)
3830   case $host_os in
3831   irix5*)
3832     # this will be overridden with pass_all, but let us keep it just in case
3833     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3834     ;;
3835   *)
3836     case $LD in
3837     *-32|*"-32 ") libmagic=32-bit;;
3838     *-n32|*"-n32 ") libmagic=N32;;
3839     *-64|*"-64 ") libmagic=64-bit;;
3840     *) libmagic=never-match;;
3841     esac
3842     # this will be overridden with pass_all, but let us keep it just in case
3843     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3844     ;;
3845   esac
3846   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3847   lt_cv_deplibs_check_method=pass_all
3848   ;;
3849
3850 # This must be Linux ELF.
3851 linux-gnu*)
3852   case $host_cpu in
3853   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3854     lt_cv_deplibs_check_method=pass_all ;;
3855   *)
3856     # glibc up to 2.1.1 does not perform some relocations on ARM
3857     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3858   esac
3859   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3860   ;;
3861
3862 netbsd*)
3863   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3864     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3865   else
3866     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3867   fi
3868   ;;
3869
3870 newos6*)
3871   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3872   lt_cv_file_magic_cmd=/usr/bin/file
3873   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3874   ;;
3875
3876 openbsd*)
3877   lt_cv_file_magic_cmd=/usr/bin/file
3878   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3879   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3880     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3881   else
3882     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3883   fi
3884   ;;
3885
3886 osf3* | osf4* | osf5*)
3887   # this will be overridden with pass_all, but let us keep it just in case
3888   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3889   lt_cv_file_magic_test_file=/shlib/libc.so
3890   lt_cv_deplibs_check_method=pass_all
3891   ;;
3892
3893 sco3.2v5*)
3894   lt_cv_deplibs_check_method=pass_all
3895   ;;
3896
3897 solaris*)
3898   lt_cv_deplibs_check_method=pass_all
3899   lt_cv_file_magic_test_file=/lib/libc.so
3900   ;;
3901
3902 sysv5uw[78]* | sysv4*uw2*)
3903   lt_cv_deplibs_check_method=pass_all
3904   ;;
3905
3906 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3907   case $host_vendor in
3908   motorola)
3909     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]'
3910     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3911     ;;
3912   ncr)
3913     lt_cv_deplibs_check_method=pass_all
3914     ;;
3915   sequent)
3916     lt_cv_file_magic_cmd='/bin/file'
3917     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3918     ;;
3919   sni)
3920     lt_cv_file_magic_cmd='/bin/file'
3921     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3922     lt_cv_file_magic_test_file=/lib/libc.so
3923     ;;
3924   esac
3925   ;;
3926 esac
3927
3928 fi
3929
3930 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3931 file_magic_cmd=$lt_cv_file_magic_cmd
3932 deplibs_check_method=$lt_cv_deplibs_check_method
3933
3934 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3935 echo "configure:3936: checking for object suffix" >&5
3936 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3937   echo $ac_n "(cached) $ac_c" 1>&6
3938 else
3939   rm -f conftest*
3940 echo 'int i = 1;' > conftest.$ac_ext
3941 if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3942   for ac_file in conftest.*; do
3943     case $ac_file in
3944     *.c) ;;
3945     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3946     esac
3947   done
3948 else
3949   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3950 fi
3951 rm -f conftest*
3952 fi
3953
3954 echo "$ac_t""$ac_cv_objext" 1>&6
3955 OBJEXT=$ac_cv_objext
3956 ac_objext=$ac_cv_objext
3957
3958
3959
3960
3961 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3962 echo "configure:3963: checking for executable suffix" >&5
3963 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3964   echo $ac_n "(cached) $ac_c" 1>&6
3965 else
3966   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3967   ac_cv_exeext=.exe
3968 else
3969   rm -f conftest*
3970   echo 'int main () { return 0; }' > conftest.$ac_ext
3971   ac_cv_exeext=
3972   if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3973     for file in conftest.*; do
3974       case $file in
3975       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3976       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3977       esac
3978     done
3979   else
3980     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3981   fi
3982   rm -f conftest*
3983   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3984 fi
3985 fi
3986
3987 EXEEXT=""
3988 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3989 echo "$ac_t""${ac_cv_exeext}" 1>&6
3990 ac_exeext=$EXEEXT
3991
3992 if test $host != $build; then
3993   ac_tool_prefix=${host_alias}-
3994 else
3995   ac_tool_prefix=
3996 fi
3997
3998
3999
4000
4001 # Check for command to grab the raw symbol name followed by C symbol from nm.
4002 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4003 echo "configure:4004: checking command to parse $NM output" >&5
4004 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4005   echo $ac_n "(cached) $ac_c" 1>&6
4006 else
4007   
4008 # These are sane defaults that work on at least a few old systems.
4009 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4010
4011 # Character class describing NM global symbol codes.
4012 symcode='[BCDEGRST]'
4013
4014 # Regexp to match symbols that can be accessed directly from C.
4015 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4016
4017 # Transform the above into a raw symbol and a C symbol.
4018 symxfrm='\1 \2\3 \3'
4019
4020 # Transform an extracted symbol line into a proper C declaration
4021 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4022
4023 # Transform an extracted symbol line into symbol name and symbol address
4024 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'"
4025
4026 # Define system-specific variables.
4027 case $host_os in
4028 aix*)
4029   symcode='[BCDT]'
4030   ;;
4031 cygwin* | mingw* | pw32*)
4032   symcode='[ABCDGISTW]'
4033   ;;
4034 hpux*) # Its linker distinguishes data from code symbols
4035   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4036   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'"
4037   ;;
4038 irix*)
4039   symcode='[BCDEGRST]'
4040   ;;
4041 solaris* | sysv5*)
4042   symcode='[BDT]'
4043   ;;
4044 sysv4)
4045   symcode='[DFNSTU]'
4046   ;;
4047 esac
4048
4049 # Handle CRLF in mingw tool chain
4050 opt_cr=
4051 case $host_os in
4052 mingw*)
4053   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4054   ;;
4055 esac
4056
4057 # If we're using GNU nm, then use its standard symbol codes.
4058 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4059   symcode='[ABCDGISTW]'
4060 fi
4061
4062 # Try without a prefix undercore, then with it.
4063 for ac_symprfx in "" "_"; do
4064
4065   # Write the raw and C identifiers.
4066 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4067
4068   # Check to see that the pipe works correctly.
4069   pipe_works=no
4070   rm -f conftest*
4071   cat > conftest.$ac_ext <<EOF
4072 #ifdef __cplusplus
4073 extern "C" {
4074 #endif
4075 char nm_test_var;
4076 void nm_test_func(){}
4077 #ifdef __cplusplus
4078 }
4079 #endif
4080 int main(){nm_test_var='a';nm_test_func();return(0);}
4081 EOF
4082
4083   if { (eval echo configure:4084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4084     # Now try to grab the symbols.
4085     nlist=conftest.nm
4086     if { (eval echo configure:4087: \"$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
4087       # Try sorting and uniquifying the output.
4088       if sort "$nlist" | uniq > "$nlist"T; then
4089         mv -f "$nlist"T "$nlist"
4090       else
4091         rm -f "$nlist"T
4092       fi
4093
4094       # Make sure that we snagged all the symbols we need.
4095       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4096         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4097           cat <<EOF > conftest.$ac_ext
4098 #ifdef __cplusplus
4099 extern "C" {
4100 #endif
4101
4102 EOF
4103           # Now generate the symbol file.
4104           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4105
4106           cat <<EOF >> conftest.$ac_ext
4107 #if defined (__STDC__) && __STDC__
4108 # define lt_ptr void *
4109 #else
4110 # define lt_ptr char *
4111 # define const
4112 #endif
4113
4114 /* The mapping between symbol names and symbols. */
4115 const struct {
4116   const char *name;
4117   lt_ptr address;
4118 }
4119 lt_preloaded_symbols[] =
4120 {
4121 EOF
4122           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4123           cat <<\EOF >> conftest.$ac_ext
4124   {0, (lt_ptr) 0}
4125 };
4126
4127 #ifdef __cplusplus
4128 }
4129 #endif
4130 EOF
4131           # Now try linking the two files.
4132           mv conftest.$ac_objext conftstm.$ac_objext
4133           save_LIBS="$LIBS"
4134           save_CFLAGS="$CFLAGS"
4135           LIBS="conftstm.$ac_objext"
4136           CFLAGS="$CFLAGS$no_builtin_flag"
4137           if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4138             pipe_works=yes
4139           fi
4140           LIBS="$save_LIBS"
4141           CFLAGS="$save_CFLAGS"
4142         else
4143           echo "cannot find nm_test_func in $nlist" >&5
4144         fi
4145       else
4146         echo "cannot find nm_test_var in $nlist" >&5
4147       fi
4148     else
4149       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4150     fi
4151   else
4152     echo "$progname: failed program was:" >&5
4153     cat conftest.$ac_ext >&5
4154   fi
4155   rm -f conftest* conftst*
4156
4157   # Do not use the global_symbol_pipe unless it works.
4158   if test "$pipe_works" = yes; then
4159     break
4160   else
4161     lt_cv_sys_global_symbol_pipe=
4162   fi
4163 done
4164
4165 fi
4166
4167 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4168 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4169   global_symbol_to_cdecl=
4170   global_symbol_to_c_name_address=
4171 else
4172   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4173   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4174 fi
4175 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4176 then
4177   echo "$ac_t""failed" 1>&6
4178 else
4179   echo "$ac_t""ok" 1>&6
4180 fi
4181
4182 for ac_hdr in dlfcn.h
4183 do
4184 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4185 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4186 echo "configure:4187: checking for $ac_hdr" >&5
4187 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4188   echo $ac_n "(cached) $ac_c" 1>&6
4189 else
4190   cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <$ac_hdr>
4194 EOF
4195 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4196 { (eval echo configure:4197: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4197 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4198 if test -z "$ac_err"; then
4199   rm -rf conftest*
4200   eval "ac_cv_header_$ac_safe=yes"
4201 else
4202   echo "$ac_err" >&5
4203   echo "configure: failed program was:" >&5
4204   cat conftest.$ac_ext >&5
4205   rm -rf conftest*
4206   eval "ac_cv_header_$ac_safe=no"
4207 fi
4208 rm -f conftest*
4209 fi
4210 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4211   echo "$ac_t""yes" 1>&6
4212     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4213   cat >> confdefs.h <<EOF
4214 #define $ac_tr_hdr 1
4215 EOF
4216  
4217 else
4218   echo "$ac_t""no" 1>&6
4219 fi
4220 done
4221
4222
4223
4224
4225
4226 # Only perform the check for file, if the check method requires it
4227 case $deplibs_check_method in
4228 file_magic*)
4229   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4230     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4231 echo "configure:4232: checking for ${ac_tool_prefix}file" >&5
4232 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4233   echo $ac_n "(cached) $ac_c" 1>&6
4234 else
4235   case $MAGIC_CMD in
4236   /*)
4237   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4238   ;;
4239   ?:/*)
4240   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4241   ;;
4242   *)
4243   ac_save_MAGIC_CMD="$MAGIC_CMD"
4244   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4245   ac_dummy="/usr/bin:$PATH"
4246   for ac_dir in $ac_dummy; do
4247     test -z "$ac_dir" && ac_dir=.
4248     if test -f $ac_dir/${ac_tool_prefix}file; then
4249       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4250       if test -n "$file_magic_test_file"; then
4251         case $deplibs_check_method in
4252         "file_magic "*)
4253           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4254           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4255           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4256             egrep "$file_magic_regex" > /dev/null; then
4257             :
4258           else
4259             cat <<EOF 1>&2
4260
4261 *** Warning: the command libtool uses to detect shared libraries,
4262 *** $file_magic_cmd, produces output that libtool cannot recognize.
4263 *** The result is that libtool may fail to recognize shared libraries
4264 *** as such.  This will affect the creation of libtool libraries that
4265 *** depend on shared libraries, but programs linked with such libtool
4266 *** libraries will work regardless of this problem.  Nevertheless, you
4267 *** may want to report the problem to your system manager and/or to
4268 *** bug-libtool@gnu.org
4269
4270 EOF
4271           fi ;;
4272         esac
4273       fi
4274       break
4275     fi
4276   done
4277   IFS="$ac_save_ifs"
4278   MAGIC_CMD="$ac_save_MAGIC_CMD"
4279   ;;
4280 esac
4281 fi
4282
4283 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4284 if test -n "$MAGIC_CMD"; then
4285   echo "$ac_t""$MAGIC_CMD" 1>&6
4286 else
4287   echo "$ac_t""no" 1>&6
4288 fi
4289
4290 if test -z "$lt_cv_path_MAGIC_CMD"; then
4291   if test -n "$ac_tool_prefix"; then
4292     echo $ac_n "checking for file""... $ac_c" 1>&6
4293 echo "configure:4294: checking for file" >&5
4294 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4295   echo $ac_n "(cached) $ac_c" 1>&6
4296 else
4297   case $MAGIC_CMD in
4298   /*)
4299   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4300   ;;
4301   ?:/*)
4302   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4303   ;;
4304   *)
4305   ac_save_MAGIC_CMD="$MAGIC_CMD"
4306   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4307   ac_dummy="/usr/bin:$PATH"
4308   for ac_dir in $ac_dummy; do
4309     test -z "$ac_dir" && ac_dir=.
4310     if test -f $ac_dir/file; then
4311       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4312       if test -n "$file_magic_test_file"; then
4313         case $deplibs_check_method in
4314         "file_magic "*)
4315           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4316           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4317           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4318             egrep "$file_magic_regex" > /dev/null; then
4319             :
4320           else
4321             cat <<EOF 1>&2
4322
4323 *** Warning: the command libtool uses to detect shared libraries,
4324 *** $file_magic_cmd, produces output that libtool cannot recognize.
4325 *** The result is that libtool may fail to recognize shared libraries
4326 *** as such.  This will affect the creation of libtool libraries that
4327 *** depend on shared libraries, but programs linked with such libtool
4328 *** libraries will work regardless of this problem.  Nevertheless, you
4329 *** may want to report the problem to your system manager and/or to
4330 *** bug-libtool@gnu.org
4331
4332 EOF
4333           fi ;;
4334         esac
4335       fi
4336       break
4337     fi
4338   done
4339   IFS="$ac_save_ifs"
4340   MAGIC_CMD="$ac_save_MAGIC_CMD"
4341   ;;
4342 esac
4343 fi
4344
4345 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4346 if test -n "$MAGIC_CMD"; then
4347   echo "$ac_t""$MAGIC_CMD" 1>&6
4348 else
4349   echo "$ac_t""no" 1>&6
4350 fi
4351
4352   else
4353     MAGIC_CMD=:
4354   fi
4355 fi
4356
4357   fi
4358   ;;
4359 esac
4360
4361 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4362 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4364 echo "configure:4365: checking for $ac_word" >&5
4365 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4366   echo $ac_n "(cached) $ac_c" 1>&6
4367 else
4368   if test -n "$RANLIB"; then
4369   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4370 else
4371   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4372   ac_dummy="$PATH"
4373   for ac_dir in $ac_dummy; do
4374     test -z "$ac_dir" && ac_dir=.
4375     if test -f $ac_dir/$ac_word; then
4376       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4377       break
4378     fi
4379   done
4380   IFS="$ac_save_ifs"
4381 fi
4382 fi
4383 RANLIB="$ac_cv_prog_RANLIB"
4384 if test -n "$RANLIB"; then
4385   echo "$ac_t""$RANLIB" 1>&6
4386 else
4387   echo "$ac_t""no" 1>&6
4388 fi
4389
4390
4391 if test -z "$ac_cv_prog_RANLIB"; then
4392 if test -n "$ac_tool_prefix"; then
4393   # Extract the first word of "ranlib", so it can be a program name with args.
4394 set dummy ranlib; ac_word=$2
4395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4396 echo "configure:4397: checking for $ac_word" >&5
4397 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4398   echo $ac_n "(cached) $ac_c" 1>&6
4399 else
4400   if test -n "$RANLIB"; then
4401   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4402 else
4403   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4404   ac_dummy="$PATH"
4405   for ac_dir in $ac_dummy; do
4406     test -z "$ac_dir" && ac_dir=.
4407     if test -f $ac_dir/$ac_word; then
4408       ac_cv_prog_RANLIB="ranlib"
4409       break
4410     fi
4411   done
4412   IFS="$ac_save_ifs"
4413   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4414 fi
4415 fi
4416 RANLIB="$ac_cv_prog_RANLIB"
4417 if test -n "$RANLIB"; then
4418   echo "$ac_t""$RANLIB" 1>&6
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422
4423 else
4424   RANLIB=":"
4425 fi
4426 fi
4427
4428 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4429 set dummy ${ac_tool_prefix}strip; 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_STRIP+set}\" = set"; then
4433   echo $ac_n "(cached) $ac_c" 1>&6
4434 else
4435   if test -n "$STRIP"; then
4436   ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
4444       break
4445     fi
4446   done
4447   IFS="$ac_save_ifs"
4448 fi
4449 fi
4450 STRIP="$ac_cv_prog_STRIP"
4451 if test -n "$STRIP"; then
4452   echo "$ac_t""$STRIP" 1>&6
4453 else
4454   echo "$ac_t""no" 1>&6
4455 fi
4456
4457
4458 if test -z "$ac_cv_prog_STRIP"; then
4459 if test -n "$ac_tool_prefix"; then
4460   # Extract the first word of "strip", so it can be a program name with args.
4461 set dummy strip; ac_word=$2
4462 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4463 echo "configure:4464: checking for $ac_word" >&5
4464 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4465   echo $ac_n "(cached) $ac_c" 1>&6
4466 else
4467   if test -n "$STRIP"; then
4468   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4469 else
4470   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4471   ac_dummy="$PATH"
4472   for ac_dir in $ac_dummy; do
4473     test -z "$ac_dir" && ac_dir=.
4474     if test -f $ac_dir/$ac_word; then
4475       ac_cv_prog_STRIP="strip"
4476       break
4477     fi
4478   done
4479   IFS="$ac_save_ifs"
4480   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4481 fi
4482 fi
4483 STRIP="$ac_cv_prog_STRIP"
4484 if test -n "$STRIP"; then
4485   echo "$ac_t""$STRIP" 1>&6
4486 else
4487   echo "$ac_t""no" 1>&6
4488 fi
4489
4490 else
4491   STRIP=":"
4492 fi
4493 fi
4494
4495
4496 enable_dlopen=yes
4497 enable_win32_dll=yes
4498
4499 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4500 if test "${enable_libtool_lock+set}" = set; then
4501   enableval="$enable_libtool_lock"
4502   :
4503 fi
4504
4505 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4506
4507 # Some flags need to be propagated to the compiler or linker for good
4508 # libtool support.
4509 case $host in
4510 *-*-irix6*)
4511   # Find out which ABI we are using.
4512   echo '#line 4513 "configure"' > conftest.$ac_ext
4513   if { (eval echo configure:4514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4514     case `/usr/bin/file conftest.$ac_objext` in
4515     *32-bit*)
4516       LD="${LD-ld} -32"
4517       ;;
4518     *N32*)
4519       LD="${LD-ld} -n32"
4520       ;;
4521     *64-bit*)
4522       LD="${LD-ld} -64"
4523       ;;
4524     esac
4525   fi
4526   rm -rf conftest*
4527   ;;
4528
4529 *-*-sco3.2v5*)
4530   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4531   SAVE_CFLAGS="$CFLAGS"
4532   CFLAGS="$CFLAGS -belf"
4533   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4534 echo "configure:4535: checking whether the C compiler needs -belf" >&5
4535 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4536   echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538   
4539      ac_ext=c
4540 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4541 ac_cpp='$CPP $CPPFLAGS'
4542 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4543 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4544 cross_compiling=$ac_cv_prog_cc_cross
4545
4546      cat > conftest.$ac_ext <<EOF
4547 #line 4548 "configure"
4548 #include "confdefs.h"
4549
4550 int main() {
4551
4552 ; return 0; }
4553 EOF
4554 if { (eval echo configure:4555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4555   rm -rf conftest*
4556   lt_cv_cc_needs_belf=yes
4557 else
4558   echo "configure: failed program was:" >&5
4559   cat conftest.$ac_ext >&5
4560   rm -rf conftest*
4561   lt_cv_cc_needs_belf=no
4562 fi
4563 rm -f conftest*
4564      ac_ext=c
4565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4566 ac_cpp='$CPP $CPPFLAGS'
4567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4569 cross_compiling=$ac_cv_prog_cc_cross
4570
4571 fi
4572
4573 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4574   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4575     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4576     CFLAGS="$SAVE_CFLAGS"
4577   fi
4578   ;;
4579
4580 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4581   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4582 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4584 echo "configure:4585: checking for $ac_word" >&5
4585 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4586   echo $ac_n "(cached) $ac_c" 1>&6
4587 else
4588   if test -n "$DLLTOOL"; then
4589   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4590 else
4591   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4592   ac_dummy="$PATH"
4593   for ac_dir in $ac_dummy; do
4594     test -z "$ac_dir" && ac_dir=.
4595     if test -f $ac_dir/$ac_word; then
4596       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4597       break
4598     fi
4599   done
4600   IFS="$ac_save_ifs"
4601 fi
4602 fi
4603 DLLTOOL="$ac_cv_prog_DLLTOOL"
4604 if test -n "$DLLTOOL"; then
4605   echo "$ac_t""$DLLTOOL" 1>&6
4606 else
4607   echo "$ac_t""no" 1>&6
4608 fi
4609
4610
4611 if test -z "$ac_cv_prog_DLLTOOL"; then
4612 if test -n "$ac_tool_prefix"; then
4613   # Extract the first word of "dlltool", so it can be a program name with args.
4614 set dummy dlltool; ac_word=$2
4615 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4616 echo "configure:4617: checking for $ac_word" >&5
4617 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4618   echo $ac_n "(cached) $ac_c" 1>&6
4619 else
4620   if test -n "$DLLTOOL"; then
4621   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4622 else
4623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4624   ac_dummy="$PATH"
4625   for ac_dir in $ac_dummy; do
4626     test -z "$ac_dir" && ac_dir=.
4627     if test -f $ac_dir/$ac_word; then
4628       ac_cv_prog_DLLTOOL="dlltool"
4629       break
4630     fi
4631   done
4632   IFS="$ac_save_ifs"
4633   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4634 fi
4635 fi
4636 DLLTOOL="$ac_cv_prog_DLLTOOL"
4637 if test -n "$DLLTOOL"; then
4638   echo "$ac_t""$DLLTOOL" 1>&6
4639 else
4640   echo "$ac_t""no" 1>&6
4641 fi
4642
4643 else
4644   DLLTOOL="false"
4645 fi
4646 fi
4647
4648   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4649 set dummy ${ac_tool_prefix}as; 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_AS+set}\" = set"; then
4653   echo $ac_n "(cached) $ac_c" 1>&6
4654 else
4655   if test -n "$AS"; then
4656   ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
4664       break
4665     fi
4666   done
4667   IFS="$ac_save_ifs"
4668 fi
4669 fi
4670 AS="$ac_cv_prog_AS"
4671 if test -n "$AS"; then
4672   echo "$ac_t""$AS" 1>&6
4673 else
4674   echo "$ac_t""no" 1>&6
4675 fi
4676
4677
4678 if test -z "$ac_cv_prog_AS"; then
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "as", so it can be a program name with args.
4681 set dummy as; ac_word=$2
4682 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4683 echo "configure:4684: checking for $ac_word" >&5
4684 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4685   echo $ac_n "(cached) $ac_c" 1>&6
4686 else
4687   if test -n "$AS"; then
4688   ac_cv_prog_AS="$AS" # Let the user override the test.
4689 else
4690   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4691   ac_dummy="$PATH"
4692   for ac_dir in $ac_dummy; do
4693     test -z "$ac_dir" && ac_dir=.
4694     if test -f $ac_dir/$ac_word; then
4695       ac_cv_prog_AS="as"
4696       break
4697     fi
4698   done
4699   IFS="$ac_save_ifs"
4700   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4701 fi
4702 fi
4703 AS="$ac_cv_prog_AS"
4704 if test -n "$AS"; then
4705   echo "$ac_t""$AS" 1>&6
4706 else
4707   echo "$ac_t""no" 1>&6
4708 fi
4709
4710 else
4711   AS="false"
4712 fi
4713 fi
4714
4715   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4716 set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+set}\" = set"; then
4720   echo $ac_n "(cached) $ac_c" 1>&6
4721 else
4722   if test -n "$OBJDUMP"; then
4723   ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
4731       break
4732     fi
4733   done
4734   IFS="$ac_save_ifs"
4735 fi
4736 fi
4737 OBJDUMP="$ac_cv_prog_OBJDUMP"
4738 if test -n "$OBJDUMP"; then
4739   echo "$ac_t""$OBJDUMP" 1>&6
4740 else
4741   echo "$ac_t""no" 1>&6
4742 fi
4743
4744
4745 if test -z "$ac_cv_prog_OBJDUMP"; then
4746 if test -n "$ac_tool_prefix"; then
4747   # Extract the first word of "objdump", so it can be a program name with args.
4748 set dummy objdump; ac_word=$2
4749 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4750 echo "configure:4751: checking for $ac_word" >&5
4751 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4752   echo $ac_n "(cached) $ac_c" 1>&6
4753 else
4754   if test -n "$OBJDUMP"; then
4755   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4756 else
4757   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4758   ac_dummy="$PATH"
4759   for ac_dir in $ac_dummy; do
4760     test -z "$ac_dir" && ac_dir=.
4761     if test -f $ac_dir/$ac_word; then
4762       ac_cv_prog_OBJDUMP="objdump"
4763       break
4764     fi
4765   done
4766   IFS="$ac_save_ifs"
4767   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4768 fi
4769 fi
4770 OBJDUMP="$ac_cv_prog_OBJDUMP"
4771 if test -n "$OBJDUMP"; then
4772   echo "$ac_t""$OBJDUMP" 1>&6
4773 else
4774   echo "$ac_t""no" 1>&6
4775 fi
4776
4777 else
4778   OBJDUMP="false"
4779 fi
4780 fi
4781
4782
4783   # recent cygwin and mingw systems supply a stub DllMain which the user
4784   # can override, but on older systems we have to supply one
4785   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4786 echo "configure:4787: checking if libtool should supply DllMain function" >&5
4787 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4788   echo $ac_n "(cached) $ac_c" 1>&6
4789 else
4790   cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4793
4794 int main() {
4795 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4796       DllMain (0, 0, 0);
4797 ; return 0; }
4798 EOF
4799 if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4800   rm -rf conftest*
4801   lt_cv_need_dllmain=no
4802 else
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805   rm -rf conftest*
4806   lt_cv_need_dllmain=yes
4807 fi
4808 rm -f conftest*
4809 fi
4810
4811 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4812
4813   case $host/$CC in
4814   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4815     # old mingw systems require "-dll" to link a DLL, while more recent ones
4816     # require "-mdll"
4817     SAVE_CFLAGS="$CFLAGS"
4818     CFLAGS="$CFLAGS -mdll"
4819     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4820 echo "configure:4821: checking how to link DLLs" >&5
4821 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4822   echo $ac_n "(cached) $ac_c" 1>&6
4823 else
4824   cat > conftest.$ac_ext <<EOF
4825 #line 4826 "configure"
4826 #include "confdefs.h"
4827
4828 int main() {
4829
4830 ; return 0; }
4831 EOF
4832 if { (eval echo configure:4833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4833   rm -rf conftest*
4834   lt_cv_cc_dll_switch=-mdll
4835 else
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -rf conftest*
4839   lt_cv_cc_dll_switch=-dll
4840 fi
4841 rm -f conftest*
4842 fi
4843
4844 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4845     CFLAGS="$SAVE_CFLAGS" ;;
4846   *-*-cygwin* | *-*-pw32*)
4847     # cygwin systems need to pass --dll to the linker, and not link
4848     # crt.o which will require a WinMain@16 definition.
4849     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4850   esac
4851   ;;
4852   
4853 esac
4854
4855 # Sed substitution that helps us do robust quoting.  It backslashifies
4856 # metacharacters that are still active within double-quoted strings.
4857 Xsed='sed -e s/^X//'
4858 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4859
4860 # Same as above, but do not quote variable references.
4861 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4862
4863 # Sed substitution to delay expansion of an escaped shell variable in a
4864 # double_quote_subst'ed string.
4865 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4866
4867 # Constants:
4868 rm="rm -f"
4869
4870 # Global variables:
4871 default_ofile=libtool
4872 can_build_shared=yes
4873
4874 # All known linkers require a `.a' archive for static linking (except M$VC,
4875 # which needs '.lib').
4876 libext=a
4877 ltmain="$ac_aux_dir/ltmain.sh"
4878 ofile="$default_ofile"
4879 with_gnu_ld="$lt_cv_prog_gnu_ld"
4880 need_locks="$enable_libtool_lock"
4881
4882 old_CC="$CC"
4883 old_CFLAGS="$CFLAGS"
4884
4885 # Set sane defaults for various variables
4886 test -z "$AR" && AR=ar
4887 test -z "$AR_FLAGS" && AR_FLAGS=cru
4888 test -z "$AS" && AS=as
4889 test -z "$CC" && CC=cc
4890 test -z "$DLLTOOL" && DLLTOOL=dlltool
4891 test -z "$LD" && LD=ld
4892 test -z "$LN_S" && LN_S="ln -s"
4893 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4894 test -z "$NM" && NM=nm
4895 test -z "$OBJDUMP" && OBJDUMP=objdump
4896 test -z "$RANLIB" && RANLIB=:
4897 test -z "$STRIP" && STRIP=:
4898 test -z "$ac_objext" && ac_objext=o
4899
4900 if test x"$host" != x"$build"; then
4901   ac_tool_prefix=${host_alias}-
4902 else
4903   ac_tool_prefix=
4904 fi
4905
4906 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4907 case $host_os in
4908 linux-gnu*) ;;
4909 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4910 esac
4911
4912 case $host_os in
4913 aix3*)
4914   # AIX sometimes has problems with the GCC collect2 program.  For some
4915   # reason, if we set the COLLECT_NAMES environment variable, the problems
4916   # vanish in a puff of smoke.
4917   if test "X${COLLECT_NAMES+set}" != Xset; then
4918     COLLECT_NAMES=
4919     export COLLECT_NAMES
4920   fi
4921   ;;
4922 esac
4923
4924 # Determine commands to create old-style static archives.
4925 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4926 old_postinstall_cmds='chmod 644 $oldlib'
4927 old_postuninstall_cmds=
4928
4929 if test -n "$RANLIB"; then
4930   case $host_os in
4931   openbsd*)
4932     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4933     ;;
4934   *)
4935     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4936     ;;
4937   esac
4938   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4939 fi
4940
4941 # Allow CC to be a program name with arguments.
4942 set dummy $CC
4943 compiler="$2"
4944
4945 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4946 echo "configure:4947: checking for objdir" >&5
4947 rm -f .libs 2>/dev/null
4948 mkdir .libs 2>/dev/null
4949 if test -d .libs; then
4950   objdir=.libs
4951 else
4952   # MS-DOS does not allow filenames that begin with a dot.
4953   objdir=_libs
4954 fi
4955 rmdir .libs 2>/dev/null
4956 echo "$ac_t""$objdir" 1>&6
4957
4958
4959 # Check whether --with-pic or --without-pic was given.
4960 if test "${with_pic+set}" = set; then
4961   withval="$with_pic"
4962   pic_mode="$withval"
4963 else
4964   pic_mode=default
4965 fi
4966
4967 test -z "$pic_mode" && pic_mode=default
4968
4969 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4970 # in isolation, and that seeing it set (from the cache) indicates that
4971 # the associated values are set (in the cache) correctly too.
4972 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4973 echo "configure:4974: checking for $compiler option to produce PIC" >&5
4974 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4975   echo $ac_n "(cached) $ac_c" 1>&6
4976 else
4977    lt_cv_prog_cc_pic=
4978   lt_cv_prog_cc_shlib=
4979   lt_cv_prog_cc_wl=
4980   lt_cv_prog_cc_static=
4981   lt_cv_prog_cc_no_builtin=
4982   lt_cv_prog_cc_can_build_shared=$can_build_shared
4983
4984   if test "$GCC" = yes; then
4985     lt_cv_prog_cc_wl='-Wl,'
4986     lt_cv_prog_cc_static='-static'
4987
4988     case $host_os in
4989     aix*)
4990       # Below there is a dirty hack to force normal static linking with -ldl
4991       # The problem is because libdl dynamically linked with both libc and
4992       # libC (AIX C++ library), which obviously doesn't included in libraries
4993       # list by gcc. This cause undefined symbols with -static flags.
4994       # This hack allows C programs to be linked with "-static -ldl", but
4995       # not sure about C++ programs.
4996       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4997       ;;
4998     amigaos*)
4999       # FIXME: we need at least 68020 code to build shared libraries, but
5000       # adding the `-m68020' flag to GCC prevents building anything better,
5001       # like `-m68040'.
5002       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5003       ;;
5004     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5005       # PIC is the default for these OSes.
5006       ;;
5007     darwin* | rhapsody*)
5008       # PIC is the default on this platform
5009       # Common symbols not allowed in MH_DYLIB files
5010       lt_cv_prog_cc_pic='-fno-common'
5011       ;;
5012     cygwin* | mingw* | pw32* | os2*)
5013       # This hack is so that the source file can tell whether it is being
5014       # built for inclusion in a dll (and should export symbols for example).
5015       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5016       ;;
5017     sysv4*MP*)
5018       if test -d /usr/nec; then
5019          lt_cv_prog_cc_pic=-Kconform_pic
5020       fi
5021       ;;
5022     *)
5023       lt_cv_prog_cc_pic='-fPIC'
5024       ;;
5025     esac
5026   else
5027     # PORTME Check for PIC flags for the system compiler.
5028     case $host_os in
5029     aix3* | aix4* | aix5*)
5030       lt_cv_prog_cc_wl='-Wl,'
5031       # All AIX code is PIC.
5032       if test "$host_cpu" = ia64; then
5033         # AIX 5 now supports IA64 processor
5034         lt_cv_prog_cc_static='-Bstatic'
5035       else
5036         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5037       fi
5038       ;;
5039
5040     hpux9* | hpux10* | hpux11*)
5041       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5042       lt_cv_prog_cc_wl='-Wl,'
5043       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5044       lt_cv_prog_cc_pic='+Z'
5045       ;;
5046
5047     irix5* | irix6*)
5048       lt_cv_prog_cc_wl='-Wl,'
5049       lt_cv_prog_cc_static='-non_shared'
5050       # PIC (with -KPIC) is the default.
5051       ;;
5052
5053     cygwin* | mingw* | pw32* | os2*)
5054       # This hack is so that the source file can tell whether it is being
5055       # built for inclusion in a dll (and should export symbols for example).
5056       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5057       ;;
5058
5059     newsos6)
5060       lt_cv_prog_cc_pic='-KPIC'
5061       lt_cv_prog_cc_static='-Bstatic'
5062       ;;
5063
5064     osf3* | osf4* | osf5*)
5065       # All OSF/1 code is PIC.
5066       lt_cv_prog_cc_wl='-Wl,'
5067       lt_cv_prog_cc_static='-non_shared'
5068       ;;
5069
5070     sco3.2v5*)
5071       lt_cv_prog_cc_pic='-Kpic'
5072       lt_cv_prog_cc_static='-dn'
5073       lt_cv_prog_cc_shlib='-belf'
5074       ;;
5075
5076     solaris*)
5077       lt_cv_prog_cc_pic='-KPIC'
5078       lt_cv_prog_cc_static='-Bstatic'
5079       lt_cv_prog_cc_wl='-Wl,'
5080       ;;
5081
5082     sunos4*)
5083       lt_cv_prog_cc_pic='-PIC'
5084       lt_cv_prog_cc_static='-Bstatic'
5085       lt_cv_prog_cc_wl='-Qoption ld '
5086       ;;
5087
5088     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5089       lt_cv_prog_cc_pic='-KPIC'
5090       lt_cv_prog_cc_static='-Bstatic'
5091       if test "x$host_vendor" = xsni; then
5092         lt_cv_prog_cc_wl='-LD'
5093       else
5094         lt_cv_prog_cc_wl='-Wl,'
5095       fi
5096       ;;
5097
5098     uts4*)
5099       lt_cv_prog_cc_pic='-pic'
5100       lt_cv_prog_cc_static='-Bstatic'
5101       ;;
5102
5103     sysv4*MP*)
5104       if test -d /usr/nec ;then
5105         lt_cv_prog_cc_pic='-Kconform_pic'
5106         lt_cv_prog_cc_static='-Bstatic'
5107       fi
5108       ;;
5109
5110     *)
5111       lt_cv_prog_cc_can_build_shared=no
5112       ;;
5113     esac
5114   fi
5115
5116 fi
5117
5118 if test -z "$lt_cv_prog_cc_pic"; then
5119   echo "$ac_t""none" 1>&6
5120 else
5121   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5122
5123   # Check to make sure the pic_flag actually works.
5124   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5125 echo "configure:5126: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5126   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5127   echo $ac_n "(cached) $ac_c" 1>&6
5128 else
5129       save_CFLAGS="$CFLAGS"
5130     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5131     cat > conftest.$ac_ext <<EOF
5132 #line 5133 "configure"
5133 #include "confdefs.h"
5134
5135 int main() {
5136
5137 ; return 0; }
5138 EOF
5139 if { (eval echo configure:5140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5140   rm -rf conftest*
5141         case $host_os in
5142       hpux9* | hpux10* | hpux11*)
5143         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5144         # they create non-PIC objects.  So, if there were any warnings, we
5145         # assume that PIC is not supported.
5146         if test -s conftest.err; then
5147           lt_cv_prog_cc_pic_works=no
5148         else
5149           lt_cv_prog_cc_pic_works=yes
5150         fi
5151         ;;
5152       *)
5153         lt_cv_prog_cc_pic_works=yes
5154         ;;
5155       esac
5156     
5157 else
5158   echo "configure: failed program was:" >&5
5159   cat conftest.$ac_ext >&5
5160   rm -rf conftest*
5161         lt_cv_prog_cc_pic_works=no
5162     
5163 fi
5164 rm -f conftest*
5165     CFLAGS="$save_CFLAGS"
5166   
5167 fi
5168
5169
5170   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5171     lt_cv_prog_cc_pic=
5172     lt_cv_prog_cc_can_build_shared=no
5173   else
5174     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5175   fi
5176
5177   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5178 fi
5179
5180 # Check for any special shared library compilation flags.
5181 if test -n "$lt_cv_prog_cc_shlib"; then
5182   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5183   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5184   else
5185    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5186     lt_cv_prog_cc_can_build_shared=no
5187   fi
5188 fi
5189
5190 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5191 echo "configure:5192: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5192 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5193   echo $ac_n "(cached) $ac_c" 1>&6
5194 else
5195     lt_cv_prog_cc_static_works=no
5196   save_LDFLAGS="$LDFLAGS"
5197   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5198   cat > conftest.$ac_ext <<EOF
5199 #line 5200 "configure"
5200 #include "confdefs.h"
5201
5202 int main() {
5203
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207   rm -rf conftest*
5208   lt_cv_prog_cc_static_works=yes
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212 fi
5213 rm -f conftest*
5214   LDFLAGS="$save_LDFLAGS"
5215
5216 fi
5217
5218
5219 # Belt *and* braces to stop my trousers falling down:
5220 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5221 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5222
5223 pic_flag="$lt_cv_prog_cc_pic"
5224 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5225 wl="$lt_cv_prog_cc_wl"
5226 link_static_flag="$lt_cv_prog_cc_static"
5227 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5228 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5229
5230
5231 # Check to see if options -o and -c are simultaneously supported by compiler
5232 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5233 echo "configure:5234: checking if $compiler supports -c -o file.$ac_objext" >&5
5234 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5235   echo $ac_n "(cached) $ac_c" 1>&6
5236 else
5237   
5238 $rm -r conftest 2>/dev/null
5239 mkdir conftest
5240 cd conftest
5241 echo "int some_variable = 0;" > conftest.$ac_ext
5242 mkdir out
5243 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5244 # that will create temporary files in the current directory regardless of
5245 # the output directory.  Thus, making CWD read-only will cause this test
5246 # to fail, enabling locking or at least warning the user not to do parallel
5247 # builds.
5248 chmod -w .
5249 save_CFLAGS="$CFLAGS"
5250 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5251 compiler_c_o=no
5252 if { (eval echo configure:5253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5253   # The compiler can only warn and ignore the option if not recognized
5254   # So say no if there are warnings
5255   if test -s out/conftest.err; then
5256     lt_cv_compiler_c_o=no
5257   else
5258     lt_cv_compiler_c_o=yes
5259   fi
5260 else
5261   # Append any errors to the config.log.
5262   cat out/conftest.err 1>&5
5263   lt_cv_compiler_c_o=no
5264 fi
5265 CFLAGS="$save_CFLAGS"
5266 chmod u+w .
5267 $rm conftest* out/*
5268 rmdir out
5269 cd ..
5270 rmdir conftest
5271 $rm -r conftest 2>/dev/null
5272
5273 fi
5274
5275 compiler_c_o=$lt_cv_compiler_c_o
5276 echo "$ac_t""$compiler_c_o" 1>&6
5277
5278 if test x"$compiler_c_o" = x"yes"; then
5279   # Check to see if we can write to a .lo
5280   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5281 echo "configure:5282: checking if $compiler supports -c -o file.lo" >&5
5282   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5283   echo $ac_n "(cached) $ac_c" 1>&6
5284 else
5285   
5286   lt_cv_compiler_o_lo=no
5287   save_CFLAGS="$CFLAGS"
5288   CFLAGS="$CFLAGS -c -o conftest.lo"
5289   save_objext="$ac_objext"
5290   ac_objext=lo
5291   cat > conftest.$ac_ext <<EOF
5292 #line 5293 "configure"
5293 #include "confdefs.h"
5294
5295 int main() {
5296 int some_variable = 0;
5297 ; return 0; }
5298 EOF
5299 if { (eval echo configure:5300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5300   rm -rf conftest*
5301       # The compiler can only warn and ignore the option if not recognized
5302     # So say no if there are warnings
5303     if test -s conftest.err; then
5304       lt_cv_compiler_o_lo=no
5305     else
5306       lt_cv_compiler_o_lo=yes
5307     fi
5308   
5309 else
5310   echo "configure: failed program was:" >&5
5311   cat conftest.$ac_ext >&5
5312 fi
5313 rm -f conftest*
5314   ac_objext="$save_objext"
5315   CFLAGS="$save_CFLAGS"
5316   
5317 fi
5318
5319   compiler_o_lo=$lt_cv_compiler_o_lo
5320   echo "$ac_t""$compiler_o_lo" 1>&6
5321 else
5322   compiler_o_lo=no
5323 fi
5324
5325 # Check to see if we can do hard links to lock some files if needed
5326 hard_links="nottested"
5327 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5328   # do not overwrite the value of need_locks provided by the user
5329   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5330 echo "configure:5331: checking if we can lock with hard links" >&5
5331   hard_links=yes
5332   $rm conftest*
5333   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5334   touch conftest.a
5335   ln conftest.a conftest.b 2>&5 || hard_links=no
5336   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5337   echo "$ac_t""$hard_links" 1>&6
5338   if test "$hard_links" = no; then
5339     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5340     need_locks=warn
5341   fi
5342 else
5343   need_locks=no
5344 fi
5345
5346 if test "$GCC" = yes; then
5347   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5348   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5349 echo "configure:5350: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5350   echo "int some_variable = 0;" > conftest.$ac_ext
5351   save_CFLAGS="$CFLAGS"
5352   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5353   compiler_rtti_exceptions=no
5354   cat > conftest.$ac_ext <<EOF
5355 #line 5356 "configure"
5356 #include "confdefs.h"
5357
5358 int main() {
5359 int some_variable = 0;
5360 ; return 0; }
5361 EOF
5362 if { (eval echo configure:5363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5363   rm -rf conftest*
5364       # The compiler can only warn and ignore the option if not recognized
5365     # So say no if there are warnings
5366     if test -s conftest.err; then
5367       compiler_rtti_exceptions=no
5368     else
5369       compiler_rtti_exceptions=yes
5370     fi
5371   
5372 else
5373   echo "configure: failed program was:" >&5
5374   cat conftest.$ac_ext >&5
5375 fi
5376 rm -f conftest*
5377   CFLAGS="$save_CFLAGS"
5378   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5379
5380   if test "$compiler_rtti_exceptions" = "yes"; then
5381     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5382   else
5383     no_builtin_flag=' -fno-builtin'
5384   fi
5385 fi
5386
5387 # See if the linker supports building shared libraries.
5388 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5389 echo "configure:5390: checking whether the linker ($LD) supports shared libraries" >&5
5390
5391 allow_undefined_flag=
5392 no_undefined_flag=
5393 need_lib_prefix=unknown
5394 need_version=unknown
5395 # when you set need_version to no, make sure it does not cause -set_version
5396 # flags to be left without arguments
5397 archive_cmds=
5398 archive_expsym_cmds=
5399 old_archive_from_new_cmds=
5400 old_archive_from_expsyms_cmds=
5401 export_dynamic_flag_spec=
5402 whole_archive_flag_spec=
5403 thread_safe_flag_spec=
5404 hardcode_into_libs=no
5405 hardcode_libdir_flag_spec=
5406 hardcode_libdir_separator=
5407 hardcode_direct=no
5408 hardcode_minus_L=no
5409 hardcode_shlibpath_var=unsupported
5410 runpath_var=
5411 link_all_deplibs=unknown
5412 always_export_symbols=no
5413 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5414 # include_expsyms should be a list of space-separated symbols to be *always*
5415 # included in the symbol list
5416 include_expsyms=
5417 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5418 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5419 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5420 # as well as any symbol that contains `d'.
5421 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5422 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5423 # platforms (ab)use it in PIC code, but their linkers get confused if
5424 # the symbol is explicitly referenced.  Since portable code cannot
5425 # rely on this symbol name, it's probably fine to never include it in
5426 # preloaded symbol tables.
5427 extract_expsyms_cmds=
5428
5429 case $host_os in
5430 cygwin* | mingw* | pw32*)
5431   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5432   # When not using gcc, we currently assume that we are using
5433   # Microsoft Visual C++.
5434   if test "$GCC" != yes; then
5435     with_gnu_ld=no
5436   fi
5437   ;;
5438 openbsd*)
5439   with_gnu_ld=no
5440   ;;
5441 esac
5442
5443 ld_shlibs=yes
5444 if test "$with_gnu_ld" = yes; then
5445   # If archive_cmds runs LD, not CC, wlarc should be empty
5446   wlarc='${wl}'
5447
5448   # See if GNU ld supports shared libraries.
5449   case $host_os in
5450   aix3* | aix4* | aix5*)
5451     # On AIX, the GNU linker is very broken
5452     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5453     ld_shlibs=no
5454     cat <<EOF 1>&2
5455
5456 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5457 *** to be unable to reliably create shared libraries on AIX.
5458 *** Therefore, libtool is disabling shared libraries support.  If you
5459 *** really care for shared libraries, you may want to modify your PATH
5460 *** so that a non-GNU linker is found, and then restart.
5461
5462 EOF
5463     ;;
5464
5465   amigaos*)
5466     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)'
5467     hardcode_libdir_flag_spec='-L$libdir'
5468     hardcode_minus_L=yes
5469
5470     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5471     # that the semantics of dynamic libraries on AmigaOS, at least up
5472     # to version 4, is to share data among multiple programs linked
5473     # with the same dynamic library.  Since this doesn't match the
5474     # behavior of shared libraries on other platforms, we can use
5475     # them.
5476     ld_shlibs=no
5477     ;;
5478
5479   beos*)
5480     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5481       allow_undefined_flag=unsupported
5482       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5483       # support --undefined.  This deserves some investigation.  FIXME
5484       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5485     else
5486       ld_shlibs=no
5487     fi
5488     ;;
5489
5490   cygwin* | mingw* | pw32*)
5491     # hardcode_libdir_flag_spec is actually meaningless, as there is
5492     # no search path for DLLs.
5493     hardcode_libdir_flag_spec='-L$libdir'
5494     allow_undefined_flag=unsupported
5495     always_export_symbols=yes
5496
5497     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5498       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5499       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5500       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5501       else $CC -o impgen impgen.c ; fi)~
5502       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5503
5504     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5505
5506     # cygwin and mingw dlls have different entry points and sets of symbols
5507     # to exclude.
5508     # FIXME: what about values for MSVC?
5509     dll_entry=__cygwin_dll_entry@12
5510     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5511     case $host_os in
5512     mingw*)
5513       # mingw values
5514       dll_entry=_DllMainCRTStartup@12
5515       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5516       ;;
5517     esac
5518
5519     # mingw and cygwin differ, and it's simplest to just exclude the union
5520     # of the two symbol sets.
5521     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5522
5523     # recent cygwin and mingw systems supply a stub DllMain which the user
5524     # can override, but on older systems we have to supply one (in ltdll.c)
5525     if test "x$lt_cv_need_dllmain" = "xyes"; then
5526       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5527       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~
5528         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5529     else
5530       ltdll_obj=
5531       ltdll_cmds=
5532     fi
5533
5534     # Extract the symbol export list from an `--export-all' def file,
5535     # then regenerate the def file from the symbol export list, so that
5536     # the compiled dll only exports the symbol export list.
5537     # Be careful not to strip the DATA tag left be newer dlltools.
5538     export_symbols_cmds="$ltdll_cmds"'
5539       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5540       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5541
5542     # If the export-symbols file already is a .def file (1st line
5543     # is EXPORTS), use it as is.
5544     # If DATA tags from a recent dlltool are present, honour them!
5545     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5546         cp $export_symbols $output_objdir/$soname-def;
5547       else
5548         echo EXPORTS > $output_objdir/$soname-def;
5549         _lt_hint=1;
5550         cat $export_symbols | while read symbol; do
5551          set dummy \$symbol;
5552          case \$# in
5553            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5554            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5555          esac;
5556          _lt_hint=`expr 1 + \$_lt_hint`;
5557         done;
5558       fi~
5559       '"$ltdll_cmds"'
5560       $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~
5561       $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~
5562       $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~
5563       $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~
5564       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5565     ;;
5566
5567   netbsd*)
5568     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5569       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5570       wlarc=
5571     else
5572       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5573       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5574     fi
5575     ;;
5576
5577   solaris* | sysv5*)
5578     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5579       ld_shlibs=no
5580       cat <<EOF 1>&2
5581
5582 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5583 *** create shared libraries on Solaris systems.  Therefore, libtool
5584 *** is disabling shared libraries support.  We urge you to upgrade GNU
5585 *** binutils to release 2.9.1 or newer.  Another option is to modify
5586 *** your PATH or compiler configuration so that the native linker is
5587 *** used, and then restart.
5588
5589 EOF
5590     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5591       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5592       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5593     else
5594       ld_shlibs=no
5595     fi
5596     ;;
5597
5598   sunos4*)
5599     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5600     wlarc=
5601     hardcode_direct=yes
5602     hardcode_shlibpath_var=no
5603     ;;
5604
5605   *)
5606     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5607       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5608       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5609     else
5610       ld_shlibs=no
5611     fi
5612     ;;
5613   esac
5614
5615   if test "$ld_shlibs" = yes; then
5616     runpath_var=LD_RUN_PATH
5617     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5618     export_dynamic_flag_spec='${wl}--export-dynamic'
5619     case $host_os in
5620     cygwin* | mingw* | pw32*)
5621       # dlltool doesn't understand --whole-archive et. al.
5622       whole_archive_flag_spec=
5623       ;;
5624     *)
5625       # ancient GNU ld didn't support --whole-archive et. al.
5626       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5627         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5628       else
5629         whole_archive_flag_spec=
5630       fi
5631       ;;
5632     esac
5633   fi
5634 else
5635   # PORTME fill in a description of your system's linker (not GNU ld)
5636   case $host_os in
5637   aix3*)
5638     allow_undefined_flag=unsupported
5639     always_export_symbols=yes
5640     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'
5641     # Note: this linker hardcodes the directories in LIBPATH if there
5642     # are no directories specified by -L.
5643     hardcode_minus_L=yes
5644     if test "$GCC" = yes && test -z "$link_static_flag"; then
5645       # Neither direct hardcoding nor static linking is supported with a
5646       # broken collect2.
5647       hardcode_direct=unsupported
5648     fi
5649     ;;
5650
5651   aix4* | aix5*)
5652     if test "$host_cpu" = ia64; then
5653       # On IA64, the linker does run time linking by default, so we don't
5654       # have to do anything special.
5655       aix_use_runtimelinking=no
5656       exp_sym_flag='-Bexport'
5657       no_entry_flag=""
5658     else
5659       aix_use_runtimelinking=no
5660
5661       # Test if we are trying to use run time linking or normal
5662       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5663       # need to do runtime linking.
5664       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5665         for ld_flag in $LDFLAGS; do
5666           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5667             aix_use_runtimelinking=yes
5668             break
5669           fi
5670         done
5671       esac
5672
5673       exp_sym_flag='-bexport'
5674       no_entry_flag='-bnoentry'
5675     fi
5676
5677     # When large executables or shared objects are built, AIX ld can
5678     # have problems creating the table of contents.  If linking a library
5679     # or program results in "error TOC overflow" add -mminimal-toc to
5680     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5681     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5682
5683     hardcode_direct=yes
5684     archive_cmds=''
5685     hardcode_libdir_separator=':'
5686     if test "$GCC" = yes; then
5687       case $host_os in aix4.[012]|aix4.[012].*)
5688         collect2name=`${CC} -print-prog-name=collect2`
5689         if test -f "$collect2name" && \
5690           strings "$collect2name" | grep resolve_lib_name >/dev/null
5691         then
5692           # We have reworked collect2
5693           hardcode_direct=yes
5694         else
5695           # We have old collect2
5696           hardcode_direct=unsupported
5697           # It fails to find uninstalled libraries when the uninstalled
5698           # path is not listed in the libpath.  Setting hardcode_minus_L
5699           # to unsupported forces relinking
5700           hardcode_minus_L=yes
5701           hardcode_libdir_flag_spec='-L$libdir'
5702           hardcode_libdir_separator=
5703         fi
5704       esac
5705
5706       shared_flag='-shared'
5707     else
5708       # not using gcc
5709       if test "$host_cpu" = ia64; then
5710         shared_flag='${wl}-G'
5711       else
5712         if test "$aix_use_runtimelinking" = yes; then
5713           shared_flag='${wl}-G'
5714         else
5715           shared_flag='${wl}-bM:SRE'
5716         fi
5717       fi
5718     fi
5719
5720     # It seems that -bexpall can do strange things, so it is better to
5721     # generate a list of symbols to export.
5722     always_export_symbols=yes
5723     if test "$aix_use_runtimelinking" = yes; then
5724       # Warning - without using the other runtime loading flags (-brtl),
5725       # -berok will link without error, but may produce a broken library.
5726       allow_undefined_flag='-berok'
5727       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5728       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"
5729     else
5730       if test "$host_cpu" = ia64; then
5731         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5732         allow_undefined_flag="-z nodefs"
5733         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"
5734       else
5735         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5736         # Warning - without using the other run time loading flags,
5737         # -berok will link without error, but may produce a broken library.
5738         allow_undefined_flag='${wl}-berok'
5739         # This is a bit strange, but is similar to how AIX traditionally builds
5740         # it's shared libraries.
5741         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'
5742       fi
5743     fi
5744     ;;
5745
5746   amigaos*)
5747     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)'
5748     hardcode_libdir_flag_spec='-L$libdir'
5749     hardcode_minus_L=yes
5750     # see comment about different semantics on the GNU ld section
5751     ld_shlibs=no
5752     ;;
5753
5754   cygwin* | mingw* | pw32*)
5755     # When not using gcc, we currently assume that we are using
5756     # Microsoft Visual C++.
5757     # hardcode_libdir_flag_spec is actually meaningless, as there is
5758     # no search path for DLLs.
5759     hardcode_libdir_flag_spec=' '
5760     allow_undefined_flag=unsupported
5761     # Tell ltmain to make .lib files, not .a files.
5762     libext=lib
5763     # FIXME: Setting linknames here is a bad hack.
5764     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5765     # The linker will automatically build a .lib file if we build a DLL.
5766     old_archive_from_new_cmds='true'
5767     # FIXME: Should let the user specify the lib program.
5768     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5769     fix_srcfile_path='`cygpath -w "$srcfile"`'
5770     ;;
5771
5772   darwin* | rhapsody*)
5773     case "$host_os" in
5774     rhapsody* | darwin1.[012])
5775       allow_undefined_flag='-undefined suppress'
5776       ;;
5777     *) # Darwin 1.3 on
5778       allow_undefined_flag='-flat_namespace -undefined suppress'
5779       ;;
5780     esac
5781     # FIXME: Relying on posixy $() will cause problems for
5782     #        cross-compilation, but unfortunately the echo tests do not
5783     #        yet detect zsh echo's removal of \ escapes.
5784     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'
5785     # We need to add '_' to the symbols in $export_symbols first
5786     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5787     hardcode_direct=yes
5788     hardcode_shlibpath_var=no
5789     whole_archive_flag_spec='-all_load $convenience'
5790     ;;
5791
5792   freebsd1*)
5793     ld_shlibs=no
5794     ;;
5795
5796   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5797   # support.  Future versions do this automatically, but an explicit c++rt0.o
5798   # does not break anything, and helps significantly (at the cost of a little
5799   # extra space).
5800   freebsd2.2*)
5801     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5802     hardcode_libdir_flag_spec='-R$libdir'
5803     hardcode_direct=yes
5804     hardcode_shlibpath_var=no
5805     ;;
5806
5807   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5808   freebsd2*)
5809     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5810     hardcode_direct=yes
5811     hardcode_minus_L=yes
5812     hardcode_shlibpath_var=no
5813     ;;
5814
5815   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5816   freebsd*)
5817     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5818     hardcode_libdir_flag_spec='-R$libdir'
5819     hardcode_direct=yes
5820     hardcode_shlibpath_var=no
5821     ;;
5822
5823   hpux9* | hpux10* | hpux11*)
5824     case $host_os in
5825     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' ;;
5826     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5827     esac
5828     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5829     hardcode_libdir_separator=:
5830     hardcode_direct=yes
5831     hardcode_minus_L=yes # Not in the search PATH, but as the default
5832                          # location of the library.
5833     export_dynamic_flag_spec='${wl}-E'
5834     ;;
5835
5836   irix5* | irix6*)
5837     if test "$GCC" = yes; then
5838       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'
5839     else
5840       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'
5841     fi
5842     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5843     hardcode_libdir_separator=:
5844     link_all_deplibs=yes
5845     ;;
5846
5847   netbsd*)
5848     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5849       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5850     else
5851       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5852     fi
5853     hardcode_libdir_flag_spec='-R$libdir'
5854     hardcode_direct=yes
5855     hardcode_shlibpath_var=no
5856     ;;
5857
5858   newsos6)
5859     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5860     hardcode_direct=yes
5861     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5862     hardcode_libdir_separator=:
5863     hardcode_shlibpath_var=no
5864     ;;
5865
5866   openbsd*)
5867     hardcode_direct=yes
5868     hardcode_shlibpath_var=no
5869     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5870       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5871       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5872       export_dynamic_flag_spec='${wl}-E'
5873     else
5874       case "$host_os" in
5875       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5876         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5877         hardcode_libdir_flag_spec='-R$libdir'
5878         ;;
5879       *)
5880         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5881         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5882         ;;
5883       esac
5884     fi
5885     ;;
5886
5887   os2*)
5888     hardcode_libdir_flag_spec='-L$libdir'
5889     hardcode_minus_L=yes
5890     allow_undefined_flag=unsupported
5891     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'
5892     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5893     ;;
5894
5895   osf3*)
5896     if test "$GCC" = yes; then
5897       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5898       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'
5899     else
5900       allow_undefined_flag=' -expect_unresolved \*'
5901       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'
5902     fi
5903     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5904     hardcode_libdir_separator=:
5905     ;;
5906
5907   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5908     if test "$GCC" = yes; then
5909       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5910       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'
5911       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5912     else
5913       allow_undefined_flag=' -expect_unresolved \*'
5914       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'
5915       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5916       $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'
5917
5918       #Both c and cxx compiler support -rpath directly
5919       hardcode_libdir_flag_spec='-rpath $libdir'
5920     fi
5921     hardcode_libdir_separator=:
5922     ;;
5923
5924   sco3.2v5*)
5925     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5926     hardcode_shlibpath_var=no
5927     runpath_var=LD_RUN_PATH
5928     hardcode_runpath_var=yes
5929     export_dynamic_flag_spec='${wl}-Bexport'
5930     ;;
5931
5932   solaris*)
5933     # gcc --version < 3.0 without binutils cannot create self contained
5934     # shared libraries reliably, requiring libgcc.a to resolve some of
5935     # the object symbols generated in some cases.  Libraries that use
5936     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5937     # a copy of libgcc.a into every shared library to guarantee resolving
5938     # such symbols causes other problems:  According to Tim Van Holder
5939     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5940     # (to the application) exception stack for one thing.
5941     no_undefined_flag=' -z defs'
5942     if test "$GCC" = yes; then
5943       case `$CC --version 2>/dev/null` in
5944       [12].*)
5945         cat <<EOF 1>&2
5946
5947 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5948 *** create self contained shared libraries on Solaris systems, without
5949 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5950 *** -no-undefined support, which will at least allow you to build shared
5951 *** libraries.  However, you may find that when you link such libraries
5952 *** into an application without using GCC, you have to manually add
5953 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5954 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5955 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5956
5957 EOF
5958         no_undefined_flag=
5959         ;;
5960       esac
5961     fi
5962     # $CC -shared without GNU ld will not create a library from C++
5963     # object files and a static libstdc++, better avoid it by now
5964     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5965     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5966                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5967     hardcode_libdir_flag_spec='-R$libdir'
5968     hardcode_shlibpath_var=no
5969     case $host_os in
5970     solaris2.[0-5] | solaris2.[0-5].*) ;;
5971     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5972       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5973     esac
5974     link_all_deplibs=yes
5975     ;;
5976
5977   sunos4*)
5978     if test "x$host_vendor" = xsequent; then
5979       # Use $CC to link under sequent, because it throws in some extra .o
5980       # files that make .init and .fini sections work.
5981       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5982     else
5983       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5984     fi
5985     hardcode_libdir_flag_spec='-L$libdir'
5986     hardcode_direct=yes
5987     hardcode_minus_L=yes
5988     hardcode_shlibpath_var=no
5989     ;;
5990
5991   sysv4)
5992     if test "x$host_vendor" = xsno; then
5993       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5994       hardcode_direct=yes # is this really true???
5995     else
5996       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5997       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5998     fi
5999     runpath_var='LD_RUN_PATH'
6000     hardcode_shlibpath_var=no
6001     ;;
6002
6003   sysv4.3*)
6004     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6005     hardcode_shlibpath_var=no
6006     export_dynamic_flag_spec='-Bexport'
6007     ;;
6008
6009   sysv5*)
6010     no_undefined_flag=' -z text'
6011     # $CC -shared without GNU ld will not create a library from C++
6012     # object files and a static libstdc++, better avoid it by now
6013     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6014     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6015                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6016     hardcode_libdir_flag_spec=
6017     hardcode_shlibpath_var=no
6018     runpath_var='LD_RUN_PATH'
6019     ;;
6020
6021   uts4*)
6022     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6023     hardcode_libdir_flag_spec='-L$libdir'
6024     hardcode_shlibpath_var=no
6025     ;;
6026
6027   dgux*)
6028     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6029     hardcode_libdir_flag_spec='-L$libdir'
6030     hardcode_shlibpath_var=no
6031     ;;
6032
6033   sysv4*MP*)
6034     if test -d /usr/nec; then
6035       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6036       hardcode_shlibpath_var=no
6037       runpath_var=LD_RUN_PATH
6038       hardcode_runpath_var=yes
6039       ld_shlibs=yes
6040     fi
6041     ;;
6042
6043   sysv4.2uw2*)
6044     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6045     hardcode_direct=yes
6046     hardcode_minus_L=no
6047     hardcode_shlibpath_var=no
6048     hardcode_runpath_var=yes
6049     runpath_var=LD_RUN_PATH
6050     ;;
6051
6052   sysv5uw7* | unixware7*)
6053     no_undefined_flag='${wl}-z ${wl}text'
6054     if test "$GCC" = yes; then
6055       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6056     else
6057       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6058     fi
6059     runpath_var='LD_RUN_PATH'
6060     hardcode_shlibpath_var=no
6061     ;;
6062
6063   *)
6064     ld_shlibs=no
6065     ;;
6066   esac
6067 fi
6068 echo "$ac_t""$ld_shlibs" 1>&6
6069 test "$ld_shlibs" = no && can_build_shared=no
6070
6071 # Check hardcoding attributes.
6072 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6073 echo "configure:6074: checking how to hardcode library paths into programs" >&5
6074 hardcode_action=
6075 if test -n "$hardcode_libdir_flag_spec" || \
6076    test -n "$runpath_var"; then
6077
6078   # We can hardcode non-existant directories.
6079   if test "$hardcode_direct" != no &&
6080      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6081      # have to relink, otherwise we might link with an installed library
6082      # when we should be linking with a yet-to-be-installed one
6083      ## test "$hardcode_shlibpath_var" != no &&
6084      test "$hardcode_minus_L" != no; then
6085     # Linking always hardcodes the temporary library directory.
6086     hardcode_action=relink
6087   else
6088     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6089     hardcode_action=immediate
6090   fi
6091 else
6092   # We cannot hardcode anything, or else we can only hardcode existing
6093   # directories.
6094   hardcode_action=unsupported
6095 fi
6096 echo "$ac_t""$hardcode_action" 1>&6
6097
6098 striplib=
6099 old_striplib=
6100 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6101 echo "configure:6102: checking whether stripping libraries is possible" >&5
6102 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6103   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6104   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6105   echo "$ac_t""yes" 1>&6
6106 else
6107   echo "$ac_t""no" 1>&6
6108 fi
6109
6110 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6111 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6112
6113 # PORTME Fill in your ld.so characteristics
6114 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6115 echo "configure:6116: checking dynamic linker characteristics" >&5
6116 library_names_spec=
6117 libname_spec='lib$name'
6118 soname_spec=
6119 postinstall_cmds=
6120 postuninstall_cmds=
6121 finish_cmds=
6122 finish_eval=
6123 shlibpath_var=
6124 shlibpath_overrides_runpath=unknown
6125 version_type=none
6126 dynamic_linker="$host_os ld.so"
6127 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6128 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6129
6130 case $host_os in
6131 aix3*)
6132   version_type=linux
6133   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6134   shlibpath_var=LIBPATH
6135
6136   # AIX has no versioning support, so we append a major version to the name.
6137   soname_spec='${libname}${release}.so$major'
6138   ;;
6139
6140 aix4* | aix5*)
6141   version_type=linux
6142   if test "$host_cpu" = ia64; then
6143     # AIX 5 supports IA64
6144     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6145     shlibpath_var=LD_LIBRARY_PATH
6146   else
6147     # With GCC up to 2.95.x, collect2 would create an import file
6148     # for dependence libraries.  The import file would start with
6149     # the line `#! .'.  This would cause the generated library to
6150     # depend on `.', always an invalid library.  This was fixed in
6151     # development snapshots of GCC prior to 3.0.
6152     case $host_os in
6153       aix4 | aix4.[01] | aix4.[01].*)
6154         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6155              echo ' yes '
6156              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6157           :
6158         else
6159           can_build_shared=no
6160         fi
6161         ;;
6162     esac
6163     # AIX (on Power*) has no versioning support, so currently we can
6164     # not hardcode correct soname into executable. Probably we can
6165     # add versioning support to collect2, so additional links can
6166     # be useful in future.
6167     if test "$aix_use_runtimelinking" = yes; then
6168       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6169       # instead of lib<name>.a to let people know that these are not
6170       # typical AIX shared libraries.
6171       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6172     else
6173       # We preserve .a as extension for shared libraries through AIX4.2
6174       # and later when we are not doing run time linking.
6175       library_names_spec='${libname}${release}.a $libname.a'
6176       soname_spec='${libname}${release}.so$major'
6177     fi
6178     shlibpath_var=LIBPATH
6179   fi
6180   ;;
6181
6182 amigaos*)
6183   library_names_spec='$libname.ixlibrary $libname.a'
6184   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6185   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'
6186   ;;
6187
6188 beos*)
6189   library_names_spec='${libname}.so'
6190   dynamic_linker="$host_os ld.so"
6191   shlibpath_var=LIBRARY_PATH
6192   ;;
6193
6194 bsdi4*)
6195   version_type=linux
6196   need_version=no
6197   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6198   soname_spec='${libname}${release}.so$major'
6199   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6200   shlibpath_var=LD_LIBRARY_PATH
6201   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6202   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6203   export_dynamic_flag_spec=-rdynamic
6204   # the default ld.so.conf also contains /usr/contrib/lib and
6205   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6206   # libtool to hard-code these into programs
6207   ;;
6208
6209 cygwin* | mingw* | pw32*)
6210   version_type=windows
6211   need_version=no
6212   need_lib_prefix=no
6213   case $GCC,$host_os in
6214   yes,cygwin*)
6215     library_names_spec='$libname.dll.a'
6216     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6217     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6218       dldir=$destdir/`dirname \$dlpath`~
6219       test -d \$dldir || mkdir -p \$dldir~
6220       $install_prog .libs/$dlname \$dldir/$dlname'
6221     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6222       dlpath=$dir/\$dldll~
6223        $rm \$dlpath'
6224     ;;
6225   yes,mingw*)
6226     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6227     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6228     ;;
6229   yes,pw32*)
6230     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6231     ;;
6232   *)
6233     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6234     ;;
6235   esac
6236   dynamic_linker='Win32 ld.exe'
6237   # FIXME: first we should search . and the directory the executable is in
6238   shlibpath_var=PATH
6239   ;;
6240
6241 darwin* | rhapsody*)
6242   dynamic_linker="$host_os dyld"
6243   version_type=darwin
6244   need_lib_prefix=no
6245   need_version=no
6246   # FIXME: Relying on posixy $() will cause problems for
6247   #        cross-compilation, but unfortunately the echo tests do not
6248   #        yet detect zsh echo's removal of \ escapes.
6249   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)'
6250   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6251   shlibpath_overrides_runpath=yes
6252   shlibpath_var=DYLD_LIBRARY_PATH
6253   ;;
6254
6255 freebsd1*)
6256   dynamic_linker=no
6257   ;;
6258
6259 freebsd*)
6260   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6261   version_type=freebsd-$objformat
6262   case $version_type in
6263     freebsd-elf*)
6264       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6265       need_version=no
6266       need_lib_prefix=no
6267       ;;
6268     freebsd-*)
6269       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6270       need_version=yes
6271       ;;
6272   esac
6273   shlibpath_var=LD_LIBRARY_PATH
6274   case $host_os in
6275   freebsd2*)
6276     shlibpath_overrides_runpath=yes
6277     ;;
6278   *)
6279     shlibpath_overrides_runpath=no
6280     hardcode_into_libs=yes
6281     ;;
6282   esac
6283   ;;
6284
6285 gnu*)
6286   version_type=linux
6287   need_lib_prefix=no
6288   need_version=no
6289   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6290   soname_spec='${libname}${release}.so$major'
6291   shlibpath_var=LD_LIBRARY_PATH
6292   hardcode_into_libs=yes
6293   ;;
6294
6295 hpux9* | hpux10* | hpux11*)
6296   # Give a soname corresponding to the major version so that dld.sl refuses to
6297   # link against other versions.
6298   dynamic_linker="$host_os dld.sl"
6299   version_type=sunos
6300   need_lib_prefix=no
6301   need_version=no
6302   shlibpath_var=SHLIB_PATH
6303   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6304   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6305   soname_spec='${libname}${release}.sl$major'
6306   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6307   postinstall_cmds='chmod 555 $lib'
6308   ;;
6309
6310 irix5* | irix6*)
6311   version_type=irix
6312   need_lib_prefix=no
6313   need_version=no
6314   soname_spec='${libname}${release}.so$major'
6315   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6316   case $host_os in
6317   irix5*)
6318     libsuff= shlibsuff=
6319     ;;
6320   *)
6321     case $LD in # libtool.m4 will add one of these switches to LD
6322     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6323     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6324     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6325     *) libsuff= shlibsuff= libmagic=never-match;;
6326     esac
6327     ;;
6328   esac
6329   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6330   shlibpath_overrides_runpath=no
6331   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6332   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6333   ;;
6334
6335 # No shared lib support for Linux oldld, aout, or coff.
6336 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6337   dynamic_linker=no
6338   ;;
6339
6340 # This must be Linux ELF.
6341 linux-gnu*)
6342   version_type=linux
6343   need_lib_prefix=no
6344   need_version=no
6345   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6346   soname_spec='${libname}${release}.so$major'
6347   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6348   shlibpath_var=LD_LIBRARY_PATH
6349   shlibpath_overrides_runpath=no
6350   # This implies no fast_install, which is unacceptable.
6351   # Some rework will be needed to allow for fast_install
6352   # before this can be enabled.
6353   hardcode_into_libs=yes
6354
6355   # We used to test for /lib/ld.so.1 and disable shared libraries on
6356   # powerpc, because MkLinux only supported shared libraries with the
6357   # GNU dynamic linker.  Since this was broken with cross compilers,
6358   # most powerpc-linux boxes support dynamic linking these days and
6359   # people can always --disable-shared, the test was removed, and we
6360   # assume the GNU/Linux dynamic linker is in use.
6361   dynamic_linker='GNU/Linux ld.so'
6362   ;;
6363
6364 netbsd*)
6365   version_type=sunos
6366   need_lib_prefix=no
6367   need_version=no
6368   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6369     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6370     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6371     dynamic_linker='NetBSD (a.out) ld.so'
6372   else
6373     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6374     soname_spec='${libname}${release}.so$major'
6375     dynamic_linker='NetBSD ld.elf_so'
6376   fi
6377   shlibpath_var=LD_LIBRARY_PATH
6378   shlibpath_overrides_runpath=yes
6379   hardcode_into_libs=yes
6380   ;;
6381
6382 newsos6)
6383   version_type=linux
6384   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6385   shlibpath_var=LD_LIBRARY_PATH
6386   shlibpath_overrides_runpath=yes
6387   ;;
6388
6389 openbsd*)
6390   version_type=sunos
6391   need_lib_prefix=no
6392   need_version=no
6393   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6394     case "$host_os" in
6395     openbsd2.[89] | openbsd2.[89].*)
6396       shlibpath_overrides_runpath=no
6397       ;;
6398     *)
6399       shlibpath_overrides_runpath=yes
6400       ;;
6401     esac
6402   else
6403     shlibpath_overrides_runpath=yes
6404   fi
6405   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6406   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6407   shlibpath_var=LD_LIBRARY_PATH
6408   ;;
6409
6410 os2*)
6411   libname_spec='$name'
6412   need_lib_prefix=no
6413   library_names_spec='$libname.dll $libname.a'
6414   dynamic_linker='OS/2 ld.exe'
6415   shlibpath_var=LIBPATH
6416   ;;
6417
6418 osf3* | osf4* | osf5*)
6419   version_type=osf
6420   need_version=no
6421   soname_spec='${libname}${release}.so'
6422   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6423   shlibpath_var=LD_LIBRARY_PATH
6424   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6425   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6426   ;;
6427
6428 sco3.2v5*)
6429   version_type=osf
6430   soname_spec='${libname}${release}.so$major'
6431   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6432   shlibpath_var=LD_LIBRARY_PATH
6433   ;;
6434
6435 solaris*)
6436   version_type=linux
6437   need_lib_prefix=no
6438   need_version=no
6439   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6440   soname_spec='${libname}${release}.so$major'
6441   shlibpath_var=LD_LIBRARY_PATH
6442   shlibpath_overrides_runpath=yes
6443   hardcode_into_libs=yes
6444   # ldd complains unless libraries are executable
6445   postinstall_cmds='chmod +x $lib'
6446   ;;
6447
6448 sunos4*)
6449   version_type=sunos
6450   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6451   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6452   shlibpath_var=LD_LIBRARY_PATH
6453   shlibpath_overrides_runpath=yes
6454   if test "$with_gnu_ld" = yes; then
6455     need_lib_prefix=no
6456   fi
6457   need_version=yes
6458   ;;
6459
6460 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6461   version_type=linux
6462   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6463   soname_spec='${libname}${release}.so$major'
6464   shlibpath_var=LD_LIBRARY_PATH
6465   case $host_vendor in
6466     sni)
6467       shlibpath_overrides_runpath=no
6468       ;;
6469     motorola)
6470       need_lib_prefix=no
6471       need_version=no
6472       shlibpath_overrides_runpath=no
6473       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6474       ;;
6475   esac
6476   ;;
6477
6478 uts4*)
6479   version_type=linux
6480   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6481   soname_spec='${libname}${release}.so$major'
6482   shlibpath_var=LD_LIBRARY_PATH
6483   ;;
6484
6485 dgux*)
6486   version_type=linux
6487   need_lib_prefix=no
6488   need_version=no
6489   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6490   soname_spec='${libname}${release}.so$major'
6491   shlibpath_var=LD_LIBRARY_PATH
6492   ;;
6493
6494 sysv4*MP*)
6495   if test -d /usr/nec ;then
6496     version_type=linux
6497     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6498     soname_spec='$libname.so.$major'
6499     shlibpath_var=LD_LIBRARY_PATH
6500   fi
6501   ;;
6502
6503 *)
6504   dynamic_linker=no
6505   ;;
6506 esac
6507 echo "$ac_t""$dynamic_linker" 1>&6
6508 test "$dynamic_linker" = no && can_build_shared=no
6509
6510 # Report the final consequences.
6511 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6512 echo "configure:6513: checking if libtool supports shared libraries" >&5
6513 echo "$ac_t""$can_build_shared" 1>&6
6514
6515 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6516 echo "configure:6517: checking whether to build shared libraries" >&5
6517 test "$can_build_shared" = "no" && enable_shared=no
6518
6519 # On AIX, shared libraries and static libraries use the same namespace, and
6520 # are all built from PIC.
6521 case "$host_os" in
6522 aix3*)
6523   test "$enable_shared" = yes && enable_static=no
6524   if test -n "$RANLIB"; then
6525     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6526     postinstall_cmds='$RANLIB $lib'
6527   fi
6528   ;;
6529
6530 aix4*)
6531   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6532     test "$enable_shared" = yes && enable_static=no
6533   fi
6534   ;;
6535 esac
6536 echo "$ac_t""$enable_shared" 1>&6
6537
6538 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6539 echo "configure:6540: checking whether to build static libraries" >&5
6540 # Make sure either enable_shared or enable_static is yes.
6541 test "$enable_shared" = yes || enable_static=yes
6542 echo "$ac_t""$enable_static" 1>&6
6543
6544 if test "$hardcode_action" = relink; then
6545   # Fast installation is not supported
6546   enable_fast_install=no
6547 elif test "$shlibpath_overrides_runpath" = yes ||
6548      test "$enable_shared" = no; then
6549   # Fast installation is not necessary
6550   enable_fast_install=needless
6551 fi
6552
6553 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6554 if test "$GCC" = yes; then
6555   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6556 fi
6557
6558 if test "x$enable_dlopen" != xyes; then
6559   enable_dlopen=unknown
6560   enable_dlopen_self=unknown
6561   enable_dlopen_self_static=unknown
6562 else
6563   lt_cv_dlopen=no
6564   lt_cv_dlopen_libs=
6565
6566   case $host_os in
6567   beos*)
6568     lt_cv_dlopen="load_add_on"
6569     lt_cv_dlopen_libs=
6570     lt_cv_dlopen_self=yes
6571     ;;
6572
6573   cygwin* | mingw* | pw32*)
6574     lt_cv_dlopen="LoadLibrary"
6575     lt_cv_dlopen_libs=
6576    ;;
6577
6578   *)
6579     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6580 echo "configure:6581: checking for shl_load" >&5
6581 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6582   echo $ac_n "(cached) $ac_c" 1>&6
6583 else
6584   cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 /* System header to define __stub macros and hopefully few prototypes,
6588     which can conflict with char shl_load(); below.  */
6589 #include <assert.h>
6590 /* Override any gcc2 internal prototype to avoid an error.  */
6591 /* We use char because int might match the return type of a gcc2
6592     builtin and then its argument prototype would still apply.  */
6593 char shl_load();
6594 char (*f)();
6595
6596 int main() {
6597
6598 /* The GNU C library defines this for functions which it implements
6599     to always fail with ENOSYS.  Some functions are actually named
6600     something starting with __ and the normal name is an alias.  */
6601 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6602 choke me
6603 #else
6604 f = shl_load;
6605 #endif
6606
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   eval "ac_cv_func_shl_load=yes"
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   eval "ac_cv_func_shl_load=no"
6617 fi
6618 rm -f conftest*
6619 fi
6620
6621 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6622   echo "$ac_t""yes" 1>&6
6623   lt_cv_dlopen="shl_load"
6624 else
6625   echo "$ac_t""no" 1>&6
6626 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6627 echo "configure:6628: checking for shl_load in -ldld" >&5
6628 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6630   echo $ac_n "(cached) $ac_c" 1>&6
6631 else
6632   ac_save_LIBS="$LIBS"
6633 LIBS="-ldld  $LIBS"
6634 cat > conftest.$ac_ext <<EOF
6635 #line 6636 "configure"
6636 #include "confdefs.h"
6637 /* Override any gcc2 internal prototype to avoid an error.  */
6638 /* We use char because int might match the return type of a gcc2
6639     builtin and then its argument prototype would still apply.  */
6640 char shl_load();
6641
6642 int main() {
6643 shl_load()
6644 ; return 0; }
6645 EOF
6646 if { (eval echo configure:6647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6647   rm -rf conftest*
6648   eval "ac_cv_lib_$ac_lib_var=yes"
6649 else
6650   echo "configure: failed program was:" >&5
6651   cat conftest.$ac_ext >&5
6652   rm -rf conftest*
6653   eval "ac_cv_lib_$ac_lib_var=no"
6654 fi
6655 rm -f conftest*
6656 LIBS="$ac_save_LIBS"
6657
6658 fi
6659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6660   echo "$ac_t""yes" 1>&6
6661   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6662 else
6663   echo "$ac_t""no" 1>&6
6664 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6665 echo "configure:6666: checking for dlopen" >&5
6666 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6667   echo $ac_n "(cached) $ac_c" 1>&6
6668 else
6669   cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* System header to define __stub macros and hopefully few prototypes,
6673     which can conflict with char dlopen(); below.  */
6674 #include <assert.h>
6675 /* Override any gcc2 internal prototype to avoid an error.  */
6676 /* We use char because int might match the return type of a gcc2
6677     builtin and then its argument prototype would still apply.  */
6678 char dlopen();
6679 char (*f)();
6680
6681 int main() {
6682
6683 /* The GNU C library defines this for functions which it implements
6684     to always fail with ENOSYS.  Some functions are actually named
6685     something starting with __ and the normal name is an alias.  */
6686 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6687 choke me
6688 #else
6689 f = dlopen;
6690 #endif
6691
6692 ; return 0; }
6693 EOF
6694 if { (eval echo configure:6695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6695   rm -rf conftest*
6696   eval "ac_cv_func_dlopen=yes"
6697 else
6698   echo "configure: failed program was:" >&5
6699   cat conftest.$ac_ext >&5
6700   rm -rf conftest*
6701   eval "ac_cv_func_dlopen=no"
6702 fi
6703 rm -f conftest*
6704 fi
6705
6706 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6707   echo "$ac_t""yes" 1>&6
6708   lt_cv_dlopen="dlopen"
6709 else
6710   echo "$ac_t""no" 1>&6
6711 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6712 echo "configure:6713: checking for dlopen in -ldl" >&5
6713 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6714 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6715   echo $ac_n "(cached) $ac_c" 1>&6
6716 else
6717   ac_save_LIBS="$LIBS"
6718 LIBS="-ldl  $LIBS"
6719 cat > conftest.$ac_ext <<EOF
6720 #line 6721 "configure"
6721 #include "confdefs.h"
6722 /* Override any gcc2 internal prototype to avoid an error.  */
6723 /* We use char because int might match the return type of a gcc2
6724     builtin and then its argument prototype would still apply.  */
6725 char dlopen();
6726
6727 int main() {
6728 dlopen()
6729 ; return 0; }
6730 EOF
6731 if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6732   rm -rf conftest*
6733   eval "ac_cv_lib_$ac_lib_var=yes"
6734 else
6735   echo "configure: failed program was:" >&5
6736   cat conftest.$ac_ext >&5
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=no"
6739 fi
6740 rm -f conftest*
6741 LIBS="$ac_save_LIBS"
6742
6743 fi
6744 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6745   echo "$ac_t""yes" 1>&6
6746   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6747 else
6748   echo "$ac_t""no" 1>&6
6749 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6750 echo "configure:6751: checking for dlopen in -lsvld" >&5
6751 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6752 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6753   echo $ac_n "(cached) $ac_c" 1>&6
6754 else
6755   ac_save_LIBS="$LIBS"
6756 LIBS="-lsvld  $LIBS"
6757 cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 /* Override any gcc2 internal prototype to avoid an error.  */
6761 /* We use char because int might match the return type of a gcc2
6762     builtin and then its argument prototype would still apply.  */
6763 char dlopen();
6764
6765 int main() {
6766 dlopen()
6767 ; return 0; }
6768 EOF
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6770   rm -rf conftest*
6771   eval "ac_cv_lib_$ac_lib_var=yes"
6772 else
6773   echo "configure: failed program was:" >&5
6774   cat conftest.$ac_ext >&5
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=no"
6777 fi
6778 rm -f conftest*
6779 LIBS="$ac_save_LIBS"
6780
6781 fi
6782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6783   echo "$ac_t""yes" 1>&6
6784   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6785 else
6786   echo "$ac_t""no" 1>&6
6787 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6788 echo "configure:6789: checking for dld_link in -ldld" >&5
6789 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6791   echo $ac_n "(cached) $ac_c" 1>&6
6792 else
6793   ac_save_LIBS="$LIBS"
6794 LIBS="-ldld  $LIBS"
6795 cat > conftest.$ac_ext <<EOF
6796 #line 6797 "configure"
6797 #include "confdefs.h"
6798 /* Override any gcc2 internal prototype to avoid an error.  */
6799 /* We use char because int might match the return type of a gcc2
6800     builtin and then its argument prototype would still apply.  */
6801 char dld_link();
6802
6803 int main() {
6804 dld_link()
6805 ; return 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6808   rm -rf conftest*
6809   eval "ac_cv_lib_$ac_lib_var=yes"
6810 else
6811   echo "configure: failed program was:" >&5
6812   cat conftest.$ac_ext >&5
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=no"
6815 fi
6816 rm -f conftest*
6817 LIBS="$ac_save_LIBS"
6818
6819 fi
6820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6821   echo "$ac_t""yes" 1>&6
6822   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6823 else
6824   echo "$ac_t""no" 1>&6
6825 fi
6826
6827               
6828 fi
6829
6830             
6831 fi
6832
6833           
6834 fi
6835
6836         
6837 fi
6838
6839       
6840 fi
6841
6842     ;;
6843   esac
6844
6845   if test "x$lt_cv_dlopen" != xno; then
6846     enable_dlopen=yes
6847   else
6848     enable_dlopen=no
6849   fi
6850
6851   case $lt_cv_dlopen in
6852   dlopen)
6853     save_CPPFLAGS="$CPPFLAGS"
6854         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6855
6856     save_LDFLAGS="$LDFLAGS"
6857     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6858
6859     save_LIBS="$LIBS"
6860     LIBS="$lt_cv_dlopen_libs $LIBS"
6861
6862     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6863 echo "configure:6864: checking whether a program can dlopen itself" >&5
6864 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6865   echo $ac_n "(cached) $ac_c" 1>&6
6866 else
6867           if test "$cross_compiling" = yes; then :
6868   lt_cv_dlopen_self=cross
6869 else
6870     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6871   lt_status=$lt_dlunknown
6872   cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875
6876 #if HAVE_DLFCN_H
6877 #include <dlfcn.h>
6878 #endif
6879
6880 #include <stdio.h>
6881
6882 #ifdef RTLD_GLOBAL
6883 #  define LT_DLGLOBAL           RTLD_GLOBAL
6884 #else
6885 #  ifdef DL_GLOBAL
6886 #    define LT_DLGLOBAL         DL_GLOBAL
6887 #  else
6888 #    define LT_DLGLOBAL         0
6889 #  endif
6890 #endif
6891
6892 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6893    find out it does not work in some platform. */
6894 #ifndef LT_DLLAZY_OR_NOW
6895 #  ifdef RTLD_LAZY
6896 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6897 #  else
6898 #    ifdef DL_LAZY
6899 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6900 #    else
6901 #      ifdef RTLD_NOW
6902 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6903 #      else
6904 #        ifdef DL_NOW
6905 #          define LT_DLLAZY_OR_NOW      DL_NOW
6906 #        else
6907 #          define LT_DLLAZY_OR_NOW      0
6908 #        endif
6909 #      endif
6910 #    endif
6911 #  endif
6912 #endif
6913
6914 #ifdef __cplusplus
6915 extern "C" void exit (int);
6916 #endif
6917
6918 void fnord() { int i=42;}
6919 int main ()
6920 {
6921   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6922   int status = $lt_dlunknown;
6923
6924   if (self)
6925     {
6926       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6927       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6928       /* dlclose (self); */
6929     }
6930
6931     exit (status);
6932 }
6933 EOF
6934   if { (eval echo configure:6935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6935     (./conftest; exit; ) 2>/dev/null
6936     lt_status=$?
6937     case x$lt_status in
6938       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6939       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6940       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6941     esac
6942   else :
6943     # compilation failed
6944     lt_cv_dlopen_self=no
6945   fi
6946 fi
6947 rm -fr conftest*
6948
6949     
6950 fi
6951
6952 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6953
6954     if test "x$lt_cv_dlopen_self" = xyes; then
6955       LDFLAGS="$LDFLAGS $link_static_flag"
6956       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6957 echo "configure:6958: checking whether a statically linked program can dlopen itself" >&5
6958 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6959   echo $ac_n "(cached) $ac_c" 1>&6
6960 else
6961           if test "$cross_compiling" = yes; then :
6962   lt_cv_dlopen_self_static=cross
6963 else
6964     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6965   lt_status=$lt_dlunknown
6966   cat > conftest.$ac_ext <<EOF
6967 #line 6968 "configure"
6968 #include "confdefs.h"
6969
6970 #if HAVE_DLFCN_H
6971 #include <dlfcn.h>
6972 #endif
6973
6974 #include <stdio.h>
6975
6976 #ifdef RTLD_GLOBAL
6977 #  define LT_DLGLOBAL           RTLD_GLOBAL
6978 #else
6979 #  ifdef DL_GLOBAL
6980 #    define LT_DLGLOBAL         DL_GLOBAL
6981 #  else
6982 #    define LT_DLGLOBAL         0
6983 #  endif
6984 #endif
6985
6986 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6987    find out it does not work in some platform. */
6988 #ifndef LT_DLLAZY_OR_NOW
6989 #  ifdef RTLD_LAZY
6990 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6991 #  else
6992 #    ifdef DL_LAZY
6993 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6994 #    else
6995 #      ifdef RTLD_NOW
6996 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6997 #      else
6998 #        ifdef DL_NOW
6999 #          define LT_DLLAZY_OR_NOW      DL_NOW
7000 #        else
7001 #          define LT_DLLAZY_OR_NOW      0
7002 #        endif
7003 #      endif
7004 #    endif
7005 #  endif
7006 #endif
7007
7008 #ifdef __cplusplus
7009 extern "C" void exit (int);
7010 #endif
7011
7012 void fnord() { int i=42;}
7013 int main ()
7014 {
7015   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7016   int status = $lt_dlunknown;
7017
7018   if (self)
7019     {
7020       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7021       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7022       /* dlclose (self); */
7023     }
7024
7025     exit (status);
7026 }
7027 EOF
7028   if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7029     (./conftest; exit; ) 2>/dev/null
7030     lt_status=$?
7031     case x$lt_status in
7032       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7033       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7034       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7035     esac
7036   else :
7037     # compilation failed
7038     lt_cv_dlopen_self_static=no
7039   fi
7040 fi
7041 rm -fr conftest*
7042
7043       
7044 fi
7045
7046 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7047     fi
7048
7049     CPPFLAGS="$save_CPPFLAGS"
7050     LDFLAGS="$save_LDFLAGS"
7051     LIBS="$save_LIBS"
7052     ;;
7053   esac
7054
7055   case $lt_cv_dlopen_self in
7056   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7057   *) enable_dlopen_self=unknown ;;
7058   esac
7059
7060   case $lt_cv_dlopen_self_static in
7061   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7062   *) enable_dlopen_self_static=unknown ;;
7063   esac
7064 fi
7065
7066
7067 if test "$enable_shared" = yes && test "$GCC" = yes; then
7068   case $archive_cmds in
7069   *'~'*)
7070     # FIXME: we may have to deal with multi-command sequences.
7071     ;;
7072   '$CC '*)
7073     # Test whether the compiler implicitly links with -lc since on some
7074     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7075     # to ld, don't add -lc before -lgcc.
7076     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7077 echo "configure:7078: checking whether -lc should be explicitly linked in" >&5
7078     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7079   echo $ac_n "(cached) $ac_c" 1>&6
7080 else
7081   $rm conftest*
7082     echo 'static int dummy;' > conftest.$ac_ext
7083
7084     if { (eval echo configure:7085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7085       soname=conftest
7086       lib=conftest
7087       libobjs=conftest.$ac_objext
7088       deplibs=
7089       wl=$lt_cv_prog_cc_wl
7090       compiler_flags=-v
7091       linker_flags=-v
7092       verstring=
7093       output_objdir=.
7094       libname=conftest
7095       save_allow_undefined_flag=$allow_undefined_flag
7096       allow_undefined_flag=
7097       if { (eval echo configure:7098: \"$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; }
7098       then
7099         lt_cv_archive_cmds_need_lc=no
7100       else
7101         lt_cv_archive_cmds_need_lc=yes
7102       fi
7103       allow_undefined_flag=$save_allow_undefined_flag
7104     else
7105       cat conftest.err 1>&5
7106     fi
7107 fi
7108
7109     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7110     ;;
7111   esac
7112 fi
7113 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7114
7115 # The second clause should only fire when bootstrapping the
7116 # libtool distribution, otherwise you forgot to ship ltmain.sh
7117 # with your package, and you will get complaints that there are
7118 # no rules to generate ltmain.sh.
7119 if test -f "$ltmain"; then
7120   :
7121 else
7122   # If there is no Makefile yet, we rely on a make rule to execute
7123   # `config.status --recheck' to rerun these tests and create the
7124   # libtool script then.
7125   test -f Makefile && make "$ltmain"
7126 fi
7127
7128 if test -f "$ltmain"; then
7129   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7130   $rm -f "${ofile}T"
7131
7132   echo creating $ofile
7133
7134   # Now quote all the things that may contain metacharacters while being
7135   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7136   # variables and quote the copies for generation of the libtool script.
7137   for var in echo old_CC old_CFLAGS \
7138     AR AR_FLAGS CC LD LN_S NM SHELL \
7139     reload_flag reload_cmds wl \
7140     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7141     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7142     library_names_spec soname_spec \
7143     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7144     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7145     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7146     old_striplib striplib file_magic_cmd export_symbols_cmds \
7147     deplibs_check_method allow_undefined_flag no_undefined_flag \
7148     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7149     global_symbol_to_c_name_address \
7150     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7151     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7152     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7153
7154     case $var in
7155     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7156     old_postinstall_cmds | old_postuninstall_cmds | \
7157     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7158     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7159     postinstall_cmds | postuninstall_cmds | \
7160     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7161       # Double-quote double-evaled strings.
7162       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7163       ;;
7164     *)
7165       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7166       ;;
7167     esac
7168   done
7169
7170   cat <<__EOF__ > "${ofile}T"
7171 #! $SHELL
7172
7173 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7174 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7175 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7176 #
7177 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7178 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7179 #
7180 # This program is free software; you can redistribute it and/or modify
7181 # it under the terms of the GNU General Public License as published by
7182 # the Free Software Foundation; either version 2 of the License, or
7183 # (at your option) any later version.
7184 #
7185 # This program is distributed in the hope that it will be useful, but
7186 # WITHOUT ANY WARRANTY; without even the implied warranty of
7187 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7188 # General Public License for more details.
7189 #
7190 # You should have received a copy of the GNU General Public License
7191 # along with this program; if not, write to the Free Software
7192 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7193 #
7194 # As a special exception to the GNU General Public License, if you
7195 # distribute this file as part of a program that contains a
7196 # configuration script generated by Autoconf, you may include it under
7197 # the same distribution terms that you use for the rest of that program.
7198
7199 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7200 Xsed="sed -e s/^X//"
7201
7202 # The HP-UX ksh and POSIX shell print the target directory to stdout
7203 # if CDPATH is set.
7204 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7205
7206 # ### BEGIN LIBTOOL CONFIG
7207
7208 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7209
7210 # Shell to use when invoking shell scripts.
7211 SHELL=$lt_SHELL
7212
7213 # Whether or not to build shared libraries.
7214 build_libtool_libs=$enable_shared
7215
7216 # Whether or not to build static libraries.
7217 build_old_libs=$enable_static
7218
7219 # Whether or not to add -lc for building shared libraries.
7220 build_libtool_need_lc=$need_lc
7221
7222 # Whether or not to optimize for fast installation.
7223 fast_install=$enable_fast_install
7224
7225 # The host system.
7226 host_alias=$host_alias
7227 host=$host
7228
7229 # An echo program that does not interpret backslashes.
7230 echo=$lt_echo
7231
7232 # The archiver.
7233 AR=$lt_AR
7234 AR_FLAGS=$lt_AR_FLAGS
7235
7236 # The default C compiler.
7237 CC=$lt_CC
7238
7239 # Is the compiler the GNU C compiler?
7240 with_gcc=$GCC
7241
7242 # The linker used to build libraries.
7243 LD=$lt_LD
7244
7245 # Whether we need hard or soft links.
7246 LN_S=$lt_LN_S
7247
7248 # A BSD-compatible nm program.
7249 NM=$lt_NM
7250
7251 # A symbol stripping program
7252 STRIP=$STRIP
7253
7254 # Used to examine libraries when file_magic_cmd begins "file"
7255 MAGIC_CMD=$MAGIC_CMD
7256
7257 # Used on cygwin: DLL creation program.
7258 DLLTOOL="$DLLTOOL"
7259
7260 # Used on cygwin: object dumper.
7261 OBJDUMP="$OBJDUMP"
7262
7263 # Used on cygwin: assembler.
7264 AS="$AS"
7265
7266 # The name of the directory that contains temporary libtool files.
7267 objdir=$objdir
7268
7269 # How to create reloadable object files.
7270 reload_flag=$lt_reload_flag
7271 reload_cmds=$lt_reload_cmds
7272
7273 # How to pass a linker flag through the compiler.
7274 wl=$lt_wl
7275
7276 # Object file suffix (normally "o").
7277 objext="$ac_objext"
7278
7279 # Old archive suffix (normally "a").
7280 libext="$libext"
7281
7282 # Executable file suffix (normally "").
7283 exeext="$exeext"
7284
7285 # Additional compiler flags for building library objects.
7286 pic_flag=$lt_pic_flag
7287 pic_mode=$pic_mode
7288
7289 # Does compiler simultaneously support -c and -o options?
7290 compiler_c_o=$lt_compiler_c_o
7291
7292 # Can we write directly to a .lo ?
7293 compiler_o_lo=$lt_compiler_o_lo
7294
7295 # Must we lock files when doing compilation ?
7296 need_locks=$lt_need_locks
7297
7298 # Do we need the lib prefix for modules?
7299 need_lib_prefix=$need_lib_prefix
7300
7301 # Do we need a version for libraries?
7302 need_version=$need_version
7303
7304 # Whether dlopen is supported.
7305 dlopen_support=$enable_dlopen
7306
7307 # Whether dlopen of programs is supported.
7308 dlopen_self=$enable_dlopen_self
7309
7310 # Whether dlopen of statically linked programs is supported.
7311 dlopen_self_static=$enable_dlopen_self_static
7312
7313 # Compiler flag to prevent dynamic linking.
7314 link_static_flag=$lt_link_static_flag
7315
7316 # Compiler flag to turn off builtin functions.
7317 no_builtin_flag=$lt_no_builtin_flag
7318
7319 # Compiler flag to allow reflexive dlopens.
7320 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7321
7322 # Compiler flag to generate shared objects directly from archives.
7323 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7324
7325 # Compiler flag to generate thread-safe objects.
7326 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7327
7328 # Library versioning type.
7329 version_type=$version_type
7330
7331 # Format of library name prefix.
7332 libname_spec=$lt_libname_spec
7333
7334 # List of archive names.  First name is the real one, the rest are links.
7335 # The last name is the one that the linker finds with -lNAME.
7336 library_names_spec=$lt_library_names_spec
7337
7338 # The coded name of the library, if different from the real name.
7339 soname_spec=$lt_soname_spec
7340
7341 # Commands used to build and install an old-style archive.
7342 RANLIB=$lt_RANLIB
7343 old_archive_cmds=$lt_old_archive_cmds
7344 old_postinstall_cmds=$lt_old_postinstall_cmds
7345 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7346
7347 # Create an old-style archive from a shared archive.
7348 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7349
7350 # Create a temporary old-style archive to link instead of a shared archive.
7351 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7352
7353 # Commands used to build and install a shared archive.
7354 archive_cmds=$lt_archive_cmds
7355 archive_expsym_cmds=$lt_archive_expsym_cmds
7356 postinstall_cmds=$lt_postinstall_cmds
7357 postuninstall_cmds=$lt_postuninstall_cmds
7358
7359 # Commands to strip libraries.
7360 old_striplib=$lt_old_striplib
7361 striplib=$lt_striplib
7362
7363 # Method to check whether dependent libraries are shared objects.
7364 deplibs_check_method=$lt_deplibs_check_method
7365
7366 # Command to use when deplibs_check_method == file_magic.
7367 file_magic_cmd=$lt_file_magic_cmd
7368
7369 # Flag that allows shared libraries with undefined symbols to be built.
7370 allow_undefined_flag=$lt_allow_undefined_flag
7371
7372 # Flag that forces no undefined symbols.
7373 no_undefined_flag=$lt_no_undefined_flag
7374
7375 # Commands used to finish a libtool library installation in a directory.
7376 finish_cmds=$lt_finish_cmds
7377
7378 # Same as above, but a single script fragment to be evaled but not shown.
7379 finish_eval=$lt_finish_eval
7380
7381 # Take the output of nm and produce a listing of raw symbols and C names.
7382 global_symbol_pipe=$lt_global_symbol_pipe
7383
7384 # Transform the output of nm in a proper C declaration
7385 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7386
7387 # Transform the output of nm in a C name address pair
7388 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7389
7390 # This is the shared library runtime path variable.
7391 runpath_var=$runpath_var
7392
7393 # This is the shared library path variable.
7394 shlibpath_var=$shlibpath_var
7395
7396 # Is shlibpath searched before the hard-coded library search path?
7397 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7398
7399 # How to hardcode a shared library path into an executable.
7400 hardcode_action=$hardcode_action
7401
7402 # Whether we should hardcode library paths into libraries.
7403 hardcode_into_libs=$hardcode_into_libs
7404
7405 # Flag to hardcode \$libdir into a binary during linking.
7406 # This must work even if \$libdir does not exist.
7407 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7408
7409 # Whether we need a single -rpath flag with a separated argument.
7410 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7411
7412 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7413 # resulting binary.
7414 hardcode_direct=$hardcode_direct
7415
7416 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7417 # resulting binary.
7418 hardcode_minus_L=$hardcode_minus_L
7419
7420 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7421 # the resulting binary.
7422 hardcode_shlibpath_var=$hardcode_shlibpath_var
7423
7424 # Variables whose values should be saved in libtool wrapper scripts and
7425 # restored at relink time.
7426 variables_saved_for_relink="$variables_saved_for_relink"
7427
7428 # Whether libtool must link a program against all its dependency libraries.
7429 link_all_deplibs=$link_all_deplibs
7430
7431 # Compile-time system search path for libraries
7432 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7433
7434 # Run-time system search path for libraries
7435 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7436
7437 # Fix the shell variable \$srcfile for the compiler.
7438 fix_srcfile_path="$fix_srcfile_path"
7439
7440 # Set to yes if exported symbols are required.
7441 always_export_symbols=$always_export_symbols
7442
7443 # The commands to list exported symbols.
7444 export_symbols_cmds=$lt_export_symbols_cmds
7445
7446 # The commands to extract the exported symbol list from a shared archive.
7447 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7448
7449 # Symbols that should not be listed in the preloaded symbols.
7450 exclude_expsyms=$lt_exclude_expsyms
7451
7452 # Symbols that must always be exported.
7453 include_expsyms=$lt_include_expsyms
7454
7455 # ### END LIBTOOL CONFIG
7456
7457 __EOF__
7458
7459   case $host_os in
7460   aix3*)
7461     cat <<\EOF >> "${ofile}T"
7462
7463 # AIX sometimes has problems with the GCC collect2 program.  For some
7464 # reason, if we set the COLLECT_NAMES environment variable, the problems
7465 # vanish in a puff of smoke.
7466 if test "X${COLLECT_NAMES+set}" != Xset; then
7467   COLLECT_NAMES=
7468   export COLLECT_NAMES
7469 fi
7470 EOF
7471     ;;
7472   esac
7473
7474   case $host_os in
7475   cygwin* | mingw* | pw32* | os2*)
7476     cat <<'EOF' >> "${ofile}T"
7477       # This is a source program that is used to create dlls on Windows
7478       # Don't remove nor modify the starting and closing comments
7479 # /* ltdll.c starts here */
7480 # #define WIN32_LEAN_AND_MEAN
7481 # #include <windows.h>
7482 # #undef WIN32_LEAN_AND_MEAN
7483 # #include <stdio.h>
7484 #
7485 # #ifndef __CYGWIN__
7486 # #  ifdef __CYGWIN32__
7487 # #    define __CYGWIN__ __CYGWIN32__
7488 # #  endif
7489 # #endif
7490 #
7491 # #ifdef __cplusplus
7492 # extern "C" {
7493 # #endif
7494 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7495 # #ifdef __cplusplus
7496 # }
7497 # #endif
7498 #
7499 # #ifdef __CYGWIN__
7500 # #include <cygwin/cygwin_dll.h>
7501 # DECLARE_CYGWIN_DLL( DllMain );
7502 # #endif
7503 # HINSTANCE __hDllInstance_base;
7504 #
7505 # BOOL APIENTRY
7506 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7507 # {
7508 #   __hDllInstance_base = hInst;
7509 #   return TRUE;
7510 # }
7511 # /* ltdll.c ends here */
7512         # This is a source program that is used to create import libraries
7513         # on Windows for dlls which lack them. Don't remove nor modify the
7514         # starting and closing comments
7515 # /* impgen.c starts here */
7516 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7517 #
7518 #  This file is part of GNU libtool.
7519 #
7520 #  This program is free software; you can redistribute it and/or modify
7521 #  it under the terms of the GNU General Public License as published by
7522 #  the Free Software Foundation; either version 2 of the License, or
7523 #  (at your option) any later version.
7524 #
7525 #  This program is distributed in the hope that it will be useful,
7526 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7527 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7528 #  GNU General Public License for more details.
7529 #
7530 #  You should have received a copy of the GNU General Public License
7531 #  along with this program; if not, write to the Free Software
7532 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7533 #  */
7534 #
7535 # #include <stdio.h>            /* for printf() */
7536 # #include <unistd.h>           /* for open(), lseek(), read() */
7537 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7538 # #include <string.h>           /* for strdup() */
7539 #
7540 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7541 # #ifndef O_BINARY
7542 # #define O_BINARY 0
7543 # #endif
7544 #
7545 # static unsigned int
7546 # pe_get16 (fd, offset)
7547 #      int fd;
7548 #      int offset;
7549 # {
7550 #   unsigned char b[2];
7551 #   lseek (fd, offset, SEEK_SET);
7552 #   read (fd, b, 2);
7553 #   return b[0] + (b[1]<<8);
7554 # }
7555 #
7556 # static unsigned int
7557 # pe_get32 (fd, offset)
7558 #     int fd;
7559 #     int offset;
7560 # {
7561 #   unsigned char b[4];
7562 #   lseek (fd, offset, SEEK_SET);
7563 #   read (fd, b, 4);
7564 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7565 # }
7566 #
7567 # static unsigned int
7568 # pe_as32 (ptr)
7569 #      void *ptr;
7570 # {
7571 #   unsigned char *b = ptr;
7572 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7573 # }
7574 #
7575 # int
7576 # main (argc, argv)
7577 #     int argc;
7578 #     char *argv[];
7579 # {
7580 #     int dll;
7581 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7582 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7583 #     unsigned long name_rvas, nexp;
7584 #     unsigned char *expdata, *erva;
7585 #     char *filename, *dll_name;
7586 #
7587 #     filename = argv[1];
7588 #
7589 #     dll = open(filename, O_RDONLY|O_BINARY);
7590 #     if (dll < 1)
7591 #       return 1;
7592 #
7593 #     dll_name = filename;
7594 #
7595 #     for (i=0; filename[i]; i++)
7596 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7597 #           dll_name = filename + i +1;
7598 #
7599 #     pe_header_offset = pe_get32 (dll, 0x3c);
7600 #     opthdr_ofs = pe_header_offset + 4 + 20;
7601 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7602 #
7603 #     if (num_entries < 1) /* no exports */
7604 #       return 1;
7605 #
7606 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7607 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7608 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7609 #     secptr = (pe_header_offset + 4 + 20 +
7610 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7611 #
7612 #     expptr = 0;
7613 #     for (i = 0; i < nsections; i++)
7614 #     {
7615 #       char sname[8];
7616 #       unsigned long secptr1 = secptr + 40 * i;
7617 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7618 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7619 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7620 #       lseek(dll, secptr1, SEEK_SET);
7621 #       read(dll, sname, 8);
7622 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7623 #       {
7624 #           expptr = fptr + (export_rva - vaddr);
7625 #           if (export_rva + export_size > vaddr + vsize)
7626 #               export_size = vsize - (export_rva - vaddr);
7627 #           break;
7628 #       }
7629 #     }
7630 #
7631 #     expdata = (unsigned char*)malloc(export_size);
7632 #     lseek (dll, expptr, SEEK_SET);
7633 #     read (dll, expdata, export_size);
7634 #     erva = expdata - export_rva;
7635 #
7636 #     nexp = pe_as32 (expdata+24);
7637 #     name_rvas = pe_as32 (expdata+32);
7638 #
7639 #     printf ("EXPORTS\n");
7640 #     for (i = 0; i<nexp; i++)
7641 #     {
7642 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7643 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7644 #     }
7645 #
7646 #     return 0;
7647 # }
7648 # /* impgen.c ends here */
7649
7650 EOF
7651     ;;
7652   esac
7653
7654   # We use sed instead of cat because bash on DJGPP gets confused if
7655   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7656   # text mode, it properly converts lines to CR/LF.  This bash problem
7657   # is reportedly fixed, but why not run on old versions too?
7658   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7659
7660   mv -f "${ofile}T" "$ofile" || \
7661     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7662   chmod +x "$ofile"
7663 fi
7664
7665
7666
7667
7668
7669 # This can be used to rebuild libtool when needed
7670 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7671
7672 # Always use our own libtool.
7673 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7674
7675 # Prevent multiple expansion
7676
7677
7678
7679 for ac_prog in mawk gawk nawk awk
7680 do
7681 # Extract the first word of "$ac_prog", so it can be a program name with args.
7682 set dummy $ac_prog; ac_word=$2
7683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7684 echo "configure:7685: checking for $ac_word" >&5
7685 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7686   echo $ac_n "(cached) $ac_c" 1>&6
7687 else
7688   if test -n "$AWK"; then
7689   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7690 else
7691   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7692   ac_dummy="$PATH"
7693   for ac_dir in $ac_dummy; do
7694     test -z "$ac_dir" && ac_dir=.
7695     if test -f $ac_dir/$ac_word; then
7696       ac_cv_prog_AWK="$ac_prog"
7697       break
7698     fi
7699   done
7700   IFS="$ac_save_ifs"
7701 fi
7702 fi
7703 AWK="$ac_cv_prog_AWK"
7704 if test -n "$AWK"; then
7705   echo "$ac_t""$AWK" 1>&6
7706 else
7707   echo "$ac_t""no" 1>&6
7708 fi
7709
7710 test -n "$AWK" && break
7711 done
7712
7713 # test for ln hardlink support
7714 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7715 echo "configure:7716: checking whether ln works" >&5
7716 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7717   echo $ac_n "(cached) $ac_c" 1>&6
7718 else
7719   rm -f conftest.src conftest.dst
7720 echo "conftest" > conftest.src
7721 if ln conftest.src conftest.dst 2>/dev/null
7722 then
7723   ol_cv_prog_LN_H="ln"
7724 else
7725   ol_cv_prog_LN_H="cp"
7726 fi
7727 rm -f conftest.src conftest.dst
7728
7729 fi
7730 LN_H="$ol_cv_prog_LN_H"
7731 if test "$ol_cv_prog_LN_H" = "ln"; then
7732         echo "$ac_t""yes" 1>&6
7733 else
7734         echo "$ac_t""no" 1>&6
7735 fi
7736
7737 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7738 echo "configure:7739: checking whether ln -s works" >&5
7739 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7740   echo $ac_n "(cached) $ac_c" 1>&6
7741 else
7742   rm -f conftestdata
7743 if ln -s X conftestdata 2>/dev/null
7744 then
7745   rm -f conftestdata
7746   ac_cv_prog_LN_S="ln -s"
7747 else
7748   ac_cv_prog_LN_S=ln
7749 fi
7750 fi
7751 LN_S="$ac_cv_prog_LN_S"
7752 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7753   echo "$ac_t""yes" 1>&6
7754 else
7755   echo "$ac_t""no" 1>&6
7756 fi
7757
7758
7759 # Extract the first word of "sendmail", so it can be a program name with args.
7760 set dummy sendmail; ac_word=$2
7761 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7762 echo "configure:7763: checking for $ac_word" >&5
7763 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7764   echo $ac_n "(cached) $ac_c" 1>&6
7765 else
7766   case "$SENDMAIL" in
7767   /*)
7768   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7769   ;;
7770   ?:/*)
7771   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7772   ;;
7773   *)
7774   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7775   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7776   for ac_dir in $ac_dummy; do 
7777     test -z "$ac_dir" && ac_dir=.
7778     if test -f $ac_dir/$ac_word; then
7779       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7780       break
7781     fi
7782   done
7783   IFS="$ac_save_ifs"
7784   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7785   ;;
7786 esac
7787 fi
7788 SENDMAIL="$ac_cv_path_SENDMAIL"
7789 if test -n "$SENDMAIL"; then
7790   echo "$ac_t""$SENDMAIL" 1>&6
7791 else
7792   echo "$ac_t""no" 1>&6
7793 fi
7794
7795 # Extract the first word of "vi", so it can be a program name with args.
7796 set dummy vi; ac_word=$2
7797 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7798 echo "configure:7799: checking for $ac_word" >&5
7799 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7800   echo $ac_n "(cached) $ac_c" 1>&6
7801 else
7802   case "$EDITOR" in
7803   /*)
7804   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7805   ;;
7806   ?:/*)
7807   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7808   ;;
7809   *)
7810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7811   ac_dummy="$PATH:/usr/ucb"
7812   for ac_dir in $ac_dummy; do 
7813     test -z "$ac_dir" && ac_dir=.
7814     if test -f $ac_dir/$ac_word; then
7815       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7816       break
7817     fi
7818   done
7819   IFS="$ac_save_ifs"
7820   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7821   ;;
7822 esac
7823 fi
7824 EDITOR="$ac_cv_path_EDITOR"
7825 if test -n "$EDITOR"; then
7826   echo "$ac_t""$EDITOR" 1>&6
7827 else
7828   echo "$ac_t""no" 1>&6
7829 fi
7830
7831
7832 ol_link_perl=no
7833 if test $ol_enable_perl != no ; then
7834         # Extract the first word of "perl", so it can be a program name with args.
7835 set dummy perl; ac_word=$2
7836 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7837 echo "configure:7838: checking for $ac_word" >&5
7838 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7839   echo $ac_n "(cached) $ac_c" 1>&6
7840 else
7841   case "$PERLBIN" in
7842   /*)
7843   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7844   ;;
7845   ?:/*)
7846   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7847   ;;
7848   *)
7849   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7850   ac_dummy="$PATH"
7851   for ac_dir in $ac_dummy; do 
7852     test -z "$ac_dir" && ac_dir=.
7853     if test -f $ac_dir/$ac_word; then
7854       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7855       break
7856     fi
7857   done
7858   IFS="$ac_save_ifs"
7859   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7860   ;;
7861 esac
7862 fi
7863 PERLBIN="$ac_cv_path_PERLBIN"
7864 if test -n "$PERLBIN"; then
7865   echo "$ac_t""$PERLBIN" 1>&6
7866 else
7867   echo "$ac_t""no" 1>&6
7868 fi
7869
7870
7871         if test "no$PERLBIN" = "no" ; then
7872                 if test $ol_enable_perl = yes ; then
7873                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7874                 fi
7875
7876         else
7877                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7878                 if test x"$ol_with_perl_module" = "xstatic" ; then
7879                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7880                 else
7881                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7882                 fi
7883                                 ol_link_perl=yes
7884         fi
7885 fi
7886
7887 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7888 echo "configure:7889: checking how to run the C preprocessor" >&5
7889 # On Suns, sometimes $CPP names a directory.
7890 if test -n "$CPP" && test -d "$CPP"; then
7891   CPP=
7892 fi
7893 if test -z "$CPP"; then
7894 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7895   echo $ac_n "(cached) $ac_c" 1>&6
7896 else
7897     # This must be in double quotes, not single quotes, because CPP may get
7898   # substituted into the Makefile and "${CC-cc}" will confuse make.
7899   CPP="${CC-cc} -E"
7900   # On the NeXT, cc -E runs the code through the compiler's parser,
7901   # not just through cpp.
7902   cat > conftest.$ac_ext <<EOF
7903 #line 7904 "configure"
7904 #include "confdefs.h"
7905 #include <assert.h>
7906 Syntax Error
7907 EOF
7908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7909 { (eval echo configure:7910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7911 if test -z "$ac_err"; then
7912   :
7913 else
7914   echo "$ac_err" >&5
7915   echo "configure: failed program was:" >&5
7916   cat conftest.$ac_ext >&5
7917   rm -rf conftest*
7918   CPP="${CC-cc} -E -traditional-cpp"
7919   cat > conftest.$ac_ext <<EOF
7920 #line 7921 "configure"
7921 #include "confdefs.h"
7922 #include <assert.h>
7923 Syntax Error
7924 EOF
7925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7926 { (eval echo configure:7927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7928 if test -z "$ac_err"; then
7929   :
7930 else
7931   echo "$ac_err" >&5
7932   echo "configure: failed program was:" >&5
7933   cat conftest.$ac_ext >&5
7934   rm -rf conftest*
7935   CPP="${CC-cc} -nologo -E"
7936   cat > conftest.$ac_ext <<EOF
7937 #line 7938 "configure"
7938 #include "confdefs.h"
7939 #include <assert.h>
7940 Syntax Error
7941 EOF
7942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7943 { (eval echo configure:7944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7945 if test -z "$ac_err"; then
7946   :
7947 else
7948   echo "$ac_err" >&5
7949   echo "configure: failed program was:" >&5
7950   cat conftest.$ac_ext >&5
7951   rm -rf conftest*
7952   CPP=/lib/cpp
7953 fi
7954 rm -f conftest*
7955 fi
7956 rm -f conftest*
7957 fi
7958 rm -f conftest*
7959   ac_cv_prog_CPP="$CPP"
7960 fi
7961   CPP="$ac_cv_prog_CPP"
7962 else
7963   ac_cv_prog_CPP="$CPP"
7964 fi
7965 echo "$ac_t""$CPP" 1>&6
7966
7967
7968 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7969         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7970
7971 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7972         echo "configure: warning: programs compiled here do run here..." 1>&2
7973         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7974
7975 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7976         echo "configure: warning: programs compiled here do not run here..." 1>&2
7977         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7978 fi
7979
7980
7981 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7982 echo "configure:7983: checking for Cygwin environment" >&5
7983 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7984   echo $ac_n "(cached) $ac_c" 1>&6
7985 else
7986   cat > conftest.$ac_ext <<EOF
7987 #line 7988 "configure"
7988 #include "confdefs.h"
7989
7990 int main() {
7991
7992 #ifndef __CYGWIN__
7993 #define __CYGWIN__ __CYGWIN32__
7994 #endif
7995 return __CYGWIN__;
7996 ; return 0; }
7997 EOF
7998 if { (eval echo configure:7999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7999   rm -rf conftest*
8000   ac_cv_cygwin=yes
8001 else
8002   echo "configure: failed program was:" >&5
8003   cat conftest.$ac_ext >&5
8004   rm -rf conftest*
8005   ac_cv_cygwin=no
8006 fi
8007 rm -f conftest*
8008 fi
8009
8010 echo "$ac_t""$ac_cv_cygwin" 1>&6
8011 CYGWIN=
8012 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8013 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8014 echo "configure:8015: checking for mingw32 environment" >&5
8015 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8016   echo $ac_n "(cached) $ac_c" 1>&6
8017 else
8018   cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021
8022 int main() {
8023 return __MINGW32__;
8024 ; return 0; }
8025 EOF
8026 if { (eval echo configure:8027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8027   rm -rf conftest*
8028   ac_cv_mingw32=yes
8029 else
8030   echo "configure: failed program was:" >&5
8031   cat conftest.$ac_ext >&5
8032   rm -rf conftest*
8033   ac_cv_mingw32=no
8034 fi
8035 rm -f conftest*
8036 fi
8037
8038 echo "$ac_t""$ac_cv_mingw32" 1>&6
8039 MINGW32=
8040 test "$ac_cv_mingw32" = yes && MINGW32=yes
8041
8042
8043
8044 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8045 echo "configure:8046: checking for executable suffix" >&5
8046 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8047   echo $ac_n "(cached) $ac_c" 1>&6
8048 else
8049   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8050   ac_cv_exeext=.exe
8051 else
8052   rm -f conftest*
8053   echo 'int main () { return 0; }' > conftest.$ac_ext
8054   ac_cv_exeext=
8055   if { (eval echo configure:8056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8056     for file in conftest.*; do
8057       case $file in
8058       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8059       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8060       esac
8061     done
8062   else
8063     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8064   fi
8065   rm -f conftest*
8066   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8067 fi
8068 fi
8069
8070 EXEEXT=""
8071 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8072 echo "$ac_t""${ac_cv_exeext}" 1>&6
8073 ac_exeext=$EXEEXT
8074
8075 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8076 echo "configure:8077: checking for object suffix" >&5
8077 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8078   echo $ac_n "(cached) $ac_c" 1>&6
8079 else
8080   rm -f conftest*
8081 echo 'int i = 1;' > conftest.$ac_ext
8082 if { (eval echo configure:8083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8083   for ac_file in conftest.*; do
8084     case $ac_file in
8085     *.c) ;;
8086     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8087     esac
8088   done
8089 else
8090   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8091 fi
8092 rm -f conftest*
8093 fi
8094
8095 echo "$ac_t""$ac_cv_objext" 1>&6
8096 OBJEXT=$ac_cv_objext
8097 ac_objext=$ac_cv_objext
8098
8099
8100 cat >> confdefs.h <<EOF
8101 #define EXEEXT "${EXEEXT}"
8102 EOF
8103
8104
8105 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8106 echo "configure:8107: checking for be_app in -lbe" >&5
8107 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8108 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8109   echo $ac_n "(cached) $ac_c" 1>&6
8110 else
8111   ac_save_LIBS="$LIBS"
8112 LIBS="-lbe -lroot -lnet $LIBS"
8113 cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8116 /* Override any gcc2 internal prototype to avoid an error.  */
8117 /* We use char because int might match the return type of a gcc2
8118     builtin and then its argument prototype would still apply.  */
8119 char be_app();
8120
8121 int main() {
8122 be_app()
8123 ; return 0; }
8124 EOF
8125 if { (eval echo configure:8126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8126   rm -rf conftest*
8127   eval "ac_cv_lib_$ac_lib_var=yes"
8128 else
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -rf conftest*
8132   eval "ac_cv_lib_$ac_lib_var=no"
8133 fi
8134 rm -f conftest*
8135 LIBS="$ac_save_LIBS"
8136
8137 fi
8138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8139   echo "$ac_t""yes" 1>&6
8140   LIBS="$LIBS -lbe -lroot -lnet"
8141 else
8142   echo "$ac_t""no" 1>&6
8143 :
8144 fi
8145
8146
8147
8148
8149
8150 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8151 echo "configure:8152: checking for ${CC-cc} option to accept ANSI C" >&5
8152 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8153   echo $ac_n "(cached) $ac_c" 1>&6
8154 else
8155   am_cv_prog_cc_stdc=no
8156 ac_save_CC="$CC"
8157 # Don't try gcc -ansi; that turns off useful extensions and
8158 # breaks some systems' header files.
8159 # AIX                   -qlanglvl=ansi
8160 # Ultrix and OSF/1      -std1
8161 # HP-UX 10.20 and later -Ae
8162 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8163 # SVR4                  -Xc -D__EXTENSIONS__
8164 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8165 do
8166   CC="$ac_save_CC $ac_arg"
8167   cat > conftest.$ac_ext <<EOF
8168 #line 8169 "configure"
8169 #include "confdefs.h"
8170 #include <stdarg.h>
8171 #include <stdio.h>
8172 #include <sys/types.h>
8173 #include <sys/stat.h>
8174 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8175 struct buf { int x; };
8176 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8177 static char *e (p, i)
8178      char **p;
8179      int i;
8180 {
8181   return p[i];
8182 }
8183 static char *f (char * (*g) (char **, int), char **p, ...)
8184 {
8185   char *s;
8186   va_list v;
8187   va_start (v,p);
8188   s = g (p, va_arg (v,int));
8189   va_end (v);
8190   return s;
8191 }
8192 int test (int i, double x);
8193 struct s1 {int (*f) (int a);};
8194 struct s2 {int (*f) (double a);};
8195 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8196 int argc;
8197 char **argv;
8198
8199 int main() {
8200
8201 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8202
8203 ; return 0; }
8204 EOF
8205 if { (eval echo configure:8206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8206   rm -rf conftest*
8207   am_cv_prog_cc_stdc="$ac_arg"; break
8208 else
8209   echo "configure: failed program was:" >&5
8210   cat conftest.$ac_ext >&5
8211 fi
8212 rm -f conftest*
8213 done
8214 CC="$ac_save_CC"
8215
8216 fi
8217
8218 if test -z "$am_cv_prog_cc_stdc"; then
8219   echo "$ac_t""none needed" 1>&6
8220 else
8221   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8222 fi
8223 case "x$am_cv_prog_cc_stdc" in
8224   x|xno) ;;
8225   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8226 esac
8227
8228 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8229         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8230 fi
8231
8232 # test for make depend flag
8233 OL_MKDEP=
8234 OL_MKDEP_FLAGS=
8235 if test -z "${MKDEP}"; then
8236         OL_MKDEP="${CC-cc}"
8237         if test -z "${MKDEP_FLAGS}"; then
8238                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8239 echo "configure:8240: checking for ${OL_MKDEP} depend flag" >&5
8240 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8241   echo $ac_n "(cached) $ac_c" 1>&6
8242 else
8243   
8244                         ol_cv_mkdep=no
8245                         for flag in "-M" "-xM"; do
8246                                 cat > conftest.c <<EOF
8247  noCode;
8248 EOF
8249                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8250                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8251                                 then
8252                                         if test ! -f conftest."${ac_object}" ; then
8253                                                 ol_cv_mkdep=$flag
8254                                                 OL_MKDEP_FLAGS="$flag"
8255                                                 break
8256                                         fi
8257                                 fi
8258                         done
8259                         rm -f conftest*
8260                 
8261 fi
8262
8263 echo "$ac_t""$ol_cv_mkdep" 1>&6
8264         else
8265                 cc_cv_mkdep=yes
8266                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8267         fi
8268 else
8269         cc_cv_mkdep=yes
8270         OL_MKDEP="${MKDEP}"
8271         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8272 fi
8273
8274
8275
8276 if test "${ol_cv_mkdep}" = no ; then
8277         # this will soon become an error
8278         echo "configure: warning: do not know how to generate dependencies" 1>&2
8279 fi
8280
8281 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8282 echo "configure:8283: checking for afopen in -ls" >&5
8283 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8284 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   ac_save_LIBS="$LIBS"
8288 LIBS="-ls  $LIBS"
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 /* Override any gcc2 internal prototype to avoid an error.  */
8293 /* We use char because int might match the return type of a gcc2
8294     builtin and then its argument prototype would still apply.  */
8295 char afopen();
8296
8297 int main() {
8298 afopen()
8299 ; return 0; }
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=yes"
8304 else
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=no"
8309 fi
8310 rm -f conftest*
8311 LIBS="$ac_save_LIBS"
8312
8313 fi
8314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8315   echo "$ac_t""yes" 1>&6
8316   
8317         AUTH_LIBS=-ls
8318         cat >> confdefs.h <<\EOF
8319 #define HAVE_AIX_SECURITY 1
8320 EOF
8321
8322
8323 else
8324   echo "$ac_t""no" 1>&6
8325 fi
8326
8327
8328
8329 ol_link_modules=no
8330 if test $ol_enable_modules != no ; then
8331         for ac_hdr in ltdl.h
8332 do
8333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8335 echo "configure:8336: checking for $ac_hdr" >&5
8336 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8337   echo $ac_n "(cached) $ac_c" 1>&6
8338 else
8339   cat > conftest.$ac_ext <<EOF
8340 #line 8341 "configure"
8341 #include "confdefs.h"
8342 #include <$ac_hdr>
8343 EOF
8344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8345 { (eval echo configure:8346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8347 if test -z "$ac_err"; then
8348   rm -rf conftest*
8349   eval "ac_cv_header_$ac_safe=yes"
8350 else
8351   echo "$ac_err" >&5
8352   echo "configure: failed program was:" >&5
8353   cat conftest.$ac_ext >&5
8354   rm -rf conftest*
8355   eval "ac_cv_header_$ac_safe=no"
8356 fi
8357 rm -f conftest*
8358 fi
8359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8360   echo "$ac_t""yes" 1>&6
8361     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8362   cat >> confdefs.h <<EOF
8363 #define $ac_tr_hdr 1
8364 EOF
8365  
8366 else
8367   echo "$ac_t""no" 1>&6
8368 fi
8369 done
8370
8371
8372         if test $ac_cv_header_ltdl_h = no ; then
8373                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8374         fi
8375
8376         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8377 echo "configure:8378: checking for lt_dlinit in -lltdl" >&5
8378 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8379 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8380   echo $ac_n "(cached) $ac_c" 1>&6
8381 else
8382   ac_save_LIBS="$LIBS"
8383 LIBS="-lltdl  $LIBS"
8384 cat > conftest.$ac_ext <<EOF
8385 #line 8386 "configure"
8386 #include "confdefs.h"
8387 /* Override any gcc2 internal prototype to avoid an error.  */
8388 /* We use char because int might match the return type of a gcc2
8389     builtin and then its argument prototype would still apply.  */
8390 char lt_dlinit();
8391
8392 int main() {
8393 lt_dlinit()
8394 ; return 0; }
8395 EOF
8396 if { (eval echo configure:8397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8397   rm -rf conftest*
8398   eval "ac_cv_lib_$ac_lib_var=yes"
8399 else
8400   echo "configure: failed program was:" >&5
8401   cat conftest.$ac_ext >&5
8402   rm -rf conftest*
8403   eval "ac_cv_lib_$ac_lib_var=no"
8404 fi
8405 rm -f conftest*
8406 LIBS="$ac_save_LIBS"
8407
8408 fi
8409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8410   echo "$ac_t""yes" 1>&6
8411   
8412                 MODULES_LIBS=-lltdl
8413                 cat >> confdefs.h <<\EOF
8414 #define HAVE_LIBLTDL 1
8415 EOF
8416
8417         
8418 else
8419   echo "$ac_t""no" 1>&6
8420 fi
8421
8422
8423         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8424                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8425         fi
8426         ol_link_modules=yes
8427 else
8428         ol_with_bdb_module=static
8429         ol_with_dnssrv_module=static
8430         ol_with_ldap_module=static
8431         ol_with_ldbm_module=static
8432         ol_with_meta_module=static
8433         ol_with_monitor_module=static
8434         ol_with_null_module=static
8435         ol_with_passwd_module=static
8436         ol_with_perl_module=static
8437         ol_with_shell_module=static
8438         ol_with_tcl_module=static
8439         ol_with_sql_module=static
8440 fi
8441
8442 # test for EBCDIC
8443 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8444 echo "configure:8445: checking for EBCDIC" >&5
8445 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8446   echo $ac_n "(cached) $ac_c" 1>&6
8447 else
8448   
8449         cat > conftest.$ac_ext <<EOF
8450 #line 8451 "configure"
8451 #include "confdefs.h"
8452
8453 #if !('M' == 0xd4)
8454 #include <__ASCII__/generate_error.h>
8455 #endif
8456
8457 EOF
8458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8459 { (eval echo configure:8460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8461 if test -z "$ac_err"; then
8462   rm -rf conftest*
8463   ol_cv_cpp_ebcdic=yes
8464 else
8465   echo "$ac_err" >&5
8466   echo "configure: failed program was:" >&5
8467   cat conftest.$ac_ext >&5
8468   rm -rf conftest*
8469   ol_cv_cpp_ebcdic=no
8470 fi
8471 rm -f conftest*
8472 fi
8473
8474 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8475 if test $ol_cv_cpp_ebcdic = yes ; then
8476         cat >> confdefs.h <<\EOF
8477 #define HAVE_EBCDIC 1
8478 EOF
8479
8480 fi
8481
8482 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8483 echo "configure:8484: checking for ANSI C header files" >&5
8484 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8485   echo $ac_n "(cached) $ac_c" 1>&6
8486 else
8487   cat > conftest.$ac_ext <<EOF
8488 #line 8489 "configure"
8489 #include "confdefs.h"
8490 #include <stdlib.h>
8491 #include <stdarg.h>
8492 #include <string.h>
8493 #include <float.h>
8494 EOF
8495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8496 { (eval echo configure:8497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8498 if test -z "$ac_err"; then
8499   rm -rf conftest*
8500   ol_cv_header_stdc=yes
8501 else
8502   echo "$ac_err" >&5
8503   echo "configure: failed program was:" >&5
8504   cat conftest.$ac_ext >&5
8505   rm -rf conftest*
8506   ol_cv_header_stdc=no
8507 fi
8508 rm -f conftest*
8509
8510 if test $ol_cv_header_stdc = yes; then
8511   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8512 cat > conftest.$ac_ext <<EOF
8513 #line 8514 "configure"
8514 #include "confdefs.h"
8515 #include <string.h>
8516 EOF
8517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8518   egrep "memchr" >/dev/null 2>&1; then
8519   :
8520 else
8521   rm -rf conftest*
8522   ol_cv_header_stdc=no
8523 fi
8524 rm -f conftest*
8525
8526 fi
8527
8528 if test $ol_cv_header_stdc = yes; then
8529   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8530 cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 #include <stdlib.h>
8534 EOF
8535 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8536   egrep "free" >/dev/null 2>&1; then
8537   :
8538 else
8539   rm -rf conftest*
8540   ol_cv_header_stdc=no
8541 fi
8542 rm -f conftest*
8543
8544 fi
8545
8546 if test $ol_cv_header_stdc = yes; then
8547   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8548 if test "$cross_compiling" = yes; then
8549   :
8550 else
8551   cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 #include <ctype.h>
8555 #ifndef HAVE_EBCDIC
8556 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8557 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8558 #else
8559 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8560                 || ('j' <= (c) && (c) <= 'r') \
8561                 || ('s' <= (c) && (c) <= 'z'))
8562 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8563 #endif
8564 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8565 int main () { int i; for (i = 0; i < 256; i++)
8566 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8567 exit (0); }
8568
8569 EOF
8570 if { (eval echo configure:8571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8571 then
8572   :
8573 else
8574   echo "configure: failed program was:" >&5
8575   cat conftest.$ac_ext >&5
8576   rm -fr conftest*
8577   ol_cv_header_stdc=no
8578 fi
8579 rm -fr conftest*
8580 fi
8581
8582 fi
8583 fi
8584
8585 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8586 if test $ol_cv_header_stdc = yes; then
8587   cat >> confdefs.h <<\EOF
8588 #define STDC_HEADERS 1
8589 EOF
8590
8591 fi
8592 ac_cv_header_stdc=disable
8593
8594
8595 if test $ol_cv_header_stdc != yes; then
8596         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8597 fi
8598
8599 ac_header_dirent=no
8600 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8601 do
8602 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8603 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8604 echo "configure:8605: checking for $ac_hdr that defines DIR" >&5
8605 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8606   echo $ac_n "(cached) $ac_c" 1>&6
8607 else
8608   cat > conftest.$ac_ext <<EOF
8609 #line 8610 "configure"
8610 #include "confdefs.h"
8611 #include <sys/types.h>
8612 #include <$ac_hdr>
8613 int main() {
8614 DIR *dirp = 0;
8615 ; return 0; }
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8618   rm -rf conftest*
8619   eval "ac_cv_header_dirent_$ac_safe=yes"
8620 else
8621   echo "configure: failed program was:" >&5
8622   cat conftest.$ac_ext >&5
8623   rm -rf conftest*
8624   eval "ac_cv_header_dirent_$ac_safe=no"
8625 fi
8626 rm -f conftest*
8627 fi
8628 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8629   echo "$ac_t""yes" 1>&6
8630     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8631   cat >> confdefs.h <<EOF
8632 #define $ac_tr_hdr 1
8633 EOF
8634  ac_header_dirent=$ac_hdr; break
8635 else
8636   echo "$ac_t""no" 1>&6
8637 fi
8638 done
8639 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8640 if test $ac_header_dirent = dirent.h; then
8641 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8642 echo "configure:8643: checking for opendir in -ldir" >&5
8643 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8645   echo $ac_n "(cached) $ac_c" 1>&6
8646 else
8647   ac_save_LIBS="$LIBS"
8648 LIBS="-ldir  $LIBS"
8649 cat > conftest.$ac_ext <<EOF
8650 #line 8651 "configure"
8651 #include "confdefs.h"
8652 /* Override any gcc2 internal prototype to avoid an error.  */
8653 /* We use char because int might match the return type of a gcc2
8654     builtin and then its argument prototype would still apply.  */
8655 char opendir();
8656
8657 int main() {
8658 opendir()
8659 ; return 0; }
8660 EOF
8661 if { (eval echo configure:8662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8662   rm -rf conftest*
8663   eval "ac_cv_lib_$ac_lib_var=yes"
8664 else
8665   echo "configure: failed program was:" >&5
8666   cat conftest.$ac_ext >&5
8667   rm -rf conftest*
8668   eval "ac_cv_lib_$ac_lib_var=no"
8669 fi
8670 rm -f conftest*
8671 LIBS="$ac_save_LIBS"
8672
8673 fi
8674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8675   echo "$ac_t""yes" 1>&6
8676   LIBS="$LIBS -ldir"
8677 else
8678   echo "$ac_t""no" 1>&6
8679 fi
8680
8681 else
8682 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8683 echo "configure:8684: checking for opendir in -lx" >&5
8684 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8685 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8686   echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688   ac_save_LIBS="$LIBS"
8689 LIBS="-lx  $LIBS"
8690 cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693 /* Override any gcc2 internal prototype to avoid an error.  */
8694 /* We use char because int might match the return type of a gcc2
8695     builtin and then its argument prototype would still apply.  */
8696 char opendir();
8697
8698 int main() {
8699 opendir()
8700 ; return 0; }
8701 EOF
8702 if { (eval echo configure:8703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8703   rm -rf conftest*
8704   eval "ac_cv_lib_$ac_lib_var=yes"
8705 else
8706   echo "configure: failed program was:" >&5
8707   cat conftest.$ac_ext >&5
8708   rm -rf conftest*
8709   eval "ac_cv_lib_$ac_lib_var=no"
8710 fi
8711 rm -f conftest*
8712 LIBS="$ac_save_LIBS"
8713
8714 fi
8715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8716   echo "$ac_t""yes" 1>&6
8717   LIBS="$LIBS -lx"
8718 else
8719   echo "$ac_t""no" 1>&6
8720 fi
8721
8722 fi
8723
8724 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8725 echo "configure:8726: checking for sys/wait.h that is POSIX.1 compatible" >&5
8726 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8727   echo $ac_n "(cached) $ac_c" 1>&6
8728 else
8729   cat > conftest.$ac_ext <<EOF
8730 #line 8731 "configure"
8731 #include "confdefs.h"
8732 #include <sys/types.h>
8733 #include <sys/wait.h>
8734 #ifndef WEXITSTATUS
8735 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8736 #endif
8737 #ifndef WIFEXITED
8738 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8739 #endif
8740 int main() {
8741 int s;
8742 wait (&s);
8743 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8744 ; return 0; }
8745 EOF
8746 if { (eval echo configure:8747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8747   rm -rf conftest*
8748   ac_cv_header_sys_wait_h=yes
8749 else
8750   echo "configure: failed program was:" >&5
8751   cat conftest.$ac_ext >&5
8752   rm -rf conftest*
8753   ac_cv_header_sys_wait_h=no
8754 fi
8755 rm -f conftest*
8756 fi
8757
8758 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8759 if test $ac_cv_header_sys_wait_h = yes; then
8760   cat >> confdefs.h <<\EOF
8761 #define HAVE_SYS_WAIT_H 1
8762 EOF
8763
8764 fi
8765
8766 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8767 echo "configure:8768: checking POSIX termios" >&5
8768 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8769   echo $ac_n "(cached) $ac_c" 1>&6
8770 else
8771   cat > conftest.$ac_ext <<EOF
8772 #line 8773 "configure"
8773 #include "confdefs.h"
8774 #include <sys/types.h>
8775 #include <unistd.h>
8776 #include <termios.h>
8777 int main() {
8778 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8779    tcgetattr(0, 0);
8780 ; return 0; }
8781 EOF
8782 if { (eval echo configure:8783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8783   rm -rf conftest*
8784   am_cv_sys_posix_termios=yes
8785 else
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -rf conftest*
8789   am_cv_sys_posix_termios=no
8790 fi
8791 rm -f conftest*
8792 fi
8793
8794 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8795
8796
8797  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8798 echo "configure:8799: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8799 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8800   echo $ac_n "(cached) $ac_c" 1>&6
8801 else
8802   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8803
8804   gwinsz_in_termios_h=no
8805   if test $am_cv_sys_posix_termios = yes; then
8806     cat > conftest.$ac_ext <<EOF
8807 #line 8808 "configure"
8808 #include "confdefs.h"
8809 #include <sys/types.h>
8810 #     include <termios.h>
8811 #     ifdef TIOCGWINSZ
8812         yes
8813 #     endif
8814     
8815 EOF
8816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8817   egrep "yes" >/dev/null 2>&1; then
8818   rm -rf conftest*
8819   gwinsz_in_termios_h=yes
8820 fi
8821 rm -f conftest*
8822
8823   fi
8824
8825   if test $gwinsz_in_termios_h = no; then
8826     cat > conftest.$ac_ext <<EOF
8827 #line 8828 "configure"
8828 #include "confdefs.h"
8829 #include <sys/types.h>
8830 #     include <sys/ioctl.h>
8831 #     ifdef TIOCGWINSZ
8832         yes
8833 #     endif
8834     
8835 EOF
8836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8837   egrep "yes" >/dev/null 2>&1; then
8838   rm -rf conftest*
8839   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8840 fi
8841 rm -f conftest*
8842
8843   fi
8844   
8845 fi
8846
8847 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8848   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8849     cat >> confdefs.h <<\EOF
8850 #define GWINSZ_IN_SYS_IOCTL 1
8851 EOF
8852
8853   fi
8854
8855 if test $am_cv_sys_posix_termios = yes ; then
8856         cat >> confdefs.h <<\EOF
8857 #define HAVE_POSIX_TERMIOS 1
8858 EOF
8859
8860 fi
8861
8862 for ac_hdr in \
8863         arpa/inet.h             \
8864         arpa/nameser.h  \
8865         assert.h                \
8866         conio.h                 \
8867         crypt.h                 \
8868         direct.h                \
8869         errno.h                 \
8870         fcntl.h                 \
8871         filio.h                 \
8872         getopt.h                \
8873         grp.h                   \
8874         io.h                    \
8875         libutil.h               \
8876         limits.h                \
8877         locale.h                \
8878         netinet/tcp.h   \
8879         malloc.h                \
8880         memory.h                \
8881         psap.h                  \
8882         pwd.h                   \
8883         process.h               \
8884         resolv.h                \
8885         sgtty.h                 \
8886         shadow.h                \
8887         stddef.h                \
8888         string.h                \
8889         strings.h               \
8890         sysexits.h              \
8891         sys/file.h              \
8892         sys/filio.h             \
8893         sys/errno.h             \
8894         sys/ioctl.h             \
8895         sys/param.h             \
8896         sys/resource.h  \
8897         sys/select.h    \
8898         sys/socket.h    \
8899         sys/syslog.h    \
8900         sys/time.h              \
8901         sys/types.h             \
8902         syslog.h                \
8903         termios.h               \
8904         unistd.h                \
8905         winsock.h               \
8906         winsock2.h              \
8907
8908 do
8909 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8910 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8911 echo "configure:8912: checking for $ac_hdr" >&5
8912 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8913   echo $ac_n "(cached) $ac_c" 1>&6
8914 else
8915   cat > conftest.$ac_ext <<EOF
8916 #line 8917 "configure"
8917 #include "confdefs.h"
8918 #include <$ac_hdr>
8919 EOF
8920 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8921 { (eval echo configure:8922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8922 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8923 if test -z "$ac_err"; then
8924   rm -rf conftest*
8925   eval "ac_cv_header_$ac_safe=yes"
8926 else
8927   echo "$ac_err" >&5
8928   echo "configure: failed program was:" >&5
8929   cat conftest.$ac_ext >&5
8930   rm -rf conftest*
8931   eval "ac_cv_header_$ac_safe=no"
8932 fi
8933 rm -f conftest*
8934 fi
8935 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8936   echo "$ac_t""yes" 1>&6
8937     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8938   cat >> confdefs.h <<EOF
8939 #define $ac_tr_hdr 1
8940 EOF
8941  
8942 else
8943   echo "$ac_t""no" 1>&6
8944 fi
8945 done
8946
8947
8948
8949
8950 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8951 echo "configure:8952: checking for dlopen" >&5
8952 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8953   echo $ac_n "(cached) $ac_c" 1>&6
8954 else
8955   cat > conftest.$ac_ext <<EOF
8956 #line 8957 "configure"
8957 #include "confdefs.h"
8958 /* System header to define __stub macros and hopefully few prototypes,
8959     which can conflict with char dlopen(); below.  */
8960 #include <assert.h>
8961 /* Override any gcc2 internal prototype to avoid an error.  */
8962 /* We use char because int might match the return type of a gcc2
8963     builtin and then its argument prototype would still apply.  */
8964 char dlopen();
8965 char (*f)();
8966
8967 int main() {
8968
8969 /* The GNU C library defines this for functions which it implements
8970     to always fail with ENOSYS.  Some functions are actually named
8971     something starting with __ and the normal name is an alias.  */
8972 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8973 choke me
8974 #else
8975 f = dlopen;
8976 #endif
8977
8978 ; return 0; }
8979 EOF
8980 if { (eval echo configure:8981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8981   rm -rf conftest*
8982   eval "ac_cv_func_dlopen=yes"
8983 else
8984   echo "configure: failed program was:" >&5
8985   cat conftest.$ac_ext >&5
8986   rm -rf conftest*
8987   eval "ac_cv_func_dlopen=no"
8988 fi
8989 rm -f conftest*
8990 fi
8991
8992 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8993   echo "$ac_t""yes" 1>&6
8994   :
8995 else
8996   echo "$ac_t""no" 1>&6
8997 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8998 echo "configure:8999: checking for dlopen in -ldl" >&5
8999 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   ac_save_LIBS="$LIBS"
9004 LIBS="-ldl  $LIBS"
9005 cat > conftest.$ac_ext <<EOF
9006 #line 9007 "configure"
9007 #include "confdefs.h"
9008 /* Override any gcc2 internal prototype to avoid an error.  */
9009 /* We use char because int might match the return type of a gcc2
9010     builtin and then its argument prototype would still apply.  */
9011 char dlopen();
9012
9013 int main() {
9014 dlopen()
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   eval "ac_cv_lib_$ac_lib_var=yes"
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   eval "ac_cv_lib_$ac_lib_var=no"
9025 fi
9026 rm -f conftest*
9027 LIBS="$ac_save_LIBS"
9028
9029 fi
9030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9031   echo "$ac_t""yes" 1>&6
9032     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9033     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9034   cat >> confdefs.h <<EOF
9035 #define $ac_tr_lib 1
9036 EOF
9037
9038   LIBS="-ldl $LIBS"
9039
9040 else
9041   echo "$ac_t""no" 1>&6
9042 fi
9043
9044 fi
9045
9046
9047 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9048 echo "configure:9049: checking for sigset in -lV3" >&5
9049 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9051   echo $ac_n "(cached) $ac_c" 1>&6
9052 else
9053   ac_save_LIBS="$LIBS"
9054 LIBS="-lV3  $LIBS"
9055 cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9058 /* Override any gcc2 internal prototype to avoid an error.  */
9059 /* We use char because int might match the return type of a gcc2
9060     builtin and then its argument prototype would still apply.  */
9061 char sigset();
9062
9063 int main() {
9064 sigset()
9065 ; return 0; }
9066 EOF
9067 if { (eval echo configure:9068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9068   rm -rf conftest*
9069   eval "ac_cv_lib_$ac_lib_var=yes"
9070 else
9071   echo "configure: failed program was:" >&5
9072   cat conftest.$ac_ext >&5
9073   rm -rf conftest*
9074   eval "ac_cv_lib_$ac_lib_var=no"
9075 fi
9076 rm -f conftest*
9077 LIBS="$ac_save_LIBS"
9078
9079 fi
9080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9081   echo "$ac_t""yes" 1>&6
9082     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9083     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9084   cat >> confdefs.h <<EOF
9085 #define $ac_tr_lib 1
9086 EOF
9087
9088   LIBS="-lV3 $LIBS"
9089
9090 else
9091   echo "$ac_t""no" 1>&6
9092 fi
9093
9094
9095 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9096 echo "configure:9097: checking for winsock" >&5
9097 save_LIBS="$LIBS"
9098 for curlib in ws2_32 wsock32; do
9099         LIBS="$LIBS -l$curlib"
9100         cat > conftest.$ac_ext <<EOF
9101 #line 9102 "configure"
9102 #include "confdefs.h"
9103
9104                         char socket@12();
9105                         char select@20();
9106                         char closesocket@4();
9107                         char gethostname@8();
9108                         
9109 int main() {
9110
9111                         socket@12();
9112                         select@20();
9113                         closesocket@4();
9114                         gethostname@8();
9115                         
9116 ; return 0; }
9117 EOF
9118 if { (eval echo configure:9119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9119   rm -rf conftest*
9120   have_winsock=yes
9121 else
9122   echo "configure: failed program was:" >&5
9123   cat conftest.$ac_ext >&5
9124   rm -rf conftest*
9125   have_winsock=no
9126 fi
9127 rm -f conftest*
9128
9129         if test $have_winsock = yes; then
9130                 cat >> confdefs.h <<\EOF
9131 #define HAVE_WINSOCK 1
9132 EOF
9133
9134                 ac_cv_func_socket=yes
9135                 ac_cv_func_select=yes
9136                 ac_cv_func_closesocket=yes
9137                 ac_cv_func_gethostname=yes
9138                 if test $curlib = ws2_32; then
9139                         have_winsock=winsock2
9140                         cat >> confdefs.h <<\EOF
9141 #define HAVE_WINSOCK2 1
9142 EOF
9143
9144                 fi
9145                 break
9146         fi
9147         LIBS="$save_LIBS"
9148 done
9149 echo "$ac_t""$have_winsock" 1>&6
9150
9151
9152 echo $ac_n "checking for socket""... $ac_c" 1>&6
9153 echo "configure:9154: checking for socket" >&5
9154 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9155   echo $ac_n "(cached) $ac_c" 1>&6
9156 else
9157   cat > conftest.$ac_ext <<EOF
9158 #line 9159 "configure"
9159 #include "confdefs.h"
9160 /* System header to define __stub macros and hopefully few prototypes,
9161     which can conflict with char socket(); below.  */
9162 #include <assert.h>
9163 /* Override any gcc2 internal prototype to avoid an error.  */
9164 /* We use char because int might match the return type of a gcc2
9165     builtin and then its argument prototype would still apply.  */
9166 char socket();
9167 char (*f)();
9168
9169 int main() {
9170
9171 /* The GNU C library defines this for functions which it implements
9172     to always fail with ENOSYS.  Some functions are actually named
9173     something starting with __ and the normal name is an alias.  */
9174 #if defined (__stub_socket) || defined (__stub___socket)
9175 choke me
9176 #else
9177 f = socket;
9178 #endif
9179
9180 ; return 0; }
9181 EOF
9182 if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9183   rm -rf conftest*
9184   eval "ac_cv_func_socket=yes"
9185 else
9186   echo "configure: failed program was:" >&5
9187   cat conftest.$ac_ext >&5
9188   rm -rf conftest*
9189   eval "ac_cv_func_socket=no"
9190 fi
9191 rm -f conftest*
9192 fi
9193
9194 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9195   echo "$ac_t""yes" 1>&6
9196   :
9197 else
9198   echo "$ac_t""no" 1>&6
9199         
9200         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9201 echo "configure:9202: checking for main in -lsocket" >&5
9202 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9203 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9204   echo $ac_n "(cached) $ac_c" 1>&6
9205 else
9206   ac_save_LIBS="$LIBS"
9207 LIBS="-lsocket  $LIBS"
9208 cat > conftest.$ac_ext <<EOF
9209 #line 9210 "configure"
9210 #include "confdefs.h"
9211
9212 int main() {
9213 main()
9214 ; return 0; }
9215 EOF
9216 if { (eval echo configure:9217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9217   rm -rf conftest*
9218   eval "ac_cv_lib_$ac_lib_var=yes"
9219 else
9220   echo "configure: failed program was:" >&5
9221   cat conftest.$ac_ext >&5
9222   rm -rf conftest*
9223   eval "ac_cv_lib_$ac_lib_var=no"
9224 fi
9225 rm -f conftest*
9226 LIBS="$ac_save_LIBS"
9227
9228 fi
9229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9230   echo "$ac_t""yes" 1>&6
9231     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9232     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9233   cat >> confdefs.h <<EOF
9234 #define $ac_tr_lib 1
9235 EOF
9236
9237   LIBS="-lsocket $LIBS"
9238
9239 else
9240   echo "$ac_t""no" 1>&6
9241 fi
9242
9243         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9244 echo "configure:9245: checking for main in -lnet" >&5
9245 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9246 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9247   echo $ac_n "(cached) $ac_c" 1>&6
9248 else
9249   ac_save_LIBS="$LIBS"
9250 LIBS="-lnet  $LIBS"
9251 cat > conftest.$ac_ext <<EOF
9252 #line 9253 "configure"
9253 #include "confdefs.h"
9254
9255 int main() {
9256 main()
9257 ; return 0; }
9258 EOF
9259 if { (eval echo configure:9260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9260   rm -rf conftest*
9261   eval "ac_cv_lib_$ac_lib_var=yes"
9262 else
9263   echo "configure: failed program was:" >&5
9264   cat conftest.$ac_ext >&5
9265   rm -rf conftest*
9266   eval "ac_cv_lib_$ac_lib_var=no"
9267 fi
9268 rm -f conftest*
9269 LIBS="$ac_save_LIBS"
9270
9271 fi
9272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9273   echo "$ac_t""yes" 1>&6
9274     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9275     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9276   cat >> confdefs.h <<EOF
9277 #define $ac_tr_lib 1
9278 EOF
9279
9280   LIBS="-lnet $LIBS"
9281
9282 else
9283   echo "$ac_t""no" 1>&6
9284 fi
9285
9286         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9287 echo "configure:9288: checking for main in -lnsl_s" >&5
9288 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9289 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9290   echo $ac_n "(cached) $ac_c" 1>&6
9291 else
9292   ac_save_LIBS="$LIBS"
9293 LIBS="-lnsl_s  $LIBS"
9294 cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297
9298 int main() {
9299 main()
9300 ; return 0; }
9301 EOF
9302 if { (eval echo configure:9303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9303   rm -rf conftest*
9304   eval "ac_cv_lib_$ac_lib_var=yes"
9305 else
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -rf conftest*
9309   eval "ac_cv_lib_$ac_lib_var=no"
9310 fi
9311 rm -f conftest*
9312 LIBS="$ac_save_LIBS"
9313
9314 fi
9315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9316   echo "$ac_t""yes" 1>&6
9317     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9318     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9319   cat >> confdefs.h <<EOF
9320 #define $ac_tr_lib 1
9321 EOF
9322
9323   LIBS="-lnsl_s $LIBS"
9324
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328
9329         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9330 echo "configure:9331: checking for main in -lnsl" >&5
9331 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9332 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9333   echo $ac_n "(cached) $ac_c" 1>&6
9334 else
9335   ac_save_LIBS="$LIBS"
9336 LIBS="-lnsl  $LIBS"
9337 cat > conftest.$ac_ext <<EOF
9338 #line 9339 "configure"
9339 #include "confdefs.h"
9340
9341 int main() {
9342 main()
9343 ; return 0; }
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9346   rm -rf conftest*
9347   eval "ac_cv_lib_$ac_lib_var=yes"
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -rf conftest*
9352   eval "ac_cv_lib_$ac_lib_var=no"
9353 fi
9354 rm -f conftest*
9355 LIBS="$ac_save_LIBS"
9356
9357 fi
9358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9359   echo "$ac_t""yes" 1>&6
9360     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9361     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9362   cat >> confdefs.h <<EOF
9363 #define $ac_tr_lib 1
9364 EOF
9365
9366   LIBS="-lnsl $LIBS"
9367
9368 else
9369   echo "$ac_t""no" 1>&6
9370 fi
9371
9372         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9373 echo "configure:9374: checking for socket in -linet" >&5
9374 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9375 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9376   echo $ac_n "(cached) $ac_c" 1>&6
9377 else
9378   ac_save_LIBS="$LIBS"
9379 LIBS="-linet  $LIBS"
9380 cat > conftest.$ac_ext <<EOF
9381 #line 9382 "configure"
9382 #include "confdefs.h"
9383 /* Override any gcc2 internal prototype to avoid an error.  */
9384 /* We use char because int might match the return type of a gcc2
9385     builtin and then its argument prototype would still apply.  */
9386 char socket();
9387
9388 int main() {
9389 socket()
9390 ; return 0; }
9391 EOF
9392 if { (eval echo configure:9393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9393   rm -rf conftest*
9394   eval "ac_cv_lib_$ac_lib_var=yes"
9395 else
9396   echo "configure: failed program was:" >&5
9397   cat conftest.$ac_ext >&5
9398   rm -rf conftest*
9399   eval "ac_cv_lib_$ac_lib_var=no"
9400 fi
9401 rm -f conftest*
9402 LIBS="$ac_save_LIBS"
9403
9404 fi
9405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9406   echo "$ac_t""yes" 1>&6
9407     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9408     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9409   cat >> confdefs.h <<EOF
9410 #define $ac_tr_lib 1
9411 EOF
9412
9413   LIBS="-linet $LIBS"
9414
9415 else
9416   echo "$ac_t""no" 1>&6
9417 fi
9418
9419         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9420 echo "configure:9421: checking for main in -lgen" >&5
9421 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9422 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9423   echo $ac_n "(cached) $ac_c" 1>&6
9424 else
9425   ac_save_LIBS="$LIBS"
9426 LIBS="-lgen  $LIBS"
9427 cat > conftest.$ac_ext <<EOF
9428 #line 9429 "configure"
9429 #include "confdefs.h"
9430
9431 int main() {
9432 main()
9433 ; return 0; }
9434 EOF
9435 if { (eval echo configure:9436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9436   rm -rf conftest*
9437   eval "ac_cv_lib_$ac_lib_var=yes"
9438 else
9439   echo "configure: failed program was:" >&5
9440   cat conftest.$ac_ext >&5
9441   rm -rf conftest*
9442   eval "ac_cv_lib_$ac_lib_var=no"
9443 fi
9444 rm -f conftest*
9445 LIBS="$ac_save_LIBS"
9446
9447 fi
9448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9449   echo "$ac_t""yes" 1>&6
9450     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9451     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9452   cat >> confdefs.h <<EOF
9453 #define $ac_tr_lib 1
9454 EOF
9455
9456   LIBS="-lgen $LIBS"
9457
9458 else
9459   echo "$ac_t""no" 1>&6
9460 fi
9461
9462
9463 fi
9464
9465
9466 echo $ac_n "checking for select""... $ac_c" 1>&6
9467 echo "configure:9468: checking for select" >&5
9468 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9469   echo $ac_n "(cached) $ac_c" 1>&6
9470 else
9471   cat > conftest.$ac_ext <<EOF
9472 #line 9473 "configure"
9473 #include "confdefs.h"
9474 /* System header to define __stub macros and hopefully few prototypes,
9475     which can conflict with char select(); below.  */
9476 #include <assert.h>
9477 /* Override any gcc2 internal prototype to avoid an error.  */
9478 /* We use char because int might match the return type of a gcc2
9479     builtin and then its argument prototype would still apply.  */
9480 char select();
9481 char (*f)();
9482
9483 int main() {
9484
9485 /* The GNU C library defines this for functions which it implements
9486     to always fail with ENOSYS.  Some functions are actually named
9487     something starting with __ and the normal name is an alias.  */
9488 #if defined (__stub_select) || defined (__stub___select)
9489 choke me
9490 #else
9491 f = select;
9492 #endif
9493
9494 ; return 0; }
9495 EOF
9496 if { (eval echo configure:9497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9497   rm -rf conftest*
9498   eval "ac_cv_func_select=yes"
9499 else
9500   echo "configure: failed program was:" >&5
9501   cat conftest.$ac_ext >&5
9502   rm -rf conftest*
9503   eval "ac_cv_func_select=no"
9504 fi
9505 rm -f conftest*
9506 fi
9507
9508 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9509   echo "$ac_t""yes" 1>&6
9510   :
9511 else
9512   echo "$ac_t""no" 1>&6
9513 { echo "configure: error: select() required." 1>&2; exit 1; }
9514 fi
9515
9516
9517 if test "${ac_cv_header_winsock_h}" != yes; then
9518                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9519 echo "configure:9520: checking types of arguments for select()" >&5
9520  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9521   echo $ac_n "(cached) $ac_c" 1>&6
9522 else
9523    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9524   echo $ac_n "(cached) $ac_c" 1>&6
9525 else
9526     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9527   echo $ac_n "(cached) $ac_c" 1>&6
9528 else
9529      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9530      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9531       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9532        cat > conftest.$ac_ext <<EOF
9533 #line 9534 "configure"
9534 #include "confdefs.h"
9535 #ifdef HAVE_SYS_TYPES_H
9536 #include <sys/types.h>
9537 #endif
9538 #ifdef HAVE_SYS_TIME_H
9539 #include <sys/time.h>
9540 #endif
9541 #ifdef HAVE_SYS_SELECT_H
9542 #include <sys/select.h>
9543 #endif
9544 #ifdef HAVE_SYS_SOCKET_H
9545 #include <sys/socket.h>
9546 #endif
9547 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);
9548 int main() {
9549
9550 ; return 0; }
9551 EOF
9552 if { (eval echo configure:9553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9553   rm -rf conftest*
9554           ac_not_found=no ; break 3
9555 else
9556   echo "configure: failed program was:" >&5
9557   cat conftest.$ac_ext >&5
9558   rm -rf conftest*
9559   ac_not_found=yes
9560 fi
9561 rm -f conftest*
9562       done
9563      done
9564     done
9565    
9566 fi
9567   
9568 fi
9569  
9570 fi
9571  if test "$ac_not_found" = yes; then
9572   ac_cv_func_select_arg1=int 
9573   ac_cv_func_select_arg234='int *' 
9574   ac_cv_func_select_arg5='struct timeval *'
9575  fi
9576  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9577  cat >> confdefs.h <<EOF
9578 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9579 EOF
9580
9581  cat >> confdefs.h <<EOF
9582 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9583 EOF
9584
9585  cat >> confdefs.h <<EOF
9586 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9587 EOF
9588
9589
9590 fi
9591
9592
9593 for ac_hdr in regex.h 
9594 do
9595 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9596 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9597 echo "configure:9598: checking for $ac_hdr" >&5
9598 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9599   echo $ac_n "(cached) $ac_c" 1>&6
9600 else
9601   cat > conftest.$ac_ext <<EOF
9602 #line 9603 "configure"
9603 #include "confdefs.h"
9604 #include <$ac_hdr>
9605 EOF
9606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9607 { (eval echo configure:9608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9609 if test -z "$ac_err"; then
9610   rm -rf conftest*
9611   eval "ac_cv_header_$ac_safe=yes"
9612 else
9613   echo "$ac_err" >&5
9614   echo "configure: failed program was:" >&5
9615   cat conftest.$ac_ext >&5
9616   rm -rf conftest*
9617   eval "ac_cv_header_$ac_safe=no"
9618 fi
9619 rm -f conftest*
9620 fi
9621 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9622   echo "$ac_t""yes" 1>&6
9623     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9624   cat >> confdefs.h <<EOF
9625 #define $ac_tr_hdr 1
9626 EOF
9627  
9628 else
9629   echo "$ac_t""no" 1>&6
9630 fi
9631 done
9632
9633 if test "$ac_cv_header_regex_h" != yes ; then
9634         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9635 fi
9636
9637 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9638 echo "configure:9639: checking for library containing regfree" >&5
9639 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9640   echo $ac_n "(cached) $ac_c" 1>&6
9641 else
9642   ac_func_search_save_LIBS="$LIBS"
9643 ac_cv_search_regfree="no"
9644 cat > conftest.$ac_ext <<EOF
9645 #line 9646 "configure"
9646 #include "confdefs.h"
9647 /* Override any gcc2 internal prototype to avoid an error.  */
9648 /* We use char because int might match the return type of a gcc2
9649     builtin and then its argument prototype would still apply.  */
9650 char regfree();
9651
9652 int main() {
9653 regfree()
9654 ; return 0; }
9655 EOF
9656 if { (eval echo configure:9657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9657   rm -rf conftest*
9658   ac_cv_search_regfree="none required"
9659 else
9660   echo "configure: failed program was:" >&5
9661   cat conftest.$ac_ext >&5
9662 fi
9663 rm -f conftest*
9664 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9665 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9666 cat > conftest.$ac_ext <<EOF
9667 #line 9668 "configure"
9668 #include "confdefs.h"
9669 /* Override any gcc2 internal prototype to avoid an error.  */
9670 /* We use char because int might match the return type of a gcc2
9671     builtin and then its argument prototype would still apply.  */
9672 char regfree();
9673
9674 int main() {
9675 regfree()
9676 ; return 0; }
9677 EOF
9678 if { (eval echo configure:9679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9679   rm -rf conftest*
9680   ac_cv_search_regfree="-l$ac_lib"
9681 break
9682 else
9683   echo "configure: failed program was:" >&5
9684   cat conftest.$ac_ext >&5
9685 fi
9686 rm -f conftest*
9687 done
9688 LIBS="$ac_func_search_save_LIBS"
9689 fi
9690
9691 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9692 if test "$ac_cv_search_regfree" != "no"; then
9693   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9694   :
9695 else :
9696   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9697 fi
9698
9699
9700 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9701 echo "configure:9702: checking for compatible POSIX regex" >&5
9702 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9703   echo $ac_n "(cached) $ac_c" 1>&6
9704 else
9705   
9706         if test "$cross_compiling" = yes; then
9707   ol_cv_c_posix_regex=cross
9708 else
9709   cat > conftest.$ac_ext <<EOF
9710 #line 9711 "configure"
9711 #include "confdefs.h"
9712
9713 #include <sys/types.h>
9714 #include <regex.h>
9715 static char *pattern, *string;
9716 main()
9717 {
9718         int rc;
9719         regex_t re;
9720
9721         pattern = "^A";
9722
9723         if(regcomp(&re, pattern, 0)) {
9724                 return -1;
9725         }
9726         
9727         string = "ALL MATCH";
9728         
9729         rc = regexec(&re, string, 0, (void*)0, 0);
9730
9731         regfree(&re);
9732
9733         return rc;
9734 }
9735 EOF
9736 if { (eval echo configure:9737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9737 then
9738   ol_cv_c_posix_regex=yes
9739 else
9740   echo "configure: failed program was:" >&5
9741   cat conftest.$ac_ext >&5
9742   rm -fr conftest*
9743   ol_cv_c_posix_regex=no
9744 fi
9745 rm -fr conftest*
9746 fi
9747
9748 fi
9749
9750 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9751
9752 if test "$ol_cv_c_posix_regex" = no ; then
9753         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9754 fi
9755
9756
9757 have_uuid=no
9758 for ac_hdr in sys/uuid.h
9759 do
9760 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9761 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9762 echo "configure:9763: checking for $ac_hdr" >&5
9763 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9764   echo $ac_n "(cached) $ac_c" 1>&6
9765 else
9766   cat > conftest.$ac_ext <<EOF
9767 #line 9768 "configure"
9768 #include "confdefs.h"
9769 #include <$ac_hdr>
9770 EOF
9771 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9772 { (eval echo configure:9773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9773 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9774 if test -z "$ac_err"; then
9775   rm -rf conftest*
9776   eval "ac_cv_header_$ac_safe=yes"
9777 else
9778   echo "$ac_err" >&5
9779   echo "configure: failed program was:" >&5
9780   cat conftest.$ac_ext >&5
9781   rm -rf conftest*
9782   eval "ac_cv_header_$ac_safe=no"
9783 fi
9784 rm -f conftest*
9785 fi
9786 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9787   echo "$ac_t""yes" 1>&6
9788     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9789   cat >> confdefs.h <<EOF
9790 #define $ac_tr_hdr 1
9791 EOF
9792  
9793 else
9794   echo "$ac_t""no" 1>&6
9795 fi
9796 done
9797
9798 if test $ac_cv_header_sys_uuid_h = yes ; then
9799         save_LIBS="$LIBS"
9800         
9801 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9802 echo "configure:9803: checking for library containing uuid_to_str" >&5
9803 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9804   echo $ac_n "(cached) $ac_c" 1>&6
9805 else
9806   ac_func_search_save_LIBS="$LIBS"
9807 ac_cv_search_uuid_to_str="no"
9808 cat > conftest.$ac_ext <<EOF
9809 #line 9810 "configure"
9810 #include "confdefs.h"
9811 /* Override any gcc2 internal prototype to avoid an error.  */
9812 /* We use char because int might match the return type of a gcc2
9813     builtin and then its argument prototype would still apply.  */
9814 char uuid_to_str();
9815
9816 int main() {
9817 uuid_to_str()
9818 ; return 0; }
9819 EOF
9820 if { (eval echo configure:9821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9821   rm -rf conftest*
9822   ac_cv_search_uuid_to_str="none required"
9823 else
9824   echo "configure: failed program was:" >&5
9825   cat conftest.$ac_ext >&5
9826 fi
9827 rm -f conftest*
9828 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9829 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9830 cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9833 /* Override any gcc2 internal prototype to avoid an error.  */
9834 /* We use char because int might match the return type of a gcc2
9835     builtin and then its argument prototype would still apply.  */
9836 char uuid_to_str();
9837
9838 int main() {
9839 uuid_to_str()
9840 ; return 0; }
9841 EOF
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9843   rm -rf conftest*
9844   ac_cv_search_uuid_to_str="-l$ac_lib"
9845 break
9846 else
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849 fi
9850 rm -f conftest*
9851 done
9852 LIBS="$ac_func_search_save_LIBS"
9853 fi
9854
9855 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9856 if test "$ac_cv_search_uuid_to_str" != "no"; then
9857   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9858   have_uuid=yes
9859 else :
9860   :
9861 fi
9862         LIBS="$save_LIBS"
9863
9864         if test have_uuid = yes ; then
9865                 cat >> confdefs.h <<\EOF
9866 #define HAVE_UUID_TO_STR 1
9867 EOF
9868
9869
9870                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9871                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9872         fi
9873 fi
9874
9875 if test $have_uuid = no ; then
9876         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9877 echo "configure:9878: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9878         save_LIBS="$LIBS"
9879         LIBS="$LIBS -lrpcrt4"
9880         cat > conftest.$ac_ext <<EOF
9881 #line 9882 "configure"
9882 #include "confdefs.h"
9883
9884                 char UuidCreate@4();
9885                 char UuidToStringA@8();
9886                 
9887 int main() {
9888
9889                 UuidCreate@4();
9890                 UuidToStringA@8();
9891                 
9892 ; return 0; }
9893 EOF
9894 if { (eval echo configure:9895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9895   rm -rf conftest*
9896   need_rpcrt=yes
9897 else
9898   echo "configure: failed program was:" >&5
9899   cat conftest.$ac_ext >&5
9900   rm -rf conftest*
9901   need_rpcrt=no
9902 fi
9903 rm -f conftest*
9904         if test $need_rpcrt = yes; then
9905                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9906         fi
9907         LIBS="$save_LIBS"
9908         echo "$ac_t""$need_rpcrt" 1>&6
9909 fi
9910
9911 ol_link_dnssrv=no
9912 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9913 echo "configure:9914: checking for res_query" >&5
9914 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9915   echo $ac_n "(cached) $ac_c" 1>&6
9916 else
9917   cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 /* System header to define __stub macros and hopefully few prototypes,
9921     which can conflict with char res_query(); below.  */
9922 #include <assert.h>
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 /* We use char because int might match the return type of a gcc2
9925     builtin and then its argument prototype would still apply.  */
9926 char res_query();
9927 char (*f)();
9928
9929 int main() {
9930
9931 /* The GNU C library defines this for functions which it implements
9932     to always fail with ENOSYS.  Some functions are actually named
9933     something starting with __ and the normal name is an alias.  */
9934 #if defined (__stub_res_query) || defined (__stub___res_query)
9935 choke me
9936 #else
9937 f = res_query;
9938 #endif
9939
9940 ; return 0; }
9941 EOF
9942 if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9943   rm -rf conftest*
9944   eval "ac_cv_func_res_query=yes"
9945 else
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   eval "ac_cv_func_res_query=no"
9950 fi
9951 rm -f conftest*
9952 fi
9953
9954 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9955   echo "$ac_t""yes" 1>&6
9956   :
9957 else
9958   echo "$ac_t""no" 1>&6
9959 fi
9960
9961 if test $ac_cv_func_res_query = no ; then 
9962         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9963 echo "configure:9964: checking for __res_query" >&5
9964 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9965   echo $ac_n "(cached) $ac_c" 1>&6
9966 else
9967   cat > conftest.$ac_ext <<EOF
9968 #line 9969 "configure"
9969 #include "confdefs.h"
9970 /* System header to define __stub macros and hopefully few prototypes,
9971     which can conflict with char __res_query(); below.  */
9972 #include <assert.h>
9973 /* Override any gcc2 internal prototype to avoid an error.  */
9974 /* We use char because int might match the return type of a gcc2
9975     builtin and then its argument prototype would still apply.  */
9976 char __res_query();
9977 char (*f)();
9978
9979 int main() {
9980
9981 /* The GNU C library defines this for functions which it implements
9982     to always fail with ENOSYS.  Some functions are actually named
9983     something starting with __ and the normal name is an alias.  */
9984 #if defined (__stub___res_query) || defined (__stub_____res_query)
9985 choke me
9986 #else
9987 f = __res_query;
9988 #endif
9989
9990 ; return 0; }
9991 EOF
9992 if { (eval echo configure:9993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9993   rm -rf conftest*
9994   eval "ac_cv_func___res_query=yes"
9995 else
9996   echo "configure: failed program was:" >&5
9997   cat conftest.$ac_ext >&5
9998   rm -rf conftest*
9999   eval "ac_cv_func___res_query=no"
10000 fi
10001 rm -f conftest*
10002 fi
10003
10004 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10005   echo "$ac_t""yes" 1>&6
10006   :
10007 else
10008   echo "$ac_t""no" 1>&6
10009 fi
10010
10011         ac_cv_func_res_query=$ac_cv_func___res_query
10012 fi
10013
10014 if test $ac_cv_func_res_query = no ; then 
10015         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10016 echo "configure:10017: checking for res_query in -lbind" >&5
10017 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10018 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10019   echo $ac_n "(cached) $ac_c" 1>&6
10020 else
10021   ac_save_LIBS="$LIBS"
10022 LIBS="-lbind  $LIBS"
10023 cat > conftest.$ac_ext <<EOF
10024 #line 10025 "configure"
10025 #include "confdefs.h"
10026 /* Override any gcc2 internal prototype to avoid an error.  */
10027 /* We use char because int might match the return type of a gcc2
10028     builtin and then its argument prototype would still apply.  */
10029 char res_query();
10030
10031 int main() {
10032 res_query()
10033 ; return 0; }
10034 EOF
10035 if { (eval echo configure:10036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10036   rm -rf conftest*
10037   eval "ac_cv_lib_$ac_lib_var=yes"
10038 else
10039   echo "configure: failed program was:" >&5
10040   cat conftest.$ac_ext >&5
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=no"
10043 fi
10044 rm -f conftest*
10045 LIBS="$ac_save_LIBS"
10046
10047 fi
10048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10049   echo "$ac_t""yes" 1>&6
10050     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10051     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10052   cat >> confdefs.h <<EOF
10053 #define $ac_tr_lib 1
10054 EOF
10055
10056   LIBS="-lbind $LIBS"
10057
10058 else
10059   echo "$ac_t""no" 1>&6
10060 fi
10061
10062         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10063 fi
10064
10065 if test $ac_cv_func_res_query = no ; then 
10066         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10067 echo "configure:10068: checking for __res_query in -lbind" >&5
10068 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10069 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10070   echo $ac_n "(cached) $ac_c" 1>&6
10071 else
10072   ac_save_LIBS="$LIBS"
10073 LIBS="-lbind  $LIBS"
10074 cat > conftest.$ac_ext <<EOF
10075 #line 10076 "configure"
10076 #include "confdefs.h"
10077 /* Override any gcc2 internal prototype to avoid an error.  */
10078 /* We use char because int might match the return type of a gcc2
10079     builtin and then its argument prototype would still apply.  */
10080 char __res_query();
10081
10082 int main() {
10083 __res_query()
10084 ; return 0; }
10085 EOF
10086 if { (eval echo configure:10087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10087   rm -rf conftest*
10088   eval "ac_cv_lib_$ac_lib_var=yes"
10089 else
10090   echo "configure: failed program was:" >&5
10091   cat conftest.$ac_ext >&5
10092   rm -rf conftest*
10093   eval "ac_cv_lib_$ac_lib_var=no"
10094 fi
10095 rm -f conftest*
10096 LIBS="$ac_save_LIBS"
10097
10098 fi
10099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10100   echo "$ac_t""yes" 1>&6
10101     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10102     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10103   cat >> confdefs.h <<EOF
10104 #define $ac_tr_lib 1
10105 EOF
10106
10107   LIBS="-lbind $LIBS"
10108
10109 else
10110   echo "$ac_t""no" 1>&6
10111 fi
10112
10113         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10114 fi
10115
10116 if test $ac_cv_func_res_query = no ; then 
10117         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10118 echo "configure:10119: checking for res_query in -lresolv" >&5
10119 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10120 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10121   echo $ac_n "(cached) $ac_c" 1>&6
10122 else
10123   ac_save_LIBS="$LIBS"
10124 LIBS="-lresolv  $LIBS"
10125 cat > conftest.$ac_ext <<EOF
10126 #line 10127 "configure"
10127 #include "confdefs.h"
10128 /* Override any gcc2 internal prototype to avoid an error.  */
10129 /* We use char because int might match the return type of a gcc2
10130     builtin and then its argument prototype would still apply.  */
10131 char res_query();
10132
10133 int main() {
10134 res_query()
10135 ; return 0; }
10136 EOF
10137 if { (eval echo configure:10138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10138   rm -rf conftest*
10139   eval "ac_cv_lib_$ac_lib_var=yes"
10140 else
10141   echo "configure: failed program was:" >&5
10142   cat conftest.$ac_ext >&5
10143   rm -rf conftest*
10144   eval "ac_cv_lib_$ac_lib_var=no"
10145 fi
10146 rm -f conftest*
10147 LIBS="$ac_save_LIBS"
10148
10149 fi
10150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10151   echo "$ac_t""yes" 1>&6
10152     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10153     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10154   cat >> confdefs.h <<EOF
10155 #define $ac_tr_lib 1
10156 EOF
10157
10158   LIBS="-lresolv $LIBS"
10159
10160 else
10161   echo "$ac_t""no" 1>&6
10162 fi
10163
10164         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10165 fi
10166
10167 if test $ac_cv_func_res_query = no ; then 
10168         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10169 echo "configure:10170: checking for __res_query in -lresolv" >&5
10170 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10171 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10172   echo $ac_n "(cached) $ac_c" 1>&6
10173 else
10174   ac_save_LIBS="$LIBS"
10175 LIBS="-lresolv  $LIBS"
10176 cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179 /* Override any gcc2 internal prototype to avoid an error.  */
10180 /* We use char because int might match the return type of a gcc2
10181     builtin and then its argument prototype would still apply.  */
10182 char __res_query();
10183
10184 int main() {
10185 __res_query()
10186 ; return 0; }
10187 EOF
10188 if { (eval echo configure:10189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10189   rm -rf conftest*
10190   eval "ac_cv_lib_$ac_lib_var=yes"
10191 else
10192   echo "configure: failed program was:" >&5
10193   cat conftest.$ac_ext >&5
10194   rm -rf conftest*
10195   eval "ac_cv_lib_$ac_lib_var=no"
10196 fi
10197 rm -f conftest*
10198 LIBS="$ac_save_LIBS"
10199
10200 fi
10201 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10202   echo "$ac_t""yes" 1>&6
10203     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10204     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10205   cat >> confdefs.h <<EOF
10206 #define $ac_tr_lib 1
10207 EOF
10208
10209   LIBS="-lresolv $LIBS"
10210
10211 else
10212   echo "$ac_t""no" 1>&6
10213 fi
10214
10215         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10216 fi
10217
10218 if test "$ac_cv_func_res_query" = yes ; then
10219         cat >> confdefs.h <<\EOF
10220 #define HAVE_RES_QUERY 1
10221 EOF
10222
10223
10224         if test $ol_enable_dnssrv != no ; then
10225                 ol_link_dnssrv=yes
10226         fi
10227 fi
10228
10229 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10230         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10231 fi
10232
10233 for ac_func in getaddrinfo gai_strerror inet_ntop 
10234 do
10235 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10236 echo "configure:10237: checking for $ac_func" >&5
10237 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10238   echo $ac_n "(cached) $ac_c" 1>&6
10239 else
10240   cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243 /* System header to define __stub macros and hopefully few prototypes,
10244     which can conflict with char $ac_func(); below.  */
10245 #include <assert.h>
10246 /* Override any gcc2 internal prototype to avoid an error.  */
10247 /* We use char because int might match the return type of a gcc2
10248     builtin and then its argument prototype would still apply.  */
10249 char $ac_func();
10250 char (*f)();
10251
10252 int main() {
10253
10254 /* The GNU C library defines this for functions which it implements
10255     to always fail with ENOSYS.  Some functions are actually named
10256     something starting with __ and the normal name is an alias.  */
10257 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10258 choke me
10259 #else
10260 f = $ac_func;
10261 #endif
10262
10263 ; return 0; }
10264 EOF
10265 if { (eval echo configure:10266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10266   rm -rf conftest*
10267   eval "ac_cv_func_$ac_func=yes"
10268 else
10269   echo "configure: failed program was:" >&5
10270   cat conftest.$ac_ext >&5
10271   rm -rf conftest*
10272   eval "ac_cv_func_$ac_func=no"
10273 fi
10274 rm -f conftest*
10275 fi
10276
10277 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10278   echo "$ac_t""yes" 1>&6
10279     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10280   cat >> confdefs.h <<EOF
10281 #define $ac_tr_func 1
10282 EOF
10283  
10284 else
10285   echo "$ac_t""no" 1>&6
10286 fi
10287 done
10288
10289
10290 ol_link_ipv6=no
10291 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10292         if test $ol_enable_ipv6 = yes ; then
10293                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10294         fi
10295 elif test $ol_enable_ipv6 != no ; then
10296         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10297 echo "configure:10298: checking INET6_ADDRSTRLEN" >&5
10298 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10299   echo $ac_n "(cached) $ac_c" 1>&6
10300 else
10301   
10302                 cat > conftest.$ac_ext <<EOF
10303 #line 10304 "configure"
10304 #include "confdefs.h"
10305
10306 #                       include <netinet/in.h>
10307 #                       ifdef INET6_ADDRSTRLEN
10308                                 __has_inet6_addrstrlen__;
10309 #                       endif
10310                 
10311 EOF
10312 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10313   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10314   rm -rf conftest*
10315   ol_cv_inet6_addrstrlen=yes
10316 else
10317   rm -rf conftest*
10318   ol_cv_inet6_addrstrlen=no
10319 fi
10320 rm -f conftest*
10321
10322 fi
10323
10324 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10325
10326         if test $ol_cv_inet6_addrstrlen = yes ; then
10327                 ol_link_ipv6=yes
10328         elif test $ol_enable_ipv6 = yes ; then
10329                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10330         fi
10331 fi
10332
10333 if test $ol_enable_local != no ; then
10334         for ac_hdr in sys/un.h 
10335 do
10336 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10337 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10338 echo "configure:10339: checking for $ac_hdr" >&5
10339 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10340   echo $ac_n "(cached) $ac_c" 1>&6
10341 else
10342   cat > conftest.$ac_ext <<EOF
10343 #line 10344 "configure"
10344 #include "confdefs.h"
10345 #include <$ac_hdr>
10346 EOF
10347 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10348 { (eval echo configure:10349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10349 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10350 if test -z "$ac_err"; then
10351   rm -rf conftest*
10352   eval "ac_cv_header_$ac_safe=yes"
10353 else
10354   echo "$ac_err" >&5
10355   echo "configure: failed program was:" >&5
10356   cat conftest.$ac_ext >&5
10357   rm -rf conftest*
10358   eval "ac_cv_header_$ac_safe=no"
10359 fi
10360 rm -f conftest*
10361 fi
10362 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10363   echo "$ac_t""yes" 1>&6
10364     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10365   cat >> confdefs.h <<EOF
10366 #define $ac_tr_hdr 1
10367 EOF
10368  
10369 else
10370   echo "$ac_t""no" 1>&6
10371 fi
10372 done
10373
10374
10375         if test $ol_enable_local = auto ; then
10376                 ol_enable_local=$ac_cv_header_sys_un_h
10377         elif test $ac_cv_header_sys_un_h = no ; then
10378                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10379         fi
10380 fi
10381
10382 ol_link_kbind=no
10383 ol_link_kpasswd=no
10384 ol_link_krb5=no
10385 ol_link_krb4=no
10386
10387 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10388         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10389         -o $ol_with_kerberos = k425 ; then
10390
10391         for ac_hdr in krb5.h
10392 do
10393 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10394 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10395 echo "configure:10396: checking for $ac_hdr" >&5
10396 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10397   echo $ac_n "(cached) $ac_c" 1>&6
10398 else
10399   cat > conftest.$ac_ext <<EOF
10400 #line 10401 "configure"
10401 #include "confdefs.h"
10402 #include <$ac_hdr>
10403 EOF
10404 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10405 { (eval echo configure:10406: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10406 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10407 if test -z "$ac_err"; then
10408   rm -rf conftest*
10409   eval "ac_cv_header_$ac_safe=yes"
10410 else
10411   echo "$ac_err" >&5
10412   echo "configure: failed program was:" >&5
10413   cat conftest.$ac_ext >&5
10414   rm -rf conftest*
10415   eval "ac_cv_header_$ac_safe=no"
10416 fi
10417 rm -f conftest*
10418 fi
10419 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10420   echo "$ac_t""yes" 1>&6
10421     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10422   cat >> confdefs.h <<EOF
10423 #define $ac_tr_hdr 1
10424 EOF
10425  
10426 else
10427   echo "$ac_t""no" 1>&6
10428 fi
10429 done
10430
10431
10432         if test $ac_cv_header_krb5_h = yes ; then
10433                                 for ac_hdr in heim_err.h
10434 do
10435 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10436 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10437 echo "configure:10438: checking for $ac_hdr" >&5
10438 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10439   echo $ac_n "(cached) $ac_c" 1>&6
10440 else
10441   cat > conftest.$ac_ext <<EOF
10442 #line 10443 "configure"
10443 #include "confdefs.h"
10444 #include <$ac_hdr>
10445 EOF
10446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10447 { (eval echo configure:10448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10449 if test -z "$ac_err"; then
10450   rm -rf conftest*
10451   eval "ac_cv_header_$ac_safe=yes"
10452 else
10453   echo "$ac_err" >&5
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -rf conftest*
10457   eval "ac_cv_header_$ac_safe=no"
10458 fi
10459 rm -f conftest*
10460 fi
10461 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10462   echo "$ac_t""yes" 1>&6
10463     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10464   cat >> confdefs.h <<EOF
10465 #define $ac_tr_hdr 1
10466 EOF
10467  
10468 else
10469   echo "$ac_t""no" 1>&6
10470 fi
10471 done
10472
10473                 if test $ac_cv_header_heim_err_h = yes ; then
10474                         krb5_impl=heimdal
10475                 else
10476                         krb5_impl=mit
10477                 fi
10478
10479                 if test $krb5_impl = mit; then
10480                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10481 echo "configure:10482: checking for main in -lk5crypto" >&5
10482 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10483 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10484   echo $ac_n "(cached) $ac_c" 1>&6
10485 else
10486   ac_save_LIBS="$LIBS"
10487 LIBS="-lk5crypto  $LIBS"
10488 cat > conftest.$ac_ext <<EOF
10489 #line 10490 "configure"
10490 #include "confdefs.h"
10491
10492 int main() {
10493 main()
10494 ; return 0; }
10495 EOF
10496 if { (eval echo configure:10497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10497   rm -rf conftest*
10498   eval "ac_cv_lib_$ac_lib_var=yes"
10499 else
10500   echo "configure: failed program was:" >&5
10501   cat conftest.$ac_ext >&5
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=no"
10504 fi
10505 rm -f conftest*
10506 LIBS="$ac_save_LIBS"
10507
10508 fi
10509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10510   echo "$ac_t""yes" 1>&6
10511   krb5crypto=k5crypto
10512 else
10513   echo "$ac_t""no" 1>&6
10514 krb5crypto=crypto
10515 fi
10516
10517
10518                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10519 echo "configure:10520: checking for main in -lkrb5" >&5
10520 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10522   echo $ac_n "(cached) $ac_c" 1>&6
10523 else
10524   ac_save_LIBS="$LIBS"
10525 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10526 cat > conftest.$ac_ext <<EOF
10527 #line 10528 "configure"
10528 #include "confdefs.h"
10529
10530 int main() {
10531 main()
10532 ; return 0; }
10533 EOF
10534 if { (eval echo configure:10535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10535   rm -rf conftest*
10536   eval "ac_cv_lib_$ac_lib_var=yes"
10537 else
10538   echo "configure: failed program was:" >&5
10539   cat conftest.$ac_ext >&5
10540   rm -rf conftest*
10541   eval "ac_cv_lib_$ac_lib_var=no"
10542 fi
10543 rm -f conftest*
10544 LIBS="$ac_save_LIBS"
10545
10546 fi
10547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10548   echo "$ac_t""yes" 1>&6
10549   have_krb5=yes
10550                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10551 else
10552   echo "$ac_t""no" 1>&6
10553 have_krb5=no
10554 fi
10555
10556
10557                 elif test $krb5_impl = heimdal; then
10558                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10559 echo "configure:10560: checking for main in -ldes" >&5
10560 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10561 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10562   echo $ac_n "(cached) $ac_c" 1>&6
10563 else
10564   ac_save_LIBS="$LIBS"
10565 LIBS="-ldes  $LIBS"
10566 cat > conftest.$ac_ext <<EOF
10567 #line 10568 "configure"
10568 #include "confdefs.h"
10569
10570 int main() {
10571 main()
10572 ; return 0; }
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10575   rm -rf conftest*
10576   eval "ac_cv_lib_$ac_lib_var=yes"
10577 else
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=no"
10582 fi
10583 rm -f conftest*
10584 LIBS="$ac_save_LIBS"
10585
10586 fi
10587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10588   echo "$ac_t""yes" 1>&6
10589   krb5crypto=des
10590 else
10591   echo "$ac_t""no" 1>&6
10592 krb5crypto=crypto
10593 fi
10594
10595
10596                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10597 echo "configure:10598: checking for main in -lkrb5" >&5
10598 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10599 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10600   echo $ac_n "(cached) $ac_c" 1>&6
10601 else
10602   ac_save_LIBS="$LIBS"
10603 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10604 cat > conftest.$ac_ext <<EOF
10605 #line 10606 "configure"
10606 #include "confdefs.h"
10607
10608 int main() {
10609 main()
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   eval "ac_cv_lib_$ac_lib_var=yes"
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=no"
10620 fi
10621 rm -f conftest*
10622 LIBS="$ac_save_LIBS"
10623
10624 fi
10625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10626   echo "$ac_t""yes" 1>&6
10627   have_krb5=yes
10628                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10629 else
10630   echo "$ac_t""no" 1>&6
10631 have_krb5=no
10632 fi
10633
10634
10635                         cat >> confdefs.h <<\EOF
10636 #define HAVE_HEIMDAL_KERBEROS 1
10637 EOF
10638
10639
10640                 else
10641                         have_krb5=no
10642                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10643                 fi
10644
10645                 if test $have_krb5 = yes ; then
10646                         ol_link_krb5=yes
10647
10648                         cat >> confdefs.h <<\EOF
10649 #define HAVE_KRB5 1
10650 EOF
10651
10652
10653                         if test $ol_enable_kpasswd != no ; then
10654                                 ol_link_kpasswd=yes;
10655                         fi
10656
10657                         if test $ol_with_kerberos = k5only ; then
10658                                 ol_with_kerberos=found
10659                         fi
10660
10661                 elif test $ol_with_kerberos != auto ; then
10662                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10663                 fi
10664
10665         fi
10666 fi
10667
10668 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10669         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10670
10671         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10672 do
10673 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10674 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10675 echo "configure:10676: checking for $ac_hdr" >&5
10676 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10677   echo $ac_n "(cached) $ac_c" 1>&6
10678 else
10679   cat > conftest.$ac_ext <<EOF
10680 #line 10681 "configure"
10681 #include "confdefs.h"
10682 #include <$ac_hdr>
10683 EOF
10684 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10685 { (eval echo configure:10686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10686 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10687 if test -z "$ac_err"; then
10688   rm -rf conftest*
10689   eval "ac_cv_header_$ac_safe=yes"
10690 else
10691   echo "$ac_err" >&5
10692   echo "configure: failed program was:" >&5
10693   cat conftest.$ac_ext >&5
10694   rm -rf conftest*
10695   eval "ac_cv_header_$ac_safe=no"
10696 fi
10697 rm -f conftest*
10698 fi
10699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10700   echo "$ac_t""yes" 1>&6
10701     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10702   cat >> confdefs.h <<EOF
10703 #define $ac_tr_hdr 1
10704 EOF
10705  
10706 else
10707   echo "$ac_t""no" 1>&6
10708 fi
10709 done
10710
10711
10712         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10713                 if test $krb5_impl = mit; then
10714                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10715 echo "configure:10716: checking for main in -lkrb4" >&5
10716 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10717 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   ac_save_LIBS="$LIBS"
10721 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10722 cat > conftest.$ac_ext <<EOF
10723 #line 10724 "configure"
10724 #include "confdefs.h"
10725
10726 int main() {
10727 main()
10728 ; return 0; }
10729 EOF
10730 if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10731   rm -rf conftest*
10732   eval "ac_cv_lib_$ac_lib_var=yes"
10733 else
10734   echo "configure: failed program was:" >&5
10735   cat conftest.$ac_ext >&5
10736   rm -rf conftest*
10737   eval "ac_cv_lib_$ac_lib_var=no"
10738 fi
10739 rm -f conftest*
10740 LIBS="$ac_save_LIBS"
10741
10742 fi
10743 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10744   echo "$ac_t""yes" 1>&6
10745   have_k425=yes
10746                                 KRB4_LIBS="-lkrb4 -ldes425"
10747 else
10748   echo "$ac_t""no" 1>&6
10749 have_k425=no
10750 fi
10751
10752
10753                 elif test $krb5_impl = heimdal; then
10754                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10755 echo "configure:10756: checking for main in -lkrb4" >&5
10756 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10758   echo $ac_n "(cached) $ac_c" 1>&6
10759 else
10760   ac_save_LIBS="$LIBS"
10761 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10762 cat > conftest.$ac_ext <<EOF
10763 #line 10764 "configure"
10764 #include "confdefs.h"
10765
10766 int main() {
10767 main()
10768 ; return 0; }
10769 EOF
10770 if { (eval echo configure:10771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10771   rm -rf conftest*
10772   eval "ac_cv_lib_$ac_lib_var=yes"
10773 else
10774   echo "configure: failed program was:" >&5
10775   cat conftest.$ac_ext >&5
10776   rm -rf conftest*
10777   eval "ac_cv_lib_$ac_lib_var=no"
10778 fi
10779 rm -f conftest*
10780 LIBS="$ac_save_LIBS"
10781
10782 fi
10783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10784   echo "$ac_t""yes" 1>&6
10785   have_k425=yes
10786                                 KRB4_LIBS="-lkrb4"
10787 else
10788   echo "$ac_t""no" 1>&6
10789 have_k425=no
10790 fi
10791
10792
10793                 else
10794                         have_425=no
10795                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10796                 fi
10797
10798                 if test $have_k425 = yes ; then
10799                         ol_with_kerberos=found
10800                         ol_link_krb4=yes
10801
10802                         cat >> confdefs.h <<\EOF
10803 #define HAVE_KRB425 1
10804 EOF
10805
10806                         cat >> confdefs.h <<\EOF
10807 #define HAVE_KRB4 1
10808 EOF
10809
10810
10811                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10812 echo "configure:10813: checking for des_debug in Kerberos libraries" >&5
10813 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10814   echo $ac_n "(cached) $ac_c" 1>&6
10815 else
10816   
10817                                                                 save_LIBS="$LIBS"
10818                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10819                                 cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822
10823 #include <kerberosIV/krb.h>
10824 #include <kerberosIV/des.h>
10825 extern int des_debug;
10826
10827 int main() {
10828
10829 des_debug = 1;
10830
10831 ; return 0; }
10832 EOF
10833 if { (eval echo configure:10834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10834   rm -rf conftest*
10835   ol_cv_var_des_debug=yes
10836 else
10837   echo "configure: failed program was:" >&5
10838   cat conftest.$ac_ext >&5
10839   rm -rf conftest*
10840   ol_cv_var_des_debug=no
10841 fi
10842 rm -f conftest*
10843                                                                 LIBS="$save_LIBS"
10844                         
10845 fi
10846
10847 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10848
10849                         if test $ol_cv_var_des_debug = yes ; then
10850                                 cat >> confdefs.h <<\EOF
10851 #define HAVE_DES_DEBUG 1
10852 EOF
10853
10854                         fi
10855
10856                         LIBS="$save_LIBS"
10857                 fi
10858         fi
10859 fi
10860
10861 if test $ol_link_krb5 = yes ; then
10862         ol_with_kerberos=found
10863 fi
10864
10865 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10866         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10867
10868         for ac_hdr in krb.h des.h krb-archaeology.h 
10869 do
10870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10872 echo "configure:10873: checking for $ac_hdr" >&5
10873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10874   echo $ac_n "(cached) $ac_c" 1>&6
10875 else
10876   cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879 #include <$ac_hdr>
10880 EOF
10881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10882 { (eval echo configure:10883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10884 if test -z "$ac_err"; then
10885   rm -rf conftest*
10886   eval "ac_cv_header_$ac_safe=yes"
10887 else
10888   echo "$ac_err" >&5
10889   echo "configure: failed program was:" >&5
10890   cat conftest.$ac_ext >&5
10891   rm -rf conftest*
10892   eval "ac_cv_header_$ac_safe=no"
10893 fi
10894 rm -f conftest*
10895 fi
10896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10897   echo "$ac_t""yes" 1>&6
10898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10899   cat >> confdefs.h <<EOF
10900 #define $ac_tr_hdr 1
10901 EOF
10902  
10903 else
10904   echo "$ac_t""no" 1>&6
10905 fi
10906 done
10907
10908
10909         if test $ac_cv_header_krb_h = yes ; then
10910                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10911 echo "configure:10912: checking for main in -lkrb" >&5
10912 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10913 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10914   echo $ac_n "(cached) $ac_c" 1>&6
10915 else
10916   ac_save_LIBS="$LIBS"
10917 LIBS="-lkrb -ldes $LIBS"
10918 cat > conftest.$ac_ext <<EOF
10919 #line 10920 "configure"
10920 #include "confdefs.h"
10921
10922 int main() {
10923 main()
10924 ; return 0; }
10925 EOF
10926 if { (eval echo configure:10927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10927   rm -rf conftest*
10928   eval "ac_cv_lib_$ac_lib_var=yes"
10929 else
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   eval "ac_cv_lib_$ac_lib_var=no"
10934 fi
10935 rm -f conftest*
10936 LIBS="$ac_save_LIBS"
10937
10938 fi
10939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10940   echo "$ac_t""yes" 1>&6
10941   have_k4=yes
10942 else
10943   echo "$ac_t""no" 1>&6
10944 have_k4=no
10945 fi
10946
10947
10948                 if test $have_k4 = yes ; then
10949                         ol_with_kerberos=found
10950                         ol_link_krb4=yes
10951
10952                         cat >> confdefs.h <<\EOF
10953 #define HAVE_KRB4 1
10954 EOF
10955
10956
10957                         KRB4_LIBS="-lkrb -ldes"
10958
10959                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10960                                 cat >> confdefs.h <<\EOF
10961 #define HAVE_KTH_KERBEROS 1
10962 EOF
10963
10964                         fi
10965                 fi
10966         fi
10967 fi
10968
10969 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10970         ol_link_kpasswd=yes
10971 fi
10972
10973 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10974         ol_link_kbind=yes
10975
10976 elif test $ol_enable_kbind = yes ; then
10977         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10978 fi
10979
10980 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10981         cat >> confdefs.h <<\EOF
10982 #define HAVE_KERBEROS 1
10983 EOF
10984
10985
10986 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10987         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10988 fi
10989
10990 ol_link_tls=no
10991 if test $ol_with_tls != no ; then
10992         for ac_hdr in openssl/ssl.h ssl.h
10993 do
10994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10996 echo "configure:10997: checking for $ac_hdr" >&5
10997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10998   echo $ac_n "(cached) $ac_c" 1>&6
10999 else
11000   cat > conftest.$ac_ext <<EOF
11001 #line 11002 "configure"
11002 #include "confdefs.h"
11003 #include <$ac_hdr>
11004 EOF
11005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11006 { (eval echo configure:11007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11008 if test -z "$ac_err"; then
11009   rm -rf conftest*
11010   eval "ac_cv_header_$ac_safe=yes"
11011 else
11012   echo "$ac_err" >&5
11013   echo "configure: failed program was:" >&5
11014   cat conftest.$ac_ext >&5
11015   rm -rf conftest*
11016   eval "ac_cv_header_$ac_safe=no"
11017 fi
11018 rm -f conftest*
11019 fi
11020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11021   echo "$ac_t""yes" 1>&6
11022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11023   cat >> confdefs.h <<EOF
11024 #define $ac_tr_hdr 1
11025 EOF
11026  
11027 else
11028   echo "$ac_t""no" 1>&6
11029 fi
11030 done
11031
11032         
11033         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11034                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11035 echo "configure:11036: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11036 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11037 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11038   echo $ac_n "(cached) $ac_c" 1>&6
11039 else
11040   ac_save_LIBS="$LIBS"
11041 LIBS="-lssl -lcrypto $LIBS"
11042 cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045 /* Override any gcc2 internal prototype to avoid an error.  */
11046 /* We use char because int might match the return type of a gcc2
11047     builtin and then its argument prototype would still apply.  */
11048 char SSLeay_add_ssl_algorithms();
11049
11050 int main() {
11051 SSLeay_add_ssl_algorithms()
11052 ; return 0; }
11053 EOF
11054 if { (eval echo configure:11055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11055   rm -rf conftest*
11056   eval "ac_cv_lib_$ac_lib_var=yes"
11057 else
11058   echo "configure: failed program was:" >&5
11059   cat conftest.$ac_ext >&5
11060   rm -rf conftest*
11061   eval "ac_cv_lib_$ac_lib_var=no"
11062 fi
11063 rm -f conftest*
11064 LIBS="$ac_save_LIBS"
11065
11066 fi
11067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11068   echo "$ac_t""yes" 1>&6
11069   have_ssleay=yes
11070                         need_rsaref=no
11071 else
11072   echo "$ac_t""no" 1>&6
11073 have_ssleay=no
11074 fi
11075
11076                         
11077                 if test $have_ssleay = no ; then
11078                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11079 echo "configure:11080: checking for SSL_library_init in -lssl" >&5
11080 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11081 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11082   echo $ac_n "(cached) $ac_c" 1>&6
11083 else
11084   ac_save_LIBS="$LIBS"
11085 LIBS="-lssl -lcrypto $LIBS"
11086 cat > conftest.$ac_ext <<EOF
11087 #line 11088 "configure"
11088 #include "confdefs.h"
11089 /* Override any gcc2 internal prototype to avoid an error.  */
11090 /* We use char because int might match the return type of a gcc2
11091     builtin and then its argument prototype would still apply.  */
11092 char SSL_library_init();
11093
11094 int main() {
11095 SSL_library_init()
11096 ; return 0; }
11097 EOF
11098 if { (eval echo configure:11099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11099   rm -rf conftest*
11100   eval "ac_cv_lib_$ac_lib_var=yes"
11101 else
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   eval "ac_cv_lib_$ac_lib_var=no"
11106 fi
11107 rm -f conftest*
11108 LIBS="$ac_save_LIBS"
11109
11110 fi
11111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11112   echo "$ac_t""yes" 1>&6
11113   have_ssleay=yes
11114                                 need_rsaref=no
11115 else
11116   echo "$ac_t""no" 1>&6
11117 have_ssleay=no
11118 fi
11119
11120                 fi
11121
11122                 if test $have_ssleay = no ; then
11123                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11124 echo "configure:11125: checking for ssl3_accept in -lssl" >&5
11125 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11126 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11127   echo $ac_n "(cached) $ac_c" 1>&6
11128 else
11129   ac_save_LIBS="$LIBS"
11130 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11131 cat > conftest.$ac_ext <<EOF
11132 #line 11133 "configure"
11133 #include "confdefs.h"
11134 /* Override any gcc2 internal prototype to avoid an error.  */
11135 /* We use char because int might match the return type of a gcc2
11136     builtin and then its argument prototype would still apply.  */
11137 char ssl3_accept();
11138
11139 int main() {
11140 ssl3_accept()
11141 ; return 0; }
11142 EOF
11143 if { (eval echo configure:11144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11144   rm -rf conftest*
11145   eval "ac_cv_lib_$ac_lib_var=yes"
11146 else
11147   echo "configure: failed program was:" >&5
11148   cat conftest.$ac_ext >&5
11149   rm -rf conftest*
11150   eval "ac_cv_lib_$ac_lib_var=no"
11151 fi
11152 rm -f conftest*
11153 LIBS="$ac_save_LIBS"
11154
11155 fi
11156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11157   echo "$ac_t""yes" 1>&6
11158   have_ssleay=yes
11159                                 need_rsaref=yes
11160 else
11161   echo "$ac_t""no" 1>&6
11162 have_ssleay=no
11163 fi
11164
11165                 fi
11166
11167                 if test $have_ssleay = yes ; then
11168                         ol_with_tls=found
11169                         ol_link_tls=yes
11170
11171                         cat >> confdefs.h <<\EOF
11172 #define HAVE_SSLEAY 1
11173 EOF
11174
11175
11176                         if test $need_rsaref = yes; then
11177                                 cat >> confdefs.h <<\EOF
11178 #define HAVE_RSAREF 1
11179 EOF
11180
11181
11182                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11183                         else
11184                                 TLS_LIBS="-lssl -lcrypto"
11185                         fi
11186                 fi
11187         fi
11188
11189 else
11190         echo "configure: warning: TLS data protection not supported!" 1>&2
11191 fi
11192
11193 if test $ol_link_tls = yes ; then
11194         cat >> confdefs.h <<\EOF
11195 #define HAVE_TLS 1
11196 EOF
11197
11198
11199 elif test $ol_with_tls = auto ; then
11200         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11201         echo "configure: warning: TLS data protection not supported!" 1>&2
11202
11203 elif test $ol_with_tls != no ; then
11204         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11205 fi
11206
11207 if test $ol_enable_lmpasswd != no; then
11208         if test $ol_link_tls != yes ; then
11209                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11210         fi
11211
11212         cat >> confdefs.h <<\EOF
11213 #define SLAPD_LMHASH 1
11214 EOF
11215
11216 fi
11217
11218 for ac_func in \
11219         ctime_r                 \
11220         gethostbyname_r gethostbyaddr_r \
11221
11222 do
11223 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11224 echo "configure:11225: checking for $ac_func" >&5
11225 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11226   echo $ac_n "(cached) $ac_c" 1>&6
11227 else
11228   cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 /* System header to define __stub macros and hopefully few prototypes,
11232     which can conflict with char $ac_func(); below.  */
11233 #include <assert.h>
11234 /* Override any gcc2 internal prototype to avoid an error.  */
11235 /* We use char because int might match the return type of a gcc2
11236     builtin and then its argument prototype would still apply.  */
11237 char $ac_func();
11238 char (*f)();
11239
11240 int main() {
11241
11242 /* The GNU C library defines this for functions which it implements
11243     to always fail with ENOSYS.  Some functions are actually named
11244     something starting with __ and the normal name is an alias.  */
11245 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11246 choke me
11247 #else
11248 f = $ac_func;
11249 #endif
11250
11251 ; return 0; }
11252 EOF
11253 if { (eval echo configure:11254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11254   rm -rf conftest*
11255   eval "ac_cv_func_$ac_func=yes"
11256 else
11257   echo "configure: failed program was:" >&5
11258   cat conftest.$ac_ext >&5
11259   rm -rf conftest*
11260   eval "ac_cv_func_$ac_func=no"
11261 fi
11262 rm -f conftest*
11263 fi
11264
11265 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11266   echo "$ac_t""yes" 1>&6
11267     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11268   cat >> confdefs.h <<EOF
11269 #define $ac_tr_func 1
11270 EOF
11271  
11272 else
11273   echo "$ac_t""no" 1>&6
11274 fi
11275 done
11276
11277
11278 if test "$ac_cv_func_ctime_r" = no ; then
11279         ol_cv_func_ctime_r_nargs=0
11280 else
11281         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11282 echo "configure:11283: checking number of arguments of ctime_r" >&5
11283 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11284   echo $ac_n "(cached) $ac_c" 1>&6
11285 else
11286   cat > conftest.$ac_ext <<EOF
11287 #line 11288 "configure"
11288 #include "confdefs.h"
11289 #include <time.h>
11290 int main() {
11291 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11292 ; return 0; }
11293 EOF
11294 if { (eval echo configure:11295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11295   rm -rf conftest*
11296   ol_cv_func_ctime_r_nargs3=yes
11297 else
11298   echo "configure: failed program was:" >&5
11299   cat conftest.$ac_ext >&5
11300   rm -rf conftest*
11301   ol_cv_func_ctime_r_nargs3=no
11302 fi
11303 rm -f conftest*
11304
11305         cat > conftest.$ac_ext <<EOF
11306 #line 11307 "configure"
11307 #include "confdefs.h"
11308 #include <time.h>
11309 int main() {
11310 time_t ti; char *buffer; ctime_r(&ti,buffer);
11311 ; return 0; }
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11314   rm -rf conftest*
11315   ol_cv_func_ctime_r_nargs2=yes
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   ol_cv_func_ctime_r_nargs2=no
11321 fi
11322 rm -f conftest*
11323
11324         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11325                 $ol_cv_func_ctime_r_nargs2 = no ; then
11326
11327                 ol_cv_func_ctime_r_nargs=3
11328
11329         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11330                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11331
11332                 ol_cv_func_ctime_r_nargs=2
11333
11334         else
11335                 ol_cv_func_ctime_r_nargs=0
11336         fi
11337   
11338 fi
11339
11340 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11341
11342   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11343         cat >> confdefs.h <<EOF
11344 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11345 EOF
11346
11347   fi
11348
11349 fi
11350
11351 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11352         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11353 echo "configure:11354: checking number of arguments of gethostbyname_r" >&5
11354 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11355   echo $ac_n "(cached) $ac_c" 1>&6
11356 else
11357   cat > conftest.$ac_ext <<EOF
11358 #line 11359 "configure"
11359 #include "confdefs.h"
11360 #include <sys/types.h>
11361 #include <sys/socket.h>
11362 #include <netinet/in.h>
11363 #include <netdb.h>
11364 #define BUFSIZE (sizeof(struct hostent)+10)
11365 int main() {
11366 struct hostent hent; char buffer[BUFSIZE];
11367                 int bufsize=BUFSIZE;int h_errno;
11368                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11369                         buffer, bufsize, &h_errno);
11370 ; return 0; }
11371 EOF
11372 if { (eval echo configure:11373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11373   rm -rf conftest*
11374   ol_cv_func_gethostbyname_r_nargs5=yes
11375 else
11376   echo "configure: failed program was:" >&5
11377   cat conftest.$ac_ext >&5
11378   rm -rf conftest*
11379   ol_cv_func_gethostbyname_r_nargs5=no
11380 fi
11381 rm -f conftest*
11382
11383         cat > conftest.$ac_ext <<EOF
11384 #line 11385 "configure"
11385 #include "confdefs.h"
11386 #include <sys/types.h>
11387 #include <sys/socket.h>
11388 #include <netinet/in.h>
11389 #include <netdb.h>
11390 #define BUFSIZE (sizeof(struct hostent)+10)
11391 int main() {
11392 struct hostent hent;struct hostent *rhent;
11393                 char buffer[BUFSIZE];
11394                 int bufsize=BUFSIZE;int h_errno;
11395                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11396                         &rhent, &h_errno);
11397 ; return 0; }
11398 EOF
11399 if { (eval echo configure:11400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11400   rm -rf conftest*
11401   ol_cv_func_gethostbyname_r_nargs6=yes
11402 else
11403   echo "configure: failed program was:" >&5
11404   cat conftest.$ac_ext >&5
11405   rm -rf conftest*
11406   ol_cv_func_gethostbyname_r_nargs6=no
11407 fi
11408 rm -f conftest*
11409
11410         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11411                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11412
11413                 ol_cv_func_gethostbyname_r_nargs=5
11414
11415         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11416                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11417
11418                 ol_cv_func_gethostbyname_r_nargs=6
11419
11420         else
11421                 ol_cv_func_gethostbyname_r_nargs=0
11422         fi
11423   
11424 fi
11425
11426 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11427   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11428         cat >> confdefs.h <<EOF
11429 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11430 EOF
11431
11432   fi
11433
11434 else
11435         ol_cv_func_gethostbyname_r_nargs=0
11436 fi
11437  
11438 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11439         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11440 echo "configure:11441: checking number of arguments of gethostbyaddr_r" >&5
11441 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11442   echo $ac_n "(cached) $ac_c" 1>&6
11443 else
11444   cat > conftest.$ac_ext <<EOF
11445 #line 11446 "configure"
11446 #include "confdefs.h"
11447 #include <sys/types.h>
11448 #include <sys/socket.h>
11449 #include <netinet/in.h>
11450 #include <netdb.h>
11451 #define BUFSIZE (sizeof(struct hostent)+10)
11452 int main() {
11453 struct hostent hent; char buffer[BUFSIZE]; 
11454             struct in_addr add;
11455             size_t alen=sizeof(struct in_addr);
11456             int bufsize=BUFSIZE;int h_errno;
11457                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11458                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11459 ; return 0; }
11460 EOF
11461 if { (eval echo configure:11462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11462   rm -rf conftest*
11463   ol_cv_func_gethostbyaddr_r_nargs7=yes
11464 else
11465   echo "configure: failed program was:" >&5
11466   cat conftest.$ac_ext >&5
11467   rm -rf conftest*
11468   ol_cv_func_gethostbyaddr_r_nargs7=no
11469 fi
11470 rm -f conftest*
11471
11472         cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475 #include <sys/types.h>
11476 #include <sys/socket.h>
11477 #include <netinet/in.h>
11478 #include <netdb.h>
11479 #define BUFSIZE (sizeof(struct hostent)+10)
11480 int main() {
11481 struct hostent hent;
11482                 struct hostent *rhent; char buffer[BUFSIZE]; 
11483                 struct in_addr add;
11484                 size_t alen=sizeof(struct in_addr);
11485                 int bufsize=BUFSIZE;int h_errno;
11486                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11487                         alen, AF_INET, &hent, buffer, bufsize, 
11488                         &rhent, &h_errno);
11489 ; return 0; }
11490 EOF
11491 if { (eval echo configure:11492: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11492   rm -rf conftest*
11493   ol_cv_func_gethostbyaddr_r_nargs8=yes
11494 else
11495   echo "configure: failed program was:" >&5
11496   cat conftest.$ac_ext >&5
11497   rm -rf conftest*
11498   ol_cv_func_gethostbyaddr_r_nargs8=no
11499 fi
11500 rm -f conftest*
11501
11502         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11503                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11504
11505                 ol_cv_func_gethostbyaddr_r_nargs=7
11506
11507         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11508                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11509
11510                 ol_cv_func_gethostbyaddr_r_nargs=8
11511
11512         else
11513                 ol_cv_func_gethostbyaddr_r_nargs=0
11514         fi
11515   
11516 fi
11517
11518 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11519   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11520     cat >> confdefs.h <<EOF
11521 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11522 EOF
11523
11524   fi
11525
11526 else
11527         ol_cv_func_gethostbyaddr_r_nargs=0
11528 fi
11529
11530 if test "$ac_cv_func_ctime_r" = yes \
11531         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11532         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11533         -a "$ac_cv_func_gethostbyname_r" = yes \
11534         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11535         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11536         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11537         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11538         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11539         ; then
11540  
11541         cat >> confdefs.h <<\EOF
11542 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11543 EOF
11544
11545 fi
11546
11547 ol_link_threads=no
11548
11549 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11550         -o $ol_with_threads = nt ; then
11551
11552         
11553         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11554 echo "configure:11555: checking for _beginthread" >&5
11555 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11556   echo $ac_n "(cached) $ac_c" 1>&6
11557 else
11558   cat > conftest.$ac_ext <<EOF
11559 #line 11560 "configure"
11560 #include "confdefs.h"
11561 /* System header to define __stub macros and hopefully few prototypes,
11562     which can conflict with char _beginthread(); below.  */
11563 #include <assert.h>
11564 /* Override any gcc2 internal prototype to avoid an error.  */
11565 /* We use char because int might match the return type of a gcc2
11566     builtin and then its argument prototype would still apply.  */
11567 char _beginthread();
11568 char (*f)();
11569
11570 int main() {
11571
11572 /* The GNU C library defines this for functions which it implements
11573     to always fail with ENOSYS.  Some functions are actually named
11574     something starting with __ and the normal name is an alias.  */
11575 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11576 choke me
11577 #else
11578 f = _beginthread;
11579 #endif
11580
11581 ; return 0; }
11582 EOF
11583 if { (eval echo configure:11584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11584   rm -rf conftest*
11585   eval "ac_cv_func__beginthread=yes"
11586 else
11587   echo "configure: failed program was:" >&5
11588   cat conftest.$ac_ext >&5
11589   rm -rf conftest*
11590   eval "ac_cv_func__beginthread=no"
11591 fi
11592 rm -f conftest*
11593 fi
11594
11595 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11596   echo "$ac_t""yes" 1>&6
11597   :
11598 else
11599   echo "$ac_t""no" 1>&6
11600 fi
11601
11602
11603         if test $ac_cv_func__beginthread = yes ; then
11604                 cat >> confdefs.h <<\EOF
11605 #define HAVE_NT_THREADS 1
11606 EOF
11607
11608                 ol_cv_nt_threads=yes
11609         fi
11610
11611
11612         if test "$ol_cv_nt_threads" = yes ; then
11613                 ol_link_threads=nt
11614                 ol_with_threads=found
11615                 ol_with_yielding_select=yes
11616
11617                 cat >> confdefs.h <<\EOF
11618 #define HAVE_NT_SERVICE_MANAGER 1
11619 EOF
11620
11621                 cat >> confdefs.h <<\EOF
11622 #define HAVE_NT_EVENT_LOG 1
11623 EOF
11624
11625         fi
11626
11627         if test $ol_with_threads = nt ; then
11628                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11629         fi
11630 fi
11631
11632 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11633         -o $ol_with_threads = posix ; then
11634
11635         for ac_hdr in pthread.h
11636 do
11637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11639 echo "configure:11640: checking for $ac_hdr" >&5
11640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11641   echo $ac_n "(cached) $ac_c" 1>&6
11642 else
11643   cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646 #include <$ac_hdr>
11647 EOF
11648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11649 { (eval echo configure:11650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11651 if test -z "$ac_err"; then
11652   rm -rf conftest*
11653   eval "ac_cv_header_$ac_safe=yes"
11654 else
11655   echo "$ac_err" >&5
11656   echo "configure: failed program was:" >&5
11657   cat conftest.$ac_ext >&5
11658   rm -rf conftest*
11659   eval "ac_cv_header_$ac_safe=no"
11660 fi
11661 rm -f conftest*
11662 fi
11663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11664   echo "$ac_t""yes" 1>&6
11665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11666   cat >> confdefs.h <<EOF
11667 #define $ac_tr_hdr 1
11668 EOF
11669  
11670 else
11671   echo "$ac_t""no" 1>&6
11672 fi
11673 done
11674
11675
11676         if test $ac_cv_header_pthread_h = yes ; then
11677                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11678 echo "configure:11679: checking POSIX thread version" >&5
11679 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11680   echo $ac_n "(cached) $ac_c" 1>&6
11681 else
11682   
11683         cat > conftest.$ac_ext <<EOF
11684 #line 11685 "configure"
11685 #include "confdefs.h"
11686
11687 #               include <pthread.h>
11688                 /* this check could be improved */
11689 #               ifdef PTHREAD_ONCE_INIT
11690                         pthread_version_final;
11691 #               endif
11692         
11693 EOF
11694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11695   egrep "pthread_version_final" >/dev/null 2>&1; then
11696   rm -rf conftest*
11697   ol_pthread_final=yes
11698 else
11699   rm -rf conftest*
11700   ol_pthread_final=no
11701 fi
11702 rm -f conftest*
11703
11704
11705         cat > conftest.$ac_ext <<EOF
11706 #line 11707 "configure"
11707 #include "confdefs.h"
11708
11709 #               include <pthread.h>
11710                 /* this check could be improved */
11711 #               ifdef pthread_once_init
11712                         pthread_version_draft4;
11713 #               endif
11714         
11715 EOF
11716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11717   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11718   rm -rf conftest*
11719   ol_pthread_draft4=yes
11720 else
11721   rm -rf conftest*
11722   ol_pthread_draft4=no
11723 fi
11724 rm -f conftest*
11725
11726
11727         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11728                 ol_cv_pthread_version=final
11729         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11730                 ol_cv_pthread_version=draft4
11731         else
11732                 ol_cv_pthread_version=unknown
11733         fi
11734
11735 fi
11736
11737 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11738
11739
11740                 if test $ol_cv_pthread_version = final ; then
11741                         cat >> confdefs.h <<\EOF
11742 #define HAVE_PTHREADS_FINAL 1
11743 EOF
11744
11745                 elif test $ol_cv_pthread_version = draft4 ; then
11746                         cat >> confdefs.h <<\EOF
11747 #define HAVE_PTHREADS_D4 1
11748 EOF
11749
11750                 else
11751                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11752                 fi
11753
11754                 # consider threads found
11755                 ol_with_threads=found
11756
11757                 
11758         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11759 echo "configure:11760: checking for LinuxThreads pthread.h" >&5
11760 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11761   echo $ac_n "(cached) $ac_c" 1>&6
11762 else
11763   cat > conftest.$ac_ext <<EOF
11764 #line 11765 "configure"
11765 #include "confdefs.h"
11766 #include <pthread.h>
11767 EOF
11768 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11769   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11770   rm -rf conftest*
11771   ol_cv_header_linux_threads=yes
11772 else
11773   rm -rf conftest*
11774   ol_cv_header_linux_threads=no
11775 fi
11776 rm -f conftest*
11777
11778                 
11779 fi
11780
11781 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11782         if test $ol_cv_header_linux_threads = yes; then
11783                 cat >> confdefs.h <<\EOF
11784 #define HAVE_LINUX_THREADS 1
11785 EOF
11786
11787         fi
11788
11789                 
11790         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11791 echo "configure:11792: checking for GNU Pth pthread.h" >&5
11792 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11793   echo $ac_n "(cached) $ac_c" 1>&6
11794 else
11795   cat > conftest.$ac_ext <<EOF
11796 #line 11797 "configure"
11797 #include "confdefs.h"
11798 #include <pthread.h>
11799 #ifdef _POSIX_THREAD_IS_GNU_PTH
11800         __gnu_pth__;
11801 #endif
11802
11803 EOF
11804 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11805   egrep "__gnu_pth__" >/dev/null 2>&1; then
11806   rm -rf conftest*
11807   ol_cv_header_gnu_pth_pthread_h=yes
11808 else
11809   rm -rf conftest*
11810   ol_cv_header_gnu_pth_pthread_h=no
11811 fi
11812 rm -f conftest*
11813
11814                 
11815 fi
11816
11817 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11818
11819
11820                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11821                         for ac_hdr in sched.h
11822 do
11823 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11824 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11825 echo "configure:11826: checking for $ac_hdr" >&5
11826 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11827   echo $ac_n "(cached) $ac_c" 1>&6
11828 else
11829   cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832 #include <$ac_hdr>
11833 EOF
11834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11835 { (eval echo configure:11836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11837 if test -z "$ac_err"; then
11838   rm -rf conftest*
11839   eval "ac_cv_header_$ac_safe=yes"
11840 else
11841   echo "$ac_err" >&5
11842   echo "configure: failed program was:" >&5
11843   cat conftest.$ac_ext >&5
11844   rm -rf conftest*
11845   eval "ac_cv_header_$ac_safe=no"
11846 fi
11847 rm -f conftest*
11848 fi
11849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11850   echo "$ac_t""yes" 1>&6
11851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11852   cat >> confdefs.h <<EOF
11853 #define $ac_tr_hdr 1
11854 EOF
11855  
11856 else
11857   echo "$ac_t""no" 1>&6
11858 fi
11859 done
11860
11861                 fi
11862
11863                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11864                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11865 echo "configure:11866: checking for pthread_create in default libraries" >&5
11866 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11867   echo $ac_n "(cached) $ac_c" 1>&6
11868 else
11869   
11870                 if test "$cross_compiling" = yes; then
11871   cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874 /* pthread test headers */
11875 #include <pthread.h>
11876 #ifndef NULL
11877 #define NULL (void*)0
11878 #endif
11879
11880 static void *task(p)
11881         void *p;
11882 {
11883         return (void *) (p == NULL);
11884 }
11885
11886 int main() {
11887
11888         /* pthread test function */
11889         pthread_t t;
11890         int status;
11891         int detach = 1;
11892
11893 #ifdef HAVE_PTHREADS_FINAL
11894         /* Final pthreads */
11895         pthread_attr_t attr;
11896
11897         status = pthread_attr_init(&attr);
11898         if( status ) return status;
11899
11900 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11901         if( !detach ) {
11902 #if defined( PTHREAD_CREATE_JOINABLE )
11903                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11904 #else
11905                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11906 #endif
11907
11908 #ifdef PTHREAD_CREATE_DETACHED
11909         } else {
11910                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11911 #endif
11912         }
11913         if( status ) return status;
11914 #endif
11915
11916         status = pthread_create( &t, &attr, task, NULL );
11917         if( status ) return status;
11918
11919 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11920         if( detach ) {
11921                 /* give thread a chance to complete */
11922                 /* it should remain joinable and hence detachable */
11923                 sleep( 1 );
11924
11925                 status = pthread_detach( t );
11926                 if( status ) return status;
11927         }
11928 #endif
11929
11930 #else
11931         /* Draft 4 pthreads */
11932         status = pthread_create( &t, pthread_attr_default, task, NULL );
11933         if( status ) return status;
11934
11935         if( detach ) {
11936                 /* give thread a chance to complete */
11937                 /* it should remain joinable and hence detachable */
11938                 sleep( 1 );
11939
11940                 status = pthread_detach( &t );
11941                 if( status ) return status;
11942         }
11943 #endif
11944
11945 #ifdef HAVE_LINUX_THREADS
11946         pthread_kill_other_threads_np();
11947 #endif
11948
11949         return 0;
11950
11951 ; return 0; }
11952 EOF
11953 if { (eval echo configure:11954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11954   rm -rf conftest*
11955   ol_cv_pthread_create=yes
11956 else
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -rf conftest*
11960   ol_cv_pthread_create=no
11961 fi
11962 rm -f conftest*
11963 else
11964   cat > conftest.$ac_ext <<EOF
11965 #line 11966 "configure"
11966 #include "confdefs.h"
11967 /* pthread test headers */
11968 #include <pthread.h>
11969 #ifndef NULL
11970 #define NULL (void*)0
11971 #endif
11972
11973 static void *task(p)
11974         void *p;
11975 {
11976         return (void *) (p == NULL);
11977 }
11978
11979
11980 int main(argc, argv)
11981         int argc;
11982         char **argv;
11983 {
11984
11985         /* pthread test function */
11986         pthread_t t;
11987         int status;
11988         int detach = 1;
11989
11990 #ifdef HAVE_PTHREADS_FINAL
11991         /* Final pthreads */
11992         pthread_attr_t attr;
11993
11994         status = pthread_attr_init(&attr);
11995         if( status ) return status;
11996
11997 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11998         if( !detach ) {
11999 #if defined( PTHREAD_CREATE_JOINABLE )
12000                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12001 #else
12002                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12003 #endif
12004
12005 #ifdef PTHREAD_CREATE_DETACHED
12006         } else {
12007                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12008 #endif
12009         }
12010         if( status ) return status;
12011 #endif
12012
12013         status = pthread_create( &t, &attr, task, NULL );
12014         if( status ) return status;
12015
12016 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12017         if( detach ) {
12018                 /* give thread a chance to complete */
12019                 /* it should remain joinable and hence detachable */
12020                 sleep( 1 );
12021
12022                 status = pthread_detach( t );
12023                 if( status ) return status;
12024         }
12025 #endif
12026
12027 #else
12028         /* Draft 4 pthreads */
12029         status = pthread_create( &t, pthread_attr_default, task, NULL );
12030         if( status ) return status;
12031
12032         if( detach ) {
12033                 /* give thread a chance to complete */
12034                 /* it should remain joinable and hence detachable */
12035                 sleep( 1 );
12036
12037                 status = pthread_detach( &t );
12038                 if( status ) return status;
12039         }
12040 #endif
12041
12042 #ifdef HAVE_LINUX_THREADS
12043         pthread_kill_other_threads_np();
12044 #endif
12045
12046         return 0;
12047
12048 }
12049
12050 EOF
12051 if { (eval echo configure:12052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12052 then
12053   ol_cv_pthread_create=yes
12054 else
12055   echo "configure: failed program was:" >&5
12056   cat conftest.$ac_ext >&5
12057   rm -fr conftest*
12058   ol_cv_pthread_create=no
12059 fi
12060 rm -fr conftest*
12061 fi
12062
12063 fi
12064
12065 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12066
12067                 if test $ol_cv_pthread_create != no ; then
12068                         ol_link_threads=posix
12069                         ol_link_pthreads=""
12070                 fi
12071                 
12072                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12073 if test "$ol_link_threads" = no ; then
12074         # try -kthread
12075         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12076 echo "configure:12077: checking for pthread link with -kthread" >&5
12077 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12078   echo $ac_n "(cached) $ac_c" 1>&6
12079 else
12080   
12081                 # save the flags
12082                 ol_LIBS="$LIBS"
12083                 LIBS="-kthread $LIBS"
12084
12085                 if test "$cross_compiling" = yes; then
12086   cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 /* pthread test headers */
12090 #include <pthread.h>
12091 #ifndef NULL
12092 #define NULL (void*)0
12093 #endif
12094
12095 static void *task(p)
12096         void *p;
12097 {
12098         return (void *) (p == NULL);
12099 }
12100
12101 int main() {
12102
12103         /* pthread test function */
12104         pthread_t t;
12105         int status;
12106         int detach = 1;
12107
12108 #ifdef HAVE_PTHREADS_FINAL
12109         /* Final pthreads */
12110         pthread_attr_t attr;
12111
12112         status = pthread_attr_init(&attr);
12113         if( status ) return status;
12114
12115 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12116         if( !detach ) {
12117 #if defined( PTHREAD_CREATE_JOINABLE )
12118                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12119 #else
12120                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12121 #endif
12122
12123 #ifdef PTHREAD_CREATE_DETACHED
12124         } else {
12125                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12126 #endif
12127         }
12128         if( status ) return status;
12129 #endif
12130
12131         status = pthread_create( &t, &attr, task, NULL );
12132         if( status ) return status;
12133
12134 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12135         if( detach ) {
12136                 /* give thread a chance to complete */
12137                 /* it should remain joinable and hence detachable */
12138                 sleep( 1 );
12139
12140                 status = pthread_detach( t );
12141                 if( status ) return status;
12142         }
12143 #endif
12144
12145 #else
12146         /* Draft 4 pthreads */
12147         status = pthread_create( &t, pthread_attr_default, task, NULL );
12148         if( status ) return status;
12149
12150         if( detach ) {
12151                 /* give thread a chance to complete */
12152                 /* it should remain joinable and hence detachable */
12153                 sleep( 1 );
12154
12155                 status = pthread_detach( &t );
12156                 if( status ) return status;
12157         }
12158 #endif
12159
12160 #ifdef HAVE_LINUX_THREADS
12161         pthread_kill_other_threads_np();
12162 #endif
12163
12164         return 0;
12165
12166 ; return 0; }
12167 EOF
12168 if { (eval echo configure:12169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12169   rm -rf conftest*
12170   ol_cv_pthread_kthread=yes
12171 else
12172   echo "configure: failed program was:" >&5
12173   cat conftest.$ac_ext >&5
12174   rm -rf conftest*
12175   ol_cv_pthread_kthread=no
12176 fi
12177 rm -f conftest*
12178 else
12179   cat > conftest.$ac_ext <<EOF
12180 #line 12181 "configure"
12181 #include "confdefs.h"
12182 /* pthread test headers */
12183 #include <pthread.h>
12184 #ifndef NULL
12185 #define NULL (void*)0
12186 #endif
12187
12188 static void *task(p)
12189         void *p;
12190 {
12191         return (void *) (p == NULL);
12192 }
12193
12194
12195 int main(argc, argv)
12196         int argc;
12197         char **argv;
12198 {
12199
12200         /* pthread test function */
12201         pthread_t t;
12202         int status;
12203         int detach = 1;
12204
12205 #ifdef HAVE_PTHREADS_FINAL
12206         /* Final pthreads */
12207         pthread_attr_t attr;
12208
12209         status = pthread_attr_init(&attr);
12210         if( status ) return status;
12211
12212 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12213         if( !detach ) {
12214 #if defined( PTHREAD_CREATE_JOINABLE )
12215                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12216 #else
12217                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12218 #endif
12219
12220 #ifdef PTHREAD_CREATE_DETACHED
12221         } else {
12222                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12223 #endif
12224         }
12225         if( status ) return status;
12226 #endif
12227
12228         status = pthread_create( &t, &attr, task, NULL );
12229         if( status ) return status;
12230
12231 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12232         if( detach ) {
12233                 /* give thread a chance to complete */
12234                 /* it should remain joinable and hence detachable */
12235                 sleep( 1 );
12236
12237                 status = pthread_detach( t );
12238                 if( status ) return status;
12239         }
12240 #endif
12241
12242 #else
12243         /* Draft 4 pthreads */
12244         status = pthread_create( &t, pthread_attr_default, task, NULL );
12245         if( status ) return status;
12246
12247         if( detach ) {
12248                 /* give thread a chance to complete */
12249                 /* it should remain joinable and hence detachable */
12250                 sleep( 1 );
12251
12252                 status = pthread_detach( &t );
12253                 if( status ) return status;
12254         }
12255 #endif
12256
12257 #ifdef HAVE_LINUX_THREADS
12258         pthread_kill_other_threads_np();
12259 #endif
12260
12261         return 0;
12262
12263 }
12264
12265 EOF
12266 if { (eval echo configure:12267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12267 then
12268   ol_cv_pthread_kthread=yes
12269 else
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -fr conftest*
12273   ol_cv_pthread_kthread=no
12274 fi
12275 rm -fr conftest*
12276 fi
12277
12278
12279                 # restore the LIBS
12280                 LIBS="$ol_LIBS"
12281         
12282 fi
12283
12284 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12285
12286         if test $ol_cv_pthread_kthread = yes ; then
12287                 ol_link_pthreads="-kthread"
12288                 ol_link_threads=posix
12289         fi
12290 fi
12291
12292                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12293 if test "$ol_link_threads" = no ; then
12294         # try -pthread
12295         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12296 echo "configure:12297: checking for pthread link with -pthread" >&5
12297 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12298   echo $ac_n "(cached) $ac_c" 1>&6
12299 else
12300   
12301                 # save the flags
12302                 ol_LIBS="$LIBS"
12303                 LIBS="-pthread $LIBS"
12304
12305                 if test "$cross_compiling" = yes; then
12306   cat > conftest.$ac_ext <<EOF
12307 #line 12308 "configure"
12308 #include "confdefs.h"
12309 /* pthread test headers */
12310 #include <pthread.h>
12311 #ifndef NULL
12312 #define NULL (void*)0
12313 #endif
12314
12315 static void *task(p)
12316         void *p;
12317 {
12318         return (void *) (p == NULL);
12319 }
12320
12321 int main() {
12322
12323         /* pthread test function */
12324         pthread_t t;
12325         int status;
12326         int detach = 1;
12327
12328 #ifdef HAVE_PTHREADS_FINAL
12329         /* Final pthreads */
12330         pthread_attr_t attr;
12331
12332         status = pthread_attr_init(&attr);
12333         if( status ) return status;
12334
12335 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12336         if( !detach ) {
12337 #if defined( PTHREAD_CREATE_JOINABLE )
12338                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12339 #else
12340                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12341 #endif
12342
12343 #ifdef PTHREAD_CREATE_DETACHED
12344         } else {
12345                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12346 #endif
12347         }
12348         if( status ) return status;
12349 #endif
12350
12351         status = pthread_create( &t, &attr, task, NULL );
12352         if( status ) return status;
12353
12354 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12355         if( detach ) {
12356                 /* give thread a chance to complete */
12357                 /* it should remain joinable and hence detachable */
12358                 sleep( 1 );
12359
12360                 status = pthread_detach( t );
12361                 if( status ) return status;
12362         }
12363 #endif
12364
12365 #else
12366         /* Draft 4 pthreads */
12367         status = pthread_create( &t, pthread_attr_default, task, NULL );
12368         if( status ) return status;
12369
12370         if( detach ) {
12371                 /* give thread a chance to complete */
12372                 /* it should remain joinable and hence detachable */
12373                 sleep( 1 );
12374
12375                 status = pthread_detach( &t );
12376                 if( status ) return status;
12377         }
12378 #endif
12379
12380 #ifdef HAVE_LINUX_THREADS
12381         pthread_kill_other_threads_np();
12382 #endif
12383
12384         return 0;
12385
12386 ; return 0; }
12387 EOF
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12389   rm -rf conftest*
12390   ol_cv_pthread_pthread=yes
12391 else
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -rf conftest*
12395   ol_cv_pthread_pthread=no
12396 fi
12397 rm -f conftest*
12398 else
12399   cat > conftest.$ac_ext <<EOF
12400 #line 12401 "configure"
12401 #include "confdefs.h"
12402 /* pthread test headers */
12403 #include <pthread.h>
12404 #ifndef NULL
12405 #define NULL (void*)0
12406 #endif
12407
12408 static void *task(p)
12409         void *p;
12410 {
12411         return (void *) (p == NULL);
12412 }
12413
12414
12415 int main(argc, argv)
12416         int argc;
12417         char **argv;
12418 {
12419
12420         /* pthread test function */
12421         pthread_t t;
12422         int status;
12423         int detach = 1;
12424
12425 #ifdef HAVE_PTHREADS_FINAL
12426         /* Final pthreads */
12427         pthread_attr_t attr;
12428
12429         status = pthread_attr_init(&attr);
12430         if( status ) return status;
12431
12432 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12433         if( !detach ) {
12434 #if defined( PTHREAD_CREATE_JOINABLE )
12435                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12436 #else
12437                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12438 #endif
12439
12440 #ifdef PTHREAD_CREATE_DETACHED
12441         } else {
12442                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12443 #endif
12444         }
12445         if( status ) return status;
12446 #endif
12447
12448         status = pthread_create( &t, &attr, task, NULL );
12449         if( status ) return status;
12450
12451 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12452         if( detach ) {
12453                 /* give thread a chance to complete */
12454                 /* it should remain joinable and hence detachable */
12455                 sleep( 1 );
12456
12457                 status = pthread_detach( t );
12458                 if( status ) return status;
12459         }
12460 #endif
12461
12462 #else
12463         /* Draft 4 pthreads */
12464         status = pthread_create( &t, pthread_attr_default, task, NULL );
12465         if( status ) return status;
12466
12467         if( detach ) {
12468                 /* give thread a chance to complete */
12469                 /* it should remain joinable and hence detachable */
12470                 sleep( 1 );
12471
12472                 status = pthread_detach( &t );
12473                 if( status ) return status;
12474         }
12475 #endif
12476
12477 #ifdef HAVE_LINUX_THREADS
12478         pthread_kill_other_threads_np();
12479 #endif
12480
12481         return 0;
12482
12483 }
12484
12485 EOF
12486 if { (eval echo configure:12487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12487 then
12488   ol_cv_pthread_pthread=yes
12489 else
12490   echo "configure: failed program was:" >&5
12491   cat conftest.$ac_ext >&5
12492   rm -fr conftest*
12493   ol_cv_pthread_pthread=no
12494 fi
12495 rm -fr conftest*
12496 fi
12497
12498
12499                 # restore the LIBS
12500                 LIBS="$ol_LIBS"
12501         
12502 fi
12503
12504 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12505
12506         if test $ol_cv_pthread_pthread = yes ; then
12507                 ol_link_pthreads="-pthread"
12508                 ol_link_threads=posix
12509         fi
12510 fi
12511
12512                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12513 if test "$ol_link_threads" = no ; then
12514         # try -pthreads
12515         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12516 echo "configure:12517: checking for pthread link with -pthreads" >&5
12517 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12518   echo $ac_n "(cached) $ac_c" 1>&6
12519 else
12520   
12521                 # save the flags
12522                 ol_LIBS="$LIBS"
12523                 LIBS="-pthreads $LIBS"
12524
12525                 if test "$cross_compiling" = yes; then
12526   cat > conftest.$ac_ext <<EOF
12527 #line 12528 "configure"
12528 #include "confdefs.h"
12529 /* pthread test headers */
12530 #include <pthread.h>
12531 #ifndef NULL
12532 #define NULL (void*)0
12533 #endif
12534
12535 static void *task(p)
12536         void *p;
12537 {
12538         return (void *) (p == NULL);
12539 }
12540
12541 int main() {
12542
12543         /* pthread test function */
12544         pthread_t t;
12545         int status;
12546         int detach = 1;
12547
12548 #ifdef HAVE_PTHREADS_FINAL
12549         /* Final pthreads */
12550         pthread_attr_t attr;
12551
12552         status = pthread_attr_init(&attr);
12553         if( status ) return status;
12554
12555 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12556         if( !detach ) {
12557 #if defined( PTHREAD_CREATE_JOINABLE )
12558                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12559 #else
12560                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12561 #endif
12562
12563 #ifdef PTHREAD_CREATE_DETACHED
12564         } else {
12565                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12566 #endif
12567         }
12568         if( status ) return status;
12569 #endif
12570
12571         status = pthread_create( &t, &attr, task, NULL );
12572         if( status ) return status;
12573
12574 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12575         if( detach ) {
12576                 /* give thread a chance to complete */
12577                 /* it should remain joinable and hence detachable */
12578                 sleep( 1 );
12579
12580                 status = pthread_detach( t );
12581                 if( status ) return status;
12582         }
12583 #endif
12584
12585 #else
12586         /* Draft 4 pthreads */
12587         status = pthread_create( &t, pthread_attr_default, task, NULL );
12588         if( status ) return status;
12589
12590         if( detach ) {
12591                 /* give thread a chance to complete */
12592                 /* it should remain joinable and hence detachable */
12593                 sleep( 1 );
12594
12595                 status = pthread_detach( &t );
12596                 if( status ) return status;
12597         }
12598 #endif
12599
12600 #ifdef HAVE_LINUX_THREADS
12601         pthread_kill_other_threads_np();
12602 #endif
12603
12604         return 0;
12605
12606 ; return 0; }
12607 EOF
12608 if { (eval echo configure:12609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12609   rm -rf conftest*
12610   ol_cv_pthread_pthreads=yes
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -rf conftest*
12615   ol_cv_pthread_pthreads=no
12616 fi
12617 rm -f conftest*
12618 else
12619   cat > conftest.$ac_ext <<EOF
12620 #line 12621 "configure"
12621 #include "confdefs.h"
12622 /* pthread test headers */
12623 #include <pthread.h>
12624 #ifndef NULL
12625 #define NULL (void*)0
12626 #endif
12627
12628 static void *task(p)
12629         void *p;
12630 {
12631         return (void *) (p == NULL);
12632 }
12633
12634
12635 int main(argc, argv)
12636         int argc;
12637         char **argv;
12638 {
12639
12640         /* pthread test function */
12641         pthread_t t;
12642         int status;
12643         int detach = 1;
12644
12645 #ifdef HAVE_PTHREADS_FINAL
12646         /* Final pthreads */
12647         pthread_attr_t attr;
12648
12649         status = pthread_attr_init(&attr);
12650         if( status ) return status;
12651
12652 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12653         if( !detach ) {
12654 #if defined( PTHREAD_CREATE_JOINABLE )
12655                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12656 #else
12657                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12658 #endif
12659
12660 #ifdef PTHREAD_CREATE_DETACHED
12661         } else {
12662                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12663 #endif
12664         }
12665         if( status ) return status;
12666 #endif
12667
12668         status = pthread_create( &t, &attr, task, NULL );
12669         if( status ) return status;
12670
12671 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12672         if( detach ) {
12673                 /* give thread a chance to complete */
12674                 /* it should remain joinable and hence detachable */
12675                 sleep( 1 );
12676
12677                 status = pthread_detach( t );
12678                 if( status ) return status;
12679         }
12680 #endif
12681
12682 #else
12683         /* Draft 4 pthreads */
12684         status = pthread_create( &t, pthread_attr_default, task, NULL );
12685         if( status ) return status;
12686
12687         if( detach ) {
12688                 /* give thread a chance to complete */
12689                 /* it should remain joinable and hence detachable */
12690                 sleep( 1 );
12691
12692                 status = pthread_detach( &t );
12693                 if( status ) return status;
12694         }
12695 #endif
12696
12697 #ifdef HAVE_LINUX_THREADS
12698         pthread_kill_other_threads_np();
12699 #endif
12700
12701         return 0;
12702
12703 }
12704
12705 EOF
12706 if { (eval echo configure:12707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12707 then
12708   ol_cv_pthread_pthreads=yes
12709 else
12710   echo "configure: failed program was:" >&5
12711   cat conftest.$ac_ext >&5
12712   rm -fr conftest*
12713   ol_cv_pthread_pthreads=no
12714 fi
12715 rm -fr conftest*
12716 fi
12717
12718
12719                 # restore the LIBS
12720                 LIBS="$ol_LIBS"
12721         
12722 fi
12723
12724 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12725
12726         if test $ol_cv_pthread_pthreads = yes ; then
12727                 ol_link_pthreads="-pthreads"
12728                 ol_link_threads=posix
12729         fi
12730 fi
12731
12732                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12733 if test "$ol_link_threads" = no ; then
12734         # try -mthreads
12735         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12736 echo "configure:12737: checking for pthread link with -mthreads" >&5
12737 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12738   echo $ac_n "(cached) $ac_c" 1>&6
12739 else
12740   
12741                 # save the flags
12742                 ol_LIBS="$LIBS"
12743                 LIBS="-mthreads $LIBS"
12744
12745                 if test "$cross_compiling" = yes; then
12746   cat > conftest.$ac_ext <<EOF
12747 #line 12748 "configure"
12748 #include "confdefs.h"
12749 /* pthread test headers */
12750 #include <pthread.h>
12751 #ifndef NULL
12752 #define NULL (void*)0
12753 #endif
12754
12755 static void *task(p)
12756         void *p;
12757 {
12758         return (void *) (p == NULL);
12759 }
12760
12761 int main() {
12762
12763         /* pthread test function */
12764         pthread_t t;
12765         int status;
12766         int detach = 1;
12767
12768 #ifdef HAVE_PTHREADS_FINAL
12769         /* Final pthreads */
12770         pthread_attr_t attr;
12771
12772         status = pthread_attr_init(&attr);
12773         if( status ) return status;
12774
12775 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12776         if( !detach ) {
12777 #if defined( PTHREAD_CREATE_JOINABLE )
12778                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12779 #else
12780                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12781 #endif
12782
12783 #ifdef PTHREAD_CREATE_DETACHED
12784         } else {
12785                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12786 #endif
12787         }
12788         if( status ) return status;
12789 #endif
12790
12791         status = pthread_create( &t, &attr, task, NULL );
12792         if( status ) return status;
12793
12794 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12795         if( detach ) {
12796                 /* give thread a chance to complete */
12797                 /* it should remain joinable and hence detachable */
12798                 sleep( 1 );
12799
12800                 status = pthread_detach( t );
12801                 if( status ) return status;
12802         }
12803 #endif
12804
12805 #else
12806         /* Draft 4 pthreads */
12807         status = pthread_create( &t, pthread_attr_default, task, NULL );
12808         if( status ) return status;
12809
12810         if( detach ) {
12811                 /* give thread a chance to complete */
12812                 /* it should remain joinable and hence detachable */
12813                 sleep( 1 );
12814
12815                 status = pthread_detach( &t );
12816                 if( status ) return status;
12817         }
12818 #endif
12819
12820 #ifdef HAVE_LINUX_THREADS
12821         pthread_kill_other_threads_np();
12822 #endif
12823
12824         return 0;
12825
12826 ; return 0; }
12827 EOF
12828 if { (eval echo configure:12829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12829   rm -rf conftest*
12830   ol_cv_pthread_mthreads=yes
12831 else
12832   echo "configure: failed program was:" >&5
12833   cat conftest.$ac_ext >&5
12834   rm -rf conftest*
12835   ol_cv_pthread_mthreads=no
12836 fi
12837 rm -f conftest*
12838 else
12839   cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842 /* pthread test headers */
12843 #include <pthread.h>
12844 #ifndef NULL
12845 #define NULL (void*)0
12846 #endif
12847
12848 static void *task(p)
12849         void *p;
12850 {
12851         return (void *) (p == NULL);
12852 }
12853
12854
12855 int main(argc, argv)
12856         int argc;
12857         char **argv;
12858 {
12859
12860         /* pthread test function */
12861         pthread_t t;
12862         int status;
12863         int detach = 1;
12864
12865 #ifdef HAVE_PTHREADS_FINAL
12866         /* Final pthreads */
12867         pthread_attr_t attr;
12868
12869         status = pthread_attr_init(&attr);
12870         if( status ) return status;
12871
12872 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12873         if( !detach ) {
12874 #if defined( PTHREAD_CREATE_JOINABLE )
12875                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12876 #else
12877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12878 #endif
12879
12880 #ifdef PTHREAD_CREATE_DETACHED
12881         } else {
12882                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12883 #endif
12884         }
12885         if( status ) return status;
12886 #endif
12887
12888         status = pthread_create( &t, &attr, task, NULL );
12889         if( status ) return status;
12890
12891 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12892         if( detach ) {
12893                 /* give thread a chance to complete */
12894                 /* it should remain joinable and hence detachable */
12895                 sleep( 1 );
12896
12897                 status = pthread_detach( t );
12898                 if( status ) return status;
12899         }
12900 #endif
12901
12902 #else
12903         /* Draft 4 pthreads */
12904         status = pthread_create( &t, pthread_attr_default, task, NULL );
12905         if( status ) return status;
12906
12907         if( detach ) {
12908                 /* give thread a chance to complete */
12909                 /* it should remain joinable and hence detachable */
12910                 sleep( 1 );
12911
12912                 status = pthread_detach( &t );
12913                 if( status ) return status;
12914         }
12915 #endif
12916
12917 #ifdef HAVE_LINUX_THREADS
12918         pthread_kill_other_threads_np();
12919 #endif
12920
12921         return 0;
12922
12923 }
12924
12925 EOF
12926 if { (eval echo configure:12927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12927 then
12928   ol_cv_pthread_mthreads=yes
12929 else
12930   echo "configure: failed program was:" >&5
12931   cat conftest.$ac_ext >&5
12932   rm -fr conftest*
12933   ol_cv_pthread_mthreads=no
12934 fi
12935 rm -fr conftest*
12936 fi
12937
12938
12939                 # restore the LIBS
12940                 LIBS="$ol_LIBS"
12941         
12942 fi
12943
12944 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12945
12946         if test $ol_cv_pthread_mthreads = yes ; then
12947                 ol_link_pthreads="-mthreads"
12948                 ol_link_threads=posix
12949         fi
12950 fi
12951
12952                 # Pthread try link: -thread (ol_cv_pthread_thread)
12953 if test "$ol_link_threads" = no ; then
12954         # try -thread
12955         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12956 echo "configure:12957: checking for pthread link with -thread" >&5
12957 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12958   echo $ac_n "(cached) $ac_c" 1>&6
12959 else
12960   
12961                 # save the flags
12962                 ol_LIBS="$LIBS"
12963                 LIBS="-thread $LIBS"
12964
12965                 if test "$cross_compiling" = yes; then
12966   cat > conftest.$ac_ext <<EOF
12967 #line 12968 "configure"
12968 #include "confdefs.h"
12969 /* pthread test headers */
12970 #include <pthread.h>
12971 #ifndef NULL
12972 #define NULL (void*)0
12973 #endif
12974
12975 static void *task(p)
12976         void *p;
12977 {
12978         return (void *) (p == NULL);
12979 }
12980
12981 int main() {
12982
12983         /* pthread test function */
12984         pthread_t t;
12985         int status;
12986         int detach = 1;
12987
12988 #ifdef HAVE_PTHREADS_FINAL
12989         /* Final pthreads */
12990         pthread_attr_t attr;
12991
12992         status = pthread_attr_init(&attr);
12993         if( status ) return status;
12994
12995 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12996         if( !detach ) {
12997 #if defined( PTHREAD_CREATE_JOINABLE )
12998                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12999 #else
13000                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13001 #endif
13002
13003 #ifdef PTHREAD_CREATE_DETACHED
13004         } else {
13005                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13006 #endif
13007         }
13008         if( status ) return status;
13009 #endif
13010
13011         status = pthread_create( &t, &attr, task, NULL );
13012         if( status ) return status;
13013
13014 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13015         if( detach ) {
13016                 /* give thread a chance to complete */
13017                 /* it should remain joinable and hence detachable */
13018                 sleep( 1 );
13019
13020                 status = pthread_detach( t );
13021                 if( status ) return status;
13022         }
13023 #endif
13024
13025 #else
13026         /* Draft 4 pthreads */
13027         status = pthread_create( &t, pthread_attr_default, task, NULL );
13028         if( status ) return status;
13029
13030         if( detach ) {
13031                 /* give thread a chance to complete */
13032                 /* it should remain joinable and hence detachable */
13033                 sleep( 1 );
13034
13035                 status = pthread_detach( &t );
13036                 if( status ) return status;
13037         }
13038 #endif
13039
13040 #ifdef HAVE_LINUX_THREADS
13041         pthread_kill_other_threads_np();
13042 #endif
13043
13044         return 0;
13045
13046 ; return 0; }
13047 EOF
13048 if { (eval echo configure:13049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13049   rm -rf conftest*
13050   ol_cv_pthread_thread=yes
13051 else
13052   echo "configure: failed program was:" >&5
13053   cat conftest.$ac_ext >&5
13054   rm -rf conftest*
13055   ol_cv_pthread_thread=no
13056 fi
13057 rm -f conftest*
13058 else
13059   cat > conftest.$ac_ext <<EOF
13060 #line 13061 "configure"
13061 #include "confdefs.h"
13062 /* pthread test headers */
13063 #include <pthread.h>
13064 #ifndef NULL
13065 #define NULL (void*)0
13066 #endif
13067
13068 static void *task(p)
13069         void *p;
13070 {
13071         return (void *) (p == NULL);
13072 }
13073
13074
13075 int main(argc, argv)
13076         int argc;
13077         char **argv;
13078 {
13079
13080         /* pthread test function */
13081         pthread_t t;
13082         int status;
13083         int detach = 1;
13084
13085 #ifdef HAVE_PTHREADS_FINAL
13086         /* Final pthreads */
13087         pthread_attr_t attr;
13088
13089         status = pthread_attr_init(&attr);
13090         if( status ) return status;
13091
13092 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13093         if( !detach ) {
13094 #if defined( PTHREAD_CREATE_JOINABLE )
13095                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13096 #else
13097                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13098 #endif
13099
13100 #ifdef PTHREAD_CREATE_DETACHED
13101         } else {
13102                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13103 #endif
13104         }
13105         if( status ) return status;
13106 #endif
13107
13108         status = pthread_create( &t, &attr, task, NULL );
13109         if( status ) return status;
13110
13111 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13112         if( detach ) {
13113                 /* give thread a chance to complete */
13114                 /* it should remain joinable and hence detachable */
13115                 sleep( 1 );
13116
13117                 status = pthread_detach( t );
13118                 if( status ) return status;
13119         }
13120 #endif
13121
13122 #else
13123         /* Draft 4 pthreads */
13124         status = pthread_create( &t, pthread_attr_default, task, NULL );
13125         if( status ) return status;
13126
13127         if( detach ) {
13128                 /* give thread a chance to complete */
13129                 /* it should remain joinable and hence detachable */
13130                 sleep( 1 );
13131
13132                 status = pthread_detach( &t );
13133                 if( status ) return status;
13134         }
13135 #endif
13136
13137 #ifdef HAVE_LINUX_THREADS
13138         pthread_kill_other_threads_np();
13139 #endif
13140
13141         return 0;
13142
13143 }
13144
13145 EOF
13146 if { (eval echo configure:13147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13147 then
13148   ol_cv_pthread_thread=yes
13149 else
13150   echo "configure: failed program was:" >&5
13151   cat conftest.$ac_ext >&5
13152   rm -fr conftest*
13153   ol_cv_pthread_thread=no
13154 fi
13155 rm -fr conftest*
13156 fi
13157
13158
13159                 # restore the LIBS
13160                 LIBS="$ol_LIBS"
13161         
13162 fi
13163
13164 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13165
13166         if test $ol_cv_pthread_thread = yes ; then
13167                 ol_link_pthreads="-thread"
13168                 ol_link_threads=posix
13169         fi
13170 fi
13171
13172
13173                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13174 if test "$ol_link_threads" = no ; then
13175         # try -lpthread -lmach -lexc -lc_r
13176         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13177 echo "configure:13178: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13178 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13179   echo $ac_n "(cached) $ac_c" 1>&6
13180 else
13181   
13182                 # save the flags
13183                 ol_LIBS="$LIBS"
13184                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13185
13186                 if test "$cross_compiling" = yes; then
13187   cat > conftest.$ac_ext <<EOF
13188 #line 13189 "configure"
13189 #include "confdefs.h"
13190 /* pthread test headers */
13191 #include <pthread.h>
13192 #ifndef NULL
13193 #define NULL (void*)0
13194 #endif
13195
13196 static void *task(p)
13197         void *p;
13198 {
13199         return (void *) (p == NULL);
13200 }
13201
13202 int main() {
13203
13204         /* pthread test function */
13205         pthread_t t;
13206         int status;
13207         int detach = 1;
13208
13209 #ifdef HAVE_PTHREADS_FINAL
13210         /* Final pthreads */
13211         pthread_attr_t attr;
13212
13213         status = pthread_attr_init(&attr);
13214         if( status ) return status;
13215
13216 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13217         if( !detach ) {
13218 #if defined( PTHREAD_CREATE_JOINABLE )
13219                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13220 #else
13221                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13222 #endif
13223
13224 #ifdef PTHREAD_CREATE_DETACHED
13225         } else {
13226                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13227 #endif
13228         }
13229         if( status ) return status;
13230 #endif
13231
13232         status = pthread_create( &t, &attr, task, NULL );
13233         if( status ) return status;
13234
13235 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13236         if( detach ) {
13237                 /* give thread a chance to complete */
13238                 /* it should remain joinable and hence detachable */
13239                 sleep( 1 );
13240
13241                 status = pthread_detach( t );
13242                 if( status ) return status;
13243         }
13244 #endif
13245
13246 #else
13247         /* Draft 4 pthreads */
13248         status = pthread_create( &t, pthread_attr_default, task, NULL );
13249         if( status ) return status;
13250
13251         if( detach ) {
13252                 /* give thread a chance to complete */
13253                 /* it should remain joinable and hence detachable */
13254                 sleep( 1 );
13255
13256                 status = pthread_detach( &t );
13257                 if( status ) return status;
13258         }
13259 #endif
13260
13261 #ifdef HAVE_LINUX_THREADS
13262         pthread_kill_other_threads_np();
13263 #endif
13264
13265         return 0;
13266
13267 ; return 0; }
13268 EOF
13269 if { (eval echo configure:13270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13270   rm -rf conftest*
13271   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13272 else
13273   echo "configure: failed program was:" >&5
13274   cat conftest.$ac_ext >&5
13275   rm -rf conftest*
13276   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13277 fi
13278 rm -f conftest*
13279 else
13280   cat > conftest.$ac_ext <<EOF
13281 #line 13282 "configure"
13282 #include "confdefs.h"
13283 /* pthread test headers */
13284 #include <pthread.h>
13285 #ifndef NULL
13286 #define NULL (void*)0
13287 #endif
13288
13289 static void *task(p)
13290         void *p;
13291 {
13292         return (void *) (p == NULL);
13293 }
13294
13295
13296 int main(argc, argv)
13297         int argc;
13298         char **argv;
13299 {
13300
13301         /* pthread test function */
13302         pthread_t t;
13303         int status;
13304         int detach = 1;
13305
13306 #ifdef HAVE_PTHREADS_FINAL
13307         /* Final pthreads */
13308         pthread_attr_t attr;
13309
13310         status = pthread_attr_init(&attr);
13311         if( status ) return status;
13312
13313 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13314         if( !detach ) {
13315 #if defined( PTHREAD_CREATE_JOINABLE )
13316                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13317 #else
13318                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13319 #endif
13320
13321 #ifdef PTHREAD_CREATE_DETACHED
13322         } else {
13323                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13324 #endif
13325         }
13326         if( status ) return status;
13327 #endif
13328
13329         status = pthread_create( &t, &attr, task, NULL );
13330         if( status ) return status;
13331
13332 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13333         if( detach ) {
13334                 /* give thread a chance to complete */
13335                 /* it should remain joinable and hence detachable */
13336                 sleep( 1 );
13337
13338                 status = pthread_detach( t );
13339                 if( status ) return status;
13340         }
13341 #endif
13342
13343 #else
13344         /* Draft 4 pthreads */
13345         status = pthread_create( &t, pthread_attr_default, task, NULL );
13346         if( status ) return status;
13347
13348         if( detach ) {
13349                 /* give thread a chance to complete */
13350                 /* it should remain joinable and hence detachable */
13351                 sleep( 1 );
13352
13353                 status = pthread_detach( &t );
13354                 if( status ) return status;
13355         }
13356 #endif
13357
13358 #ifdef HAVE_LINUX_THREADS
13359         pthread_kill_other_threads_np();
13360 #endif
13361
13362         return 0;
13363
13364 }
13365
13366 EOF
13367 if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13368 then
13369   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13370 else
13371   echo "configure: failed program was:" >&5
13372   cat conftest.$ac_ext >&5
13373   rm -fr conftest*
13374   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13375 fi
13376 rm -fr conftest*
13377 fi
13378
13379
13380                 # restore the LIBS
13381                 LIBS="$ol_LIBS"
13382         
13383 fi
13384
13385 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13386
13387         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13388                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13389                 ol_link_threads=posix
13390         fi
13391 fi
13392
13393                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13394 if test "$ol_link_threads" = no ; then
13395         # try -lpthread -lmach -lexc
13396         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13397 echo "configure:13398: checking for pthread link with -lpthread -lmach -lexc" >&5
13398 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13399   echo $ac_n "(cached) $ac_c" 1>&6
13400 else
13401   
13402                 # save the flags
13403                 ol_LIBS="$LIBS"
13404                 LIBS="-lpthread -lmach -lexc $LIBS"
13405
13406                 if test "$cross_compiling" = yes; then
13407   cat > conftest.$ac_ext <<EOF
13408 #line 13409 "configure"
13409 #include "confdefs.h"
13410 /* pthread test headers */
13411 #include <pthread.h>
13412 #ifndef NULL
13413 #define NULL (void*)0
13414 #endif
13415
13416 static void *task(p)
13417         void *p;
13418 {
13419         return (void *) (p == NULL);
13420 }
13421
13422 int main() {
13423
13424         /* pthread test function */
13425         pthread_t t;
13426         int status;
13427         int detach = 1;
13428
13429 #ifdef HAVE_PTHREADS_FINAL
13430         /* Final pthreads */
13431         pthread_attr_t attr;
13432
13433         status = pthread_attr_init(&attr);
13434         if( status ) return status;
13435
13436 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13437         if( !detach ) {
13438 #if defined( PTHREAD_CREATE_JOINABLE )
13439                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13440 #else
13441                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13442 #endif
13443
13444 #ifdef PTHREAD_CREATE_DETACHED
13445         } else {
13446                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13447 #endif
13448         }
13449         if( status ) return status;
13450 #endif
13451
13452         status = pthread_create( &t, &attr, task, NULL );
13453         if( status ) return status;
13454
13455 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13456         if( detach ) {
13457                 /* give thread a chance to complete */
13458                 /* it should remain joinable and hence detachable */
13459                 sleep( 1 );
13460
13461                 status = pthread_detach( t );
13462                 if( status ) return status;
13463         }
13464 #endif
13465
13466 #else
13467         /* Draft 4 pthreads */
13468         status = pthread_create( &t, pthread_attr_default, task, NULL );
13469         if( status ) return status;
13470
13471         if( detach ) {
13472                 /* give thread a chance to complete */
13473                 /* it should remain joinable and hence detachable */
13474                 sleep( 1 );
13475
13476                 status = pthread_detach( &t );
13477                 if( status ) return status;
13478         }
13479 #endif
13480
13481 #ifdef HAVE_LINUX_THREADS
13482         pthread_kill_other_threads_np();
13483 #endif
13484
13485         return 0;
13486
13487 ; return 0; }
13488 EOF
13489 if { (eval echo configure:13490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13490   rm -rf conftest*
13491   ol_cv_pthread_lpthread_lmach_lexc=yes
13492 else
13493   echo "configure: failed program was:" >&5
13494   cat conftest.$ac_ext >&5
13495   rm -rf conftest*
13496   ol_cv_pthread_lpthread_lmach_lexc=no
13497 fi
13498 rm -f conftest*
13499 else
13500   cat > conftest.$ac_ext <<EOF
13501 #line 13502 "configure"
13502 #include "confdefs.h"
13503 /* pthread test headers */
13504 #include <pthread.h>
13505 #ifndef NULL
13506 #define NULL (void*)0
13507 #endif
13508
13509 static void *task(p)
13510         void *p;
13511 {
13512         return (void *) (p == NULL);
13513 }
13514
13515
13516 int main(argc, argv)
13517         int argc;
13518         char **argv;
13519 {
13520
13521         /* pthread test function */
13522         pthread_t t;
13523         int status;
13524         int detach = 1;
13525
13526 #ifdef HAVE_PTHREADS_FINAL
13527         /* Final pthreads */
13528         pthread_attr_t attr;
13529
13530         status = pthread_attr_init(&attr);
13531         if( status ) return status;
13532
13533 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13534         if( !detach ) {
13535 #if defined( PTHREAD_CREATE_JOINABLE )
13536                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13537 #else
13538                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13539 #endif
13540
13541 #ifdef PTHREAD_CREATE_DETACHED
13542         } else {
13543                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13544 #endif
13545         }
13546         if( status ) return status;
13547 #endif
13548
13549         status = pthread_create( &t, &attr, task, NULL );
13550         if( status ) return status;
13551
13552 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13553         if( detach ) {
13554                 /* give thread a chance to complete */
13555                 /* it should remain joinable and hence detachable */
13556                 sleep( 1 );
13557
13558                 status = pthread_detach( t );
13559                 if( status ) return status;
13560         }
13561 #endif
13562
13563 #else
13564         /* Draft 4 pthreads */
13565         status = pthread_create( &t, pthread_attr_default, task, NULL );
13566         if( status ) return status;
13567
13568         if( detach ) {
13569                 /* give thread a chance to complete */
13570                 /* it should remain joinable and hence detachable */
13571                 sleep( 1 );
13572
13573                 status = pthread_detach( &t );
13574                 if( status ) return status;
13575         }
13576 #endif
13577
13578 #ifdef HAVE_LINUX_THREADS
13579         pthread_kill_other_threads_np();
13580 #endif
13581
13582         return 0;
13583
13584 }
13585
13586 EOF
13587 if { (eval echo configure:13588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13588 then
13589   ol_cv_pthread_lpthread_lmach_lexc=yes
13590 else
13591   echo "configure: failed program was:" >&5
13592   cat conftest.$ac_ext >&5
13593   rm -fr conftest*
13594   ol_cv_pthread_lpthread_lmach_lexc=no
13595 fi
13596 rm -fr conftest*
13597 fi
13598
13599
13600                 # restore the LIBS
13601                 LIBS="$ol_LIBS"
13602         
13603 fi
13604
13605 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13606
13607         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13608                 ol_link_pthreads="-lpthread -lmach -lexc"
13609                 ol_link_threads=posix
13610         fi
13611 fi
13612
13613
13614                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13615 if test "$ol_link_threads" = no ; then
13616         # try -lpthread -Wl,-woff,85
13617         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13618 echo "configure:13619: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13619 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13620   echo $ac_n "(cached) $ac_c" 1>&6
13621 else
13622   
13623                 # save the flags
13624                 ol_LIBS="$LIBS"
13625                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13626
13627                 if test "$cross_compiling" = yes; then
13628   cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 /* pthread test headers */
13632 #include <pthread.h>
13633 #ifndef NULL
13634 #define NULL (void*)0
13635 #endif
13636
13637 static void *task(p)
13638         void *p;
13639 {
13640         return (void *) (p == NULL);
13641 }
13642
13643 int main() {
13644
13645         /* pthread test function */
13646         pthread_t t;
13647         int status;
13648         int detach = 1;
13649
13650 #ifdef HAVE_PTHREADS_FINAL
13651         /* Final pthreads */
13652         pthread_attr_t attr;
13653
13654         status = pthread_attr_init(&attr);
13655         if( status ) return status;
13656
13657 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13658         if( !detach ) {
13659 #if defined( PTHREAD_CREATE_JOINABLE )
13660                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13661 #else
13662                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13663 #endif
13664
13665 #ifdef PTHREAD_CREATE_DETACHED
13666         } else {
13667                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13668 #endif
13669         }
13670         if( status ) return status;
13671 #endif
13672
13673         status = pthread_create( &t, &attr, task, NULL );
13674         if( status ) return status;
13675
13676 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13677         if( detach ) {
13678                 /* give thread a chance to complete */
13679                 /* it should remain joinable and hence detachable */
13680                 sleep( 1 );
13681
13682                 status = pthread_detach( t );
13683                 if( status ) return status;
13684         }
13685 #endif
13686
13687 #else
13688         /* Draft 4 pthreads */
13689         status = pthread_create( &t, pthread_attr_default, task, NULL );
13690         if( status ) return status;
13691
13692         if( detach ) {
13693                 /* give thread a chance to complete */
13694                 /* it should remain joinable and hence detachable */
13695                 sleep( 1 );
13696
13697                 status = pthread_detach( &t );
13698                 if( status ) return status;
13699         }
13700 #endif
13701
13702 #ifdef HAVE_LINUX_THREADS
13703         pthread_kill_other_threads_np();
13704 #endif
13705
13706         return 0;
13707
13708 ; return 0; }
13709 EOF
13710 if { (eval echo configure:13711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13711   rm -rf conftest*
13712   ol_cv_pthread_lib_lpthread_woff=yes
13713 else
13714   echo "configure: failed program was:" >&5
13715   cat conftest.$ac_ext >&5
13716   rm -rf conftest*
13717   ol_cv_pthread_lib_lpthread_woff=no
13718 fi
13719 rm -f conftest*
13720 else
13721   cat > conftest.$ac_ext <<EOF
13722 #line 13723 "configure"
13723 #include "confdefs.h"
13724 /* pthread test headers */
13725 #include <pthread.h>
13726 #ifndef NULL
13727 #define NULL (void*)0
13728 #endif
13729
13730 static void *task(p)
13731         void *p;
13732 {
13733         return (void *) (p == NULL);
13734 }
13735
13736
13737 int main(argc, argv)
13738         int argc;
13739         char **argv;
13740 {
13741
13742         /* pthread test function */
13743         pthread_t t;
13744         int status;
13745         int detach = 1;
13746
13747 #ifdef HAVE_PTHREADS_FINAL
13748         /* Final pthreads */
13749         pthread_attr_t attr;
13750
13751         status = pthread_attr_init(&attr);
13752         if( status ) return status;
13753
13754 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13755         if( !detach ) {
13756 #if defined( PTHREAD_CREATE_JOINABLE )
13757                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13758 #else
13759                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13760 #endif
13761
13762 #ifdef PTHREAD_CREATE_DETACHED
13763         } else {
13764                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13765 #endif
13766         }
13767         if( status ) return status;
13768 #endif
13769
13770         status = pthread_create( &t, &attr, task, NULL );
13771         if( status ) return status;
13772
13773 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13774         if( detach ) {
13775                 /* give thread a chance to complete */
13776                 /* it should remain joinable and hence detachable */
13777                 sleep( 1 );
13778
13779                 status = pthread_detach( t );
13780                 if( status ) return status;
13781         }
13782 #endif
13783
13784 #else
13785         /* Draft 4 pthreads */
13786         status = pthread_create( &t, pthread_attr_default, task, NULL );
13787         if( status ) return status;
13788
13789         if( detach ) {
13790                 /* give thread a chance to complete */
13791                 /* it should remain joinable and hence detachable */
13792                 sleep( 1 );
13793
13794                 status = pthread_detach( &t );
13795                 if( status ) return status;
13796         }
13797 #endif
13798
13799 #ifdef HAVE_LINUX_THREADS
13800         pthread_kill_other_threads_np();
13801 #endif
13802
13803         return 0;
13804
13805 }
13806
13807 EOF
13808 if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13809 then
13810   ol_cv_pthread_lib_lpthread_woff=yes
13811 else
13812   echo "configure: failed program was:" >&5
13813   cat conftest.$ac_ext >&5
13814   rm -fr conftest*
13815   ol_cv_pthread_lib_lpthread_woff=no
13816 fi
13817 rm -fr conftest*
13818 fi
13819
13820
13821                 # restore the LIBS
13822                 LIBS="$ol_LIBS"
13823         
13824 fi
13825
13826 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13827
13828         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13829                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13830                 ol_link_threads=posix
13831         fi
13832 fi
13833
13834
13835                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13836 if test "$ol_link_threads" = no ; then
13837         # try -lpthread
13838         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13839 echo "configure:13840: checking for pthread link with -lpthread" >&5
13840 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13841   echo $ac_n "(cached) $ac_c" 1>&6
13842 else
13843   
13844                 # save the flags
13845                 ol_LIBS="$LIBS"
13846                 LIBS="-lpthread $LIBS"
13847
13848                 if test "$cross_compiling" = yes; then
13849   cat > conftest.$ac_ext <<EOF
13850 #line 13851 "configure"
13851 #include "confdefs.h"
13852 /* pthread test headers */
13853 #include <pthread.h>
13854 #ifndef NULL
13855 #define NULL (void*)0
13856 #endif
13857
13858 static void *task(p)
13859         void *p;
13860 {
13861         return (void *) (p == NULL);
13862 }
13863
13864 int main() {
13865
13866         /* pthread test function */
13867         pthread_t t;
13868         int status;
13869         int detach = 1;
13870
13871 #ifdef HAVE_PTHREADS_FINAL
13872         /* Final pthreads */
13873         pthread_attr_t attr;
13874
13875         status = pthread_attr_init(&attr);
13876         if( status ) return status;
13877
13878 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13879         if( !detach ) {
13880 #if defined( PTHREAD_CREATE_JOINABLE )
13881                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13882 #else
13883                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13884 #endif
13885
13886 #ifdef PTHREAD_CREATE_DETACHED
13887         } else {
13888                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13889 #endif
13890         }
13891         if( status ) return status;
13892 #endif
13893
13894         status = pthread_create( &t, &attr, task, NULL );
13895         if( status ) return status;
13896
13897 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13898         if( detach ) {
13899                 /* give thread a chance to complete */
13900                 /* it should remain joinable and hence detachable */
13901                 sleep( 1 );
13902
13903                 status = pthread_detach( t );
13904                 if( status ) return status;
13905         }
13906 #endif
13907
13908 #else
13909         /* Draft 4 pthreads */
13910         status = pthread_create( &t, pthread_attr_default, task, NULL );
13911         if( status ) return status;
13912
13913         if( detach ) {
13914                 /* give thread a chance to complete */
13915                 /* it should remain joinable and hence detachable */
13916                 sleep( 1 );
13917
13918                 status = pthread_detach( &t );
13919                 if( status ) return status;
13920         }
13921 #endif
13922
13923 #ifdef HAVE_LINUX_THREADS
13924         pthread_kill_other_threads_np();
13925 #endif
13926
13927         return 0;
13928
13929 ; return 0; }
13930 EOF
13931 if { (eval echo configure:13932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13932   rm -rf conftest*
13933   ol_cv_pthread_lpthread=yes
13934 else
13935   echo "configure: failed program was:" >&5
13936   cat conftest.$ac_ext >&5
13937   rm -rf conftest*
13938   ol_cv_pthread_lpthread=no
13939 fi
13940 rm -f conftest*
13941 else
13942   cat > conftest.$ac_ext <<EOF
13943 #line 13944 "configure"
13944 #include "confdefs.h"
13945 /* pthread test headers */
13946 #include <pthread.h>
13947 #ifndef NULL
13948 #define NULL (void*)0
13949 #endif
13950
13951 static void *task(p)
13952         void *p;
13953 {
13954         return (void *) (p == NULL);
13955 }
13956
13957
13958 int main(argc, argv)
13959         int argc;
13960         char **argv;
13961 {
13962
13963         /* pthread test function */
13964         pthread_t t;
13965         int status;
13966         int detach = 1;
13967
13968 #ifdef HAVE_PTHREADS_FINAL
13969         /* Final pthreads */
13970         pthread_attr_t attr;
13971
13972         status = pthread_attr_init(&attr);
13973         if( status ) return status;
13974
13975 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13976         if( !detach ) {
13977 #if defined( PTHREAD_CREATE_JOINABLE )
13978                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13979 #else
13980                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13981 #endif
13982
13983 #ifdef PTHREAD_CREATE_DETACHED
13984         } else {
13985                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13986 #endif
13987         }
13988         if( status ) return status;
13989 #endif
13990
13991         status = pthread_create( &t, &attr, task, NULL );
13992         if( status ) return status;
13993
13994 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13995         if( detach ) {
13996                 /* give thread a chance to complete */
13997                 /* it should remain joinable and hence detachable */
13998                 sleep( 1 );
13999
14000                 status = pthread_detach( t );
14001                 if( status ) return status;
14002         }
14003 #endif
14004
14005 #else
14006         /* Draft 4 pthreads */
14007         status = pthread_create( &t, pthread_attr_default, task, NULL );
14008         if( status ) return status;
14009
14010         if( detach ) {
14011                 /* give thread a chance to complete */
14012                 /* it should remain joinable and hence detachable */
14013                 sleep( 1 );
14014
14015                 status = pthread_detach( &t );
14016                 if( status ) return status;
14017         }
14018 #endif
14019
14020 #ifdef HAVE_LINUX_THREADS
14021         pthread_kill_other_threads_np();
14022 #endif
14023
14024         return 0;
14025
14026 }
14027
14028 EOF
14029 if { (eval echo configure:14030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14030 then
14031   ol_cv_pthread_lpthread=yes
14032 else
14033   echo "configure: failed program was:" >&5
14034   cat conftest.$ac_ext >&5
14035   rm -fr conftest*
14036   ol_cv_pthread_lpthread=no
14037 fi
14038 rm -fr conftest*
14039 fi
14040
14041
14042                 # restore the LIBS
14043                 LIBS="$ol_LIBS"
14044         
14045 fi
14046
14047 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14048
14049         if test $ol_cv_pthread_lpthread = yes ; then
14050                 ol_link_pthreads="-lpthread"
14051                 ol_link_threads=posix
14052         fi
14053 fi
14054
14055                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14056 if test "$ol_link_threads" = no ; then
14057         # try -lc_r
14058         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14059 echo "configure:14060: checking for pthread link with -lc_r" >&5
14060 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14061   echo $ac_n "(cached) $ac_c" 1>&6
14062 else
14063   
14064                 # save the flags
14065                 ol_LIBS="$LIBS"
14066                 LIBS="-lc_r $LIBS"
14067
14068                 if test "$cross_compiling" = yes; then
14069   cat > conftest.$ac_ext <<EOF
14070 #line 14071 "configure"
14071 #include "confdefs.h"
14072 /* pthread test headers */
14073 #include <pthread.h>
14074 #ifndef NULL
14075 #define NULL (void*)0
14076 #endif
14077
14078 static void *task(p)
14079         void *p;
14080 {
14081         return (void *) (p == NULL);
14082 }
14083
14084 int main() {
14085
14086         /* pthread test function */
14087         pthread_t t;
14088         int status;
14089         int detach = 1;
14090
14091 #ifdef HAVE_PTHREADS_FINAL
14092         /* Final pthreads */
14093         pthread_attr_t attr;
14094
14095         status = pthread_attr_init(&attr);
14096         if( status ) return status;
14097
14098 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14099         if( !detach ) {
14100 #if defined( PTHREAD_CREATE_JOINABLE )
14101                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14102 #else
14103                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14104 #endif
14105
14106 #ifdef PTHREAD_CREATE_DETACHED
14107         } else {
14108                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14109 #endif
14110         }
14111         if( status ) return status;
14112 #endif
14113
14114         status = pthread_create( &t, &attr, task, NULL );
14115         if( status ) return status;
14116
14117 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14118         if( detach ) {
14119                 /* give thread a chance to complete */
14120                 /* it should remain joinable and hence detachable */
14121                 sleep( 1 );
14122
14123                 status = pthread_detach( t );
14124                 if( status ) return status;
14125         }
14126 #endif
14127
14128 #else
14129         /* Draft 4 pthreads */
14130         status = pthread_create( &t, pthread_attr_default, task, NULL );
14131         if( status ) return status;
14132
14133         if( detach ) {
14134                 /* give thread a chance to complete */
14135                 /* it should remain joinable and hence detachable */
14136                 sleep( 1 );
14137
14138                 status = pthread_detach( &t );
14139                 if( status ) return status;
14140         }
14141 #endif
14142
14143 #ifdef HAVE_LINUX_THREADS
14144         pthread_kill_other_threads_np();
14145 #endif
14146
14147         return 0;
14148
14149 ; return 0; }
14150 EOF
14151 if { (eval echo configure:14152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14152   rm -rf conftest*
14153   ol_cv_pthread_lc_r=yes
14154 else
14155   echo "configure: failed program was:" >&5
14156   cat conftest.$ac_ext >&5
14157   rm -rf conftest*
14158   ol_cv_pthread_lc_r=no
14159 fi
14160 rm -f conftest*
14161 else
14162   cat > conftest.$ac_ext <<EOF
14163 #line 14164 "configure"
14164 #include "confdefs.h"
14165 /* pthread test headers */
14166 #include <pthread.h>
14167 #ifndef NULL
14168 #define NULL (void*)0
14169 #endif
14170
14171 static void *task(p)
14172         void *p;
14173 {
14174         return (void *) (p == NULL);
14175 }
14176
14177
14178 int main(argc, argv)
14179         int argc;
14180         char **argv;
14181 {
14182
14183         /* pthread test function */
14184         pthread_t t;
14185         int status;
14186         int detach = 1;
14187
14188 #ifdef HAVE_PTHREADS_FINAL
14189         /* Final pthreads */
14190         pthread_attr_t attr;
14191
14192         status = pthread_attr_init(&attr);
14193         if( status ) return status;
14194
14195 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14196         if( !detach ) {
14197 #if defined( PTHREAD_CREATE_JOINABLE )
14198                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14199 #else
14200                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14201 #endif
14202
14203 #ifdef PTHREAD_CREATE_DETACHED
14204         } else {
14205                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14206 #endif
14207         }
14208         if( status ) return status;
14209 #endif
14210
14211         status = pthread_create( &t, &attr, task, NULL );
14212         if( status ) return status;
14213
14214 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14215         if( detach ) {
14216                 /* give thread a chance to complete */
14217                 /* it should remain joinable and hence detachable */
14218                 sleep( 1 );
14219
14220                 status = pthread_detach( t );
14221                 if( status ) return status;
14222         }
14223 #endif
14224
14225 #else
14226         /* Draft 4 pthreads */
14227         status = pthread_create( &t, pthread_attr_default, task, NULL );
14228         if( status ) return status;
14229
14230         if( detach ) {
14231                 /* give thread a chance to complete */
14232                 /* it should remain joinable and hence detachable */
14233                 sleep( 1 );
14234
14235                 status = pthread_detach( &t );
14236                 if( status ) return status;
14237         }
14238 #endif
14239
14240 #ifdef HAVE_LINUX_THREADS
14241         pthread_kill_other_threads_np();
14242 #endif
14243
14244         return 0;
14245
14246 }
14247
14248 EOF
14249 if { (eval echo configure:14250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14250 then
14251   ol_cv_pthread_lc_r=yes
14252 else
14253   echo "configure: failed program was:" >&5
14254   cat conftest.$ac_ext >&5
14255   rm -fr conftest*
14256   ol_cv_pthread_lc_r=no
14257 fi
14258 rm -fr conftest*
14259 fi
14260
14261
14262                 # restore the LIBS
14263                 LIBS="$ol_LIBS"
14264         
14265 fi
14266
14267 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14268
14269         if test $ol_cv_pthread_lc_r = yes ; then
14270                 ol_link_pthreads="-lc_r"
14271                 ol_link_threads=posix
14272         fi
14273 fi
14274
14275
14276                 # Pthread try link: -threads (ol_cv_pthread_threads)
14277 if test "$ol_link_threads" = no ; then
14278         # try -threads
14279         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14280 echo "configure:14281: checking for pthread link with -threads" >&5
14281 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14282   echo $ac_n "(cached) $ac_c" 1>&6
14283 else
14284   
14285                 # save the flags
14286                 ol_LIBS="$LIBS"
14287                 LIBS="-threads $LIBS"
14288
14289                 if test "$cross_compiling" = yes; then
14290   cat > conftest.$ac_ext <<EOF
14291 #line 14292 "configure"
14292 #include "confdefs.h"
14293 /* pthread test headers */
14294 #include <pthread.h>
14295 #ifndef NULL
14296 #define NULL (void*)0
14297 #endif
14298
14299 static void *task(p)
14300         void *p;
14301 {
14302         return (void *) (p == NULL);
14303 }
14304
14305 int main() {
14306
14307         /* pthread test function */
14308         pthread_t t;
14309         int status;
14310         int detach = 1;
14311
14312 #ifdef HAVE_PTHREADS_FINAL
14313         /* Final pthreads */
14314         pthread_attr_t attr;
14315
14316         status = pthread_attr_init(&attr);
14317         if( status ) return status;
14318
14319 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14320         if( !detach ) {
14321 #if defined( PTHREAD_CREATE_JOINABLE )
14322                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14323 #else
14324                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14325 #endif
14326
14327 #ifdef PTHREAD_CREATE_DETACHED
14328         } else {
14329                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14330 #endif
14331         }
14332         if( status ) return status;
14333 #endif
14334
14335         status = pthread_create( &t, &attr, task, NULL );
14336         if( status ) return status;
14337
14338 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14339         if( detach ) {
14340                 /* give thread a chance to complete */
14341                 /* it should remain joinable and hence detachable */
14342                 sleep( 1 );
14343
14344                 status = pthread_detach( t );
14345                 if( status ) return status;
14346         }
14347 #endif
14348
14349 #else
14350         /* Draft 4 pthreads */
14351         status = pthread_create( &t, pthread_attr_default, task, NULL );
14352         if( status ) return status;
14353
14354         if( detach ) {
14355                 /* give thread a chance to complete */
14356                 /* it should remain joinable and hence detachable */
14357                 sleep( 1 );
14358
14359                 status = pthread_detach( &t );
14360                 if( status ) return status;
14361         }
14362 #endif
14363
14364 #ifdef HAVE_LINUX_THREADS
14365         pthread_kill_other_threads_np();
14366 #endif
14367
14368         return 0;
14369
14370 ; return 0; }
14371 EOF
14372 if { (eval echo configure:14373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14373   rm -rf conftest*
14374   ol_cv_pthread_threads=yes
14375 else
14376   echo "configure: failed program was:" >&5
14377   cat conftest.$ac_ext >&5
14378   rm -rf conftest*
14379   ol_cv_pthread_threads=no
14380 fi
14381 rm -f conftest*
14382 else
14383   cat > conftest.$ac_ext <<EOF
14384 #line 14385 "configure"
14385 #include "confdefs.h"
14386 /* pthread test headers */
14387 #include <pthread.h>
14388 #ifndef NULL
14389 #define NULL (void*)0
14390 #endif
14391
14392 static void *task(p)
14393         void *p;
14394 {
14395         return (void *) (p == NULL);
14396 }
14397
14398
14399 int main(argc, argv)
14400         int argc;
14401         char **argv;
14402 {
14403
14404         /* pthread test function */
14405         pthread_t t;
14406         int status;
14407         int detach = 1;
14408
14409 #ifdef HAVE_PTHREADS_FINAL
14410         /* Final pthreads */
14411         pthread_attr_t attr;
14412
14413         status = pthread_attr_init(&attr);
14414         if( status ) return status;
14415
14416 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14417         if( !detach ) {
14418 #if defined( PTHREAD_CREATE_JOINABLE )
14419                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14420 #else
14421                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14422 #endif
14423
14424 #ifdef PTHREAD_CREATE_DETACHED
14425         } else {
14426                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14427 #endif
14428         }
14429         if( status ) return status;
14430 #endif
14431
14432         status = pthread_create( &t, &attr, task, NULL );
14433         if( status ) return status;
14434
14435 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14436         if( detach ) {
14437                 /* give thread a chance to complete */
14438                 /* it should remain joinable and hence detachable */
14439                 sleep( 1 );
14440
14441                 status = pthread_detach( t );
14442                 if( status ) return status;
14443         }
14444 #endif
14445
14446 #else
14447         /* Draft 4 pthreads */
14448         status = pthread_create( &t, pthread_attr_default, task, NULL );
14449         if( status ) return status;
14450
14451         if( detach ) {
14452                 /* give thread a chance to complete */
14453                 /* it should remain joinable and hence detachable */
14454                 sleep( 1 );
14455
14456                 status = pthread_detach( &t );
14457                 if( status ) return status;
14458         }
14459 #endif
14460
14461 #ifdef HAVE_LINUX_THREADS
14462         pthread_kill_other_threads_np();
14463 #endif
14464
14465         return 0;
14466
14467 }
14468
14469 EOF
14470 if { (eval echo configure:14471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14471 then
14472   ol_cv_pthread_threads=yes
14473 else
14474   echo "configure: failed program was:" >&5
14475   cat conftest.$ac_ext >&5
14476   rm -fr conftest*
14477   ol_cv_pthread_threads=no
14478 fi
14479 rm -fr conftest*
14480 fi
14481
14482
14483                 # restore the LIBS
14484                 LIBS="$ol_LIBS"
14485         
14486 fi
14487
14488 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14489
14490         if test $ol_cv_pthread_threads = yes ; then
14491                 ol_link_pthreads="-threads"
14492                 ol_link_threads=posix
14493         fi
14494 fi
14495
14496
14497                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14498 if test "$ol_link_threads" = no ; then
14499         # try -lpthreads -lmach -lexc -lc_r
14500         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14501 echo "configure:14502: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14502 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14503   echo $ac_n "(cached) $ac_c" 1>&6
14504 else
14505   
14506                 # save the flags
14507                 ol_LIBS="$LIBS"
14508                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14509
14510                 if test "$cross_compiling" = yes; then
14511   cat > conftest.$ac_ext <<EOF
14512 #line 14513 "configure"
14513 #include "confdefs.h"
14514 /* pthread test headers */
14515 #include <pthread.h>
14516 #ifndef NULL
14517 #define NULL (void*)0
14518 #endif
14519
14520 static void *task(p)
14521         void *p;
14522 {
14523         return (void *) (p == NULL);
14524 }
14525
14526 int main() {
14527
14528         /* pthread test function */
14529         pthread_t t;
14530         int status;
14531         int detach = 1;
14532
14533 #ifdef HAVE_PTHREADS_FINAL
14534         /* Final pthreads */
14535         pthread_attr_t attr;
14536
14537         status = pthread_attr_init(&attr);
14538         if( status ) return status;
14539
14540 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14541         if( !detach ) {
14542 #if defined( PTHREAD_CREATE_JOINABLE )
14543                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14544 #else
14545                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14546 #endif
14547
14548 #ifdef PTHREAD_CREATE_DETACHED
14549         } else {
14550                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14551 #endif
14552         }
14553         if( status ) return status;
14554 #endif
14555
14556         status = pthread_create( &t, &attr, task, NULL );
14557         if( status ) return status;
14558
14559 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14560         if( detach ) {
14561                 /* give thread a chance to complete */
14562                 /* it should remain joinable and hence detachable */
14563                 sleep( 1 );
14564
14565                 status = pthread_detach( t );
14566                 if( status ) return status;
14567         }
14568 #endif
14569
14570 #else
14571         /* Draft 4 pthreads */
14572         status = pthread_create( &t, pthread_attr_default, task, NULL );
14573         if( status ) return status;
14574
14575         if( detach ) {
14576                 /* give thread a chance to complete */
14577                 /* it should remain joinable and hence detachable */
14578                 sleep( 1 );
14579
14580                 status = pthread_detach( &t );
14581                 if( status ) return status;
14582         }
14583 #endif
14584
14585 #ifdef HAVE_LINUX_THREADS
14586         pthread_kill_other_threads_np();
14587 #endif
14588
14589         return 0;
14590
14591 ; return 0; }
14592 EOF
14593 if { (eval echo configure:14594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14594   rm -rf conftest*
14595   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14596 else
14597   echo "configure: failed program was:" >&5
14598   cat conftest.$ac_ext >&5
14599   rm -rf conftest*
14600   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14601 fi
14602 rm -f conftest*
14603 else
14604   cat > conftest.$ac_ext <<EOF
14605 #line 14606 "configure"
14606 #include "confdefs.h"
14607 /* pthread test headers */
14608 #include <pthread.h>
14609 #ifndef NULL
14610 #define NULL (void*)0
14611 #endif
14612
14613 static void *task(p)
14614         void *p;
14615 {
14616         return (void *) (p == NULL);
14617 }
14618
14619
14620 int main(argc, argv)
14621         int argc;
14622         char **argv;
14623 {
14624
14625         /* pthread test function */
14626         pthread_t t;
14627         int status;
14628         int detach = 1;
14629
14630 #ifdef HAVE_PTHREADS_FINAL
14631         /* Final pthreads */
14632         pthread_attr_t attr;
14633
14634         status = pthread_attr_init(&attr);
14635         if( status ) return status;
14636
14637 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14638         if( !detach ) {
14639 #if defined( PTHREAD_CREATE_JOINABLE )
14640                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14641 #else
14642                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14643 #endif
14644
14645 #ifdef PTHREAD_CREATE_DETACHED
14646         } else {
14647                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14648 #endif
14649         }
14650         if( status ) return status;
14651 #endif
14652
14653         status = pthread_create( &t, &attr, task, NULL );
14654         if( status ) return status;
14655
14656 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14657         if( detach ) {
14658                 /* give thread a chance to complete */
14659                 /* it should remain joinable and hence detachable */
14660                 sleep( 1 );
14661
14662                 status = pthread_detach( t );
14663                 if( status ) return status;
14664         }
14665 #endif
14666
14667 #else
14668         /* Draft 4 pthreads */
14669         status = pthread_create( &t, pthread_attr_default, task, NULL );
14670         if( status ) return status;
14671
14672         if( detach ) {
14673                 /* give thread a chance to complete */
14674                 /* it should remain joinable and hence detachable */
14675                 sleep( 1 );
14676
14677                 status = pthread_detach( &t );
14678                 if( status ) return status;
14679         }
14680 #endif
14681
14682 #ifdef HAVE_LINUX_THREADS
14683         pthread_kill_other_threads_np();
14684 #endif
14685
14686         return 0;
14687
14688 }
14689
14690 EOF
14691 if { (eval echo configure:14692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14692 then
14693   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14694 else
14695   echo "configure: failed program was:" >&5
14696   cat conftest.$ac_ext >&5
14697   rm -fr conftest*
14698   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14699 fi
14700 rm -fr conftest*
14701 fi
14702
14703
14704                 # restore the LIBS
14705                 LIBS="$ol_LIBS"
14706         
14707 fi
14708
14709 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14710
14711         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14712                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14713                 ol_link_threads=posix
14714         fi
14715 fi
14716
14717                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14718 if test "$ol_link_threads" = no ; then
14719         # try -lpthreads -lmach -lexc
14720         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14721 echo "configure:14722: checking for pthread link with -lpthreads -lmach -lexc" >&5
14722 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14723   echo $ac_n "(cached) $ac_c" 1>&6
14724 else
14725   
14726                 # save the flags
14727                 ol_LIBS="$LIBS"
14728                 LIBS="-lpthreads -lmach -lexc $LIBS"
14729
14730                 if test "$cross_compiling" = yes; then
14731   cat > conftest.$ac_ext <<EOF
14732 #line 14733 "configure"
14733 #include "confdefs.h"
14734 /* pthread test headers */
14735 #include <pthread.h>
14736 #ifndef NULL
14737 #define NULL (void*)0
14738 #endif
14739
14740 static void *task(p)
14741         void *p;
14742 {
14743         return (void *) (p == NULL);
14744 }
14745
14746 int main() {
14747
14748         /* pthread test function */
14749         pthread_t t;
14750         int status;
14751         int detach = 1;
14752
14753 #ifdef HAVE_PTHREADS_FINAL
14754         /* Final pthreads */
14755         pthread_attr_t attr;
14756
14757         status = pthread_attr_init(&attr);
14758         if( status ) return status;
14759
14760 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14761         if( !detach ) {
14762 #if defined( PTHREAD_CREATE_JOINABLE )
14763                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14764 #else
14765                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14766 #endif
14767
14768 #ifdef PTHREAD_CREATE_DETACHED
14769         } else {
14770                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14771 #endif
14772         }
14773         if( status ) return status;
14774 #endif
14775
14776         status = pthread_create( &t, &attr, task, NULL );
14777         if( status ) return status;
14778
14779 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14780         if( detach ) {
14781                 /* give thread a chance to complete */
14782                 /* it should remain joinable and hence detachable */
14783                 sleep( 1 );
14784
14785                 status = pthread_detach( t );
14786                 if( status ) return status;
14787         }
14788 #endif
14789
14790 #else
14791         /* Draft 4 pthreads */
14792         status = pthread_create( &t, pthread_attr_default, task, NULL );
14793         if( status ) return status;
14794
14795         if( detach ) {
14796                 /* give thread a chance to complete */
14797                 /* it should remain joinable and hence detachable */
14798                 sleep( 1 );
14799
14800                 status = pthread_detach( &t );
14801                 if( status ) return status;
14802         }
14803 #endif
14804
14805 #ifdef HAVE_LINUX_THREADS
14806         pthread_kill_other_threads_np();
14807 #endif
14808
14809         return 0;
14810
14811 ; return 0; }
14812 EOF
14813 if { (eval echo configure:14814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14814   rm -rf conftest*
14815   ol_cv_pthread_lpthreads_lmach_lexc=yes
14816 else
14817   echo "configure: failed program was:" >&5
14818   cat conftest.$ac_ext >&5
14819   rm -rf conftest*
14820   ol_cv_pthread_lpthreads_lmach_lexc=no
14821 fi
14822 rm -f conftest*
14823 else
14824   cat > conftest.$ac_ext <<EOF
14825 #line 14826 "configure"
14826 #include "confdefs.h"
14827 /* pthread test headers */
14828 #include <pthread.h>
14829 #ifndef NULL
14830 #define NULL (void*)0
14831 #endif
14832
14833 static void *task(p)
14834         void *p;
14835 {
14836         return (void *) (p == NULL);
14837 }
14838
14839
14840 int main(argc, argv)
14841         int argc;
14842         char **argv;
14843 {
14844
14845         /* pthread test function */
14846         pthread_t t;
14847         int status;
14848         int detach = 1;
14849
14850 #ifdef HAVE_PTHREADS_FINAL
14851         /* Final pthreads */
14852         pthread_attr_t attr;
14853
14854         status = pthread_attr_init(&attr);
14855         if( status ) return status;
14856
14857 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14858         if( !detach ) {
14859 #if defined( PTHREAD_CREATE_JOINABLE )
14860                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14861 #else
14862                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14863 #endif
14864
14865 #ifdef PTHREAD_CREATE_DETACHED
14866         } else {
14867                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14868 #endif
14869         }
14870         if( status ) return status;
14871 #endif
14872
14873         status = pthread_create( &t, &attr, task, NULL );
14874         if( status ) return status;
14875
14876 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14877         if( detach ) {
14878                 /* give thread a chance to complete */
14879                 /* it should remain joinable and hence detachable */
14880                 sleep( 1 );
14881
14882                 status = pthread_detach( t );
14883                 if( status ) return status;
14884         }
14885 #endif
14886
14887 #else
14888         /* Draft 4 pthreads */
14889         status = pthread_create( &t, pthread_attr_default, task, NULL );
14890         if( status ) return status;
14891
14892         if( detach ) {
14893                 /* give thread a chance to complete */
14894                 /* it should remain joinable and hence detachable */
14895                 sleep( 1 );
14896
14897                 status = pthread_detach( &t );
14898                 if( status ) return status;
14899         }
14900 #endif
14901
14902 #ifdef HAVE_LINUX_THREADS
14903         pthread_kill_other_threads_np();
14904 #endif
14905
14906         return 0;
14907
14908 }
14909
14910 EOF
14911 if { (eval echo configure:14912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14912 then
14913   ol_cv_pthread_lpthreads_lmach_lexc=yes
14914 else
14915   echo "configure: failed program was:" >&5
14916   cat conftest.$ac_ext >&5
14917   rm -fr conftest*
14918   ol_cv_pthread_lpthreads_lmach_lexc=no
14919 fi
14920 rm -fr conftest*
14921 fi
14922
14923
14924                 # restore the LIBS
14925                 LIBS="$ol_LIBS"
14926         
14927 fi
14928
14929 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14930
14931         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14932                 ol_link_pthreads="-lpthreads -lmach -lexc"
14933                 ol_link_threads=posix
14934         fi
14935 fi
14936
14937                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14938 if test "$ol_link_threads" = no ; then
14939         # try -lpthreads -lexc
14940         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14941 echo "configure:14942: checking for pthread link with -lpthreads -lexc" >&5
14942 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14943   echo $ac_n "(cached) $ac_c" 1>&6
14944 else
14945   
14946                 # save the flags
14947                 ol_LIBS="$LIBS"
14948                 LIBS="-lpthreads -lexc $LIBS"
14949
14950                 if test "$cross_compiling" = yes; then
14951   cat > conftest.$ac_ext <<EOF
14952 #line 14953 "configure"
14953 #include "confdefs.h"
14954 /* pthread test headers */
14955 #include <pthread.h>
14956 #ifndef NULL
14957 #define NULL (void*)0
14958 #endif
14959
14960 static void *task(p)
14961         void *p;
14962 {
14963         return (void *) (p == NULL);
14964 }
14965
14966 int main() {
14967
14968         /* pthread test function */
14969         pthread_t t;
14970         int status;
14971         int detach = 1;
14972
14973 #ifdef HAVE_PTHREADS_FINAL
14974         /* Final pthreads */
14975         pthread_attr_t attr;
14976
14977         status = pthread_attr_init(&attr);
14978         if( status ) return status;
14979
14980 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14981         if( !detach ) {
14982 #if defined( PTHREAD_CREATE_JOINABLE )
14983                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14984 #else
14985                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14986 #endif
14987
14988 #ifdef PTHREAD_CREATE_DETACHED
14989         } else {
14990                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14991 #endif
14992         }
14993         if( status ) return status;
14994 #endif
14995
14996         status = pthread_create( &t, &attr, task, NULL );
14997         if( status ) return status;
14998
14999 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15000         if( detach ) {
15001                 /* give thread a chance to complete */
15002                 /* it should remain joinable and hence detachable */
15003                 sleep( 1 );
15004
15005                 status = pthread_detach( t );
15006                 if( status ) return status;
15007         }
15008 #endif
15009
15010 #else
15011         /* Draft 4 pthreads */
15012         status = pthread_create( &t, pthread_attr_default, task, NULL );
15013         if( status ) return status;
15014
15015         if( detach ) {
15016                 /* give thread a chance to complete */
15017                 /* it should remain joinable and hence detachable */
15018                 sleep( 1 );
15019
15020                 status = pthread_detach( &t );
15021                 if( status ) return status;
15022         }
15023 #endif
15024
15025 #ifdef HAVE_LINUX_THREADS
15026         pthread_kill_other_threads_np();
15027 #endif
15028
15029         return 0;
15030
15031 ; return 0; }
15032 EOF
15033 if { (eval echo configure:15034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15034   rm -rf conftest*
15035   ol_cv_pthread_lpthreads_lexc=yes
15036 else
15037   echo "configure: failed program was:" >&5
15038   cat conftest.$ac_ext >&5
15039   rm -rf conftest*
15040   ol_cv_pthread_lpthreads_lexc=no
15041 fi
15042 rm -f conftest*
15043 else
15044   cat > conftest.$ac_ext <<EOF
15045 #line 15046 "configure"
15046 #include "confdefs.h"
15047 /* pthread test headers */
15048 #include <pthread.h>
15049 #ifndef NULL
15050 #define NULL (void*)0
15051 #endif
15052
15053 static void *task(p)
15054         void *p;
15055 {
15056         return (void *) (p == NULL);
15057 }
15058
15059
15060 int main(argc, argv)
15061         int argc;
15062         char **argv;
15063 {
15064
15065         /* pthread test function */
15066         pthread_t t;
15067         int status;
15068         int detach = 1;
15069
15070 #ifdef HAVE_PTHREADS_FINAL
15071         /* Final pthreads */
15072         pthread_attr_t attr;
15073
15074         status = pthread_attr_init(&attr);
15075         if( status ) return status;
15076
15077 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15078         if( !detach ) {
15079 #if defined( PTHREAD_CREATE_JOINABLE )
15080                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15081 #else
15082                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15083 #endif
15084
15085 #ifdef PTHREAD_CREATE_DETACHED
15086         } else {
15087                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15088 #endif
15089         }
15090         if( status ) return status;
15091 #endif
15092
15093         status = pthread_create( &t, &attr, task, NULL );
15094         if( status ) return status;
15095
15096 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15097         if( detach ) {
15098                 /* give thread a chance to complete */
15099                 /* it should remain joinable and hence detachable */
15100                 sleep( 1 );
15101
15102                 status = pthread_detach( t );
15103                 if( status ) return status;
15104         }
15105 #endif
15106
15107 #else
15108         /* Draft 4 pthreads */
15109         status = pthread_create( &t, pthread_attr_default, task, NULL );
15110         if( status ) return status;
15111
15112         if( detach ) {
15113                 /* give thread a chance to complete */
15114                 /* it should remain joinable and hence detachable */
15115                 sleep( 1 );
15116
15117                 status = pthread_detach( &t );
15118                 if( status ) return status;
15119         }
15120 #endif
15121
15122 #ifdef HAVE_LINUX_THREADS
15123         pthread_kill_other_threads_np();
15124 #endif
15125
15126         return 0;
15127
15128 }
15129
15130 EOF
15131 if { (eval echo configure:15132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15132 then
15133   ol_cv_pthread_lpthreads_lexc=yes
15134 else
15135   echo "configure: failed program was:" >&5
15136   cat conftest.$ac_ext >&5
15137   rm -fr conftest*
15138   ol_cv_pthread_lpthreads_lexc=no
15139 fi
15140 rm -fr conftest*
15141 fi
15142
15143
15144                 # restore the LIBS
15145                 LIBS="$ol_LIBS"
15146         
15147 fi
15148
15149 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15150
15151         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15152                 ol_link_pthreads="-lpthreads -lexc"
15153                 ol_link_threads=posix
15154         fi
15155 fi
15156
15157
15158                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15159 if test "$ol_link_threads" = no ; then
15160         # try -lpthreads
15161         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15162 echo "configure:15163: checking for pthread link with -lpthreads" >&5
15163 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15164   echo $ac_n "(cached) $ac_c" 1>&6
15165 else
15166   
15167                 # save the flags
15168                 ol_LIBS="$LIBS"
15169                 LIBS="-lpthreads $LIBS"
15170
15171                 if test "$cross_compiling" = yes; then
15172   cat > conftest.$ac_ext <<EOF
15173 #line 15174 "configure"
15174 #include "confdefs.h"
15175 /* pthread test headers */
15176 #include <pthread.h>
15177 #ifndef NULL
15178 #define NULL (void*)0
15179 #endif
15180
15181 static void *task(p)
15182         void *p;
15183 {
15184         return (void *) (p == NULL);
15185 }
15186
15187 int main() {
15188
15189         /* pthread test function */
15190         pthread_t t;
15191         int status;
15192         int detach = 1;
15193
15194 #ifdef HAVE_PTHREADS_FINAL
15195         /* Final pthreads */
15196         pthread_attr_t attr;
15197
15198         status = pthread_attr_init(&attr);
15199         if( status ) return status;
15200
15201 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15202         if( !detach ) {
15203 #if defined( PTHREAD_CREATE_JOINABLE )
15204                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15205 #else
15206                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15207 #endif
15208
15209 #ifdef PTHREAD_CREATE_DETACHED
15210         } else {
15211                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15212 #endif
15213         }
15214         if( status ) return status;
15215 #endif
15216
15217         status = pthread_create( &t, &attr, task, NULL );
15218         if( status ) return status;
15219
15220 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15221         if( detach ) {
15222                 /* give thread a chance to complete */
15223                 /* it should remain joinable and hence detachable */
15224                 sleep( 1 );
15225
15226                 status = pthread_detach( t );
15227                 if( status ) return status;
15228         }
15229 #endif
15230
15231 #else
15232         /* Draft 4 pthreads */
15233         status = pthread_create( &t, pthread_attr_default, task, NULL );
15234         if( status ) return status;
15235
15236         if( detach ) {
15237                 /* give thread a chance to complete */
15238                 /* it should remain joinable and hence detachable */
15239                 sleep( 1 );
15240
15241                 status = pthread_detach( &t );
15242                 if( status ) return status;
15243         }
15244 #endif
15245
15246 #ifdef HAVE_LINUX_THREADS
15247         pthread_kill_other_threads_np();
15248 #endif
15249
15250         return 0;
15251
15252 ; return 0; }
15253 EOF
15254 if { (eval echo configure:15255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15255   rm -rf conftest*
15256   ol_cv_pthread_lib_lpthreads=yes
15257 else
15258   echo "configure: failed program was:" >&5
15259   cat conftest.$ac_ext >&5
15260   rm -rf conftest*
15261   ol_cv_pthread_lib_lpthreads=no
15262 fi
15263 rm -f conftest*
15264 else
15265   cat > conftest.$ac_ext <<EOF
15266 #line 15267 "configure"
15267 #include "confdefs.h"
15268 /* pthread test headers */
15269 #include <pthread.h>
15270 #ifndef NULL
15271 #define NULL (void*)0
15272 #endif
15273
15274 static void *task(p)
15275         void *p;
15276 {
15277         return (void *) (p == NULL);
15278 }
15279
15280
15281 int main(argc, argv)
15282         int argc;
15283         char **argv;
15284 {
15285
15286         /* pthread test function */
15287         pthread_t t;
15288         int status;
15289         int detach = 1;
15290
15291 #ifdef HAVE_PTHREADS_FINAL
15292         /* Final pthreads */
15293         pthread_attr_t attr;
15294
15295         status = pthread_attr_init(&attr);
15296         if( status ) return status;
15297
15298 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15299         if( !detach ) {
15300 #if defined( PTHREAD_CREATE_JOINABLE )
15301                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15302 #else
15303                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15304 #endif
15305
15306 #ifdef PTHREAD_CREATE_DETACHED
15307         } else {
15308                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15309 #endif
15310         }
15311         if( status ) return status;
15312 #endif
15313
15314         status = pthread_create( &t, &attr, task, NULL );
15315         if( status ) return status;
15316
15317 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15318         if( detach ) {
15319                 /* give thread a chance to complete */
15320                 /* it should remain joinable and hence detachable */
15321                 sleep( 1 );
15322
15323                 status = pthread_detach( t );
15324                 if( status ) return status;
15325         }
15326 #endif
15327
15328 #else
15329         /* Draft 4 pthreads */
15330         status = pthread_create( &t, pthread_attr_default, task, NULL );
15331         if( status ) return status;
15332
15333         if( detach ) {
15334                 /* give thread a chance to complete */
15335                 /* it should remain joinable and hence detachable */
15336                 sleep( 1 );
15337
15338                 status = pthread_detach( &t );
15339                 if( status ) return status;
15340         }
15341 #endif
15342
15343 #ifdef HAVE_LINUX_THREADS
15344         pthread_kill_other_threads_np();
15345 #endif
15346
15347         return 0;
15348
15349 }
15350
15351 EOF
15352 if { (eval echo configure:15353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15353 then
15354   ol_cv_pthread_lib_lpthreads=yes
15355 else
15356   echo "configure: failed program was:" >&5
15357   cat conftest.$ac_ext >&5
15358   rm -fr conftest*
15359   ol_cv_pthread_lib_lpthreads=no
15360 fi
15361 rm -fr conftest*
15362 fi
15363
15364
15365                 # restore the LIBS
15366                 LIBS="$ol_LIBS"
15367         
15368 fi
15369
15370 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15371
15372         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15373                 ol_link_pthreads="-lpthreads"
15374                 ol_link_threads=posix
15375         fi
15376 fi
15377
15378
15379                 if test $ol_link_threads != no ; then
15380                         cat >> confdefs.h <<\EOF
15381 #define HAVE_PTHREADS 1
15382 EOF
15383
15384
15385                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15386
15387                                                 save_CPPFLAGS="$CPPFLAGS"
15388                         save_LIBS="$LIBS"
15389                         LIBS="$LTHREAD_LIBS $LIBS"
15390
15391                                                                                                 for ac_func in sched_yield pthread_yield
15392 do
15393 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15394 echo "configure:15395: checking for $ac_func" >&5
15395 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15396   echo $ac_n "(cached) $ac_c" 1>&6
15397 else
15398   cat > conftest.$ac_ext <<EOF
15399 #line 15400 "configure"
15400 #include "confdefs.h"
15401 /* System header to define __stub macros and hopefully few prototypes,
15402     which can conflict with char $ac_func(); below.  */
15403 #include <assert.h>
15404 /* Override any gcc2 internal prototype to avoid an error.  */
15405 /* We use char because int might match the return type of a gcc2
15406     builtin and then its argument prototype would still apply.  */
15407 char $ac_func();
15408 char (*f)();
15409
15410 int main() {
15411
15412 /* The GNU C library defines this for functions which it implements
15413     to always fail with ENOSYS.  Some functions are actually named
15414     something starting with __ and the normal name is an alias.  */
15415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15416 choke me
15417 #else
15418 f = $ac_func;
15419 #endif
15420
15421 ; return 0; }
15422 EOF
15423 if { (eval echo configure:15424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15424   rm -rf conftest*
15425   eval "ac_cv_func_$ac_func=yes"
15426 else
15427   echo "configure: failed program was:" >&5
15428   cat conftest.$ac_ext >&5
15429   rm -rf conftest*
15430   eval "ac_cv_func_$ac_func=no"
15431 fi
15432 rm -f conftest*
15433 fi
15434
15435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15436   echo "$ac_t""yes" 1>&6
15437     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15438   cat >> confdefs.h <<EOF
15439 #define $ac_tr_func 1
15440 EOF
15441  
15442 else
15443   echo "$ac_t""no" 1>&6
15444 fi
15445 done
15446
15447
15448                         if test $ac_cv_func_sched_yield = no -a \
15449                                 $ac_cv_func_pthread_yield = no ; then
15450                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15451 echo "configure:15452: checking for sched_yield in -lrt" >&5
15452 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15453 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   ac_save_LIBS="$LIBS"
15457 LIBS="-lrt  $LIBS"
15458 cat > conftest.$ac_ext <<EOF
15459 #line 15460 "configure"
15460 #include "confdefs.h"
15461 /* Override any gcc2 internal prototype to avoid an error.  */
15462 /* We use char because int might match the return type of a gcc2
15463     builtin and then its argument prototype would still apply.  */
15464 char sched_yield();
15465
15466 int main() {
15467 sched_yield()
15468 ; return 0; }
15469 EOF
15470 if { (eval echo configure:15471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15471   rm -rf conftest*
15472   eval "ac_cv_lib_$ac_lib_var=yes"
15473 else
15474   echo "configure: failed program was:" >&5
15475   cat conftest.$ac_ext >&5
15476   rm -rf conftest*
15477   eval "ac_cv_lib_$ac_lib_var=no"
15478 fi
15479 rm -f conftest*
15480 LIBS="$ac_save_LIBS"
15481
15482 fi
15483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15484   echo "$ac_t""yes" 1>&6
15485   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15486                                         cat >> confdefs.h <<\EOF
15487 #define HAVE_SCHED_YIELD 1
15488 EOF
15489
15490                                         ac_cv_func_sched_yield=yes
15491 else
15492   echo "$ac_t""no" 1>&6
15493 ac_cv_func_sched_yield=no
15494 fi
15495
15496                         fi
15497                         if test $ac_cv_func_sched_yield = no -a \
15498                                 $ac_cv_func_pthread_yield = no ; then
15499                                                                                                 for ac_func in thr_yield
15500 do
15501 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15502 echo "configure:15503: checking for $ac_func" >&5
15503 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15504   echo $ac_n "(cached) $ac_c" 1>&6
15505 else
15506   cat > conftest.$ac_ext <<EOF
15507 #line 15508 "configure"
15508 #include "confdefs.h"
15509 /* System header to define __stub macros and hopefully few prototypes,
15510     which can conflict with char $ac_func(); below.  */
15511 #include <assert.h>
15512 /* Override any gcc2 internal prototype to avoid an error.  */
15513 /* We use char because int might match the return type of a gcc2
15514     builtin and then its argument prototype would still apply.  */
15515 char $ac_func();
15516 char (*f)();
15517
15518 int main() {
15519
15520 /* The GNU C library defines this for functions which it implements
15521     to always fail with ENOSYS.  Some functions are actually named
15522     something starting with __ and the normal name is an alias.  */
15523 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15524 choke me
15525 #else
15526 f = $ac_func;
15527 #endif
15528
15529 ; return 0; }
15530 EOF
15531 if { (eval echo configure:15532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15532   rm -rf conftest*
15533   eval "ac_cv_func_$ac_func=yes"
15534 else
15535   echo "configure: failed program was:" >&5
15536   cat conftest.$ac_ext >&5
15537   rm -rf conftest*
15538   eval "ac_cv_func_$ac_func=no"
15539 fi
15540 rm -f conftest*
15541 fi
15542
15543 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15544   echo "$ac_t""yes" 1>&6
15545     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15546   cat >> confdefs.h <<EOF
15547 #define $ac_tr_func 1
15548 EOF
15549  
15550 else
15551   echo "$ac_t""no" 1>&6
15552 fi
15553 done
15554
15555                         fi
15556                         if test $ac_cv_func_sched_yield = no -a \
15557                                 $ac_cv_func_pthread_yield = no -a \
15558                                 "$ac_cv_func_thr_yield" = no ; then
15559                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15560                         fi
15561
15562                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15563 do
15564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15565 echo "configure:15566: checking for $ac_func" >&5
15566 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15567   echo $ac_n "(cached) $ac_c" 1>&6
15568 else
15569   cat > conftest.$ac_ext <<EOF
15570 #line 15571 "configure"
15571 #include "confdefs.h"
15572 /* System header to define __stub macros and hopefully few prototypes,
15573     which can conflict with char $ac_func(); below.  */
15574 #include <assert.h>
15575 /* Override any gcc2 internal prototype to avoid an error.  */
15576 /* We use char because int might match the return type of a gcc2
15577     builtin and then its argument prototype would still apply.  */
15578 char $ac_func();
15579 char (*f)();
15580
15581 int main() {
15582
15583 /* The GNU C library defines this for functions which it implements
15584     to always fail with ENOSYS.  Some functions are actually named
15585     something starting with __ and the normal name is an alias.  */
15586 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15587 choke me
15588 #else
15589 f = $ac_func;
15590 #endif
15591
15592 ; return 0; }
15593 EOF
15594 if { (eval echo configure:15595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15595   rm -rf conftest*
15596   eval "ac_cv_func_$ac_func=yes"
15597 else
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -rf conftest*
15601   eval "ac_cv_func_$ac_func=no"
15602 fi
15603 rm -f conftest*
15604 fi
15605
15606 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15607   echo "$ac_t""yes" 1>&6
15608     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15609   cat >> confdefs.h <<EOF
15610 #define $ac_tr_func 1
15611 EOF
15612  
15613 else
15614   echo "$ac_t""no" 1>&6
15615 fi
15616 done
15617
15618
15619                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15620 echo "configure:15621: checking for pthread_detach with <pthread.h>" >&5
15621 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15622   echo $ac_n "(cached) $ac_c" 1>&6
15623 else
15624   
15625                                                                 cat > conftest.$ac_ext <<EOF
15626 #line 15627 "configure"
15627 #include "confdefs.h"
15628
15629 #include <pthread.h>
15630 #ifndef NULL
15631 #define NULL (void*)0
15632 #endif
15633
15634 int main() {
15635 pthread_detach(NULL);
15636 ; return 0; }
15637 EOF
15638 if { (eval echo configure:15639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15639   rm -rf conftest*
15640   ol_cv_func_pthread_detach=yes
15641 else
15642   echo "configure: failed program was:" >&5
15643   cat conftest.$ac_ext >&5
15644   rm -rf conftest*
15645   ol_cv_func_pthread_detach=no
15646 fi
15647 rm -f conftest*
15648                         
15649 fi
15650
15651 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15652
15653                         if test $ol_cv_func_pthread_detach = no ; then
15654                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15655                         fi
15656
15657                         cat >> confdefs.h <<\EOF
15658 #define HAVE_PTHREAD_DETACH 1
15659 EOF
15660
15661
15662                                                 for ac_func in \
15663                                 pthread_setconcurrency \
15664                                 pthread_getconcurrency \
15665                                 thr_setconcurrency \
15666                                 thr_getconcurrency \
15667                         
15668 do
15669 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15670 echo "configure:15671: checking for $ac_func" >&5
15671 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15672   echo $ac_n "(cached) $ac_c" 1>&6
15673 else
15674   cat > conftest.$ac_ext <<EOF
15675 #line 15676 "configure"
15676 #include "confdefs.h"
15677 /* System header to define __stub macros and hopefully few prototypes,
15678     which can conflict with char $ac_func(); below.  */
15679 #include <assert.h>
15680 /* Override any gcc2 internal prototype to avoid an error.  */
15681 /* We use char because int might match the return type of a gcc2
15682     builtin and then its argument prototype would still apply.  */
15683 char $ac_func();
15684 char (*f)();
15685
15686 int main() {
15687
15688 /* The GNU C library defines this for functions which it implements
15689     to always fail with ENOSYS.  Some functions are actually named
15690     something starting with __ and the normal name is an alias.  */
15691 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15692 choke me
15693 #else
15694 f = $ac_func;
15695 #endif
15696
15697 ; return 0; }
15698 EOF
15699 if { (eval echo configure:15700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15700   rm -rf conftest*
15701   eval "ac_cv_func_$ac_func=yes"
15702 else
15703   echo "configure: failed program was:" >&5
15704   cat conftest.$ac_ext >&5
15705   rm -rf conftest*
15706   eval "ac_cv_func_$ac_func=no"
15707 fi
15708 rm -f conftest*
15709 fi
15710
15711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15712   echo "$ac_t""yes" 1>&6
15713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15714   cat >> confdefs.h <<EOF
15715 #define $ac_tr_func 1
15716 EOF
15717  
15718 else
15719   echo "$ac_t""no" 1>&6
15720 fi
15721 done
15722
15723
15724                         
15725         for ac_func in pthread_kill_other_threads_np
15726 do
15727 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15728 echo "configure:15729: checking for $ac_func" >&5
15729 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15730   echo $ac_n "(cached) $ac_c" 1>&6
15731 else
15732   cat > conftest.$ac_ext <<EOF
15733 #line 15734 "configure"
15734 #include "confdefs.h"
15735 /* System header to define __stub macros and hopefully few prototypes,
15736     which can conflict with char $ac_func(); below.  */
15737 #include <assert.h>
15738 /* Override any gcc2 internal prototype to avoid an error.  */
15739 /* We use char because int might match the return type of a gcc2
15740     builtin and then its argument prototype would still apply.  */
15741 char $ac_func();
15742 char (*f)();
15743
15744 int main() {
15745
15746 /* The GNU C library defines this for functions which it implements
15747     to always fail with ENOSYS.  Some functions are actually named
15748     something starting with __ and the normal name is an alias.  */
15749 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15750 choke me
15751 #else
15752 f = $ac_func;
15753 #endif
15754
15755 ; return 0; }
15756 EOF
15757 if { (eval echo configure:15758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15758   rm -rf conftest*
15759   eval "ac_cv_func_$ac_func=yes"
15760 else
15761   echo "configure: failed program was:" >&5
15762   cat conftest.$ac_ext >&5
15763   rm -rf conftest*
15764   eval "ac_cv_func_$ac_func=no"
15765 fi
15766 rm -f conftest*
15767 fi
15768
15769 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15770   echo "$ac_t""yes" 1>&6
15771     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15772   cat >> confdefs.h <<EOF
15773 #define $ac_tr_func 1
15774 EOF
15775  
15776 else
15777   echo "$ac_t""no" 1>&6
15778 fi
15779 done
15780
15781         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15782 echo "configure:15783: checking for LinuxThreads implementation" >&5
15783 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15784   echo $ac_n "(cached) $ac_c" 1>&6
15785 else
15786   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15787 fi
15788
15789 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15790
15791                         
15792         
15793         
15794         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15795 echo "configure:15796: checking for LinuxThreads consistency" >&5
15796 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15797   echo $ac_n "(cached) $ac_c" 1>&6
15798 else
15799   
15800                 if test $ol_cv_header_linux_threads = yes -a \
15801                         $ol_cv_sys_linux_threads = yes; then
15802                         ol_cv_linux_threads=yes
15803                 elif test $ol_cv_header_linux_threads = no -a \
15804                         $ol_cv_sys_linux_threads = no; then
15805                         ol_cv_linux_threads=no
15806                 else
15807                         ol_cv_linux_threads=error
15808                 fi
15809         
15810 fi
15811
15812 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15813
15814
15815                         if test $ol_cv_linux_threads = error; then
15816                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15817                         fi
15818
15819                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15820 echo "configure:15821: checking if pthread_create() works" >&5
15821 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15822   echo $ac_n "(cached) $ac_c" 1>&6
15823 else
15824   
15825                         if test "$cross_compiling" = yes; then
15826                                 ol_cv_pthread_create_works=yes
15827 else
15828   cat > conftest.$ac_ext <<EOF
15829 #line 15830 "configure"
15830 #include "confdefs.h"
15831 /* pthread test headers */
15832 #include <pthread.h>
15833 #ifndef NULL
15834 #define NULL (void*)0
15835 #endif
15836
15837 static void *task(p)
15838         void *p;
15839 {
15840         return (void *) (p == NULL);
15841 }
15842
15843
15844 int main(argc, argv)
15845         int argc;
15846         char **argv;
15847 {
15848
15849         /* pthread test function */
15850         pthread_t t;
15851         int status;
15852         int detach = 1;
15853
15854 #ifdef HAVE_PTHREADS_FINAL
15855         /* Final pthreads */
15856         pthread_attr_t attr;
15857
15858         status = pthread_attr_init(&attr);
15859         if( status ) return status;
15860
15861 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15862         if( !detach ) {
15863 #if defined( PTHREAD_CREATE_JOINABLE )
15864                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15865 #else
15866                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15867 #endif
15868
15869 #ifdef PTHREAD_CREATE_DETACHED
15870         } else {
15871                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15872 #endif
15873         }
15874         if( status ) return status;
15875 #endif
15876
15877         status = pthread_create( &t, &attr, task, NULL );
15878         if( status ) return status;
15879
15880 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15881         if( detach ) {
15882                 /* give thread a chance to complete */
15883                 /* it should remain joinable and hence detachable */
15884                 sleep( 1 );
15885
15886                 status = pthread_detach( t );
15887                 if( status ) return status;
15888         }
15889 #endif
15890
15891 #else
15892         /* Draft 4 pthreads */
15893         status = pthread_create( &t, pthread_attr_default, task, NULL );
15894         if( status ) return status;
15895
15896         if( detach ) {
15897                 /* give thread a chance to complete */
15898                 /* it should remain joinable and hence detachable */
15899                 sleep( 1 );
15900
15901                 status = pthread_detach( &t );
15902                 if( status ) return status;
15903         }
15904 #endif
15905
15906 #ifdef HAVE_LINUX_THREADS
15907         pthread_kill_other_threads_np();
15908 #endif
15909
15910         return 0;
15911
15912 }
15913
15914 EOF
15915 if { (eval echo configure:15916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15916 then
15917   ol_cv_pthread_create_works=yes
15918 else
15919   echo "configure: failed program was:" >&5
15920   cat conftest.$ac_ext >&5
15921   rm -fr conftest*
15922   ol_cv_pthread_create_works=no
15923 fi
15924 rm -fr conftest*
15925 fi
15926
15927 fi
15928
15929 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15930
15931                         if test $ol_cv_pthread_create_works = no ; then
15932                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15933                         fi
15934
15935                                                 if test $ol_with_yielding_select = auto ; then
15936                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15937 echo "configure:15938: checking if select yields when using pthreads" >&5
15938 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15939   echo $ac_n "(cached) $ac_c" 1>&6
15940 else
15941   
15942                                 if test "$cross_compiling" = yes; then
15943   ol_cv_pthread_select_yields=cross
15944 else
15945   cat > conftest.$ac_ext <<EOF
15946 #line 15947 "configure"
15947 #include "confdefs.h"
15948
15949 #include <sys/types.h>
15950 #include <sys/time.h>
15951 #include <unistd.h>
15952 #include <pthread.h>
15953 #ifndef NULL
15954 #define NULL (void*) 0
15955 #endif
15956
15957 static int fildes[2];
15958
15959 static void *task(p)
15960         void *p;
15961 {
15962         int i;
15963         struct timeval tv;
15964
15965         fd_set rfds;
15966
15967         tv.tv_sec=10;
15968         tv.tv_usec=0;
15969
15970         FD_ZERO(&rfds);
15971         FD_SET(fildes[0], &rfds);
15972
15973         /* we're not interested in any fds */
15974         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15975
15976         if(i < 0) {
15977                 perror("select");
15978                 exit(10);
15979         }
15980
15981         exit(0); /* if we exit here, the select blocked the whole process */
15982 }
15983
15984 int main(argc, argv)
15985         int argc;
15986         char **argv;
15987 {
15988         pthread_t t;
15989
15990         /* create a pipe to select */
15991         if(pipe(&fildes[0])) {
15992                 perror("select");
15993                 exit(1);
15994         }
15995
15996 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15997         (void) pthread_setconcurrency(2);
15998 #else
15999 #ifdef HAVE_THR_SETCONCURRENCY
16000         /* Set Solaris LWP concurrency to 2 */
16001         thr_setconcurrency(2);
16002 #endif
16003 #endif
16004
16005 #if HAVE_PTHREADS_D4
16006         pthread_create(&t, pthread_attr_default, task, NULL);
16007 #else
16008         pthread_create(&t, NULL, task, NULL);
16009 #endif
16010
16011 #if HAVE_SCHED_YIELD
16012         sched_yield();  /* make sure task runs first */
16013 #else
16014 #ifdef HAVE_PTHREAD_YIELD
16015         pthread_yield();        /* make sure task runs first */
16016 #endif
16017 #endif
16018
16019         exit(2);
16020 }
16021 EOF
16022 if { (eval echo configure:16023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16023 then
16024   ol_cv_pthread_select_yields=no
16025 else
16026   echo "configure: failed program was:" >&5
16027   cat conftest.$ac_ext >&5
16028   rm -fr conftest*
16029   ol_cv_pthread_select_yields=yes
16030 fi
16031 rm -fr conftest*
16032 fi
16033
16034 fi
16035
16036 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16037
16038                                 if test $ol_cv_pthread_select_yields = cross ; then
16039                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16040                                 fi
16041
16042                                 if test $ol_cv_pthread_select_yields = yes ; then
16043                                         ol_with_yielding_select=yes
16044                                 fi
16045                         fi
16046
16047                                                 CPPFLAGS="$save_CPPFLAGS"
16048                         LIBS="$save_LIBS"
16049                 else
16050                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16051                 fi
16052         fi
16053
16054         if test $ol_with_threads = posix ; then
16055                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16056         fi
16057 fi
16058
16059 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16060         -o $ol_with_threads = mach ; then
16061
16062                 for ac_hdr in mach/cthreads.h cthreads.h
16063 do
16064 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16065 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16066 echo "configure:16067: checking for $ac_hdr" >&5
16067 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16068   echo $ac_n "(cached) $ac_c" 1>&6
16069 else
16070   cat > conftest.$ac_ext <<EOF
16071 #line 16072 "configure"
16072 #include "confdefs.h"
16073 #include <$ac_hdr>
16074 EOF
16075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16076 { (eval echo configure:16077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16078 if test -z "$ac_err"; then
16079   rm -rf conftest*
16080   eval "ac_cv_header_$ac_safe=yes"
16081 else
16082   echo "$ac_err" >&5
16083   echo "configure: failed program was:" >&5
16084   cat conftest.$ac_ext >&5
16085   rm -rf conftest*
16086   eval "ac_cv_header_$ac_safe=no"
16087 fi
16088 rm -f conftest*
16089 fi
16090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16091   echo "$ac_t""yes" 1>&6
16092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16093   cat >> confdefs.h <<EOF
16094 #define $ac_tr_hdr 1
16095 EOF
16096  
16097 else
16098   echo "$ac_t""no" 1>&6
16099 fi
16100 done
16101
16102         if test $ac_cv_header_mach_cthreads_h = yes ; then
16103                 ol_with_threads=found
16104
16105                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16106 echo "configure:16107: checking for cthread_fork" >&5
16107 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16108   echo $ac_n "(cached) $ac_c" 1>&6
16109 else
16110   cat > conftest.$ac_ext <<EOF
16111 #line 16112 "configure"
16112 #include "confdefs.h"
16113 /* System header to define __stub macros and hopefully few prototypes,
16114     which can conflict with char cthread_fork(); below.  */
16115 #include <assert.h>
16116 /* Override any gcc2 internal prototype to avoid an error.  */
16117 /* We use char because int might match the return type of a gcc2
16118     builtin and then its argument prototype would still apply.  */
16119 char cthread_fork();
16120 char (*f)();
16121
16122 int main() {
16123
16124 /* The GNU C library defines this for functions which it implements
16125     to always fail with ENOSYS.  Some functions are actually named
16126     something starting with __ and the normal name is an alias.  */
16127 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16128 choke me
16129 #else
16130 f = cthread_fork;
16131 #endif
16132
16133 ; return 0; }
16134 EOF
16135 if { (eval echo configure:16136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16136   rm -rf conftest*
16137   eval "ac_cv_func_cthread_fork=yes"
16138 else
16139   echo "configure: failed program was:" >&5
16140   cat conftest.$ac_ext >&5
16141   rm -rf conftest*
16142   eval "ac_cv_func_cthread_fork=no"
16143 fi
16144 rm -f conftest*
16145 fi
16146
16147 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16148   echo "$ac_t""yes" 1>&6
16149   ol_link_threads=yes
16150 else
16151   echo "$ac_t""no" 1>&6
16152 fi
16153
16154
16155                 if test $ol_link_threads = no ; then
16156                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16157 echo "configure:16158: checking for cthread_fork with -all_load" >&5
16158 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16159   echo $ac_n "(cached) $ac_c" 1>&6
16160 else
16161   
16162                                                                 save_LIBS="$LIBS"
16163                                 LIBS="-all_load $LIBS"
16164                                 cat > conftest.$ac_ext <<EOF
16165 #line 16166 "configure"
16166 #include "confdefs.h"
16167 #include <mach/cthreads.h>
16168 int main() {
16169
16170                                         cthread_fork((void *)0, (void *)0);
16171                                         
16172 ; return 0; }
16173 EOF
16174 if { (eval echo configure:16175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16175   rm -rf conftest*
16176   ol_cv_cthread_all_load=yes
16177 else
16178   echo "configure: failed program was:" >&5
16179   cat conftest.$ac_ext >&5
16180   rm -rf conftest*
16181   ol_cv_cthread_all_load=no
16182 fi
16183 rm -f conftest*
16184                                                                 LIBS="$save_LIBS"
16185                         
16186 fi
16187
16188 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16189
16190                         if test $ol_cv_cthread_all_load = yes ; then
16191                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16192                                 ol_link_threads=mach
16193                                 ol_with_threads=found
16194                         fi
16195                 fi
16196
16197         elif test $ac_cv_header_cthreads_h = yes ; then
16198                                 
16199                 ol_with_threads=found
16200  
16201                                 save_LIBS="$LIBS"
16202                 LIBS="$LIBS -lthreads"
16203                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16204 echo "configure:16205: checking for cthread_fork" >&5
16205 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16206   echo $ac_n "(cached) $ac_c" 1>&6
16207 else
16208   cat > conftest.$ac_ext <<EOF
16209 #line 16210 "configure"
16210 #include "confdefs.h"
16211 /* System header to define __stub macros and hopefully few prototypes,
16212     which can conflict with char cthread_fork(); below.  */
16213 #include <assert.h>
16214 /* Override any gcc2 internal prototype to avoid an error.  */
16215 /* We use char because int might match the return type of a gcc2
16216     builtin and then its argument prototype would still apply.  */
16217 char cthread_fork();
16218 char (*f)();
16219
16220 int main() {
16221
16222 /* The GNU C library defines this for functions which it implements
16223     to always fail with ENOSYS.  Some functions are actually named
16224     something starting with __ and the normal name is an alias.  */
16225 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16226 choke me
16227 #else
16228 f = cthread_fork;
16229 #endif
16230
16231 ; return 0; }
16232 EOF
16233 if { (eval echo configure:16234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16234   rm -rf conftest*
16235   eval "ac_cv_func_cthread_fork=yes"
16236 else
16237   echo "configure: failed program was:" >&5
16238   cat conftest.$ac_ext >&5
16239   rm -rf conftest*
16240   eval "ac_cv_func_cthread_fork=no"
16241 fi
16242 rm -f conftest*
16243 fi
16244
16245 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16246   echo "$ac_t""yes" 1>&6
16247   ol_link_threads=yes
16248 else
16249   echo "$ac_t""no" 1>&6
16250 fi
16251
16252                 LIBS="$save_LIBS"
16253
16254                 if test $ol_link_threads = yes ; then
16255                         LTHREAD_LIBS="-lthreads"
16256                         ol_link_threads=mach
16257                         ol_with_threads=found
16258                 else
16259                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16260                 fi
16261
16262         elif test $ol_with_threads = mach ; then
16263                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16264         fi
16265
16266         if test $ol_link_threads = mach ; then
16267                 cat >> confdefs.h <<\EOF
16268 #define HAVE_MACH_CTHREADS 1
16269 EOF
16270
16271         elif test $ol_with_threads = found ; then
16272                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16273         fi
16274 fi
16275
16276 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16277         -o $ol_with_threads = pth ; then
16278
16279         for ac_hdr in pth.h
16280 do
16281 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16282 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16283 echo "configure:16284: checking for $ac_hdr" >&5
16284 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16285   echo $ac_n "(cached) $ac_c" 1>&6
16286 else
16287   cat > conftest.$ac_ext <<EOF
16288 #line 16289 "configure"
16289 #include "confdefs.h"
16290 #include <$ac_hdr>
16291 EOF
16292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16293 { (eval echo configure:16294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16295 if test -z "$ac_err"; then
16296   rm -rf conftest*
16297   eval "ac_cv_header_$ac_safe=yes"
16298 else
16299   echo "$ac_err" >&5
16300   echo "configure: failed program was:" >&5
16301   cat conftest.$ac_ext >&5
16302   rm -rf conftest*
16303   eval "ac_cv_header_$ac_safe=no"
16304 fi
16305 rm -f conftest*
16306 fi
16307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16308   echo "$ac_t""yes" 1>&6
16309     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16310   cat >> confdefs.h <<EOF
16311 #define $ac_tr_hdr 1
16312 EOF
16313  
16314 else
16315   echo "$ac_t""no" 1>&6
16316 fi
16317 done
16318
16319
16320         if test $ac_cv_header_pth_h = yes ; then
16321                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16322 echo "configure:16323: checking for pth_version in -lpth" >&5
16323 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16325   echo $ac_n "(cached) $ac_c" 1>&6
16326 else
16327   ac_save_LIBS="$LIBS"
16328 LIBS="-lpth  $LIBS"
16329 cat > conftest.$ac_ext <<EOF
16330 #line 16331 "configure"
16331 #include "confdefs.h"
16332 /* Override any gcc2 internal prototype to avoid an error.  */
16333 /* We use char because int might match the return type of a gcc2
16334     builtin and then its argument prototype would still apply.  */
16335 char pth_version();
16336
16337 int main() {
16338 pth_version()
16339 ; return 0; }
16340 EOF
16341 if { (eval echo configure:16342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16342   rm -rf conftest*
16343   eval "ac_cv_lib_$ac_lib_var=yes"
16344 else
16345   echo "configure: failed program was:" >&5
16346   cat conftest.$ac_ext >&5
16347   rm -rf conftest*
16348   eval "ac_cv_lib_$ac_lib_var=no"
16349 fi
16350 rm -f conftest*
16351 LIBS="$ac_save_LIBS"
16352
16353 fi
16354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16355   echo "$ac_t""yes" 1>&6
16356   have_pth=yes
16357 else
16358   echo "$ac_t""no" 1>&6
16359 have_pth=no
16360 fi
16361
16362
16363                 if test $have_pth = yes ; then
16364                         cat >> confdefs.h <<\EOF
16365 #define HAVE_GNU_PTH 1
16366 EOF
16367
16368                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16369                         ol_link_threads=pth
16370                         ol_with_threads=found
16371
16372                         if test $ol_with_yielding_select = auto ; then
16373                                 ol_with_yielding_select=yes
16374                         fi
16375                 fi
16376         fi
16377 fi
16378
16379 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16380         -o $ol_with_threads = lwp ; then
16381
16382                 for ac_hdr in thread.h synch.h
16383 do
16384 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16385 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16386 echo "configure:16387: checking for $ac_hdr" >&5
16387 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16388   echo $ac_n "(cached) $ac_c" 1>&6
16389 else
16390   cat > conftest.$ac_ext <<EOF
16391 #line 16392 "configure"
16392 #include "confdefs.h"
16393 #include <$ac_hdr>
16394 EOF
16395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16396 { (eval echo configure:16397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16398 if test -z "$ac_err"; then
16399   rm -rf conftest*
16400   eval "ac_cv_header_$ac_safe=yes"
16401 else
16402   echo "$ac_err" >&5
16403   echo "configure: failed program was:" >&5
16404   cat conftest.$ac_ext >&5
16405   rm -rf conftest*
16406   eval "ac_cv_header_$ac_safe=no"
16407 fi
16408 rm -f conftest*
16409 fi
16410 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16411   echo "$ac_t""yes" 1>&6
16412     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16413   cat >> confdefs.h <<EOF
16414 #define $ac_tr_hdr 1
16415 EOF
16416  
16417 else
16418   echo "$ac_t""no" 1>&6
16419 fi
16420 done
16421
16422         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16423                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16424 echo "configure:16425: checking for thr_create in -lthread" >&5
16425 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16426 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16427   echo $ac_n "(cached) $ac_c" 1>&6
16428 else
16429   ac_save_LIBS="$LIBS"
16430 LIBS="-lthread  $LIBS"
16431 cat > conftest.$ac_ext <<EOF
16432 #line 16433 "configure"
16433 #include "confdefs.h"
16434 /* Override any gcc2 internal prototype to avoid an error.  */
16435 /* We use char because int might match the return type of a gcc2
16436     builtin and then its argument prototype would still apply.  */
16437 char thr_create();
16438
16439 int main() {
16440 thr_create()
16441 ; return 0; }
16442 EOF
16443 if { (eval echo configure:16444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16444   rm -rf conftest*
16445   eval "ac_cv_lib_$ac_lib_var=yes"
16446 else
16447   echo "configure: failed program was:" >&5
16448   cat conftest.$ac_ext >&5
16449   rm -rf conftest*
16450   eval "ac_cv_lib_$ac_lib_var=no"
16451 fi
16452 rm -f conftest*
16453 LIBS="$ac_save_LIBS"
16454
16455 fi
16456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16457   echo "$ac_t""yes" 1>&6
16458   have_thr=yes
16459 else
16460   echo "$ac_t""no" 1>&6
16461 have_thr=no
16462 fi
16463
16464
16465                 if test $have_thr = yes ; then
16466                         cat >> confdefs.h <<\EOF
16467 #define HAVE_THR 1
16468 EOF
16469
16470                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16471                         ol_link_threads=thr
16472
16473                         if test $ol_with_yielding_select = auto ; then
16474                                 ol_with_yielding_select=yes
16475                         fi
16476
16477                                                 for ac_func in \
16478                                 thr_setconcurrency \
16479                                 thr_getconcurrency \
16480                         
16481 do
16482 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16483 echo "configure:16484: checking for $ac_func" >&5
16484 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16485   echo $ac_n "(cached) $ac_c" 1>&6
16486 else
16487   cat > conftest.$ac_ext <<EOF
16488 #line 16489 "configure"
16489 #include "confdefs.h"
16490 /* System header to define __stub macros and hopefully few prototypes,
16491     which can conflict with char $ac_func(); below.  */
16492 #include <assert.h>
16493 /* Override any gcc2 internal prototype to avoid an error.  */
16494 /* We use char because int might match the return type of a gcc2
16495     builtin and then its argument prototype would still apply.  */
16496 char $ac_func();
16497 char (*f)();
16498
16499 int main() {
16500
16501 /* The GNU C library defines this for functions which it implements
16502     to always fail with ENOSYS.  Some functions are actually named
16503     something starting with __ and the normal name is an alias.  */
16504 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16505 choke me
16506 #else
16507 f = $ac_func;
16508 #endif
16509
16510 ; return 0; }
16511 EOF
16512 if { (eval echo configure:16513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16513   rm -rf conftest*
16514   eval "ac_cv_func_$ac_func=yes"
16515 else
16516   echo "configure: failed program was:" >&5
16517   cat conftest.$ac_ext >&5
16518   rm -rf conftest*
16519   eval "ac_cv_func_$ac_func=no"
16520 fi
16521 rm -f conftest*
16522 fi
16523
16524 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16525   echo "$ac_t""yes" 1>&6
16526     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16527   cat >> confdefs.h <<EOF
16528 #define $ac_tr_func 1
16529 EOF
16530  
16531 else
16532   echo "$ac_t""no" 1>&6
16533 fi
16534 done
16535
16536                 fi
16537         fi
16538
16539                 for ac_hdr in lwp/lwp.h
16540 do
16541 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16542 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16543 echo "configure:16544: checking for $ac_hdr" >&5
16544 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16545   echo $ac_n "(cached) $ac_c" 1>&6
16546 else
16547   cat > conftest.$ac_ext <<EOF
16548 #line 16549 "configure"
16549 #include "confdefs.h"
16550 #include <$ac_hdr>
16551 EOF
16552 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16553 { (eval echo configure:16554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16554 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16555 if test -z "$ac_err"; then
16556   rm -rf conftest*
16557   eval "ac_cv_header_$ac_safe=yes"
16558 else
16559   echo "$ac_err" >&5
16560   echo "configure: failed program was:" >&5
16561   cat conftest.$ac_ext >&5
16562   rm -rf conftest*
16563   eval "ac_cv_header_$ac_safe=no"
16564 fi
16565 rm -f conftest*
16566 fi
16567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16568   echo "$ac_t""yes" 1>&6
16569     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16570   cat >> confdefs.h <<EOF
16571 #define $ac_tr_hdr 1
16572 EOF
16573  
16574 else
16575   echo "$ac_t""no" 1>&6
16576 fi
16577 done
16578
16579         if test $ac_cv_header_lwp_lwp_h = yes ; then
16580                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16581 echo "configure:16582: checking for lwp_create in -llwp" >&5
16582 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16584   echo $ac_n "(cached) $ac_c" 1>&6
16585 else
16586   ac_save_LIBS="$LIBS"
16587 LIBS="-llwp  $LIBS"
16588 cat > conftest.$ac_ext <<EOF
16589 #line 16590 "configure"
16590 #include "confdefs.h"
16591 /* Override any gcc2 internal prototype to avoid an error.  */
16592 /* We use char because int might match the return type of a gcc2
16593     builtin and then its argument prototype would still apply.  */
16594 char lwp_create();
16595
16596 int main() {
16597 lwp_create()
16598 ; return 0; }
16599 EOF
16600 if { (eval echo configure:16601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16601   rm -rf conftest*
16602   eval "ac_cv_lib_$ac_lib_var=yes"
16603 else
16604   echo "configure: failed program was:" >&5
16605   cat conftest.$ac_ext >&5
16606   rm -rf conftest*
16607   eval "ac_cv_lib_$ac_lib_var=no"
16608 fi
16609 rm -f conftest*
16610 LIBS="$ac_save_LIBS"
16611
16612 fi
16613 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16614   echo "$ac_t""yes" 1>&6
16615   have_lwp=yes
16616 else
16617   echo "$ac_t""no" 1>&6
16618 have_lwp=no
16619 fi
16620
16621
16622                 if test $have_lwp = yes ; then
16623                         cat >> confdefs.h <<\EOF
16624 #define HAVE_LWP 1
16625 EOF
16626
16627                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16628                         ol_link_threads=lwp
16629
16630                         if test $ol_with_yielding_select = auto ; then
16631                                 ol_with_yielding_select=no
16632                         fi
16633                 fi
16634         fi
16635 fi
16636
16637 if test $ol_with_yielding_select = yes ; then
16638         cat >> confdefs.h <<\EOF
16639 #define HAVE_YIELDING_SELECT 1
16640 EOF
16641
16642 fi
16643
16644 if test $ol_with_threads = manual ; then
16645                 ol_link_threads=yes
16646
16647         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16648
16649         for ac_hdr in pthread.h sched.h
16650 do
16651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16653 echo "configure:16654: checking for $ac_hdr" >&5
16654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16655   echo $ac_n "(cached) $ac_c" 1>&6
16656 else
16657   cat > conftest.$ac_ext <<EOF
16658 #line 16659 "configure"
16659 #include "confdefs.h"
16660 #include <$ac_hdr>
16661 EOF
16662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16663 { (eval echo configure:16664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16665 if test -z "$ac_err"; then
16666   rm -rf conftest*
16667   eval "ac_cv_header_$ac_safe=yes"
16668 else
16669   echo "$ac_err" >&5
16670   echo "configure: failed program was:" >&5
16671   cat conftest.$ac_ext >&5
16672   rm -rf conftest*
16673   eval "ac_cv_header_$ac_safe=no"
16674 fi
16675 rm -f conftest*
16676 fi
16677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16678   echo "$ac_t""yes" 1>&6
16679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16680   cat >> confdefs.h <<EOF
16681 #define $ac_tr_hdr 1
16682 EOF
16683  
16684 else
16685   echo "$ac_t""no" 1>&6
16686 fi
16687 done
16688
16689         for ac_func in sched_yield pthread_yield
16690 do
16691 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16692 echo "configure:16693: checking for $ac_func" >&5
16693 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16694   echo $ac_n "(cached) $ac_c" 1>&6
16695 else
16696   cat > conftest.$ac_ext <<EOF
16697 #line 16698 "configure"
16698 #include "confdefs.h"
16699 /* System header to define __stub macros and hopefully few prototypes,
16700     which can conflict with char $ac_func(); below.  */
16701 #include <assert.h>
16702 /* Override any gcc2 internal prototype to avoid an error.  */
16703 /* We use char because int might match the return type of a gcc2
16704     builtin and then its argument prototype would still apply.  */
16705 char $ac_func();
16706 char (*f)();
16707
16708 int main() {
16709
16710 /* The GNU C library defines this for functions which it implements
16711     to always fail with ENOSYS.  Some functions are actually named
16712     something starting with __ and the normal name is an alias.  */
16713 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16714 choke me
16715 #else
16716 f = $ac_func;
16717 #endif
16718
16719 ; return 0; }
16720 EOF
16721 if { (eval echo configure:16722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16722   rm -rf conftest*
16723   eval "ac_cv_func_$ac_func=yes"
16724 else
16725   echo "configure: failed program was:" >&5
16726   cat conftest.$ac_ext >&5
16727   rm -rf conftest*
16728   eval "ac_cv_func_$ac_func=no"
16729 fi
16730 rm -f conftest*
16731 fi
16732
16733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16734   echo "$ac_t""yes" 1>&6
16735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16736   cat >> confdefs.h <<EOF
16737 #define $ac_tr_func 1
16738 EOF
16739  
16740 else
16741   echo "$ac_t""no" 1>&6
16742 fi
16743 done
16744
16745         
16746         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16747 echo "configure:16748: checking for LinuxThreads pthread.h" >&5
16748 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16749   echo $ac_n "(cached) $ac_c" 1>&6
16750 else
16751   cat > conftest.$ac_ext <<EOF
16752 #line 16753 "configure"
16753 #include "confdefs.h"
16754 #include <pthread.h>
16755 EOF
16756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16757   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16758   rm -rf conftest*
16759   ol_cv_header_linux_threads=yes
16760 else
16761   rm -rf conftest*
16762   ol_cv_header_linux_threads=no
16763 fi
16764 rm -f conftest*
16765
16766                 
16767 fi
16768
16769 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16770         if test $ol_cv_header_linux_threads = yes; then
16771                 cat >> confdefs.h <<\EOF
16772 #define HAVE_LINUX_THREADS 1
16773 EOF
16774
16775         fi
16776
16777
16778         for ac_hdr in mach/cthreads.h
16779 do
16780 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16781 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16782 echo "configure:16783: checking for $ac_hdr" >&5
16783 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16784   echo $ac_n "(cached) $ac_c" 1>&6
16785 else
16786   cat > conftest.$ac_ext <<EOF
16787 #line 16788 "configure"
16788 #include "confdefs.h"
16789 #include <$ac_hdr>
16790 EOF
16791 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16792 { (eval echo configure:16793: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16793 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16794 if test -z "$ac_err"; then
16795   rm -rf conftest*
16796   eval "ac_cv_header_$ac_safe=yes"
16797 else
16798   echo "$ac_err" >&5
16799   echo "configure: failed program was:" >&5
16800   cat conftest.$ac_ext >&5
16801   rm -rf conftest*
16802   eval "ac_cv_header_$ac_safe=no"
16803 fi
16804 rm -f conftest*
16805 fi
16806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16807   echo "$ac_t""yes" 1>&6
16808     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16809   cat >> confdefs.h <<EOF
16810 #define $ac_tr_hdr 1
16811 EOF
16812  
16813 else
16814   echo "$ac_t""no" 1>&6
16815 fi
16816 done
16817
16818         for ac_hdr in lwp/lwp.h
16819 do
16820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16822 echo "configure:16823: checking for $ac_hdr" >&5
16823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16824   echo $ac_n "(cached) $ac_c" 1>&6
16825 else
16826   cat > conftest.$ac_ext <<EOF
16827 #line 16828 "configure"
16828 #include "confdefs.h"
16829 #include <$ac_hdr>
16830 EOF
16831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16832 { (eval echo configure:16833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16834 if test -z "$ac_err"; then
16835   rm -rf conftest*
16836   eval "ac_cv_header_$ac_safe=yes"
16837 else
16838   echo "$ac_err" >&5
16839   echo "configure: failed program was:" >&5
16840   cat conftest.$ac_ext >&5
16841   rm -rf conftest*
16842   eval "ac_cv_header_$ac_safe=no"
16843 fi
16844 rm -f conftest*
16845 fi
16846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16847   echo "$ac_t""yes" 1>&6
16848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16849   cat >> confdefs.h <<EOF
16850 #define $ac_tr_hdr 1
16851 EOF
16852  
16853 else
16854   echo "$ac_t""no" 1>&6
16855 fi
16856 done
16857
16858         for ac_hdr in thread.h synch.h
16859 do
16860 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16861 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16862 echo "configure:16863: checking for $ac_hdr" >&5
16863 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16864   echo $ac_n "(cached) $ac_c" 1>&6
16865 else
16866   cat > conftest.$ac_ext <<EOF
16867 #line 16868 "configure"
16868 #include "confdefs.h"
16869 #include <$ac_hdr>
16870 EOF
16871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16872 { (eval echo configure:16873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16874 if test -z "$ac_err"; then
16875   rm -rf conftest*
16876   eval "ac_cv_header_$ac_safe=yes"
16877 else
16878   echo "$ac_err" >&5
16879   echo "configure: failed program was:" >&5
16880   cat conftest.$ac_ext >&5
16881   rm -rf conftest*
16882   eval "ac_cv_header_$ac_safe=no"
16883 fi
16884 rm -f conftest*
16885 fi
16886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16887   echo "$ac_t""yes" 1>&6
16888     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16889   cat >> confdefs.h <<EOF
16890 #define $ac_tr_hdr 1
16891 EOF
16892  
16893 else
16894   echo "$ac_t""no" 1>&6
16895 fi
16896 done
16897
16898 fi
16899
16900 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16901                         cat >> confdefs.h <<\EOF
16902 #define REENTRANT 1
16903 EOF
16904
16905         cat >> confdefs.h <<\EOF
16906 #define _REENTRANT 1
16907 EOF
16908
16909         cat >> confdefs.h <<\EOF
16910 #define THREAD_SAFE 1
16911 EOF
16912
16913         cat >> confdefs.h <<\EOF
16914 #define _THREAD_SAFE 1
16915 EOF
16916
16917         cat >> confdefs.h <<\EOF
16918 #define THREADSAFE 1
16919 EOF
16920
16921         cat >> confdefs.h <<\EOF
16922 #define _THREADSAFE 1
16923 EOF
16924
16925         cat >> confdefs.h <<\EOF
16926 #define _SGI_MP_SOURCE 1
16927 EOF
16928
16929
16930                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16931 echo "configure:16932: checking for thread specific errno" >&5
16932 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16933   echo $ac_n "(cached) $ac_c" 1>&6
16934 else
16935   
16936                 cat > conftest.$ac_ext <<EOF
16937 #line 16938 "configure"
16938 #include "confdefs.h"
16939 #include <errno.h>
16940 int main() {
16941 errno = 0;
16942 ; return 0; }
16943 EOF
16944 if { (eval echo configure:16945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16945   rm -rf conftest*
16946   ol_cv_errno_thread_specific=yes
16947 else
16948   echo "configure: failed program was:" >&5
16949   cat conftest.$ac_ext >&5
16950   rm -rf conftest*
16951   ol_cv_errno_thread_specific=no
16952 fi
16953 rm -f conftest*
16954         
16955 fi
16956
16957 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16958
16959                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16960 echo "configure:16961: checking for thread specific h_errno" >&5
16961 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16962   echo $ac_n "(cached) $ac_c" 1>&6
16963 else
16964   
16965                 cat > conftest.$ac_ext <<EOF
16966 #line 16967 "configure"
16967 #include "confdefs.h"
16968 #include <netdb.h>
16969 int main() {
16970 h_errno = 0;
16971 ; return 0; }
16972 EOF
16973 if { (eval echo configure:16974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16974   rm -rf conftest*
16975   ol_cv_h_errno_thread_specific=yes
16976 else
16977   echo "configure: failed program was:" >&5
16978   cat conftest.$ac_ext >&5
16979   rm -rf conftest*
16980   ol_cv_h_errno_thread_specific=no
16981 fi
16982 rm -f conftest*
16983         
16984 fi
16985
16986 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16987
16988         if test $ol_cv_errno_thread_specific != yes \
16989                 -o $ol_cv_h_errno_thread_specific != yes ; then
16990                 LIBS="$LTHREAD_LIBS $LIBS"
16991                 LTHREAD_LIBS=""
16992         fi
16993
16994 fi  
16995
16996 if test $ol_link_threads = no ; then
16997         if test $ol_with_threads = yes ; then
16998                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16999         fi
17000
17001         if test $ol_with_threads = auto ; then
17002                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
17003                 ol_with_threads=no
17004         fi
17005
17006         cat >> confdefs.h <<\EOF
17007 #define NO_THREADS 1
17008 EOF
17009
17010         LTHREAD_LIBS=""
17011 fi
17012
17013 if test $ol_link_threads != no ; then
17014         cat >> confdefs.h <<\EOF
17015 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17016 EOF
17017
17018 fi
17019
17020 ol_link_ldbm=no 
17021
17022 if test $ol_with_ldbm_api = auto \
17023         -o $ol_with_ldbm_api = berkeley \
17024         -o $ol_with_ldbm_api = bcompat ; then
17025
17026         if test $ol_with_ldbm_api = bcompat; then \
17027                 for ac_hdr in db_185.h db.h
17028 do
17029 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17030 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17031 echo "configure:17032: checking for $ac_hdr" >&5
17032 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17033   echo $ac_n "(cached) $ac_c" 1>&6
17034 else
17035   cat > conftest.$ac_ext <<EOF
17036 #line 17037 "configure"
17037 #include "confdefs.h"
17038 #include <$ac_hdr>
17039 EOF
17040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17041 { (eval echo configure:17042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17043 if test -z "$ac_err"; then
17044   rm -rf conftest*
17045   eval "ac_cv_header_$ac_safe=yes"
17046 else
17047   echo "$ac_err" >&5
17048   echo "configure: failed program was:" >&5
17049   cat conftest.$ac_ext >&5
17050   rm -rf conftest*
17051   eval "ac_cv_header_$ac_safe=no"
17052 fi
17053 rm -f conftest*
17054 fi
17055 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17056   echo "$ac_t""yes" 1>&6
17057     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17058   cat >> confdefs.h <<EOF
17059 #define $ac_tr_hdr 1
17060 EOF
17061  
17062 else
17063   echo "$ac_t""no" 1>&6
17064 fi
17065 done
17066
17067 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17068         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17069 echo "configure:17070: checking if Berkeley DB header compatibility" >&5
17070 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17071   echo $ac_n "(cached) $ac_c" 1>&6
17072 else
17073   
17074                 cat > conftest.$ac_ext <<EOF
17075 #line 17076 "configure"
17076 #include "confdefs.h"
17077
17078 #if HAVE_DB_185_H
17079 #       include <db_185.h>
17080 #else
17081 #       include <db.h>
17082 #endif
17083
17084  /* this check could be improved */
17085 #ifndef DB_VERSION_MAJOR
17086 #       define DB_VERSION_MAJOR 1
17087 #endif
17088
17089 #if DB_VERSION_MAJOR == 1 
17090         __db_version_1
17091 #endif
17092
17093 EOF
17094 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17095   egrep "__db_version_1" >/dev/null 2>&1; then
17096   rm -rf conftest*
17097   ol_cv_header_db1=yes
17098 else
17099   rm -rf conftest*
17100   ol_cv_header_db1=no
17101 fi
17102 rm -f conftest*
17103
17104 fi
17105
17106 echo "$ac_t""$ol_cv_header_db1" 1>&6
17107
17108         if test $ol_cv_header_db1 = yes ; then
17109                 ol_cv_lib_db=no
17110 if test $ol_cv_lib_db = no ; then
17111         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17112 echo "configure:17113: checking for Berkeley DB link (default)" >&5
17113 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17114   echo $ac_n "(cached) $ac_c" 1>&6
17115 else
17116   
17117         ol_DB_LIB=
17118         ol_LIBS=$LIBS
17119         LIBS="$ol_DB_LIB $LIBS"
17120
17121         cat > conftest.$ac_ext <<EOF
17122 #line 17123 "configure"
17123 #include "confdefs.h"
17124
17125 #ifdef HAVE_DB_185_H
17126 # include <db_185.h>
17127 #else
17128 # include <db.h>
17129 #endif
17130
17131 #ifndef DB_VERSION_MAJOR
17132 # define DB_VERSION_MAJOR 1
17133 #endif
17134
17135 #ifndef NULL
17136 #define NULL ((void*)0)
17137 #endif
17138
17139 int main() {
17140
17141 #if DB_VERSION_MAJOR > 1
17142         {
17143                 char *version;
17144                 int major, minor, patch;
17145
17146                 version = db_version( &major, &minor, &patch );
17147
17148                 if( major != DB_VERSION_MAJOR ||
17149                         minor < DB_VERSION_MINOR )
17150                 {
17151                         printf("Berkeley DB version mismatch\n"
17152                                 "\texpected: %s\n\tgot: %s\n",
17153                                 DB_VERSION_STRING, version);
17154                         return 1;
17155                 }
17156         }
17157 #endif
17158
17159 #if DB_VERSION_MAJOR > 2
17160         db_env_create( NULL, 0 );
17161 #elif DB_VERSION_MAJOR > 1
17162         db_appexit( NULL );
17163 #else
17164         (void) dbopen( NULL, 0, 0, 0, NULL);
17165 #endif
17166
17167 ; return 0; }
17168 EOF
17169 if { (eval echo configure:17170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17170   rm -rf conftest*
17171   ol_cv_db_none=yes
17172 else
17173   echo "configure: failed program was:" >&5
17174   cat conftest.$ac_ext >&5
17175   rm -rf conftest*
17176   ol_cv_db_none=no
17177 fi
17178 rm -f conftest*
17179
17180         LIBS="$ol_LIBS"
17181
17182 fi
17183
17184 echo "$ac_t""$ol_cv_db_none" 1>&6
17185
17186         if test $ol_cv_db_none = yes ; then
17187                 ol_cv_lib_db=yes
17188         fi
17189 fi
17190
17191 if test $ol_cv_lib_db = no ; then
17192         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17193 echo "configure:17194: checking for Berkeley DB link (-ldb4)" >&5
17194 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17195   echo $ac_n "(cached) $ac_c" 1>&6
17196 else
17197   
17198         ol_DB_LIB=-ldb4
17199         ol_LIBS=$LIBS
17200         LIBS="$ol_DB_LIB $LIBS"
17201
17202         cat > conftest.$ac_ext <<EOF
17203 #line 17204 "configure"
17204 #include "confdefs.h"
17205
17206 #ifdef HAVE_DB_185_H
17207 # include <db_185.h>
17208 #else
17209 # include <db.h>
17210 #endif
17211
17212 #ifndef DB_VERSION_MAJOR
17213 # define DB_VERSION_MAJOR 1
17214 #endif
17215
17216 #ifndef NULL
17217 #define NULL ((void*)0)
17218 #endif
17219
17220 int main() {
17221
17222 #if DB_VERSION_MAJOR > 1
17223         {
17224                 char *version;
17225                 int major, minor, patch;
17226
17227                 version = db_version( &major, &minor, &patch );
17228
17229                 if( major != DB_VERSION_MAJOR ||
17230                         minor < DB_VERSION_MINOR )
17231                 {
17232                         printf("Berkeley DB version mismatch\n"
17233                                 "\texpected: %s\n\tgot: %s\n",
17234                                 DB_VERSION_STRING, version);
17235                         return 1;
17236                 }
17237         }
17238 #endif
17239
17240 #if DB_VERSION_MAJOR > 2
17241         db_env_create( NULL, 0 );
17242 #elif DB_VERSION_MAJOR > 1
17243         db_appexit( NULL );
17244 #else
17245         (void) dbopen( NULL, 0, 0, 0, NULL);
17246 #endif
17247
17248 ; return 0; }
17249 EOF
17250 if { (eval echo configure:17251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17251   rm -rf conftest*
17252   ol_cv_db_db4=yes
17253 else
17254   echo "configure: failed program was:" >&5
17255   cat conftest.$ac_ext >&5
17256   rm -rf conftest*
17257   ol_cv_db_db4=no
17258 fi
17259 rm -f conftest*
17260
17261         LIBS="$ol_LIBS"
17262
17263 fi
17264
17265 echo "$ac_t""$ol_cv_db_db4" 1>&6
17266
17267         if test $ol_cv_db_db4 = yes ; then
17268                 ol_cv_lib_db=-ldb4
17269         fi
17270 fi
17271
17272 if test $ol_cv_lib_db = no ; then
17273         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17274 echo "configure:17275: checking for Berkeley DB link (-ldb-4)" >&5
17275 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17276   echo $ac_n "(cached) $ac_c" 1>&6
17277 else
17278   
17279         ol_DB_LIB=-ldb-4
17280         ol_LIBS=$LIBS
17281         LIBS="$ol_DB_LIB $LIBS"
17282
17283         cat > conftest.$ac_ext <<EOF
17284 #line 17285 "configure"
17285 #include "confdefs.h"
17286
17287 #ifdef HAVE_DB_185_H
17288 # include <db_185.h>
17289 #else
17290 # include <db.h>
17291 #endif
17292
17293 #ifndef DB_VERSION_MAJOR
17294 # define DB_VERSION_MAJOR 1
17295 #endif
17296
17297 #ifndef NULL
17298 #define NULL ((void*)0)
17299 #endif
17300
17301 int main() {
17302
17303 #if DB_VERSION_MAJOR > 1
17304         {
17305                 char *version;
17306                 int major, minor, patch;
17307
17308                 version = db_version( &major, &minor, &patch );
17309
17310                 if( major != DB_VERSION_MAJOR ||
17311                         minor < DB_VERSION_MINOR )
17312                 {
17313                         printf("Berkeley DB version mismatch\n"
17314                                 "\texpected: %s\n\tgot: %s\n",
17315                                 DB_VERSION_STRING, version);
17316                         return 1;
17317                 }
17318         }
17319 #endif
17320
17321 #if DB_VERSION_MAJOR > 2
17322         db_env_create( NULL, 0 );
17323 #elif DB_VERSION_MAJOR > 1
17324         db_appexit( NULL );
17325 #else
17326         (void) dbopen( NULL, 0, 0, 0, NULL);
17327 #endif
17328
17329 ; return 0; }
17330 EOF
17331 if { (eval echo configure:17332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17332   rm -rf conftest*
17333   ol_cv_db_db_4=yes
17334 else
17335   echo "configure: failed program was:" >&5
17336   cat conftest.$ac_ext >&5
17337   rm -rf conftest*
17338   ol_cv_db_db_4=no
17339 fi
17340 rm -f conftest*
17341
17342         LIBS="$ol_LIBS"
17343
17344 fi
17345
17346 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17347
17348         if test $ol_cv_db_db_4 = yes ; then
17349                 ol_cv_lib_db=-ldb-4
17350         fi
17351 fi
17352
17353 if test $ol_cv_lib_db = no ; then
17354         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17355 echo "configure:17356: checking for Berkeley DB link (-ldb)" >&5
17356 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17357   echo $ac_n "(cached) $ac_c" 1>&6
17358 else
17359   
17360         ol_DB_LIB=-ldb
17361         ol_LIBS=$LIBS
17362         LIBS="$ol_DB_LIB $LIBS"
17363
17364         cat > conftest.$ac_ext <<EOF
17365 #line 17366 "configure"
17366 #include "confdefs.h"
17367
17368 #ifdef HAVE_DB_185_H
17369 # include <db_185.h>
17370 #else
17371 # include <db.h>
17372 #endif
17373
17374 #ifndef DB_VERSION_MAJOR
17375 # define DB_VERSION_MAJOR 1
17376 #endif
17377
17378 #ifndef NULL
17379 #define NULL ((void*)0)
17380 #endif
17381
17382 int main() {
17383
17384 #if DB_VERSION_MAJOR > 1
17385         {
17386                 char *version;
17387                 int major, minor, patch;
17388
17389                 version = db_version( &major, &minor, &patch );
17390
17391                 if( major != DB_VERSION_MAJOR ||
17392                         minor < DB_VERSION_MINOR )
17393                 {
17394                         printf("Berkeley DB version mismatch\n"
17395                                 "\texpected: %s\n\tgot: %s\n",
17396                                 DB_VERSION_STRING, version);
17397                         return 1;
17398                 }
17399         }
17400 #endif
17401
17402 #if DB_VERSION_MAJOR > 2
17403         db_env_create( NULL, 0 );
17404 #elif DB_VERSION_MAJOR > 1
17405         db_appexit( NULL );
17406 #else
17407         (void) dbopen( NULL, 0, 0, 0, NULL);
17408 #endif
17409
17410 ; return 0; }
17411 EOF
17412 if { (eval echo configure:17413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17413   rm -rf conftest*
17414   ol_cv_db_db=yes
17415 else
17416   echo "configure: failed program was:" >&5
17417   cat conftest.$ac_ext >&5
17418   rm -rf conftest*
17419   ol_cv_db_db=no
17420 fi
17421 rm -f conftest*
17422
17423         LIBS="$ol_LIBS"
17424
17425 fi
17426
17427 echo "$ac_t""$ol_cv_db_db" 1>&6
17428
17429         if test $ol_cv_db_db = yes ; then
17430                 ol_cv_lib_db=-ldb
17431         fi
17432 fi
17433
17434 if test $ol_cv_lib_db = no ; then
17435         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17436 echo "configure:17437: checking for Berkeley DB link (-ldb3)" >&5
17437 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17438   echo $ac_n "(cached) $ac_c" 1>&6
17439 else
17440   
17441         ol_DB_LIB=-ldb3
17442         ol_LIBS=$LIBS
17443         LIBS="$ol_DB_LIB $LIBS"
17444
17445         cat > conftest.$ac_ext <<EOF
17446 #line 17447 "configure"
17447 #include "confdefs.h"
17448
17449 #ifdef HAVE_DB_185_H
17450 # include <db_185.h>
17451 #else
17452 # include <db.h>
17453 #endif
17454
17455 #ifndef DB_VERSION_MAJOR
17456 # define DB_VERSION_MAJOR 1
17457 #endif
17458
17459 #ifndef NULL
17460 #define NULL ((void*)0)
17461 #endif
17462
17463 int main() {
17464
17465 #if DB_VERSION_MAJOR > 1
17466         {
17467                 char *version;
17468                 int major, minor, patch;
17469
17470                 version = db_version( &major, &minor, &patch );
17471
17472                 if( major != DB_VERSION_MAJOR ||
17473                         minor < DB_VERSION_MINOR )
17474                 {
17475                         printf("Berkeley DB version mismatch\n"
17476                                 "\texpected: %s\n\tgot: %s\n",
17477                                 DB_VERSION_STRING, version);
17478                         return 1;
17479                 }
17480         }
17481 #endif
17482
17483 #if DB_VERSION_MAJOR > 2
17484         db_env_create( NULL, 0 );
17485 #elif DB_VERSION_MAJOR > 1
17486         db_appexit( NULL );
17487 #else
17488         (void) dbopen( NULL, 0, 0, 0, NULL);
17489 #endif
17490
17491 ; return 0; }
17492 EOF
17493 if { (eval echo configure:17494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17494   rm -rf conftest*
17495   ol_cv_db_db3=yes
17496 else
17497   echo "configure: failed program was:" >&5
17498   cat conftest.$ac_ext >&5
17499   rm -rf conftest*
17500   ol_cv_db_db3=no
17501 fi
17502 rm -f conftest*
17503
17504         LIBS="$ol_LIBS"
17505
17506 fi
17507
17508 echo "$ac_t""$ol_cv_db_db3" 1>&6
17509
17510         if test $ol_cv_db_db3 = yes ; then
17511                 ol_cv_lib_db=-ldb3
17512         fi
17513 fi
17514
17515 if test $ol_cv_lib_db = no ; then
17516         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17517 echo "configure:17518: checking for Berkeley DB link (-ldb-3)" >&5
17518 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17519   echo $ac_n "(cached) $ac_c" 1>&6
17520 else
17521   
17522         ol_DB_LIB=-ldb-3
17523         ol_LIBS=$LIBS
17524         LIBS="$ol_DB_LIB $LIBS"
17525
17526         cat > conftest.$ac_ext <<EOF
17527 #line 17528 "configure"
17528 #include "confdefs.h"
17529
17530 #ifdef HAVE_DB_185_H
17531 # include <db_185.h>
17532 #else
17533 # include <db.h>
17534 #endif
17535
17536 #ifndef DB_VERSION_MAJOR
17537 # define DB_VERSION_MAJOR 1
17538 #endif
17539
17540 #ifndef NULL
17541 #define NULL ((void*)0)
17542 #endif
17543
17544 int main() {
17545
17546 #if DB_VERSION_MAJOR > 1
17547         {
17548                 char *version;
17549                 int major, minor, patch;
17550
17551                 version = db_version( &major, &minor, &patch );
17552
17553                 if( major != DB_VERSION_MAJOR ||
17554                         minor < DB_VERSION_MINOR )
17555                 {
17556                         printf("Berkeley DB version mismatch\n"
17557                                 "\texpected: %s\n\tgot: %s\n",
17558                                 DB_VERSION_STRING, version);
17559                         return 1;
17560                 }
17561         }
17562 #endif
17563
17564 #if DB_VERSION_MAJOR > 2
17565         db_env_create( NULL, 0 );
17566 #elif DB_VERSION_MAJOR > 1
17567         db_appexit( NULL );
17568 #else
17569         (void) dbopen( NULL, 0, 0, 0, NULL);
17570 #endif
17571
17572 ; return 0; }
17573 EOF
17574 if { (eval echo configure:17575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17575   rm -rf conftest*
17576   ol_cv_db_db_3=yes
17577 else
17578   echo "configure: failed program was:" >&5
17579   cat conftest.$ac_ext >&5
17580   rm -rf conftest*
17581   ol_cv_db_db_3=no
17582 fi
17583 rm -f conftest*
17584
17585         LIBS="$ol_LIBS"
17586
17587 fi
17588
17589 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17590
17591         if test $ol_cv_db_db_3 = yes ; then
17592                 ol_cv_lib_db=-ldb-3
17593         fi
17594 fi
17595
17596 if test $ol_cv_lib_db = no ; then
17597         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17598 echo "configure:17599: checking for Berkeley DB link (-ldb2)" >&5
17599 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17600   echo $ac_n "(cached) $ac_c" 1>&6
17601 else
17602   
17603         ol_DB_LIB=-ldb2
17604         ol_LIBS=$LIBS
17605         LIBS="$ol_DB_LIB $LIBS"
17606
17607         cat > conftest.$ac_ext <<EOF
17608 #line 17609 "configure"
17609 #include "confdefs.h"
17610
17611 #ifdef HAVE_DB_185_H
17612 # include <db_185.h>
17613 #else
17614 # include <db.h>
17615 #endif
17616
17617 #ifndef DB_VERSION_MAJOR
17618 # define DB_VERSION_MAJOR 1
17619 #endif
17620
17621 #ifndef NULL
17622 #define NULL ((void*)0)
17623 #endif
17624
17625 int main() {
17626
17627 #if DB_VERSION_MAJOR > 1
17628         {
17629                 char *version;
17630                 int major, minor, patch;
17631
17632                 version = db_version( &major, &minor, &patch );
17633
17634                 if( major != DB_VERSION_MAJOR ||
17635                         minor < DB_VERSION_MINOR )
17636                 {
17637                         printf("Berkeley DB version mismatch\n"
17638                                 "\texpected: %s\n\tgot: %s\n",
17639                                 DB_VERSION_STRING, version);
17640                         return 1;
17641                 }
17642         }
17643 #endif
17644
17645 #if DB_VERSION_MAJOR > 2
17646         db_env_create( NULL, 0 );
17647 #elif DB_VERSION_MAJOR > 1
17648         db_appexit( NULL );
17649 #else
17650         (void) dbopen( NULL, 0, 0, 0, NULL);
17651 #endif
17652
17653 ; return 0; }
17654 EOF
17655 if { (eval echo configure:17656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17656   rm -rf conftest*
17657   ol_cv_db_db2=yes
17658 else
17659   echo "configure: failed program was:" >&5
17660   cat conftest.$ac_ext >&5
17661   rm -rf conftest*
17662   ol_cv_db_db2=no
17663 fi
17664 rm -f conftest*
17665
17666         LIBS="$ol_LIBS"
17667
17668 fi
17669
17670 echo "$ac_t""$ol_cv_db_db2" 1>&6
17671
17672         if test $ol_cv_db_db2 = yes ; then
17673                 ol_cv_lib_db=-ldb2
17674         fi
17675 fi
17676
17677 if test $ol_cv_lib_db = no ; then
17678         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17679 echo "configure:17680: checking for Berkeley DB link (-ldb-2)" >&5
17680 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17681   echo $ac_n "(cached) $ac_c" 1>&6
17682 else
17683   
17684         ol_DB_LIB=-ldb-2
17685         ol_LIBS=$LIBS
17686         LIBS="$ol_DB_LIB $LIBS"
17687
17688         cat > conftest.$ac_ext <<EOF
17689 #line 17690 "configure"
17690 #include "confdefs.h"
17691
17692 #ifdef HAVE_DB_185_H
17693 # include <db_185.h>
17694 #else
17695 # include <db.h>
17696 #endif
17697
17698 #ifndef DB_VERSION_MAJOR
17699 # define DB_VERSION_MAJOR 1
17700 #endif
17701
17702 #ifndef NULL
17703 #define NULL ((void*)0)
17704 #endif
17705
17706 int main() {
17707
17708 #if DB_VERSION_MAJOR > 1
17709         {
17710                 char *version;
17711                 int major, minor, patch;
17712
17713                 version = db_version( &major, &minor, &patch );
17714
17715                 if( major != DB_VERSION_MAJOR ||
17716                         minor < DB_VERSION_MINOR )
17717                 {
17718                         printf("Berkeley DB version mismatch\n"
17719                                 "\texpected: %s\n\tgot: %s\n",
17720                                 DB_VERSION_STRING, version);
17721                         return 1;
17722                 }
17723         }
17724 #endif
17725
17726 #if DB_VERSION_MAJOR > 2
17727         db_env_create( NULL, 0 );
17728 #elif DB_VERSION_MAJOR > 1
17729         db_appexit( NULL );
17730 #else
17731         (void) dbopen( NULL, 0, 0, 0, NULL);
17732 #endif
17733
17734 ; return 0; }
17735 EOF
17736 if { (eval echo configure:17737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17737   rm -rf conftest*
17738   ol_cv_db_db_2=yes
17739 else
17740   echo "configure: failed program was:" >&5
17741   cat conftest.$ac_ext >&5
17742   rm -rf conftest*
17743   ol_cv_db_db_2=no
17744 fi
17745 rm -f conftest*
17746
17747         LIBS="$ol_LIBS"
17748
17749 fi
17750
17751 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17752
17753         if test $ol_cv_db_db_2 = yes ; then
17754                 ol_cv_lib_db=-ldb-2
17755         fi
17756 fi
17757
17758 if test $ol_cv_lib_db = no ; then
17759         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17760 echo "configure:17761: checking for Berkeley DB link (-ldb1)" >&5
17761 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17762   echo $ac_n "(cached) $ac_c" 1>&6
17763 else
17764   
17765         ol_DB_LIB=-ldb1
17766         ol_LIBS=$LIBS
17767         LIBS="$ol_DB_LIB $LIBS"
17768
17769         cat > conftest.$ac_ext <<EOF
17770 #line 17771 "configure"
17771 #include "confdefs.h"
17772
17773 #ifdef HAVE_DB_185_H
17774 # include <db_185.h>
17775 #else
17776 # include <db.h>
17777 #endif
17778
17779 #ifndef DB_VERSION_MAJOR
17780 # define DB_VERSION_MAJOR 1
17781 #endif
17782
17783 #ifndef NULL
17784 #define NULL ((void*)0)
17785 #endif
17786
17787 int main() {
17788
17789 #if DB_VERSION_MAJOR > 1
17790         {
17791                 char *version;
17792                 int major, minor, patch;
17793
17794                 version = db_version( &major, &minor, &patch );
17795
17796                 if( major != DB_VERSION_MAJOR ||
17797                         minor < DB_VERSION_MINOR )
17798                 {
17799                         printf("Berkeley DB version mismatch\n"
17800                                 "\texpected: %s\n\tgot: %s\n",
17801                                 DB_VERSION_STRING, version);
17802                         return 1;
17803                 }
17804         }
17805 #endif
17806
17807 #if DB_VERSION_MAJOR > 2
17808         db_env_create( NULL, 0 );
17809 #elif DB_VERSION_MAJOR > 1
17810         db_appexit( NULL );
17811 #else
17812         (void) dbopen( NULL, 0, 0, 0, NULL);
17813 #endif
17814
17815 ; return 0; }
17816 EOF
17817 if { (eval echo configure:17818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17818   rm -rf conftest*
17819   ol_cv_db_db1=yes
17820 else
17821   echo "configure: failed program was:" >&5
17822   cat conftest.$ac_ext >&5
17823   rm -rf conftest*
17824   ol_cv_db_db1=no
17825 fi
17826 rm -f conftest*
17827
17828         LIBS="$ol_LIBS"
17829
17830 fi
17831
17832 echo "$ac_t""$ol_cv_db_db1" 1>&6
17833
17834         if test $ol_cv_db_db1 = yes ; then
17835                 ol_cv_lib_db=-ldb1
17836         fi
17837 fi
17838
17839 if test $ol_cv_lib_db = no ; then
17840         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17841 echo "configure:17842: checking for Berkeley DB link (-ldb-1)" >&5
17842 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17843   echo $ac_n "(cached) $ac_c" 1>&6
17844 else
17845   
17846         ol_DB_LIB=-ldb-1
17847         ol_LIBS=$LIBS
17848         LIBS="$ol_DB_LIB $LIBS"
17849
17850         cat > conftest.$ac_ext <<EOF
17851 #line 17852 "configure"
17852 #include "confdefs.h"
17853
17854 #ifdef HAVE_DB_185_H
17855 # include <db_185.h>
17856 #else
17857 # include <db.h>
17858 #endif
17859
17860 #ifndef DB_VERSION_MAJOR
17861 # define DB_VERSION_MAJOR 1
17862 #endif
17863
17864 #ifndef NULL
17865 #define NULL ((void*)0)
17866 #endif
17867
17868 int main() {
17869
17870 #if DB_VERSION_MAJOR > 1
17871         {
17872                 char *version;
17873                 int major, minor, patch;
17874
17875                 version = db_version( &major, &minor, &patch );
17876
17877                 if( major != DB_VERSION_MAJOR ||
17878                         minor < DB_VERSION_MINOR )
17879                 {
17880                         printf("Berkeley DB version mismatch\n"
17881                                 "\texpected: %s\n\tgot: %s\n",
17882                                 DB_VERSION_STRING, version);
17883                         return 1;
17884                 }
17885         }
17886 #endif
17887
17888 #if DB_VERSION_MAJOR > 2
17889         db_env_create( NULL, 0 );
17890 #elif DB_VERSION_MAJOR > 1
17891         db_appexit( NULL );
17892 #else
17893         (void) dbopen( NULL, 0, 0, 0, NULL);
17894 #endif
17895
17896 ; return 0; }
17897 EOF
17898 if { (eval echo configure:17899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17899   rm -rf conftest*
17900   ol_cv_db_db_1=yes
17901 else
17902   echo "configure: failed program was:" >&5
17903   cat conftest.$ac_ext >&5
17904   rm -rf conftest*
17905   ol_cv_db_db_1=no
17906 fi
17907 rm -f conftest*
17908
17909         LIBS="$ol_LIBS"
17910
17911 fi
17912
17913 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17914
17915         if test $ol_cv_db_db_1 = yes ; then
17916                 ol_cv_lib_db=-ldb-1
17917         fi
17918 fi
17919
17920
17921                 if test "$ol_cv_lib_db" != no ; then
17922                         ol_cv_berkeley_db=yes
17923                 fi
17924         fi
17925 fi
17926
17927         else
17928                 ol_cv_berkeley_db=no
17929 for ac_hdr in db.h
17930 do
17931 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17932 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17933 echo "configure:17934: checking for $ac_hdr" >&5
17934 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17935   echo $ac_n "(cached) $ac_c" 1>&6
17936 else
17937   cat > conftest.$ac_ext <<EOF
17938 #line 17939 "configure"
17939 #include "confdefs.h"
17940 #include <$ac_hdr>
17941 EOF
17942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17943 { (eval echo configure:17944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17945 if test -z "$ac_err"; then
17946   rm -rf conftest*
17947   eval "ac_cv_header_$ac_safe=yes"
17948 else
17949   echo "$ac_err" >&5
17950   echo "configure: failed program was:" >&5
17951   cat conftest.$ac_ext >&5
17952   rm -rf conftest*
17953   eval "ac_cv_header_$ac_safe=no"
17954 fi
17955 rm -f conftest*
17956 fi
17957 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17958   echo "$ac_t""yes" 1>&6
17959     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17960   cat >> confdefs.h <<EOF
17961 #define $ac_tr_hdr 1
17962 EOF
17963  
17964 else
17965   echo "$ac_t""no" 1>&6
17966 fi
17967 done
17968
17969 if test $ac_cv_header_db_h = yes; then
17970         ol_cv_lib_db=no
17971 if test $ol_cv_lib_db = no ; then
17972         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17973 echo "configure:17974: checking for Berkeley DB link (default)" >&5
17974 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17975   echo $ac_n "(cached) $ac_c" 1>&6
17976 else
17977   
17978         ol_DB_LIB=
17979         ol_LIBS=$LIBS
17980         LIBS="$ol_DB_LIB $LIBS"
17981
17982         cat > conftest.$ac_ext <<EOF
17983 #line 17984 "configure"
17984 #include "confdefs.h"
17985
17986 #ifdef HAVE_DB_185_H
17987 # include <db_185.h>
17988 #else
17989 # include <db.h>
17990 #endif
17991
17992 #ifndef DB_VERSION_MAJOR
17993 # define DB_VERSION_MAJOR 1
17994 #endif
17995
17996 #ifndef NULL
17997 #define NULL ((void*)0)
17998 #endif
17999
18000 int main() {
18001
18002 #if DB_VERSION_MAJOR > 1
18003         {
18004                 char *version;
18005                 int major, minor, patch;
18006
18007                 version = db_version( &major, &minor, &patch );
18008
18009                 if( major != DB_VERSION_MAJOR ||
18010                         minor < DB_VERSION_MINOR )
18011                 {
18012                         printf("Berkeley DB version mismatch\n"
18013                                 "\texpected: %s\n\tgot: %s\n",
18014                                 DB_VERSION_STRING, version);
18015                         return 1;
18016                 }
18017         }
18018 #endif
18019
18020 #if DB_VERSION_MAJOR > 2
18021         db_env_create( NULL, 0 );
18022 #elif DB_VERSION_MAJOR > 1
18023         db_appexit( NULL );
18024 #else
18025         (void) dbopen( NULL, 0, 0, 0, NULL);
18026 #endif
18027
18028 ; return 0; }
18029 EOF
18030 if { (eval echo configure:18031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18031   rm -rf conftest*
18032   ol_cv_db_none=yes
18033 else
18034   echo "configure: failed program was:" >&5
18035   cat conftest.$ac_ext >&5
18036   rm -rf conftest*
18037   ol_cv_db_none=no
18038 fi
18039 rm -f conftest*
18040
18041         LIBS="$ol_LIBS"
18042
18043 fi
18044
18045 echo "$ac_t""$ol_cv_db_none" 1>&6
18046
18047         if test $ol_cv_db_none = yes ; then
18048                 ol_cv_lib_db=yes
18049         fi
18050 fi
18051
18052 if test $ol_cv_lib_db = no ; then
18053         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18054 echo "configure:18055: checking for Berkeley DB link (-ldb4)" >&5
18055 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18056   echo $ac_n "(cached) $ac_c" 1>&6
18057 else
18058   
18059         ol_DB_LIB=-ldb4
18060         ol_LIBS=$LIBS
18061         LIBS="$ol_DB_LIB $LIBS"
18062
18063         cat > conftest.$ac_ext <<EOF
18064 #line 18065 "configure"
18065 #include "confdefs.h"
18066
18067 #ifdef HAVE_DB_185_H
18068 # include <db_185.h>
18069 #else
18070 # include <db.h>
18071 #endif
18072
18073 #ifndef DB_VERSION_MAJOR
18074 # define DB_VERSION_MAJOR 1
18075 #endif
18076
18077 #ifndef NULL
18078 #define NULL ((void*)0)
18079 #endif
18080
18081 int main() {
18082
18083 #if DB_VERSION_MAJOR > 1
18084         {
18085                 char *version;
18086                 int major, minor, patch;
18087
18088                 version = db_version( &major, &minor, &patch );
18089
18090                 if( major != DB_VERSION_MAJOR ||
18091                         minor < DB_VERSION_MINOR )
18092                 {
18093                         printf("Berkeley DB version mismatch\n"
18094                                 "\texpected: %s\n\tgot: %s\n",
18095                                 DB_VERSION_STRING, version);
18096                         return 1;
18097                 }
18098         }
18099 #endif
18100
18101 #if DB_VERSION_MAJOR > 2
18102         db_env_create( NULL, 0 );
18103 #elif DB_VERSION_MAJOR > 1
18104         db_appexit( NULL );
18105 #else
18106         (void) dbopen( NULL, 0, 0, 0, NULL);
18107 #endif
18108
18109 ; return 0; }
18110 EOF
18111 if { (eval echo configure:18112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18112   rm -rf conftest*
18113   ol_cv_db_db4=yes
18114 else
18115   echo "configure: failed program was:" >&5
18116   cat conftest.$ac_ext >&5
18117   rm -rf conftest*
18118   ol_cv_db_db4=no
18119 fi
18120 rm -f conftest*
18121
18122         LIBS="$ol_LIBS"
18123
18124 fi
18125
18126 echo "$ac_t""$ol_cv_db_db4" 1>&6
18127
18128         if test $ol_cv_db_db4 = yes ; then
18129                 ol_cv_lib_db=-ldb4
18130         fi
18131 fi
18132
18133 if test $ol_cv_lib_db = no ; then
18134         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18135 echo "configure:18136: checking for Berkeley DB link (-ldb-4)" >&5
18136 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18137   echo $ac_n "(cached) $ac_c" 1>&6
18138 else
18139   
18140         ol_DB_LIB=-ldb-4
18141         ol_LIBS=$LIBS
18142         LIBS="$ol_DB_LIB $LIBS"
18143
18144         cat > conftest.$ac_ext <<EOF
18145 #line 18146 "configure"
18146 #include "confdefs.h"
18147
18148 #ifdef HAVE_DB_185_H
18149 # include <db_185.h>
18150 #else
18151 # include <db.h>
18152 #endif
18153
18154 #ifndef DB_VERSION_MAJOR
18155 # define DB_VERSION_MAJOR 1
18156 #endif
18157
18158 #ifndef NULL
18159 #define NULL ((void*)0)
18160 #endif
18161
18162 int main() {
18163
18164 #if DB_VERSION_MAJOR > 1
18165         {
18166                 char *version;
18167                 int major, minor, patch;
18168
18169                 version = db_version( &major, &minor, &patch );
18170
18171                 if( major != DB_VERSION_MAJOR ||
18172                         minor < DB_VERSION_MINOR )
18173                 {
18174                         printf("Berkeley DB version mismatch\n"
18175                                 "\texpected: %s\n\tgot: %s\n",
18176                                 DB_VERSION_STRING, version);
18177                         return 1;
18178                 }
18179         }
18180 #endif
18181
18182 #if DB_VERSION_MAJOR > 2
18183         db_env_create( NULL, 0 );
18184 #elif DB_VERSION_MAJOR > 1
18185         db_appexit( NULL );
18186 #else
18187         (void) dbopen( NULL, 0, 0, 0, NULL);
18188 #endif
18189
18190 ; return 0; }
18191 EOF
18192 if { (eval echo configure:18193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18193   rm -rf conftest*
18194   ol_cv_db_db_4=yes
18195 else
18196   echo "configure: failed program was:" >&5
18197   cat conftest.$ac_ext >&5
18198   rm -rf conftest*
18199   ol_cv_db_db_4=no
18200 fi
18201 rm -f conftest*
18202
18203         LIBS="$ol_LIBS"
18204
18205 fi
18206
18207 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18208
18209         if test $ol_cv_db_db_4 = yes ; then
18210                 ol_cv_lib_db=-ldb-4
18211         fi
18212 fi
18213
18214 if test $ol_cv_lib_db = no ; then
18215         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18216 echo "configure:18217: checking for Berkeley DB link (-ldb)" >&5
18217 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18218   echo $ac_n "(cached) $ac_c" 1>&6
18219 else
18220   
18221         ol_DB_LIB=-ldb
18222         ol_LIBS=$LIBS
18223         LIBS="$ol_DB_LIB $LIBS"
18224
18225         cat > conftest.$ac_ext <<EOF
18226 #line 18227 "configure"
18227 #include "confdefs.h"
18228
18229 #ifdef HAVE_DB_185_H
18230 # include <db_185.h>
18231 #else
18232 # include <db.h>
18233 #endif
18234
18235 #ifndef DB_VERSION_MAJOR
18236 # define DB_VERSION_MAJOR 1
18237 #endif
18238
18239 #ifndef NULL
18240 #define NULL ((void*)0)
18241 #endif
18242
18243 int main() {
18244
18245 #if DB_VERSION_MAJOR > 1
18246         {
18247                 char *version;
18248                 int major, minor, patch;
18249
18250                 version = db_version( &major, &minor, &patch );
18251
18252                 if( major != DB_VERSION_MAJOR ||
18253                         minor < DB_VERSION_MINOR )
18254                 {
18255                         printf("Berkeley DB version mismatch\n"
18256                                 "\texpected: %s\n\tgot: %s\n",
18257                                 DB_VERSION_STRING, version);
18258                         return 1;
18259                 }
18260         }
18261 #endif
18262
18263 #if DB_VERSION_MAJOR > 2
18264         db_env_create( NULL, 0 );
18265 #elif DB_VERSION_MAJOR > 1
18266         db_appexit( NULL );
18267 #else
18268         (void) dbopen( NULL, 0, 0, 0, NULL);
18269 #endif
18270
18271 ; return 0; }
18272 EOF
18273 if { (eval echo configure:18274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18274   rm -rf conftest*
18275   ol_cv_db_db=yes
18276 else
18277   echo "configure: failed program was:" >&5
18278   cat conftest.$ac_ext >&5
18279   rm -rf conftest*
18280   ol_cv_db_db=no
18281 fi
18282 rm -f conftest*
18283
18284         LIBS="$ol_LIBS"
18285
18286 fi
18287
18288 echo "$ac_t""$ol_cv_db_db" 1>&6
18289
18290         if test $ol_cv_db_db = yes ; then
18291                 ol_cv_lib_db=-ldb
18292         fi
18293 fi
18294
18295 if test $ol_cv_lib_db = no ; then
18296         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18297 echo "configure:18298: checking for Berkeley DB link (-ldb3)" >&5
18298 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18299   echo $ac_n "(cached) $ac_c" 1>&6
18300 else
18301   
18302         ol_DB_LIB=-ldb3
18303         ol_LIBS=$LIBS
18304         LIBS="$ol_DB_LIB $LIBS"
18305
18306         cat > conftest.$ac_ext <<EOF
18307 #line 18308 "configure"
18308 #include "confdefs.h"
18309
18310 #ifdef HAVE_DB_185_H
18311 # include <db_185.h>
18312 #else
18313 # include <db.h>
18314 #endif
18315
18316 #ifndef DB_VERSION_MAJOR
18317 # define DB_VERSION_MAJOR 1
18318 #endif
18319
18320 #ifndef NULL
18321 #define NULL ((void*)0)
18322 #endif
18323
18324 int main() {
18325
18326 #if DB_VERSION_MAJOR > 1
18327         {
18328                 char *version;
18329                 int major, minor, patch;
18330
18331                 version = db_version( &major, &minor, &patch );
18332
18333                 if( major != DB_VERSION_MAJOR ||
18334                         minor < DB_VERSION_MINOR )
18335                 {
18336                         printf("Berkeley DB version mismatch\n"
18337                                 "\texpected: %s\n\tgot: %s\n",
18338                                 DB_VERSION_STRING, version);
18339                         return 1;
18340                 }
18341         }
18342 #endif
18343
18344 #if DB_VERSION_MAJOR > 2
18345         db_env_create( NULL, 0 );
18346 #elif DB_VERSION_MAJOR > 1
18347         db_appexit( NULL );
18348 #else
18349         (void) dbopen( NULL, 0, 0, 0, NULL);
18350 #endif
18351
18352 ; return 0; }
18353 EOF
18354 if { (eval echo configure:18355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18355   rm -rf conftest*
18356   ol_cv_db_db3=yes
18357 else
18358   echo "configure: failed program was:" >&5
18359   cat conftest.$ac_ext >&5
18360   rm -rf conftest*
18361   ol_cv_db_db3=no
18362 fi
18363 rm -f conftest*
18364
18365         LIBS="$ol_LIBS"
18366
18367 fi
18368
18369 echo "$ac_t""$ol_cv_db_db3" 1>&6
18370
18371         if test $ol_cv_db_db3 = yes ; then
18372                 ol_cv_lib_db=-ldb3
18373         fi
18374 fi
18375
18376 if test $ol_cv_lib_db = no ; then
18377         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18378 echo "configure:18379: checking for Berkeley DB link (-ldb-3)" >&5
18379 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18380   echo $ac_n "(cached) $ac_c" 1>&6
18381 else
18382   
18383         ol_DB_LIB=-ldb-3
18384         ol_LIBS=$LIBS
18385         LIBS="$ol_DB_LIB $LIBS"
18386
18387         cat > conftest.$ac_ext <<EOF
18388 #line 18389 "configure"
18389 #include "confdefs.h"
18390
18391 #ifdef HAVE_DB_185_H
18392 # include <db_185.h>
18393 #else
18394 # include <db.h>
18395 #endif
18396
18397 #ifndef DB_VERSION_MAJOR
18398 # define DB_VERSION_MAJOR 1
18399 #endif
18400
18401 #ifndef NULL
18402 #define NULL ((void*)0)
18403 #endif
18404
18405 int main() {
18406
18407 #if DB_VERSION_MAJOR > 1
18408         {
18409                 char *version;
18410                 int major, minor, patch;
18411
18412                 version = db_version( &major, &minor, &patch );
18413
18414                 if( major != DB_VERSION_MAJOR ||
18415                         minor < DB_VERSION_MINOR )
18416                 {
18417                         printf("Berkeley DB version mismatch\n"
18418                                 "\texpected: %s\n\tgot: %s\n",
18419                                 DB_VERSION_STRING, version);
18420                         return 1;
18421                 }
18422         }
18423 #endif
18424
18425 #if DB_VERSION_MAJOR > 2
18426         db_env_create( NULL, 0 );
18427 #elif DB_VERSION_MAJOR > 1
18428         db_appexit( NULL );
18429 #else
18430         (void) dbopen( NULL, 0, 0, 0, NULL);
18431 #endif
18432
18433 ; return 0; }
18434 EOF
18435 if { (eval echo configure:18436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18436   rm -rf conftest*
18437   ol_cv_db_db_3=yes
18438 else
18439   echo "configure: failed program was:" >&5
18440   cat conftest.$ac_ext >&5
18441   rm -rf conftest*
18442   ol_cv_db_db_3=no
18443 fi
18444 rm -f conftest*
18445
18446         LIBS="$ol_LIBS"
18447
18448 fi
18449
18450 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18451
18452         if test $ol_cv_db_db_3 = yes ; then
18453                 ol_cv_lib_db=-ldb-3
18454         fi
18455 fi
18456
18457 if test $ol_cv_lib_db = no ; then
18458         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18459 echo "configure:18460: checking for Berkeley DB link (-ldb2)" >&5
18460 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18461   echo $ac_n "(cached) $ac_c" 1>&6
18462 else
18463   
18464         ol_DB_LIB=-ldb2
18465         ol_LIBS=$LIBS
18466         LIBS="$ol_DB_LIB $LIBS"
18467
18468         cat > conftest.$ac_ext <<EOF
18469 #line 18470 "configure"
18470 #include "confdefs.h"
18471
18472 #ifdef HAVE_DB_185_H
18473 # include <db_185.h>
18474 #else
18475 # include <db.h>
18476 #endif
18477
18478 #ifndef DB_VERSION_MAJOR
18479 # define DB_VERSION_MAJOR 1
18480 #endif
18481
18482 #ifndef NULL
18483 #define NULL ((void*)0)
18484 #endif
18485
18486 int main() {
18487
18488 #if DB_VERSION_MAJOR > 1
18489         {
18490                 char *version;
18491                 int major, minor, patch;
18492
18493                 version = db_version( &major, &minor, &patch );
18494
18495                 if( major != DB_VERSION_MAJOR ||
18496                         minor < DB_VERSION_MINOR )
18497                 {
18498                         printf("Berkeley DB version mismatch\n"
18499                                 "\texpected: %s\n\tgot: %s\n",
18500                                 DB_VERSION_STRING, version);
18501                         return 1;
18502                 }
18503         }
18504 #endif
18505
18506 #if DB_VERSION_MAJOR > 2
18507         db_env_create( NULL, 0 );
18508 #elif DB_VERSION_MAJOR > 1
18509         db_appexit( NULL );
18510 #else
18511         (void) dbopen( NULL, 0, 0, 0, NULL);
18512 #endif
18513
18514 ; return 0; }
18515 EOF
18516 if { (eval echo configure:18517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18517   rm -rf conftest*
18518   ol_cv_db_db2=yes
18519 else
18520   echo "configure: failed program was:" >&5
18521   cat conftest.$ac_ext >&5
18522   rm -rf conftest*
18523   ol_cv_db_db2=no
18524 fi
18525 rm -f conftest*
18526
18527         LIBS="$ol_LIBS"
18528
18529 fi
18530
18531 echo "$ac_t""$ol_cv_db_db2" 1>&6
18532
18533         if test $ol_cv_db_db2 = yes ; then
18534                 ol_cv_lib_db=-ldb2
18535         fi
18536 fi
18537
18538 if test $ol_cv_lib_db = no ; then
18539         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18540 echo "configure:18541: checking for Berkeley DB link (-ldb-2)" >&5
18541 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18542   echo $ac_n "(cached) $ac_c" 1>&6
18543 else
18544   
18545         ol_DB_LIB=-ldb-2
18546         ol_LIBS=$LIBS
18547         LIBS="$ol_DB_LIB $LIBS"
18548
18549         cat > conftest.$ac_ext <<EOF
18550 #line 18551 "configure"
18551 #include "confdefs.h"
18552
18553 #ifdef HAVE_DB_185_H
18554 # include <db_185.h>
18555 #else
18556 # include <db.h>
18557 #endif
18558
18559 #ifndef DB_VERSION_MAJOR
18560 # define DB_VERSION_MAJOR 1
18561 #endif
18562
18563 #ifndef NULL
18564 #define NULL ((void*)0)
18565 #endif
18566
18567 int main() {
18568
18569 #if DB_VERSION_MAJOR > 1
18570         {
18571                 char *version;
18572                 int major, minor, patch;
18573
18574                 version = db_version( &major, &minor, &patch );
18575
18576                 if( major != DB_VERSION_MAJOR ||
18577                         minor < DB_VERSION_MINOR )
18578                 {
18579                         printf("Berkeley DB version mismatch\n"
18580                                 "\texpected: %s\n\tgot: %s\n",
18581                                 DB_VERSION_STRING, version);
18582                         return 1;
18583                 }
18584         }
18585 #endif
18586
18587 #if DB_VERSION_MAJOR > 2
18588         db_env_create( NULL, 0 );
18589 #elif DB_VERSION_MAJOR > 1
18590         db_appexit( NULL );
18591 #else
18592         (void) dbopen( NULL, 0, 0, 0, NULL);
18593 #endif
18594
18595 ; return 0; }
18596 EOF
18597 if { (eval echo configure:18598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18598   rm -rf conftest*
18599   ol_cv_db_db_2=yes
18600 else
18601   echo "configure: failed program was:" >&5
18602   cat conftest.$ac_ext >&5
18603   rm -rf conftest*
18604   ol_cv_db_db_2=no
18605 fi
18606 rm -f conftest*
18607
18608         LIBS="$ol_LIBS"
18609
18610 fi
18611
18612 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18613
18614         if test $ol_cv_db_db_2 = yes ; then
18615                 ol_cv_lib_db=-ldb-2
18616         fi
18617 fi
18618
18619 if test $ol_cv_lib_db = no ; then
18620         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18621 echo "configure:18622: checking for Berkeley DB link (-ldb1)" >&5
18622 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18623   echo $ac_n "(cached) $ac_c" 1>&6
18624 else
18625   
18626         ol_DB_LIB=-ldb1
18627         ol_LIBS=$LIBS
18628         LIBS="$ol_DB_LIB $LIBS"
18629
18630         cat > conftest.$ac_ext <<EOF
18631 #line 18632 "configure"
18632 #include "confdefs.h"
18633
18634 #ifdef HAVE_DB_185_H
18635 # include <db_185.h>
18636 #else
18637 # include <db.h>
18638 #endif
18639
18640 #ifndef DB_VERSION_MAJOR
18641 # define DB_VERSION_MAJOR 1
18642 #endif
18643
18644 #ifndef NULL
18645 #define NULL ((void*)0)
18646 #endif
18647
18648 int main() {
18649
18650 #if DB_VERSION_MAJOR > 1
18651         {
18652                 char *version;
18653                 int major, minor, patch;
18654
18655                 version = db_version( &major, &minor, &patch );
18656
18657                 if( major != DB_VERSION_MAJOR ||
18658                         minor < DB_VERSION_MINOR )
18659                 {
18660                         printf("Berkeley DB version mismatch\n"
18661                                 "\texpected: %s\n\tgot: %s\n",
18662                                 DB_VERSION_STRING, version);
18663                         return 1;
18664                 }
18665         }
18666 #endif
18667
18668 #if DB_VERSION_MAJOR > 2
18669         db_env_create( NULL, 0 );
18670 #elif DB_VERSION_MAJOR > 1
18671         db_appexit( NULL );
18672 #else
18673         (void) dbopen( NULL, 0, 0, 0, NULL);
18674 #endif
18675
18676 ; return 0; }
18677 EOF
18678 if { (eval echo configure:18679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18679   rm -rf conftest*
18680   ol_cv_db_db1=yes
18681 else
18682   echo "configure: failed program was:" >&5
18683   cat conftest.$ac_ext >&5
18684   rm -rf conftest*
18685   ol_cv_db_db1=no
18686 fi
18687 rm -f conftest*
18688
18689         LIBS="$ol_LIBS"
18690
18691 fi
18692
18693 echo "$ac_t""$ol_cv_db_db1" 1>&6
18694
18695         if test $ol_cv_db_db1 = yes ; then
18696                 ol_cv_lib_db=-ldb1
18697         fi
18698 fi
18699
18700 if test $ol_cv_lib_db = no ; then
18701         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18702 echo "configure:18703: checking for Berkeley DB link (-ldb-1)" >&5
18703 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18704   echo $ac_n "(cached) $ac_c" 1>&6
18705 else
18706   
18707         ol_DB_LIB=-ldb-1
18708         ol_LIBS=$LIBS
18709         LIBS="$ol_DB_LIB $LIBS"
18710
18711         cat > conftest.$ac_ext <<EOF
18712 #line 18713 "configure"
18713 #include "confdefs.h"
18714
18715 #ifdef HAVE_DB_185_H
18716 # include <db_185.h>
18717 #else
18718 # include <db.h>
18719 #endif
18720
18721 #ifndef DB_VERSION_MAJOR
18722 # define DB_VERSION_MAJOR 1
18723 #endif
18724
18725 #ifndef NULL
18726 #define NULL ((void*)0)
18727 #endif
18728
18729 int main() {
18730
18731 #if DB_VERSION_MAJOR > 1
18732         {
18733                 char *version;
18734                 int major, minor, patch;
18735
18736                 version = db_version( &major, &minor, &patch );
18737
18738                 if( major != DB_VERSION_MAJOR ||
18739                         minor < DB_VERSION_MINOR )
18740                 {
18741                         printf("Berkeley DB version mismatch\n"
18742                                 "\texpected: %s\n\tgot: %s\n",
18743                                 DB_VERSION_STRING, version);
18744                         return 1;
18745                 }
18746         }
18747 #endif
18748
18749 #if DB_VERSION_MAJOR > 2
18750         db_env_create( NULL, 0 );
18751 #elif DB_VERSION_MAJOR > 1
18752         db_appexit( NULL );
18753 #else
18754         (void) dbopen( NULL, 0, 0, 0, NULL);
18755 #endif
18756
18757 ; return 0; }
18758 EOF
18759 if { (eval echo configure:18760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18760   rm -rf conftest*
18761   ol_cv_db_db_1=yes
18762 else
18763   echo "configure: failed program was:" >&5
18764   cat conftest.$ac_ext >&5
18765   rm -rf conftest*
18766   ol_cv_db_db_1=no
18767 fi
18768 rm -f conftest*
18769
18770         LIBS="$ol_LIBS"
18771
18772 fi
18773
18774 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18775
18776         if test $ol_cv_db_db_1 = yes ; then
18777                 ol_cv_lib_db=-ldb-1
18778         fi
18779 fi
18780
18781
18782         if test "$ol_cv_lib_db" != no ; then
18783                 ol_cv_berkeley_db=yes
18784                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18785 echo "configure:18786: checking for Berkeley DB thread support" >&5
18786 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18787   echo $ac_n "(cached) $ac_c" 1>&6
18788 else
18789   
18790         ol_LIBS="$LIBS"
18791         if test $ol_cv_lib_db != yes ; then
18792                 LIBS="$ol_cv_lib_db"
18793         fi
18794
18795         if test "$cross_compiling" = yes; then
18796   ol_cv_berkeley_db_thread=cross
18797 else
18798   cat > conftest.$ac_ext <<EOF
18799 #line 18800 "configure"
18800 #include "confdefs.h"
18801
18802 #ifdef HAVE_DB_185_H
18803         choke me;
18804 #else
18805 #include <db.h>
18806 #endif
18807 #ifndef NULL
18808 #define NULL ((void *)0)
18809 #endif
18810 main()
18811 {
18812         int rc;
18813         u_int32_t flags = DB_CREATE |
18814 #ifdef DB_PRIVATE
18815                 DB_PRIVATE |
18816 #endif
18817                 DB_THREAD;
18818
18819 #if DB_VERSION_MAJOR > 2
18820         DB_ENV *env = NULL;
18821
18822         rc = db_env_create( &env, 0 );
18823
18824         flags |= DB_INIT_MPOOL;
18825 #ifdef DB_MPOOL_PRIVATE
18826         flags |= DB_MPOOL_PRIVATE;
18827 #endif
18828
18829         if( rc ) {
18830                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18831                 return rc;
18832         }
18833
18834 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18835         rc = env->open( env, NULL, flags, 0 );
18836 #else
18837         rc = env->open( env, NULL, NULL, flags, 0 );
18838 #endif
18839
18840         if ( rc == 0 ) {
18841                 rc = env->close( env, 0 );
18842         }
18843
18844         if( rc ) {
18845                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18846                 return rc;
18847         }
18848
18849 #else
18850         DB_ENV env;
18851         memset( &env, '\0', sizeof(env) );
18852
18853         rc = db_appinit( NULL, NULL, &env, flags );
18854
18855         if( rc == 0 ) {
18856                 db_appexit( &env );
18857         }
18858
18859         unlink("__db_mpool.share");
18860         unlink("__db_lock.share");
18861 #endif
18862
18863         return rc;
18864 }
18865 EOF
18866 if { (eval echo configure:18867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18867 then
18868   ol_cv_berkeley_db_thread=yes
18869 else
18870   echo "configure: failed program was:" >&5
18871   cat conftest.$ac_ext >&5
18872   rm -fr conftest*
18873   ol_cv_berkeley_db_thread=no
18874 fi
18875 rm -fr conftest*
18876 fi
18877
18878
18879         LIBS="$ol_LIBS"
18880
18881         if test $ol_cv_berkeley_db_thread != no ; then
18882                 cat >> confdefs.h <<\EOF
18883 #define HAVE_BERKELEY_DB_THREAD 1
18884 EOF
18885
18886         fi
18887
18888 fi
18889
18890 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18891         fi
18892 fi
18893
18894         fi
18895
18896         if test $ol_cv_berkeley_db != no ; then
18897                 cat >> confdefs.h <<\EOF
18898 #define HAVE_BERKELEY_DB 1
18899 EOF
18900
18901
18902                 ol_link_ldbm=berkeley
18903                 ol_with_ldbm_api=berkeley
18904
18905                 if test $ol_with_ldbm_type = hash ; then
18906                         cat >> confdefs.h <<\EOF
18907 #define LDBM_USE_DBHASH 1
18908 EOF
18909
18910                 else
18911                         cat >> confdefs.h <<\EOF
18912 #define LDBM_USE_DBBTREE 1
18913 EOF
18914
18915                 fi
18916
18917                                                 if test $ol_cv_lib_db != yes ; then
18918                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18919                 fi
18920         fi
18921 fi
18922
18923 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18924         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18925 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18926         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18927 echo "configure:18928: checking Berkeley DB version for BDB backend" >&5
18928 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18929   echo $ac_n "(cached) $ac_c" 1>&6
18930 else
18931   
18932         cat > conftest.$ac_ext <<EOF
18933 #line 18934 "configure"
18934 #include "confdefs.h"
18935
18936 #include <db.h>
18937
18938  /* this check could be improved */
18939 #ifndef DB_VERSION_MAJOR
18940 #       define DB_VERSION_MAJOR 1
18941 #endif
18942
18943 /* require 4.0 or later */
18944 #if DB_VERSION_MAJOR >= 4 
18945         __db_version_compat
18946 #endif
18947         
18948 EOF
18949 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18950   egrep "__db_version_compat" >/dev/null 2>&1; then
18951   rm -rf conftest*
18952   ol_cv_bdb_compat=yes
18953 else
18954   rm -rf conftest*
18955   ol_cv_bdb_compat=no
18956 fi
18957 rm -f conftest*
18958
18959 fi
18960
18961 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18962
18963
18964         if test $ol_cv_bdb_compat = yes ; then
18965                 ol_enable_bdb=yes
18966         elif test $ol_enable_bdb = yes ; then
18967                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18968         else
18969                 ol_enable_bdb=no
18970         fi
18971 fi
18972
18973 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18974         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18975         ol_with_ldbm_api=none
18976 fi
18977
18978 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18979         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18980 echo "configure:18981: checking for MDBM library" >&5
18981 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18982   echo $ac_n "(cached) $ac_c" 1>&6
18983 else
18984         ol_LIBS="$LIBS"
18985         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18986 echo "configure:18987: checking for mdbm_set_chain" >&5
18987 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18988   echo $ac_n "(cached) $ac_c" 1>&6
18989 else
18990   cat > conftest.$ac_ext <<EOF
18991 #line 18992 "configure"
18992 #include "confdefs.h"
18993 /* System header to define __stub macros and hopefully few prototypes,
18994     which can conflict with char mdbm_set_chain(); below.  */
18995 #include <assert.h>
18996 /* Override any gcc2 internal prototype to avoid an error.  */
18997 /* We use char because int might match the return type of a gcc2
18998     builtin and then its argument prototype would still apply.  */
18999 char mdbm_set_chain();
19000 char (*f)();
19001
19002 int main() {
19003
19004 /* The GNU C library defines this for functions which it implements
19005     to always fail with ENOSYS.  Some functions are actually named
19006     something starting with __ and the normal name is an alias.  */
19007 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19008 choke me
19009 #else
19010 f = mdbm_set_chain;
19011 #endif
19012
19013 ; return 0; }
19014 EOF
19015 if { (eval echo configure:19016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19016   rm -rf conftest*
19017   eval "ac_cv_func_mdbm_set_chain=yes"
19018 else
19019   echo "configure: failed program was:" >&5
19020   cat conftest.$ac_ext >&5
19021   rm -rf conftest*
19022   eval "ac_cv_func_mdbm_set_chain=no"
19023 fi
19024 rm -f conftest*
19025 fi
19026
19027 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19028   echo "$ac_t""yes" 1>&6
19029   ol_cv_lib_mdbm=yes
19030 else
19031   echo "$ac_t""no" 1>&6
19032
19033                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19034 echo "configure:19035: checking for mdbm_set_chain in -lmdbm" >&5
19035 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19036 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19037   echo $ac_n "(cached) $ac_c" 1>&6
19038 else
19039   ac_save_LIBS="$LIBS"
19040 LIBS="-lmdbm  $LIBS"
19041 cat > conftest.$ac_ext <<EOF
19042 #line 19043 "configure"
19043 #include "confdefs.h"
19044 /* Override any gcc2 internal prototype to avoid an error.  */
19045 /* We use char because int might match the return type of a gcc2
19046     builtin and then its argument prototype would still apply.  */
19047 char mdbm_set_chain();
19048
19049 int main() {
19050 mdbm_set_chain()
19051 ; return 0; }
19052 EOF
19053 if { (eval echo configure:19054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19054   rm -rf conftest*
19055   eval "ac_cv_lib_$ac_lib_var=yes"
19056 else
19057   echo "configure: failed program was:" >&5
19058   cat conftest.$ac_ext >&5
19059   rm -rf conftest*
19060   eval "ac_cv_lib_$ac_lib_var=no"
19061 fi
19062 rm -f conftest*
19063 LIBS="$ac_save_LIBS"
19064
19065 fi
19066 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19067   echo "$ac_t""yes" 1>&6
19068   ol_cv_lib_mdbm=-lmdbm
19069 else
19070   echo "$ac_t""no" 1>&6
19071 ol_cv_lib_mdbm=no
19072 fi
19073
19074         
19075 fi
19076
19077         LIBS="$ol_LIBS"
19078
19079 fi
19080
19081 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19082
19083
19084  for ac_hdr in mdbm.h
19085 do
19086 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19087 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19088 echo "configure:19089: checking for $ac_hdr" >&5
19089 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19090   echo $ac_n "(cached) $ac_c" 1>&6
19091 else
19092   cat > conftest.$ac_ext <<EOF
19093 #line 19094 "configure"
19094 #include "confdefs.h"
19095 #include <$ac_hdr>
19096 EOF
19097 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19098 { (eval echo configure:19099: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19099 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19100 if test -z "$ac_err"; then
19101   rm -rf conftest*
19102   eval "ac_cv_header_$ac_safe=yes"
19103 else
19104   echo "$ac_err" >&5
19105   echo "configure: failed program was:" >&5
19106   cat conftest.$ac_ext >&5
19107   rm -rf conftest*
19108   eval "ac_cv_header_$ac_safe=no"
19109 fi
19110 rm -f conftest*
19111 fi
19112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19113   echo "$ac_t""yes" 1>&6
19114     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19115   cat >> confdefs.h <<EOF
19116 #define $ac_tr_hdr 1
19117 EOF
19118  
19119 else
19120   echo "$ac_t""no" 1>&6
19121 fi
19122 done
19123
19124  echo $ac_n "checking for db""... $ac_c" 1>&6
19125 echo "configure:19126: checking for db" >&5
19126 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19127   echo $ac_n "(cached) $ac_c" 1>&6
19128 else
19129   
19130         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19131                 ol_cv_mdbm=no
19132         else
19133                 ol_cv_mdbm=yes
19134         fi
19135
19136 fi
19137
19138 echo "$ac_t""$ol_cv_mdbm" 1>&6
19139  if test $ol_cv_mdbm = yes ; then
19140         cat >> confdefs.h <<\EOF
19141 #define HAVE_MDBM 1
19142 EOF
19143
19144  fi
19145
19146
19147         if test $ol_cv_mdbm = yes ; then
19148                 ol_link_ldbm=mdbm
19149                 ol_with_ldbm_api=mdbm
19150                 if test $ol_cv_lib_mdbm != yes ; then
19151                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19152                 fi
19153         fi
19154 fi
19155
19156 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19157         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19158 echo "configure:19159: checking for GDBM library" >&5
19159 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19160   echo $ac_n "(cached) $ac_c" 1>&6
19161 else
19162         ol_LIBS="$LIBS"
19163         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19164 echo "configure:19165: checking for gdbm_open" >&5
19165 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19166   echo $ac_n "(cached) $ac_c" 1>&6
19167 else
19168   cat > conftest.$ac_ext <<EOF
19169 #line 19170 "configure"
19170 #include "confdefs.h"
19171 /* System header to define __stub macros and hopefully few prototypes,
19172     which can conflict with char gdbm_open(); below.  */
19173 #include <assert.h>
19174 /* Override any gcc2 internal prototype to avoid an error.  */
19175 /* We use char because int might match the return type of a gcc2
19176     builtin and then its argument prototype would still apply.  */
19177 char gdbm_open();
19178 char (*f)();
19179
19180 int main() {
19181
19182 /* The GNU C library defines this for functions which it implements
19183     to always fail with ENOSYS.  Some functions are actually named
19184     something starting with __ and the normal name is an alias.  */
19185 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19186 choke me
19187 #else
19188 f = gdbm_open;
19189 #endif
19190
19191 ; return 0; }
19192 EOF
19193 if { (eval echo configure:19194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19194   rm -rf conftest*
19195   eval "ac_cv_func_gdbm_open=yes"
19196 else
19197   echo "configure: failed program was:" >&5
19198   cat conftest.$ac_ext >&5
19199   rm -rf conftest*
19200   eval "ac_cv_func_gdbm_open=no"
19201 fi
19202 rm -f conftest*
19203 fi
19204
19205 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19206   echo "$ac_t""yes" 1>&6
19207   ol_cv_lib_gdbm=yes
19208 else
19209   echo "$ac_t""no" 1>&6
19210
19211                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19212 echo "configure:19213: checking for gdbm_open in -lgdbm" >&5
19213 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19215   echo $ac_n "(cached) $ac_c" 1>&6
19216 else
19217   ac_save_LIBS="$LIBS"
19218 LIBS="-lgdbm  $LIBS"
19219 cat > conftest.$ac_ext <<EOF
19220 #line 19221 "configure"
19221 #include "confdefs.h"
19222 /* Override any gcc2 internal prototype to avoid an error.  */
19223 /* We use char because int might match the return type of a gcc2
19224     builtin and then its argument prototype would still apply.  */
19225 char gdbm_open();
19226
19227 int main() {
19228 gdbm_open()
19229 ; return 0; }
19230 EOF
19231 if { (eval echo configure:19232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19232   rm -rf conftest*
19233   eval "ac_cv_lib_$ac_lib_var=yes"
19234 else
19235   echo "configure: failed program was:" >&5
19236   cat conftest.$ac_ext >&5
19237   rm -rf conftest*
19238   eval "ac_cv_lib_$ac_lib_var=no"
19239 fi
19240 rm -f conftest*
19241 LIBS="$ac_save_LIBS"
19242
19243 fi
19244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19245   echo "$ac_t""yes" 1>&6
19246   ol_cv_lib_gdbm=-lgdbm
19247 else
19248   echo "$ac_t""no" 1>&6
19249 ol_cv_lib_gdbm=no
19250 fi
19251
19252         
19253 fi
19254
19255         LIBS="$ol_LIBS"
19256
19257 fi
19258
19259 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19260
19261
19262  for ac_hdr in gdbm.h
19263 do
19264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19266 echo "configure:19267: checking for $ac_hdr" >&5
19267 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19268   echo $ac_n "(cached) $ac_c" 1>&6
19269 else
19270   cat > conftest.$ac_ext <<EOF
19271 #line 19272 "configure"
19272 #include "confdefs.h"
19273 #include <$ac_hdr>
19274 EOF
19275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19276 { (eval echo configure:19277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19278 if test -z "$ac_err"; then
19279   rm -rf conftest*
19280   eval "ac_cv_header_$ac_safe=yes"
19281 else
19282   echo "$ac_err" >&5
19283   echo "configure: failed program was:" >&5
19284   cat conftest.$ac_ext >&5
19285   rm -rf conftest*
19286   eval "ac_cv_header_$ac_safe=no"
19287 fi
19288 rm -f conftest*
19289 fi
19290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19291   echo "$ac_t""yes" 1>&6
19292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19293   cat >> confdefs.h <<EOF
19294 #define $ac_tr_hdr 1
19295 EOF
19296  
19297 else
19298   echo "$ac_t""no" 1>&6
19299 fi
19300 done
19301
19302  echo $ac_n "checking for db""... $ac_c" 1>&6
19303 echo "configure:19304: checking for db" >&5
19304 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19305   echo $ac_n "(cached) $ac_c" 1>&6
19306 else
19307   
19308         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19309                 ol_cv_gdbm=no
19310         else
19311                 ol_cv_gdbm=yes
19312         fi
19313
19314 fi
19315
19316 echo "$ac_t""$ol_cv_gdbm" 1>&6
19317  if test $ol_cv_gdbm = yes ; then
19318         cat >> confdefs.h <<\EOF
19319 #define HAVE_GDBM 1
19320 EOF
19321
19322  fi
19323
19324
19325         if test $ol_cv_gdbm = yes ; then
19326                 ol_link_ldbm=gdbm
19327                 ol_with_ldbm_api=gdbm
19328
19329                 if test $ol_cv_lib_gdbm != yes ; then
19330                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19331                 fi
19332         fi
19333 fi
19334
19335 if test $ol_with_ldbm_api = ndbm ; then
19336         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19337 echo "configure:19338: checking for NDBM library" >&5
19338 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19339   echo $ac_n "(cached) $ac_c" 1>&6
19340 else
19341         ol_LIBS="$LIBS"
19342         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19343 echo "configure:19344: checking for dbm_open" >&5
19344 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19345   echo $ac_n "(cached) $ac_c" 1>&6
19346 else
19347   cat > conftest.$ac_ext <<EOF
19348 #line 19349 "configure"
19349 #include "confdefs.h"
19350 /* System header to define __stub macros and hopefully few prototypes,
19351     which can conflict with char dbm_open(); below.  */
19352 #include <assert.h>
19353 /* Override any gcc2 internal prototype to avoid an error.  */
19354 /* We use char because int might match the return type of a gcc2
19355     builtin and then its argument prototype would still apply.  */
19356 char dbm_open();
19357 char (*f)();
19358
19359 int main() {
19360
19361 /* The GNU C library defines this for functions which it implements
19362     to always fail with ENOSYS.  Some functions are actually named
19363     something starting with __ and the normal name is an alias.  */
19364 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19365 choke me
19366 #else
19367 f = dbm_open;
19368 #endif
19369
19370 ; return 0; }
19371 EOF
19372 if { (eval echo configure:19373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19373   rm -rf conftest*
19374   eval "ac_cv_func_dbm_open=yes"
19375 else
19376   echo "configure: failed program was:" >&5
19377   cat conftest.$ac_ext >&5
19378   rm -rf conftest*
19379   eval "ac_cv_func_dbm_open=no"
19380 fi
19381 rm -f conftest*
19382 fi
19383
19384 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19385   echo "$ac_t""yes" 1>&6
19386   ol_cv_lib_ndbm=yes
19387 else
19388   echo "$ac_t""no" 1>&6
19389
19390                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19391 echo "configure:19392: checking for dbm_open in -lndbm" >&5
19392 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19394   echo $ac_n "(cached) $ac_c" 1>&6
19395 else
19396   ac_save_LIBS="$LIBS"
19397 LIBS="-lndbm  $LIBS"
19398 cat > conftest.$ac_ext <<EOF
19399 #line 19400 "configure"
19400 #include "confdefs.h"
19401 /* Override any gcc2 internal prototype to avoid an error.  */
19402 /* We use char because int might match the return type of a gcc2
19403     builtin and then its argument prototype would still apply.  */
19404 char dbm_open();
19405
19406 int main() {
19407 dbm_open()
19408 ; return 0; }
19409 EOF
19410 if { (eval echo configure:19411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19411   rm -rf conftest*
19412   eval "ac_cv_lib_$ac_lib_var=yes"
19413 else
19414   echo "configure: failed program was:" >&5
19415   cat conftest.$ac_ext >&5
19416   rm -rf conftest*
19417   eval "ac_cv_lib_$ac_lib_var=no"
19418 fi
19419 rm -f conftest*
19420 LIBS="$ac_save_LIBS"
19421
19422 fi
19423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19424   echo "$ac_t""yes" 1>&6
19425   ol_cv_lib_ndbm=-lndbm
19426 else
19427   echo "$ac_t""no" 1>&6
19428
19429                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19430 echo "configure:19431: checking for dbm_open in -ldbm" >&5
19431 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19432 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19433   echo $ac_n "(cached) $ac_c" 1>&6
19434 else
19435   ac_save_LIBS="$LIBS"
19436 LIBS="-ldbm  $LIBS"
19437 cat > conftest.$ac_ext <<EOF
19438 #line 19439 "configure"
19439 #include "confdefs.h"
19440 /* Override any gcc2 internal prototype to avoid an error.  */
19441 /* We use char because int might match the return type of a gcc2
19442     builtin and then its argument prototype would still apply.  */
19443 char dbm_open();
19444
19445 int main() {
19446 dbm_open()
19447 ; return 0; }
19448 EOF
19449 if { (eval echo configure:19450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19450   rm -rf conftest*
19451   eval "ac_cv_lib_$ac_lib_var=yes"
19452 else
19453   echo "configure: failed program was:" >&5
19454   cat conftest.$ac_ext >&5
19455   rm -rf conftest*
19456   eval "ac_cv_lib_$ac_lib_var=no"
19457 fi
19458 rm -f conftest*
19459 LIBS="$ac_save_LIBS"
19460
19461 fi
19462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19463   echo "$ac_t""yes" 1>&6
19464   ol_cv_lib_ndbm=-ldbm
19465 else
19466   echo "$ac_t""no" 1>&6
19467 ol_cv_lib_ndbm=no
19468 fi
19469                 
19470 fi
19471
19472         
19473 fi
19474
19475         LIBS="$ol_LIBS"
19476
19477 fi
19478
19479 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19480
19481
19482  for ac_hdr in ndbm.h
19483 do
19484 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19485 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19486 echo "configure:19487: checking for $ac_hdr" >&5
19487 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19488   echo $ac_n "(cached) $ac_c" 1>&6
19489 else
19490   cat > conftest.$ac_ext <<EOF
19491 #line 19492 "configure"
19492 #include "confdefs.h"
19493 #include <$ac_hdr>
19494 EOF
19495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19496 { (eval echo configure:19497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19498 if test -z "$ac_err"; then
19499   rm -rf conftest*
19500   eval "ac_cv_header_$ac_safe=yes"
19501 else
19502   echo "$ac_err" >&5
19503   echo "configure: failed program was:" >&5
19504   cat conftest.$ac_ext >&5
19505   rm -rf conftest*
19506   eval "ac_cv_header_$ac_safe=no"
19507 fi
19508 rm -f conftest*
19509 fi
19510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19511   echo "$ac_t""yes" 1>&6
19512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19513   cat >> confdefs.h <<EOF
19514 #define $ac_tr_hdr 1
19515 EOF
19516  
19517 else
19518   echo "$ac_t""no" 1>&6
19519 fi
19520 done
19521
19522  echo $ac_n "checking for db""... $ac_c" 1>&6
19523 echo "configure:19524: checking for db" >&5
19524 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19525   echo $ac_n "(cached) $ac_c" 1>&6
19526 else
19527   
19528         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19529                 ol_cv_ndbm=no
19530         else
19531                 ol_cv_ndbm=yes
19532         fi
19533
19534 fi
19535
19536 echo "$ac_t""$ol_cv_ndbm" 1>&6
19537  if test $ol_cv_ndbm = yes ; then
19538         cat >> confdefs.h <<\EOF
19539 #define HAVE_NDBM 1
19540 EOF
19541
19542  fi
19543
19544
19545         if test $ol_cv_ndbm = yes ; then
19546                 ol_link_ldbm=ndbm
19547                 ol_with_ldbm_api=ndbm
19548
19549                 if test $ol_cv_lib_ndbm != yes ; then
19550                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19551                 fi
19552         fi
19553 fi
19554
19555 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19556         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19557         if test $ol_enable_ldbm = yes ; then
19558                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19559         fi
19560
19561         echo "configure: warning: disabling LDBM" 1>&2
19562         ol_enable_ldbm=no
19563 fi
19564
19565 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19566         BUILD_LIBS_DYNAMIC=shared
19567         cat >> confdefs.h <<\EOF
19568 #define LDAP_LIBS_DYNAMIC 1
19569 EOF
19570
19571 else
19572         BUILD_LIBS_DYNAMIC=static
19573 fi
19574
19575 if test $ol_enable_wrappers != no ; then
19576         for ac_hdr in tcpd.h
19577 do
19578 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19579 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19580 echo "configure:19581: checking for $ac_hdr" >&5
19581 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19582   echo $ac_n "(cached) $ac_c" 1>&6
19583 else
19584   cat > conftest.$ac_ext <<EOF
19585 #line 19586 "configure"
19586 #include "confdefs.h"
19587 #include <$ac_hdr>
19588 EOF
19589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19590 { (eval echo configure:19591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19592 if test -z "$ac_err"; then
19593   rm -rf conftest*
19594   eval "ac_cv_header_$ac_safe=yes"
19595 else
19596   echo "$ac_err" >&5
19597   echo "configure: failed program was:" >&5
19598   cat conftest.$ac_ext >&5
19599   rm -rf conftest*
19600   eval "ac_cv_header_$ac_safe=no"
19601 fi
19602 rm -f conftest*
19603 fi
19604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19605   echo "$ac_t""yes" 1>&6
19606     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19607   cat >> confdefs.h <<EOF
19608 #define $ac_tr_hdr 1
19609 EOF
19610  
19611                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19612 echo "configure:19613: checking for TCP wrappers library" >&5
19613                 save_LIBS="$LIBS"
19614                 LIBS="$LIBS -lwrap"
19615                 cat > conftest.$ac_ext <<EOF
19616 #line 19617 "configure"
19617 #include "confdefs.h"
19618
19619 #include <tcpd.h>
19620 int allow_severity = 0;
19621 int deny_severity  = 0;
19622
19623 struct request_info *req;
19624                 
19625 int main() {
19626
19627 hosts_access(req)
19628                 
19629 ; return 0; }
19630 EOF
19631 if { (eval echo configure:19632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19632   rm -rf conftest*
19633   echo "$ac_t""-lwrap" 1>&6
19634                 have_wrappers=yes
19635                 LIBS="$save_LIBS"
19636 else
19637   echo "configure: failed program was:" >&5
19638   cat conftest.$ac_ext >&5
19639   rm -rf conftest*
19640   
19641                                 LIBS="$LIBS -lnsl"
19642                 cat > conftest.$ac_ext <<EOF
19643 #line 19644 "configure"
19644 #include "confdefs.h"
19645
19646 #include <tcpd.h>
19647 int allow_severity = 0;
19648 int deny_severity  = 0;
19649
19650 struct request_info *req;
19651                 
19652 int main() {
19653
19654 hosts_access(req)
19655                 
19656 ; return 0; }
19657 EOF
19658 if { (eval echo configure:19659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19659   rm -rf conftest*
19660   echo "$ac_t""-lwrap -lnsl" 1>&6
19661                 have_wrappers=yes
19662                 LIBS="$save_LIBS -lnsl"
19663 else
19664   echo "configure: failed program was:" >&5
19665   cat conftest.$ac_ext >&5
19666   rm -rf conftest*
19667   
19668                 echo "$ac_t""no" 1>&6
19669                 have_wrappers=no
19670                 LIBS=$save_LIBS
19671 fi
19672 rm -f conftest*
19673 fi
19674 rm -f conftest*
19675 else
19676   echo "$ac_t""no" 1>&6
19677 have_wrappers=no
19678 fi
19679 done
19680
19681
19682         if test $have_wrappers = yes ; then
19683                 cat >> confdefs.h <<\EOF
19684 #define HAVE_TCPD 1
19685 EOF
19686
19687                 WRAP_LIBS="-lwrap"
19688         elif test $ol_enable_wrappers = yes ; then
19689                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19690         else
19691                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19692                 WRAP_LIBS=""
19693         fi
19694 fi
19695
19696 if test $ol_enable_syslog != no ; then
19697         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19698 echo "configure:19699: checking for openlog" >&5
19699 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19700   echo $ac_n "(cached) $ac_c" 1>&6
19701 else
19702   cat > conftest.$ac_ext <<EOF
19703 #line 19704 "configure"
19704 #include "confdefs.h"
19705 /* System header to define __stub macros and hopefully few prototypes,
19706     which can conflict with char openlog(); below.  */
19707 #include <assert.h>
19708 /* Override any gcc2 internal prototype to avoid an error.  */
19709 /* We use char because int might match the return type of a gcc2
19710     builtin and then its argument prototype would still apply.  */
19711 char openlog();
19712 char (*f)();
19713
19714 int main() {
19715
19716 /* The GNU C library defines this for functions which it implements
19717     to always fail with ENOSYS.  Some functions are actually named
19718     something starting with __ and the normal name is an alias.  */
19719 #if defined (__stub_openlog) || defined (__stub___openlog)
19720 choke me
19721 #else
19722 f = openlog;
19723 #endif
19724
19725 ; return 0; }
19726 EOF
19727 if { (eval echo configure:19728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19728   rm -rf conftest*
19729   eval "ac_cv_func_openlog=yes"
19730 else
19731   echo "configure: failed program was:" >&5
19732   cat conftest.$ac_ext >&5
19733   rm -rf conftest*
19734   eval "ac_cv_func_openlog=no"
19735 fi
19736 rm -f conftest*
19737 fi
19738
19739 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19740   echo "$ac_t""yes" 1>&6
19741   :
19742 else
19743   echo "$ac_t""no" 1>&6
19744 fi
19745
19746         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19747                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19748         fi
19749         ol_enable_syslog=$ac_cv_func_openlog
19750 fi
19751
19752
19753 ol_link_sql=no
19754 if test $ol_enable_sql != no ; then
19755         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19756 echo "configure:19757: checking for SQLDriverConnect in -liodbc" >&5
19757 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19758 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19759   echo $ac_n "(cached) $ac_c" 1>&6
19760 else
19761   ac_save_LIBS="$LIBS"
19762 LIBS="-liodbc  $LIBS"
19763 cat > conftest.$ac_ext <<EOF
19764 #line 19765 "configure"
19765 #include "confdefs.h"
19766 /* Override any gcc2 internal prototype to avoid an error.  */
19767 /* We use char because int might match the return type of a gcc2
19768     builtin and then its argument prototype would still apply.  */
19769 char SQLDriverConnect();
19770
19771 int main() {
19772 SQLDriverConnect()
19773 ; return 0; }
19774 EOF
19775 if { (eval echo configure:19776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19776   rm -rf conftest*
19777   eval "ac_cv_lib_$ac_lib_var=yes"
19778 else
19779   echo "configure: failed program was:" >&5
19780   cat conftest.$ac_ext >&5
19781   rm -rf conftest*
19782   eval "ac_cv_lib_$ac_lib_var=no"
19783 fi
19784 rm -f conftest*
19785 LIBS="$ac_save_LIBS"
19786
19787 fi
19788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19789   echo "$ac_t""yes" 1>&6
19790   have_iodbc=yes
19791 else
19792   echo "$ac_t""no" 1>&6
19793 have_iodbc=no
19794 fi
19795
19796         if test $have_iodbc = yes ; then
19797                 ol_link_sql="-liodbc"
19798         else
19799                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19800 echo "configure:19801: checking for SQLDriverConnect in -lodbc" >&5
19801 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19802 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19803   echo $ac_n "(cached) $ac_c" 1>&6
19804 else
19805   ac_save_LIBS="$LIBS"
19806 LIBS="-lodbc  $LIBS"
19807 cat > conftest.$ac_ext <<EOF
19808 #line 19809 "configure"
19809 #include "confdefs.h"
19810 /* Override any gcc2 internal prototype to avoid an error.  */
19811 /* We use char because int might match the return type of a gcc2
19812     builtin and then its argument prototype would still apply.  */
19813 char SQLDriverConnect();
19814
19815 int main() {
19816 SQLDriverConnect()
19817 ; return 0; }
19818 EOF
19819 if { (eval echo configure:19820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19820   rm -rf conftest*
19821   eval "ac_cv_lib_$ac_lib_var=yes"
19822 else
19823   echo "configure: failed program was:" >&5
19824   cat conftest.$ac_ext >&5
19825   rm -rf conftest*
19826   eval "ac_cv_lib_$ac_lib_var=no"
19827 fi
19828 rm -f conftest*
19829 LIBS="$ac_save_LIBS"
19830
19831 fi
19832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19833   echo "$ac_t""yes" 1>&6
19834   have_odbc=yes
19835 else
19836   echo "$ac_t""no" 1>&6
19837 have_odbc=no
19838 fi
19839
19840                 if test $have_odbc = yes ; then
19841                         ol_link_sql="-lodbc"
19842                 fi
19843         fi
19844
19845         if test $ol_link_sql != no ; then
19846                 SLAPD_SQL_LIBS="$ol_link_sql"
19847
19848         elif test $ol_enable_sql != auto ; then
19849                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19850         fi
19851 fi
19852
19853 if test $ol_enable_tcl != no ; then
19854         for ac_hdr in tcl.h
19855 do
19856 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19857 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19858 echo "configure:19859: checking for $ac_hdr" >&5
19859 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19860   echo $ac_n "(cached) $ac_c" 1>&6
19861 else
19862   cat > conftest.$ac_ext <<EOF
19863 #line 19864 "configure"
19864 #include "confdefs.h"
19865 #include <$ac_hdr>
19866 EOF
19867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19868 { (eval echo configure:19869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19870 if test -z "$ac_err"; then
19871   rm -rf conftest*
19872   eval "ac_cv_header_$ac_safe=yes"
19873 else
19874   echo "$ac_err" >&5
19875   echo "configure: failed program was:" >&5
19876   cat conftest.$ac_ext >&5
19877   rm -rf conftest*
19878   eval "ac_cv_header_$ac_safe=no"
19879 fi
19880 rm -f conftest*
19881 fi
19882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19883   echo "$ac_t""yes" 1>&6
19884     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19885   cat >> confdefs.h <<EOF
19886 #define $ac_tr_hdr 1
19887 EOF
19888  
19889 else
19890   echo "$ac_t""no" 1>&6
19891 fi
19892 done
19893
19894
19895         if test $ac_cv_header_tcl_h != yes ; then
19896                 have_tcl=no
19897         else
19898                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19899                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19900 echo "configure:19901: checking for main in -l$lib" >&5
19901 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19903   echo $ac_n "(cached) $ac_c" 1>&6
19904 else
19905   ac_save_LIBS="$LIBS"
19906 LIBS="-l$lib  $LIBS"
19907 cat > conftest.$ac_ext <<EOF
19908 #line 19909 "configure"
19909 #include "confdefs.h"
19910
19911 int main() {
19912 main()
19913 ; return 0; }
19914 EOF
19915 if { (eval echo configure:19916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19916   rm -rf conftest*
19917   eval "ac_cv_lib_$ac_lib_var=yes"
19918 else
19919   echo "configure: failed program was:" >&5
19920   cat conftest.$ac_ext >&5
19921   rm -rf conftest*
19922   eval "ac_cv_lib_$ac_lib_var=no"
19923 fi
19924 rm -f conftest*
19925 LIBS="$ac_save_LIBS"
19926
19927 fi
19928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19929   echo "$ac_t""yes" 1>&6
19930   have_tcl=yes
19931                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19932                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19933                            else
19934                                         MOD_TCL_LIB="-l${lib}"
19935                            fi;break
19936 else
19937   echo "$ac_t""no" 1>&6
19938 have_tcl=no
19939 fi
19940
19941                 done
19942         fi
19943
19944         if test $have_tcl != yes ; then
19945                 echo "configure: warning: could not find -ltcl" 1>&2
19946                 if test $ol_enable_tcl = yes ; then
19947                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19948                 fi
19949
19950                 ol_enable_tcl=no
19951         fi
19952 fi
19953
19954 ol_link_termcap=no
19955 for ac_hdr in termcap.h ncurses.h
19956 do
19957 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19958 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19959 echo "configure:19960: checking for $ac_hdr" >&5
19960 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19961   echo $ac_n "(cached) $ac_c" 1>&6
19962 else
19963   cat > conftest.$ac_ext <<EOF
19964 #line 19965 "configure"
19965 #include "confdefs.h"
19966 #include <$ac_hdr>
19967 EOF
19968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19969 { (eval echo configure:19970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19971 if test -z "$ac_err"; then
19972   rm -rf conftest*
19973   eval "ac_cv_header_$ac_safe=yes"
19974 else
19975   echo "$ac_err" >&5
19976   echo "configure: failed program was:" >&5
19977   cat conftest.$ac_ext >&5
19978   rm -rf conftest*
19979   eval "ac_cv_header_$ac_safe=no"
19980 fi
19981 rm -f conftest*
19982 fi
19983 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19984   echo "$ac_t""yes" 1>&6
19985     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19986   cat >> confdefs.h <<EOF
19987 #define $ac_tr_hdr 1
19988 EOF
19989  
19990 else
19991   echo "$ac_t""no" 1>&6
19992 fi
19993 done
19994
19995
19996 if test $ol_link_termcap = no ; then
19997         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19998 echo "configure:19999: checking for tputs in -ltermcap" >&5
19999 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
20000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20001   echo $ac_n "(cached) $ac_c" 1>&6
20002 else
20003   ac_save_LIBS="$LIBS"
20004 LIBS="-ltermcap  $LIBS"
20005 cat > conftest.$ac_ext <<EOF
20006 #line 20007 "configure"
20007 #include "confdefs.h"
20008 /* Override any gcc2 internal prototype to avoid an error.  */
20009 /* We use char because int might match the return type of a gcc2
20010     builtin and then its argument prototype would still apply.  */
20011 char tputs();
20012
20013 int main() {
20014 tputs()
20015 ; return 0; }
20016 EOF
20017 if { (eval echo configure:20018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20018   rm -rf conftest*
20019   eval "ac_cv_lib_$ac_lib_var=yes"
20020 else
20021   echo "configure: failed program was:" >&5
20022   cat conftest.$ac_ext >&5
20023   rm -rf conftest*
20024   eval "ac_cv_lib_$ac_lib_var=no"
20025 fi
20026 rm -f conftest*
20027 LIBS="$ac_save_LIBS"
20028
20029 fi
20030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20031   echo "$ac_t""yes" 1>&6
20032   have_termcap=yes
20033 else
20034   echo "$ac_t""no" 1>&6
20035 have_termcap=no
20036 fi
20037
20038         if test $have_termcap = yes ; then
20039                 cat >> confdefs.h <<\EOF
20040 #define HAVE_TERMCAP 1
20041 EOF
20042
20043                 ol_link_termcap=yes
20044                 TERMCAP_LIBS=-ltermcap
20045         fi
20046 fi
20047
20048 if test $ol_link_termcap = no ; then
20049         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
20050 echo "configure:20051: checking for initscr in -lncurses" >&5
20051 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
20052 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20053   echo $ac_n "(cached) $ac_c" 1>&6
20054 else
20055   ac_save_LIBS="$LIBS"
20056 LIBS="-lncurses  $LIBS"
20057 cat > conftest.$ac_ext <<EOF
20058 #line 20059 "configure"
20059 #include "confdefs.h"
20060 /* Override any gcc2 internal prototype to avoid an error.  */
20061 /* We use char because int might match the return type of a gcc2
20062     builtin and then its argument prototype would still apply.  */
20063 char initscr();
20064
20065 int main() {
20066 initscr()
20067 ; return 0; }
20068 EOF
20069 if { (eval echo configure:20070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20070   rm -rf conftest*
20071   eval "ac_cv_lib_$ac_lib_var=yes"
20072 else
20073   echo "configure: failed program was:" >&5
20074   cat conftest.$ac_ext >&5
20075   rm -rf conftest*
20076   eval "ac_cv_lib_$ac_lib_var=no"
20077 fi
20078 rm -f conftest*
20079 LIBS="$ac_save_LIBS"
20080
20081 fi
20082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20083   echo "$ac_t""yes" 1>&6
20084   have_ncurses=yes
20085 else
20086   echo "$ac_t""no" 1>&6
20087 have_ncurses=no
20088 fi
20089
20090         if test $have_ncurses = yes ; then
20091                 cat >> confdefs.h <<\EOF
20092 #define HAVE_NCURSES 1
20093 EOF
20094
20095                 ol_link_termcap=yes
20096                 TERMCAP_LIBS=-lncurses
20097         fi
20098 fi
20099
20100 if test $ol_link_termcap = no ; then
20101         cat >> confdefs.h <<\EOF
20102 #define NO_TERMCAP 1
20103 EOF
20104
20105         TERMCAP_LIBS=
20106 fi
20107
20108 ol_link_sasl=no
20109 ol_link_spasswd=no
20110 if test $ol_with_cyrus_sasl != no ; then
20111         for ac_hdr in sasl/sasl.h sasl.h
20112 do
20113 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20114 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20115 echo "configure:20116: checking for $ac_hdr" >&5
20116 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20117   echo $ac_n "(cached) $ac_c" 1>&6
20118 else
20119   cat > conftest.$ac_ext <<EOF
20120 #line 20121 "configure"
20121 #include "confdefs.h"
20122 #include <$ac_hdr>
20123 EOF
20124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20125 { (eval echo configure:20126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20127 if test -z "$ac_err"; then
20128   rm -rf conftest*
20129   eval "ac_cv_header_$ac_safe=yes"
20130 else
20131   echo "$ac_err" >&5
20132   echo "configure: failed program was:" >&5
20133   cat conftest.$ac_ext >&5
20134   rm -rf conftest*
20135   eval "ac_cv_header_$ac_safe=no"
20136 fi
20137 rm -f conftest*
20138 fi
20139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20140   echo "$ac_t""yes" 1>&6
20141     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20142   cat >> confdefs.h <<EOF
20143 #define $ac_tr_hdr 1
20144 EOF
20145  
20146 else
20147   echo "$ac_t""no" 1>&6
20148 fi
20149 done
20150
20151
20152         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20153                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20154 echo "configure:20155: checking for sasl_client_init in -lsasl2" >&5
20155 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20156 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20157   echo $ac_n "(cached) $ac_c" 1>&6
20158 else
20159   ac_save_LIBS="$LIBS"
20160 LIBS="-lsasl2  $LIBS"
20161 cat > conftest.$ac_ext <<EOF
20162 #line 20163 "configure"
20163 #include "confdefs.h"
20164 /* Override any gcc2 internal prototype to avoid an error.  */
20165 /* We use char because int might match the return type of a gcc2
20166     builtin and then its argument prototype would still apply.  */
20167 char sasl_client_init();
20168
20169 int main() {
20170 sasl_client_init()
20171 ; return 0; }
20172 EOF
20173 if { (eval echo configure:20174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20174   rm -rf conftest*
20175   eval "ac_cv_lib_$ac_lib_var=yes"
20176 else
20177   echo "configure: failed program was:" >&5
20178   cat conftest.$ac_ext >&5
20179   rm -rf conftest*
20180   eval "ac_cv_lib_$ac_lib_var=no"
20181 fi
20182 rm -f conftest*
20183 LIBS="$ac_save_LIBS"
20184
20185 fi
20186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20187   echo "$ac_t""yes" 1>&6
20188   ol_link_sasl="-lsasl2"
20189 else
20190   echo "$ac_t""no" 1>&6
20191 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20192 echo "configure:20193: checking for sasl_client_init in -lsasl" >&5
20193 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20195   echo $ac_n "(cached) $ac_c" 1>&6
20196 else
20197   ac_save_LIBS="$LIBS"
20198 LIBS="-lsasl  $LIBS"
20199 cat > conftest.$ac_ext <<EOF
20200 #line 20201 "configure"
20201 #include "confdefs.h"
20202 /* Override any gcc2 internal prototype to avoid an error.  */
20203 /* We use char because int might match the return type of a gcc2
20204     builtin and then its argument prototype would still apply.  */
20205 char sasl_client_init();
20206
20207 int main() {
20208 sasl_client_init()
20209 ; return 0; }
20210 EOF
20211 if { (eval echo configure:20212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20212   rm -rf conftest*
20213   eval "ac_cv_lib_$ac_lib_var=yes"
20214 else
20215   echo "configure: failed program was:" >&5
20216   cat conftest.$ac_ext >&5
20217   rm -rf conftest*
20218   eval "ac_cv_lib_$ac_lib_var=no"
20219 fi
20220 rm -f conftest*
20221 LIBS="$ac_save_LIBS"
20222
20223 fi
20224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20225   echo "$ac_t""yes" 1>&6
20226   ol_link_sasl="-lsasl"
20227 else
20228   echo "$ac_t""no" 1>&6
20229 fi
20230
20231 fi
20232
20233         fi
20234
20235         if test $ol_link_sasl = no ; then
20236                 if test $ol_with_cyrus_sasl != auto ; then
20237                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20238                 else
20239                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20240                         echo "configure: warning: SASL authentication not supported!" 1>&2
20241                         if test $ol_link_tls = no ; then
20242                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20243                         fi
20244                 fi
20245         else
20246                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20247 echo "configure:20248: checking Cyrus SASL library version" >&5
20248 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20249   echo $ac_n "(cached) $ac_c" 1>&6
20250 else
20251   
20252         cat > conftest.$ac_ext <<EOF
20253 #line 20254 "configure"
20254 #include "confdefs.h"
20255
20256 #ifdef HAVE_SASL_SASL_H
20257 #include <sasl/sasl.h>
20258 #else
20259 #include <sasl.h>
20260 #endif
20261
20262 /* require 2.1.3 or later */
20263 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20264         char *__sasl_compat = "1.5.x okay";
20265 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20266         __sasl_compat "2.2+ or better okay (we guess)";
20267 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20268         && SASL_VERSION_STEP >=3
20269         __sasl_compat = "2.1.3+ or better okay";
20270 #endif
20271         
20272 EOF
20273 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20274   egrep "__sasl_compat" >/dev/null 2>&1; then
20275   rm -rf conftest*
20276   ol_cv_sasl_compat=yes
20277 else
20278   rm -rf conftest*
20279   ol_cv_sasl_compat=no
20280 fi
20281 rm -f conftest*
20282
20283 fi
20284
20285 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20286
20287                 if test $ol_cv_sasl_compat = no ; then
20288                         ol_link_sasl=no
20289                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20290                 fi
20291
20292                 cat >> confdefs.h <<\EOF
20293 #define HAVE_CYRUS_SASL 1
20294 EOF
20295
20296                 SASL_LIBS="$ol_link_sasl"
20297                 if test $ol_enable_spasswd != no ; then
20298                         ol_link_spasswd=yes
20299                 fi
20300         fi
20301
20302 else
20303         echo "configure: warning: SASL authentication not supported!" 1>&2
20304         if test $ol_link_tls = no ; then
20305                 echo "configure: warning: Strong authentication not supported!" 1>&2
20306         fi
20307 fi
20308
20309 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20310         dev=no
20311         if test -r /dev/urandom ; then
20312                 dev="/dev/urandom";
20313         elif test -r /idev/urandom ; then
20314                 dev="/idev/urandom";
20315         elif test -r /dev/srandom ; then
20316                 dev="/dev/srandom";
20317         elif test -r /dev/random ; then
20318                 dev="/dev/random";
20319         elif test -r /idev/random ; then
20320                 dev="/idev/random";
20321         fi
20322
20323         if test $dev != no ; then
20324                 cat >> confdefs.h <<EOF
20325 #define URANDOM_DEVICE "$dev"
20326 EOF
20327
20328         fi
20329 fi
20330
20331 ol_link_fetch=no
20332 if test $ol_with_fetch != no ; then
20333         ol_LIBS=$LIBS
20334 LIBS="-lfetch -lcom_err $LIBS"
20335 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20336 echo "configure:20337: checking fetch(3) library" >&5
20337 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20338   echo $ac_n "(cached) $ac_c" 1>&6
20339 else
20340   
20341         cat > conftest.$ac_ext <<EOF
20342 #line 20343 "configure"
20343 #include "confdefs.h"
20344
20345 #include <sys/param.h>
20346 #include <stdio.h>
20347 #include <fetch.h>
20348 int main() {
20349 struct url *u = fetchParseURL("file:///"); 
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   ol_cv_lib_fetch=yes
20355 else
20356   echo "configure: failed program was:" >&5
20357   cat conftest.$ac_ext >&5
20358   rm -rf conftest*
20359   ol_cv_lib_fetch=no
20360 fi
20361 rm -f conftest*
20362 fi
20363
20364 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20365 LIBS=$ol_LIBS
20366 if test $ol_cv_lib_fetch != no ; then
20367         ol_link_fetch="-lfetch -lcom_err"
20368         cat >> confdefs.h <<\EOF
20369 #define HAVE_FETCH 1
20370 EOF
20371
20372 fi
20373
20374
20375         if test $ol_cv_lib_fetch != no ; then
20376                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20377                 ol_link_fetch=freebsd
20378
20379         elif test $ol_with_fetch != auto ; then
20380                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20381         fi 
20382 fi
20383
20384 ol_link_readline=no
20385 if test $ol_with_readline != no ; then
20386         for ac_hdr in readline/readline.h readline/history.h
20387 do
20388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20390 echo "configure:20391: checking for $ac_hdr" >&5
20391 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20392   echo $ac_n "(cached) $ac_c" 1>&6
20393 else
20394   cat > conftest.$ac_ext <<EOF
20395 #line 20396 "configure"
20396 #include "confdefs.h"
20397 #include <$ac_hdr>
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   eval "ac_cv_header_$ac_safe=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   eval "ac_cv_header_$ac_safe=no"
20411 fi
20412 rm -f conftest*
20413 fi
20414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20415   echo "$ac_t""yes" 1>&6
20416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20417   cat >> confdefs.h <<EOF
20418 #define $ac_tr_hdr 1
20419 EOF
20420  
20421 else
20422   echo "$ac_t""no" 1>&6
20423 fi
20424 done
20425
20426
20427         if test $ac_cv_header_readline_readline_h = yes ; then
20428                 save_LIBS="$LIBS"
20429                 LIBS="$TERMCAP_LIBS $LIBS"
20430                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20431 echo "configure:20432: checking for readline in -lreadline" >&5
20432 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20433 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20434   echo $ac_n "(cached) $ac_c" 1>&6
20435 else
20436   ac_save_LIBS="$LIBS"
20437 LIBS="-lreadline  $LIBS"
20438 cat > conftest.$ac_ext <<EOF
20439 #line 20440 "configure"
20440 #include "confdefs.h"
20441 /* Override any gcc2 internal prototype to avoid an error.  */
20442 /* We use char because int might match the return type of a gcc2
20443     builtin and then its argument prototype would still apply.  */
20444 char readline();
20445
20446 int main() {
20447 readline()
20448 ; return 0; }
20449 EOF
20450 if { (eval echo configure:20451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20451   rm -rf conftest*
20452   eval "ac_cv_lib_$ac_lib_var=yes"
20453 else
20454   echo "configure: failed program was:" >&5
20455   cat conftest.$ac_ext >&5
20456   rm -rf conftest*
20457   eval "ac_cv_lib_$ac_lib_var=no"
20458 fi
20459 rm -f conftest*
20460 LIBS="$ac_save_LIBS"
20461
20462 fi
20463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20464   echo "$ac_t""yes" 1>&6
20465   have_readline=yes
20466 else
20467   echo "$ac_t""no" 1>&6
20468 have_readline=no
20469 fi
20470
20471                 LIBS="$save_LIBS"
20472                         
20473                 if test $have_readline = yes ; then
20474                         ol_with_readline=found
20475                         ol_link_readline=yes
20476
20477                         READLINE_LIBS="-lreadline"
20478                 fi
20479         fi
20480 fi
20481
20482 if test $ol_link_readline = yes ; then
20483         cat >> confdefs.h <<\EOF
20484 #define HAVE_READLINE 1
20485 EOF
20486
20487 fi
20488
20489
20490 if test $ol_enable_crypt != no ; then
20491         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20492 echo "configure:20493: checking for crypt" >&5
20493 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20494   echo $ac_n "(cached) $ac_c" 1>&6
20495 else
20496   cat > conftest.$ac_ext <<EOF
20497 #line 20498 "configure"
20498 #include "confdefs.h"
20499 /* System header to define __stub macros and hopefully few prototypes,
20500     which can conflict with char crypt(); below.  */
20501 #include <assert.h>
20502 /* Override any gcc2 internal prototype to avoid an error.  */
20503 /* We use char because int might match the return type of a gcc2
20504     builtin and then its argument prototype would still apply.  */
20505 char crypt();
20506 char (*f)();
20507
20508 int main() {
20509
20510 /* The GNU C library defines this for functions which it implements
20511     to always fail with ENOSYS.  Some functions are actually named
20512     something starting with __ and the normal name is an alias.  */
20513 #if defined (__stub_crypt) || defined (__stub___crypt)
20514 choke me
20515 #else
20516 f = crypt;
20517 #endif
20518
20519 ; return 0; }
20520 EOF
20521 if { (eval echo configure:20522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20522   rm -rf conftest*
20523   eval "ac_cv_func_crypt=yes"
20524 else
20525   echo "configure: failed program was:" >&5
20526   cat conftest.$ac_ext >&5
20527   rm -rf conftest*
20528   eval "ac_cv_func_crypt=no"
20529 fi
20530 rm -f conftest*
20531 fi
20532
20533 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20534   echo "$ac_t""yes" 1>&6
20535   have_crypt=yes
20536 else
20537   echo "$ac_t""no" 1>&6
20538
20539                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20540 echo "configure:20541: checking for crypt in -lcrypt" >&5
20541 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20542 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20543   echo $ac_n "(cached) $ac_c" 1>&6
20544 else
20545   ac_save_LIBS="$LIBS"
20546 LIBS="-lcrypt  $LIBS"
20547 cat > conftest.$ac_ext <<EOF
20548 #line 20549 "configure"
20549 #include "confdefs.h"
20550 /* Override any gcc2 internal prototype to avoid an error.  */
20551 /* We use char because int might match the return type of a gcc2
20552     builtin and then its argument prototype would still apply.  */
20553 char crypt();
20554
20555 int main() {
20556 crypt()
20557 ; return 0; }
20558 EOF
20559 if { (eval echo configure:20560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20560   rm -rf conftest*
20561   eval "ac_cv_lib_$ac_lib_var=yes"
20562 else
20563   echo "configure: failed program was:" >&5
20564   cat conftest.$ac_ext >&5
20565   rm -rf conftest*
20566   eval "ac_cv_lib_$ac_lib_var=no"
20567 fi
20568 rm -f conftest*
20569 LIBS="$ac_save_LIBS"
20570
20571 fi
20572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20573   echo "$ac_t""yes" 1>&6
20574   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20575                         have_crypt=yes
20576 else
20577   echo "$ac_t""no" 1>&6
20578 have_crypt=no
20579 fi
20580
20581 fi
20582
20583
20584         if test $have_crypt = yes ; then
20585                 cat >> confdefs.h <<\EOF
20586 #define HAVE_CRYPT 1
20587 EOF
20588
20589         else
20590                 echo "configure: warning: could not find crypt" 1>&2
20591                 if test $ol_enable_crypt = yes ; then
20592                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20593                 fi
20594
20595                 echo "configure: warning: disabling crypt support" 1>&2
20596                 ol_enable_crypt=no
20597         fi
20598 fi
20599
20600 if test $ol_enable_proctitle != no ; then
20601         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20602 echo "configure:20603: checking for setproctitle" >&5
20603 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20604   echo $ac_n "(cached) $ac_c" 1>&6
20605 else
20606   cat > conftest.$ac_ext <<EOF
20607 #line 20608 "configure"
20608 #include "confdefs.h"
20609 /* System header to define __stub macros and hopefully few prototypes,
20610     which can conflict with char setproctitle(); below.  */
20611 #include <assert.h>
20612 /* Override any gcc2 internal prototype to avoid an error.  */
20613 /* We use char because int might match the return type of a gcc2
20614     builtin and then its argument prototype would still apply.  */
20615 char setproctitle();
20616 char (*f)();
20617
20618 int main() {
20619
20620 /* The GNU C library defines this for functions which it implements
20621     to always fail with ENOSYS.  Some functions are actually named
20622     something starting with __ and the normal name is an alias.  */
20623 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20624 choke me
20625 #else
20626 f = setproctitle;
20627 #endif
20628
20629 ; return 0; }
20630 EOF
20631 if { (eval echo configure:20632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20632   rm -rf conftest*
20633   eval "ac_cv_func_setproctitle=yes"
20634 else
20635   echo "configure: failed program was:" >&5
20636   cat conftest.$ac_ext >&5
20637   rm -rf conftest*
20638   eval "ac_cv_func_setproctitle=no"
20639 fi
20640 rm -f conftest*
20641 fi
20642
20643 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20644   echo "$ac_t""yes" 1>&6
20645   have_setproctitle=yes
20646 else
20647   echo "$ac_t""no" 1>&6
20648
20649                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20650 echo "configure:20651: checking for setproctitle in -lutil" >&5
20651 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20653   echo $ac_n "(cached) $ac_c" 1>&6
20654 else
20655   ac_save_LIBS="$LIBS"
20656 LIBS="-lutil  $LIBS"
20657 cat > conftest.$ac_ext <<EOF
20658 #line 20659 "configure"
20659 #include "confdefs.h"
20660 /* Override any gcc2 internal prototype to avoid an error.  */
20661 /* We use char because int might match the return type of a gcc2
20662     builtin and then its argument prototype would still apply.  */
20663 char setproctitle();
20664
20665 int main() {
20666 setproctitle()
20667 ; return 0; }
20668 EOF
20669 if { (eval echo configure:20670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20670   rm -rf conftest*
20671   eval "ac_cv_lib_$ac_lib_var=yes"
20672 else
20673   echo "configure: failed program was:" >&5
20674   cat conftest.$ac_ext >&5
20675   rm -rf conftest*
20676   eval "ac_cv_lib_$ac_lib_var=no"
20677 fi
20678 rm -f conftest*
20679 LIBS="$ac_save_LIBS"
20680
20681 fi
20682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20683   echo "$ac_t""yes" 1>&6
20684   have_setproctitle=yes
20685                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20686 else
20687   echo "$ac_t""no" 1>&6
20688 have_setproctitle=no
20689                         LIBOBJS="$LIBOBJS setproctitle.o"
20690                         LIBSRCS="$LIBSRCS setproctitle.c"
20691 fi
20692
20693 fi
20694
20695
20696         if test $have_setproctitle = yes ; then
20697                 cat >> confdefs.h <<\EOF
20698 #define HAVE_SETPROCTITLE 1
20699 EOF
20700
20701         fi
20702 fi
20703
20704 if test $ol_enable_slp != no ; then
20705         for ac_hdr in slp.h 
20706 do
20707 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20708 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20709 echo "configure:20710: checking for $ac_hdr" >&5
20710 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20711   echo $ac_n "(cached) $ac_c" 1>&6
20712 else
20713   cat > conftest.$ac_ext <<EOF
20714 #line 20715 "configure"
20715 #include "confdefs.h"
20716 #include <$ac_hdr>
20717 EOF
20718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20719 { (eval echo configure:20720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20721 if test -z "$ac_err"; then
20722   rm -rf conftest*
20723   eval "ac_cv_header_$ac_safe=yes"
20724 else
20725   echo "$ac_err" >&5
20726   echo "configure: failed program was:" >&5
20727   cat conftest.$ac_ext >&5
20728   rm -rf conftest*
20729   eval "ac_cv_header_$ac_safe=no"
20730 fi
20731 rm -f conftest*
20732 fi
20733 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20734   echo "$ac_t""yes" 1>&6
20735     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20736   cat >> confdefs.h <<EOF
20737 #define $ac_tr_hdr 1
20738 EOF
20739  
20740 else
20741   echo "$ac_t""no" 1>&6
20742 fi
20743 done
20744
20745
20746         if test $ac_cv_header_slp_h = yes ; then
20747                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20748 echo "configure:20749: checking for SLPOpen in -lslp" >&5
20749 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20750 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20751   echo $ac_n "(cached) $ac_c" 1>&6
20752 else
20753   ac_save_LIBS="$LIBS"
20754 LIBS="-lslp  $LIBS"
20755 cat > conftest.$ac_ext <<EOF
20756 #line 20757 "configure"
20757 #include "confdefs.h"
20758 /* Override any gcc2 internal prototype to avoid an error.  */
20759 /* We use char because int might match the return type of a gcc2
20760     builtin and then its argument prototype would still apply.  */
20761 char SLPOpen();
20762
20763 int main() {
20764 SLPOpen()
20765 ; return 0; }
20766 EOF
20767 if { (eval echo configure:20768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20768   rm -rf conftest*
20769   eval "ac_cv_lib_$ac_lib_var=yes"
20770 else
20771   echo "configure: failed program was:" >&5
20772   cat conftest.$ac_ext >&5
20773   rm -rf conftest*
20774   eval "ac_cv_lib_$ac_lib_var=no"
20775 fi
20776 rm -f conftest*
20777 LIBS="$ac_save_LIBS"
20778
20779 fi
20780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20781   echo "$ac_t""yes" 1>&6
20782   have_slp=yes
20783 else
20784   echo "$ac_t""no" 1>&6
20785 have_slp=no
20786 fi
20787
20788                 if test $have_slp = yes ; then
20789                         cat >> confdefs.h <<\EOF
20790 #define HAVE_SLP 1
20791 EOF
20792
20793                         SLAPD_SLP_LIBS=-lslp
20794                 fi
20795
20796         elif test $ol_enable_slp = yes ; then
20797                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20798         fi
20799 fi
20800
20801 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20802 echo "configure:20803: checking for ANSI C header files" >&5
20803 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20804   echo $ac_n "(cached) $ac_c" 1>&6
20805 else
20806   cat > conftest.$ac_ext <<EOF
20807 #line 20808 "configure"
20808 #include "confdefs.h"
20809 #include <stdlib.h>
20810 #include <stdarg.h>
20811 #include <string.h>
20812 #include <float.h>
20813 EOF
20814 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20815 { (eval echo configure:20816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20816 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20817 if test -z "$ac_err"; then
20818   rm -rf conftest*
20819   ac_cv_header_stdc=yes
20820 else
20821   echo "$ac_err" >&5
20822   echo "configure: failed program was:" >&5
20823   cat conftest.$ac_ext >&5
20824   rm -rf conftest*
20825   ac_cv_header_stdc=no
20826 fi
20827 rm -f conftest*
20828
20829 if test $ac_cv_header_stdc = yes; then
20830   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20831 cat > conftest.$ac_ext <<EOF
20832 #line 20833 "configure"
20833 #include "confdefs.h"
20834 #include <string.h>
20835 EOF
20836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20837   egrep "memchr" >/dev/null 2>&1; then
20838   :
20839 else
20840   rm -rf conftest*
20841   ac_cv_header_stdc=no
20842 fi
20843 rm -f conftest*
20844
20845 fi
20846
20847 if test $ac_cv_header_stdc = yes; then
20848   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20849 cat > conftest.$ac_ext <<EOF
20850 #line 20851 "configure"
20851 #include "confdefs.h"
20852 #include <stdlib.h>
20853 EOF
20854 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20855   egrep "free" >/dev/null 2>&1; then
20856   :
20857 else
20858   rm -rf conftest*
20859   ac_cv_header_stdc=no
20860 fi
20861 rm -f conftest*
20862
20863 fi
20864
20865 if test $ac_cv_header_stdc = yes; then
20866   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20867 if test "$cross_compiling" = yes; then
20868   :
20869 else
20870   cat > conftest.$ac_ext <<EOF
20871 #line 20872 "configure"
20872 #include "confdefs.h"
20873 #include <ctype.h>
20874 #if ((' ' & 0x0FF) == 0x020)
20875 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20876 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20877 #else
20878 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20879  || ('j' <= (c) && (c) <= 'r') \
20880  || ('s' <= (c) && (c) <= 'z'))
20881 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20882 #endif
20883 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20884 int main () { int i; for (i = 0; i < 256; i++)
20885 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20886 exit (0); }
20887
20888 EOF
20889 if { (eval echo configure:20890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20890 then
20891   :
20892 else
20893   echo "configure: failed program was:" >&5
20894   cat conftest.$ac_ext >&5
20895   rm -fr conftest*
20896   ac_cv_header_stdc=no
20897 fi
20898 rm -fr conftest*
20899 fi
20900
20901 fi
20902 fi
20903
20904 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20905 if test $ac_cv_header_stdc = yes; then
20906   cat >> confdefs.h <<\EOF
20907 #define STDC_HEADERS 1
20908 EOF
20909
20910 fi
20911
20912 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20913 echo "configure:20914: checking for mode_t" >&5
20914 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20915   echo $ac_n "(cached) $ac_c" 1>&6
20916 else
20917   cat > conftest.$ac_ext <<EOF
20918 #line 20919 "configure"
20919 #include "confdefs.h"
20920 #include <sys/types.h>
20921 #if STDC_HEADERS
20922 #include <stdlib.h>
20923 #include <stddef.h>
20924 #endif
20925
20926 EOF
20927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20928   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20929   rm -rf conftest*
20930   eval "ac_cv_type_mode_t=yes"
20931 else
20932   rm -rf conftest*
20933   eval "ac_cv_type_mode_t=no"
20934 fi
20935 rm -f conftest*
20936
20937 fi
20938 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20939   echo "$ac_t""yes" 1>&6
20940 else
20941   echo "$ac_t""no" 1>&6
20942   cat >> confdefs.h <<EOF
20943 #define mode_t int
20944 EOF
20945
20946 fi
20947
20948 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20949 echo "configure:20950: checking for off_t" >&5
20950 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20951   echo $ac_n "(cached) $ac_c" 1>&6
20952 else
20953   cat > conftest.$ac_ext <<EOF
20954 #line 20955 "configure"
20955 #include "confdefs.h"
20956 #include <sys/types.h>
20957 #if STDC_HEADERS
20958 #include <stdlib.h>
20959 #include <stddef.h>
20960 #endif
20961
20962 EOF
20963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20964   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20965   rm -rf conftest*
20966   eval "ac_cv_type_off_t=yes"
20967 else
20968   rm -rf conftest*
20969   eval "ac_cv_type_off_t=no"
20970 fi
20971 rm -f conftest*
20972
20973 fi
20974 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20975   echo "$ac_t""yes" 1>&6
20976 else
20977   echo "$ac_t""no" 1>&6
20978   cat >> confdefs.h <<EOF
20979 #define off_t long
20980 EOF
20981
20982 fi
20983
20984 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20985 echo "configure:20986: checking for pid_t" >&5
20986 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20987   echo $ac_n "(cached) $ac_c" 1>&6
20988 else
20989   cat > conftest.$ac_ext <<EOF
20990 #line 20991 "configure"
20991 #include "confdefs.h"
20992 #include <sys/types.h>
20993 #if STDC_HEADERS
20994 #include <stdlib.h>
20995 #include <stddef.h>
20996 #endif
20997
20998 EOF
20999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21000   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21001   rm -rf conftest*
21002   eval "ac_cv_type_pid_t=yes"
21003 else
21004   rm -rf conftest*
21005   eval "ac_cv_type_pid_t=no"
21006 fi
21007 rm -f conftest*
21008
21009 fi
21010 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21011   echo "$ac_t""yes" 1>&6
21012 else
21013   echo "$ac_t""no" 1>&6
21014   cat >> confdefs.h <<EOF
21015 #define pid_t int
21016 EOF
21017
21018 fi
21019
21020 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21021 echo "configure:21022: checking for ptrdiff_t" >&5
21022 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21023   echo $ac_n "(cached) $ac_c" 1>&6
21024 else
21025   cat > conftest.$ac_ext <<EOF
21026 #line 21027 "configure"
21027 #include "confdefs.h"
21028 #include <stddef.h>
21029 int main() {
21030 ptrdiff_t p
21031 ; return 0; }
21032 EOF
21033 if { (eval echo configure:21034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21034   rm -rf conftest*
21035   am_cv_type_ptrdiff_t=yes
21036 else
21037   echo "configure: failed program was:" >&5
21038   cat conftest.$ac_ext >&5
21039   rm -rf conftest*
21040   am_cv_type_ptrdiff_t=no
21041 fi
21042 rm -f conftest*
21043 fi
21044
21045 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21046    if test $am_cv_type_ptrdiff_t = yes; then
21047      cat >> confdefs.h <<\EOF
21048 #define HAVE_PTRDIFF_T 1
21049 EOF
21050
21051    fi
21052
21053 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21054 echo "configure:21055: checking return type of signal handlers" >&5
21055 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21056   echo $ac_n "(cached) $ac_c" 1>&6
21057 else
21058   cat > conftest.$ac_ext <<EOF
21059 #line 21060 "configure"
21060 #include "confdefs.h"
21061 #include <sys/types.h>
21062 #include <signal.h>
21063 #ifdef signal
21064 #undef signal
21065 #endif
21066 #ifdef __cplusplus
21067 extern "C" void (*signal (int, void (*)(int)))(int);
21068 #else
21069 void (*signal ()) ();
21070 #endif
21071
21072 int main() {
21073 int i;
21074 ; return 0; }
21075 EOF
21076 if { (eval echo configure:21077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21077   rm -rf conftest*
21078   ac_cv_type_signal=void
21079 else
21080   echo "configure: failed program was:" >&5
21081   cat conftest.$ac_ext >&5
21082   rm -rf conftest*
21083   ac_cv_type_signal=int
21084 fi
21085 rm -f conftest*
21086 fi
21087
21088 echo "$ac_t""$ac_cv_type_signal" 1>&6
21089 cat >> confdefs.h <<EOF
21090 #define RETSIGTYPE $ac_cv_type_signal
21091 EOF
21092
21093
21094 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21095 echo "configure:21096: checking for size_t" >&5
21096 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21097   echo $ac_n "(cached) $ac_c" 1>&6
21098 else
21099   cat > conftest.$ac_ext <<EOF
21100 #line 21101 "configure"
21101 #include "confdefs.h"
21102 #include <sys/types.h>
21103 #if STDC_HEADERS
21104 #include <stdlib.h>
21105 #include <stddef.h>
21106 #endif
21107
21108 EOF
21109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21110   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21111   rm -rf conftest*
21112   eval "ac_cv_type_size_t=yes"
21113 else
21114   rm -rf conftest*
21115   eval "ac_cv_type_size_t=no"
21116 fi
21117 rm -f conftest*
21118
21119 fi
21120 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21121   echo "$ac_t""yes" 1>&6
21122 else
21123   echo "$ac_t""no" 1>&6
21124   cat >> confdefs.h <<EOF
21125 #define size_t unsigned
21126 EOF
21127
21128 fi
21129
21130
21131 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21132 echo "configure:21133: checking for ssize_t" >&5
21133 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21134   echo $ac_n "(cached) $ac_c" 1>&6
21135 else
21136   cat > conftest.$ac_ext <<EOF
21137 #line 21138 "configure"
21138 #include "confdefs.h"
21139 #include <sys/types.h>
21140 #if STDC_HEADERS
21141 #include <stdlib.h>
21142 #include <stddef.h>
21143 #endif
21144
21145 EOF
21146 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21147   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21148   rm -rf conftest*
21149   eval "ac_cv_type_ssize_t=yes"
21150 else
21151   rm -rf conftest*
21152   eval "ac_cv_type_ssize_t=no"
21153 fi
21154 rm -f conftest*
21155
21156 fi
21157 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21158   echo "$ac_t""yes" 1>&6
21159 else
21160   echo "$ac_t""no" 1>&6
21161   cat >> confdefs.h <<EOF
21162 #define ssize_t signed int
21163 EOF
21164
21165 fi
21166
21167 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21168 echo "configure:21169: checking for caddr_t" >&5
21169 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21170   echo $ac_n "(cached) $ac_c" 1>&6
21171 else
21172   cat > conftest.$ac_ext <<EOF
21173 #line 21174 "configure"
21174 #include "confdefs.h"
21175 #include <sys/types.h>
21176 #if STDC_HEADERS
21177 #include <stdlib.h>
21178 #include <stddef.h>
21179 #endif
21180
21181 EOF
21182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21183   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21184   rm -rf conftest*
21185   eval "ac_cv_type_caddr_t=yes"
21186 else
21187   rm -rf conftest*
21188   eval "ac_cv_type_caddr_t=no"
21189 fi
21190 rm -f conftest*
21191
21192 fi
21193 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21194   echo "$ac_t""yes" 1>&6
21195 else
21196   echo "$ac_t""no" 1>&6
21197   cat >> confdefs.h <<EOF
21198 #define caddr_t char *
21199 EOF
21200
21201 fi
21202
21203
21204 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21205 echo "configure:21206: checking for socklen_t" >&5
21206 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21207   echo $ac_n "(cached) $ac_c" 1>&6
21208 else
21209   cat > conftest.$ac_ext <<EOF
21210 #line 21211 "configure"
21211 #include "confdefs.h"
21212
21213 #ifdef HAVE_SYS_TYPES_H
21214 #include <sys/types.h>
21215 #endif
21216 #ifdef HAVE_SYS_SOCKET_H
21217 #include <sys/socket.h>
21218 #endif
21219
21220 int main() {
21221 socklen_t len;
21222 ; return 0; }
21223 EOF
21224 if { (eval echo configure:21225: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21225   rm -rf conftest*
21226   ol_cv_type_socklen_t=yes
21227 else
21228   echo "configure: failed program was:" >&5
21229   cat conftest.$ac_ext >&5
21230   rm -rf conftest*
21231   ol_cv_type_socklen_t=no
21232 fi
21233 rm -f conftest*
21234 fi
21235
21236 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21237   if test $ol_cv_type_socklen_t = no; then
21238     cat >> confdefs.h <<\EOF
21239 #define socklen_t int
21240 EOF
21241
21242   fi
21243  
21244 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21245 echo "configure:21246: checking for member st_blksize in aggregate type struct stat" >&5
21246 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21247   echo $ac_n "(cached) $ac_c" 1>&6
21248 else
21249   cat > conftest.$ac_ext <<EOF
21250 #line 21251 "configure"
21251 #include "confdefs.h"
21252 #include <sys/types.h>
21253 #include <sys/stat.h>
21254 int main() {
21255 struct stat foo; foo.st_blksize;
21256 ; return 0; }
21257 EOF
21258 if { (eval echo configure:21259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21259   rm -rf conftest*
21260   ac_cv_c_struct_member_st_blksize=yes
21261 else
21262   echo "configure: failed program was:" >&5
21263   cat conftest.$ac_ext >&5
21264   rm -rf conftest*
21265   ac_cv_c_struct_member_st_blksize=no
21266 fi
21267 rm -f conftest*
21268 fi
21269
21270 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21271 st_blksize="$ac_cv_c_struct_member_st_blksize"
21272 if test $ac_cv_c_struct_member_st_blksize = yes; then
21273   cat >> confdefs.h <<\EOF
21274 #define HAVE_ST_BLKSIZE 1
21275 EOF
21276
21277 fi
21278
21279 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21280 echo "configure:21281: checking whether time.h and sys/time.h may both be included" >&5
21281 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21282   echo $ac_n "(cached) $ac_c" 1>&6
21283 else
21284   cat > conftest.$ac_ext <<EOF
21285 #line 21286 "configure"
21286 #include "confdefs.h"
21287 #include <sys/types.h>
21288 #include <sys/time.h>
21289 #include <time.h>
21290 int main() {
21291 struct tm *tp;
21292 ; return 0; }
21293 EOF
21294 if { (eval echo configure:21295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21295   rm -rf conftest*
21296   ac_cv_header_time=yes
21297 else
21298   echo "configure: failed program was:" >&5
21299   cat conftest.$ac_ext >&5
21300   rm -rf conftest*
21301   ac_cv_header_time=no
21302 fi
21303 rm -f conftest*
21304 fi
21305
21306 echo "$ac_t""$ac_cv_header_time" 1>&6
21307 if test $ac_cv_header_time = yes; then
21308   cat >> confdefs.h <<\EOF
21309 #define TIME_WITH_SYS_TIME 1
21310 EOF
21311
21312 fi
21313
21314 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21315 echo "configure:21316: checking whether struct tm is in sys/time.h or time.h" >&5
21316 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21317   echo $ac_n "(cached) $ac_c" 1>&6
21318 else
21319   cat > conftest.$ac_ext <<EOF
21320 #line 21321 "configure"
21321 #include "confdefs.h"
21322 #include <sys/types.h>
21323 #include <time.h>
21324 int main() {
21325 struct tm *tp; tp->tm_sec;
21326 ; return 0; }
21327 EOF
21328 if { (eval echo configure:21329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21329   rm -rf conftest*
21330   ac_cv_struct_tm=time.h
21331 else
21332   echo "configure: failed program was:" >&5
21333   cat conftest.$ac_ext >&5
21334   rm -rf conftest*
21335   ac_cv_struct_tm=sys/time.h
21336 fi
21337 rm -f conftest*
21338 fi
21339
21340 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21341 if test $ac_cv_struct_tm = sys/time.h; then
21342   cat >> confdefs.h <<\EOF
21343 #define TM_IN_SYS_TIME 1
21344 EOF
21345
21346 fi
21347
21348 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21349 echo "configure:21350: checking for uid_t in sys/types.h" >&5
21350 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21351   echo $ac_n "(cached) $ac_c" 1>&6
21352 else
21353   cat > conftest.$ac_ext <<EOF
21354 #line 21355 "configure"
21355 #include "confdefs.h"
21356 #include <sys/types.h>
21357 EOF
21358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21359   egrep "uid_t" >/dev/null 2>&1; then
21360   rm -rf conftest*
21361   ac_cv_type_uid_t=yes
21362 else
21363   rm -rf conftest*
21364   ac_cv_type_uid_t=no
21365 fi
21366 rm -f conftest*
21367
21368 fi
21369
21370 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21371 if test $ac_cv_type_uid_t = no; then
21372   cat >> confdefs.h <<\EOF
21373 #define uid_t int
21374 EOF
21375
21376   cat >> confdefs.h <<\EOF
21377 #define gid_t int
21378 EOF
21379
21380 fi
21381
21382 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21383 echo "configure:21384: checking for sig_atomic_t" >&5
21384 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21385   echo $ac_n "(cached) $ac_c" 1>&6
21386 else
21387   cat > conftest.$ac_ext <<EOF
21388 #line 21389 "configure"
21389 #include "confdefs.h"
21390 #include <signal.h>
21391 int main() {
21392 sig_atomic_t atomic;
21393 ; return 0; }
21394 EOF
21395 if { (eval echo configure:21396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21396   rm -rf conftest*
21397   ol_cv_type_sig_atomic_t=yes
21398 else
21399   echo "configure: failed program was:" >&5
21400   cat conftest.$ac_ext >&5
21401   rm -rf conftest*
21402   ol_cv_type_sig_atomic_t=no
21403 fi
21404 rm -f conftest*
21405 fi
21406
21407 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21408   if test $ol_cv_type_sig_atomic_t = no; then
21409     cat >> confdefs.h <<\EOF
21410 #define sig_atomic_t int
21411 EOF
21412
21413   fi
21414  
21415
21416
21417 # test for pw_gecos in struct passwd
21418 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21419 echo "configure:21420: checking struct passwd for pw_gecos" >&5
21420 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21421   echo $ac_n "(cached) $ac_c" 1>&6
21422 else
21423   
21424         cat > conftest.$ac_ext <<EOF
21425 #line 21426 "configure"
21426 #include "confdefs.h"
21427 #include <pwd.h>
21428 int main() {
21429
21430         struct passwd pwd;
21431         pwd.pw_gecos = pwd.pw_name;
21432
21433 ; return 0; }
21434 EOF
21435 if { (eval echo configure:21436: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21436   rm -rf conftest*
21437   ol_cv_struct_passwd_pw_gecos=yes
21438 else
21439   echo "configure: failed program was:" >&5
21440   cat conftest.$ac_ext >&5
21441   rm -rf conftest*
21442   ol_cv_struct_passwd_pw_gecos=no
21443 fi
21444 rm -f conftest*
21445 fi
21446
21447 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21448 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21449         cat >> confdefs.h <<\EOF
21450 #define HAVE_PW_GECOS 1
21451 EOF
21452
21453 fi
21454
21455 # test for pw_passwd in struct passwd
21456 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21457 echo "configure:21458: checking struct passwd for pw_passwd" >&5
21458 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21459   echo $ac_n "(cached) $ac_c" 1>&6
21460 else
21461   
21462         cat > conftest.$ac_ext <<EOF
21463 #line 21464 "configure"
21464 #include "confdefs.h"
21465 #include <pwd.h>
21466 int main() {
21467
21468         struct passwd pwd;
21469         pwd.pw_passwd = pwd.pw_name;
21470
21471 ; return 0; }
21472 EOF
21473 if { (eval echo configure:21474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21474   rm -rf conftest*
21475   ol_cv_struct_passwd_pw_passwd=yes
21476 else
21477   echo "configure: failed program was:" >&5
21478   cat conftest.$ac_ext >&5
21479   rm -rf conftest*
21480   ol_cv_struct_passwd_pw_passwd=no
21481 fi
21482 rm -f conftest*
21483 fi
21484
21485 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21486 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21487         cat >> confdefs.h <<\EOF
21488 #define HAVE_PW_PASSWD 1
21489 EOF
21490
21491 fi
21492
21493
21494 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21495 echo "configure:21496: checking if toupper() requires islower()" >&5
21496 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21497   echo $ac_n "(cached) $ac_c" 1>&6
21498 else
21499   
21500         if test "$cross_compiling" = yes; then
21501   ol_cv_c_upper_lower=safe
21502 else
21503   cat > conftest.$ac_ext <<EOF
21504 #line 21505 "configure"
21505 #include "confdefs.h"
21506
21507 #include <ctype.h>
21508 main()
21509 {
21510         if ('C' == toupper('C'))
21511                 exit(0);
21512         else
21513                 exit(1);
21514 }
21515 EOF
21516 if { (eval echo configure:21517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21517 then
21518   ol_cv_c_upper_lower=no
21519 else
21520   echo "configure: failed program was:" >&5
21521   cat conftest.$ac_ext >&5
21522   rm -fr conftest*
21523   ol_cv_c_upper_lower=yes
21524 fi
21525 rm -fr conftest*
21526 fi
21527
21528 fi
21529
21530 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21531 if test $ol_cv_c_upper_lower != no ; then
21532         cat >> confdefs.h <<\EOF
21533 #define C_UPPER_LOWER 1
21534 EOF
21535
21536 fi
21537
21538 echo $ac_n "checking for working const""... $ac_c" 1>&6
21539 echo "configure:21540: checking for working const" >&5
21540 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21541   echo $ac_n "(cached) $ac_c" 1>&6
21542 else
21543   cat > conftest.$ac_ext <<EOF
21544 #line 21545 "configure"
21545 #include "confdefs.h"
21546
21547 int main() {
21548
21549 /* Ultrix mips cc rejects this.  */
21550 typedef int charset[2]; const charset x;
21551 /* SunOS 4.1.1 cc rejects this.  */
21552 char const *const *ccp;
21553 char **p;
21554 /* NEC SVR4.0.2 mips cc rejects this.  */
21555 struct point {int x, y;};
21556 static struct point const zero = {0,0};
21557 /* AIX XL C 1.02.0.0 rejects this.
21558    It does not let you subtract one const X* pointer from another in an arm
21559    of an if-expression whose if-part is not a constant expression */
21560 const char *g = "string";
21561 ccp = &g + (g ? g-g : 0);
21562 /* HPUX 7.0 cc rejects these. */
21563 ++ccp;
21564 p = (char**) ccp;
21565 ccp = (char const *const *) p;
21566 { /* SCO 3.2v4 cc rejects this.  */
21567   char *t;
21568   char const *s = 0 ? (char *) 0 : (char const *) 0;
21569
21570   *t++ = 0;
21571 }
21572 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21573   int x[] = {25, 17};
21574   const int *foo = &x[0];
21575   ++foo;
21576 }
21577 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21578   typedef const int *iptr;
21579   iptr p = 0;
21580   ++p;
21581 }
21582 { /* AIX XL C 1.02.0.0 rejects this saying
21583      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21584   struct s { int j; const int *ap[3]; };
21585   struct s *b; b->j = 5;
21586 }
21587 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21588   const int foo = 10;
21589 }
21590
21591 ; return 0; }
21592 EOF
21593 if { (eval echo configure:21594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21594   rm -rf conftest*
21595   ac_cv_c_const=yes
21596 else
21597   echo "configure: failed program was:" >&5
21598   cat conftest.$ac_ext >&5
21599   rm -rf conftest*
21600   ac_cv_c_const=no
21601 fi
21602 rm -f conftest*
21603 fi
21604
21605 echo "$ac_t""$ac_cv_c_const" 1>&6
21606 if test $ac_cv_c_const = no; then
21607   cat >> confdefs.h <<\EOF
21608 #define const 
21609 EOF
21610
21611 fi
21612
21613 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21614 echo "configure:21615: checking if compiler understands volatile" >&5
21615 if eval "test \"\${ol_cv_c_volatile+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 int x, y, z;
21622 int main() {
21623 volatile int a; int * volatile b = x ? &y : &z;
21624       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21625       *b = 0;
21626 ; return 0; }
21627 EOF
21628 if { (eval echo configure:21629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21629   rm -rf conftest*
21630   ol_cv_c_volatile=yes
21631 else
21632   echo "configure: failed program was:" >&5
21633   cat conftest.$ac_ext >&5
21634   rm -rf conftest*
21635   ol_cv_c_volatile=no
21636 fi
21637 rm -f conftest*
21638 fi
21639
21640 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21641   if test $ol_cv_c_volatile = yes; then
21642     : 
21643   else
21644     cat >> confdefs.h <<\EOF
21645 #define volatile 
21646 EOF
21647
21648   fi
21649  
21650
21651 if test $cross_compiling = yes ; then
21652         cat >> confdefs.h <<\EOF
21653 #define CROSS_COMPILING 1
21654 EOF
21655
21656 else
21657         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21658 echo "configure:21659: checking whether byte ordering is bigendian" >&5
21659 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21660   echo $ac_n "(cached) $ac_c" 1>&6
21661 else
21662   ac_cv_c_bigendian=unknown
21663 # See if sys/param.h defines the BYTE_ORDER macro.
21664 cat > conftest.$ac_ext <<EOF
21665 #line 21666 "configure"
21666 #include "confdefs.h"
21667 #include <sys/types.h>
21668 #include <sys/param.h>
21669 int main() {
21670
21671 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21672  bogus endian macros
21673 #endif
21674 ; return 0; }
21675 EOF
21676 if { (eval echo configure:21677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21677   rm -rf conftest*
21678   # It does; now see whether it defined to BIG_ENDIAN or not.
21679 cat > conftest.$ac_ext <<EOF
21680 #line 21681 "configure"
21681 #include "confdefs.h"
21682 #include <sys/types.h>
21683 #include <sys/param.h>
21684 int main() {
21685
21686 #if BYTE_ORDER != BIG_ENDIAN
21687  not big endian
21688 #endif
21689 ; return 0; }
21690 EOF
21691 if { (eval echo configure:21692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21692   rm -rf conftest*
21693   ac_cv_c_bigendian=yes
21694 else
21695   echo "configure: failed program was:" >&5
21696   cat conftest.$ac_ext >&5
21697   rm -rf conftest*
21698   ac_cv_c_bigendian=no
21699 fi
21700 rm -f conftest*
21701 else
21702   echo "configure: failed program was:" >&5
21703   cat conftest.$ac_ext >&5
21704 fi
21705 rm -f conftest*
21706 if test $ac_cv_c_bigendian = unknown; then
21707 if test "$cross_compiling" = yes; then
21708     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21709 else
21710   cat > conftest.$ac_ext <<EOF
21711 #line 21712 "configure"
21712 #include "confdefs.h"
21713 main () {
21714   /* Are we little or big endian?  From Harbison&Steele.  */
21715   union
21716   {
21717     long l;
21718     char c[sizeof (long)];
21719   } u;
21720   u.l = 1;
21721   exit (u.c[sizeof (long) - 1] == 1);
21722 }
21723 EOF
21724 if { (eval echo configure:21725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21725 then
21726   ac_cv_c_bigendian=no
21727 else
21728   echo "configure: failed program was:" >&5
21729   cat conftest.$ac_ext >&5
21730   rm -fr conftest*
21731   ac_cv_c_bigendian=yes
21732 fi
21733 rm -fr conftest*
21734 fi
21735
21736 fi
21737 fi
21738
21739 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21740 if test $ac_cv_c_bigendian = yes; then
21741   cat >> confdefs.h <<\EOF
21742 #define WORDS_BIGENDIAN 1
21743 EOF
21744
21745 fi
21746
21747 fi
21748
21749 echo $ac_n "checking size of short""... $ac_c" 1>&6
21750 echo "configure:21751: checking size of short" >&5 
21751 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21752   echo $ac_n "(cached) $ac_c" 1>&6
21753 else
21754   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21755   cat > conftest.$ac_ext <<EOF
21756 #line 21757 "configure"
21757 #include "confdefs.h"
21758 #include "confdefs.h" 
21759 #include <sys/types.h> 
21760  
21761
21762 int main() {
21763 switch (0) case 0: case (sizeof (short) == $ac_size):;
21764 ; return 0; }
21765 EOF
21766 if { (eval echo configure:21767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21767   rm -rf conftest*
21768   ac_cv_sizeof_short=$ac_size
21769 else
21770   echo "configure: failed program was:" >&5
21771   cat conftest.$ac_ext >&5
21772 fi
21773 rm -f conftest* 
21774   if test x$ac_cv_sizeof_short != x ; then break; fi 
21775 done 
21776
21777 fi
21778  
21779 if test x$ac_cv_sizeof_short = x ; then 
21780   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21781 fi 
21782 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21783 cat >> confdefs.h <<EOF
21784 #define SIZEOF_SHORT $ac_cv_sizeof_short
21785 EOF
21786  
21787  
21788 echo $ac_n "checking size of int""... $ac_c" 1>&6
21789 echo "configure:21790: checking size of int" >&5 
21790 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21791   echo $ac_n "(cached) $ac_c" 1>&6
21792 else
21793   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21794   cat > conftest.$ac_ext <<EOF
21795 #line 21796 "configure"
21796 #include "confdefs.h"
21797 #include "confdefs.h" 
21798 #include <sys/types.h> 
21799  
21800
21801 int main() {
21802 switch (0) case 0: case (sizeof (int) == $ac_size):;
21803 ; return 0; }
21804 EOF
21805 if { (eval echo configure:21806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21806   rm -rf conftest*
21807   ac_cv_sizeof_int=$ac_size
21808 else
21809   echo "configure: failed program was:" >&5
21810   cat conftest.$ac_ext >&5
21811 fi
21812 rm -f conftest* 
21813   if test x$ac_cv_sizeof_int != x ; then break; fi 
21814 done 
21815
21816 fi
21817  
21818 if test x$ac_cv_sizeof_int = x ; then 
21819   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21820 fi 
21821 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21822 cat >> confdefs.h <<EOF
21823 #define SIZEOF_INT $ac_cv_sizeof_int
21824 EOF
21825  
21826  
21827 echo $ac_n "checking size of long""... $ac_c" 1>&6
21828 echo "configure:21829: checking size of long" >&5 
21829 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21830   echo $ac_n "(cached) $ac_c" 1>&6
21831 else
21832   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21833   cat > conftest.$ac_ext <<EOF
21834 #line 21835 "configure"
21835 #include "confdefs.h"
21836 #include "confdefs.h" 
21837 #include <sys/types.h> 
21838  
21839
21840 int main() {
21841 switch (0) case 0: case (sizeof (long) == $ac_size):;
21842 ; return 0; }
21843 EOF
21844 if { (eval echo configure:21845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21845   rm -rf conftest*
21846   ac_cv_sizeof_long=$ac_size
21847 else
21848   echo "configure: failed program was:" >&5
21849   cat conftest.$ac_ext >&5
21850 fi
21851 rm -f conftest* 
21852   if test x$ac_cv_sizeof_long != x ; then break; fi 
21853 done 
21854
21855 fi
21856  
21857 if test x$ac_cv_sizeof_long = x ; then 
21858   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21859 fi 
21860 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21861 cat >> confdefs.h <<EOF
21862 #define SIZEOF_LONG $ac_cv_sizeof_long
21863 EOF
21864  
21865
21866
21867 if test "$ac_cv_sizeof_int" -lt 4 ; then
21868         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21869
21870         cat >> confdefs.h <<\EOF
21871 #define LBER_INT_T long
21872 EOF
21873
21874 else
21875         cat >> confdefs.h <<\EOF
21876 #define LBER_INT_T int
21877 EOF
21878
21879 fi
21880
21881 cat >> confdefs.h <<\EOF
21882 #define LBER_LEN_T long
21883 EOF
21884
21885 cat >> confdefs.h <<\EOF
21886 #define LBER_SOCKET_T int
21887 EOF
21888
21889 cat >> confdefs.h <<\EOF
21890 #define LBER_TAG_T long
21891 EOF
21892
21893
21894 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21895 echo "configure:21896: checking for 8-bit clean memcmp" >&5
21896 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21897   echo $ac_n "(cached) $ac_c" 1>&6
21898 else
21899   if test "$cross_compiling" = yes; then
21900   ac_cv_func_memcmp_clean=no
21901 else
21902   cat > conftest.$ac_ext <<EOF
21903 #line 21904 "configure"
21904 #include "confdefs.h"
21905
21906 main()
21907 {
21908   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21909   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21910 }
21911
21912 EOF
21913 if { (eval echo configure:21914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21914 then
21915   ac_cv_func_memcmp_clean=yes
21916 else
21917   echo "configure: failed program was:" >&5
21918   cat conftest.$ac_ext >&5
21919   rm -fr conftest*
21920   ac_cv_func_memcmp_clean=no
21921 fi
21922 rm -fr conftest*
21923 fi
21924
21925 fi
21926
21927 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21928 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21929
21930 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21931 echo "configure:21932: checking for strftime" >&5
21932 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21933   echo $ac_n "(cached) $ac_c" 1>&6
21934 else
21935   cat > conftest.$ac_ext <<EOF
21936 #line 21937 "configure"
21937 #include "confdefs.h"
21938 /* System header to define __stub macros and hopefully few prototypes,
21939     which can conflict with char strftime(); below.  */
21940 #include <assert.h>
21941 /* Override any gcc2 internal prototype to avoid an error.  */
21942 /* We use char because int might match the return type of a gcc2
21943     builtin and then its argument prototype would still apply.  */
21944 char strftime();
21945 char (*f)();
21946
21947 int main() {
21948
21949 /* The GNU C library defines this for functions which it implements
21950     to always fail with ENOSYS.  Some functions are actually named
21951     something starting with __ and the normal name is an alias.  */
21952 #if defined (__stub_strftime) || defined (__stub___strftime)
21953 choke me
21954 #else
21955 f = strftime;
21956 #endif
21957
21958 ; return 0; }
21959 EOF
21960 if { (eval echo configure:21961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21961   rm -rf conftest*
21962   eval "ac_cv_func_strftime=yes"
21963 else
21964   echo "configure: failed program was:" >&5
21965   cat conftest.$ac_ext >&5
21966   rm -rf conftest*
21967   eval "ac_cv_func_strftime=no"
21968 fi
21969 rm -f conftest*
21970 fi
21971
21972 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21973   echo "$ac_t""yes" 1>&6
21974   cat >> confdefs.h <<\EOF
21975 #define HAVE_STRFTIME 1
21976 EOF
21977
21978 else
21979   echo "$ac_t""no" 1>&6
21980 # strftime is in -lintl on SCO UNIX.
21981 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21982 echo "configure:21983: checking for strftime in -lintl" >&5
21983 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21985   echo $ac_n "(cached) $ac_c" 1>&6
21986 else
21987   ac_save_LIBS="$LIBS"
21988 LIBS="-lintl  $LIBS"
21989 cat > conftest.$ac_ext <<EOF
21990 #line 21991 "configure"
21991 #include "confdefs.h"
21992 /* Override any gcc2 internal prototype to avoid an error.  */
21993 /* We use char because int might match the return type of a gcc2
21994     builtin and then its argument prototype would still apply.  */
21995 char strftime();
21996
21997 int main() {
21998 strftime()
21999 ; return 0; }
22000 EOF
22001 if { (eval echo configure:22002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22002   rm -rf conftest*
22003   eval "ac_cv_lib_$ac_lib_var=yes"
22004 else
22005   echo "configure: failed program was:" >&5
22006   cat conftest.$ac_ext >&5
22007   rm -rf conftest*
22008   eval "ac_cv_lib_$ac_lib_var=no"
22009 fi
22010 rm -f conftest*
22011 LIBS="$ac_save_LIBS"
22012
22013 fi
22014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22015   echo "$ac_t""yes" 1>&6
22016   cat >> confdefs.h <<\EOF
22017 #define HAVE_STRFTIME 1
22018 EOF
22019
22020 LIBS="-lintl $LIBS"
22021 else
22022   echo "$ac_t""no" 1>&6
22023 fi
22024
22025 fi
22026
22027
22028 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22029 echo "configure:22030: checking for inet_aton()" >&5
22030 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22031   echo $ac_n "(cached) $ac_c" 1>&6
22032 else
22033   cat > conftest.$ac_ext <<EOF
22034 #line 22035 "configure"
22035 #include "confdefs.h"
22036
22037 #ifdef HAVE_SYS_TYPES_H
22038 #       include <sys/types.h>
22039 #endif
22040 #ifdef HAVE_SYS_SOCKET_H
22041 #       include <sys/socket.h>
22042 #       ifdef HAVE_SYS_SELECT_H
22043 #               include <sys/select.h>
22044 #       endif
22045 #       include <netinet/in.h>
22046 #       ifdef HAVE_ARPA_INET_H
22047 #               include <arpa/inet.h>
22048 #       endif
22049 #endif
22050
22051 int main() {
22052 struct in_addr in;
22053 int rc = inet_aton( "255.255.255.255", &in );
22054 ; return 0; }
22055 EOF
22056 if { (eval echo configure:22057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22057   rm -rf conftest*
22058   ol_cv_func_inet_aton=yes
22059 else
22060   echo "configure: failed program was:" >&5
22061   cat conftest.$ac_ext >&5
22062   rm -rf conftest*
22063   ol_cv_func_inet_aton=no
22064 fi
22065 rm -f conftest*
22066 fi
22067
22068 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22069   if test $ol_cv_func_inet_aton != no; then
22070     cat >> confdefs.h <<\EOF
22071 #define HAVE_INET_ATON 1
22072 EOF
22073
22074   fi
22075  
22076
22077 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22078 echo "configure:22079: checking for _spawnlp" >&5
22079 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22080   echo $ac_n "(cached) $ac_c" 1>&6
22081 else
22082   cat > conftest.$ac_ext <<EOF
22083 #line 22084 "configure"
22084 #include "confdefs.h"
22085 /* System header to define __stub macros and hopefully few prototypes,
22086     which can conflict with char _spawnlp(); below.  */
22087 #include <assert.h>
22088 /* Override any gcc2 internal prototype to avoid an error.  */
22089 /* We use char because int might match the return type of a gcc2
22090     builtin and then its argument prototype would still apply.  */
22091 char _spawnlp();
22092 char (*f)();
22093
22094 int main() {
22095
22096 /* The GNU C library defines this for functions which it implements
22097     to always fail with ENOSYS.  Some functions are actually named
22098     something starting with __ and the normal name is an alias.  */
22099 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22100 choke me
22101 #else
22102 f = _spawnlp;
22103 #endif
22104
22105 ; return 0; }
22106 EOF
22107 if { (eval echo configure:22108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22108   rm -rf conftest*
22109   eval "ac_cv_func__spawnlp=yes"
22110 else
22111   echo "configure: failed program was:" >&5
22112   cat conftest.$ac_ext >&5
22113   rm -rf conftest*
22114   eval "ac_cv_func__spawnlp=no"
22115 fi
22116 rm -f conftest*
22117 fi
22118
22119 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22120   echo "$ac_t""yes" 1>&6
22121   cat >> confdefs.h <<\EOF
22122 #define HAVE_SPAWNLP 1
22123 EOF
22124
22125 else
22126   echo "$ac_t""no" 1>&6
22127 fi
22128
22129
22130 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22131 echo "configure:22132: checking for _snprintf" >&5
22132 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22133   echo $ac_n "(cached) $ac_c" 1>&6
22134 else
22135   cat > conftest.$ac_ext <<EOF
22136 #line 22137 "configure"
22137 #include "confdefs.h"
22138 /* System header to define __stub macros and hopefully few prototypes,
22139     which can conflict with char _snprintf(); below.  */
22140 #include <assert.h>
22141 /* Override any gcc2 internal prototype to avoid an error.  */
22142 /* We use char because int might match the return type of a gcc2
22143     builtin and then its argument prototype would still apply.  */
22144 char _snprintf();
22145 char (*f)();
22146
22147 int main() {
22148
22149 /* The GNU C library defines this for functions which it implements
22150     to always fail with ENOSYS.  Some functions are actually named
22151     something starting with __ and the normal name is an alias.  */
22152 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22153 choke me
22154 #else
22155 f = _snprintf;
22156 #endif
22157
22158 ; return 0; }
22159 EOF
22160 if { (eval echo configure:22161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22161   rm -rf conftest*
22162   eval "ac_cv_func__snprintf=yes"
22163 else
22164   echo "configure: failed program was:" >&5
22165   cat conftest.$ac_ext >&5
22166   rm -rf conftest*
22167   eval "ac_cv_func__snprintf=no"
22168 fi
22169 rm -f conftest*
22170 fi
22171
22172 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22173   echo "$ac_t""yes" 1>&6
22174   ac_cv_func_snprintf=yes
22175         cat >> confdefs.h <<\EOF
22176 #define snprintf _snprintf
22177 EOF
22178
22179
22180 else
22181   echo "$ac_t""no" 1>&6
22182 fi
22183
22184
22185 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22186 echo "configure:22187: checking for _vsnprintf" >&5
22187 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22188   echo $ac_n "(cached) $ac_c" 1>&6
22189 else
22190   cat > conftest.$ac_ext <<EOF
22191 #line 22192 "configure"
22192 #include "confdefs.h"
22193 /* System header to define __stub macros and hopefully few prototypes,
22194     which can conflict with char _vsnprintf(); below.  */
22195 #include <assert.h>
22196 /* Override any gcc2 internal prototype to avoid an error.  */
22197 /* We use char because int might match the return type of a gcc2
22198     builtin and then its argument prototype would still apply.  */
22199 char _vsnprintf();
22200 char (*f)();
22201
22202 int main() {
22203
22204 /* The GNU C library defines this for functions which it implements
22205     to always fail with ENOSYS.  Some functions are actually named
22206     something starting with __ and the normal name is an alias.  */
22207 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22208 choke me
22209 #else
22210 f = _vsnprintf;
22211 #endif
22212
22213 ; return 0; }
22214 EOF
22215 if { (eval echo configure:22216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22216   rm -rf conftest*
22217   eval "ac_cv_func__vsnprintf=yes"
22218 else
22219   echo "configure: failed program was:" >&5
22220   cat conftest.$ac_ext >&5
22221   rm -rf conftest*
22222   eval "ac_cv_func__vsnprintf=no"
22223 fi
22224 rm -f conftest*
22225 fi
22226
22227 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22228   echo "$ac_t""yes" 1>&6
22229   ac_cv_func_vsnprintf=yes
22230         cat >> confdefs.h <<\EOF
22231 #define vsnprintf _vsnprintf
22232 EOF
22233
22234
22235 else
22236   echo "$ac_t""no" 1>&6
22237 fi
22238
22239
22240 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22241 echo "configure:22242: checking for vprintf" >&5
22242 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22243   echo $ac_n "(cached) $ac_c" 1>&6
22244 else
22245   cat > conftest.$ac_ext <<EOF
22246 #line 22247 "configure"
22247 #include "confdefs.h"
22248 /* System header to define __stub macros and hopefully few prototypes,
22249     which can conflict with char vprintf(); below.  */
22250 #include <assert.h>
22251 /* Override any gcc2 internal prototype to avoid an error.  */
22252 /* We use char because int might match the return type of a gcc2
22253     builtin and then its argument prototype would still apply.  */
22254 char vprintf();
22255 char (*f)();
22256
22257 int main() {
22258
22259 /* The GNU C library defines this for functions which it implements
22260     to always fail with ENOSYS.  Some functions are actually named
22261     something starting with __ and the normal name is an alias.  */
22262 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22263 choke me
22264 #else
22265 f = vprintf;
22266 #endif
22267
22268 ; return 0; }
22269 EOF
22270 if { (eval echo configure:22271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22271   rm -rf conftest*
22272   eval "ac_cv_func_vprintf=yes"
22273 else
22274   echo "configure: failed program was:" >&5
22275   cat conftest.$ac_ext >&5
22276   rm -rf conftest*
22277   eval "ac_cv_func_vprintf=no"
22278 fi
22279 rm -f conftest*
22280 fi
22281
22282 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22283   echo "$ac_t""yes" 1>&6
22284   cat >> confdefs.h <<\EOF
22285 #define HAVE_VPRINTF 1
22286 EOF
22287
22288 else
22289   echo "$ac_t""no" 1>&6
22290 fi
22291
22292 if test "$ac_cv_func_vprintf" != yes; then
22293 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22294 echo "configure:22295: checking for _doprnt" >&5
22295 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22296   echo $ac_n "(cached) $ac_c" 1>&6
22297 else
22298   cat > conftest.$ac_ext <<EOF
22299 #line 22300 "configure"
22300 #include "confdefs.h"
22301 /* System header to define __stub macros and hopefully few prototypes,
22302     which can conflict with char _doprnt(); below.  */
22303 #include <assert.h>
22304 /* Override any gcc2 internal prototype to avoid an error.  */
22305 /* We use char because int might match the return type of a gcc2
22306     builtin and then its argument prototype would still apply.  */
22307 char _doprnt();
22308 char (*f)();
22309
22310 int main() {
22311
22312 /* The GNU C library defines this for functions which it implements
22313     to always fail with ENOSYS.  Some functions are actually named
22314     something starting with __ and the normal name is an alias.  */
22315 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22316 choke me
22317 #else
22318 f = _doprnt;
22319 #endif
22320
22321 ; return 0; }
22322 EOF
22323 if { (eval echo configure:22324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22324   rm -rf conftest*
22325   eval "ac_cv_func__doprnt=yes"
22326 else
22327   echo "configure: failed program was:" >&5
22328   cat conftest.$ac_ext >&5
22329   rm -rf conftest*
22330   eval "ac_cv_func__doprnt=no"
22331 fi
22332 rm -f conftest*
22333 fi
22334
22335 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22336   echo "$ac_t""yes" 1>&6
22337   cat >> confdefs.h <<\EOF
22338 #define HAVE_DOPRNT 1
22339 EOF
22340
22341 else
22342   echo "$ac_t""no" 1>&6
22343 fi
22344
22345 fi
22346
22347
22348 if test $ac_cv_func_vprintf = yes ; then
22349                 for ac_func in vsnprintf vsprintf
22350 do
22351 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22352 echo "configure:22353: checking for $ac_func" >&5
22353 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22354   echo $ac_n "(cached) $ac_c" 1>&6
22355 else
22356   cat > conftest.$ac_ext <<EOF
22357 #line 22358 "configure"
22358 #include "confdefs.h"
22359 /* System header to define __stub macros and hopefully few prototypes,
22360     which can conflict with char $ac_func(); below.  */
22361 #include <assert.h>
22362 /* Override any gcc2 internal prototype to avoid an error.  */
22363 /* We use char because int might match the return type of a gcc2
22364     builtin and then its argument prototype would still apply.  */
22365 char $ac_func();
22366 char (*f)();
22367
22368 int main() {
22369
22370 /* The GNU C library defines this for functions which it implements
22371     to always fail with ENOSYS.  Some functions are actually named
22372     something starting with __ and the normal name is an alias.  */
22373 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22374 choke me
22375 #else
22376 f = $ac_func;
22377 #endif
22378
22379 ; return 0; }
22380 EOF
22381 if { (eval echo configure:22382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22382   rm -rf conftest*
22383   eval "ac_cv_func_$ac_func=yes"
22384 else
22385   echo "configure: failed program was:" >&5
22386   cat conftest.$ac_ext >&5
22387   rm -rf conftest*
22388   eval "ac_cv_func_$ac_func=no"
22389 fi
22390 rm -f conftest*
22391 fi
22392
22393 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22394   echo "$ac_t""yes" 1>&6
22395     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22396   cat >> confdefs.h <<EOF
22397 #define $ac_tr_func 1
22398 EOF
22399  
22400 else
22401   echo "$ac_t""no" 1>&6
22402 fi
22403 done
22404
22405 fi
22406
22407 for ac_func in \
22408         bcopy                   \
22409         closesocket             \
22410         chroot                  \
22411         endgrent                \
22412         endpwent                \
22413         fcntl                   \
22414         flock                   \
22415         getdtablesize   \
22416         getgrgid                \
22417         gethostname             \
22418         getpass                 \
22419         getpassphrase   \
22420         getpwuid                \
22421         getpwnam                \
22422         getspnam                \
22423         gettimeofday    \
22424         initgroups              \
22425         lockf                   \
22426         memcpy                  \
22427         memmove                 \
22428         mkstemp                 \
22429         mktemp                  \
22430         pipe                    \
22431         read                    \
22432         recv                    \
22433         recvfrom                \
22434         recvmsg                 \
22435         setpwfile               \
22436         setgid                  \
22437         setegid                 \
22438         setsid                  \
22439         setuid                  \
22440         seteuid                 \
22441         sigaction               \
22442         signal                  \
22443         sigset                  \
22444         strdup                  \
22445         strerror                \
22446         strpbrk                 \
22447         strrchr                 \
22448         strsep                  \
22449         strstr                  \
22450         strtol                  \
22451         strtoul                 \
22452         strspn                  \
22453         sysconf                 \
22454         usleep                  \
22455         waitpid                 \
22456         wait4                   \
22457         write                   \
22458         send                    \
22459         sendto                  \
22460
22461 do
22462 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22463 echo "configure:22464: checking for $ac_func" >&5
22464 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22465   echo $ac_n "(cached) $ac_c" 1>&6
22466 else
22467   cat > conftest.$ac_ext <<EOF
22468 #line 22469 "configure"
22469 #include "confdefs.h"
22470 /* System header to define __stub macros and hopefully few prototypes,
22471     which can conflict with char $ac_func(); below.  */
22472 #include <assert.h>
22473 /* Override any gcc2 internal prototype to avoid an error.  */
22474 /* We use char because int might match the return type of a gcc2
22475     builtin and then its argument prototype would still apply.  */
22476 char $ac_func();
22477 char (*f)();
22478
22479 int main() {
22480
22481 /* The GNU C library defines this for functions which it implements
22482     to always fail with ENOSYS.  Some functions are actually named
22483     something starting with __ and the normal name is an alias.  */
22484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22485 choke me
22486 #else
22487 f = $ac_func;
22488 #endif
22489
22490 ; return 0; }
22491 EOF
22492 if { (eval echo configure:22493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22493   rm -rf conftest*
22494   eval "ac_cv_func_$ac_func=yes"
22495 else
22496   echo "configure: failed program was:" >&5
22497   cat conftest.$ac_ext >&5
22498   rm -rf conftest*
22499   eval "ac_cv_func_$ac_func=no"
22500 fi
22501 rm -f conftest*
22502 fi
22503
22504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22505   echo "$ac_t""yes" 1>&6
22506     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22507   cat >> confdefs.h <<EOF
22508 #define $ac_tr_func 1
22509 EOF
22510  
22511 else
22512   echo "$ac_t""no" 1>&6
22513 fi
22514 done
22515
22516
22517 for ac_func in getopt
22518 do
22519 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22520 echo "configure:22521: checking for $ac_func" >&5
22521 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22522   echo $ac_n "(cached) $ac_c" 1>&6
22523 else
22524   cat > conftest.$ac_ext <<EOF
22525 #line 22526 "configure"
22526 #include "confdefs.h"
22527 /* System header to define __stub macros and hopefully few prototypes,
22528     which can conflict with char $ac_func(); below.  */
22529 #include <assert.h>
22530 /* Override any gcc2 internal prototype to avoid an error.  */
22531 /* We use char because int might match the return type of a gcc2
22532     builtin and then its argument prototype would still apply.  */
22533 char $ac_func();
22534 char (*f)();
22535
22536 int main() {
22537
22538 /* The GNU C library defines this for functions which it implements
22539     to always fail with ENOSYS.  Some functions are actually named
22540     something starting with __ and the normal name is an alias.  */
22541 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22542 choke me
22543 #else
22544 f = $ac_func;
22545 #endif
22546
22547 ; return 0; }
22548 EOF
22549 if { (eval echo configure:22550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22550   rm -rf conftest*
22551   eval "ac_cv_func_$ac_func=yes"
22552 else
22553   echo "configure: failed program was:" >&5
22554   cat conftest.$ac_ext >&5
22555   rm -rf conftest*
22556   eval "ac_cv_func_$ac_func=no"
22557 fi
22558 rm -f conftest*
22559 fi
22560
22561 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22562   echo "$ac_t""yes" 1>&6
22563     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22564   cat >> confdefs.h <<EOF
22565 #define $ac_tr_func 1
22566 EOF
22567  
22568 else
22569   echo "$ac_t""no" 1>&6
22570 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22571 fi
22572 done
22573
22574
22575
22576 if test "$ac_cv_func_getopt" != yes; then
22577         LIBSRCS="$LIBSRCS getopt.c"
22578 fi
22579
22580 # Check Configuration
22581 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22582 echo "configure:22583: checking declaration of sys_errlist" >&5
22583 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22584   echo $ac_n "(cached) $ac_c" 1>&6
22585 else
22586   
22587         cat > conftest.$ac_ext <<EOF
22588 #line 22589 "configure"
22589 #include "confdefs.h"
22590
22591 #include <stdio.h>
22592 #include <sys/types.h>
22593 #include <errno.h>
22594 #ifdef WINNT
22595 #include <stdlib.h>
22596 #endif 
22597 int main() {
22598 char *c = (char *) *sys_errlist
22599 ; return 0; }
22600 EOF
22601 if { (eval echo configure:22602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22602   rm -rf conftest*
22603   ol_cv_dcl_sys_errlist=yes
22604         ol_cv_have_sys_errlist=yes
22605 else
22606   echo "configure: failed program was:" >&5
22607   cat conftest.$ac_ext >&5
22608   rm -rf conftest*
22609   ol_cv_dcl_sys_errlist=no
22610 fi
22611 rm -f conftest*
22612 fi
22613
22614 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22615 #
22616 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22617 if test $ol_cv_dcl_sys_errlist = no ; then
22618         cat >> confdefs.h <<\EOF
22619 #define DECL_SYS_ERRLIST 1
22620 EOF
22621
22622
22623         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22624 echo "configure:22625: checking existence of sys_errlist" >&5
22625 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22626   echo $ac_n "(cached) $ac_c" 1>&6
22627 else
22628   
22629                 cat > conftest.$ac_ext <<EOF
22630 #line 22631 "configure"
22631 #include "confdefs.h"
22632 #include <errno.h>
22633 int main() {
22634 char *c = (char *) *sys_errlist
22635 ; return 0; }
22636 EOF
22637 if { (eval echo configure:22638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22638   rm -rf conftest*
22639   ol_cv_have_sys_errlist=yes
22640 else
22641   echo "configure: failed program was:" >&5
22642   cat conftest.$ac_ext >&5
22643   rm -rf conftest*
22644   ol_cv_have_sys_errlist=no
22645 fi
22646 rm -f conftest*
22647 fi
22648
22649 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22650 fi
22651 if test $ol_cv_have_sys_errlist = yes ; then
22652         cat >> confdefs.h <<\EOF
22653 #define HAVE_SYS_ERRLIST 1
22654 EOF
22655
22656 fi
22657
22658
22659
22660 if test "$ol_enable_debug" != no ; then
22661         cat >> confdefs.h <<\EOF
22662 #define LDAP_DEBUG 1
22663 EOF
22664
22665 fi
22666 if test "$ol_enable_syslog" = yes ; then
22667         cat >> confdefs.h <<\EOF
22668 #define LDAP_SYSLOG 1
22669 EOF
22670
22671 fi
22672 if test "$ol_enable_cache" = no ; then
22673         cat >> confdefs.h <<\EOF
22674 #define LDAP_NOCACHE 1
22675 EOF
22676
22677 fi
22678 if test "$ol_link_kbind" != no ; then
22679         cat >> confdefs.h <<\EOF
22680 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22681 EOF
22682
22683 fi
22684 if test "$ol_enable_proctitle" != no ; then
22685         cat >> confdefs.h <<\EOF
22686 #define LDAP_PROCTITLE 1
22687 EOF
22688
22689 fi
22690 if test "$ol_enable_referrals" != no ; then
22691         cat >> confdefs.h <<\EOF
22692 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22693 EOF
22694
22695 fi
22696 if test "$ol_enable_local" != no; then
22697         cat >> confdefs.h <<\EOF
22698 #define LDAP_PF_LOCAL 1
22699 EOF
22700
22701 fi
22702 if test "$ol_link_ipv6" != no; then
22703         cat >> confdefs.h <<\EOF
22704 #define LDAP_PF_INET6 1
22705 EOF
22706
22707 fi
22708 if test "$ol_enable_cleartext" != no ; then
22709         cat >> confdefs.h <<\EOF
22710 #define SLAPD_CLEARTEXT 1
22711 EOF
22712
22713 fi
22714 if test "$ol_enable_crypt" != no ; then
22715         cat >> confdefs.h <<\EOF
22716 #define SLAPD_CRYPT 1
22717 EOF
22718
22719 fi
22720 if test "$ol_link_kpasswd" != no ; then
22721         cat >> confdefs.h <<\EOF
22722 #define SLAPD_KPASSWD 1
22723 EOF
22724
22725 fi
22726 if test "$ol_link_spasswd" != no ; then
22727         cat >> confdefs.h <<\EOF
22728 #define SLAPD_SPASSWD 1
22729 EOF
22730
22731 fi
22732 if test "$ol_enable_multimaster" != no ; then
22733         cat >> confdefs.h <<\EOF
22734 #define SLAPD_MULTIMASTER 1
22735 EOF
22736
22737 fi
22738 if test "$ol_enable_phonetic" != no ; then
22739         cat >> confdefs.h <<\EOF
22740 #define SLAPD_PHONETIC 1
22741 EOF
22742
22743 fi
22744 if test "$ol_enable_rlookups" != no ; then
22745         cat >> confdefs.h <<\EOF
22746 #define SLAPD_RLOOKUPS 1
22747 EOF
22748
22749 fi
22750 if test "$ol_enable_aci" != no ; then
22751         cat >> confdefs.h <<\EOF
22752 #define SLAPD_ACI_ENABLED 1
22753 EOF
22754
22755 fi
22756
22757 if test "$ol_link_modules" != no ; then
22758         cat >> confdefs.h <<\EOF
22759 #define SLAPD_MODULES 1
22760 EOF
22761
22762         BUILD_SLAPD=yes
22763         SLAPD_MODULES_LDFLAGS="-dlopen self"
22764 fi
22765
22766 if test "$ol_enable_bdb" != no ; then
22767         cat >> confdefs.h <<\EOF
22768 #define SLAPD_BDB 1
22769 EOF
22770
22771         BUILD_SLAPD=yes
22772         BUILD_BDB=yes
22773         if test "$ol_with_bdb_module" != static ; then
22774                 cat >> confdefs.h <<\EOF
22775 #define SLAPD_BDB_DYNAMIC 1
22776 EOF
22777
22778                 BUILD_BDB=mod
22779                 BUILD_BDB_DYNAMIC=shared
22780                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22781         else
22782                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22783         fi
22784 fi
22785
22786 if test "$ol_link_dnssrv" != no ; then
22787         cat >> confdefs.h <<\EOF
22788 #define SLAPD_DNSSRV 1
22789 EOF
22790
22791         BUILD_SLAPD=yes
22792         BUILD_DNSSRV=yes
22793         if test "$ol_with_dnssrv_module" != static ; then
22794                 cat >> confdefs.h <<\EOF
22795 #define SLAPD_DNSSRV_DYNAMIC 1
22796 EOF
22797
22798                 BUILD_DNSSRV=mod
22799                 BUILD_DNSSRV_DYNAMIC=shared
22800                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22801         else
22802                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22803         fi
22804 fi
22805
22806 if test "$ol_enable_ldap" != no ; then
22807         cat >> confdefs.h <<\EOF
22808 #define SLAPD_LDAP 1
22809 EOF
22810
22811         BUILD_SLAPD=yes
22812         BUILD_LDAP=yes
22813         if test "$ol_with_ldap_module" != static ; then
22814                 cat >> confdefs.h <<\EOF
22815 #define SLAPD_LDAP_DYNAMIC 1
22816 EOF
22817
22818                 BUILD_LDAP=mod
22819                 BUILD_LDAP_DYNAMIC=shared
22820                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22821         else
22822                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22823         fi
22824 fi
22825
22826 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22827         cat >> confdefs.h <<\EOF
22828 #define SLAPD_LDBM 1
22829 EOF
22830
22831         BUILD_SLAPD=yes
22832         BUILD_LDBM=yes
22833         LDBM_LIB="-lldbm"
22834         if test "$ol_with_ldbm_module" != static ; then
22835                 cat >> confdefs.h <<\EOF
22836 #define SLAPD_LDBM_DYNAMIC 1
22837 EOF
22838
22839                 BUILD_LDBM=mod
22840                 BUILD_LDBM_DYNAMIC=shared
22841                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22842         else
22843                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22844         fi
22845 fi
22846
22847 if test "$ol_enable_meta" != no ; then
22848         if test "$ol_enable_ldap" = no ; then
22849                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22850         fi
22851         if test "$ol_enable_rewrite" = no ; then
22852                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22853         fi
22854         cat >> confdefs.h <<\EOF
22855 #define SLAPD_META 1
22856 EOF
22857
22858         BUILD_SLAPD=yes
22859         BUILD_META=yes
22860         BUILD_LDAP=yes
22861         BUILD_REWRITE=yes
22862         if test "$ol_with_meta_module" != static ; then
22863                 cat >> confdefs.h <<\EOF
22864 #define SLAPD_META_DYNAMIC 1
22865 EOF
22866
22867                 BUILD_META=mod
22868                 BUILD_META_DYNAMIC=shared
22869                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22870         else
22871                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22872         fi
22873 fi
22874
22875 if test "$ol_enable_monitor" != no ; then
22876         cat >> confdefs.h <<\EOF
22877 #define SLAPD_MONITOR 1
22878 EOF
22879
22880         BUILD_SLAPD=yes
22881         BUILD_MONITOR=yes
22882         if test "$ol_with_monitor_module" != static ; then
22883                 cat >> confdefs.h <<\EOF
22884 #define SLAPD_MONITOR_DYNAMIC 1
22885 EOF
22886
22887                 BUILD_MONITOR=mod
22888                 BUILD_MONITOR_DYNAMIC=shared
22889                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22890         else
22891                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22892         fi
22893 fi
22894
22895 if test "$ol_enable_null" != no ; then
22896         cat >> confdefs.h <<\EOF
22897 #define SLAPD_NULL 1
22898 EOF
22899
22900         BUILD_SLAPD=yes
22901         BUILD_NULL=yes
22902         if test "$ol_with_null_module" != static ; then
22903                 cat >> confdefs.h <<\EOF
22904 #define SLAPD_NULL_DYNAMIC 1
22905 EOF
22906
22907                 BUILD_NULL=mod
22908                 BUILD_NULL_DYNAMIC=shared
22909                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22910         else
22911                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22912         fi
22913 fi
22914
22915 if test "$ol_enable_passwd" != no ; then
22916         cat >> confdefs.h <<\EOF
22917 #define SLAPD_PASSWD 1
22918 EOF
22919
22920         BUILD_SLAPD=yes
22921         BUILD_PASSWD=yes
22922         if test "$ol_with_passwd_module" != static ; then
22923                 cat >> confdefs.h <<\EOF
22924 #define SLAPD_PASSWD_DYNAMIC 1
22925 EOF
22926
22927                 BUILD_PASSWD=mod
22928                 BUILD_PASSWD_DYNAMIC=shared
22929                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22930         else
22931                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22932         fi
22933 fi
22934
22935 if test "$ol_link_perl" != no ; then
22936         cat >> confdefs.h <<\EOF
22937 #define SLAPD_PERL 1
22938 EOF
22939
22940         BUILD_SLAPD=yes
22941         BUILD_PERL=yes
22942         if test "$ol_with_perl_module" != static ; then
22943                 cat >> confdefs.h <<\EOF
22944 #define SLAPD_PERL_DYNAMIC 1
22945 EOF
22946
22947                 BUILD_PERL=mod
22948                 BUILD_PERL_DYNAMIC=shared
22949                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22950         else
22951                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22952         fi
22953 fi
22954
22955 if test "$ol_enable_shell" != no ; then
22956         cat >> confdefs.h <<\EOF
22957 #define SLAPD_SHELL 1
22958 EOF
22959
22960         BUILD_SLAPD=yes
22961         BUILD_SHELL=yes
22962         if test "$ol_with_shell_module" != static ; then
22963                 cat >> confdefs.h <<\EOF
22964 #define SLAPD_SHELL_DYNAMIC 1
22965 EOF
22966
22967                 BUILD_SHELL=mod
22968                 BUILD_SHELL_DYNAMIC=shared
22969                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22970         else
22971                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22972         fi
22973 fi
22974
22975 if test "$ol_enable_tcl" != no ; then
22976         cat >> confdefs.h <<\EOF
22977 #define SLAPD_TCL 1
22978 EOF
22979
22980         BUILD_SLAPD=yes
22981         BUILD_TCL=yes
22982         if test "$ol_with_tcl_module" != static; then
22983                 cat >> confdefs.h <<\EOF
22984 #define SLAPD_TCL_DYNAMIC 1
22985 EOF
22986
22987                 BUILD_TCL=mod
22988                 BUILD_TCL_DYNAMIC=shared
22989                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22990         else
22991                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22992         fi
22993 fi
22994
22995 if test "$ol_link_sql" != no ; then
22996         cat >> confdefs.h <<\EOF
22997 #define SLAPD_SQL 1
22998 EOF
22999
23000         BUILD_SLAPD=yes
23001         BUILD_SQL=yes
23002         if test "$ol_with_sql_module" != static; then
23003                 cat >> confdefs.h <<\EOF
23004 #define SLAPD_SQL_DYNAMIC 1
23005 EOF
23006
23007                 BUILD_SQL=mod
23008                 BUILD_SQL_DYNAMIC=shared
23009                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23010         else
23011                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23012         fi
23013 fi
23014
23015 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23016         $BUILD_SLAPD = yes ; then
23017         BUILD_SLURPD=yes
23018 fi
23019
23020 if test "$ol_enable_rewrite" != no ; then
23021         cat >> confdefs.h <<\EOF
23022 #define ENABLE_REWRITE 1
23023 EOF
23024
23025         BUILD_REWRITE=yes
23026 fi
23027
23028
23029
23030 if test "$ac_cv_mingw32" = yes ; then
23031         PLAT=NT
23032         SLAPD_MODULES_LDFLAGS=
23033 else
23034         PLAT=UNIX
23035 fi
23036
23037
23038
23039
23040
23041
23042   
23043   
23044   
23045   
23046   
23047   
23048   
23049   
23050   
23051   
23052   
23053   
23054   
23055   
23056   
23057   
23058   
23059   
23060   
23061   
23062   
23063   
23064   
23065   
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105 # Check whether --with-xxinstall or --without-xxinstall was given.
23106 if test "${with_xxinstall+set}" = set; then
23107   withval="$with_xxinstall"
23108   :
23109 fi
23110
23111
23112
23113 trap '' 1 2 15
23114
23115 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23116
23117 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23118 # Let make expand exec_prefix.
23119 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23120
23121 # Any assignment to VPATH causes Sun make to only execute
23122 # the first set of double-colon rules, so remove it if not needed.
23123 # If there is a colon in the path, we need to keep it.
23124 if test "x$srcdir" = x.; then
23125   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23126 fi
23127
23128 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23129
23130 DEFS=-DHAVE_CONFIG_H
23131
23132 # Without the "./", some shells look in PATH for config.status.
23133 : ${CONFIG_STATUS=./config.status}
23134
23135 echo creating $CONFIG_STATUS
23136 rm -f $CONFIG_STATUS
23137 cat > $CONFIG_STATUS <<EOF
23138 #! /bin/sh
23139 # Generated automatically by configure.
23140 # Run this file to recreate the current configuration.
23141 # This directory was configured as follows,
23142 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23143 #
23144 # $0 $ac_configure_args
23145 #
23146 # Compiler output produced by configure, useful for debugging
23147 # configure, is in ./config.log if it exists.
23148
23149 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23150 for ac_option
23151 do
23152   case "\$ac_option" in
23153   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23154     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23155     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23156   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23157     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23158     exit 0 ;;
23159   -help | --help | --hel | --he | --h)
23160     echo "\$ac_cs_usage"; exit 0 ;;
23161   *) echo "\$ac_cs_usage"; exit 1 ;;
23162   esac
23163 done
23164
23165 ac_given_srcdir=$srcdir
23166 ac_given_INSTALL="$INSTALL"
23167
23168 trap 'rm -fr `echo "\
23169 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23170 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23171 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23172 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23173 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23174 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23175 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23176 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23177 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
23178 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
23179 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
23180 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23181 include/Makefile:build/top.mk:include/Makefile.in \
23182 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23183 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23184 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23185 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23186 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23187 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23188 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23189 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23190 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23191 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23192 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23193 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23194 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23195 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23196 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23197 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23198 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23199 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23200 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23201 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23202 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23203 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23204 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23205 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23206 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23207 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23208 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23209 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23210 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23211  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23212 EOF
23213 cat >> $CONFIG_STATUS <<EOF
23214
23215 # Protect against being on the right side of a sed subst in config.status.
23216 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23217  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23218 $ac_vpsub
23219 $extrasub
23220 s%@SHELL@%$SHELL%g
23221 s%@CFLAGS@%$CFLAGS%g
23222 s%@CPPFLAGS@%$CPPFLAGS%g
23223 s%@CXXFLAGS@%$CXXFLAGS%g
23224 s%@FFLAGS@%$FFLAGS%g
23225 s%@DEFS@%$DEFS%g
23226 s%@LDFLAGS@%$LDFLAGS%g
23227 s%@LIBS@%$LIBS%g
23228 s%@exec_prefix@%$exec_prefix%g
23229 s%@prefix@%$prefix%g
23230 s%@program_transform_name@%$program_transform_name%g
23231 s%@bindir@%$bindir%g
23232 s%@sbindir@%$sbindir%g
23233 s%@libexecdir@%$libexecdir%g
23234 s%@datadir@%$datadir%g
23235 s%@sysconfdir@%$sysconfdir%g
23236 s%@sharedstatedir@%$sharedstatedir%g
23237 s%@localstatedir@%$localstatedir%g
23238 s%@libdir@%$libdir%g
23239 s%@includedir@%$includedir%g
23240 s%@oldincludedir@%$oldincludedir%g
23241 s%@infodir@%$infodir%g
23242 s%@mandir@%$mandir%g
23243 s%@host@%$host%g
23244 s%@host_alias@%$host_alias%g
23245 s%@host_cpu@%$host_cpu%g
23246 s%@host_vendor@%$host_vendor%g
23247 s%@host_os@%$host_os%g
23248 s%@target@%$target%g
23249 s%@target_alias@%$target_alias%g
23250 s%@target_cpu@%$target_cpu%g
23251 s%@target_vendor@%$target_vendor%g
23252 s%@target_os@%$target_os%g
23253 s%@build@%$build%g
23254 s%@build_alias@%$build_alias%g
23255 s%@build_cpu@%$build_cpu%g
23256 s%@build_vendor@%$build_vendor%g
23257 s%@build_os@%$build_os%g
23258 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23259 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23260 s%@INSTALL_DATA@%$INSTALL_DATA%g
23261 s%@PACKAGE@%$PACKAGE%g
23262 s%@VERSION@%$VERSION%g
23263 s%@ACLOCAL@%$ACLOCAL%g
23264 s%@AUTOCONF@%$AUTOCONF%g
23265 s%@AUTOMAKE@%$AUTOMAKE%g
23266 s%@AUTOHEADER@%$AUTOHEADER%g
23267 s%@MAKEINFO@%$MAKEINFO%g
23268 s%@install_sh@%$install_sh%g
23269 s%@AMTAR@%$AMTAR%g
23270 s%@AWK@%$AWK%g
23271 s%@AMTARFLAGS@%$AMTARFLAGS%g
23272 s%@SET_MAKE@%$SET_MAKE%g
23273 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23274 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23275 s%@top_builddir@%$top_builddir%g
23276 s%@ldap_subdir@%$ldap_subdir%g
23277 s%@CC@%$CC%g
23278 s%@AR@%$AR%g
23279 s%@LN_S@%$LN_S%g
23280 s%@OBJEXT@%$OBJEXT%g
23281 s%@EXEEXT@%$EXEEXT%g
23282 s%@ECHO@%$ECHO%g
23283 s%@RANLIB@%$RANLIB%g
23284 s%@STRIP@%$STRIP%g
23285 s%@DLLTOOL@%$DLLTOOL%g
23286 s%@AS@%$AS%g
23287 s%@OBJDUMP@%$OBJDUMP%g
23288 s%@CPP@%$CPP%g
23289 s%@LIBTOOL@%$LIBTOOL%g
23290 s%@LN_H@%$LN_H%g
23291 s%@SENDMAIL@%$SENDMAIL%g
23292 s%@EDITOR@%$EDITOR%g
23293 s%@PERLBIN@%$PERLBIN%g
23294 s%@OL_MKDEP@%$OL_MKDEP%g
23295 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23296 s%@LIBOBJS@%$LIBOBJS%g
23297 s%@LIBSRCS@%$LIBSRCS%g
23298 s%@PLAT@%$PLAT%g
23299 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23300 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23301 s%@BUILD_BDB@%$BUILD_BDB%g
23302 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23303 s%@BUILD_LDAP@%$BUILD_LDAP%g
23304 s%@BUILD_LDBM@%$BUILD_LDBM%g
23305 s%@BUILD_META@%$BUILD_META%g
23306 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23307 s%@BUILD_NULL@%$BUILD_NULL%g
23308 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23309 s%@BUILD_PERL@%$BUILD_PERL%g
23310 s%@BUILD_SHELL@%$BUILD_SHELL%g
23311 s%@BUILD_SQL@%$BUILD_SQL%g
23312 s%@BUILD_TCL@%$BUILD_TCL%g
23313 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23314 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23315 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23316 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23317 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23318 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23319 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23320 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23321 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23322 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23323 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23324 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
23325 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23326 s%@LDBM_LIB@%$LDBM_LIB%g
23327 s%@LDAP_LIBS@%$LDAP_LIBS%g
23328 s%@LDIF_LIBS@%$LDIF_LIBS%g
23329 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23330 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23331 s%@LDBM_LIBS@%$LDBM_LIBS%g
23332 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23333 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23334 s%@WRAP_LIBS@%$WRAP_LIBS%g
23335 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
23336 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23337 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23338 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23339 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23340 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23341 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23342 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23343 s%@KRB4_LIBS@%$KRB4_LIBS%g
23344 s%@KRB5_LIBS@%$KRB5_LIBS%g
23345 s%@READLINE_LIBS@%$READLINE_LIBS%g
23346 s%@SASL_LIBS@%$SASL_LIBS%g
23347 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23348 s%@TLS_LIBS@%$TLS_LIBS%g
23349 s%@MODULES_LIBS@%$MODULES_LIBS%g
23350 s%@AUTH_LIBS@%$AUTH_LIBS%g
23351 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23352 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23353 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23354 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23355
23356 CEOF
23357 EOF
23358
23359 cat >> $CONFIG_STATUS <<\EOF
23360
23361 # Split the substitutions into bite-sized pieces for seds with
23362 # small command number limits, like on Digital OSF/1 and HP-UX.
23363 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23364 ac_file=1 # Number of current file.
23365 ac_beg=1 # First line for current file.
23366 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23367 ac_more_lines=:
23368 ac_sed_cmds=""
23369 while $ac_more_lines; do
23370   if test $ac_beg -gt 1; then
23371     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23372   else
23373     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23374   fi
23375   if test ! -s conftest.s$ac_file; then
23376     ac_more_lines=false
23377     rm -f conftest.s$ac_file
23378   else
23379     if test -z "$ac_sed_cmds"; then
23380       ac_sed_cmds="sed -f conftest.s$ac_file"
23381     else
23382       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23383     fi
23384     ac_file=`expr $ac_file + 1`
23385     ac_beg=$ac_end
23386     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23387   fi
23388 done
23389 if test -z "$ac_sed_cmds"; then
23390   ac_sed_cmds=cat
23391 fi
23392 EOF
23393
23394 cat >> $CONFIG_STATUS <<EOF
23395
23396 CONFIG_FILES=\${CONFIG_FILES-"\
23397 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23398 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23399 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23400 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23401 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23402 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23403 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23404 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23405 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
23406 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
23407 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
23408 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23409 include/Makefile:build/top.mk:include/Makefile.in \
23410 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23411 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23412 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23413 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23414 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23415 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23416 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23417 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23418 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23419 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23420 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23421 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23422 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23423 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23424 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23425 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23426 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23427 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23428 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23429 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23430 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23431 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23432 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23433 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
23434 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23435 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23436 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23437 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23438 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23439 "}
23440 EOF
23441 cat >> $CONFIG_STATUS <<\EOF
23442 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23443   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23444   case "$ac_file" in
23445   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23446        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23447   *) ac_file_in="${ac_file}.in" ;;
23448   esac
23449
23450   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23451
23452   # Remove last slash and all that follows it.  Not all systems have dirname.
23453   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23454   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23455     # The file is in a subdirectory.
23456     test ! -d "$ac_dir" && mkdir "$ac_dir"
23457     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23458     # A "../" for each directory in $ac_dir_suffix.
23459     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23460   else
23461     ac_dir_suffix= ac_dots=
23462   fi
23463
23464   case "$ac_given_srcdir" in
23465   .)  srcdir=.
23466       if test -z "$ac_dots"; then top_srcdir=.
23467       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23468   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23469   *) # Relative path.
23470     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23471     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23472   esac
23473
23474   case "$ac_given_INSTALL" in
23475   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23476   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23477   esac
23478
23479   echo creating "$ac_file"
23480   rm -f "$ac_file"
23481   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23482   case "$ac_file" in
23483   *[Mm]akefile*) ac_comsub="1i\\
23484 # $configure_input" ;;
23485   *) ac_comsub= ;;
23486   esac
23487
23488   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23489   sed -e "$ac_comsub
23490 s%@configure_input@%$configure_input%g
23491 s%@srcdir@%$srcdir%g
23492 s%@top_srcdir@%$top_srcdir%g
23493 s%@INSTALL@%$INSTALL%g
23494 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23495 fi; done
23496 rm -f conftest.s*
23497
23498 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23499 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23500 #
23501 # ac_d sets the value in "#define NAME VALUE" lines.
23502 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23503 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23504 ac_dC='\3'
23505 ac_dD='%g'
23506 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23507 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23508 ac_uB='\([      ]\)%\1#\2define\3'
23509 ac_uC=' '
23510 ac_uD='\4%g'
23511 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23512 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23513 ac_eB='$%\1#\2define\3'
23514 ac_eC=' '
23515 ac_eD='%g'
23516
23517 if test "${CONFIG_HEADERS+set}" != set; then
23518 EOF
23519 cat >> $CONFIG_STATUS <<EOF
23520   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23521 EOF
23522 cat >> $CONFIG_STATUS <<\EOF
23523 fi
23524 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23525   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23526   case "$ac_file" in
23527   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23528        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23529   *) ac_file_in="${ac_file}.in" ;;
23530   esac
23531
23532   echo creating $ac_file
23533
23534   rm -f conftest.frag conftest.in conftest.out
23535   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23536   cat $ac_file_inputs > conftest.in
23537
23538 EOF
23539
23540 # Transform confdefs.h into a sed script conftest.vals that substitutes
23541 # the proper values into config.h.in to produce config.h.  And first:
23542 # Protect against being on the right side of a sed subst in config.status.
23543 # Protect against being in an unquoted here document in config.status.
23544 rm -f conftest.vals
23545 cat > conftest.hdr <<\EOF
23546 s/[\\&%]/\\&/g
23547 s%[\\$`]%\\&%g
23548 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23549 s%ac_d%ac_u%gp
23550 s%ac_u%ac_e%gp
23551 EOF
23552 sed -n -f conftest.hdr confdefs.h > conftest.vals
23553 rm -f conftest.hdr
23554
23555 # This sed command replaces #undef with comments.  This is necessary, for
23556 # example, in the case of _POSIX_SOURCE, which is predefined and required
23557 # on some systems where configure will not decide to define it.
23558 cat >> conftest.vals <<\EOF
23559 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23560 EOF
23561
23562 # Break up conftest.vals because some shells have a limit on
23563 # the size of here documents, and old seds have small limits too.
23564
23565 rm -f conftest.tail
23566 while :
23567 do
23568   ac_lines=`grep -c . conftest.vals`
23569   # grep -c gives empty output for an empty file on some AIX systems.
23570   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23571   # Write a limited-size here document to conftest.frag.
23572   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23573   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23574   echo 'CEOF
23575   sed -f conftest.frag conftest.in > conftest.out
23576   rm -f conftest.in
23577   mv conftest.out conftest.in
23578 ' >> $CONFIG_STATUS
23579   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23580   rm -f conftest.vals
23581   mv conftest.tail conftest.vals
23582 done
23583 rm -f conftest.vals
23584
23585 cat >> $CONFIG_STATUS <<\EOF
23586   rm -f conftest.frag conftest.h
23587   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23588   cat conftest.in >> conftest.h
23589   rm -f conftest.in
23590   if cmp -s $ac_file conftest.h 2>/dev/null; then
23591     echo "$ac_file is unchanged"
23592     rm -f conftest.h
23593   else
23594     # Remove last slash and all that follows it.  Not all systems have dirname.
23595       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23596       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23597       # The file is in a subdirectory.
23598       test ! -d "$ac_dir" && mkdir "$ac_dir"
23599     fi
23600     rm -f $ac_file
23601     mv conftest.h $ac_file
23602   fi
23603 fi; done
23604
23605 EOF
23606 cat >> $CONFIG_STATUS <<EOF
23607
23608 EOF
23609 cat >> $CONFIG_STATUS <<\EOF
23610
23611 date > stamp-h
23612 echo Please run \"make depend\" to build dependencies
23613
23614 exit 0
23615 EOF
23616 chmod +x $CONFIG_STATUS
23617 rm -fr confdefs* $ac_clean_files
23618 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23619