]> git.sur5r.net Git - openldap/blob - configure
Trim finger from HEAD
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.411 2002/04/15 15:17:39 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-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd          enable building slapd [yes]"
69 ac_help="$ac_help
70     --enable-aci          enable per-object ACIs (experimental) [no]"
71 ac_help="$ac_help
72     --enable-cleartext    enable cleartext passwords [yes]"
73 ac_help="$ac_help
74     --enable-crypt        enable crypt(3) passwords [no]"
75 ac_help="$ac_help
76     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
77 ac_help="$ac_help
78     --enable-kpasswd      enable Kerberos password verification [no]"
79 ac_help="$ac_help
80     --enable-lmpasswd     enable LAN Manager passwords [no]"
81 ac_help="$ac_help
82     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
83 ac_help="$ac_help
84     --enable-modules      enable dynamic module support [no]"
85 ac_help="$ac_help
86     --enable-phonetic     enable phonetic/soundex [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups [no]"
89 ac_help="$ac_help
90     --enable-slp          enable SLPv2 support [no]"
91 ac_help="$ac_help
92     --enable-wrappers     enable tcp wrapper support [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend [yes]"
95 ac_help="$ac_help
96     --with-bdb-module     module type [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type [static]"
141 ac_help="$ac_help
142     --enable-tcl          enable tcl backend [no]"
143 ac_help="$ac_help
144     --with-tcl-module     module type [static]"
145 ac_help="$ac_help
146
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if test -f $ac_dir/install-sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install-sh -c"
844     break
845   elif test -f $ac_dir/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB=`$SHTOOL echo -e %B`
876 TN=`$SHTOOL echo -e %b`
877
878 echo "Configuring $TB$OL_STRING$TN ..."
879
880
881 echo $ac_n "checking host system type""... $ac_c" 1>&6
882 echo "configure:883: checking host system type" >&5
883 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
884
885 # Make sure we can run config.sub.
886   if $ac_config_sub sun4 >/dev/null 2>&1; then :
887     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
888   fi
889
890   ac_cv_host_alias=$host
891   case "$ac_cv_host_alias" in
892   NONE)
893     case $nonopt in
894     NONE)
895       if ac_cv_host_alias=`$ac_config_guess`; then :
896       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
897       fi ;;
898     *) ac_cv_host_alias=$nonopt ;;
899     esac ;;
900   esac
901
902   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
903   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
904   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
905   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
906 else
907   echo $ac_n "(cached) $ac_c" 1>&6
908 fi
909
910 echo "$ac_t""$ac_cv_host" 1>&6
911
912 host=$ac_cv_host
913 host_alias=$ac_cv_host_alias
914 host_cpu=$ac_cv_host_cpu
915 host_vendor=$ac_cv_host_vendor
916 host_os=$ac_cv_host_os
917
918
919
920
921
922 echo $ac_n "checking target system type""... $ac_c" 1>&6
923 echo "configure:924: checking target system type" >&5
924 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
925
926 # Make sure we can run config.sub.
927   if $ac_config_sub sun4 >/dev/null 2>&1; then :
928     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929   fi
930
931   ac_cv_target_alias=$target
932   case "$ac_cv_target_alias" in
933   NONE)
934     case $nonopt in
935     NONE)
936       ac_cv_target_alias=$host_alias ;;
937
938     *) ac_cv_target_alias=$nonopt ;;
939     esac ;;
940   esac
941
942   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
943   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
946 else
947   echo $ac_n "(cached) $ac_c" 1>&6
948 fi
949
950 echo "$ac_t""$ac_cv_target" 1>&6
951
952 target=$ac_cv_target
953 target_alias=$ac_cv_target_alias
954 target_cpu=$ac_cv_target_cpu
955 target_vendor=$ac_cv_target_vendor
956 target_os=$ac_cv_target_os
957
958
959
960
961
962 echo $ac_n "checking build system type""... $ac_c" 1>&6
963 echo "configure:964: checking build system type" >&5
964 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
965
966 # Make sure we can run config.sub.
967   if $ac_config_sub sun4 >/dev/null 2>&1; then :
968     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
969   fi
970
971   ac_cv_build_alias=$build
972   case "$ac_cv_build_alias" in
973   NONE)
974     case $nonopt in
975     NONE)
976       ac_cv_build_alias=$host_alias ;;
977
978     *) ac_cv_build_alias=$nonopt ;;
979     esac ;;
980   esac
981
982   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
983   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
984   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
985   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
986 else
987   echo $ac_n "(cached) $ac_c" 1>&6
988 fi
989
990 echo "$ac_t""$ac_cv_build" 1>&6
991
992 build=$ac_cv_build
993 build_alias=$ac_cv_build_alias
994 build_cpu=$ac_cv_build_cpu
995 build_vendor=$ac_cv_build_vendor
996 build_os=$ac_cv_build_os
997
998
999
1000
1001
1002 # Do some error checking and defaulting for the host and target type.
1003 # The inputs are:
1004 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1005 #
1006 # The rules are:
1007 # 1. You are not allowed to specify --host, --target, and nonopt at the
1008 #    same time.
1009 # 2. Host defaults to nonopt.
1010 # 3. If nonopt is not specified, then host defaults to the current host,
1011 #    as determined by config.guess.
1012 # 4. Target and build default to nonopt.
1013 # 5. If nonopt is not specified, then target and build default to host.
1014
1015 # The aliases save the names the user supplied, while $host etc.
1016 # will get canonicalized.
1017 case $host---$target---$nonopt in
1018 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1019 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1020 esac
1021
1022 test "$host_alias" != "$target_alias" &&
1023   test "$program_prefix$program_suffix$program_transform_name" = \
1024     NONENONEs,x,x, &&
1025   program_prefix=${target_alias}-
1026
1027
1028 # Find a good install program.  We prefer a C program (faster),
1029 # so one script is as good as another.  But avoid the broken or
1030 # incompatible versions:
1031 # SysV /etc/install, /usr/sbin/install
1032 # SunOS /usr/etc/install
1033 # IRIX /sbin/install
1034 # AIX /bin/install
1035 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1036 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1037 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1038 # ./install, which can be erroneously created by make from ./install.sh.
1039 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1040 echo "configure:1041: checking for a BSD compatible install" >&5
1041 if test -z "$INSTALL"; then
1042 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1043   echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1046   for ac_dir in $PATH; do
1047     # Account for people who put trailing slashes in PATH elements.
1048     case "$ac_dir/" in
1049     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1050     *)
1051       # OSF1 and SCO ODT 3.0 have their own names for install.
1052       # Don't use installbsd from OSF since it installs stuff as root
1053       # by default.
1054       for ac_prog in ginstall scoinst install; do
1055         if test -f $ac_dir/$ac_prog; then
1056           if test $ac_prog = install &&
1057             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1058             # AIX install.  It has an incompatible calling convention.
1059             :
1060           elif test $ac_prog = install &&
1061             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1062             # program-specific install script used by HP pwplus--don't use.
1063             :
1064           else
1065             ac_cv_path_install="$ac_dir/$ac_prog -c"
1066             break 2
1067           fi
1068         fi
1069       done
1070       ;;
1071     esac
1072   done
1073   IFS="$ac_save_IFS"
1074
1075 fi
1076   if test "${ac_cv_path_install+set}" = set; then
1077     INSTALL="$ac_cv_path_install"
1078   else
1079     # As a last resort, use the slow shell script.  We don't cache a
1080     # path for INSTALL within a source directory, because that will
1081     # break other packages using the cache if that directory is
1082     # removed, or if the path is relative.
1083     INSTALL="$ac_install_sh"
1084   fi
1085 fi
1086 echo "$ac_t""$INSTALL" 1>&6
1087
1088 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1089 # It thinks the first close brace ends the variable substitution.
1090 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1091
1092 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1093
1094 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1095
1096 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1097 echo "configure:1098: checking whether build environment is sane" >&5
1098 # Just in case
1099 sleep 1
1100 echo timestamp > conftestfile
1101 # Do `set' in a subshell so we don't clobber the current shell's
1102 # arguments.  Must try -L first in case configure is actually a
1103 # symlink; some systems play weird games with the mod time of symlinks
1104 # (eg FreeBSD returns the mod time of the symlink's containing
1105 # directory).
1106 if (
1107    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1108    if test "$*" = "X"; then
1109       # -L didn't work.
1110       set X `ls -t $srcdir/configure conftestfile`
1111    fi
1112    if test "$*" != "X $srcdir/configure conftestfile" \
1113       && test "$*" != "X conftestfile $srcdir/configure"; then
1114
1115       # If neither matched, then we have a broken ls.  This can happen
1116       # if, for instance, CONFIG_SHELL is bash and it inherits a
1117       # broken ls alias from the environment.  This has actually
1118       # happened.  Such a system could not be considered "sane".
1119       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1120 alias in your environment" 1>&2; exit 1; }
1121    fi
1122
1123    test "$2" = conftestfile
1124    )
1125 then
1126    # Ok.
1127    :
1128 else
1129    { echo "configure: error: newly created file is older than distributed files!
1130 Check your system clock" 1>&2; exit 1; }
1131 fi
1132 rm -f conftest*
1133 echo "$ac_t""yes" 1>&6
1134 if test "$program_transform_name" = s,x,x,; then
1135   program_transform_name=
1136 else
1137   # Double any \ or $.  echo might interpret backslashes.
1138   cat <<\EOF_SED > conftestsed
1139 s,\\,\\\\,g; s,\$,$$,g
1140 EOF_SED
1141   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1142   rm -f conftestsed
1143 fi
1144 test "$program_prefix" != NONE &&
1145   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1146 # Use a double $ so make ignores it.
1147 test "$program_suffix" != NONE &&
1148   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1149
1150 # sed with no file args requires a program.
1151 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1152
1153 for ac_prog in mawk gawk nawk awk
1154 do
1155 # Extract the first word of "$ac_prog", so it can be a program name with args.
1156 set dummy $ac_prog; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   if test -n "$AWK"; then
1163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1164 else
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_prog_AWK="$ac_prog"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175 fi
1176 fi
1177 AWK="$ac_cv_prog_AWK"
1178 if test -n "$AWK"; then
1179   echo "$ac_t""$AWK" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 test -n "$AWK" && break
1185 done
1186
1187 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1188 echo "configure:1189: checking whether ${MAKE-make} sets \${MAKE}" >&5
1189 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1190 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1191   echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193   cat > conftestmake <<\EOF
1194 all:
1195         @echo 'ac_maketemp="${MAKE}"'
1196 EOF
1197 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1198 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1199 if test -n "$ac_maketemp"; then
1200   eval ac_cv_prog_make_${ac_make}_set=yes
1201 else
1202   eval ac_cv_prog_make_${ac_make}_set=no
1203 fi
1204 rm -f conftestmake
1205 fi
1206 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1207   echo "$ac_t""yes" 1>&6
1208   SET_MAKE=
1209 else
1210   echo "$ac_t""no" 1>&6
1211   SET_MAKE="MAKE=${MAKE-make}"
1212 fi
1213
1214
1215
1216 PACKAGE=$OL_PACKAGE
1217
1218 VERSION=$OL_VERSION
1219
1220 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1221   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1222 fi
1223
1224
1225
1226 missing_dir=`cd $ac_aux_dir && pwd`
1227 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1228 echo "configure:1229: checking for working aclocal" >&5
1229 # Run test in a subshell; some versions of sh will print an error if
1230 # an executable is not found, even if stderr is redirected.
1231 # Redirect stdin to placate older versions of autoconf.  Sigh.
1232 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1233    ACLOCAL=aclocal
1234    echo "$ac_t""found" 1>&6
1235 else
1236    ACLOCAL="$missing_dir/missing aclocal"
1237    echo "$ac_t""missing" 1>&6
1238 fi
1239
1240 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1241 echo "configure:1242: checking for working autoconf" >&5
1242 # Run test in a subshell; some versions of sh will print an error if
1243 # an executable is not found, even if stderr is redirected.
1244 # Redirect stdin to placate older versions of autoconf.  Sigh.
1245 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1246    AUTOCONF=autoconf
1247    echo "$ac_t""found" 1>&6
1248 else
1249    AUTOCONF="$missing_dir/missing autoconf"
1250    echo "$ac_t""missing" 1>&6
1251 fi
1252
1253 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1254 echo "configure:1255: checking for working automake" >&5
1255 # Run test in a subshell; some versions of sh will print an error if
1256 # an executable is not found, even if stderr is redirected.
1257 # Redirect stdin to placate older versions of autoconf.  Sigh.
1258 if (automake --version) < /dev/null > /dev/null 2>&1; then
1259    AUTOMAKE=automake
1260    echo "$ac_t""found" 1>&6
1261 else
1262    AUTOMAKE="$missing_dir/missing automake"
1263    echo "$ac_t""missing" 1>&6
1264 fi
1265
1266 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1267 echo "configure:1268: checking for working autoheader" >&5
1268 # Run test in a subshell; some versions of sh will print an error if
1269 # an executable is not found, even if stderr is redirected.
1270 # Redirect stdin to placate older versions of autoconf.  Sigh.
1271 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1272    AUTOHEADER=autoheader
1273    echo "$ac_t""found" 1>&6
1274 else
1275    AUTOHEADER="$missing_dir/missing autoheader"
1276    echo "$ac_t""missing" 1>&6
1277 fi
1278
1279 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1280 echo "configure:1281: checking for working makeinfo" >&5
1281 # Run test in a subshell; some versions of sh will print an error if
1282 # an executable is not found, even if stderr is redirected.
1283 # Redirect stdin to placate older versions of autoconf.  Sigh.
1284 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1285    MAKEINFO=makeinfo
1286    echo "$ac_t""found" 1>&6
1287 else
1288    MAKEINFO="$missing_dir/missing makeinfo"
1289    echo "$ac_t""missing" 1>&6
1290 fi
1291
1292 install_sh="$missing_dir/install-sh"
1293 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1294
1295 for ac_prog in gnutar gtar tar
1296 do
1297 # Extract the first word of "$ac_prog", so it can be a program name with args.
1298 set dummy $ac_prog; ac_word=$2
1299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1300 echo "configure:1301: checking for $ac_word" >&5
1301 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   if test -n "$AMTAR"; then
1305   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1306 else
1307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1308   ac_dummy="$PATH"
1309   for ac_dir in $ac_dummy; do
1310     test -z "$ac_dir" && ac_dir=.
1311     if test -f $ac_dir/$ac_word; then
1312       ac_cv_prog_AMTAR="$ac_prog"
1313       break
1314     fi
1315   done
1316   IFS="$ac_save_ifs"
1317 fi
1318 fi
1319 AMTAR="$ac_cv_prog_AMTAR"
1320 if test -n "$AMTAR"; then
1321   echo "$ac_t""$AMTAR" 1>&6
1322 else
1323   echo "$ac_t""no" 1>&6
1324 fi
1325
1326 test -n "$AMTAR" && break
1327 done
1328
1329
1330 AMTARFLAGS=
1331 if test -n "$AMTAR"; then
1332   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1333         AMTARFLAGS=o
1334   fi
1335 fi
1336
1337 cat >> confdefs.h <<EOF
1338 #define OPENLDAP_PACKAGE "$PACKAGE"
1339 EOF
1340
1341 cat >> confdefs.h <<EOF
1342 #define OPENLDAP_VERSION "$VERSION"
1343 EOF
1344
1345
1346 cat >> confdefs.h <<EOF
1347 #define LDAP_VENDOR_VERSION $OL_API_INC
1348 EOF
1349
1350 cat >> confdefs.h <<EOF
1351 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1352 EOF
1353
1354 cat >> confdefs.h <<EOF
1355 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1356 EOF
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1360 EOF
1361
1362
1363 OPENLDAP_LIBVERSION=$OL_API_LIB
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 # OpenLDAP --enable-kbind
1495         # Check whether --enable-kbind or --disable-kbind was given.
1496 if test "${enable_kbind+set}" = set; then
1497   enableval="$enable_kbind"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1507         fi
1508         ol_enable_kbind="$ol_arg"
1509
1510 else
1511         ol_enable_kbind="no"
1512 fi
1513 # end --enable-kbind
1514 # OpenLDAP --enable-ipv6
1515         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1516 if test "${enable_ipv6+set}" = set; then
1517   enableval="$enable_ipv6"
1518   
1519         ol_arg=invalid
1520         for ol_val in auto yes no ; do
1521                 if test "$enableval" = "$ol_val" ; then
1522                         ol_arg="$ol_val"
1523                 fi
1524         done
1525         if test "$ol_arg" = "invalid" ; then
1526                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1527         fi
1528         ol_enable_ipv6="$ol_arg"
1529
1530 else
1531         ol_enable_ipv6="auto"
1532 fi
1533 # end --enable-ipv6
1534 # OpenLDAP --enable-local
1535         # Check whether --enable-local or --disable-local was given.
1536 if test "${enable_local+set}" = set; then
1537   enableval="$enable_local"
1538   
1539         ol_arg=invalid
1540         for ol_val in auto yes no ; do
1541                 if test "$enableval" = "$ol_val" ; then
1542                         ol_arg="$ol_val"
1543                 fi
1544         done
1545         if test "$ol_arg" = "invalid" ; then
1546                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1547         fi
1548         ol_enable_local="$ol_arg"
1549
1550 else
1551         ol_enable_local="auto"
1552 fi
1553 # end --enable-local
1554 # OpenLDAP --enable-rewrite
1555         # Check whether --enable-rewrite or --disable-rewrite was given.
1556 if test "${enable_rewrite+set}" = set; then
1557   enableval="$enable_rewrite"
1558   
1559         ol_arg=invalid
1560         for ol_val in auto yes no ; do
1561                 if test "$enableval" = "$ol_val" ; then
1562                         ol_arg="$ol_val"
1563                 fi
1564         done
1565         if test "$ol_arg" = "invalid" ; then
1566                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1567         fi
1568         ol_enable_rewrite="$ol_arg"
1569
1570 else
1571         ol_enable_rewrite="no"
1572 fi
1573 # end --enable-rewrite
1574 # OpenLDAP --enable-x_compile
1575         # Check whether --enable-x_compile or --disable-x_compile was given.
1576 if test "${enable_x_compile+set}" = set; then
1577   enableval="$enable_x_compile"
1578   
1579         ol_arg=invalid
1580         for ol_val in yes no ; do
1581                 if test "$enableval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1587         fi
1588         ol_enable_x_compile="$ol_arg"
1589
1590 else
1591         ol_enable_x_compile="no"
1592 fi
1593 # end --enable-x_compile
1594
1595
1596 # OpenLDAP --with-cyrus_sasl
1597         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1598 if test "${with_cyrus_sasl+set}" = set; then
1599   withval="$with_cyrus_sasl"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto yes no  ; do
1603                 if test "$withval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1609         fi
1610         ol_with_cyrus_sasl="$ol_arg"
1611
1612 else
1613         ol_with_cyrus_sasl="auto"
1614 fi
1615 # end --with-cyrus_sasl
1616
1617 # OpenLDAP --with-fetch
1618         # Check whether --with-fetch or --without-fetch was given.
1619 if test "${with_fetch+set}" = set; then
1620   withval="$with_fetch"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no  ; do
1624                 if test "$withval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1630         fi
1631         ol_with_fetch="$ol_arg"
1632
1633 else
1634         ol_with_fetch="auto"
1635 fi
1636 # end --with-fetch
1637
1638 # OpenLDAP --with-kerberos
1639         # Check whether --with-kerberos or --without-kerberos was given.
1640 if test "${with_kerberos+set}" = set; then
1641   withval="$with_kerberos"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1645                 if test "$withval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1651         fi
1652         ol_with_kerberos="$ol_arg"
1653
1654 else
1655         ol_with_kerberos="auto"
1656 fi
1657 # end --with-kerberos
1658
1659 # OpenLDAP --with-readline
1660         # Check whether --with-readline or --without-readline was given.
1661 if test "${with_readline+set}" = set; then
1662   withval="$with_readline"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no  ; do
1666                 if test "$withval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1672         fi
1673         ol_with_readline="$ol_arg"
1674
1675 else
1676         ol_with_readline="auto"
1677 fi
1678 # end --with-readline
1679
1680 # OpenLDAP --with-threads
1681         # Check whether --with-threads or --without-threads was given.
1682 if test "${with_threads+set}" = set; then
1683   withval="$with_threads"
1684   
1685         ol_arg=invalid
1686         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1687                 if test "$withval" = "$ol_val" ; then
1688                         ol_arg="$ol_val"
1689                 fi
1690         done
1691         if test "$ol_arg" = "invalid" ; then
1692                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1693         fi
1694         ol_with_threads="$ol_arg"
1695
1696 else
1697         ol_with_threads="auto"
1698 fi
1699 # end --with-threads
1700
1701 # OpenLDAP --with-tls
1702         # Check whether --with-tls or --without-tls was given.
1703 if test "${with_tls+set}" = set; then
1704   withval="$with_tls"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto ssleay openssl yes no  ; do
1708                 if test "$withval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1714         fi
1715         ol_with_tls="$ol_arg"
1716
1717 else
1718         ol_with_tls="auto"
1719 fi
1720 # end --with-tls
1721
1722 # OpenLDAP --with-yielding_select
1723         # Check whether --with-yielding_select or --without-yielding_select was given.
1724 if test "${with_yielding_select+set}" = set; then
1725   withval="$with_yielding_select"
1726   
1727         ol_arg=invalid
1728         for ol_val in auto yes no manual  ; do
1729                 if test "$withval" = "$ol_val" ; then
1730                         ol_arg="$ol_val"
1731                 fi
1732         done
1733         if test "$ol_arg" = "invalid" ; then
1734                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1735         fi
1736         ol_with_yielding_select="$ol_arg"
1737
1738 else
1739         ol_with_yielding_select="auto"
1740 fi
1741 # end --with-yielding_select
1742
1743
1744
1745 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1746 if test "${with_xxslapdoptions+set}" = set; then
1747   withval="$with_xxslapdoptions"
1748   :
1749 fi
1750
1751 # OpenLDAP --enable-slapd
1752         # Check whether --enable-slapd or --disable-slapd was given.
1753 if test "${enable_slapd+set}" = set; then
1754   enableval="$enable_slapd"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_slapd="$ol_arg"
1766
1767 else
1768         ol_enable_slapd="yes"
1769 fi
1770 # end --enable-slapd
1771 # OpenLDAP --enable-aci
1772         # Check whether --enable-aci or --disable-aci was given.
1773 if test "${enable_aci+set}" = set; then
1774   enableval="$enable_aci"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1784         fi
1785         ol_enable_aci="$ol_arg"
1786
1787 else
1788         ol_enable_aci="no"
1789 fi
1790 # end --enable-aci
1791 # OpenLDAP --enable-cleartext
1792         # Check whether --enable-cleartext or --disable-cleartext was given.
1793 if test "${enable_cleartext+set}" = set; then
1794   enableval="$enable_cleartext"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1804         fi
1805         ol_enable_cleartext="$ol_arg"
1806
1807 else
1808         ol_enable_cleartext="yes"
1809 fi
1810 # end --enable-cleartext
1811 # OpenLDAP --enable-crypt
1812         # Check whether --enable-crypt or --disable-crypt was given.
1813 if test "${enable_crypt+set}" = set; then
1814   enableval="$enable_crypt"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1824         fi
1825         ol_enable_crypt="$ol_arg"
1826
1827 else
1828         ol_enable_crypt="no"
1829 fi
1830 # end --enable-crypt
1831 # OpenLDAP --enable-dynamic
1832         # Check whether --enable-dynamic or --disable-dynamic was given.
1833 if test "${enable_dynamic+set}" = set; then
1834   enableval="$enable_dynamic"
1835   
1836         ol_arg=invalid
1837         for ol_val in auto yes no ; do
1838                 if test "$enableval" = "$ol_val" ; then
1839                         ol_arg="$ol_val"
1840                 fi
1841         done
1842         if test "$ol_arg" = "invalid" ; then
1843                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1844         fi
1845         ol_enable_dynamic="$ol_arg"
1846
1847 else
1848         ol_enable_dynamic="no"
1849 fi
1850 # end --enable-dynamic
1851 # OpenLDAP --enable-kpasswd
1852         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1853 if test "${enable_kpasswd+set}" = set; then
1854   enableval="$enable_kpasswd"
1855   
1856         ol_arg=invalid
1857         for ol_val in auto yes no ; do
1858                 if test "$enableval" = "$ol_val" ; then
1859                         ol_arg="$ol_val"
1860                 fi
1861         done
1862         if test "$ol_arg" = "invalid" ; then
1863                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1864         fi
1865         ol_enable_kpasswd="$ol_arg"
1866
1867 else
1868         ol_enable_kpasswd="no"
1869 fi
1870 # end --enable-kpasswd
1871 # OpenLDAP --enable-lmpasswd
1872         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1873 if test "${enable_lmpasswd+set}" = set; then
1874   enableval="$enable_lmpasswd"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1884         fi
1885         ol_enable_lmpasswd="$ol_arg"
1886
1887 else
1888         ol_enable_lmpasswd="no"
1889 fi
1890 # end --enable-lmpasswd
1891 # OpenLDAP --enable-spasswd
1892         # Check whether --enable-spasswd or --disable-spasswd was given.
1893 if test "${enable_spasswd+set}" = set; then
1894   enableval="$enable_spasswd"
1895   
1896         ol_arg=invalid
1897         for ol_val in auto yes no ; do
1898                 if test "$enableval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1904         fi
1905         ol_enable_spasswd="$ol_arg"
1906
1907 else
1908         ol_enable_spasswd="no"
1909 fi
1910 # end --enable-spasswd
1911 # OpenLDAP --enable-modules
1912         # Check whether --enable-modules or --disable-modules was given.
1913 if test "${enable_modules+set}" = set; then
1914   enableval="$enable_modules"
1915   
1916         ol_arg=invalid
1917         for ol_val in auto yes no ; do
1918                 if test "$enableval" = "$ol_val" ; then
1919                         ol_arg="$ol_val"
1920                 fi
1921         done
1922         if test "$ol_arg" = "invalid" ; then
1923                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1924         fi
1925         ol_enable_modules="$ol_arg"
1926
1927 else
1928         ol_enable_modules="no"
1929 fi
1930 # end --enable-modules
1931 # OpenLDAP --enable-phonetic
1932         # Check whether --enable-phonetic or --disable-phonetic was given.
1933 if test "${enable_phonetic+set}" = set; then
1934   enableval="$enable_phonetic"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1944         fi
1945         ol_enable_phonetic="$ol_arg"
1946
1947 else
1948         ol_enable_phonetic="no"
1949 fi
1950 # end --enable-phonetic
1951 # OpenLDAP --enable-rlookups
1952         # Check whether --enable-rlookups or --disable-rlookups was given.
1953 if test "${enable_rlookups+set}" = set; then
1954   enableval="$enable_rlookups"
1955   
1956         ol_arg=invalid
1957         for ol_val in auto yes no ; do
1958                 if test "$enableval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1964         fi
1965         ol_enable_rlookups="$ol_arg"
1966
1967 else
1968         ol_enable_rlookups="no"
1969 fi
1970 # end --enable-rlookups
1971 # OpenLDAP --enable-slp
1972         # Check whether --enable-slp or --disable-slp was given.
1973 if test "${enable_slp+set}" = set; then
1974   enableval="$enable_slp"
1975   
1976         ol_arg=invalid
1977         for ol_val in auto yes no ; do
1978                 if test "$enableval" = "$ol_val" ; then
1979                         ol_arg="$ol_val"
1980                 fi
1981         done
1982         if test "$ol_arg" = "invalid" ; then
1983                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1984         fi
1985         ol_enable_slp="$ol_arg"
1986
1987 else
1988         ol_enable_slp="no"
1989 fi
1990 # end --enable-slp
1991 # OpenLDAP --enable-wrappers
1992         # Check whether --enable-wrappers or --disable-wrappers was given.
1993 if test "${enable_wrappers+set}" = set; then
1994   enableval="$enable_wrappers"
1995   
1996         ol_arg=invalid
1997         for ol_val in auto yes no ; do
1998                 if test "$enableval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
2004         fi
2005         ol_enable_wrappers="$ol_arg"
2006
2007 else
2008         ol_enable_wrappers="no"
2009 fi
2010 # end --enable-wrappers
2011
2012 # OpenLDAP --enable-bdb
2013         # Check whether --enable-bdb or --disable-bdb was given.
2014 if test "${enable_bdb+set}" = set; then
2015   enableval="$enable_bdb"
2016   
2017         ol_arg=invalid
2018         for ol_val in auto yes no ; do
2019                 if test "$enableval" = "$ol_val" ; then
2020                         ol_arg="$ol_val"
2021                 fi
2022         done
2023         if test "$ol_arg" = "invalid" ; then
2024                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2025         fi
2026         ol_enable_bdb="$ol_arg"
2027
2028 else
2029         ol_enable_bdb="yes"
2030 fi
2031 # end --enable-bdb
2032 # OpenLDAP --with-bdb_module
2033         # Check whether --with-bdb_module or --without-bdb_module was given.
2034 if test "${with_bdb_module+set}" = set; then
2035   withval="$with_bdb_module"
2036   
2037         ol_arg=invalid
2038         for ol_val in static dynamic ; do
2039                 if test "$withval" = "$ol_val" ; then
2040                         ol_arg="$ol_val"
2041                 fi
2042         done
2043         if test "$ol_arg" = "invalid" ; then
2044                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2045         fi
2046         ol_with_bdb_module="$ol_arg"
2047
2048 else
2049         ol_with_bdb_module="static"
2050 fi
2051 # end --with-bdb_module
2052
2053 # OpenLDAP --enable-dnssrv
2054         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2055 if test "${enable_dnssrv+set}" = set; then
2056   enableval="$enable_dnssrv"
2057   
2058         ol_arg=invalid
2059         for ol_val in auto yes no ; do
2060                 if test "$enableval" = "$ol_val" ; then
2061                         ol_arg="$ol_val"
2062                 fi
2063         done
2064         if test "$ol_arg" = "invalid" ; then
2065                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2066         fi
2067         ol_enable_dnssrv="$ol_arg"
2068
2069 else
2070         ol_enable_dnssrv="no"
2071 fi
2072 # end --enable-dnssrv
2073 # OpenLDAP --with-dnssrv_module
2074         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2075 if test "${with_dnssrv_module+set}" = set; then
2076   withval="$with_dnssrv_module"
2077   
2078         ol_arg=invalid
2079         for ol_val in static dynamic ; do
2080                 if test "$withval" = "$ol_val" ; then
2081                         ol_arg="$ol_val"
2082                 fi
2083         done
2084         if test "$ol_arg" = "invalid" ; then
2085                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2086         fi
2087         ol_with_dnssrv_module="$ol_arg"
2088
2089 else
2090         ol_with_dnssrv_module="static"
2091 fi
2092 # end --with-dnssrv_module
2093
2094 # OpenLDAP --enable-ldap
2095         # Check whether --enable-ldap or --disable-ldap was given.
2096 if test "${enable_ldap+set}" = set; then
2097   enableval="$enable_ldap"
2098   
2099         ol_arg=invalid
2100         for ol_val in auto yes no ; do
2101                 if test "$enableval" = "$ol_val" ; then
2102                         ol_arg="$ol_val"
2103                 fi
2104         done
2105         if test "$ol_arg" = "invalid" ; then
2106                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2107         fi
2108         ol_enable_ldap="$ol_arg"
2109
2110 else
2111         ol_enable_ldap="no"
2112 fi
2113 # end --enable-ldap
2114 # OpenLDAP --with-ldap_module
2115         # Check whether --with-ldap_module or --without-ldap_module was given.
2116 if test "${with_ldap_module+set}" = set; then
2117   withval="$with_ldap_module"
2118   
2119         ol_arg=invalid
2120         for ol_val in static dynamic ; do
2121                 if test "$withval" = "$ol_val" ; then
2122                         ol_arg="$ol_val"
2123                 fi
2124         done
2125         if test "$ol_arg" = "invalid" ; then
2126                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2127         fi
2128         ol_with_ldap_module="$ol_arg"
2129
2130 else
2131         ol_with_ldap_module="static"
2132 fi
2133 # end --with-ldap_module
2134
2135 # OpenLDAP --enable-ldbm
2136         # Check whether --enable-ldbm or --disable-ldbm was given.
2137 if test "${enable_ldbm+set}" = set; then
2138   enableval="$enable_ldbm"
2139   
2140         ol_arg=invalid
2141         for ol_val in auto yes no ; do
2142                 if test "$enableval" = "$ol_val" ; then
2143                         ol_arg="$ol_val"
2144                 fi
2145         done
2146         if test "$ol_arg" = "invalid" ; then
2147                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2148         fi
2149         ol_enable_ldbm="$ol_arg"
2150
2151 else
2152         ol_enable_ldbm="no"
2153 fi
2154 # end --enable-ldbm
2155 # OpenLDAP --with-ldbm_api
2156         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2157 if test "${with_ldbm_api+set}" = set; then
2158   withval="$with_ldbm_api"
2159   
2160         ol_arg=invalid
2161         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2162                 if test "$withval" = "$ol_val" ; then
2163                         ol_arg="$ol_val"
2164                 fi
2165         done
2166         if test "$ol_arg" = "invalid" ; then
2167                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2168         fi
2169         ol_with_ldbm_api="$ol_arg"
2170
2171 else
2172         ol_with_ldbm_api="auto"
2173 fi
2174 # end --with-ldbm_api
2175
2176 # OpenLDAP --with-ldbm_module
2177         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2178 if test "${with_ldbm_module+set}" = set; then
2179   withval="$with_ldbm_module"
2180   
2181         ol_arg=invalid
2182         for ol_val in static dynamic ; do
2183                 if test "$withval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2189         fi
2190         ol_with_ldbm_module="$ol_arg"
2191
2192 else
2193         ol_with_ldbm_module="static"
2194 fi
2195 # end --with-ldbm_module
2196
2197 # OpenLDAP --with-ldbm_type
2198         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2199 if test "${with_ldbm_type+set}" = set; then
2200   withval="$with_ldbm_type"
2201   
2202         ol_arg=invalid
2203         for ol_val in auto btree hash ; do
2204                 if test "$withval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2210         fi
2211         ol_with_ldbm_type="$ol_arg"
2212
2213 else
2214         ol_with_ldbm_type="auto"
2215 fi
2216 # end --with-ldbm_type
2217
2218 # OpenLDAP --enable-meta
2219         # Check whether --enable-meta or --disable-meta was given.
2220 if test "${enable_meta+set}" = set; then
2221   enableval="$enable_meta"
2222   
2223         ol_arg=invalid
2224         for ol_val in auto yes no ; do
2225                 if test "$enableval" = "$ol_val" ; then
2226                         ol_arg="$ol_val"
2227                 fi
2228         done
2229         if test "$ol_arg" = "invalid" ; then
2230                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2231         fi
2232         ol_enable_meta="$ol_arg"
2233
2234 else
2235         ol_enable_meta="no"
2236 fi
2237 # end --enable-meta
2238 # OpenLDAP --with-meta_module
2239         # Check whether --with-meta_module or --without-meta_module was given.
2240 if test "${with_meta_module+set}" = set; then
2241   withval="$with_meta_module"
2242   
2243         ol_arg=invalid
2244         for ol_val in static dynamic ; do
2245                 if test "$withval" = "$ol_val" ; then
2246                         ol_arg="$ol_val"
2247                 fi
2248         done
2249         if test "$ol_arg" = "invalid" ; then
2250                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2251         fi
2252         ol_with_meta_module="$ol_arg"
2253
2254 else
2255         ol_with_meta_module="static"
2256 fi
2257 # end --with-meta_module
2258
2259 # OpenLDAP --enable-monitor
2260         # Check whether --enable-monitor or --disable-monitor was given.
2261 if test "${enable_monitor+set}" = set; then
2262   enableval="$enable_monitor"
2263   
2264         ol_arg=invalid
2265         for ol_val in auto yes no ; do
2266                 if test "$enableval" = "$ol_val" ; then
2267                         ol_arg="$ol_val"
2268                 fi
2269         done
2270         if test "$ol_arg" = "invalid" ; then
2271                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2272         fi
2273         ol_enable_monitor="$ol_arg"
2274
2275 else
2276         ol_enable_monitor="no"
2277 fi
2278 # end --enable-monitor
2279 # OpenLDAP --with-monitor_module
2280         # Check whether --with-monitor_module or --without-monitor_module was given.
2281 if test "${with_monitor_module+set}" = set; then
2282   withval="$with_monitor_module"
2283   
2284         ol_arg=invalid
2285         for ol_val in static dynamic ; do
2286                 if test "$withval" = "$ol_val" ; then
2287                         ol_arg="$ol_val"
2288                 fi
2289         done
2290         if test "$ol_arg" = "invalid" ; then
2291                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2292         fi
2293         ol_with_monitor_module="$ol_arg"
2294
2295 else
2296         ol_with_monitor_module="static"
2297 fi
2298 # end --with-monitor_module
2299
2300 # OpenLDAP --enable-null
2301         # Check whether --enable-null or --disable-null was given.
2302 if test "${enable_null+set}" = set; then
2303   enableval="$enable_null"
2304   
2305         ol_arg=invalid
2306         for ol_val in auto yes no ; do
2307                 if test "$enableval" = "$ol_val" ; then
2308                         ol_arg="$ol_val"
2309                 fi
2310         done
2311         if test "$ol_arg" = "invalid" ; then
2312                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2313         fi
2314         ol_enable_null="$ol_arg"
2315
2316 else
2317         ol_enable_null="no"
2318 fi
2319 # end --enable-null
2320 # OpenLDAP --with-null_module
2321         # Check whether --with-null_module or --without-null_module was given.
2322 if test "${with_null_module+set}" = set; then
2323   withval="$with_null_module"
2324   
2325         ol_arg=invalid
2326         for ol_val in static dynamic ; do
2327                 if test "$withval" = "$ol_val" ; then
2328                         ol_arg="$ol_val"
2329                 fi
2330         done
2331         if test "$ol_arg" = "invalid" ; then
2332                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2333         fi
2334         ol_with_null_module="$ol_arg"
2335
2336 else
2337         ol_with_null_module="static"
2338 fi
2339 # end --with-null_module
2340
2341 # OpenLDAP --enable-passwd
2342         # Check whether --enable-passwd or --disable-passwd was given.
2343 if test "${enable_passwd+set}" = set; then
2344   enableval="$enable_passwd"
2345   
2346         ol_arg=invalid
2347         for ol_val in auto yes no ; do
2348                 if test "$enableval" = "$ol_val" ; then
2349                         ol_arg="$ol_val"
2350                 fi
2351         done
2352         if test "$ol_arg" = "invalid" ; then
2353                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2354         fi
2355         ol_enable_passwd="$ol_arg"
2356
2357 else
2358         ol_enable_passwd="no"
2359 fi
2360 # end --enable-passwd
2361 # OpenLDAP --with-passwd_module
2362         # Check whether --with-passwd_module or --without-passwd_module was given.
2363 if test "${with_passwd_module+set}" = set; then
2364   withval="$with_passwd_module"
2365   
2366         ol_arg=invalid
2367         for ol_val in static dynamic ; do
2368                 if test "$withval" = "$ol_val" ; then
2369                         ol_arg="$ol_val"
2370                 fi
2371         done
2372         if test "$ol_arg" = "invalid" ; then
2373                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2374         fi
2375         ol_with_passwd_module="$ol_arg"
2376
2377 else
2378         ol_with_passwd_module="static"
2379 fi
2380 # end --with-passwd_module
2381
2382 # OpenLDAP --enable-perl
2383         # Check whether --enable-perl or --disable-perl was given.
2384 if test "${enable_perl+set}" = set; then
2385   enableval="$enable_perl"
2386   
2387         ol_arg=invalid
2388         for ol_val in auto yes no ; do
2389                 if test "$enableval" = "$ol_val" ; then
2390                         ol_arg="$ol_val"
2391                 fi
2392         done
2393         if test "$ol_arg" = "invalid" ; then
2394                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2395         fi
2396         ol_enable_perl="$ol_arg"
2397
2398 else
2399         ol_enable_perl="no"
2400 fi
2401 # end --enable-perl
2402 # OpenLDAP --with-perl_module
2403         # Check whether --with-perl_module or --without-perl_module was given.
2404 if test "${with_perl_module+set}" = set; then
2405   withval="$with_perl_module"
2406   
2407         ol_arg=invalid
2408         for ol_val in static dynamic ; do
2409                 if test "$withval" = "$ol_val" ; then
2410                         ol_arg="$ol_val"
2411                 fi
2412         done
2413         if test "$ol_arg" = "invalid" ; then
2414                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2415         fi
2416         ol_with_perl_module="$ol_arg"
2417
2418 else
2419         ol_with_perl_module="static"
2420 fi
2421 # end --with-perl_module
2422
2423 # OpenLDAP --enable-shell
2424         # Check whether --enable-shell or --disable-shell was given.
2425 if test "${enable_shell+set}" = set; then
2426   enableval="$enable_shell"
2427   
2428         ol_arg=invalid
2429         for ol_val in auto yes no ; do
2430                 if test "$enableval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2436         fi
2437         ol_enable_shell="$ol_arg"
2438
2439 else
2440         ol_enable_shell="no"
2441 fi
2442 # end --enable-shell
2443 # OpenLDAP --with-shell_module
2444         # Check whether --with-shell_module or --without-shell_module was given.
2445 if test "${with_shell_module+set}" = set; then
2446   withval="$with_shell_module"
2447   
2448         ol_arg=invalid
2449         for ol_val in static dynamic ; do
2450                 if test "$withval" = "$ol_val" ; then
2451                         ol_arg="$ol_val"
2452                 fi
2453         done
2454         if test "$ol_arg" = "invalid" ; then
2455                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2456         fi
2457         ol_with_shell_module="$ol_arg"
2458
2459 else
2460         ol_with_shell_module="static"
2461 fi
2462 # end --with-shell_module
2463
2464 # OpenLDAP --enable-sql
2465         # Check whether --enable-sql or --disable-sql was given.
2466 if test "${enable_sql+set}" = set; then
2467   enableval="$enable_sql"
2468   
2469         ol_arg=invalid
2470         for ol_val in auto yes no ; do
2471                 if test "$enableval" = "$ol_val" ; then
2472                         ol_arg="$ol_val"
2473                 fi
2474         done
2475         if test "$ol_arg" = "invalid" ; then
2476                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2477         fi
2478         ol_enable_sql="$ol_arg"
2479
2480 else
2481         ol_enable_sql="no"
2482 fi
2483 # end --enable-sql
2484 # OpenLDAP --with-sql_module
2485         # Check whether --with-sql_module or --without-sql_module was given.
2486 if test "${with_sql_module+set}" = set; then
2487   withval="$with_sql_module"
2488   
2489         ol_arg=invalid
2490         for ol_val in static dynamic ; do
2491                 if test "$withval" = "$ol_val" ; then
2492                         ol_arg="$ol_val"
2493                 fi
2494         done
2495         if test "$ol_arg" = "invalid" ; then
2496                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2497         fi
2498         ol_with_sql_module="$ol_arg"
2499
2500 else
2501         ol_with_sql_module="static"
2502 fi
2503 # end --with-sql_module
2504
2505 # OpenLDAP --enable-tcl
2506         # Check whether --enable-tcl or --disable-tcl was given.
2507 if test "${enable_tcl+set}" = set; then
2508   enableval="$enable_tcl"
2509   
2510         ol_arg=invalid
2511         for ol_val in auto yes no ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2518         fi
2519         ol_enable_tcl="$ol_arg"
2520
2521 else
2522         ol_enable_tcl="no"
2523 fi
2524 # end --enable-tcl
2525 # OpenLDAP --with-tcl_module
2526         # Check whether --with-tcl_module or --without-tcl_module was given.
2527 if test "${with_tcl_module+set}" = set; then
2528   withval="$with_tcl_module"
2529   
2530         ol_arg=invalid
2531         for ol_val in static dynamic ; do
2532                 if test "$withval" = "$ol_val" ; then
2533                         ol_arg="$ol_val"
2534                 fi
2535         done
2536         if test "$ol_arg" = "invalid" ; then
2537                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2538         fi
2539         ol_with_tcl_module="$ol_arg"
2540
2541 else
2542         ol_with_tcl_module="static"
2543 fi
2544 # end --with-tcl_module
2545
2546
2547 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2548 if test "${with_xxslurpdoptions+set}" = set; then
2549   withval="$with_xxslurpdoptions"
2550   :
2551 fi
2552
2553 # OpenLDAP --enable-slurpd
2554         # Check whether --enable-slurpd or --disable-slurpd was given.
2555 if test "${enable_slurpd+set}" = set; then
2556   enableval="$enable_slurpd"
2557   
2558         ol_arg=invalid
2559         for ol_val in auto yes no ; do
2560                 if test "$enableval" = "$ol_val" ; then
2561                         ol_arg="$ol_val"
2562                 fi
2563         done
2564         if test "$ol_arg" = "invalid" ; then
2565                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2566         fi
2567         ol_enable_slurpd="$ol_arg"
2568
2569 else
2570         ol_enable_slurpd="auto"
2571 fi
2572 # end --enable-slurpd
2573
2574 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2575 if test "${with_xxliboptions+set}" = set; then
2576   withval="$with_xxliboptions"
2577   :
2578 fi
2579
2580 # Check whether --enable-static or --disable-static was given.
2581 if test "${enable_static+set}" = set; then
2582   enableval="$enable_static"
2583   p=${PACKAGE-default}
2584 case $enableval in
2585 yes) enable_static=yes ;;
2586 no) enable_static=no ;;
2587 *)
2588   enable_static=no
2589   # Look at the argument we got.  We use all the common list separators.
2590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2591   for pkg in $enableval; do
2592     if test "X$pkg" = "X$p"; then
2593       enable_static=yes
2594     fi
2595   done
2596   IFS="$ac_save_ifs"
2597   ;;
2598 esac
2599 else
2600   enable_static=yes
2601 fi
2602
2603 # Check whether --enable-shared or --disable-shared was given.
2604 if test "${enable_shared+set}" = set; then
2605   enableval="$enable_shared"
2606   p=${PACKAGE-default}
2607 case $enableval in
2608 yes) enable_shared=yes ;;
2609 no) enable_shared=no ;;
2610 *)
2611   enable_shared=no
2612   # Look at the argument we got.  We use all the common list separators.
2613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2614   for pkg in $enableval; do
2615     if test "X$pkg" = "X$p"; then
2616       enable_shared=yes
2617     fi
2618   done
2619   IFS="$ac_save_ifs"
2620   ;;
2621 esac
2622 else
2623   enable_shared=yes
2624 fi
2625
2626
2627
2628 # validate options
2629 if test $ol_enable_slapd = no ; then
2630                 if test $ol_enable_bdb = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2632         fi
2633         if test $ol_enable_dnssrv = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2635         fi
2636         if test $ol_enable_ldap = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2638         fi
2639         if test $ol_enable_ldbm = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2641         fi
2642         if test $ol_enable_meta = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2644         fi
2645         if test $ol_enable_monitor = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2647         fi
2648         if test $ol_enable_null = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2650         fi
2651         if test $ol_enable_passwd = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2653         fi
2654         if test $ol_enable_perl = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2656         fi
2657         if test $ol_enable_shell = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2659         fi
2660         if test $ol_enable_tcl = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2662         fi
2663         if test $ol_enable_sql = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2665         fi
2666         if test $ol_enable_modules = yes ; then
2667                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2668         fi
2669         if test $ol_enable_wrappers = yes ; then
2670                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2671         fi
2672         if test $ol_enable_phonetic = yes ; then
2673                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2674         fi
2675         if test $ol_enable_rlookups = yes ; then
2676                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2677         fi
2678         if test $ol_enable_aci = yes ; then
2679                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2680         fi
2681         if test $ol_with_ldbm_api != auto ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2683         fi
2684         if test $ol_with_ldbm_type != auto ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2686         fi
2687         if test $ol_with_bdb_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2689         fi
2690         if test $ol_with_dnssrv_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2692         fi
2693         if test $ol_with_ldap_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2695         fi
2696         if test $ol_with_ldbm_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2698         fi
2699         if test $ol_with_meta_module != static ; then
2700                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2701         fi
2702         if test $ol_with_monitor_module != static ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2704         fi
2705         if test $ol_with_null_module != static ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2707         fi
2708         if test $ol_with_passwd_module != static ; then
2709                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2710         fi
2711         if test $ol_with_perl_module != static ; then
2712                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2713         fi
2714         if test $ol_with_shell_module != static ; then
2715                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2716         fi
2717         if test $ol_with_tcl_module != static ; then
2718                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2719         fi
2720         if test $ol_with_sql_module != static ; then
2721                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2722         fi
2723         if test $ol_enable_slurpd = yes ; then
2724                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2725         fi
2726         if test $ol_enable_rewrite = yes ; then
2727                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2728         fi
2729
2730         # force settings to no
2731         ol_enable_bdb=no
2732         ol_enable_dnssrv=no
2733         ol_enable_ldap=no
2734         ol_enable_ldbm=no
2735         ol_enable_meta=no
2736         ol_enable_monitor=no
2737         ol_enable_null=no
2738         ol_enable_passwd=no
2739         ol_enable_perl=no
2740         ol_enable_shell=no
2741         ol_enable_tcl=no
2742         ol_enable_sql=no
2743
2744         ol_enable_modules=no
2745         ol_enable_phonetic=no
2746         ol_enable_rlookups=no
2747         ol_enable_aci=no
2748         ol_enable_wrappers=no
2749         ol_enable_dynamic=no
2750
2751         ol_with_ldbm_api=no
2752         ol_with_ldbm_type=no
2753
2754         ol_with_bdb_module=static
2755         ol_with_dnssrv_module=static
2756         ol_with_ldap_module=static
2757         ol_with_ldbm_module=static
2758         ol_with_meta_module=static
2759         ol_with_monitor_module=static
2760         ol_with_null_module=static
2761         ol_with_passwd_module=static
2762         ol_with_perl_module=static
2763         ol_with_shell_module=static
2764         ol_with_tcl_module=static
2765         ol_with_sql_module=static
2766
2767         ol_enable_slurpd=no
2768
2769         ol_enable_rewrite=no
2770
2771 elif test $ol_enable_ldbm = no ; then
2772         
2773         if test $ol_with_ldbm_api != auto ; then
2774                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2775         fi
2776
2777         if test $ol_with_ldbm_type != auto ; then
2778                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2779         fi
2780
2781         if test $ol_with_ldbm_module != static ; then
2782                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2783         fi
2784
2785         if test $ol_enable_modules != yes -a \
2786                 $ol_enable_bdb = no -a \
2787                 $ol_enable_dnssrv = no -a \
2788                 $ol_enable_ldap = no -a \
2789                 $ol_enable_meta = no -a \
2790                 $ol_enable_monitor = no -a \
2791                 $ol_enable_null = no -a \
2792                 $ol_enable_passwd = no -a \
2793                 $ol_enable_perl = no -a \
2794                 $ol_enable_shell = no -a \
2795                 $ol_enable_sql = no -a \
2796                 $ol_enable_tcl = no ; then
2797
2798                 if test $ol_enable_slapd = yes ; then
2799                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2800                 else
2801                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2802                         ol_enable_slapd=no
2803                 fi
2804         fi
2805
2806         ol_with_ldbm_api=no
2807         ol_with_ldbm_type=no
2808         ol_with_ldbm_module=static
2809
2810         if test $ol_enable_bdb != no ; then
2811                 ol_with_ldbm_api=berkeley
2812         fi
2813
2814 else
2815                 if test $ol_with_ldbm_api = gdbm -a \
2816                 $ol_with_ldbm_type = btree ; then
2817                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2818         fi
2819         if test $ol_with_ldbm_api = mdbm -a \
2820                 $ol_with_ldbm_type = btree ; then
2821                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2822         fi
2823         if test $ol_with_ldbm_api = ndbm -a \
2824                 $ol_with_ldbm_type = btree ; then
2825                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2826         fi
2827
2828         if test $ol_enable_bdb = yes ; then
2829                 if test $ol_with_ldbm_api = auto ; then
2830                         ol_with_ldbm_api=berkeley
2831                 elif test $ol_with_ldbm_api != berkeley ; then
2832                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2833                 fi
2834
2835         elif test $ol_enable_bdb = auto ; then
2836                 if test $ol_with_ldbm_api != berkeley \
2837                         -o $ol_with_ldbm_api != auto ; then
2838                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2839                         ol_enable_bdb=no
2840                 fi
2841         fi
2842 fi
2843
2844 if test $ol_enable_slurpd = yes ; then
2845                 if test $ol_with_threads = no ; then
2846                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2847         fi
2848 fi
2849
2850 if test $ol_enable_lmpasswd = yes ; then
2851         if test $ol_with_tls = no ; then
2852                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2853         fi
2854 fi
2855
2856 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2857         if test $ol_with_kerberos = no ; then
2858                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2859         elif test $ol_with_kerberos = auto ; then
2860                 ol_with_kerberos=yes
2861         fi
2862
2863 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2864         if test $ol_with_kerberos = auto ; then
2865                 ol_with_kerberos=no
2866         elif test $ol_with_kerberos != no ; then
2867                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2868                 ol_with_kerberos=no
2869         fi
2870 fi
2871
2872 if test $ol_enable_spasswd = yes ; then
2873         if test $ol_with_cyrus_sasl = no ; then
2874                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2875         fi
2876         ol_with_cyrus_sasl=yes
2877 fi
2878
2879 echo "$ac_t""done" 1>&6
2880
2881 LDAP_LIBS=
2882 LDIF_LIBS=
2883 LDBM_LIB=
2884 LDBM_LIBS=
2885 LTHREAD_LIBS=
2886 LUTIL_LIBS=
2887
2888 SLAPD_LIBS=
2889 SLURPD_LIBS=
2890
2891 BUILD_SLAPD=no
2892 BUILD_SLURPD=no
2893
2894 BUILD_THREAD=no
2895
2896 BUILD_BDB=no
2897 BUILD_DNSSRV=no
2898 BUILD_LDAP=no
2899 BUILD_LDBM=no
2900 BUILD_META=no
2901 BUILD_MONITOR=no
2902 BUILD_NULL=no
2903 BUILD_PASSWD=no
2904 BUILD_PERL=no
2905 BUILD_SHELL=no
2906 BUILD_SQL=no
2907 BUILD_TCL=no
2908
2909 BUILD_BDB_DYNAMIC=static
2910 BUILD_DNSSRV_DYNAMIC=static
2911 BUILD_LDAP_DYNAMIC=static
2912 BUILD_LDBM_DYNAMIC=static
2913 BUILD_META_DYNAMIC=static
2914 BUILD_MONITOR_DYNAMIC=static
2915 BUILD_NULL_DYNAMIC=static
2916 BUILD_PASSWD_DYNAMIC=static
2917 BUILD_PERL_DYNAMIC=static
2918 BUILD_SHELL_DYNAMIC=static
2919 BUILD_TCL_DYNAMIC=static
2920 BUILD_SQL_DYNAMIC=static
2921
2922 SLAPD_MODULES_LDFLAGS=
2923 SLAPD_MODULES_CPPFLAGS=
2924 SLAPD_MODULES_LIST=
2925
2926 SLAPD_STATIC_BACKENDS=
2927 SLAPD_DYNAMIC_BACKENDS=
2928
2929 SLAPD_PERL_LDFLAGS=
2930 MOD_PERL_LDFLAGS=
2931 PERL_CPPFLAGS=
2932
2933 SLAPD_SQL_LDFLAGS=
2934 SLAPD_SQL_LIBS=
2935 SLAPD_SQL_INCLUDES=
2936
2937 MOD_TCL_LIB=
2938 KRB4_LIBS=
2939 KRB5_LIBS=
2940 READLINE_LIBS=
2941 SASL_LIBS=
2942 TERMCAP_LIBS=
2943 TLS_LIBS=
2944 MODULES_LIBS=
2945 AUTH_LIBS=
2946
2947 SLAPD_SLP_LIBS=
2948
2949
2950 # Find a good install program.  We prefer a C program (faster),
2951 # so one script is as good as another.  But avoid the broken or
2952 # incompatible versions:
2953 # SysV /etc/install, /usr/sbin/install
2954 # SunOS /usr/etc/install
2955 # IRIX /sbin/install
2956 # AIX /bin/install
2957 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2958 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2959 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2960 # ./install, which can be erroneously created by make from ./install.sh.
2961 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2962 echo "configure:2963: checking for a BSD compatible install" >&5
2963 if test -z "$INSTALL"; then
2964 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2968   for ac_dir in $PATH; do
2969     # Account for people who put trailing slashes in PATH elements.
2970     case "$ac_dir/" in
2971     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2972     *)
2973       # OSF1 and SCO ODT 3.0 have their own names for install.
2974       # Don't use installbsd from OSF since it installs stuff as root
2975       # by default.
2976       for ac_prog in ginstall scoinst install; do
2977         if test -f $ac_dir/$ac_prog; then
2978           if test $ac_prog = install &&
2979             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2980             # AIX install.  It has an incompatible calling convention.
2981             :
2982           elif test $ac_prog = install &&
2983             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2984             # program-specific install script used by HP pwplus--don't use.
2985             :
2986           else
2987             ac_cv_path_install="$ac_dir/$ac_prog -c"
2988             break 2
2989           fi
2990         fi
2991       done
2992       ;;
2993     esac
2994   done
2995   IFS="$ac_save_IFS"
2996
2997 fi
2998   if test "${ac_cv_path_install+set}" = set; then
2999     INSTALL="$ac_cv_path_install"
3000   else
3001     # As a last resort, use the slow shell script.  We don't cache a
3002     # path for INSTALL within a source directory, because that will
3003     # break other packages using the cache if that directory is
3004     # removed, or if the path is relative.
3005     INSTALL="$ac_install_sh"
3006   fi
3007 fi
3008 echo "$ac_t""$INSTALL" 1>&6
3009
3010 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3011 # It thinks the first close brace ends the variable substitution.
3012 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3013
3014 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3015
3016 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3017
3018
3019 cat >> confdefs.h <<\EOF
3020 #define HAVE_MKVERSION 1
3021 EOF
3022
3023
3024
3025
3026 ol_aix_threads=no
3027 case "$target" in
3028 *-*-aix*)       if test -z "$CC" ; then
3029                 case "$ol_with_threads" in
3030                 auto | yes |  posix) ol_aix_threads=yes ;;
3031                 esac
3032         fi
3033 ;;
3034 esac
3035
3036 if test $ol_aix_threads = yes ; then
3037         if test -z "${CC}" ; then
3038                 for ac_prog in cc_r xlc_r cc
3039 do
3040 # Extract the first word of "$ac_prog", so it can be a program name with args.
3041 set dummy $ac_prog; ac_word=$2
3042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3043 echo "configure:3044: checking for $ac_word" >&5
3044 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   if test -n "$CC"; then
3048   ac_cv_prog_CC="$CC" # Let the user override the test.
3049 else
3050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3051   ac_dummy="$PATH"
3052   for ac_dir in $ac_dummy; do
3053     test -z "$ac_dir" && ac_dir=.
3054     if test -f $ac_dir/$ac_word; then
3055       ac_cv_prog_CC="$ac_prog"
3056       break
3057     fi
3058   done
3059   IFS="$ac_save_ifs"
3060 fi
3061 fi
3062 CC="$ac_cv_prog_CC"
3063 if test -n "$CC"; then
3064   echo "$ac_t""$CC" 1>&6
3065 else
3066   echo "$ac_t""no" 1>&6
3067 fi
3068
3069 test -n "$CC" && break
3070 done
3071
3072
3073                 if test "$CC" = cc ; then
3074                                                 if test $ol_with_threads != auto ; then
3075                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3076                         else
3077                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3078                         fi
3079                         ol_with_threads=no
3080                 fi
3081         fi
3082
3083         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3084                 ol_with_threads=posix
3085                 ol_cv_pthread_create=yes
3086         fi
3087 fi
3088
3089 if test -z "${CC}"; then
3090         for ac_prog in cc
3091 do
3092 # Extract the first word of "$ac_prog", so it can be a program name with args.
3093 set dummy $ac_prog; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   if test -n "$CC"; then
3100   ac_cv_prog_CC="$CC" # Let the user override the test.
3101 else
3102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3103   ac_dummy="$PATH"
3104   for ac_dir in $ac_dummy; do
3105     test -z "$ac_dir" && ac_dir=.
3106     if test -f $ac_dir/$ac_word; then
3107       ac_cv_prog_CC="$ac_prog"
3108       break
3109     fi
3110   done
3111   IFS="$ac_save_ifs"
3112 fi
3113 fi
3114 CC="$ac_cv_prog_CC"
3115 if test -n "$CC"; then
3116   echo "$ac_t""$CC" 1>&6
3117 else
3118   echo "$ac_t""no" 1>&6
3119 fi
3120
3121 test -n "$CC" && break
3122 done
3123
3124 fi
3125
3126
3127 for ac_prog in ar gar
3128 do
3129 # Extract the first word of "$ac_prog", so it can be a program name with args.
3130 set dummy $ac_prog; ac_word=$2
3131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3132 echo "configure:3133: checking for $ac_word" >&5
3133 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   if test -n "$AR"; then
3137   ac_cv_prog_AR="$AR" # Let the user override the test.
3138 else
3139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3140   ac_dummy="$PATH"
3141   for ac_dir in $ac_dummy; do
3142     test -z "$ac_dir" && ac_dir=.
3143     if test -f $ac_dir/$ac_word; then
3144       ac_cv_prog_AR="$ac_prog"
3145       break
3146     fi
3147   done
3148   IFS="$ac_save_ifs"
3149 fi
3150 fi
3151 AR="$ac_cv_prog_AR"
3152 if test -n "$AR"; then
3153   echo "$ac_t""$AR" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 test -n "$AR" && break
3159 done
3160 test -n "$AR" || AR="ar"
3161
3162
3163
3164
3165 # Find the correct PATH separator.  Usually this is `:', but
3166 # DJGPP uses `;' like DOS.
3167 if test "X${PATH_SEPARATOR+set}" != Xset; then
3168   UNAME=${UNAME-`uname 2>/dev/null`}
3169   case X$UNAME in
3170     *-DOS) lt_cv_sys_path_separator=';' ;;
3171     *)     lt_cv_sys_path_separator=':' ;;
3172   esac
3173   PATH_SEPARATOR=$lt_cv_sys_path_separator
3174 fi
3175
3176 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3177 echo "configure:3178: checking for Cygwin environment" >&5
3178 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3179   echo $ac_n "(cached) $ac_c" 1>&6
3180 else
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184
3185 int main() {
3186
3187 #ifndef __CYGWIN__
3188 #define __CYGWIN__ __CYGWIN32__
3189 #endif
3190 return __CYGWIN__;
3191 ; return 0; }
3192 EOF
3193 if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3194   rm -rf conftest*
3195   ac_cv_cygwin=yes
3196 else
3197   echo "configure: failed program was:" >&5
3198   cat conftest.$ac_ext >&5
3199   rm -rf conftest*
3200   ac_cv_cygwin=no
3201 fi
3202 rm -f conftest*
3203 fi
3204
3205 echo "$ac_t""$ac_cv_cygwin" 1>&6
3206 CYGWIN=
3207 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3208 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3209 echo "configure:3210: checking for mingw32 environment" >&5
3210 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216
3217 int main() {
3218 return __MINGW32__;
3219 ; return 0; }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3222   rm -rf conftest*
3223   ac_cv_mingw32=yes
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   ac_cv_mingw32=no
3229 fi
3230 rm -f conftest*
3231 fi
3232
3233 echo "$ac_t""$ac_cv_mingw32" 1>&6
3234 MINGW32=
3235 test "$ac_cv_mingw32" = yes && MINGW32=yes
3236 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3237 echo "configure:3238: checking for EMX OS/2 environment" >&5
3238 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3239   echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241   cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244
3245 int main() {
3246 return __EMX__;
3247 ; return 0; }
3248 EOF
3249 if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3250   rm -rf conftest*
3251   ac_cv_emxos2=yes
3252 else
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   ac_cv_emxos2=no
3257 fi
3258 rm -f conftest*
3259 fi
3260
3261 echo "$ac_t""$ac_cv_emxos2" 1>&6
3262 EMXOS2=
3263 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3264 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3265 echo "configure:3266: checking how to run the C preprocessor" >&5
3266 # On Suns, sometimes $CPP names a directory.
3267 if test -n "$CPP" && test -d "$CPP"; then
3268   CPP=
3269 fi
3270 if test -z "$CPP"; then
3271 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3272   echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274     # This must be in double quotes, not single quotes, because CPP may get
3275   # substituted into the Makefile and "${CC-cc}" will confuse make.
3276   CPP="${CC-cc} -E"
3277   # On the NeXT, cc -E runs the code through the compiler's parser,
3278   # not just through cpp.
3279   cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <assert.h>
3283 Syntax Error
3284 EOF
3285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3286 { (eval echo configure:3287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3288 if test -z "$ac_err"; then
3289   :
3290 else
3291   echo "$ac_err" >&5
3292   echo "configure: failed program was:" >&5
3293   cat conftest.$ac_ext >&5
3294   rm -rf conftest*
3295   CPP="${CC-cc} -E -traditional-cpp"
3296   cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 #include <assert.h>
3300 Syntax Error
3301 EOF
3302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3303 { (eval echo configure:3304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3305 if test -z "$ac_err"; then
3306   :
3307 else
3308   echo "$ac_err" >&5
3309   echo "configure: failed program was:" >&5
3310   cat conftest.$ac_ext >&5
3311   rm -rf conftest*
3312   CPP="${CC-cc} -nologo -E"
3313   cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316 #include <assert.h>
3317 Syntax Error
3318 EOF
3319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3320 { (eval echo configure:3321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3322 if test -z "$ac_err"; then
3323   :
3324 else
3325   echo "$ac_err" >&5
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328   rm -rf conftest*
3329   CPP=/lib/cpp
3330 fi
3331 rm -f conftest*
3332 fi
3333 rm -f conftest*
3334 fi
3335 rm -f conftest*
3336   ac_cv_prog_CPP="$CPP"
3337 fi
3338   CPP="$ac_cv_prog_CPP"
3339 else
3340   ac_cv_prog_CPP="$CPP"
3341 fi
3342 echo "$ac_t""$CPP" 1>&6
3343
3344 # Check whether --enable-fast-install or --disable-fast-install was given.
3345 if test "${enable_fast_install+set}" = set; then
3346   enableval="$enable_fast_install"
3347   p=${PACKAGE-default}
3348 case $enableval in
3349 yes) enable_fast_install=yes ;;
3350 no) enable_fast_install=no ;;
3351 *)
3352   enable_fast_install=no
3353   # Look at the argument we got.  We use all the common list separators.
3354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3355   for pkg in $enableval; do
3356     if test "X$pkg" = "X$p"; then
3357       enable_fast_install=yes
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361   ;;
3362 esac
3363 else
3364   enable_fast_install=yes
3365 fi
3366
3367 # Extract the first word of "gcc", so it can be a program name with args.
3368 set dummy gcc; ac_word=$2
3369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3370 echo "configure:3371: checking for $ac_word" >&5
3371 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3372   echo $ac_n "(cached) $ac_c" 1>&6
3373 else
3374   if test -n "$CC"; then
3375   ac_cv_prog_CC="$CC" # Let the user override the test.
3376 else
3377   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3378   ac_dummy="$PATH"
3379   for ac_dir in $ac_dummy; do
3380     test -z "$ac_dir" && ac_dir=.
3381     if test -f $ac_dir/$ac_word; then
3382       ac_cv_prog_CC="gcc"
3383       break
3384     fi
3385   done
3386   IFS="$ac_save_ifs"
3387 fi
3388 fi
3389 CC="$ac_cv_prog_CC"
3390 if test -n "$CC"; then
3391   echo "$ac_t""$CC" 1>&6
3392 else
3393   echo "$ac_t""no" 1>&6
3394 fi
3395
3396 if test -z "$CC"; then
3397   # Extract the first word of "cc", so it can be a program name with args.
3398 set dummy cc; ac_word=$2
3399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3400 echo "configure:3401: checking for $ac_word" >&5
3401 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   if test -n "$CC"; then
3405   ac_cv_prog_CC="$CC" # Let the user override the test.
3406 else
3407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3408   ac_prog_rejected=no
3409   ac_dummy="$PATH"
3410   for ac_dir in $ac_dummy; do
3411     test -z "$ac_dir" && ac_dir=.
3412     if test -f $ac_dir/$ac_word; then
3413       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3414         ac_prog_rejected=yes
3415         continue
3416       fi
3417       ac_cv_prog_CC="cc"
3418       break
3419     fi
3420   done
3421   IFS="$ac_save_ifs"
3422 if test $ac_prog_rejected = yes; then
3423   # We found a bogon in the path, so make sure we never use it.
3424   set dummy $ac_cv_prog_CC
3425   shift
3426   if test $# -gt 0; then
3427     # We chose a different compiler from the bogus one.
3428     # However, it has the same basename, so the bogon will be chosen
3429     # first if we set CC to just the basename; use the full file name.
3430     shift
3431     set dummy "$ac_dir/$ac_word" "$@"
3432     shift
3433     ac_cv_prog_CC="$@"
3434   fi
3435 fi
3436 fi
3437 fi
3438 CC="$ac_cv_prog_CC"
3439 if test -n "$CC"; then
3440   echo "$ac_t""$CC" 1>&6
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444
3445   if test -z "$CC"; then
3446     case "`uname -s`" in
3447     *win32* | *WIN32* | *CYGWIN*)
3448       # Extract the first word of "cl", so it can be a program name with args.
3449 set dummy cl; ac_word=$2
3450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3451 echo "configure:3452: checking for $ac_word" >&5
3452 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3453   echo $ac_n "(cached) $ac_c" 1>&6
3454 else
3455   if test -n "$CC"; then
3456   ac_cv_prog_CC="$CC" # Let the user override the test.
3457 else
3458   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3459   ac_dummy="$PATH"
3460   for ac_dir in $ac_dummy; do
3461     test -z "$ac_dir" && ac_dir=.
3462     if test -f $ac_dir/$ac_word; then
3463       ac_cv_prog_CC="cl"
3464       break
3465     fi
3466   done
3467   IFS="$ac_save_ifs"
3468 fi
3469 fi
3470 CC="$ac_cv_prog_CC"
3471 if test -n "$CC"; then
3472   echo "$ac_t""$CC" 1>&6
3473 else
3474   echo "$ac_t""no" 1>&6
3475 fi
3476  ;;
3477     esac
3478   fi
3479   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3480 fi
3481
3482 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3483 echo "configure:3484: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3484
3485 ac_ext=c
3486 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3487 ac_cpp='$CPP $CPPFLAGS'
3488 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3489 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3490 cross_compiling=$ac_cv_prog_cc_cross
3491
3492 cat > conftest.$ac_ext << EOF
3493
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496
3497 main(){return(0);}
3498 EOF
3499 if { (eval echo configure:3500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3500   ac_cv_prog_cc_works=yes
3501   # If we can't run a trivial program, we are probably using a cross compiler.
3502   if (./conftest; exit) 2>/dev/null; then
3503     ac_cv_prog_cc_cross=no
3504   else
3505     ac_cv_prog_cc_cross=yes
3506   fi
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   ac_cv_prog_cc_works=no
3511 fi
3512 rm -fr conftest*
3513 ac_ext=c
3514 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3517 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3518 cross_compiling=$ac_cv_prog_cc_cross
3519
3520 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3521 if test $ac_cv_prog_cc_works = no; then
3522   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3523 fi
3524 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3526 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3527 cross_compiling=$ac_cv_prog_cc_cross
3528
3529 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3530 echo "configure:3531: checking whether we are using GNU C" >&5
3531 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   cat > conftest.c <<EOF
3535 #ifdef __GNUC__
3536   yes;
3537 #endif
3538 EOF
3539 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3540   ac_cv_prog_gcc=yes
3541 else
3542   ac_cv_prog_gcc=no
3543 fi
3544 fi
3545
3546 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3547
3548 if test $ac_cv_prog_gcc = yes; then
3549   GCC=yes
3550 else
3551   GCC=
3552 fi
3553
3554 ac_test_CFLAGS="${CFLAGS+set}"
3555 ac_save_CFLAGS="$CFLAGS"
3556 CFLAGS=
3557 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3558 echo "configure:3559: checking whether ${CC-cc} accepts -g" >&5
3559 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3560   echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562   echo 'void f(){}' > conftest.c
3563 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3564   ac_cv_prog_cc_g=yes
3565 else
3566   ac_cv_prog_cc_g=no
3567 fi
3568 rm -f conftest*
3569
3570 fi
3571
3572 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3573 if test "$ac_test_CFLAGS" = set; then
3574   CFLAGS="$ac_save_CFLAGS"
3575 elif test $ac_cv_prog_cc_g = yes; then
3576   if test "$GCC" = yes; then
3577     CFLAGS="-g -O2"
3578   else
3579     CFLAGS="-g"
3580   fi
3581 else
3582   if test "$GCC" = yes; then
3583     CFLAGS="-O2"
3584   else
3585     CFLAGS=
3586   fi
3587 fi
3588
3589 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3590 if test "${with_gnu_ld+set}" = set; then
3591   withval="$with_gnu_ld"
3592   test "$withval" = no || with_gnu_ld=yes
3593 else
3594   with_gnu_ld=no
3595 fi
3596
3597 ac_prog=ld
3598 if test "$GCC" = yes; then
3599   # Check if gcc -print-prog-name=ld gives a path.
3600   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3601 echo "configure:3602: checking for ld used by GCC" >&5
3602   case $host in
3603   *-*-mingw*)
3604     # gcc leaves a trailing carriage return which upsets mingw
3605     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3606   *)
3607     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3608   esac
3609   case $ac_prog in
3610     # Accept absolute paths.
3611     [\\/]* | [A-Za-z]:[\\/]*)
3612       re_direlt='/[^/][^/]*/\.\./'
3613       # Canonicalize the path of ld
3614       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3615       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3616         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3617       done
3618       test -z "$LD" && LD="$ac_prog"
3619       ;;
3620   "")
3621     # If it fails, then pretend we aren't using GCC.
3622     ac_prog=ld
3623     ;;
3624   *)
3625     # If it is relative, then search for the first ld in PATH.
3626     with_gnu_ld=unknown
3627     ;;
3628   esac
3629 elif test "$with_gnu_ld" = yes; then
3630   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3631 echo "configure:3632: checking for GNU ld" >&5
3632 else
3633   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3634 echo "configure:3635: checking for non-GNU ld" >&5
3635 fi
3636 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   if test -z "$LD"; then
3640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3641   for ac_dir in $PATH; do
3642     test -z "$ac_dir" && ac_dir=.
3643     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3644       lt_cv_path_LD="$ac_dir/$ac_prog"
3645       # Check to see if the program is GNU ld.  I'd rather use --version,
3646       # but apparently some GNU ld's only accept -v.
3647       # Break only if it was the GNU/non-GNU ld that we prefer.
3648       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3649         test "$with_gnu_ld" != no && break
3650       else
3651         test "$with_gnu_ld" != yes && break
3652       fi
3653     fi
3654   done
3655   IFS="$ac_save_ifs"
3656 else
3657   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3658 fi
3659 fi
3660
3661 LD="$lt_cv_path_LD"
3662 if test -n "$LD"; then
3663   echo "$ac_t""$LD" 1>&6
3664 else
3665   echo "$ac_t""no" 1>&6
3666 fi
3667 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3668 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3669 echo "configure:3670: checking if the linker ($LD) is GNU ld" >&5
3670 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3671   echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3674 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3675   lt_cv_prog_gnu_ld=yes
3676 else
3677   lt_cv_prog_gnu_ld=no
3678 fi
3679 fi
3680
3681 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3682 with_gnu_ld=$lt_cv_prog_gnu_ld
3683
3684
3685 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3686 echo "configure:3687: checking for $LD option to reload object files" >&5
3687 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   lt_cv_ld_reload_flag='-r'
3691 fi
3692
3693 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3694 reload_flag=$lt_cv_ld_reload_flag
3695 test -n "$reload_flag" && reload_flag=" $reload_flag"
3696
3697 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3698 echo "configure:3699: checking for BSD-compatible nm" >&5
3699 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3700   echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702   if test -n "$NM"; then
3703   # Let the user override the test.
3704   lt_cv_path_NM="$NM"
3705 else
3706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3707   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3708     test -z "$ac_dir" && ac_dir=.
3709     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3710     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3711       # Check to see if the nm accepts a BSD-compat flag.
3712       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3713       #   nm: unknown option "B" ignored
3714       # Tru64's nm complains that /dev/null is an invalid object file
3715       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3716         lt_cv_path_NM="$tmp_nm -B"
3717         break
3718       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3719         lt_cv_path_NM="$tmp_nm -p"
3720         break
3721       else
3722         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3723         continue # so that we can try to find one that supports BSD flags
3724       fi
3725     fi
3726   done
3727   IFS="$ac_save_ifs"
3728   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3729 fi
3730 fi
3731
3732 NM="$lt_cv_path_NM"
3733 echo "$ac_t""$NM" 1>&6
3734
3735 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3736 echo "configure:3737: checking whether ln -s works" >&5
3737 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3738   echo $ac_n "(cached) $ac_c" 1>&6
3739 else
3740   rm -f conftestdata
3741 if ln -s X conftestdata 2>/dev/null
3742 then
3743   rm -f conftestdata
3744   ac_cv_prog_LN_S="ln -s"
3745 else
3746   ac_cv_prog_LN_S=ln
3747 fi
3748 fi
3749 LN_S="$ac_cv_prog_LN_S"
3750 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3751   echo "$ac_t""yes" 1>&6
3752 else
3753   echo "$ac_t""no" 1>&6
3754 fi
3755
3756 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3757 echo "configure:3758: checking how to recognise dependant libraries" >&5
3758 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   lt_cv_file_magic_cmd='$MAGIC_CMD'
3762 lt_cv_file_magic_test_file=
3763 lt_cv_deplibs_check_method='unknown'
3764 # Need to set the preceding variable on all platforms that support
3765 # interlibrary dependencies.
3766 # 'none' -- dependencies not supported.
3767 # `unknown' -- same as none, but documents that we really don't know.
3768 # 'pass_all' -- all dependencies passed with no checks.
3769 # 'test_compile' -- check by making test program.
3770 # 'file_magic [[regex]]' -- check by looking for files in library path
3771 # which responds to the $file_magic_cmd with a given egrep regex.
3772 # If you have `file' or equivalent on your system and you're not sure
3773 # whether `pass_all' will *always* work, you probably want this one.
3774
3775 case $host_os in
3776 aix4* | aix5*)
3777   lt_cv_deplibs_check_method=pass_all
3778   ;;
3779
3780 beos*)
3781   lt_cv_deplibs_check_method=pass_all
3782   ;;
3783
3784 bsdi4*)
3785   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3786   lt_cv_file_magic_cmd='/usr/bin/file -L'
3787   lt_cv_file_magic_test_file=/shlib/libc.so
3788   ;;
3789
3790 cygwin* | mingw* | pw32*)
3791   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3792   lt_cv_file_magic_cmd='$OBJDUMP -f'
3793   ;;
3794
3795 darwin* | rhapsody*)
3796   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3797   lt_cv_file_magic_cmd='/usr/bin/file -L'
3798   case "$host_os" in
3799   rhapsody* | darwin1.[012])
3800     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3801     ;;
3802   *) # Darwin 1.3 on
3803     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3804     ;;
3805   esac
3806   ;;
3807
3808 freebsd*)
3809   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3810     case $host_cpu in
3811     i*86 )
3812       # Not sure whether the presence of OpenBSD here was a mistake.
3813       # Let's accept both of them until this is cleared up.
3814       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3815       lt_cv_file_magic_cmd=/usr/bin/file
3816       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3817       ;;
3818     esac
3819   else
3820     lt_cv_deplibs_check_method=pass_all
3821   fi
3822   ;;
3823
3824 gnu*)
3825   lt_cv_deplibs_check_method=pass_all
3826   ;;
3827
3828 hpux10.20*|hpux11*)
3829   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3830   lt_cv_file_magic_cmd=/usr/bin/file
3831   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3832   ;;
3833
3834 irix5* | irix6*)
3835   case $host_os in
3836   irix5*)
3837     # this will be overridden with pass_all, but let us keep it just in case
3838     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3839     ;;
3840   *)
3841     case $LD in
3842     *-32|*"-32 ") libmagic=32-bit;;
3843     *-n32|*"-n32 ") libmagic=N32;;
3844     *-64|*"-64 ") libmagic=64-bit;;
3845     *) libmagic=never-match;;
3846     esac
3847     # this will be overridden with pass_all, but let us keep it just in case
3848     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3849     ;;
3850   esac
3851   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3852   lt_cv_deplibs_check_method=pass_all
3853   ;;
3854
3855 # This must be Linux ELF.
3856 linux-gnu*)
3857   case $host_cpu in
3858   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3859     lt_cv_deplibs_check_method=pass_all ;;
3860   *)
3861     # glibc up to 2.1.1 does not perform some relocations on ARM
3862     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3863   esac
3864   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3865   ;;
3866
3867 netbsd*)
3868   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3869     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3870   else
3871     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3872   fi
3873   ;;
3874
3875 newos6*)
3876   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3877   lt_cv_file_magic_cmd=/usr/bin/file
3878   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3879   ;;
3880
3881 openbsd*)
3882   lt_cv_file_magic_cmd=/usr/bin/file
3883   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3884   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3885     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3886   else
3887     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3888   fi
3889   ;;
3890
3891 osf3* | osf4* | osf5*)
3892   # this will be overridden with pass_all, but let us keep it just in case
3893   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3894   lt_cv_file_magic_test_file=/shlib/libc.so
3895   lt_cv_deplibs_check_method=pass_all
3896   ;;
3897
3898 sco3.2v5*)
3899   lt_cv_deplibs_check_method=pass_all
3900   ;;
3901
3902 solaris*)
3903   lt_cv_deplibs_check_method=pass_all
3904   lt_cv_file_magic_test_file=/lib/libc.so
3905   ;;
3906
3907 sysv5uw[78]* | sysv4*uw2*)
3908   lt_cv_deplibs_check_method=pass_all
3909   ;;
3910
3911 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3912   case $host_vendor in
3913   motorola)
3914     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]'
3915     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3916     ;;
3917   ncr)
3918     lt_cv_deplibs_check_method=pass_all
3919     ;;
3920   sequent)
3921     lt_cv_file_magic_cmd='/bin/file'
3922     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3923     ;;
3924   sni)
3925     lt_cv_file_magic_cmd='/bin/file'
3926     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3927     lt_cv_file_magic_test_file=/lib/libc.so
3928     ;;
3929   esac
3930   ;;
3931 esac
3932
3933 fi
3934
3935 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3936 file_magic_cmd=$lt_cv_file_magic_cmd
3937 deplibs_check_method=$lt_cv_deplibs_check_method
3938
3939 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3940 echo "configure:3941: checking for object suffix" >&5
3941 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3942   echo $ac_n "(cached) $ac_c" 1>&6
3943 else
3944   rm -f conftest*
3945 echo 'int i = 1;' > conftest.$ac_ext
3946 if { (eval echo configure:3947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3947   for ac_file in conftest.*; do
3948     case $ac_file in
3949     *.c) ;;
3950     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3951     esac
3952   done
3953 else
3954   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3955 fi
3956 rm -f conftest*
3957 fi
3958
3959 echo "$ac_t""$ac_cv_objext" 1>&6
3960 OBJEXT=$ac_cv_objext
3961 ac_objext=$ac_cv_objext
3962
3963
3964
3965
3966 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3967 echo "configure:3968: checking for executable suffix" >&5
3968 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3969   echo $ac_n "(cached) $ac_c" 1>&6
3970 else
3971   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3972   ac_cv_exeext=.exe
3973 else
3974   rm -f conftest*
3975   echo 'int main () { return 0; }' > conftest.$ac_ext
3976   ac_cv_exeext=
3977   if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3978     for file in conftest.*; do
3979       case $file in
3980       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3981       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3982       esac
3983     done
3984   else
3985     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3986   fi
3987   rm -f conftest*
3988   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3989 fi
3990 fi
3991
3992 EXEEXT=""
3993 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3994 echo "$ac_t""${ac_cv_exeext}" 1>&6
3995 ac_exeext=$EXEEXT
3996
3997 if test $host != $build; then
3998   ac_tool_prefix=${host_alias}-
3999 else
4000   ac_tool_prefix=
4001 fi
4002
4003
4004
4005
4006 # Check for command to grab the raw symbol name followed by C symbol from nm.
4007 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4008 echo "configure:4009: checking command to parse $NM output" >&5
4009 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   
4013 # These are sane defaults that work on at least a few old systems.
4014 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4015
4016 # Character class describing NM global symbol codes.
4017 symcode='[BCDEGRST]'
4018
4019 # Regexp to match symbols that can be accessed directly from C.
4020 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4021
4022 # Transform the above into a raw symbol and a C symbol.
4023 symxfrm='\1 \2\3 \3'
4024
4025 # Transform an extracted symbol line into a proper C declaration
4026 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4027
4028 # Transform an extracted symbol line into symbol name and symbol address
4029 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'"
4030
4031 # Define system-specific variables.
4032 case $host_os in
4033 aix*)
4034   symcode='[BCDT]'
4035   ;;
4036 cygwin* | mingw* | pw32*)
4037   symcode='[ABCDGISTW]'
4038   ;;
4039 hpux*) # Its linker distinguishes data from code symbols
4040   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4041   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'"
4042   ;;
4043 irix*)
4044   symcode='[BCDEGRST]'
4045   ;;
4046 solaris* | sysv5*)
4047   symcode='[BDT]'
4048   ;;
4049 sysv4)
4050   symcode='[DFNSTU]'
4051   ;;
4052 esac
4053
4054 # Handle CRLF in mingw tool chain
4055 opt_cr=
4056 case $host_os in
4057 mingw*)
4058   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4059   ;;
4060 esac
4061
4062 # If we're using GNU nm, then use its standard symbol codes.
4063 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4064   symcode='[ABCDGISTW]'
4065 fi
4066
4067 # Try without a prefix undercore, then with it.
4068 for ac_symprfx in "" "_"; do
4069
4070   # Write the raw and C identifiers.
4071 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4072
4073   # Check to see that the pipe works correctly.
4074   pipe_works=no
4075   rm -f conftest*
4076   cat > conftest.$ac_ext <<EOF
4077 #ifdef __cplusplus
4078 extern "C" {
4079 #endif
4080 char nm_test_var;
4081 void nm_test_func(){}
4082 #ifdef __cplusplus
4083 }
4084 #endif
4085 int main(){nm_test_var='a';nm_test_func();return(0);}
4086 EOF
4087
4088   if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4089     # Now try to grab the symbols.
4090     nlist=conftest.nm
4091     if { (eval echo configure:4092: \"$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
4092       # Try sorting and uniquifying the output.
4093       if sort "$nlist" | uniq > "$nlist"T; then
4094         mv -f "$nlist"T "$nlist"
4095       else
4096         rm -f "$nlist"T
4097       fi
4098
4099       # Make sure that we snagged all the symbols we need.
4100       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4101         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4102           cat <<EOF > conftest.$ac_ext
4103 #ifdef __cplusplus
4104 extern "C" {
4105 #endif
4106
4107 EOF
4108           # Now generate the symbol file.
4109           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4110
4111           cat <<EOF >> conftest.$ac_ext
4112 #if defined (__STDC__) && __STDC__
4113 # define lt_ptr void *
4114 #else
4115 # define lt_ptr char *
4116 # define const
4117 #endif
4118
4119 /* The mapping between symbol names and symbols. */
4120 const struct {
4121   const char *name;
4122   lt_ptr address;
4123 }
4124 lt_preloaded_symbols[] =
4125 {
4126 EOF
4127           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4128           cat <<\EOF >> conftest.$ac_ext
4129   {0, (lt_ptr) 0}
4130 };
4131
4132 #ifdef __cplusplus
4133 }
4134 #endif
4135 EOF
4136           # Now try linking the two files.
4137           mv conftest.$ac_objext conftstm.$ac_objext
4138           save_LIBS="$LIBS"
4139           save_CFLAGS="$CFLAGS"
4140           LIBS="conftstm.$ac_objext"
4141           CFLAGS="$CFLAGS$no_builtin_flag"
4142           if { (eval echo configure:4143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4143             pipe_works=yes
4144           fi
4145           LIBS="$save_LIBS"
4146           CFLAGS="$save_CFLAGS"
4147         else
4148           echo "cannot find nm_test_func in $nlist" >&5
4149         fi
4150       else
4151         echo "cannot find nm_test_var in $nlist" >&5
4152       fi
4153     else
4154       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4155     fi
4156   else
4157     echo "$progname: failed program was:" >&5
4158     cat conftest.$ac_ext >&5
4159   fi
4160   rm -f conftest* conftst*
4161
4162   # Do not use the global_symbol_pipe unless it works.
4163   if test "$pipe_works" = yes; then
4164     break
4165   else
4166     lt_cv_sys_global_symbol_pipe=
4167   fi
4168 done
4169
4170 fi
4171
4172 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4173 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4174   global_symbol_to_cdecl=
4175   global_symbol_to_c_name_address=
4176 else
4177   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4178   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4179 fi
4180 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4181 then
4182   echo "$ac_t""failed" 1>&6
4183 else
4184   echo "$ac_t""ok" 1>&6
4185 fi
4186
4187 for ac_hdr in dlfcn.h
4188 do
4189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_hdr" >&5
4192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <$ac_hdr>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=yes"
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218   cat >> confdefs.h <<EOF
4219 #define $ac_tr_hdr 1
4220 EOF
4221  
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225 done
4226
4227
4228
4229
4230
4231 # Only perform the check for file, if the check method requires it
4232 case $deplibs_check_method in
4233 file_magic*)
4234   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4235     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4236 echo "configure:4237: checking for ${ac_tool_prefix}file" >&5
4237 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   case $MAGIC_CMD in
4241   /*)
4242   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4243   ;;
4244   ?:/*)
4245   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4246   ;;
4247   *)
4248   ac_save_MAGIC_CMD="$MAGIC_CMD"
4249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4250   ac_dummy="/usr/bin:$PATH"
4251   for ac_dir in $ac_dummy; do
4252     test -z "$ac_dir" && ac_dir=.
4253     if test -f $ac_dir/${ac_tool_prefix}file; then
4254       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4255       if test -n "$file_magic_test_file"; then
4256         case $deplibs_check_method in
4257         "file_magic "*)
4258           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4259           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4260           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4261             egrep "$file_magic_regex" > /dev/null; then
4262             :
4263           else
4264             cat <<EOF 1>&2
4265
4266 *** Warning: the command libtool uses to detect shared libraries,
4267 *** $file_magic_cmd, produces output that libtool cannot recognize.
4268 *** The result is that libtool may fail to recognize shared libraries
4269 *** as such.  This will affect the creation of libtool libraries that
4270 *** depend on shared libraries, but programs linked with such libtool
4271 *** libraries will work regardless of this problem.  Nevertheless, you
4272 *** may want to report the problem to your system manager and/or to
4273 *** bug-libtool@gnu.org
4274
4275 EOF
4276           fi ;;
4277         esac
4278       fi
4279       break
4280     fi
4281   done
4282   IFS="$ac_save_ifs"
4283   MAGIC_CMD="$ac_save_MAGIC_CMD"
4284   ;;
4285 esac
4286 fi
4287
4288 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4289 if test -n "$MAGIC_CMD"; then
4290   echo "$ac_t""$MAGIC_CMD" 1>&6
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294
4295 if test -z "$lt_cv_path_MAGIC_CMD"; then
4296   if test -n "$ac_tool_prefix"; then
4297     echo $ac_n "checking for file""... $ac_c" 1>&6
4298 echo "configure:4299: checking for file" >&5
4299 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4300   echo $ac_n "(cached) $ac_c" 1>&6
4301 else
4302   case $MAGIC_CMD in
4303   /*)
4304   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4305   ;;
4306   ?:/*)
4307   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4308   ;;
4309   *)
4310   ac_save_MAGIC_CMD="$MAGIC_CMD"
4311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4312   ac_dummy="/usr/bin:$PATH"
4313   for ac_dir in $ac_dummy; do
4314     test -z "$ac_dir" && ac_dir=.
4315     if test -f $ac_dir/file; then
4316       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4317       if test -n "$file_magic_test_file"; then
4318         case $deplibs_check_method in
4319         "file_magic "*)
4320           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4321           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4322           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4323             egrep "$file_magic_regex" > /dev/null; then
4324             :
4325           else
4326             cat <<EOF 1>&2
4327
4328 *** Warning: the command libtool uses to detect shared libraries,
4329 *** $file_magic_cmd, produces output that libtool cannot recognize.
4330 *** The result is that libtool may fail to recognize shared libraries
4331 *** as such.  This will affect the creation of libtool libraries that
4332 *** depend on shared libraries, but programs linked with such libtool
4333 *** libraries will work regardless of this problem.  Nevertheless, you
4334 *** may want to report the problem to your system manager and/or to
4335 *** bug-libtool@gnu.org
4336
4337 EOF
4338           fi ;;
4339         esac
4340       fi
4341       break
4342     fi
4343   done
4344   IFS="$ac_save_ifs"
4345   MAGIC_CMD="$ac_save_MAGIC_CMD"
4346   ;;
4347 esac
4348 fi
4349
4350 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4351 if test -n "$MAGIC_CMD"; then
4352   echo "$ac_t""$MAGIC_CMD" 1>&6
4353 else
4354   echo "$ac_t""no" 1>&6
4355 fi
4356
4357   else
4358     MAGIC_CMD=:
4359   fi
4360 fi
4361
4362   fi
4363   ;;
4364 esac
4365
4366 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4367 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4369 echo "configure:4370: checking for $ac_word" >&5
4370 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   if test -n "$RANLIB"; then
4374   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4375 else
4376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4377   ac_dummy="$PATH"
4378   for ac_dir in $ac_dummy; do
4379     test -z "$ac_dir" && ac_dir=.
4380     if test -f $ac_dir/$ac_word; then
4381       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4382       break
4383     fi
4384   done
4385   IFS="$ac_save_ifs"
4386 fi
4387 fi
4388 RANLIB="$ac_cv_prog_RANLIB"
4389 if test -n "$RANLIB"; then
4390   echo "$ac_t""$RANLIB" 1>&6
4391 else
4392   echo "$ac_t""no" 1>&6
4393 fi
4394
4395
4396 if test -z "$ac_cv_prog_RANLIB"; then
4397 if test -n "$ac_tool_prefix"; then
4398   # Extract the first word of "ranlib", so it can be a program name with args.
4399 set dummy ranlib; ac_word=$2
4400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4401 echo "configure:4402: checking for $ac_word" >&5
4402 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4403   echo $ac_n "(cached) $ac_c" 1>&6
4404 else
4405   if test -n "$RANLIB"; then
4406   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4407 else
4408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4409   ac_dummy="$PATH"
4410   for ac_dir in $ac_dummy; do
4411     test -z "$ac_dir" && ac_dir=.
4412     if test -f $ac_dir/$ac_word; then
4413       ac_cv_prog_RANLIB="ranlib"
4414       break
4415     fi
4416   done
4417   IFS="$ac_save_ifs"
4418   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4419 fi
4420 fi
4421 RANLIB="$ac_cv_prog_RANLIB"
4422 if test -n "$RANLIB"; then
4423   echo "$ac_t""$RANLIB" 1>&6
4424 else
4425   echo "$ac_t""no" 1>&6
4426 fi
4427
4428 else
4429   RANLIB=":"
4430 fi
4431 fi
4432
4433 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4434 set dummy ${ac_tool_prefix}strip; ac_word=$2
4435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4436 echo "configure:4437: checking for $ac_word" >&5
4437 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4438   echo $ac_n "(cached) $ac_c" 1>&6
4439 else
4440   if test -n "$STRIP"; then
4441   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4442 else
4443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4444   ac_dummy="$PATH"
4445   for ac_dir in $ac_dummy; do
4446     test -z "$ac_dir" && ac_dir=.
4447     if test -f $ac_dir/$ac_word; then
4448       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4449       break
4450     fi
4451   done
4452   IFS="$ac_save_ifs"
4453 fi
4454 fi
4455 STRIP="$ac_cv_prog_STRIP"
4456 if test -n "$STRIP"; then
4457   echo "$ac_t""$STRIP" 1>&6
4458 else
4459   echo "$ac_t""no" 1>&6
4460 fi
4461
4462
4463 if test -z "$ac_cv_prog_STRIP"; then
4464 if test -n "$ac_tool_prefix"; then
4465   # Extract the first word of "strip", so it can be a program name with args.
4466 set dummy strip; ac_word=$2
4467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4468 echo "configure:4469: checking for $ac_word" >&5
4469 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   if test -n "$STRIP"; then
4473   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4474 else
4475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4476   ac_dummy="$PATH"
4477   for ac_dir in $ac_dummy; do
4478     test -z "$ac_dir" && ac_dir=.
4479     if test -f $ac_dir/$ac_word; then
4480       ac_cv_prog_STRIP="strip"
4481       break
4482     fi
4483   done
4484   IFS="$ac_save_ifs"
4485   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4486 fi
4487 fi
4488 STRIP="$ac_cv_prog_STRIP"
4489 if test -n "$STRIP"; then
4490   echo "$ac_t""$STRIP" 1>&6
4491 else
4492   echo "$ac_t""no" 1>&6
4493 fi
4494
4495 else
4496   STRIP=":"
4497 fi
4498 fi
4499
4500
4501 enable_dlopen=yes
4502 enable_win32_dll=yes
4503
4504 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4505 if test "${enable_libtool_lock+set}" = set; then
4506   enableval="$enable_libtool_lock"
4507   :
4508 fi
4509
4510 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4511
4512 # Some flags need to be propagated to the compiler or linker for good
4513 # libtool support.
4514 case $host in
4515 *-*-irix6*)
4516   # Find out which ABI we are using.
4517   echo '#line 4518 "configure"' > conftest.$ac_ext
4518   if { (eval echo configure:4519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4519     case `/usr/bin/file conftest.$ac_objext` in
4520     *32-bit*)
4521       LD="${LD-ld} -32"
4522       ;;
4523     *N32*)
4524       LD="${LD-ld} -n32"
4525       ;;
4526     *64-bit*)
4527       LD="${LD-ld} -64"
4528       ;;
4529     esac
4530   fi
4531   rm -rf conftest*
4532   ;;
4533
4534 *-*-sco3.2v5*)
4535   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4536   SAVE_CFLAGS="$CFLAGS"
4537   CFLAGS="$CFLAGS -belf"
4538   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4539 echo "configure:4540: checking whether the C compiler needs -belf" >&5
4540 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4541   echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543   
4544      ac_ext=c
4545 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4546 ac_cpp='$CPP $CPPFLAGS'
4547 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4548 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4549 cross_compiling=$ac_cv_prog_cc_cross
4550
4551      cat > conftest.$ac_ext <<EOF
4552 #line 4553 "configure"
4553 #include "confdefs.h"
4554
4555 int main() {
4556
4557 ; return 0; }
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4560   rm -rf conftest*
4561   lt_cv_cc_needs_belf=yes
4562 else
4563   echo "configure: failed program was:" >&5
4564   cat conftest.$ac_ext >&5
4565   rm -rf conftest*
4566   lt_cv_cc_needs_belf=no
4567 fi
4568 rm -f conftest*
4569      ac_ext=c
4570 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4571 ac_cpp='$CPP $CPPFLAGS'
4572 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4573 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4574 cross_compiling=$ac_cv_prog_cc_cross
4575
4576 fi
4577
4578 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4579   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4580     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4581     CFLAGS="$SAVE_CFLAGS"
4582   fi
4583   ;;
4584
4585 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4586   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4587 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4589 echo "configure:4590: checking for $ac_word" >&5
4590 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4591   echo $ac_n "(cached) $ac_c" 1>&6
4592 else
4593   if test -n "$DLLTOOL"; then
4594   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4595 else
4596   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4597   ac_dummy="$PATH"
4598   for ac_dir in $ac_dummy; do
4599     test -z "$ac_dir" && ac_dir=.
4600     if test -f $ac_dir/$ac_word; then
4601       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4602       break
4603     fi
4604   done
4605   IFS="$ac_save_ifs"
4606 fi
4607 fi
4608 DLLTOOL="$ac_cv_prog_DLLTOOL"
4609 if test -n "$DLLTOOL"; then
4610   echo "$ac_t""$DLLTOOL" 1>&6
4611 else
4612   echo "$ac_t""no" 1>&6
4613 fi
4614
4615
4616 if test -z "$ac_cv_prog_DLLTOOL"; then
4617 if test -n "$ac_tool_prefix"; then
4618   # Extract the first word of "dlltool", so it can be a program name with args.
4619 set dummy dlltool; ac_word=$2
4620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4621 echo "configure:4622: checking for $ac_word" >&5
4622 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   if test -n "$DLLTOOL"; then
4626   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4627 else
4628   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4629   ac_dummy="$PATH"
4630   for ac_dir in $ac_dummy; do
4631     test -z "$ac_dir" && ac_dir=.
4632     if test -f $ac_dir/$ac_word; then
4633       ac_cv_prog_DLLTOOL="dlltool"
4634       break
4635     fi
4636   done
4637   IFS="$ac_save_ifs"
4638   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4639 fi
4640 fi
4641 DLLTOOL="$ac_cv_prog_DLLTOOL"
4642 if test -n "$DLLTOOL"; then
4643   echo "$ac_t""$DLLTOOL" 1>&6
4644 else
4645   echo "$ac_t""no" 1>&6
4646 fi
4647
4648 else
4649   DLLTOOL="false"
4650 fi
4651 fi
4652
4653   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4654 set dummy ${ac_tool_prefix}as; ac_word=$2
4655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4656 echo "configure:4657: checking for $ac_word" >&5
4657 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   if test -n "$AS"; then
4661   ac_cv_prog_AS="$AS" # Let the user override the test.
4662 else
4663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4664   ac_dummy="$PATH"
4665   for ac_dir in $ac_dummy; do
4666     test -z "$ac_dir" && ac_dir=.
4667     if test -f $ac_dir/$ac_word; then
4668       ac_cv_prog_AS="${ac_tool_prefix}as"
4669       break
4670     fi
4671   done
4672   IFS="$ac_save_ifs"
4673 fi
4674 fi
4675 AS="$ac_cv_prog_AS"
4676 if test -n "$AS"; then
4677   echo "$ac_t""$AS" 1>&6
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681
4682
4683 if test -z "$ac_cv_prog_AS"; then
4684 if test -n "$ac_tool_prefix"; then
4685   # Extract the first word of "as", so it can be a program name with args.
4686 set dummy as; ac_word=$2
4687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4688 echo "configure:4689: checking for $ac_word" >&5
4689 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4690   echo $ac_n "(cached) $ac_c" 1>&6
4691 else
4692   if test -n "$AS"; then
4693   ac_cv_prog_AS="$AS" # Let the user override the test.
4694 else
4695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4696   ac_dummy="$PATH"
4697   for ac_dir in $ac_dummy; do
4698     test -z "$ac_dir" && ac_dir=.
4699     if test -f $ac_dir/$ac_word; then
4700       ac_cv_prog_AS="as"
4701       break
4702     fi
4703   done
4704   IFS="$ac_save_ifs"
4705   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4706 fi
4707 fi
4708 AS="$ac_cv_prog_AS"
4709 if test -n "$AS"; then
4710   echo "$ac_t""$AS" 1>&6
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714
4715 else
4716   AS="false"
4717 fi
4718 fi
4719
4720   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4721 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4723 echo "configure:4724: checking for $ac_word" >&5
4724 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4725   echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727   if test -n "$OBJDUMP"; then
4728   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4729 else
4730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4731   ac_dummy="$PATH"
4732   for ac_dir in $ac_dummy; do
4733     test -z "$ac_dir" && ac_dir=.
4734     if test -f $ac_dir/$ac_word; then
4735       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4736       break
4737     fi
4738   done
4739   IFS="$ac_save_ifs"
4740 fi
4741 fi
4742 OBJDUMP="$ac_cv_prog_OBJDUMP"
4743 if test -n "$OBJDUMP"; then
4744   echo "$ac_t""$OBJDUMP" 1>&6
4745 else
4746   echo "$ac_t""no" 1>&6
4747 fi
4748
4749
4750 if test -z "$ac_cv_prog_OBJDUMP"; then
4751 if test -n "$ac_tool_prefix"; then
4752   # Extract the first word of "objdump", so it can be a program name with args.
4753 set dummy objdump; ac_word=$2
4754 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4755 echo "configure:4756: checking for $ac_word" >&5
4756 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4757   echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759   if test -n "$OBJDUMP"; then
4760   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4761 else
4762   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4763   ac_dummy="$PATH"
4764   for ac_dir in $ac_dummy; do
4765     test -z "$ac_dir" && ac_dir=.
4766     if test -f $ac_dir/$ac_word; then
4767       ac_cv_prog_OBJDUMP="objdump"
4768       break
4769     fi
4770   done
4771   IFS="$ac_save_ifs"
4772   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4773 fi
4774 fi
4775 OBJDUMP="$ac_cv_prog_OBJDUMP"
4776 if test -n "$OBJDUMP"; then
4777   echo "$ac_t""$OBJDUMP" 1>&6
4778 else
4779   echo "$ac_t""no" 1>&6
4780 fi
4781
4782 else
4783   OBJDUMP="false"
4784 fi
4785 fi
4786
4787
4788   # recent cygwin and mingw systems supply a stub DllMain which the user
4789   # can override, but on older systems we have to supply one
4790   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4791 echo "configure:4792: checking if libtool should supply DllMain function" >&5
4792 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798
4799 int main() {
4800 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4801       DllMain (0, 0, 0);
4802 ; return 0; }
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4805   rm -rf conftest*
4806   lt_cv_need_dllmain=no
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -rf conftest*
4811   lt_cv_need_dllmain=yes
4812 fi
4813 rm -f conftest*
4814 fi
4815
4816 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4817
4818   case $host/$CC in
4819   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4820     # old mingw systems require "-dll" to link a DLL, while more recent ones
4821     # require "-mdll"
4822     SAVE_CFLAGS="$CFLAGS"
4823     CFLAGS="$CFLAGS -mdll"
4824     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4825 echo "configure:4826: checking how to link DLLs" >&5
4826 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829   cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832
4833 int main() {
4834
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838   rm -rf conftest*
4839   lt_cv_cc_dll_switch=-mdll
4840 else
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843   rm -rf conftest*
4844   lt_cv_cc_dll_switch=-dll
4845 fi
4846 rm -f conftest*
4847 fi
4848
4849 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4850     CFLAGS="$SAVE_CFLAGS" ;;
4851   *-*-cygwin* | *-*-pw32*)
4852     # cygwin systems need to pass --dll to the linker, and not link
4853     # crt.o which will require a WinMain@16 definition.
4854     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4855   esac
4856   ;;
4857   
4858 esac
4859
4860 # Sed substitution that helps us do robust quoting.  It backslashifies
4861 # metacharacters that are still active within double-quoted strings.
4862 Xsed='sed -e s/^X//'
4863 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4864
4865 # Same as above, but do not quote variable references.
4866 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4867
4868 # Sed substitution to delay expansion of an escaped shell variable in a
4869 # double_quote_subst'ed string.
4870 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4871
4872 # Constants:
4873 rm="rm -f"
4874
4875 # Global variables:
4876 default_ofile=libtool
4877 can_build_shared=yes
4878
4879 # All known linkers require a `.a' archive for static linking (except M$VC,
4880 # which needs '.lib').
4881 libext=a
4882 ltmain="$ac_aux_dir/ltmain.sh"
4883 ofile="$default_ofile"
4884 with_gnu_ld="$lt_cv_prog_gnu_ld"
4885 need_locks="$enable_libtool_lock"
4886
4887 old_CC="$CC"
4888 old_CFLAGS="$CFLAGS"
4889
4890 # Set sane defaults for various variables
4891 test -z "$AR" && AR=ar
4892 test -z "$AR_FLAGS" && AR_FLAGS=cru
4893 test -z "$AS" && AS=as
4894 test -z "$CC" && CC=cc
4895 test -z "$DLLTOOL" && DLLTOOL=dlltool
4896 test -z "$LD" && LD=ld
4897 test -z "$LN_S" && LN_S="ln -s"
4898 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4899 test -z "$NM" && NM=nm
4900 test -z "$OBJDUMP" && OBJDUMP=objdump
4901 test -z "$RANLIB" && RANLIB=:
4902 test -z "$STRIP" && STRIP=:
4903 test -z "$ac_objext" && ac_objext=o
4904
4905 if test x"$host" != x"$build"; then
4906   ac_tool_prefix=${host_alias}-
4907 else
4908   ac_tool_prefix=
4909 fi
4910
4911 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4912 case $host_os in
4913 linux-gnu*) ;;
4914 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4915 esac
4916
4917 case $host_os in
4918 aix3*)
4919   # AIX sometimes has problems with the GCC collect2 program.  For some
4920   # reason, if we set the COLLECT_NAMES environment variable, the problems
4921   # vanish in a puff of smoke.
4922   if test "X${COLLECT_NAMES+set}" != Xset; then
4923     COLLECT_NAMES=
4924     export COLLECT_NAMES
4925   fi
4926   ;;
4927 esac
4928
4929 # Determine commands to create old-style static archives.
4930 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4931 old_postinstall_cmds='chmod 644 $oldlib'
4932 old_postuninstall_cmds=
4933
4934 if test -n "$RANLIB"; then
4935   case $host_os in
4936   openbsd*)
4937     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4938     ;;
4939   *)
4940     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4941     ;;
4942   esac
4943   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4944 fi
4945
4946 # Allow CC to be a program name with arguments.
4947 set dummy $CC
4948 compiler="$2"
4949
4950 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4951 echo "configure:4952: checking for objdir" >&5
4952 rm -f .libs 2>/dev/null
4953 mkdir .libs 2>/dev/null
4954 if test -d .libs; then
4955   objdir=.libs
4956 else
4957   # MS-DOS does not allow filenames that begin with a dot.
4958   objdir=_libs
4959 fi
4960 rmdir .libs 2>/dev/null
4961 echo "$ac_t""$objdir" 1>&6
4962
4963
4964 # Check whether --with-pic or --without-pic was given.
4965 if test "${with_pic+set}" = set; then
4966   withval="$with_pic"
4967   pic_mode="$withval"
4968 else
4969   pic_mode=default
4970 fi
4971
4972 test -z "$pic_mode" && pic_mode=default
4973
4974 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4975 # in isolation, and that seeing it set (from the cache) indicates that
4976 # the associated values are set (in the cache) correctly too.
4977 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4978 echo "configure:4979: checking for $compiler option to produce PIC" >&5
4979 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4980   echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982    lt_cv_prog_cc_pic=
4983   lt_cv_prog_cc_shlib=
4984   lt_cv_prog_cc_wl=
4985   lt_cv_prog_cc_static=
4986   lt_cv_prog_cc_no_builtin=
4987   lt_cv_prog_cc_can_build_shared=$can_build_shared
4988
4989   if test "$GCC" = yes; then
4990     lt_cv_prog_cc_wl='-Wl,'
4991     lt_cv_prog_cc_static='-static'
4992
4993     case $host_os in
4994     aix*)
4995       # Below there is a dirty hack to force normal static linking with -ldl
4996       # The problem is because libdl dynamically linked with both libc and
4997       # libC (AIX C++ library), which obviously doesn't included in libraries
4998       # list by gcc. This cause undefined symbols with -static flags.
4999       # This hack allows C programs to be linked with "-static -ldl", but
5000       # not sure about C++ programs.
5001       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5002       ;;
5003     amigaos*)
5004       # FIXME: we need at least 68020 code to build shared libraries, but
5005       # adding the `-m68020' flag to GCC prevents building anything better,
5006       # like `-m68040'.
5007       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5008       ;;
5009     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5010       # PIC is the default for these OSes.
5011       ;;
5012     darwin* | rhapsody*)
5013       # PIC is the default on this platform
5014       # Common symbols not allowed in MH_DYLIB files
5015       lt_cv_prog_cc_pic='-fno-common'
5016       ;;
5017     cygwin* | mingw* | pw32* | os2*)
5018       # This hack is so that the source file can tell whether it is being
5019       # built for inclusion in a dll (and should export symbols for example).
5020       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5021       ;;
5022     sysv4*MP*)
5023       if test -d /usr/nec; then
5024          lt_cv_prog_cc_pic=-Kconform_pic
5025       fi
5026       ;;
5027     *)
5028       lt_cv_prog_cc_pic='-fPIC'
5029       ;;
5030     esac
5031   else
5032     # PORTME Check for PIC flags for the system compiler.
5033     case $host_os in
5034     aix3* | aix4* | aix5*)
5035       lt_cv_prog_cc_wl='-Wl,'
5036       # All AIX code is PIC.
5037       if test "$host_cpu" = ia64; then
5038         # AIX 5 now supports IA64 processor
5039         lt_cv_prog_cc_static='-Bstatic'
5040       else
5041         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5042       fi
5043       ;;
5044
5045     hpux9* | hpux10* | hpux11*)
5046       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5047       lt_cv_prog_cc_wl='-Wl,'
5048       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5049       lt_cv_prog_cc_pic='+Z'
5050       ;;
5051
5052     irix5* | irix6*)
5053       lt_cv_prog_cc_wl='-Wl,'
5054       lt_cv_prog_cc_static='-non_shared'
5055       # PIC (with -KPIC) is the default.
5056       ;;
5057
5058     cygwin* | mingw* | pw32* | os2*)
5059       # This hack is so that the source file can tell whether it is being
5060       # built for inclusion in a dll (and should export symbols for example).
5061       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5062       ;;
5063
5064     newsos6)
5065       lt_cv_prog_cc_pic='-KPIC'
5066       lt_cv_prog_cc_static='-Bstatic'
5067       ;;
5068
5069     osf3* | osf4* | osf5*)
5070       # All OSF/1 code is PIC.
5071       lt_cv_prog_cc_wl='-Wl,'
5072       lt_cv_prog_cc_static='-non_shared'
5073       ;;
5074
5075     sco3.2v5*)
5076       lt_cv_prog_cc_pic='-Kpic'
5077       lt_cv_prog_cc_static='-dn'
5078       lt_cv_prog_cc_shlib='-belf'
5079       ;;
5080
5081     solaris*)
5082       lt_cv_prog_cc_pic='-KPIC'
5083       lt_cv_prog_cc_static='-Bstatic'
5084       lt_cv_prog_cc_wl='-Wl,'
5085       ;;
5086
5087     sunos4*)
5088       lt_cv_prog_cc_pic='-PIC'
5089       lt_cv_prog_cc_static='-Bstatic'
5090       lt_cv_prog_cc_wl='-Qoption ld '
5091       ;;
5092
5093     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5094       lt_cv_prog_cc_pic='-KPIC'
5095       lt_cv_prog_cc_static='-Bstatic'
5096       if test "x$host_vendor" = xsni; then
5097         lt_cv_prog_cc_wl='-LD'
5098       else
5099         lt_cv_prog_cc_wl='-Wl,'
5100       fi
5101       ;;
5102
5103     uts4*)
5104       lt_cv_prog_cc_pic='-pic'
5105       lt_cv_prog_cc_static='-Bstatic'
5106       ;;
5107
5108     sysv4*MP*)
5109       if test -d /usr/nec ;then
5110         lt_cv_prog_cc_pic='-Kconform_pic'
5111         lt_cv_prog_cc_static='-Bstatic'
5112       fi
5113       ;;
5114
5115     *)
5116       lt_cv_prog_cc_can_build_shared=no
5117       ;;
5118     esac
5119   fi
5120
5121 fi
5122
5123 if test -z "$lt_cv_prog_cc_pic"; then
5124   echo "$ac_t""none" 1>&6
5125 else
5126   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5127
5128   # Check to make sure the pic_flag actually works.
5129   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5130 echo "configure:5131: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5131   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5132   echo $ac_n "(cached) $ac_c" 1>&6
5133 else
5134       save_CFLAGS="$CFLAGS"
5135     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5136     cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139
5140 int main() {
5141
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5145   rm -rf conftest*
5146         case $host_os in
5147       hpux9* | hpux10* | hpux11*)
5148         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5149         # they create non-PIC objects.  So, if there were any warnings, we
5150         # assume that PIC is not supported.
5151         if test -s conftest.err; then
5152           lt_cv_prog_cc_pic_works=no
5153         else
5154           lt_cv_prog_cc_pic_works=yes
5155         fi
5156         ;;
5157       *)
5158         lt_cv_prog_cc_pic_works=yes
5159         ;;
5160       esac
5161     
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166         lt_cv_prog_cc_pic_works=no
5167     
5168 fi
5169 rm -f conftest*
5170     CFLAGS="$save_CFLAGS"
5171   
5172 fi
5173
5174
5175   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5176     lt_cv_prog_cc_pic=
5177     lt_cv_prog_cc_can_build_shared=no
5178   else
5179     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5180   fi
5181
5182   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5183 fi
5184
5185 # Check for any special shared library compilation flags.
5186 if test -n "$lt_cv_prog_cc_shlib"; then
5187   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5188   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5189   else
5190    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5191     lt_cv_prog_cc_can_build_shared=no
5192   fi
5193 fi
5194
5195 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5196 echo "configure:5197: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5197 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200     lt_cv_prog_cc_static_works=no
5201   save_LDFLAGS="$LDFLAGS"
5202   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5203   cat > conftest.$ac_ext <<EOF
5204 #line 5205 "configure"
5205 #include "confdefs.h"
5206
5207 int main() {
5208
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   lt_cv_prog_cc_static_works=yes
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217 fi
5218 rm -f conftest*
5219   LDFLAGS="$save_LDFLAGS"
5220
5221 fi
5222
5223
5224 # Belt *and* braces to stop my trousers falling down:
5225 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5226 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5227
5228 pic_flag="$lt_cv_prog_cc_pic"
5229 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5230 wl="$lt_cv_prog_cc_wl"
5231 link_static_flag="$lt_cv_prog_cc_static"
5232 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5233 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5234
5235
5236 # Check to see if options -o and -c are simultaneously supported by compiler
5237 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5238 echo "configure:5239: checking if $compiler supports -c -o file.$ac_objext" >&5
5239 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   
5243 $rm -r conftest 2>/dev/null
5244 mkdir conftest
5245 cd conftest
5246 echo "int some_variable = 0;" > conftest.$ac_ext
5247 mkdir out
5248 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5249 # that will create temporary files in the current directory regardless of
5250 # the output directory.  Thus, making CWD read-only will cause this test
5251 # to fail, enabling locking or at least warning the user not to do parallel
5252 # builds.
5253 chmod -w .
5254 save_CFLAGS="$CFLAGS"
5255 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5256 compiler_c_o=no
5257 if { (eval echo configure:5258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5258   # The compiler can only warn and ignore the option if not recognized
5259   # So say no if there are warnings
5260   if test -s out/conftest.err; then
5261     lt_cv_compiler_c_o=no
5262   else
5263     lt_cv_compiler_c_o=yes
5264   fi
5265 else
5266   # Append any errors to the config.log.
5267   cat out/conftest.err 1>&5
5268   lt_cv_compiler_c_o=no
5269 fi
5270 CFLAGS="$save_CFLAGS"
5271 chmod u+w .
5272 $rm conftest* out/*
5273 rmdir out
5274 cd ..
5275 rmdir conftest
5276 $rm -r conftest 2>/dev/null
5277
5278 fi
5279
5280 compiler_c_o=$lt_cv_compiler_c_o
5281 echo "$ac_t""$compiler_c_o" 1>&6
5282
5283 if test x"$compiler_c_o" = x"yes"; then
5284   # Check to see if we can write to a .lo
5285   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5286 echo "configure:5287: checking if $compiler supports -c -o file.lo" >&5
5287   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   
5291   lt_cv_compiler_o_lo=no
5292   save_CFLAGS="$CFLAGS"
5293   CFLAGS="$CFLAGS -c -o conftest.lo"
5294   save_objext="$ac_objext"
5295   ac_objext=lo
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       lt_cv_compiler_o_lo=no
5310     else
5311       lt_cv_compiler_o_lo=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   ac_objext="$save_objext"
5320   CFLAGS="$save_CFLAGS"
5321   
5322 fi
5323
5324   compiler_o_lo=$lt_cv_compiler_o_lo
5325   echo "$ac_t""$compiler_o_lo" 1>&6
5326 else
5327   compiler_o_lo=no
5328 fi
5329
5330 # Check to see if we can do hard links to lock some files if needed
5331 hard_links="nottested"
5332 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5333   # do not overwrite the value of need_locks provided by the user
5334   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5335 echo "configure:5336: checking if we can lock with hard links" >&5
5336   hard_links=yes
5337   $rm conftest*
5338   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5339   touch conftest.a
5340   ln conftest.a conftest.b 2>&5 || hard_links=no
5341   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5342   echo "$ac_t""$hard_links" 1>&6
5343   if test "$hard_links" = no; then
5344     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5345     need_locks=warn
5346   fi
5347 else
5348   need_locks=no
5349 fi
5350
5351 if test "$GCC" = yes; then
5352   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5353   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5354 echo "configure:5355: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5355   echo "int some_variable = 0;" > conftest.$ac_ext
5356   save_CFLAGS="$CFLAGS"
5357   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5358   compiler_rtti_exceptions=no
5359   cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 int main() {
5364 int some_variable = 0;
5365 ; return 0; }
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5368   rm -rf conftest*
5369       # The compiler can only warn and ignore the option if not recognized
5370     # So say no if there are warnings
5371     if test -s conftest.err; then
5372       compiler_rtti_exceptions=no
5373     else
5374       compiler_rtti_exceptions=yes
5375     fi
5376   
5377 else
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380 fi
5381 rm -f conftest*
5382   CFLAGS="$save_CFLAGS"
5383   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5384
5385   if test "$compiler_rtti_exceptions" = "yes"; then
5386     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5387   else
5388     no_builtin_flag=' -fno-builtin'
5389   fi
5390 fi
5391
5392 # See if the linker supports building shared libraries.
5393 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5394 echo "configure:5395: checking whether the linker ($LD) supports shared libraries" >&5
5395
5396 allow_undefined_flag=
5397 no_undefined_flag=
5398 need_lib_prefix=unknown
5399 need_version=unknown
5400 # when you set need_version to no, make sure it does not cause -set_version
5401 # flags to be left without arguments
5402 archive_cmds=
5403 archive_expsym_cmds=
5404 old_archive_from_new_cmds=
5405 old_archive_from_expsyms_cmds=
5406 export_dynamic_flag_spec=
5407 whole_archive_flag_spec=
5408 thread_safe_flag_spec=
5409 hardcode_into_libs=no
5410 hardcode_libdir_flag_spec=
5411 hardcode_libdir_separator=
5412 hardcode_direct=no
5413 hardcode_minus_L=no
5414 hardcode_shlibpath_var=unsupported
5415 runpath_var=
5416 link_all_deplibs=unknown
5417 always_export_symbols=no
5418 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5419 # include_expsyms should be a list of space-separated symbols to be *always*
5420 # included in the symbol list
5421 include_expsyms=
5422 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5423 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5424 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5425 # as well as any symbol that contains `d'.
5426 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5427 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5428 # platforms (ab)use it in PIC code, but their linkers get confused if
5429 # the symbol is explicitly referenced.  Since portable code cannot
5430 # rely on this symbol name, it's probably fine to never include it in
5431 # preloaded symbol tables.
5432 extract_expsyms_cmds=
5433
5434 case $host_os in
5435 cygwin* | mingw* | pw32*)
5436   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5437   # When not using gcc, we currently assume that we are using
5438   # Microsoft Visual C++.
5439   if test "$GCC" != yes; then
5440     with_gnu_ld=no
5441   fi
5442   ;;
5443 openbsd*)
5444   with_gnu_ld=no
5445   ;;
5446 esac
5447
5448 ld_shlibs=yes
5449 if test "$with_gnu_ld" = yes; then
5450   # If archive_cmds runs LD, not CC, wlarc should be empty
5451   wlarc='${wl}'
5452
5453   # See if GNU ld supports shared libraries.
5454   case $host_os in
5455   aix3* | aix4* | aix5*)
5456     # On AIX, the GNU linker is very broken
5457     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5458     ld_shlibs=no
5459     cat <<EOF 1>&2
5460
5461 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5462 *** to be unable to reliably create shared libraries on AIX.
5463 *** Therefore, libtool is disabling shared libraries support.  If you
5464 *** really care for shared libraries, you may want to modify your PATH
5465 *** so that a non-GNU linker is found, and then restart.
5466
5467 EOF
5468     ;;
5469
5470   amigaos*)
5471     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)'
5472     hardcode_libdir_flag_spec='-L$libdir'
5473     hardcode_minus_L=yes
5474
5475     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5476     # that the semantics of dynamic libraries on AmigaOS, at least up
5477     # to version 4, is to share data among multiple programs linked
5478     # with the same dynamic library.  Since this doesn't match the
5479     # behavior of shared libraries on other platforms, we can use
5480     # them.
5481     ld_shlibs=no
5482     ;;
5483
5484   beos*)
5485     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5486       allow_undefined_flag=unsupported
5487       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5488       # support --undefined.  This deserves some investigation.  FIXME
5489       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5490     else
5491       ld_shlibs=no
5492     fi
5493     ;;
5494
5495   cygwin* | mingw* | pw32*)
5496     # hardcode_libdir_flag_spec is actually meaningless, as there is
5497     # no search path for DLLs.
5498     hardcode_libdir_flag_spec='-L$libdir'
5499     allow_undefined_flag=unsupported
5500     always_export_symbols=yes
5501
5502     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5503       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5504       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5505       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5506       else $CC -o impgen impgen.c ; fi)~
5507       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5508
5509     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5510
5511     # cygwin and mingw dlls have different entry points and sets of symbols
5512     # to exclude.
5513     # FIXME: what about values for MSVC?
5514     dll_entry=__cygwin_dll_entry@12
5515     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5516     case $host_os in
5517     mingw*)
5518       # mingw values
5519       dll_entry=_DllMainCRTStartup@12
5520       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5521       ;;
5522     esac
5523
5524     # mingw and cygwin differ, and it's simplest to just exclude the union
5525     # of the two symbol sets.
5526     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5527
5528     # recent cygwin and mingw systems supply a stub DllMain which the user
5529     # can override, but on older systems we have to supply one (in ltdll.c)
5530     if test "x$lt_cv_need_dllmain" = "xyes"; then
5531       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5532       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~
5533         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5534     else
5535       ltdll_obj=
5536       ltdll_cmds=
5537     fi
5538
5539     # Extract the symbol export list from an `--export-all' def file,
5540     # then regenerate the def file from the symbol export list, so that
5541     # the compiled dll only exports the symbol export list.
5542     # Be careful not to strip the DATA tag left be newer dlltools.
5543     export_symbols_cmds="$ltdll_cmds"'
5544       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5545       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5546
5547     # If the export-symbols file already is a .def file (1st line
5548     # is EXPORTS), use it as is.
5549     # If DATA tags from a recent dlltool are present, honour them!
5550     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5551         cp $export_symbols $output_objdir/$soname-def;
5552       else
5553         echo EXPORTS > $output_objdir/$soname-def;
5554         _lt_hint=1;
5555         cat $export_symbols | while read symbol; do
5556          set dummy \$symbol;
5557          case \$# in
5558            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5559            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5560          esac;
5561          _lt_hint=`expr 1 + \$_lt_hint`;
5562         done;
5563       fi~
5564       '"$ltdll_cmds"'
5565       $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~
5566       $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~
5567       $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~
5568       $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~
5569       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5570     ;;
5571
5572   netbsd*)
5573     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5574       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5575       wlarc=
5576     else
5577       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5578       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5579     fi
5580     ;;
5581
5582   solaris* | sysv5*)
5583     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5584       ld_shlibs=no
5585       cat <<EOF 1>&2
5586
5587 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5588 *** create shared libraries on Solaris systems.  Therefore, libtool
5589 *** is disabling shared libraries support.  We urge you to upgrade GNU
5590 *** binutils to release 2.9.1 or newer.  Another option is to modify
5591 *** your PATH or compiler configuration so that the native linker is
5592 *** used, and then restart.
5593
5594 EOF
5595     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5596       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5597       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5598     else
5599       ld_shlibs=no
5600     fi
5601     ;;
5602
5603   sunos4*)
5604     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5605     wlarc=
5606     hardcode_direct=yes
5607     hardcode_shlibpath_var=no
5608     ;;
5609
5610   *)
5611     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5612       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5613       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5614     else
5615       ld_shlibs=no
5616     fi
5617     ;;
5618   esac
5619
5620   if test "$ld_shlibs" = yes; then
5621     runpath_var=LD_RUN_PATH
5622     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5623     export_dynamic_flag_spec='${wl}--export-dynamic'
5624     case $host_os in
5625     cygwin* | mingw* | pw32*)
5626       # dlltool doesn't understand --whole-archive et. al.
5627       whole_archive_flag_spec=
5628       ;;
5629     *)
5630       # ancient GNU ld didn't support --whole-archive et. al.
5631       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5632         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5633       else
5634         whole_archive_flag_spec=
5635       fi
5636       ;;
5637     esac
5638   fi
5639 else
5640   # PORTME fill in a description of your system's linker (not GNU ld)
5641   case $host_os in
5642   aix3*)
5643     allow_undefined_flag=unsupported
5644     always_export_symbols=yes
5645     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'
5646     # Note: this linker hardcodes the directories in LIBPATH if there
5647     # are no directories specified by -L.
5648     hardcode_minus_L=yes
5649     if test "$GCC" = yes && test -z "$link_static_flag"; then
5650       # Neither direct hardcoding nor static linking is supported with a
5651       # broken collect2.
5652       hardcode_direct=unsupported
5653     fi
5654     ;;
5655
5656   aix4* | aix5*)
5657     if test "$host_cpu" = ia64; then
5658       # On IA64, the linker does run time linking by default, so we don't
5659       # have to do anything special.
5660       aix_use_runtimelinking=no
5661       exp_sym_flag='-Bexport'
5662       no_entry_flag=""
5663     else
5664       aix_use_runtimelinking=no
5665
5666       # Test if we are trying to use run time linking or normal
5667       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5668       # need to do runtime linking.
5669       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5670         for ld_flag in $LDFLAGS; do
5671           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5672             aix_use_runtimelinking=yes
5673             break
5674           fi
5675         done
5676       esac
5677
5678       exp_sym_flag='-bexport'
5679       no_entry_flag='-bnoentry'
5680     fi
5681
5682     # When large executables or shared objects are built, AIX ld can
5683     # have problems creating the table of contents.  If linking a library
5684     # or program results in "error TOC overflow" add -mminimal-toc to
5685     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5686     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5687
5688     hardcode_direct=yes
5689     archive_cmds=''
5690     hardcode_libdir_separator=':'
5691     if test "$GCC" = yes; then
5692       case $host_os in aix4.[012]|aix4.[012].*)
5693         collect2name=`${CC} -print-prog-name=collect2`
5694         if test -f "$collect2name" && \
5695           strings "$collect2name" | grep resolve_lib_name >/dev/null
5696         then
5697           # We have reworked collect2
5698           hardcode_direct=yes
5699         else
5700           # We have old collect2
5701           hardcode_direct=unsupported
5702           # It fails to find uninstalled libraries when the uninstalled
5703           # path is not listed in the libpath.  Setting hardcode_minus_L
5704           # to unsupported forces relinking
5705           hardcode_minus_L=yes
5706           hardcode_libdir_flag_spec='-L$libdir'
5707           hardcode_libdir_separator=
5708         fi
5709       esac
5710
5711       shared_flag='-shared'
5712     else
5713       # not using gcc
5714       if test "$host_cpu" = ia64; then
5715         shared_flag='${wl}-G'
5716       else
5717         if test "$aix_use_runtimelinking" = yes; then
5718           shared_flag='${wl}-G'
5719         else
5720           shared_flag='${wl}-bM:SRE'
5721         fi
5722       fi
5723     fi
5724
5725     # It seems that -bexpall can do strange things, so it is better to
5726     # generate a list of symbols to export.
5727     always_export_symbols=yes
5728     if test "$aix_use_runtimelinking" = yes; then
5729       # Warning - without using the other runtime loading flags (-brtl),
5730       # -berok will link without error, but may produce a broken library.
5731       allow_undefined_flag='-berok'
5732       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5733       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"
5734     else
5735       if test "$host_cpu" = ia64; then
5736         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5737         allow_undefined_flag="-z nodefs"
5738         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"
5739       else
5740         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5741         # Warning - without using the other run time loading flags,
5742         # -berok will link without error, but may produce a broken library.
5743         allow_undefined_flag='${wl}-berok'
5744         # This is a bit strange, but is similar to how AIX traditionally builds
5745         # it's shared libraries.
5746         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'
5747       fi
5748     fi
5749     ;;
5750
5751   amigaos*)
5752     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)'
5753     hardcode_libdir_flag_spec='-L$libdir'
5754     hardcode_minus_L=yes
5755     # see comment about different semantics on the GNU ld section
5756     ld_shlibs=no
5757     ;;
5758
5759   cygwin* | mingw* | pw32*)
5760     # When not using gcc, we currently assume that we are using
5761     # Microsoft Visual C++.
5762     # hardcode_libdir_flag_spec is actually meaningless, as there is
5763     # no search path for DLLs.
5764     hardcode_libdir_flag_spec=' '
5765     allow_undefined_flag=unsupported
5766     # Tell ltmain to make .lib files, not .a files.
5767     libext=lib
5768     # FIXME: Setting linknames here is a bad hack.
5769     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5770     # The linker will automatically build a .lib file if we build a DLL.
5771     old_archive_from_new_cmds='true'
5772     # FIXME: Should let the user specify the lib program.
5773     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5774     fix_srcfile_path='`cygpath -w "$srcfile"`'
5775     ;;
5776
5777   darwin* | rhapsody*)
5778     case "$host_os" in
5779     rhapsody* | darwin1.[012])
5780       allow_undefined_flag='-undefined suppress'
5781       ;;
5782     *) # Darwin 1.3 on
5783       allow_undefined_flag='-flat_namespace -undefined suppress'
5784       ;;
5785     esac
5786     # FIXME: Relying on posixy $() will cause problems for
5787     #        cross-compilation, but unfortunately the echo tests do not
5788     #        yet detect zsh echo's removal of \ escapes.
5789     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'
5790     # We need to add '_' to the symbols in $export_symbols first
5791     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5792     hardcode_direct=yes
5793     hardcode_shlibpath_var=no
5794     whole_archive_flag_spec='-all_load $convenience'
5795     ;;
5796
5797   freebsd1*)
5798     ld_shlibs=no
5799     ;;
5800
5801   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5802   # support.  Future versions do this automatically, but an explicit c++rt0.o
5803   # does not break anything, and helps significantly (at the cost of a little
5804   # extra space).
5805   freebsd2.2*)
5806     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5807     hardcode_libdir_flag_spec='-R$libdir'
5808     hardcode_direct=yes
5809     hardcode_shlibpath_var=no
5810     ;;
5811
5812   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5813   freebsd2*)
5814     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5815     hardcode_direct=yes
5816     hardcode_minus_L=yes
5817     hardcode_shlibpath_var=no
5818     ;;
5819
5820   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5821   freebsd*)
5822     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5823     hardcode_libdir_flag_spec='-R$libdir'
5824     hardcode_direct=yes
5825     hardcode_shlibpath_var=no
5826     ;;
5827
5828   hpux9* | hpux10* | hpux11*)
5829     case $host_os in
5830     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' ;;
5831     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5832     esac
5833     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5834     hardcode_libdir_separator=:
5835     hardcode_direct=yes
5836     hardcode_minus_L=yes # Not in the search PATH, but as the default
5837                          # location of the library.
5838     export_dynamic_flag_spec='${wl}-E'
5839     ;;
5840
5841   irix5* | irix6*)
5842     if test "$GCC" = yes; then
5843       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'
5844     else
5845       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'
5846     fi
5847     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5848     hardcode_libdir_separator=:
5849     link_all_deplibs=yes
5850     ;;
5851
5852   netbsd*)
5853     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5854       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5855     else
5856       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5857     fi
5858     hardcode_libdir_flag_spec='-R$libdir'
5859     hardcode_direct=yes
5860     hardcode_shlibpath_var=no
5861     ;;
5862
5863   newsos6)
5864     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5865     hardcode_direct=yes
5866     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5867     hardcode_libdir_separator=:
5868     hardcode_shlibpath_var=no
5869     ;;
5870
5871   openbsd*)
5872     hardcode_direct=yes
5873     hardcode_shlibpath_var=no
5874     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5875       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5876       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5877       export_dynamic_flag_spec='${wl}-E'
5878     else
5879       case "$host_os" in
5880       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5881         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5882         hardcode_libdir_flag_spec='-R$libdir'
5883         ;;
5884       *)
5885         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5886         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5887         ;;
5888       esac
5889     fi
5890     ;;
5891
5892   os2*)
5893     hardcode_libdir_flag_spec='-L$libdir'
5894     hardcode_minus_L=yes
5895     allow_undefined_flag=unsupported
5896     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'
5897     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5898     ;;
5899
5900   osf3*)
5901     if test "$GCC" = yes; then
5902       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5903       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'
5904     else
5905       allow_undefined_flag=' -expect_unresolved \*'
5906       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'
5907     fi
5908     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5909     hardcode_libdir_separator=:
5910     ;;
5911
5912   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5913     if test "$GCC" = yes; then
5914       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5915       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'
5916       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5917     else
5918       allow_undefined_flag=' -expect_unresolved \*'
5919       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'
5920       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5921       $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'
5922
5923       #Both c and cxx compiler support -rpath directly
5924       hardcode_libdir_flag_spec='-rpath $libdir'
5925     fi
5926     hardcode_libdir_separator=:
5927     ;;
5928
5929   sco3.2v5*)
5930     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931     hardcode_shlibpath_var=no
5932     runpath_var=LD_RUN_PATH
5933     hardcode_runpath_var=yes
5934     export_dynamic_flag_spec='${wl}-Bexport'
5935     ;;
5936
5937   solaris*)
5938     # gcc --version < 3.0 without binutils cannot create self contained
5939     # shared libraries reliably, requiring libgcc.a to resolve some of
5940     # the object symbols generated in some cases.  Libraries that use
5941     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5942     # a copy of libgcc.a into every shared library to guarantee resolving
5943     # such symbols causes other problems:  According to Tim Van Holder
5944     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5945     # (to the application) exception stack for one thing.
5946     no_undefined_flag=' -z defs'
5947     if test "$GCC" = yes; then
5948       case `$CC --version 2>/dev/null` in
5949       [12].*)
5950         cat <<EOF 1>&2
5951
5952 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5953 *** create self contained shared libraries on Solaris systems, without
5954 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5955 *** -no-undefined support, which will at least allow you to build shared
5956 *** libraries.  However, you may find that when you link such libraries
5957 *** into an application without using GCC, you have to manually add
5958 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5959 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5960 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5961
5962 EOF
5963         no_undefined_flag=
5964         ;;
5965       esac
5966     fi
5967     # $CC -shared without GNU ld will not create a library from C++
5968     # object files and a static libstdc++, better avoid it by now
5969     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5971                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5972     hardcode_libdir_flag_spec='-R$libdir'
5973     hardcode_shlibpath_var=no
5974     case $host_os in
5975     solaris2.[0-5] | solaris2.[0-5].*) ;;
5976     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5977       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5978     esac
5979     link_all_deplibs=yes
5980     ;;
5981
5982   sunos4*)
5983     if test "x$host_vendor" = xsequent; then
5984       # Use $CC to link under sequent, because it throws in some extra .o
5985       # files that make .init and .fini sections work.
5986       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5987     else
5988       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5989     fi
5990     hardcode_libdir_flag_spec='-L$libdir'
5991     hardcode_direct=yes
5992     hardcode_minus_L=yes
5993     hardcode_shlibpath_var=no
5994     ;;
5995
5996   sysv4)
5997     if test "x$host_vendor" = xsno; then
5998       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999       hardcode_direct=yes # is this really true???
6000     else
6001       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6003     fi
6004     runpath_var='LD_RUN_PATH'
6005     hardcode_shlibpath_var=no
6006     ;;
6007
6008   sysv4.3*)
6009     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6010     hardcode_shlibpath_var=no
6011     export_dynamic_flag_spec='-Bexport'
6012     ;;
6013
6014   sysv5*)
6015     no_undefined_flag=' -z text'
6016     # $CC -shared without GNU ld will not create a library from C++
6017     # object files and a static libstdc++, better avoid it by now
6018     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6020                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6021     hardcode_libdir_flag_spec=
6022     hardcode_shlibpath_var=no
6023     runpath_var='LD_RUN_PATH'
6024     ;;
6025
6026   uts4*)
6027     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6028     hardcode_libdir_flag_spec='-L$libdir'
6029     hardcode_shlibpath_var=no
6030     ;;
6031
6032   dgux*)
6033     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034     hardcode_libdir_flag_spec='-L$libdir'
6035     hardcode_shlibpath_var=no
6036     ;;
6037
6038   sysv4*MP*)
6039     if test -d /usr/nec; then
6040       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6041       hardcode_shlibpath_var=no
6042       runpath_var=LD_RUN_PATH
6043       hardcode_runpath_var=yes
6044       ld_shlibs=yes
6045     fi
6046     ;;
6047
6048   sysv4.2uw2*)
6049     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6050     hardcode_direct=yes
6051     hardcode_minus_L=no
6052     hardcode_shlibpath_var=no
6053     hardcode_runpath_var=yes
6054     runpath_var=LD_RUN_PATH
6055     ;;
6056
6057   sysv5uw7* | unixware7*)
6058     no_undefined_flag='${wl}-z ${wl}text'
6059     if test "$GCC" = yes; then
6060       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6061     else
6062       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6063     fi
6064     runpath_var='LD_RUN_PATH'
6065     hardcode_shlibpath_var=no
6066     ;;
6067
6068   *)
6069     ld_shlibs=no
6070     ;;
6071   esac
6072 fi
6073 echo "$ac_t""$ld_shlibs" 1>&6
6074 test "$ld_shlibs" = no && can_build_shared=no
6075
6076 # Check hardcoding attributes.
6077 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6078 echo "configure:6079: checking how to hardcode library paths into programs" >&5
6079 hardcode_action=
6080 if test -n "$hardcode_libdir_flag_spec" || \
6081    test -n "$runpath_var"; then
6082
6083   # We can hardcode non-existant directories.
6084   if test "$hardcode_direct" != no &&
6085      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6086      # have to relink, otherwise we might link with an installed library
6087      # when we should be linking with a yet-to-be-installed one
6088      ## test "$hardcode_shlibpath_var" != no &&
6089      test "$hardcode_minus_L" != no; then
6090     # Linking always hardcodes the temporary library directory.
6091     hardcode_action=relink
6092   else
6093     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6094     hardcode_action=immediate
6095   fi
6096 else
6097   # We cannot hardcode anything, or else we can only hardcode existing
6098   # directories.
6099   hardcode_action=unsupported
6100 fi
6101 echo "$ac_t""$hardcode_action" 1>&6
6102
6103 striplib=
6104 old_striplib=
6105 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6106 echo "configure:6107: checking whether stripping libraries is possible" >&5
6107 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6108   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6109   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6110   echo "$ac_t""yes" 1>&6
6111 else
6112   echo "$ac_t""no" 1>&6
6113 fi
6114
6115 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6116 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6117
6118 # PORTME Fill in your ld.so characteristics
6119 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6120 echo "configure:6121: checking dynamic linker characteristics" >&5
6121 library_names_spec=
6122 libname_spec='lib$name'
6123 soname_spec=
6124 postinstall_cmds=
6125 postuninstall_cmds=
6126 finish_cmds=
6127 finish_eval=
6128 shlibpath_var=
6129 shlibpath_overrides_runpath=unknown
6130 version_type=none
6131 dynamic_linker="$host_os ld.so"
6132 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6133 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6134
6135 case $host_os in
6136 aix3*)
6137   version_type=linux
6138   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6139   shlibpath_var=LIBPATH
6140
6141   # AIX has no versioning support, so we append a major version to the name.
6142   soname_spec='${libname}${release}.so$major'
6143   ;;
6144
6145 aix4* | aix5*)
6146   version_type=linux
6147   if test "$host_cpu" = ia64; then
6148     # AIX 5 supports IA64
6149     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6150     shlibpath_var=LD_LIBRARY_PATH
6151   else
6152     # With GCC up to 2.95.x, collect2 would create an import file
6153     # for dependence libraries.  The import file would start with
6154     # the line `#! .'.  This would cause the generated library to
6155     # depend on `.', always an invalid library.  This was fixed in
6156     # development snapshots of GCC prior to 3.0.
6157     case $host_os in
6158       aix4 | aix4.[01] | aix4.[01].*)
6159         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6160              echo ' yes '
6161              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6162           :
6163         else
6164           can_build_shared=no
6165         fi
6166         ;;
6167     esac
6168     # AIX (on Power*) has no versioning support, so currently we can
6169     # not hardcode correct soname into executable. Probably we can
6170     # add versioning support to collect2, so additional links can
6171     # be useful in future.
6172     if test "$aix_use_runtimelinking" = yes; then
6173       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6174       # instead of lib<name>.a to let people know that these are not
6175       # typical AIX shared libraries.
6176       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6177     else
6178       # We preserve .a as extension for shared libraries through AIX4.2
6179       # and later when we are not doing run time linking.
6180       library_names_spec='${libname}${release}.a $libname.a'
6181       soname_spec='${libname}${release}.so$major'
6182     fi
6183     shlibpath_var=LIBPATH
6184   fi
6185   ;;
6186
6187 amigaos*)
6188   library_names_spec='$libname.ixlibrary $libname.a'
6189   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6190   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'
6191   ;;
6192
6193 beos*)
6194   library_names_spec='${libname}.so'
6195   dynamic_linker="$host_os ld.so"
6196   shlibpath_var=LIBRARY_PATH
6197   ;;
6198
6199 bsdi4*)
6200   version_type=linux
6201   need_version=no
6202   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6203   soname_spec='${libname}${release}.so$major'
6204   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6205   shlibpath_var=LD_LIBRARY_PATH
6206   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6207   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6208   export_dynamic_flag_spec=-rdynamic
6209   # the default ld.so.conf also contains /usr/contrib/lib and
6210   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6211   # libtool to hard-code these into programs
6212   ;;
6213
6214 cygwin* | mingw* | pw32*)
6215   version_type=windows
6216   need_version=no
6217   need_lib_prefix=no
6218   case $GCC,$host_os in
6219   yes,cygwin*)
6220     library_names_spec='$libname.dll.a'
6221     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6222     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6223       dldir=$destdir/`dirname \$dlpath`~
6224       test -d \$dldir || mkdir -p \$dldir~
6225       $install_prog .libs/$dlname \$dldir/$dlname'
6226     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6227       dlpath=$dir/\$dldll~
6228        $rm \$dlpath'
6229     ;;
6230   yes,mingw*)
6231     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6232     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6233     ;;
6234   yes,pw32*)
6235     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6236     ;;
6237   *)
6238     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6239     ;;
6240   esac
6241   dynamic_linker='Win32 ld.exe'
6242   # FIXME: first we should search . and the directory the executable is in
6243   shlibpath_var=PATH
6244   ;;
6245
6246 darwin* | rhapsody*)
6247   dynamic_linker="$host_os dyld"
6248   version_type=darwin
6249   need_lib_prefix=no
6250   need_version=no
6251   # FIXME: Relying on posixy $() will cause problems for
6252   #        cross-compilation, but unfortunately the echo tests do not
6253   #        yet detect zsh echo's removal of \ escapes.
6254   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)'
6255   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6256   shlibpath_overrides_runpath=yes
6257   shlibpath_var=DYLD_LIBRARY_PATH
6258   ;;
6259
6260 freebsd1*)
6261   dynamic_linker=no
6262   ;;
6263
6264 freebsd*)
6265   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6266   version_type=freebsd-$objformat
6267   case $version_type in
6268     freebsd-elf*)
6269       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6270       need_version=no
6271       need_lib_prefix=no
6272       ;;
6273     freebsd-*)
6274       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6275       need_version=yes
6276       ;;
6277   esac
6278   shlibpath_var=LD_LIBRARY_PATH
6279   case $host_os in
6280   freebsd2*)
6281     shlibpath_overrides_runpath=yes
6282     ;;
6283   *)
6284     shlibpath_overrides_runpath=no
6285     hardcode_into_libs=yes
6286     ;;
6287   esac
6288   ;;
6289
6290 gnu*)
6291   version_type=linux
6292   need_lib_prefix=no
6293   need_version=no
6294   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6295   soname_spec='${libname}${release}.so$major'
6296   shlibpath_var=LD_LIBRARY_PATH
6297   hardcode_into_libs=yes
6298   ;;
6299
6300 hpux9* | hpux10* | hpux11*)
6301   # Give a soname corresponding to the major version so that dld.sl refuses to
6302   # link against other versions.
6303   dynamic_linker="$host_os dld.sl"
6304   version_type=sunos
6305   need_lib_prefix=no
6306   need_version=no
6307   shlibpath_var=SHLIB_PATH
6308   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6309   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6310   soname_spec='${libname}${release}.sl$major'
6311   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6312   postinstall_cmds='chmod 555 $lib'
6313   ;;
6314
6315 irix5* | irix6*)
6316   version_type=irix
6317   need_lib_prefix=no
6318   need_version=no
6319   soname_spec='${libname}${release}.so$major'
6320   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6321   case $host_os in
6322   irix5*)
6323     libsuff= shlibsuff=
6324     ;;
6325   *)
6326     case $LD in # libtool.m4 will add one of these switches to LD
6327     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6328     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6329     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6330     *) libsuff= shlibsuff= libmagic=never-match;;
6331     esac
6332     ;;
6333   esac
6334   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6335   shlibpath_overrides_runpath=no
6336   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6337   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6338   ;;
6339
6340 # No shared lib support for Linux oldld, aout, or coff.
6341 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6342   dynamic_linker=no
6343   ;;
6344
6345 # This must be Linux ELF.
6346 linux-gnu*)
6347   version_type=linux
6348   need_lib_prefix=no
6349   need_version=no
6350   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6351   soname_spec='${libname}${release}.so$major'
6352   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6353   shlibpath_var=LD_LIBRARY_PATH
6354   shlibpath_overrides_runpath=no
6355   # This implies no fast_install, which is unacceptable.
6356   # Some rework will be needed to allow for fast_install
6357   # before this can be enabled.
6358   hardcode_into_libs=yes
6359
6360   # We used to test for /lib/ld.so.1 and disable shared libraries on
6361   # powerpc, because MkLinux only supported shared libraries with the
6362   # GNU dynamic linker.  Since this was broken with cross compilers,
6363   # most powerpc-linux boxes support dynamic linking these days and
6364   # people can always --disable-shared, the test was removed, and we
6365   # assume the GNU/Linux dynamic linker is in use.
6366   dynamic_linker='GNU/Linux ld.so'
6367   ;;
6368
6369 netbsd*)
6370   version_type=sunos
6371   need_lib_prefix=no
6372   need_version=no
6373   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6374     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6375     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6376     dynamic_linker='NetBSD (a.out) ld.so'
6377   else
6378     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6379     soname_spec='${libname}${release}.so$major'
6380     dynamic_linker='NetBSD ld.elf_so'
6381   fi
6382   shlibpath_var=LD_LIBRARY_PATH
6383   shlibpath_overrides_runpath=yes
6384   hardcode_into_libs=yes
6385   ;;
6386
6387 newsos6)
6388   version_type=linux
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6390   shlibpath_var=LD_LIBRARY_PATH
6391   shlibpath_overrides_runpath=yes
6392   ;;
6393
6394 openbsd*)
6395   version_type=sunos
6396   need_lib_prefix=no
6397   need_version=no
6398   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6399     case "$host_os" in
6400     openbsd2.[89] | openbsd2.[89].*)
6401       shlibpath_overrides_runpath=no
6402       ;;
6403     *)
6404       shlibpath_overrides_runpath=yes
6405       ;;
6406     esac
6407   else
6408     shlibpath_overrides_runpath=yes
6409   fi
6410   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6411   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6412   shlibpath_var=LD_LIBRARY_PATH
6413   ;;
6414
6415 os2*)
6416   libname_spec='$name'
6417   need_lib_prefix=no
6418   library_names_spec='$libname.dll $libname.a'
6419   dynamic_linker='OS/2 ld.exe'
6420   shlibpath_var=LIBPATH
6421   ;;
6422
6423 osf3* | osf4* | osf5*)
6424   version_type=osf
6425   need_version=no
6426   soname_spec='${libname}${release}.so'
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6428   shlibpath_var=LD_LIBRARY_PATH
6429   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6430   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6431   ;;
6432
6433 sco3.2v5*)
6434   version_type=osf
6435   soname_spec='${libname}${release}.so$major'
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6437   shlibpath_var=LD_LIBRARY_PATH
6438   ;;
6439
6440 solaris*)
6441   version_type=linux
6442   need_lib_prefix=no
6443   need_version=no
6444   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6445   soname_spec='${libname}${release}.so$major'
6446   shlibpath_var=LD_LIBRARY_PATH
6447   shlibpath_overrides_runpath=yes
6448   hardcode_into_libs=yes
6449   # ldd complains unless libraries are executable
6450   postinstall_cmds='chmod +x $lib'
6451   ;;
6452
6453 sunos4*)
6454   version_type=sunos
6455   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6456   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6457   shlibpath_var=LD_LIBRARY_PATH
6458   shlibpath_overrides_runpath=yes
6459   if test "$with_gnu_ld" = yes; then
6460     need_lib_prefix=no
6461   fi
6462   need_version=yes
6463   ;;
6464
6465 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6466   version_type=linux
6467   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6468   soname_spec='${libname}${release}.so$major'
6469   shlibpath_var=LD_LIBRARY_PATH
6470   case $host_vendor in
6471     sni)
6472       shlibpath_overrides_runpath=no
6473       ;;
6474     motorola)
6475       need_lib_prefix=no
6476       need_version=no
6477       shlibpath_overrides_runpath=no
6478       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6479       ;;
6480   esac
6481   ;;
6482
6483 uts4*)
6484   version_type=linux
6485   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6486   soname_spec='${libname}${release}.so$major'
6487   shlibpath_var=LD_LIBRARY_PATH
6488   ;;
6489
6490 dgux*)
6491   version_type=linux
6492   need_lib_prefix=no
6493   need_version=no
6494   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6495   soname_spec='${libname}${release}.so$major'
6496   shlibpath_var=LD_LIBRARY_PATH
6497   ;;
6498
6499 sysv4*MP*)
6500   if test -d /usr/nec ;then
6501     version_type=linux
6502     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6503     soname_spec='$libname.so.$major'
6504     shlibpath_var=LD_LIBRARY_PATH
6505   fi
6506   ;;
6507
6508 *)
6509   dynamic_linker=no
6510   ;;
6511 esac
6512 echo "$ac_t""$dynamic_linker" 1>&6
6513 test "$dynamic_linker" = no && can_build_shared=no
6514
6515 # Report the final consequences.
6516 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6517 echo "configure:6518: checking if libtool supports shared libraries" >&5
6518 echo "$ac_t""$can_build_shared" 1>&6
6519
6520 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6521 echo "configure:6522: checking whether to build shared libraries" >&5
6522 test "$can_build_shared" = "no" && enable_shared=no
6523
6524 # On AIX, shared libraries and static libraries use the same namespace, and
6525 # are all built from PIC.
6526 case "$host_os" in
6527 aix3*)
6528   test "$enable_shared" = yes && enable_static=no
6529   if test -n "$RANLIB"; then
6530     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6531     postinstall_cmds='$RANLIB $lib'
6532   fi
6533   ;;
6534
6535 aix4*)
6536   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6537     test "$enable_shared" = yes && enable_static=no
6538   fi
6539   ;;
6540 esac
6541 echo "$ac_t""$enable_shared" 1>&6
6542
6543 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6544 echo "configure:6545: checking whether to build static libraries" >&5
6545 # Make sure either enable_shared or enable_static is yes.
6546 test "$enable_shared" = yes || enable_static=yes
6547 echo "$ac_t""$enable_static" 1>&6
6548
6549 if test "$hardcode_action" = relink; then
6550   # Fast installation is not supported
6551   enable_fast_install=no
6552 elif test "$shlibpath_overrides_runpath" = yes ||
6553      test "$enable_shared" = no; then
6554   # Fast installation is not necessary
6555   enable_fast_install=needless
6556 fi
6557
6558 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6559 if test "$GCC" = yes; then
6560   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6561 fi
6562
6563 if test "x$enable_dlopen" != xyes; then
6564   enable_dlopen=unknown
6565   enable_dlopen_self=unknown
6566   enable_dlopen_self_static=unknown
6567 else
6568   lt_cv_dlopen=no
6569   lt_cv_dlopen_libs=
6570
6571   case $host_os in
6572   beos*)
6573     lt_cv_dlopen="load_add_on"
6574     lt_cv_dlopen_libs=
6575     lt_cv_dlopen_self=yes
6576     ;;
6577
6578   cygwin* | mingw* | pw32*)
6579     lt_cv_dlopen="LoadLibrary"
6580     lt_cv_dlopen_libs=
6581    ;;
6582
6583   *)
6584     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6585 echo "configure:6586: checking for shl_load" >&5
6586 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6587   echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589   cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 /* System header to define __stub macros and hopefully few prototypes,
6593     which can conflict with char shl_load(); below.  */
6594 #include <assert.h>
6595 /* Override any gcc2 internal prototype to avoid an error.  */
6596 /* We use char because int might match the return type of a gcc2
6597     builtin and then its argument prototype would still apply.  */
6598 char shl_load();
6599 char (*f)();
6600
6601 int main() {
6602
6603 /* The GNU C library defines this for functions which it implements
6604     to always fail with ENOSYS.  Some functions are actually named
6605     something starting with __ and the normal name is an alias.  */
6606 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6607 choke me
6608 #else
6609 f = shl_load;
6610 #endif
6611
6612 ; return 0; }
6613 EOF
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615   rm -rf conftest*
6616   eval "ac_cv_func_shl_load=yes"
6617 else
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_func_shl_load=no"
6622 fi
6623 rm -f conftest*
6624 fi
6625
6626 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   lt_cv_dlopen="shl_load"
6629 else
6630   echo "$ac_t""no" 1>&6
6631 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6632 echo "configure:6633: checking for shl_load in -ldld" >&5
6633 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6634 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6635   echo $ac_n "(cached) $ac_c" 1>&6
6636 else
6637   ac_save_LIBS="$LIBS"
6638 LIBS="-ldld  $LIBS"
6639 cat > conftest.$ac_ext <<EOF
6640 #line 6641 "configure"
6641 #include "confdefs.h"
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char shl_load();
6646
6647 int main() {
6648 shl_load()
6649 ; return 0; }
6650 EOF
6651 if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6652   rm -rf conftest*
6653   eval "ac_cv_lib_$ac_lib_var=yes"
6654 else
6655   echo "configure: failed program was:" >&5
6656   cat conftest.$ac_ext >&5
6657   rm -rf conftest*
6658   eval "ac_cv_lib_$ac_lib_var=no"
6659 fi
6660 rm -f conftest*
6661 LIBS="$ac_save_LIBS"
6662
6663 fi
6664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6665   echo "$ac_t""yes" 1>&6
6666   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6667 else
6668   echo "$ac_t""no" 1>&6
6669 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6670 echo "configure:6671: checking for dlopen" >&5
6671 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6672   echo $ac_n "(cached) $ac_c" 1>&6
6673 else
6674   cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677 /* System header to define __stub macros and hopefully few prototypes,
6678     which can conflict with char dlopen(); below.  */
6679 #include <assert.h>
6680 /* Override any gcc2 internal prototype to avoid an error.  */
6681 /* We use char because int might match the return type of a gcc2
6682     builtin and then its argument prototype would still apply.  */
6683 char dlopen();
6684 char (*f)();
6685
6686 int main() {
6687
6688 /* The GNU C library defines this for functions which it implements
6689     to always fail with ENOSYS.  Some functions are actually named
6690     something starting with __ and the normal name is an alias.  */
6691 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6692 choke me
6693 #else
6694 f = dlopen;
6695 #endif
6696
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6700   rm -rf conftest*
6701   eval "ac_cv_func_dlopen=yes"
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   eval "ac_cv_func_dlopen=no"
6707 fi
6708 rm -f conftest*
6709 fi
6710
6711 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6712   echo "$ac_t""yes" 1>&6
6713   lt_cv_dlopen="dlopen"
6714 else
6715   echo "$ac_t""no" 1>&6
6716 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6717 echo "configure:6718: checking for dlopen in -ldl" >&5
6718 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-ldl  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char dlopen();
6731
6732 int main() {
6733 dlopen()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6752 else
6753   echo "$ac_t""no" 1>&6
6754 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6755 echo "configure:6756: checking for dlopen in -lsvld" >&5
6756 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   ac_save_LIBS="$LIBS"
6761 LIBS="-lsvld  $LIBS"
6762 cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char dlopen();
6769
6770 int main() {
6771 dlopen()
6772 ; return 0; }
6773 EOF
6774 if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=yes"
6777 else
6778   echo "configure: failed program was:" >&5
6779   cat conftest.$ac_ext >&5
6780   rm -rf conftest*
6781   eval "ac_cv_lib_$ac_lib_var=no"
6782 fi
6783 rm -f conftest*
6784 LIBS="$ac_save_LIBS"
6785
6786 fi
6787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6790 else
6791   echo "$ac_t""no" 1>&6
6792 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6793 echo "configure:6794: checking for dld_link in -ldld" >&5
6794 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6796   echo $ac_n "(cached) $ac_c" 1>&6
6797 else
6798   ac_save_LIBS="$LIBS"
6799 LIBS="-ldld  $LIBS"
6800 cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 /* We use char because int might match the return type of a gcc2
6805     builtin and then its argument prototype would still apply.  */
6806 char dld_link();
6807
6808 int main() {
6809 dld_link()
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=yes"
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=no"
6820 fi
6821 rm -f conftest*
6822 LIBS="$ac_save_LIBS"
6823
6824 fi
6825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6826   echo "$ac_t""yes" 1>&6
6827   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6828 else
6829   echo "$ac_t""no" 1>&6
6830 fi
6831
6832               
6833 fi
6834
6835             
6836 fi
6837
6838           
6839 fi
6840
6841         
6842 fi
6843
6844       
6845 fi
6846
6847     ;;
6848   esac
6849
6850   if test "x$lt_cv_dlopen" != xno; then
6851     enable_dlopen=yes
6852   else
6853     enable_dlopen=no
6854   fi
6855
6856   case $lt_cv_dlopen in
6857   dlopen)
6858     save_CPPFLAGS="$CPPFLAGS"
6859         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6860
6861     save_LDFLAGS="$LDFLAGS"
6862     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6863
6864     save_LIBS="$LIBS"
6865     LIBS="$lt_cv_dlopen_libs $LIBS"
6866
6867     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6868 echo "configure:6869: checking whether a program can dlopen itself" >&5
6869 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872           if test "$cross_compiling" = yes; then :
6873   lt_cv_dlopen_self=cross
6874 else
6875     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6876   lt_status=$lt_dlunknown
6877   cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880
6881 #if HAVE_DLFCN_H
6882 #include <dlfcn.h>
6883 #endif
6884
6885 #include <stdio.h>
6886
6887 #ifdef RTLD_GLOBAL
6888 #  define LT_DLGLOBAL           RTLD_GLOBAL
6889 #else
6890 #  ifdef DL_GLOBAL
6891 #    define LT_DLGLOBAL         DL_GLOBAL
6892 #  else
6893 #    define LT_DLGLOBAL         0
6894 #  endif
6895 #endif
6896
6897 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6898    find out it does not work in some platform. */
6899 #ifndef LT_DLLAZY_OR_NOW
6900 #  ifdef RTLD_LAZY
6901 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6902 #  else
6903 #    ifdef DL_LAZY
6904 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6905 #    else
6906 #      ifdef RTLD_NOW
6907 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6908 #      else
6909 #        ifdef DL_NOW
6910 #          define LT_DLLAZY_OR_NOW      DL_NOW
6911 #        else
6912 #          define LT_DLLAZY_OR_NOW      0
6913 #        endif
6914 #      endif
6915 #    endif
6916 #  endif
6917 #endif
6918
6919 #ifdef __cplusplus
6920 extern "C" void exit (int);
6921 #endif
6922
6923 void fnord() { int i=42;}
6924 int main ()
6925 {
6926   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6927   int status = $lt_dlunknown;
6928
6929   if (self)
6930     {
6931       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6932       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6933       /* dlclose (self); */
6934     }
6935
6936     exit (status);
6937 }
6938 EOF
6939   if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6940     (./conftest; exit; ) 2>/dev/null
6941     lt_status=$?
6942     case x$lt_status in
6943       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6944       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6945       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6946     esac
6947   else :
6948     # compilation failed
6949     lt_cv_dlopen_self=no
6950   fi
6951 fi
6952 rm -fr conftest*
6953
6954     
6955 fi
6956
6957 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6958
6959     if test "x$lt_cv_dlopen_self" = xyes; then
6960       LDFLAGS="$LDFLAGS $link_static_flag"
6961       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6962 echo "configure:6963: checking whether a statically linked program can dlopen itself" >&5
6963 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6964   echo $ac_n "(cached) $ac_c" 1>&6
6965 else
6966           if test "$cross_compiling" = yes; then :
6967   lt_cv_dlopen_self_static=cross
6968 else
6969     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6970   lt_status=$lt_dlunknown
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974
6975 #if HAVE_DLFCN_H
6976 #include <dlfcn.h>
6977 #endif
6978
6979 #include <stdio.h>
6980
6981 #ifdef RTLD_GLOBAL
6982 #  define LT_DLGLOBAL           RTLD_GLOBAL
6983 #else
6984 #  ifdef DL_GLOBAL
6985 #    define LT_DLGLOBAL         DL_GLOBAL
6986 #  else
6987 #    define LT_DLGLOBAL         0
6988 #  endif
6989 #endif
6990
6991 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6992    find out it does not work in some platform. */
6993 #ifndef LT_DLLAZY_OR_NOW
6994 #  ifdef RTLD_LAZY
6995 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6996 #  else
6997 #    ifdef DL_LAZY
6998 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6999 #    else
7000 #      ifdef RTLD_NOW
7001 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7002 #      else
7003 #        ifdef DL_NOW
7004 #          define LT_DLLAZY_OR_NOW      DL_NOW
7005 #        else
7006 #          define LT_DLLAZY_OR_NOW      0
7007 #        endif
7008 #      endif
7009 #    endif
7010 #  endif
7011 #endif
7012
7013 #ifdef __cplusplus
7014 extern "C" void exit (int);
7015 #endif
7016
7017 void fnord() { int i=42;}
7018 int main ()
7019 {
7020   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7021   int status = $lt_dlunknown;
7022
7023   if (self)
7024     {
7025       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7026       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7027       /* dlclose (self); */
7028     }
7029
7030     exit (status);
7031 }
7032 EOF
7033   if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7034     (./conftest; exit; ) 2>/dev/null
7035     lt_status=$?
7036     case x$lt_status in
7037       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7038       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7039       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7040     esac
7041   else :
7042     # compilation failed
7043     lt_cv_dlopen_self_static=no
7044   fi
7045 fi
7046 rm -fr conftest*
7047
7048       
7049 fi
7050
7051 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7052     fi
7053
7054     CPPFLAGS="$save_CPPFLAGS"
7055     LDFLAGS="$save_LDFLAGS"
7056     LIBS="$save_LIBS"
7057     ;;
7058   esac
7059
7060   case $lt_cv_dlopen_self in
7061   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7062   *) enable_dlopen_self=unknown ;;
7063   esac
7064
7065   case $lt_cv_dlopen_self_static in
7066   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7067   *) enable_dlopen_self_static=unknown ;;
7068   esac
7069 fi
7070
7071
7072 if test "$enable_shared" = yes && test "$GCC" = yes; then
7073   case $archive_cmds in
7074   *'~'*)
7075     # FIXME: we may have to deal with multi-command sequences.
7076     ;;
7077   '$CC '*)
7078     # Test whether the compiler implicitly links with -lc since on some
7079     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7080     # to ld, don't add -lc before -lgcc.
7081     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7082 echo "configure:7083: checking whether -lc should be explicitly linked in" >&5
7083     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7084   echo $ac_n "(cached) $ac_c" 1>&6
7085 else
7086   $rm conftest*
7087     echo 'static int dummy;' > conftest.$ac_ext
7088
7089     if { (eval echo configure:7090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7090       soname=conftest
7091       lib=conftest
7092       libobjs=conftest.$ac_objext
7093       deplibs=
7094       wl=$lt_cv_prog_cc_wl
7095       compiler_flags=-v
7096       linker_flags=-v
7097       verstring=
7098       output_objdir=.
7099       libname=conftest
7100       save_allow_undefined_flag=$allow_undefined_flag
7101       allow_undefined_flag=
7102       if { (eval echo configure:7103: \"$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; }
7103       then
7104         lt_cv_archive_cmds_need_lc=no
7105       else
7106         lt_cv_archive_cmds_need_lc=yes
7107       fi
7108       allow_undefined_flag=$save_allow_undefined_flag
7109     else
7110       cat conftest.err 1>&5
7111     fi
7112 fi
7113
7114     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7115     ;;
7116   esac
7117 fi
7118 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7119
7120 # The second clause should only fire when bootstrapping the
7121 # libtool distribution, otherwise you forgot to ship ltmain.sh
7122 # with your package, and you will get complaints that there are
7123 # no rules to generate ltmain.sh.
7124 if test -f "$ltmain"; then
7125   :
7126 else
7127   # If there is no Makefile yet, we rely on a make rule to execute
7128   # `config.status --recheck' to rerun these tests and create the
7129   # libtool script then.
7130   test -f Makefile && make "$ltmain"
7131 fi
7132
7133 if test -f "$ltmain"; then
7134   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7135   $rm -f "${ofile}T"
7136
7137   echo creating $ofile
7138
7139   # Now quote all the things that may contain metacharacters while being
7140   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7141   # variables and quote the copies for generation of the libtool script.
7142   for var in echo old_CC old_CFLAGS \
7143     AR AR_FLAGS CC LD LN_S NM SHELL \
7144     reload_flag reload_cmds wl \
7145     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7146     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7147     library_names_spec soname_spec \
7148     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7149     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7150     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7151     old_striplib striplib file_magic_cmd export_symbols_cmds \
7152     deplibs_check_method allow_undefined_flag no_undefined_flag \
7153     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7154     global_symbol_to_c_name_address \
7155     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7156     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7157     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7158
7159     case $var in
7160     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7161     old_postinstall_cmds | old_postuninstall_cmds | \
7162     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7163     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7164     postinstall_cmds | postuninstall_cmds | \
7165     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7166       # Double-quote double-evaled strings.
7167       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7168       ;;
7169     *)
7170       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7171       ;;
7172     esac
7173   done
7174
7175   cat <<__EOF__ > "${ofile}T"
7176 #! $SHELL
7177
7178 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7179 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7180 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7181 #
7182 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7183 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7184 #
7185 # This program is free software; you can redistribute it and/or modify
7186 # it under the terms of the GNU General Public License as published by
7187 # the Free Software Foundation; either version 2 of the License, or
7188 # (at your option) any later version.
7189 #
7190 # This program is distributed in the hope that it will be useful, but
7191 # WITHOUT ANY WARRANTY; without even the implied warranty of
7192 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7193 # General Public License for more details.
7194 #
7195 # You should have received a copy of the GNU General Public License
7196 # along with this program; if not, write to the Free Software
7197 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7198 #
7199 # As a special exception to the GNU General Public License, if you
7200 # distribute this file as part of a program that contains a
7201 # configuration script generated by Autoconf, you may include it under
7202 # the same distribution terms that you use for the rest of that program.
7203
7204 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7205 Xsed="sed -e s/^X//"
7206
7207 # The HP-UX ksh and POSIX shell print the target directory to stdout
7208 # if CDPATH is set.
7209 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7210
7211 # ### BEGIN LIBTOOL CONFIG
7212
7213 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7214
7215 # Shell to use when invoking shell scripts.
7216 SHELL=$lt_SHELL
7217
7218 # Whether or not to build shared libraries.
7219 build_libtool_libs=$enable_shared
7220
7221 # Whether or not to build static libraries.
7222 build_old_libs=$enable_static
7223
7224 # Whether or not to add -lc for building shared libraries.
7225 build_libtool_need_lc=$need_lc
7226
7227 # Whether or not to optimize for fast installation.
7228 fast_install=$enable_fast_install
7229
7230 # The host system.
7231 host_alias=$host_alias
7232 host=$host
7233
7234 # An echo program that does not interpret backslashes.
7235 echo=$lt_echo
7236
7237 # The archiver.
7238 AR=$lt_AR
7239 AR_FLAGS=$lt_AR_FLAGS
7240
7241 # The default C compiler.
7242 CC=$lt_CC
7243
7244 # Is the compiler the GNU C compiler?
7245 with_gcc=$GCC
7246
7247 # The linker used to build libraries.
7248 LD=$lt_LD
7249
7250 # Whether we need hard or soft links.
7251 LN_S=$lt_LN_S
7252
7253 # A BSD-compatible nm program.
7254 NM=$lt_NM
7255
7256 # A symbol stripping program
7257 STRIP=$STRIP
7258
7259 # Used to examine libraries when file_magic_cmd begins "file"
7260 MAGIC_CMD=$MAGIC_CMD
7261
7262 # Used on cygwin: DLL creation program.
7263 DLLTOOL="$DLLTOOL"
7264
7265 # Used on cygwin: object dumper.
7266 OBJDUMP="$OBJDUMP"
7267
7268 # Used on cygwin: assembler.
7269 AS="$AS"
7270
7271 # The name of the directory that contains temporary libtool files.
7272 objdir=$objdir
7273
7274 # How to create reloadable object files.
7275 reload_flag=$lt_reload_flag
7276 reload_cmds=$lt_reload_cmds
7277
7278 # How to pass a linker flag through the compiler.
7279 wl=$lt_wl
7280
7281 # Object file suffix (normally "o").
7282 objext="$ac_objext"
7283
7284 # Old archive suffix (normally "a").
7285 libext="$libext"
7286
7287 # Executable file suffix (normally "").
7288 exeext="$exeext"
7289
7290 # Additional compiler flags for building library objects.
7291 pic_flag=$lt_pic_flag
7292 pic_mode=$pic_mode
7293
7294 # Does compiler simultaneously support -c and -o options?
7295 compiler_c_o=$lt_compiler_c_o
7296
7297 # Can we write directly to a .lo ?
7298 compiler_o_lo=$lt_compiler_o_lo
7299
7300 # Must we lock files when doing compilation ?
7301 need_locks=$lt_need_locks
7302
7303 # Do we need the lib prefix for modules?
7304 need_lib_prefix=$need_lib_prefix
7305
7306 # Do we need a version for libraries?
7307 need_version=$need_version
7308
7309 # Whether dlopen is supported.
7310 dlopen_support=$enable_dlopen
7311
7312 # Whether dlopen of programs is supported.
7313 dlopen_self=$enable_dlopen_self
7314
7315 # Whether dlopen of statically linked programs is supported.
7316 dlopen_self_static=$enable_dlopen_self_static
7317
7318 # Compiler flag to prevent dynamic linking.
7319 link_static_flag=$lt_link_static_flag
7320
7321 # Compiler flag to turn off builtin functions.
7322 no_builtin_flag=$lt_no_builtin_flag
7323
7324 # Compiler flag to allow reflexive dlopens.
7325 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7326
7327 # Compiler flag to generate shared objects directly from archives.
7328 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7329
7330 # Compiler flag to generate thread-safe objects.
7331 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7332
7333 # Library versioning type.
7334 version_type=$version_type
7335
7336 # Format of library name prefix.
7337 libname_spec=$lt_libname_spec
7338
7339 # List of archive names.  First name is the real one, the rest are links.
7340 # The last name is the one that the linker finds with -lNAME.
7341 library_names_spec=$lt_library_names_spec
7342
7343 # The coded name of the library, if different from the real name.
7344 soname_spec=$lt_soname_spec
7345
7346 # Commands used to build and install an old-style archive.
7347 RANLIB=$lt_RANLIB
7348 old_archive_cmds=$lt_old_archive_cmds
7349 old_postinstall_cmds=$lt_old_postinstall_cmds
7350 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7351
7352 # Create an old-style archive from a shared archive.
7353 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7354
7355 # Create a temporary old-style archive to link instead of a shared archive.
7356 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7357
7358 # Commands used to build and install a shared archive.
7359 archive_cmds=$lt_archive_cmds
7360 archive_expsym_cmds=$lt_archive_expsym_cmds
7361 postinstall_cmds=$lt_postinstall_cmds
7362 postuninstall_cmds=$lt_postuninstall_cmds
7363
7364 # Commands to strip libraries.
7365 old_striplib=$lt_old_striplib
7366 striplib=$lt_striplib
7367
7368 # Method to check whether dependent libraries are shared objects.
7369 deplibs_check_method=$lt_deplibs_check_method
7370
7371 # Command to use when deplibs_check_method == file_magic.
7372 file_magic_cmd=$lt_file_magic_cmd
7373
7374 # Flag that allows shared libraries with undefined symbols to be built.
7375 allow_undefined_flag=$lt_allow_undefined_flag
7376
7377 # Flag that forces no undefined symbols.
7378 no_undefined_flag=$lt_no_undefined_flag
7379
7380 # Commands used to finish a libtool library installation in a directory.
7381 finish_cmds=$lt_finish_cmds
7382
7383 # Same as above, but a single script fragment to be evaled but not shown.
7384 finish_eval=$lt_finish_eval
7385
7386 # Take the output of nm and produce a listing of raw symbols and C names.
7387 global_symbol_pipe=$lt_global_symbol_pipe
7388
7389 # Transform the output of nm in a proper C declaration
7390 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7391
7392 # Transform the output of nm in a C name address pair
7393 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7394
7395 # This is the shared library runtime path variable.
7396 runpath_var=$runpath_var
7397
7398 # This is the shared library path variable.
7399 shlibpath_var=$shlibpath_var
7400
7401 # Is shlibpath searched before the hard-coded library search path?
7402 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7403
7404 # How to hardcode a shared library path into an executable.
7405 hardcode_action=$hardcode_action
7406
7407 # Whether we should hardcode library paths into libraries.
7408 hardcode_into_libs=$hardcode_into_libs
7409
7410 # Flag to hardcode \$libdir into a binary during linking.
7411 # This must work even if \$libdir does not exist.
7412 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7413
7414 # Whether we need a single -rpath flag with a separated argument.
7415 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7416
7417 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7418 # resulting binary.
7419 hardcode_direct=$hardcode_direct
7420
7421 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7422 # resulting binary.
7423 hardcode_minus_L=$hardcode_minus_L
7424
7425 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7426 # the resulting binary.
7427 hardcode_shlibpath_var=$hardcode_shlibpath_var
7428
7429 # Variables whose values should be saved in libtool wrapper scripts and
7430 # restored at relink time.
7431 variables_saved_for_relink="$variables_saved_for_relink"
7432
7433 # Whether libtool must link a program against all its dependency libraries.
7434 link_all_deplibs=$link_all_deplibs
7435
7436 # Compile-time system search path for libraries
7437 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7438
7439 # Run-time system search path for libraries
7440 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7441
7442 # Fix the shell variable \$srcfile for the compiler.
7443 fix_srcfile_path="$fix_srcfile_path"
7444
7445 # Set to yes if exported symbols are required.
7446 always_export_symbols=$always_export_symbols
7447
7448 # The commands to list exported symbols.
7449 export_symbols_cmds=$lt_export_symbols_cmds
7450
7451 # The commands to extract the exported symbol list from a shared archive.
7452 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7453
7454 # Symbols that should not be listed in the preloaded symbols.
7455 exclude_expsyms=$lt_exclude_expsyms
7456
7457 # Symbols that must always be exported.
7458 include_expsyms=$lt_include_expsyms
7459
7460 # ### END LIBTOOL CONFIG
7461
7462 __EOF__
7463
7464   case $host_os in
7465   aix3*)
7466     cat <<\EOF >> "${ofile}T"
7467
7468 # AIX sometimes has problems with the GCC collect2 program.  For some
7469 # reason, if we set the COLLECT_NAMES environment variable, the problems
7470 # vanish in a puff of smoke.
7471 if test "X${COLLECT_NAMES+set}" != Xset; then
7472   COLLECT_NAMES=
7473   export COLLECT_NAMES
7474 fi
7475 EOF
7476     ;;
7477   esac
7478
7479   case $host_os in
7480   cygwin* | mingw* | pw32* | os2*)
7481     cat <<'EOF' >> "${ofile}T"
7482       # This is a source program that is used to create dlls on Windows
7483       # Don't remove nor modify the starting and closing comments
7484 # /* ltdll.c starts here */
7485 # #define WIN32_LEAN_AND_MEAN
7486 # #include <windows.h>
7487 # #undef WIN32_LEAN_AND_MEAN
7488 # #include <stdio.h>
7489 #
7490 # #ifndef __CYGWIN__
7491 # #  ifdef __CYGWIN32__
7492 # #    define __CYGWIN__ __CYGWIN32__
7493 # #  endif
7494 # #endif
7495 #
7496 # #ifdef __cplusplus
7497 # extern "C" {
7498 # #endif
7499 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7500 # #ifdef __cplusplus
7501 # }
7502 # #endif
7503 #
7504 # #ifdef __CYGWIN__
7505 # #include <cygwin/cygwin_dll.h>
7506 # DECLARE_CYGWIN_DLL( DllMain );
7507 # #endif
7508 # HINSTANCE __hDllInstance_base;
7509 #
7510 # BOOL APIENTRY
7511 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7512 # {
7513 #   __hDllInstance_base = hInst;
7514 #   return TRUE;
7515 # }
7516 # /* ltdll.c ends here */
7517         # This is a source program that is used to create import libraries
7518         # on Windows for dlls which lack them. Don't remove nor modify the
7519         # starting and closing comments
7520 # /* impgen.c starts here */
7521 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7522 #
7523 #  This file is part of GNU libtool.
7524 #
7525 #  This program is free software; you can redistribute it and/or modify
7526 #  it under the terms of the GNU General Public License as published by
7527 #  the Free Software Foundation; either version 2 of the License, or
7528 #  (at your option) any later version.
7529 #
7530 #  This program is distributed in the hope that it will be useful,
7531 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7532 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7533 #  GNU General Public License for more details.
7534 #
7535 #  You should have received a copy of the GNU General Public License
7536 #  along with this program; if not, write to the Free Software
7537 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7538 #  */
7539 #
7540 # #include <stdio.h>            /* for printf() */
7541 # #include <unistd.h>           /* for open(), lseek(), read() */
7542 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7543 # #include <string.h>           /* for strdup() */
7544 #
7545 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7546 # #ifndef O_BINARY
7547 # #define O_BINARY 0
7548 # #endif
7549 #
7550 # static unsigned int
7551 # pe_get16 (fd, offset)
7552 #      int fd;
7553 #      int offset;
7554 # {
7555 #   unsigned char b[2];
7556 #   lseek (fd, offset, SEEK_SET);
7557 #   read (fd, b, 2);
7558 #   return b[0] + (b[1]<<8);
7559 # }
7560 #
7561 # static unsigned int
7562 # pe_get32 (fd, offset)
7563 #     int fd;
7564 #     int offset;
7565 # {
7566 #   unsigned char b[4];
7567 #   lseek (fd, offset, SEEK_SET);
7568 #   read (fd, b, 4);
7569 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7570 # }
7571 #
7572 # static unsigned int
7573 # pe_as32 (ptr)
7574 #      void *ptr;
7575 # {
7576 #   unsigned char *b = ptr;
7577 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7578 # }
7579 #
7580 # int
7581 # main (argc, argv)
7582 #     int argc;
7583 #     char *argv[];
7584 # {
7585 #     int dll;
7586 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7587 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7588 #     unsigned long name_rvas, nexp;
7589 #     unsigned char *expdata, *erva;
7590 #     char *filename, *dll_name;
7591 #
7592 #     filename = argv[1];
7593 #
7594 #     dll = open(filename, O_RDONLY|O_BINARY);
7595 #     if (dll < 1)
7596 #       return 1;
7597 #
7598 #     dll_name = filename;
7599 #
7600 #     for (i=0; filename[i]; i++)
7601 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7602 #           dll_name = filename + i +1;
7603 #
7604 #     pe_header_offset = pe_get32 (dll, 0x3c);
7605 #     opthdr_ofs = pe_header_offset + 4 + 20;
7606 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7607 #
7608 #     if (num_entries < 1) /* no exports */
7609 #       return 1;
7610 #
7611 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7612 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7613 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7614 #     secptr = (pe_header_offset + 4 + 20 +
7615 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7616 #
7617 #     expptr = 0;
7618 #     for (i = 0; i < nsections; i++)
7619 #     {
7620 #       char sname[8];
7621 #       unsigned long secptr1 = secptr + 40 * i;
7622 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7623 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7624 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7625 #       lseek(dll, secptr1, SEEK_SET);
7626 #       read(dll, sname, 8);
7627 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7628 #       {
7629 #           expptr = fptr + (export_rva - vaddr);
7630 #           if (export_rva + export_size > vaddr + vsize)
7631 #               export_size = vsize - (export_rva - vaddr);
7632 #           break;
7633 #       }
7634 #     }
7635 #
7636 #     expdata = (unsigned char*)malloc(export_size);
7637 #     lseek (dll, expptr, SEEK_SET);
7638 #     read (dll, expdata, export_size);
7639 #     erva = expdata - export_rva;
7640 #
7641 #     nexp = pe_as32 (expdata+24);
7642 #     name_rvas = pe_as32 (expdata+32);
7643 #
7644 #     printf ("EXPORTS\n");
7645 #     for (i = 0; i<nexp; i++)
7646 #     {
7647 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7648 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7649 #     }
7650 #
7651 #     return 0;
7652 # }
7653 # /* impgen.c ends here */
7654
7655 EOF
7656     ;;
7657   esac
7658
7659   # We use sed instead of cat because bash on DJGPP gets confused if
7660   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7661   # text mode, it properly converts lines to CR/LF.  This bash problem
7662   # is reportedly fixed, but why not run on old versions too?
7663   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7664
7665   mv -f "${ofile}T" "$ofile" || \
7666     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7667   chmod +x "$ofile"
7668 fi
7669
7670
7671
7672
7673
7674 # This can be used to rebuild libtool when needed
7675 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7676
7677 # Always use our own libtool.
7678 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7679
7680 # Prevent multiple expansion
7681
7682
7683
7684 for ac_prog in mawk gawk nawk awk
7685 do
7686 # Extract the first word of "$ac_prog", so it can be a program name with args.
7687 set dummy $ac_prog; ac_word=$2
7688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7689 echo "configure:7690: checking for $ac_word" >&5
7690 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7691   echo $ac_n "(cached) $ac_c" 1>&6
7692 else
7693   if test -n "$AWK"; then
7694   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7695 else
7696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7697   ac_dummy="$PATH"
7698   for ac_dir in $ac_dummy; do
7699     test -z "$ac_dir" && ac_dir=.
7700     if test -f $ac_dir/$ac_word; then
7701       ac_cv_prog_AWK="$ac_prog"
7702       break
7703     fi
7704   done
7705   IFS="$ac_save_ifs"
7706 fi
7707 fi
7708 AWK="$ac_cv_prog_AWK"
7709 if test -n "$AWK"; then
7710   echo "$ac_t""$AWK" 1>&6
7711 else
7712   echo "$ac_t""no" 1>&6
7713 fi
7714
7715 test -n "$AWK" && break
7716 done
7717
7718 # test for ln hardlink support
7719 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7720 echo "configure:7721: checking whether ln works" >&5
7721 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7722   echo $ac_n "(cached) $ac_c" 1>&6
7723 else
7724   rm -f conftest.src conftest.dst
7725 echo "conftest" > conftest.src
7726 if ln conftest.src conftest.dst 2>/dev/null
7727 then
7728   ol_cv_prog_LN_H="ln"
7729 else
7730   ol_cv_prog_LN_H="cp"
7731 fi
7732 rm -f conftest.src conftest.dst
7733
7734 fi
7735 LN_H="$ol_cv_prog_LN_H"
7736 if test "$ol_cv_prog_LN_H" = "ln"; then
7737         echo "$ac_t""yes" 1>&6
7738 else
7739         echo "$ac_t""no" 1>&6
7740 fi
7741
7742 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7743 echo "configure:7744: checking whether ln -s works" >&5
7744 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7745   echo $ac_n "(cached) $ac_c" 1>&6
7746 else
7747   rm -f conftestdata
7748 if ln -s X conftestdata 2>/dev/null
7749 then
7750   rm -f conftestdata
7751   ac_cv_prog_LN_S="ln -s"
7752 else
7753   ac_cv_prog_LN_S=ln
7754 fi
7755 fi
7756 LN_S="$ac_cv_prog_LN_S"
7757 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7758   echo "$ac_t""yes" 1>&6
7759 else
7760   echo "$ac_t""no" 1>&6
7761 fi
7762
7763
7764 # Extract the first word of "sendmail", so it can be a program name with args.
7765 set dummy sendmail; ac_word=$2
7766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7767 echo "configure:7768: checking for $ac_word" >&5
7768 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7769   echo $ac_n "(cached) $ac_c" 1>&6
7770 else
7771   case "$SENDMAIL" in
7772   /*)
7773   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7774   ;;
7775   ?:/*)
7776   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7777   ;;
7778   *)
7779   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7780   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7781   for ac_dir in $ac_dummy; do 
7782     test -z "$ac_dir" && ac_dir=.
7783     if test -f $ac_dir/$ac_word; then
7784       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7785       break
7786     fi
7787   done
7788   IFS="$ac_save_ifs"
7789   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7790   ;;
7791 esac
7792 fi
7793 SENDMAIL="$ac_cv_path_SENDMAIL"
7794 if test -n "$SENDMAIL"; then
7795   echo "$ac_t""$SENDMAIL" 1>&6
7796 else
7797   echo "$ac_t""no" 1>&6
7798 fi
7799
7800 # Extract the first word of "vi", so it can be a program name with args.
7801 set dummy vi; ac_word=$2
7802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7803 echo "configure:7804: checking for $ac_word" >&5
7804 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7805   echo $ac_n "(cached) $ac_c" 1>&6
7806 else
7807   case "$EDITOR" in
7808   /*)
7809   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7810   ;;
7811   ?:/*)
7812   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7813   ;;
7814   *)
7815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7816   ac_dummy="$PATH:/usr/ucb"
7817   for ac_dir in $ac_dummy; do 
7818     test -z "$ac_dir" && ac_dir=.
7819     if test -f $ac_dir/$ac_word; then
7820       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7821       break
7822     fi
7823   done
7824   IFS="$ac_save_ifs"
7825   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7826   ;;
7827 esac
7828 fi
7829 EDITOR="$ac_cv_path_EDITOR"
7830 if test -n "$EDITOR"; then
7831   echo "$ac_t""$EDITOR" 1>&6
7832 else
7833   echo "$ac_t""no" 1>&6
7834 fi
7835
7836
7837 ol_link_perl=no
7838 if test $ol_enable_perl != no ; then
7839         # Extract the first word of "perl", so it can be a program name with args.
7840 set dummy perl; ac_word=$2
7841 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7842 echo "configure:7843: checking for $ac_word" >&5
7843 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7844   echo $ac_n "(cached) $ac_c" 1>&6
7845 else
7846   case "$PERLBIN" in
7847   /*)
7848   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7849   ;;
7850   ?:/*)
7851   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7852   ;;
7853   *)
7854   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7855   ac_dummy="$PATH"
7856   for ac_dir in $ac_dummy; do 
7857     test -z "$ac_dir" && ac_dir=.
7858     if test -f $ac_dir/$ac_word; then
7859       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7860       break
7861     fi
7862   done
7863   IFS="$ac_save_ifs"
7864   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7865   ;;
7866 esac
7867 fi
7868 PERLBIN="$ac_cv_path_PERLBIN"
7869 if test -n "$PERLBIN"; then
7870   echo "$ac_t""$PERLBIN" 1>&6
7871 else
7872   echo "$ac_t""no" 1>&6
7873 fi
7874
7875
7876         if test "no$PERLBIN" = "no" ; then
7877                 if test $ol_enable_perl = yes ; then
7878                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7879                 fi
7880
7881         else
7882                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7883                 if test x"$ol_with_perl_module" = "xstatic" ; then
7884                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7885                 else
7886                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7887                 fi
7888                                 ol_link_perl=yes
7889         fi
7890 fi
7891
7892 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7893 echo "configure:7894: checking how to run the C preprocessor" >&5
7894 # On Suns, sometimes $CPP names a directory.
7895 if test -n "$CPP" && test -d "$CPP"; then
7896   CPP=
7897 fi
7898 if test -z "$CPP"; then
7899 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7900   echo $ac_n "(cached) $ac_c" 1>&6
7901 else
7902     # This must be in double quotes, not single quotes, because CPP may get
7903   # substituted into the Makefile and "${CC-cc}" will confuse make.
7904   CPP="${CC-cc} -E"
7905   # On the NeXT, cc -E runs the code through the compiler's parser,
7906   # not just through cpp.
7907   cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 #include <assert.h>
7911 Syntax Error
7912 EOF
7913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7914 { (eval echo configure:7915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7916 if test -z "$ac_err"; then
7917   :
7918 else
7919   echo "$ac_err" >&5
7920   echo "configure: failed program was:" >&5
7921   cat conftest.$ac_ext >&5
7922   rm -rf conftest*
7923   CPP="${CC-cc} -E -traditional-cpp"
7924   cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 #include <assert.h>
7928 Syntax Error
7929 EOF
7930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7931 { (eval echo configure:7932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7933 if test -z "$ac_err"; then
7934   :
7935 else
7936   echo "$ac_err" >&5
7937   echo "configure: failed program was:" >&5
7938   cat conftest.$ac_ext >&5
7939   rm -rf conftest*
7940   CPP="${CC-cc} -nologo -E"
7941   cat > conftest.$ac_ext <<EOF
7942 #line 7943 "configure"
7943 #include "confdefs.h"
7944 #include <assert.h>
7945 Syntax Error
7946 EOF
7947 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7948 { (eval echo configure:7949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7949 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7950 if test -z "$ac_err"; then
7951   :
7952 else
7953   echo "$ac_err" >&5
7954   echo "configure: failed program was:" >&5
7955   cat conftest.$ac_ext >&5
7956   rm -rf conftest*
7957   CPP=/lib/cpp
7958 fi
7959 rm -f conftest*
7960 fi
7961 rm -f conftest*
7962 fi
7963 rm -f conftest*
7964   ac_cv_prog_CPP="$CPP"
7965 fi
7966   CPP="$ac_cv_prog_CPP"
7967 else
7968   ac_cv_prog_CPP="$CPP"
7969 fi
7970 echo "$ac_t""$CPP" 1>&6
7971
7972
7973 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7974         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7975
7976 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7977         echo "configure: warning: programs compiled here do run here..." 1>&2
7978         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7979
7980 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7981         echo "configure: warning: programs compiled here do not run here..." 1>&2
7982         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7983 fi
7984
7985
7986 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7987 echo "configure:7988: checking for Cygwin environment" >&5
7988 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994
7995 int main() {
7996
7997 #ifndef __CYGWIN__
7998 #define __CYGWIN__ __CYGWIN32__
7999 #endif
8000 return __CYGWIN__;
8001 ; return 0; }
8002 EOF
8003 if { (eval echo configure:8004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8004   rm -rf conftest*
8005   ac_cv_cygwin=yes
8006 else
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -rf conftest*
8010   ac_cv_cygwin=no
8011 fi
8012 rm -f conftest*
8013 fi
8014
8015 echo "$ac_t""$ac_cv_cygwin" 1>&6
8016 CYGWIN=
8017 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8018 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8019 echo "configure:8020: checking for mingw32 environment" >&5
8020 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8021   echo $ac_n "(cached) $ac_c" 1>&6
8022 else
8023   cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026
8027 int main() {
8028 return __MINGW32__;
8029 ; return 0; }
8030 EOF
8031 if { (eval echo configure:8032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8032   rm -rf conftest*
8033   ac_cv_mingw32=yes
8034 else
8035   echo "configure: failed program was:" >&5
8036   cat conftest.$ac_ext >&5
8037   rm -rf conftest*
8038   ac_cv_mingw32=no
8039 fi
8040 rm -f conftest*
8041 fi
8042
8043 echo "$ac_t""$ac_cv_mingw32" 1>&6
8044 MINGW32=
8045 test "$ac_cv_mingw32" = yes && MINGW32=yes
8046
8047
8048
8049 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8050 echo "configure:8051: checking for executable suffix" >&5
8051 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8052   echo $ac_n "(cached) $ac_c" 1>&6
8053 else
8054   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8055   ac_cv_exeext=.exe
8056 else
8057   rm -f conftest*
8058   echo 'int main () { return 0; }' > conftest.$ac_ext
8059   ac_cv_exeext=
8060   if { (eval echo configure:8061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8061     for file in conftest.*; do
8062       case $file in
8063       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8064       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8065       esac
8066     done
8067   else
8068     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8069   fi
8070   rm -f conftest*
8071   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8072 fi
8073 fi
8074
8075 EXEEXT=""
8076 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8077 echo "$ac_t""${ac_cv_exeext}" 1>&6
8078 ac_exeext=$EXEEXT
8079
8080 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8081 echo "configure:8082: checking for object suffix" >&5
8082 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8083   echo $ac_n "(cached) $ac_c" 1>&6
8084 else
8085   rm -f conftest*
8086 echo 'int i = 1;' > conftest.$ac_ext
8087 if { (eval echo configure:8088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8088   for ac_file in conftest.*; do
8089     case $ac_file in
8090     *.c) ;;
8091     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8092     esac
8093   done
8094 else
8095   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8096 fi
8097 rm -f conftest*
8098 fi
8099
8100 echo "$ac_t""$ac_cv_objext" 1>&6
8101 OBJEXT=$ac_cv_objext
8102 ac_objext=$ac_cv_objext
8103
8104
8105 cat >> confdefs.h <<EOF
8106 #define EXEEXT "${EXEEXT}"
8107 EOF
8108
8109
8110 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8111 echo "configure:8112: checking for be_app in -lbe" >&5
8112 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8113 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8114   echo $ac_n "(cached) $ac_c" 1>&6
8115 else
8116   ac_save_LIBS="$LIBS"
8117 LIBS="-lbe -lroot -lnet $LIBS"
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 /* Override any gcc2 internal prototype to avoid an error.  */
8122 /* We use char because int might match the return type of a gcc2
8123     builtin and then its argument prototype would still apply.  */
8124 char be_app();
8125
8126 int main() {
8127 be_app()
8128 ; return 0; }
8129 EOF
8130 if { (eval echo configure:8131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8131   rm -rf conftest*
8132   eval "ac_cv_lib_$ac_lib_var=yes"
8133 else
8134   echo "configure: failed program was:" >&5
8135   cat conftest.$ac_ext >&5
8136   rm -rf conftest*
8137   eval "ac_cv_lib_$ac_lib_var=no"
8138 fi
8139 rm -f conftest*
8140 LIBS="$ac_save_LIBS"
8141
8142 fi
8143 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8144   echo "$ac_t""yes" 1>&6
8145   LIBS="$LIBS -lbe -lroot -lnet"
8146 else
8147   echo "$ac_t""no" 1>&6
8148 :
8149 fi
8150
8151
8152
8153
8154
8155 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8156 echo "configure:8157: checking for ${CC-cc} option to accept ANSI C" >&5
8157 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8158   echo $ac_n "(cached) $ac_c" 1>&6
8159 else
8160   am_cv_prog_cc_stdc=no
8161 ac_save_CC="$CC"
8162 # Don't try gcc -ansi; that turns off useful extensions and
8163 # breaks some systems' header files.
8164 # AIX                   -qlanglvl=ansi
8165 # Ultrix and OSF/1      -std1
8166 # HP-UX 10.20 and later -Ae
8167 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8168 # SVR4                  -Xc -D__EXTENSIONS__
8169 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8170 do
8171   CC="$ac_save_CC $ac_arg"
8172   cat > conftest.$ac_ext <<EOF
8173 #line 8174 "configure"
8174 #include "confdefs.h"
8175 #include <stdarg.h>
8176 #include <stdio.h>
8177 #include <sys/types.h>
8178 #include <sys/stat.h>
8179 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8180 struct buf { int x; };
8181 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8182 static char *e (p, i)
8183      char **p;
8184      int i;
8185 {
8186   return p[i];
8187 }
8188 static char *f (char * (*g) (char **, int), char **p, ...)
8189 {
8190   char *s;
8191   va_list v;
8192   va_start (v,p);
8193   s = g (p, va_arg (v,int));
8194   va_end (v);
8195   return s;
8196 }
8197 int test (int i, double x);
8198 struct s1 {int (*f) (int a);};
8199 struct s2 {int (*f) (double a);};
8200 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8201 int argc;
8202 char **argv;
8203
8204 int main() {
8205
8206 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8207
8208 ; return 0; }
8209 EOF
8210 if { (eval echo configure:8211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8211   rm -rf conftest*
8212   am_cv_prog_cc_stdc="$ac_arg"; break
8213 else
8214   echo "configure: failed program was:" >&5
8215   cat conftest.$ac_ext >&5
8216 fi
8217 rm -f conftest*
8218 done
8219 CC="$ac_save_CC"
8220
8221 fi
8222
8223 if test -z "$am_cv_prog_cc_stdc"; then
8224   echo "$ac_t""none needed" 1>&6
8225 else
8226   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8227 fi
8228 case "x$am_cv_prog_cc_stdc" in
8229   x|xno) ;;
8230   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8231 esac
8232
8233 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8234         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8235 fi
8236
8237 # test for make depend flag
8238 OL_MKDEP=
8239 OL_MKDEP_FLAGS=
8240 if test -z "${MKDEP}"; then
8241         OL_MKDEP="${CC-cc}"
8242         if test -z "${MKDEP_FLAGS}"; then
8243                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8244 echo "configure:8245: checking for ${OL_MKDEP} depend flag" >&5
8245 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8246   echo $ac_n "(cached) $ac_c" 1>&6
8247 else
8248   
8249                         ol_cv_mkdep=no
8250                         for flag in "-M" "-xM"; do
8251                                 cat > conftest.c <<EOF
8252  noCode;
8253 EOF
8254                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8255                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8256                                 then
8257                                         if test ! -f conftest."${ac_object}" ; then
8258                                                 ol_cv_mkdep=$flag
8259                                                 OL_MKDEP_FLAGS="$flag"
8260                                                 break
8261                                         fi
8262                                 fi
8263                         done
8264                         rm -f conftest*
8265                 
8266 fi
8267
8268 echo "$ac_t""$ol_cv_mkdep" 1>&6
8269         else
8270                 cc_cv_mkdep=yes
8271                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8272         fi
8273 else
8274         cc_cv_mkdep=yes
8275         OL_MKDEP="${MKDEP}"
8276         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8277 fi
8278
8279
8280
8281 if test "${ol_cv_mkdep}" = no ; then
8282         # this will soon become an error
8283         echo "configure: warning: do not know how to generate dependencies" 1>&2
8284 fi
8285
8286 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8287 echo "configure:8288: checking for afopen in -ls" >&5
8288 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8289 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8290   echo $ac_n "(cached) $ac_c" 1>&6
8291 else
8292   ac_save_LIBS="$LIBS"
8293 LIBS="-ls  $LIBS"
8294 cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297 /* Override any gcc2 internal prototype to avoid an error.  */
8298 /* We use char because int might match the return type of a gcc2
8299     builtin and then its argument prototype would still apply.  */
8300 char afopen();
8301
8302 int main() {
8303 afopen()
8304 ; return 0; }
8305 EOF
8306 if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=yes"
8309 else
8310   echo "configure: failed program was:" >&5
8311   cat conftest.$ac_ext >&5
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=no"
8314 fi
8315 rm -f conftest*
8316 LIBS="$ac_save_LIBS"
8317
8318 fi
8319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8320   echo "$ac_t""yes" 1>&6
8321   
8322         AUTH_LIBS=-ls
8323         cat >> confdefs.h <<\EOF
8324 #define HAVE_AIX_SECURITY 1
8325 EOF
8326
8327
8328 else
8329   echo "$ac_t""no" 1>&6
8330 fi
8331
8332
8333
8334 ol_link_modules=no
8335 if test $ol_enable_modules != no ; then
8336         for ac_hdr in ltdl.h
8337 do
8338 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8340 echo "configure:8341: checking for $ac_hdr" >&5
8341 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8342   echo $ac_n "(cached) $ac_c" 1>&6
8343 else
8344   cat > conftest.$ac_ext <<EOF
8345 #line 8346 "configure"
8346 #include "confdefs.h"
8347 #include <$ac_hdr>
8348 EOF
8349 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8350 { (eval echo configure:8351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8351 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8352 if test -z "$ac_err"; then
8353   rm -rf conftest*
8354   eval "ac_cv_header_$ac_safe=yes"
8355 else
8356   echo "$ac_err" >&5
8357   echo "configure: failed program was:" >&5
8358   cat conftest.$ac_ext >&5
8359   rm -rf conftest*
8360   eval "ac_cv_header_$ac_safe=no"
8361 fi
8362 rm -f conftest*
8363 fi
8364 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8365   echo "$ac_t""yes" 1>&6
8366     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8367   cat >> confdefs.h <<EOF
8368 #define $ac_tr_hdr 1
8369 EOF
8370  
8371 else
8372   echo "$ac_t""no" 1>&6
8373 fi
8374 done
8375
8376
8377         if test $ac_cv_header_ltdl_h = no ; then
8378                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8379         fi
8380
8381         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8382 echo "configure:8383: checking for lt_dlinit in -lltdl" >&5
8383 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8384 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8385   echo $ac_n "(cached) $ac_c" 1>&6
8386 else
8387   ac_save_LIBS="$LIBS"
8388 LIBS="-lltdl  $LIBS"
8389 cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392 /* Override any gcc2 internal prototype to avoid an error.  */
8393 /* We use char because int might match the return type of a gcc2
8394     builtin and then its argument prototype would still apply.  */
8395 char lt_dlinit();
8396
8397 int main() {
8398 lt_dlinit()
8399 ; return 0; }
8400 EOF
8401 if { (eval echo configure:8402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8402   rm -rf conftest*
8403   eval "ac_cv_lib_$ac_lib_var=yes"
8404 else
8405   echo "configure: failed program was:" >&5
8406   cat conftest.$ac_ext >&5
8407   rm -rf conftest*
8408   eval "ac_cv_lib_$ac_lib_var=no"
8409 fi
8410 rm -f conftest*
8411 LIBS="$ac_save_LIBS"
8412
8413 fi
8414 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8415   echo "$ac_t""yes" 1>&6
8416   
8417                 MODULES_LIBS=-lltdl
8418                 cat >> confdefs.h <<\EOF
8419 #define HAVE_LIBLTDL 1
8420 EOF
8421
8422         
8423 else
8424   echo "$ac_t""no" 1>&6
8425 fi
8426
8427
8428         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8429                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8430         fi
8431         ol_link_modules=yes
8432 else
8433         ol_with_bdb_module=static
8434         ol_with_dnssrv_module=static
8435         ol_with_ldap_module=static
8436         ol_with_ldbm_module=static
8437         ol_with_meta_module=static
8438         ol_with_monitor_module=static
8439         ol_with_null_module=static
8440         ol_with_passwd_module=static
8441         ol_with_perl_module=static
8442         ol_with_shell_module=static
8443         ol_with_tcl_module=static
8444         ol_with_sql_module=static
8445 fi
8446
8447 # test for EBCDIC
8448 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8449 echo "configure:8450: checking for EBCDIC" >&5
8450 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8451   echo $ac_n "(cached) $ac_c" 1>&6
8452 else
8453   
8454         cat > conftest.$ac_ext <<EOF
8455 #line 8456 "configure"
8456 #include "confdefs.h"
8457
8458 #if !('M' == 0xd4)
8459 #include <__ASCII__/generate_error.h>
8460 #endif
8461
8462 EOF
8463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8464 { (eval echo configure:8465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8466 if test -z "$ac_err"; then
8467   rm -rf conftest*
8468   ol_cv_cpp_ebcdic=yes
8469 else
8470   echo "$ac_err" >&5
8471   echo "configure: failed program was:" >&5
8472   cat conftest.$ac_ext >&5
8473   rm -rf conftest*
8474   ol_cv_cpp_ebcdic=no
8475 fi
8476 rm -f conftest*
8477 fi
8478
8479 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8480 if test $ol_cv_cpp_ebcdic = yes ; then
8481         cat >> confdefs.h <<\EOF
8482 #define HAVE_EBCDIC 1
8483 EOF
8484
8485 fi
8486
8487 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8488 echo "configure:8489: checking for ANSI C header files" >&5
8489 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8490   echo $ac_n "(cached) $ac_c" 1>&6
8491 else
8492   cat > conftest.$ac_ext <<EOF
8493 #line 8494 "configure"
8494 #include "confdefs.h"
8495 #include <stdlib.h>
8496 #include <stdarg.h>
8497 #include <string.h>
8498 #include <float.h>
8499 EOF
8500 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8501 { (eval echo configure:8502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8502 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8503 if test -z "$ac_err"; then
8504   rm -rf conftest*
8505   ol_cv_header_stdc=yes
8506 else
8507   echo "$ac_err" >&5
8508   echo "configure: failed program was:" >&5
8509   cat conftest.$ac_ext >&5
8510   rm -rf conftest*
8511   ol_cv_header_stdc=no
8512 fi
8513 rm -f conftest*
8514
8515 if test $ol_cv_header_stdc = yes; then
8516   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 #include <string.h>
8521 EOF
8522 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8523   egrep "memchr" >/dev/null 2>&1; then
8524   :
8525 else
8526   rm -rf conftest*
8527   ol_cv_header_stdc=no
8528 fi
8529 rm -f conftest*
8530
8531 fi
8532
8533 if test $ol_cv_header_stdc = yes; then
8534   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8535 cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <stdlib.h>
8539 EOF
8540 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8541   egrep "free" >/dev/null 2>&1; then
8542   :
8543 else
8544   rm -rf conftest*
8545   ol_cv_header_stdc=no
8546 fi
8547 rm -f conftest*
8548
8549 fi
8550
8551 if test $ol_cv_header_stdc = yes; then
8552   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8553 if test "$cross_compiling" = yes; then
8554   :
8555 else
8556   cat > conftest.$ac_ext <<EOF
8557 #line 8558 "configure"
8558 #include "confdefs.h"
8559 #include <ctype.h>
8560 #ifndef HAVE_EBCDIC
8561 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8562 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8563 #else
8564 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8565                 || ('j' <= (c) && (c) <= 'r') \
8566                 || ('s' <= (c) && (c) <= 'z'))
8567 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8568 #endif
8569 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8570 int main () { int i; for (i = 0; i < 256; i++)
8571 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8572 exit (0); }
8573
8574 EOF
8575 if { (eval echo configure:8576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8576 then
8577   :
8578 else
8579   echo "configure: failed program was:" >&5
8580   cat conftest.$ac_ext >&5
8581   rm -fr conftest*
8582   ol_cv_header_stdc=no
8583 fi
8584 rm -fr conftest*
8585 fi
8586
8587 fi
8588 fi
8589
8590 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8591 if test $ol_cv_header_stdc = yes; then
8592   cat >> confdefs.h <<\EOF
8593 #define STDC_HEADERS 1
8594 EOF
8595
8596 fi
8597 ac_cv_header_stdc=disable
8598
8599
8600 if test $ol_cv_header_stdc != yes; then
8601         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8602 fi
8603
8604 ac_header_dirent=no
8605 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8606 do
8607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8608 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8609 echo "configure:8610: checking for $ac_hdr that defines DIR" >&5
8610 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8611   echo $ac_n "(cached) $ac_c" 1>&6
8612 else
8613   cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 #include <sys/types.h>
8617 #include <$ac_hdr>
8618 int main() {
8619 DIR *dirp = 0;
8620 ; return 0; }
8621 EOF
8622 if { (eval echo configure:8623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8623   rm -rf conftest*
8624   eval "ac_cv_header_dirent_$ac_safe=yes"
8625 else
8626   echo "configure: failed program was:" >&5
8627   cat conftest.$ac_ext >&5
8628   rm -rf conftest*
8629   eval "ac_cv_header_dirent_$ac_safe=no"
8630 fi
8631 rm -f conftest*
8632 fi
8633 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8634   echo "$ac_t""yes" 1>&6
8635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8636   cat >> confdefs.h <<EOF
8637 #define $ac_tr_hdr 1
8638 EOF
8639  ac_header_dirent=$ac_hdr; break
8640 else
8641   echo "$ac_t""no" 1>&6
8642 fi
8643 done
8644 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8645 if test $ac_header_dirent = dirent.h; then
8646 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8647 echo "configure:8648: checking for opendir in -ldir" >&5
8648 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8649 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8650   echo $ac_n "(cached) $ac_c" 1>&6
8651 else
8652   ac_save_LIBS="$LIBS"
8653 LIBS="-ldir  $LIBS"
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8657 /* Override any gcc2 internal prototype to avoid an error.  */
8658 /* We use char because int might match the return type of a gcc2
8659     builtin and then its argument prototype would still apply.  */
8660 char opendir();
8661
8662 int main() {
8663 opendir()
8664 ; return 0; }
8665 EOF
8666 if { (eval echo configure:8667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8667   rm -rf conftest*
8668   eval "ac_cv_lib_$ac_lib_var=yes"
8669 else
8670   echo "configure: failed program was:" >&5
8671   cat conftest.$ac_ext >&5
8672   rm -rf conftest*
8673   eval "ac_cv_lib_$ac_lib_var=no"
8674 fi
8675 rm -f conftest*
8676 LIBS="$ac_save_LIBS"
8677
8678 fi
8679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8680   echo "$ac_t""yes" 1>&6
8681   LIBS="$LIBS -ldir"
8682 else
8683   echo "$ac_t""no" 1>&6
8684 fi
8685
8686 else
8687 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8688 echo "configure:8689: checking for opendir in -lx" >&5
8689 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8690 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8691   echo $ac_n "(cached) $ac_c" 1>&6
8692 else
8693   ac_save_LIBS="$LIBS"
8694 LIBS="-lx  $LIBS"
8695 cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 /* Override any gcc2 internal prototype to avoid an error.  */
8699 /* We use char because int might match the return type of a gcc2
8700     builtin and then its argument prototype would still apply.  */
8701 char opendir();
8702
8703 int main() {
8704 opendir()
8705 ; return 0; }
8706 EOF
8707 if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8708   rm -rf conftest*
8709   eval "ac_cv_lib_$ac_lib_var=yes"
8710 else
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=no"
8715 fi
8716 rm -f conftest*
8717 LIBS="$ac_save_LIBS"
8718
8719 fi
8720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8721   echo "$ac_t""yes" 1>&6
8722   LIBS="$LIBS -lx"
8723 else
8724   echo "$ac_t""no" 1>&6
8725 fi
8726
8727 fi
8728
8729 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8730 echo "configure:8731: checking for sys/wait.h that is POSIX.1 compatible" >&5
8731 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8732   echo $ac_n "(cached) $ac_c" 1>&6
8733 else
8734   cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8737 #include <sys/types.h>
8738 #include <sys/wait.h>
8739 #ifndef WEXITSTATUS
8740 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8741 #endif
8742 #ifndef WIFEXITED
8743 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8744 #endif
8745 int main() {
8746 int s;
8747 wait (&s);
8748 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8749 ; return 0; }
8750 EOF
8751 if { (eval echo configure:8752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8752   rm -rf conftest*
8753   ac_cv_header_sys_wait_h=yes
8754 else
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -rf conftest*
8758   ac_cv_header_sys_wait_h=no
8759 fi
8760 rm -f conftest*
8761 fi
8762
8763 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8764 if test $ac_cv_header_sys_wait_h = yes; then
8765   cat >> confdefs.h <<\EOF
8766 #define HAVE_SYS_WAIT_H 1
8767 EOF
8768
8769 fi
8770
8771 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8772 echo "configure:8773: checking POSIX termios" >&5
8773 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8774   echo $ac_n "(cached) $ac_c" 1>&6
8775 else
8776   cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 #include <sys/types.h>
8780 #include <unistd.h>
8781 #include <termios.h>
8782 int main() {
8783 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8784    tcgetattr(0, 0);
8785 ; return 0; }
8786 EOF
8787 if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8788   rm -rf conftest*
8789   am_cv_sys_posix_termios=yes
8790 else
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -rf conftest*
8794   am_cv_sys_posix_termios=no
8795 fi
8796 rm -f conftest*
8797 fi
8798
8799 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8800
8801
8802  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8803 echo "configure:8804: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8804 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8805   echo $ac_n "(cached) $ac_c" 1>&6
8806 else
8807   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8808
8809   gwinsz_in_termios_h=no
8810   if test $am_cv_sys_posix_termios = yes; then
8811     cat > conftest.$ac_ext <<EOF
8812 #line 8813 "configure"
8813 #include "confdefs.h"
8814 #include <sys/types.h>
8815 #     include <termios.h>
8816 #     ifdef TIOCGWINSZ
8817         yes
8818 #     endif
8819     
8820 EOF
8821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8822   egrep "yes" >/dev/null 2>&1; then
8823   rm -rf conftest*
8824   gwinsz_in_termios_h=yes
8825 fi
8826 rm -f conftest*
8827
8828   fi
8829
8830   if test $gwinsz_in_termios_h = no; then
8831     cat > conftest.$ac_ext <<EOF
8832 #line 8833 "configure"
8833 #include "confdefs.h"
8834 #include <sys/types.h>
8835 #     include <sys/ioctl.h>
8836 #     ifdef TIOCGWINSZ
8837         yes
8838 #     endif
8839     
8840 EOF
8841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8842   egrep "yes" >/dev/null 2>&1; then
8843   rm -rf conftest*
8844   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8845 fi
8846 rm -f conftest*
8847
8848   fi
8849   
8850 fi
8851
8852 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8853   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8854     cat >> confdefs.h <<\EOF
8855 #define GWINSZ_IN_SYS_IOCTL 1
8856 EOF
8857
8858   fi
8859
8860 if test $am_cv_sys_posix_termios = yes ; then
8861         cat >> confdefs.h <<\EOF
8862 #define HAVE_POSIX_TERMIOS 1
8863 EOF
8864
8865 fi
8866
8867 for ac_hdr in \
8868         arpa/inet.h             \
8869         arpa/nameser.h  \
8870         assert.h                \
8871         conio.h                 \
8872         crypt.h                 \
8873         direct.h                \
8874         errno.h                 \
8875         fcntl.h                 \
8876         filio.h                 \
8877         getopt.h                \
8878         grp.h                   \
8879         io.h                    \
8880         libutil.h               \
8881         limits.h                \
8882         locale.h                \
8883         netinet/tcp.h   \
8884         malloc.h                \
8885         memory.h                \
8886         psap.h                  \
8887         pwd.h                   \
8888         process.h               \
8889         resolv.h                \
8890         sgtty.h                 \
8891         shadow.h                \
8892         stddef.h                \
8893         string.h                \
8894         strings.h               \
8895         sysexits.h              \
8896         sys/file.h              \
8897         sys/filio.h             \
8898         sys/errno.h             \
8899         sys/ioctl.h             \
8900         sys/param.h             \
8901         sys/resource.h  \
8902         sys/select.h    \
8903         sys/socket.h    \
8904         sys/syslog.h    \
8905         sys/time.h              \
8906         sys/types.h             \
8907         syslog.h                \
8908         termios.h               \
8909         unistd.h                \
8910         winsock.h               \
8911         winsock2.h              \
8912
8913 do
8914 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8915 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8916 echo "configure:8917: checking for $ac_hdr" >&5
8917 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8918   echo $ac_n "(cached) $ac_c" 1>&6
8919 else
8920   cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923 #include <$ac_hdr>
8924 EOF
8925 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8926 { (eval echo configure:8927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8927 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8928 if test -z "$ac_err"; then
8929   rm -rf conftest*
8930   eval "ac_cv_header_$ac_safe=yes"
8931 else
8932   echo "$ac_err" >&5
8933   echo "configure: failed program was:" >&5
8934   cat conftest.$ac_ext >&5
8935   rm -rf conftest*
8936   eval "ac_cv_header_$ac_safe=no"
8937 fi
8938 rm -f conftest*
8939 fi
8940 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8941   echo "$ac_t""yes" 1>&6
8942     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8943   cat >> confdefs.h <<EOF
8944 #define $ac_tr_hdr 1
8945 EOF
8946  
8947 else
8948   echo "$ac_t""no" 1>&6
8949 fi
8950 done
8951
8952
8953
8954
8955 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8956 echo "configure:8957: checking for dlopen" >&5
8957 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8958   echo $ac_n "(cached) $ac_c" 1>&6
8959 else
8960   cat > conftest.$ac_ext <<EOF
8961 #line 8962 "configure"
8962 #include "confdefs.h"
8963 /* System header to define __stub macros and hopefully few prototypes,
8964     which can conflict with char dlopen(); below.  */
8965 #include <assert.h>
8966 /* Override any gcc2 internal prototype to avoid an error.  */
8967 /* We use char because int might match the return type of a gcc2
8968     builtin and then its argument prototype would still apply.  */
8969 char dlopen();
8970 char (*f)();
8971
8972 int main() {
8973
8974 /* The GNU C library defines this for functions which it implements
8975     to always fail with ENOSYS.  Some functions are actually named
8976     something starting with __ and the normal name is an alias.  */
8977 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8978 choke me
8979 #else
8980 f = dlopen;
8981 #endif
8982
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8986   rm -rf conftest*
8987   eval "ac_cv_func_dlopen=yes"
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   eval "ac_cv_func_dlopen=no"
8993 fi
8994 rm -f conftest*
8995 fi
8996
8997 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8998   echo "$ac_t""yes" 1>&6
8999   :
9000 else
9001   echo "$ac_t""no" 1>&6
9002 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9003 echo "configure:9004: checking for dlopen in -ldl" >&5
9004 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   ac_save_LIBS="$LIBS"
9009 LIBS="-ldl  $LIBS"
9010 cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013 /* Override any gcc2 internal prototype to avoid an error.  */
9014 /* We use char because int might match the return type of a gcc2
9015     builtin and then its argument prototype would still apply.  */
9016 char dlopen();
9017
9018 int main() {
9019 dlopen()
9020 ; return 0; }
9021 EOF
9022 if { (eval echo configure:9023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9023   rm -rf conftest*
9024   eval "ac_cv_lib_$ac_lib_var=yes"
9025 else
9026   echo "configure: failed program was:" >&5
9027   cat conftest.$ac_ext >&5
9028   rm -rf conftest*
9029   eval "ac_cv_lib_$ac_lib_var=no"
9030 fi
9031 rm -f conftest*
9032 LIBS="$ac_save_LIBS"
9033
9034 fi
9035 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9036   echo "$ac_t""yes" 1>&6
9037     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9038     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9039   cat >> confdefs.h <<EOF
9040 #define $ac_tr_lib 1
9041 EOF
9042
9043   LIBS="-ldl $LIBS"
9044
9045 else
9046   echo "$ac_t""no" 1>&6
9047 fi
9048
9049 fi
9050
9051
9052 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9053 echo "configure:9054: checking for sigset in -lV3" >&5
9054 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9055 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9056   echo $ac_n "(cached) $ac_c" 1>&6
9057 else
9058   ac_save_LIBS="$LIBS"
9059 LIBS="-lV3  $LIBS"
9060 cat > conftest.$ac_ext <<EOF
9061 #line 9062 "configure"
9062 #include "confdefs.h"
9063 /* Override any gcc2 internal prototype to avoid an error.  */
9064 /* We use char because int might match the return type of a gcc2
9065     builtin and then its argument prototype would still apply.  */
9066 char sigset();
9067
9068 int main() {
9069 sigset()
9070 ; return 0; }
9071 EOF
9072 if { (eval echo configure:9073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9073   rm -rf conftest*
9074   eval "ac_cv_lib_$ac_lib_var=yes"
9075 else
9076   echo "configure: failed program was:" >&5
9077   cat conftest.$ac_ext >&5
9078   rm -rf conftest*
9079   eval "ac_cv_lib_$ac_lib_var=no"
9080 fi
9081 rm -f conftest*
9082 LIBS="$ac_save_LIBS"
9083
9084 fi
9085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9086   echo "$ac_t""yes" 1>&6
9087     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9088     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9089   cat >> confdefs.h <<EOF
9090 #define $ac_tr_lib 1
9091 EOF
9092
9093   LIBS="-lV3 $LIBS"
9094
9095 else
9096   echo "$ac_t""no" 1>&6
9097 fi
9098
9099
9100 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9101 echo "configure:9102: checking for winsock" >&5
9102 save_LIBS="$LIBS"
9103 for curlib in ws2_32 wsock32; do
9104         LIBS="$LIBS -l$curlib"
9105         cat > conftest.$ac_ext <<EOF
9106 #line 9107 "configure"
9107 #include "confdefs.h"
9108
9109                         char socket@12();
9110                         char select@20();
9111                         char closesocket@4();
9112                         char gethostname@8();
9113                         
9114 int main() {
9115
9116                         socket@12();
9117                         select@20();
9118                         closesocket@4();
9119                         gethostname@8();
9120                         
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   have_winsock=yes
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   have_winsock=no
9131 fi
9132 rm -f conftest*
9133
9134         if test $have_winsock = yes; then
9135                 cat >> confdefs.h <<\EOF
9136 #define HAVE_WINSOCK 1
9137 EOF
9138
9139                 ac_cv_func_socket=yes
9140                 ac_cv_func_select=yes
9141                 ac_cv_func_closesocket=yes
9142                 ac_cv_func_gethostname=yes
9143                 if test $curlib = ws2_32; then
9144                         have_winsock=winsock2
9145                         cat >> confdefs.h <<\EOF
9146 #define HAVE_WINSOCK2 1
9147 EOF
9148
9149                 fi
9150                 break
9151         fi
9152         LIBS="$save_LIBS"
9153 done
9154 echo "$ac_t""$have_winsock" 1>&6
9155
9156
9157 echo $ac_n "checking for socket""... $ac_c" 1>&6
9158 echo "configure:9159: checking for socket" >&5
9159 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9160   echo $ac_n "(cached) $ac_c" 1>&6
9161 else
9162   cat > conftest.$ac_ext <<EOF
9163 #line 9164 "configure"
9164 #include "confdefs.h"
9165 /* System header to define __stub macros and hopefully few prototypes,
9166     which can conflict with char socket(); below.  */
9167 #include <assert.h>
9168 /* Override any gcc2 internal prototype to avoid an error.  */
9169 /* We use char because int might match the return type of a gcc2
9170     builtin and then its argument prototype would still apply.  */
9171 char socket();
9172 char (*f)();
9173
9174 int main() {
9175
9176 /* The GNU C library defines this for functions which it implements
9177     to always fail with ENOSYS.  Some functions are actually named
9178     something starting with __ and the normal name is an alias.  */
9179 #if defined (__stub_socket) || defined (__stub___socket)
9180 choke me
9181 #else
9182 f = socket;
9183 #endif
9184
9185 ; return 0; }
9186 EOF
9187 if { (eval echo configure:9188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9188   rm -rf conftest*
9189   eval "ac_cv_func_socket=yes"
9190 else
9191   echo "configure: failed program was:" >&5
9192   cat conftest.$ac_ext >&5
9193   rm -rf conftest*
9194   eval "ac_cv_func_socket=no"
9195 fi
9196 rm -f conftest*
9197 fi
9198
9199 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9200   echo "$ac_t""yes" 1>&6
9201   :
9202 else
9203   echo "$ac_t""no" 1>&6
9204         
9205         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9206 echo "configure:9207: checking for main in -lsocket" >&5
9207 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9208 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9209   echo $ac_n "(cached) $ac_c" 1>&6
9210 else
9211   ac_save_LIBS="$LIBS"
9212 LIBS="-lsocket  $LIBS"
9213 cat > conftest.$ac_ext <<EOF
9214 #line 9215 "configure"
9215 #include "confdefs.h"
9216
9217 int main() {
9218 main()
9219 ; return 0; }
9220 EOF
9221 if { (eval echo configure:9222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9222   rm -rf conftest*
9223   eval "ac_cv_lib_$ac_lib_var=yes"
9224 else
9225   echo "configure: failed program was:" >&5
9226   cat conftest.$ac_ext >&5
9227   rm -rf conftest*
9228   eval "ac_cv_lib_$ac_lib_var=no"
9229 fi
9230 rm -f conftest*
9231 LIBS="$ac_save_LIBS"
9232
9233 fi
9234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9235   echo "$ac_t""yes" 1>&6
9236     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9237     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9238   cat >> confdefs.h <<EOF
9239 #define $ac_tr_lib 1
9240 EOF
9241
9242   LIBS="-lsocket $LIBS"
9243
9244 else
9245   echo "$ac_t""no" 1>&6
9246 fi
9247
9248         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9249 echo "configure:9250: checking for main in -lnet" >&5
9250 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9252   echo $ac_n "(cached) $ac_c" 1>&6
9253 else
9254   ac_save_LIBS="$LIBS"
9255 LIBS="-lnet  $LIBS"
9256 cat > conftest.$ac_ext <<EOF
9257 #line 9258 "configure"
9258 #include "confdefs.h"
9259
9260 int main() {
9261 main()
9262 ; return 0; }
9263 EOF
9264 if { (eval echo configure:9265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9265   rm -rf conftest*
9266   eval "ac_cv_lib_$ac_lib_var=yes"
9267 else
9268   echo "configure: failed program was:" >&5
9269   cat conftest.$ac_ext >&5
9270   rm -rf conftest*
9271   eval "ac_cv_lib_$ac_lib_var=no"
9272 fi
9273 rm -f conftest*
9274 LIBS="$ac_save_LIBS"
9275
9276 fi
9277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9278   echo "$ac_t""yes" 1>&6
9279     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9280     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9281   cat >> confdefs.h <<EOF
9282 #define $ac_tr_lib 1
9283 EOF
9284
9285   LIBS="-lnet $LIBS"
9286
9287 else
9288   echo "$ac_t""no" 1>&6
9289 fi
9290
9291         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9292 echo "configure:9293: checking for main in -lnsl_s" >&5
9293 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9295   echo $ac_n "(cached) $ac_c" 1>&6
9296 else
9297   ac_save_LIBS="$LIBS"
9298 LIBS="-lnsl_s  $LIBS"
9299 cat > conftest.$ac_ext <<EOF
9300 #line 9301 "configure"
9301 #include "confdefs.h"
9302
9303 int main() {
9304 main()
9305 ; return 0; }
9306 EOF
9307 if { (eval echo configure:9308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9308   rm -rf conftest*
9309   eval "ac_cv_lib_$ac_lib_var=yes"
9310 else
9311   echo "configure: failed program was:" >&5
9312   cat conftest.$ac_ext >&5
9313   rm -rf conftest*
9314   eval "ac_cv_lib_$ac_lib_var=no"
9315 fi
9316 rm -f conftest*
9317 LIBS="$ac_save_LIBS"
9318
9319 fi
9320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9321   echo "$ac_t""yes" 1>&6
9322     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9323     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9324   cat >> confdefs.h <<EOF
9325 #define $ac_tr_lib 1
9326 EOF
9327
9328   LIBS="-lnsl_s $LIBS"
9329
9330 else
9331   echo "$ac_t""no" 1>&6
9332 fi
9333
9334         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9335 echo "configure:9336: checking for main in -lnsl" >&5
9336 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9338   echo $ac_n "(cached) $ac_c" 1>&6
9339 else
9340   ac_save_LIBS="$LIBS"
9341 LIBS="-lnsl  $LIBS"
9342 cat > conftest.$ac_ext <<EOF
9343 #line 9344 "configure"
9344 #include "confdefs.h"
9345
9346 int main() {
9347 main()
9348 ; return 0; }
9349 EOF
9350 if { (eval echo configure:9351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9351   rm -rf conftest*
9352   eval "ac_cv_lib_$ac_lib_var=yes"
9353 else
9354   echo "configure: failed program was:" >&5
9355   cat conftest.$ac_ext >&5
9356   rm -rf conftest*
9357   eval "ac_cv_lib_$ac_lib_var=no"
9358 fi
9359 rm -f conftest*
9360 LIBS="$ac_save_LIBS"
9361
9362 fi
9363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9364   echo "$ac_t""yes" 1>&6
9365     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9366     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9367   cat >> confdefs.h <<EOF
9368 #define $ac_tr_lib 1
9369 EOF
9370
9371   LIBS="-lnsl $LIBS"
9372
9373 else
9374   echo "$ac_t""no" 1>&6
9375 fi
9376
9377         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9378 echo "configure:9379: checking for socket in -linet" >&5
9379 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9381   echo $ac_n "(cached) $ac_c" 1>&6
9382 else
9383   ac_save_LIBS="$LIBS"
9384 LIBS="-linet  $LIBS"
9385 cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 /* Override any gcc2 internal prototype to avoid an error.  */
9389 /* We use char because int might match the return type of a gcc2
9390     builtin and then its argument prototype would still apply.  */
9391 char socket();
9392
9393 int main() {
9394 socket()
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9398   rm -rf conftest*
9399   eval "ac_cv_lib_$ac_lib_var=yes"
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   eval "ac_cv_lib_$ac_lib_var=no"
9405 fi
9406 rm -f conftest*
9407 LIBS="$ac_save_LIBS"
9408
9409 fi
9410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9411   echo "$ac_t""yes" 1>&6
9412     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9413     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9414   cat >> confdefs.h <<EOF
9415 #define $ac_tr_lib 1
9416 EOF
9417
9418   LIBS="-linet $LIBS"
9419
9420 else
9421   echo "$ac_t""no" 1>&6
9422 fi
9423
9424         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9425 echo "configure:9426: checking for main in -lgen" >&5
9426 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9427 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9428   echo $ac_n "(cached) $ac_c" 1>&6
9429 else
9430   ac_save_LIBS="$LIBS"
9431 LIBS="-lgen  $LIBS"
9432 cat > conftest.$ac_ext <<EOF
9433 #line 9434 "configure"
9434 #include "confdefs.h"
9435
9436 int main() {
9437 main()
9438 ; return 0; }
9439 EOF
9440 if { (eval echo configure:9441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9441   rm -rf conftest*
9442   eval "ac_cv_lib_$ac_lib_var=yes"
9443 else
9444   echo "configure: failed program was:" >&5
9445   cat conftest.$ac_ext >&5
9446   rm -rf conftest*
9447   eval "ac_cv_lib_$ac_lib_var=no"
9448 fi
9449 rm -f conftest*
9450 LIBS="$ac_save_LIBS"
9451
9452 fi
9453 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9454   echo "$ac_t""yes" 1>&6
9455     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9456     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9457   cat >> confdefs.h <<EOF
9458 #define $ac_tr_lib 1
9459 EOF
9460
9461   LIBS="-lgen $LIBS"
9462
9463 else
9464   echo "$ac_t""no" 1>&6
9465 fi
9466
9467
9468 fi
9469
9470
9471 echo $ac_n "checking for select""... $ac_c" 1>&6
9472 echo "configure:9473: checking for select" >&5
9473 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9474   echo $ac_n "(cached) $ac_c" 1>&6
9475 else
9476   cat > conftest.$ac_ext <<EOF
9477 #line 9478 "configure"
9478 #include "confdefs.h"
9479 /* System header to define __stub macros and hopefully few prototypes,
9480     which can conflict with char select(); below.  */
9481 #include <assert.h>
9482 /* Override any gcc2 internal prototype to avoid an error.  */
9483 /* We use char because int might match the return type of a gcc2
9484     builtin and then its argument prototype would still apply.  */
9485 char select();
9486 char (*f)();
9487
9488 int main() {
9489
9490 /* The GNU C library defines this for functions which it implements
9491     to always fail with ENOSYS.  Some functions are actually named
9492     something starting with __ and the normal name is an alias.  */
9493 #if defined (__stub_select) || defined (__stub___select)
9494 choke me
9495 #else
9496 f = select;
9497 #endif
9498
9499 ; return 0; }
9500 EOF
9501 if { (eval echo configure:9502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9502   rm -rf conftest*
9503   eval "ac_cv_func_select=yes"
9504 else
9505   echo "configure: failed program was:" >&5
9506   cat conftest.$ac_ext >&5
9507   rm -rf conftest*
9508   eval "ac_cv_func_select=no"
9509 fi
9510 rm -f conftest*
9511 fi
9512
9513 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9514   echo "$ac_t""yes" 1>&6
9515   :
9516 else
9517   echo "$ac_t""no" 1>&6
9518 { echo "configure: error: select() required." 1>&2; exit 1; }
9519 fi
9520
9521
9522 if test "${ac_cv_header_winsock_h}" != yes; then
9523                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9524 echo "configure:9525: checking types of arguments for select()" >&5
9525  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9526   echo $ac_n "(cached) $ac_c" 1>&6
9527 else
9528    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9529   echo $ac_n "(cached) $ac_c" 1>&6
9530 else
9531     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9532   echo $ac_n "(cached) $ac_c" 1>&6
9533 else
9534      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9535      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9536       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9537        cat > conftest.$ac_ext <<EOF
9538 #line 9539 "configure"
9539 #include "confdefs.h"
9540 #ifdef HAVE_SYS_TYPES_H
9541 #include <sys/types.h>
9542 #endif
9543 #ifdef HAVE_SYS_TIME_H
9544 #include <sys/time.h>
9545 #endif
9546 #ifdef HAVE_SYS_SELECT_H
9547 #include <sys/select.h>
9548 #endif
9549 #ifdef HAVE_SYS_SOCKET_H
9550 #include <sys/socket.h>
9551 #endif
9552 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);
9553 int main() {
9554
9555 ; return 0; }
9556 EOF
9557 if { (eval echo configure:9558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9558   rm -rf conftest*
9559           ac_not_found=no ; break 3
9560 else
9561   echo "configure: failed program was:" >&5
9562   cat conftest.$ac_ext >&5
9563   rm -rf conftest*
9564   ac_not_found=yes
9565 fi
9566 rm -f conftest*
9567       done
9568      done
9569     done
9570    
9571 fi
9572   
9573 fi
9574  
9575 fi
9576  if test "$ac_not_found" = yes; then
9577   ac_cv_func_select_arg1=int 
9578   ac_cv_func_select_arg234='int *' 
9579   ac_cv_func_select_arg5='struct timeval *'
9580  fi
9581  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9582  cat >> confdefs.h <<EOF
9583 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9584 EOF
9585
9586  cat >> confdefs.h <<EOF
9587 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9588 EOF
9589
9590  cat >> confdefs.h <<EOF
9591 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9592 EOF
9593
9594
9595 fi
9596
9597
9598 for ac_hdr in regex.h 
9599 do
9600 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9601 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9602 echo "configure:9603: checking for $ac_hdr" >&5
9603 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9604   echo $ac_n "(cached) $ac_c" 1>&6
9605 else
9606   cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 #include <$ac_hdr>
9610 EOF
9611 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9612 { (eval echo configure:9613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9613 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9614 if test -z "$ac_err"; then
9615   rm -rf conftest*
9616   eval "ac_cv_header_$ac_safe=yes"
9617 else
9618   echo "$ac_err" >&5
9619   echo "configure: failed program was:" >&5
9620   cat conftest.$ac_ext >&5
9621   rm -rf conftest*
9622   eval "ac_cv_header_$ac_safe=no"
9623 fi
9624 rm -f conftest*
9625 fi
9626 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9627   echo "$ac_t""yes" 1>&6
9628     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9629   cat >> confdefs.h <<EOF
9630 #define $ac_tr_hdr 1
9631 EOF
9632  
9633 else
9634   echo "$ac_t""no" 1>&6
9635 fi
9636 done
9637
9638 if test "$ac_cv_header_regex_h" != yes ; then
9639         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9640 fi
9641
9642 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9643 echo "configure:9644: checking for library containing regfree" >&5
9644 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9645   echo $ac_n "(cached) $ac_c" 1>&6
9646 else
9647   ac_func_search_save_LIBS="$LIBS"
9648 ac_cv_search_regfree="no"
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 /* Override any gcc2 internal prototype to avoid an error.  */
9653 /* We use char because int might match the return type of a gcc2
9654     builtin and then its argument prototype would still apply.  */
9655 char regfree();
9656
9657 int main() {
9658 regfree()
9659 ; return 0; }
9660 EOF
9661 if { (eval echo configure:9662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9662   rm -rf conftest*
9663   ac_cv_search_regfree="none required"
9664 else
9665   echo "configure: failed program was:" >&5
9666   cat conftest.$ac_ext >&5
9667 fi
9668 rm -f conftest*
9669 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9670 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9671 cat > conftest.$ac_ext <<EOF
9672 #line 9673 "configure"
9673 #include "confdefs.h"
9674 /* Override any gcc2 internal prototype to avoid an error.  */
9675 /* We use char because int might match the return type of a gcc2
9676     builtin and then its argument prototype would still apply.  */
9677 char regfree();
9678
9679 int main() {
9680 regfree()
9681 ; return 0; }
9682 EOF
9683 if { (eval echo configure:9684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9684   rm -rf conftest*
9685   ac_cv_search_regfree="-l$ac_lib"
9686 break
9687 else
9688   echo "configure: failed program was:" >&5
9689   cat conftest.$ac_ext >&5
9690 fi
9691 rm -f conftest*
9692 done
9693 LIBS="$ac_func_search_save_LIBS"
9694 fi
9695
9696 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9697 if test "$ac_cv_search_regfree" != "no"; then
9698   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9699   :
9700 else :
9701   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9702 fi
9703
9704
9705 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9706 echo "configure:9707: checking for compatible POSIX regex" >&5
9707 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9708   echo $ac_n "(cached) $ac_c" 1>&6
9709 else
9710   
9711         if test "$cross_compiling" = yes; then
9712   ol_cv_c_posix_regex=cross
9713 else
9714   cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717
9718 #include <sys/types.h>
9719 #include <regex.h>
9720 static char *pattern, *string;
9721 main()
9722 {
9723         int rc;
9724         regex_t re;
9725
9726         pattern = "^A";
9727
9728         if(regcomp(&re, pattern, 0)) {
9729                 return -1;
9730         }
9731         
9732         string = "ALL MATCH";
9733         
9734         rc = regexec(&re, string, 0, (void*)0, 0);
9735
9736         regfree(&re);
9737
9738         return rc;
9739 }
9740 EOF
9741 if { (eval echo configure:9742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9742 then
9743   ol_cv_c_posix_regex=yes
9744 else
9745   echo "configure: failed program was:" >&5
9746   cat conftest.$ac_ext >&5
9747   rm -fr conftest*
9748   ol_cv_c_posix_regex=no
9749 fi
9750 rm -fr conftest*
9751 fi
9752
9753 fi
9754
9755 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9756
9757 if test "$ol_cv_c_posix_regex" = no ; then
9758         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9759 fi
9760
9761
9762 have_uuid=no
9763 for ac_hdr in sys/uuid.h
9764 do
9765 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9766 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9767 echo "configure:9768: checking for $ac_hdr" >&5
9768 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9769   echo $ac_n "(cached) $ac_c" 1>&6
9770 else
9771   cat > conftest.$ac_ext <<EOF
9772 #line 9773 "configure"
9773 #include "confdefs.h"
9774 #include <$ac_hdr>
9775 EOF
9776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9777 { (eval echo configure:9778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9779 if test -z "$ac_err"; then
9780   rm -rf conftest*
9781   eval "ac_cv_header_$ac_safe=yes"
9782 else
9783   echo "$ac_err" >&5
9784   echo "configure: failed program was:" >&5
9785   cat conftest.$ac_ext >&5
9786   rm -rf conftest*
9787   eval "ac_cv_header_$ac_safe=no"
9788 fi
9789 rm -f conftest*
9790 fi
9791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9792   echo "$ac_t""yes" 1>&6
9793     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9794   cat >> confdefs.h <<EOF
9795 #define $ac_tr_hdr 1
9796 EOF
9797  
9798 else
9799   echo "$ac_t""no" 1>&6
9800 fi
9801 done
9802
9803 if test $ac_cv_header_sys_uuid_h = yes ; then
9804         save_LIBS="$LIBS"
9805         
9806 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9807 echo "configure:9808: checking for library containing uuid_to_str" >&5
9808 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9809   echo $ac_n "(cached) $ac_c" 1>&6
9810 else
9811   ac_func_search_save_LIBS="$LIBS"
9812 ac_cv_search_uuid_to_str="no"
9813 cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 /* Override any gcc2 internal prototype to avoid an error.  */
9817 /* We use char because int might match the return type of a gcc2
9818     builtin and then its argument prototype would still apply.  */
9819 char uuid_to_str();
9820
9821 int main() {
9822 uuid_to_str()
9823 ; return 0; }
9824 EOF
9825 if { (eval echo configure:9826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9826   rm -rf conftest*
9827   ac_cv_search_uuid_to_str="none required"
9828 else
9829   echo "configure: failed program was:" >&5
9830   cat conftest.$ac_ext >&5
9831 fi
9832 rm -f conftest*
9833 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9834 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9835 cat > conftest.$ac_ext <<EOF
9836 #line 9837 "configure"
9837 #include "confdefs.h"
9838 /* Override any gcc2 internal prototype to avoid an error.  */
9839 /* We use char because int might match the return type of a gcc2
9840     builtin and then its argument prototype would still apply.  */
9841 char uuid_to_str();
9842
9843 int main() {
9844 uuid_to_str()
9845 ; return 0; }
9846 EOF
9847 if { (eval echo configure:9848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9848   rm -rf conftest*
9849   ac_cv_search_uuid_to_str="-l$ac_lib"
9850 break
9851 else
9852   echo "configure: failed program was:" >&5
9853   cat conftest.$ac_ext >&5
9854 fi
9855 rm -f conftest*
9856 done
9857 LIBS="$ac_func_search_save_LIBS"
9858 fi
9859
9860 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9861 if test "$ac_cv_search_uuid_to_str" != "no"; then
9862   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9863   have_uuid=yes
9864 else :
9865   :
9866 fi
9867         LIBS="$save_LIBS"
9868
9869         if test have_uuid = yes ; then
9870                 cat >> confdefs.h <<\EOF
9871 #define HAVE_UUID_TO_STR 1
9872 EOF
9873
9874
9875                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9876                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9877         fi
9878 fi
9879
9880 if test $have_uuid = no ; then
9881         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9882 echo "configure:9883: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9883         save_LIBS="$LIBS"
9884         LIBS="$LIBS -lrpcrt4"
9885         cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888
9889                 char UuidCreate@4();
9890                 char UuidToStringA@8();
9891                 
9892 int main() {
9893
9894                 UuidCreate@4();
9895                 UuidToStringA@8();
9896                 
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   need_rpcrt=yes
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   need_rpcrt=no
9907 fi
9908 rm -f conftest*
9909         if test $need_rpcrt = yes; then
9910                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9911         fi
9912         LIBS="$save_LIBS"
9913         echo "$ac_t""$need_rpcrt" 1>&6
9914 fi
9915
9916 ol_link_dnssrv=no
9917 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9918 echo "configure:9919: checking for res_query" >&5
9919 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9920   echo $ac_n "(cached) $ac_c" 1>&6
9921 else
9922   cat > conftest.$ac_ext <<EOF
9923 #line 9924 "configure"
9924 #include "confdefs.h"
9925 /* System header to define __stub macros and hopefully few prototypes,
9926     which can conflict with char res_query(); below.  */
9927 #include <assert.h>
9928 /* Override any gcc2 internal prototype to avoid an error.  */
9929 /* We use char because int might match the return type of a gcc2
9930     builtin and then its argument prototype would still apply.  */
9931 char res_query();
9932 char (*f)();
9933
9934 int main() {
9935
9936 /* The GNU C library defines this for functions which it implements
9937     to always fail with ENOSYS.  Some functions are actually named
9938     something starting with __ and the normal name is an alias.  */
9939 #if defined (__stub_res_query) || defined (__stub___res_query)
9940 choke me
9941 #else
9942 f = res_query;
9943 #endif
9944
9945 ; return 0; }
9946 EOF
9947 if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9948   rm -rf conftest*
9949   eval "ac_cv_func_res_query=yes"
9950 else
9951   echo "configure: failed program was:" >&5
9952   cat conftest.$ac_ext >&5
9953   rm -rf conftest*
9954   eval "ac_cv_func_res_query=no"
9955 fi
9956 rm -f conftest*
9957 fi
9958
9959 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9960   echo "$ac_t""yes" 1>&6
9961   :
9962 else
9963   echo "$ac_t""no" 1>&6
9964 fi
9965
9966 if test $ac_cv_func_res_query = no ; then 
9967         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9968 echo "configure:9969: checking for __res_query" >&5
9969 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9970   echo $ac_n "(cached) $ac_c" 1>&6
9971 else
9972   cat > conftest.$ac_ext <<EOF
9973 #line 9974 "configure"
9974 #include "confdefs.h"
9975 /* System header to define __stub macros and hopefully few prototypes,
9976     which can conflict with char __res_query(); below.  */
9977 #include <assert.h>
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char __res_query();
9982 char (*f)();
9983
9984 int main() {
9985
9986 /* The GNU C library defines this for functions which it implements
9987     to always fail with ENOSYS.  Some functions are actually named
9988     something starting with __ and the normal name is an alias.  */
9989 #if defined (__stub___res_query) || defined (__stub_____res_query)
9990 choke me
9991 #else
9992 f = __res_query;
9993 #endif
9994
9995 ; return 0; }
9996 EOF
9997 if { (eval echo configure:9998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9998   rm -rf conftest*
9999   eval "ac_cv_func___res_query=yes"
10000 else
10001   echo "configure: failed program was:" >&5
10002   cat conftest.$ac_ext >&5
10003   rm -rf conftest*
10004   eval "ac_cv_func___res_query=no"
10005 fi
10006 rm -f conftest*
10007 fi
10008
10009 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10010   echo "$ac_t""yes" 1>&6
10011   :
10012 else
10013   echo "$ac_t""no" 1>&6
10014 fi
10015
10016         ac_cv_func_res_query=$ac_cv_func___res_query
10017 fi
10018
10019 if test $ac_cv_func_res_query = no ; then 
10020         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10021 echo "configure:10022: checking for res_query in -lbind" >&5
10022 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10023 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10024   echo $ac_n "(cached) $ac_c" 1>&6
10025 else
10026   ac_save_LIBS="$LIBS"
10027 LIBS="-lbind  $LIBS"
10028 cat > conftest.$ac_ext <<EOF
10029 #line 10030 "configure"
10030 #include "confdefs.h"
10031 /* Override any gcc2 internal prototype to avoid an error.  */
10032 /* We use char because int might match the return type of a gcc2
10033     builtin and then its argument prototype would still apply.  */
10034 char res_query();
10035
10036 int main() {
10037 res_query()
10038 ; return 0; }
10039 EOF
10040 if { (eval echo configure:10041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10041   rm -rf conftest*
10042   eval "ac_cv_lib_$ac_lib_var=yes"
10043 else
10044   echo "configure: failed program was:" >&5
10045   cat conftest.$ac_ext >&5
10046   rm -rf conftest*
10047   eval "ac_cv_lib_$ac_lib_var=no"
10048 fi
10049 rm -f conftest*
10050 LIBS="$ac_save_LIBS"
10051
10052 fi
10053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10054   echo "$ac_t""yes" 1>&6
10055     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10056     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10057   cat >> confdefs.h <<EOF
10058 #define $ac_tr_lib 1
10059 EOF
10060
10061   LIBS="-lbind $LIBS"
10062
10063 else
10064   echo "$ac_t""no" 1>&6
10065 fi
10066
10067         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10068 fi
10069
10070 if test $ac_cv_func_res_query = no ; then 
10071         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10072 echo "configure:10073: checking for __res_query in -lbind" >&5
10073 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10074 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10075   echo $ac_n "(cached) $ac_c" 1>&6
10076 else
10077   ac_save_LIBS="$LIBS"
10078 LIBS="-lbind  $LIBS"
10079 cat > conftest.$ac_ext <<EOF
10080 #line 10081 "configure"
10081 #include "confdefs.h"
10082 /* Override any gcc2 internal prototype to avoid an error.  */
10083 /* We use char because int might match the return type of a gcc2
10084     builtin and then its argument prototype would still apply.  */
10085 char __res_query();
10086
10087 int main() {
10088 __res_query()
10089 ; return 0; }
10090 EOF
10091 if { (eval echo configure:10092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10092   rm -rf conftest*
10093   eval "ac_cv_lib_$ac_lib_var=yes"
10094 else
10095   echo "configure: failed program was:" >&5
10096   cat conftest.$ac_ext >&5
10097   rm -rf conftest*
10098   eval "ac_cv_lib_$ac_lib_var=no"
10099 fi
10100 rm -f conftest*
10101 LIBS="$ac_save_LIBS"
10102
10103 fi
10104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10105   echo "$ac_t""yes" 1>&6
10106     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10107     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10108   cat >> confdefs.h <<EOF
10109 #define $ac_tr_lib 1
10110 EOF
10111
10112   LIBS="-lbind $LIBS"
10113
10114 else
10115   echo "$ac_t""no" 1>&6
10116 fi
10117
10118         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10119 fi
10120
10121 if test $ac_cv_func_res_query = no ; then 
10122         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10123 echo "configure:10124: checking for res_query in -lresolv" >&5
10124 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10125 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10126   echo $ac_n "(cached) $ac_c" 1>&6
10127 else
10128   ac_save_LIBS="$LIBS"
10129 LIBS="-lresolv  $LIBS"
10130 cat > conftest.$ac_ext <<EOF
10131 #line 10132 "configure"
10132 #include "confdefs.h"
10133 /* Override any gcc2 internal prototype to avoid an error.  */
10134 /* We use char because int might match the return type of a gcc2
10135     builtin and then its argument prototype would still apply.  */
10136 char res_query();
10137
10138 int main() {
10139 res_query()
10140 ; return 0; }
10141 EOF
10142 if { (eval echo configure:10143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10143   rm -rf conftest*
10144   eval "ac_cv_lib_$ac_lib_var=yes"
10145 else
10146   echo "configure: failed program was:" >&5
10147   cat conftest.$ac_ext >&5
10148   rm -rf conftest*
10149   eval "ac_cv_lib_$ac_lib_var=no"
10150 fi
10151 rm -f conftest*
10152 LIBS="$ac_save_LIBS"
10153
10154 fi
10155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10156   echo "$ac_t""yes" 1>&6
10157     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10158     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10159   cat >> confdefs.h <<EOF
10160 #define $ac_tr_lib 1
10161 EOF
10162
10163   LIBS="-lresolv $LIBS"
10164
10165 else
10166   echo "$ac_t""no" 1>&6
10167 fi
10168
10169         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10170 fi
10171
10172 if test $ac_cv_func_res_query = no ; then 
10173         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10174 echo "configure:10175: checking for __res_query in -lresolv" >&5
10175 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10176 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10177   echo $ac_n "(cached) $ac_c" 1>&6
10178 else
10179   ac_save_LIBS="$LIBS"
10180 LIBS="-lresolv  $LIBS"
10181 cat > conftest.$ac_ext <<EOF
10182 #line 10183 "configure"
10183 #include "confdefs.h"
10184 /* Override any gcc2 internal prototype to avoid an error.  */
10185 /* We use char because int might match the return type of a gcc2
10186     builtin and then its argument prototype would still apply.  */
10187 char __res_query();
10188
10189 int main() {
10190 __res_query()
10191 ; return 0; }
10192 EOF
10193 if { (eval echo configure:10194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10194   rm -rf conftest*
10195   eval "ac_cv_lib_$ac_lib_var=yes"
10196 else
10197   echo "configure: failed program was:" >&5
10198   cat conftest.$ac_ext >&5
10199   rm -rf conftest*
10200   eval "ac_cv_lib_$ac_lib_var=no"
10201 fi
10202 rm -f conftest*
10203 LIBS="$ac_save_LIBS"
10204
10205 fi
10206 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10207   echo "$ac_t""yes" 1>&6
10208     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10209     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10210   cat >> confdefs.h <<EOF
10211 #define $ac_tr_lib 1
10212 EOF
10213
10214   LIBS="-lresolv $LIBS"
10215
10216 else
10217   echo "$ac_t""no" 1>&6
10218 fi
10219
10220         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10221 fi
10222
10223 if test "$ac_cv_func_res_query" = yes ; then
10224         cat >> confdefs.h <<\EOF
10225 #define HAVE_RES_QUERY 1
10226 EOF
10227
10228
10229         if test $ol_enable_dnssrv != no ; then
10230                 ol_link_dnssrv=yes
10231         fi
10232 fi
10233
10234 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10235         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10236 fi
10237
10238 for ac_func in getaddrinfo gai_strerror inet_ntop 
10239 do
10240 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10241 echo "configure:10242: checking for $ac_func" >&5
10242 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10243   echo $ac_n "(cached) $ac_c" 1>&6
10244 else
10245   cat > conftest.$ac_ext <<EOF
10246 #line 10247 "configure"
10247 #include "confdefs.h"
10248 /* System header to define __stub macros and hopefully few prototypes,
10249     which can conflict with char $ac_func(); below.  */
10250 #include <assert.h>
10251 /* Override any gcc2 internal prototype to avoid an error.  */
10252 /* We use char because int might match the return type of a gcc2
10253     builtin and then its argument prototype would still apply.  */
10254 char $ac_func();
10255 char (*f)();
10256
10257 int main() {
10258
10259 /* The GNU C library defines this for functions which it implements
10260     to always fail with ENOSYS.  Some functions are actually named
10261     something starting with __ and the normal name is an alias.  */
10262 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10263 choke me
10264 #else
10265 f = $ac_func;
10266 #endif
10267
10268 ; return 0; }
10269 EOF
10270 if { (eval echo configure:10271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10271   rm -rf conftest*
10272   eval "ac_cv_func_$ac_func=yes"
10273 else
10274   echo "configure: failed program was:" >&5
10275   cat conftest.$ac_ext >&5
10276   rm -rf conftest*
10277   eval "ac_cv_func_$ac_func=no"
10278 fi
10279 rm -f conftest*
10280 fi
10281
10282 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10285   cat >> confdefs.h <<EOF
10286 #define $ac_tr_func 1
10287 EOF
10288  
10289 else
10290   echo "$ac_t""no" 1>&6
10291 fi
10292 done
10293
10294
10295 ol_link_ipv6=no
10296 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10297         if test $ol_enable_ipv6 = yes ; then
10298                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10299         fi
10300 elif test $ol_enable_ipv6 != no ; then
10301         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10302 echo "configure:10303: checking INET6_ADDRSTRLEN" >&5
10303 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10304   echo $ac_n "(cached) $ac_c" 1>&6
10305 else
10306   
10307                 cat > conftest.$ac_ext <<EOF
10308 #line 10309 "configure"
10309 #include "confdefs.h"
10310
10311 #                       include <netinet/in.h>
10312 #                       ifdef INET6_ADDRSTRLEN
10313                                 __has_inet6_addrstrlen__;
10314 #                       endif
10315                 
10316 EOF
10317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10318   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10319   rm -rf conftest*
10320   ol_cv_inet6_addrstrlen=yes
10321 else
10322   rm -rf conftest*
10323   ol_cv_inet6_addrstrlen=no
10324 fi
10325 rm -f conftest*
10326
10327 fi
10328
10329 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10330
10331         if test $ol_cv_inet6_addrstrlen = yes ; then
10332                 ol_link_ipv6=yes
10333         elif test $ol_enable_ipv6 = yes ; then
10334                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10335         fi
10336 fi
10337
10338 if test $ol_enable_local != no ; then
10339         for ac_hdr in sys/un.h 
10340 do
10341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10343 echo "configure:10344: checking for $ac_hdr" >&5
10344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10345   echo $ac_n "(cached) $ac_c" 1>&6
10346 else
10347   cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 #include <$ac_hdr>
10351 EOF
10352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10353 { (eval echo configure:10354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10355 if test -z "$ac_err"; then
10356   rm -rf conftest*
10357   eval "ac_cv_header_$ac_safe=yes"
10358 else
10359   echo "$ac_err" >&5
10360   echo "configure: failed program was:" >&5
10361   cat conftest.$ac_ext >&5
10362   rm -rf conftest*
10363   eval "ac_cv_header_$ac_safe=no"
10364 fi
10365 rm -f conftest*
10366 fi
10367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10368   echo "$ac_t""yes" 1>&6
10369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10370   cat >> confdefs.h <<EOF
10371 #define $ac_tr_hdr 1
10372 EOF
10373  
10374 else
10375   echo "$ac_t""no" 1>&6
10376 fi
10377 done
10378
10379
10380         if test $ol_enable_local = auto ; then
10381                 ol_enable_local=$ac_cv_header_sys_un_h
10382         elif test $ac_cv_header_sys_un_h = no ; then
10383                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10384         fi
10385 fi
10386
10387 ol_link_kbind=no
10388 ol_link_kpasswd=no
10389 ol_link_krb5=no
10390 ol_link_krb4=no
10391
10392 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10393         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10394         -o $ol_with_kerberos = k425 ; then
10395
10396         for ac_hdr in krb5.h
10397 do
10398 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10399 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10400 echo "configure:10401: checking for $ac_hdr" >&5
10401 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10402   echo $ac_n "(cached) $ac_c" 1>&6
10403 else
10404   cat > conftest.$ac_ext <<EOF
10405 #line 10406 "configure"
10406 #include "confdefs.h"
10407 #include <$ac_hdr>
10408 EOF
10409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10410 { (eval echo configure:10411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10412 if test -z "$ac_err"; then
10413   rm -rf conftest*
10414   eval "ac_cv_header_$ac_safe=yes"
10415 else
10416   echo "$ac_err" >&5
10417   echo "configure: failed program was:" >&5
10418   cat conftest.$ac_ext >&5
10419   rm -rf conftest*
10420   eval "ac_cv_header_$ac_safe=no"
10421 fi
10422 rm -f conftest*
10423 fi
10424 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10425   echo "$ac_t""yes" 1>&6
10426     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10427   cat >> confdefs.h <<EOF
10428 #define $ac_tr_hdr 1
10429 EOF
10430  
10431 else
10432   echo "$ac_t""no" 1>&6
10433 fi
10434 done
10435
10436
10437         if test $ac_cv_header_krb5_h = yes ; then
10438                                 for ac_hdr in heim_err.h
10439 do
10440 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10441 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10442 echo "configure:10443: checking for $ac_hdr" >&5
10443 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10444   echo $ac_n "(cached) $ac_c" 1>&6
10445 else
10446   cat > conftest.$ac_ext <<EOF
10447 #line 10448 "configure"
10448 #include "confdefs.h"
10449 #include <$ac_hdr>
10450 EOF
10451 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10452 { (eval echo configure:10453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10453 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10454 if test -z "$ac_err"; then
10455   rm -rf conftest*
10456   eval "ac_cv_header_$ac_safe=yes"
10457 else
10458   echo "$ac_err" >&5
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -rf conftest*
10462   eval "ac_cv_header_$ac_safe=no"
10463 fi
10464 rm -f conftest*
10465 fi
10466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10467   echo "$ac_t""yes" 1>&6
10468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10469   cat >> confdefs.h <<EOF
10470 #define $ac_tr_hdr 1
10471 EOF
10472  
10473 else
10474   echo "$ac_t""no" 1>&6
10475 fi
10476 done
10477
10478                 if test $ac_cv_header_heim_err_h = yes ; then
10479                         krb5_impl=heimdal
10480                 else
10481                         krb5_impl=mit
10482                 fi
10483
10484                 if test $krb5_impl = mit; then
10485                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10486 echo "configure:10487: checking for main in -lk5crypto" >&5
10487 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10488 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10489   echo $ac_n "(cached) $ac_c" 1>&6
10490 else
10491   ac_save_LIBS="$LIBS"
10492 LIBS="-lk5crypto  $LIBS"
10493 cat > conftest.$ac_ext <<EOF
10494 #line 10495 "configure"
10495 #include "confdefs.h"
10496
10497 int main() {
10498 main()
10499 ; return 0; }
10500 EOF
10501 if { (eval echo configure:10502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10502   rm -rf conftest*
10503   eval "ac_cv_lib_$ac_lib_var=yes"
10504 else
10505   echo "configure: failed program was:" >&5
10506   cat conftest.$ac_ext >&5
10507   rm -rf conftest*
10508   eval "ac_cv_lib_$ac_lib_var=no"
10509 fi
10510 rm -f conftest*
10511 LIBS="$ac_save_LIBS"
10512
10513 fi
10514 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10515   echo "$ac_t""yes" 1>&6
10516   krb5crypto=k5crypto
10517 else
10518   echo "$ac_t""no" 1>&6
10519 krb5crypto=crypto
10520 fi
10521
10522
10523                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10524 echo "configure:10525: checking for main in -lkrb5" >&5
10525 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10526 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10527   echo $ac_n "(cached) $ac_c" 1>&6
10528 else
10529   ac_save_LIBS="$LIBS"
10530 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10531 cat > conftest.$ac_ext <<EOF
10532 #line 10533 "configure"
10533 #include "confdefs.h"
10534
10535 int main() {
10536 main()
10537 ; return 0; }
10538 EOF
10539 if { (eval echo configure:10540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10540   rm -rf conftest*
10541   eval "ac_cv_lib_$ac_lib_var=yes"
10542 else
10543   echo "configure: failed program was:" >&5
10544   cat conftest.$ac_ext >&5
10545   rm -rf conftest*
10546   eval "ac_cv_lib_$ac_lib_var=no"
10547 fi
10548 rm -f conftest*
10549 LIBS="$ac_save_LIBS"
10550
10551 fi
10552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10553   echo "$ac_t""yes" 1>&6
10554   have_krb5=yes
10555                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10556 else
10557   echo "$ac_t""no" 1>&6
10558 have_krb5=no
10559 fi
10560
10561
10562                 elif test $krb5_impl = heimdal; then
10563                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10564 echo "configure:10565: checking for main in -ldes" >&5
10565 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10566 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10567   echo $ac_n "(cached) $ac_c" 1>&6
10568 else
10569   ac_save_LIBS="$LIBS"
10570 LIBS="-ldes  $LIBS"
10571 cat > conftest.$ac_ext <<EOF
10572 #line 10573 "configure"
10573 #include "confdefs.h"
10574
10575 int main() {
10576 main()
10577 ; return 0; }
10578 EOF
10579 if { (eval echo configure:10580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10580   rm -rf conftest*
10581   eval "ac_cv_lib_$ac_lib_var=yes"
10582 else
10583   echo "configure: failed program was:" >&5
10584   cat conftest.$ac_ext >&5
10585   rm -rf conftest*
10586   eval "ac_cv_lib_$ac_lib_var=no"
10587 fi
10588 rm -f conftest*
10589 LIBS="$ac_save_LIBS"
10590
10591 fi
10592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10593   echo "$ac_t""yes" 1>&6
10594   krb5crypto=des
10595 else
10596   echo "$ac_t""no" 1>&6
10597 krb5crypto=crypto
10598 fi
10599
10600
10601                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10602 echo "configure:10603: checking for main in -lkrb5" >&5
10603 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10604 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10605   echo $ac_n "(cached) $ac_c" 1>&6
10606 else
10607   ac_save_LIBS="$LIBS"
10608 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10609 cat > conftest.$ac_ext <<EOF
10610 #line 10611 "configure"
10611 #include "confdefs.h"
10612
10613 int main() {
10614 main()
10615 ; return 0; }
10616 EOF
10617 if { (eval echo configure:10618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10618   rm -rf conftest*
10619   eval "ac_cv_lib_$ac_lib_var=yes"
10620 else
10621   echo "configure: failed program was:" >&5
10622   cat conftest.$ac_ext >&5
10623   rm -rf conftest*
10624   eval "ac_cv_lib_$ac_lib_var=no"
10625 fi
10626 rm -f conftest*
10627 LIBS="$ac_save_LIBS"
10628
10629 fi
10630 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10631   echo "$ac_t""yes" 1>&6
10632   have_krb5=yes
10633                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10634 else
10635   echo "$ac_t""no" 1>&6
10636 have_krb5=no
10637 fi
10638
10639
10640                         cat >> confdefs.h <<\EOF
10641 #define HAVE_HEIMDAL_KERBEROS 1
10642 EOF
10643
10644
10645                 else
10646                         have_krb5=no
10647                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10648                 fi
10649
10650                 if test $have_krb5 = yes ; then
10651                         ol_link_krb5=yes
10652
10653                         cat >> confdefs.h <<\EOF
10654 #define HAVE_KRB5 1
10655 EOF
10656
10657
10658                         if test $ol_enable_kpasswd != no ; then
10659                                 ol_link_kpasswd=yes;
10660                         fi
10661
10662                         if test $ol_with_kerberos = k5only ; then
10663                                 ol_with_kerberos=found
10664                         fi
10665
10666                 elif test $ol_with_kerberos != auto ; then
10667                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10668                 fi
10669
10670         fi
10671 fi
10672
10673 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10674         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10675
10676         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10677 do
10678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10679 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10680 echo "configure:10681: checking for $ac_hdr" >&5
10681 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10682   echo $ac_n "(cached) $ac_c" 1>&6
10683 else
10684   cat > conftest.$ac_ext <<EOF
10685 #line 10686 "configure"
10686 #include "confdefs.h"
10687 #include <$ac_hdr>
10688 EOF
10689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10690 { (eval echo configure:10691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10692 if test -z "$ac_err"; then
10693   rm -rf conftest*
10694   eval "ac_cv_header_$ac_safe=yes"
10695 else
10696   echo "$ac_err" >&5
10697   echo "configure: failed program was:" >&5
10698   cat conftest.$ac_ext >&5
10699   rm -rf conftest*
10700   eval "ac_cv_header_$ac_safe=no"
10701 fi
10702 rm -f conftest*
10703 fi
10704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10705   echo "$ac_t""yes" 1>&6
10706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10707   cat >> confdefs.h <<EOF
10708 #define $ac_tr_hdr 1
10709 EOF
10710  
10711 else
10712   echo "$ac_t""no" 1>&6
10713 fi
10714 done
10715
10716
10717         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10718                 if test $krb5_impl = mit; then
10719                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10720 echo "configure:10721: checking for main in -lkrb4" >&5
10721 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10722 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10723   echo $ac_n "(cached) $ac_c" 1>&6
10724 else
10725   ac_save_LIBS="$LIBS"
10726 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10727 cat > conftest.$ac_ext <<EOF
10728 #line 10729 "configure"
10729 #include "confdefs.h"
10730
10731 int main() {
10732 main()
10733 ; return 0; }
10734 EOF
10735 if { (eval echo configure:10736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10736   rm -rf conftest*
10737   eval "ac_cv_lib_$ac_lib_var=yes"
10738 else
10739   echo "configure: failed program was:" >&5
10740   cat conftest.$ac_ext >&5
10741   rm -rf conftest*
10742   eval "ac_cv_lib_$ac_lib_var=no"
10743 fi
10744 rm -f conftest*
10745 LIBS="$ac_save_LIBS"
10746
10747 fi
10748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10749   echo "$ac_t""yes" 1>&6
10750   have_k425=yes
10751                                 KRB4_LIBS="-lkrb4 -ldes425"
10752 else
10753   echo "$ac_t""no" 1>&6
10754 have_k425=no
10755 fi
10756
10757
10758                 elif test $krb5_impl = heimdal; then
10759                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10760 echo "configure:10761: checking for main in -lkrb4" >&5
10761 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10763   echo $ac_n "(cached) $ac_c" 1>&6
10764 else
10765   ac_save_LIBS="$LIBS"
10766 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10767 cat > conftest.$ac_ext <<EOF
10768 #line 10769 "configure"
10769 #include "confdefs.h"
10770
10771 int main() {
10772 main()
10773 ; return 0; }
10774 EOF
10775 if { (eval echo configure:10776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10776   rm -rf conftest*
10777   eval "ac_cv_lib_$ac_lib_var=yes"
10778 else
10779   echo "configure: failed program was:" >&5
10780   cat conftest.$ac_ext >&5
10781   rm -rf conftest*
10782   eval "ac_cv_lib_$ac_lib_var=no"
10783 fi
10784 rm -f conftest*
10785 LIBS="$ac_save_LIBS"
10786
10787 fi
10788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10789   echo "$ac_t""yes" 1>&6
10790   have_k425=yes
10791                                 KRB4_LIBS="-lkrb4"
10792 else
10793   echo "$ac_t""no" 1>&6
10794 have_k425=no
10795 fi
10796
10797
10798                 else
10799                         have_425=no
10800                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10801                 fi
10802
10803                 if test $have_k425 = yes ; then
10804                         ol_with_kerberos=found
10805                         ol_link_krb4=yes
10806
10807                         cat >> confdefs.h <<\EOF
10808 #define HAVE_KRB425 1
10809 EOF
10810
10811                         cat >> confdefs.h <<\EOF
10812 #define HAVE_KRB4 1
10813 EOF
10814
10815
10816                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10817 echo "configure:10818: checking for des_debug in Kerberos libraries" >&5
10818 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   
10822                                                                 save_LIBS="$LIBS"
10823                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10824                                 cat > conftest.$ac_ext <<EOF
10825 #line 10826 "configure"
10826 #include "confdefs.h"
10827
10828 #include <kerberosIV/krb.h>
10829 #include <kerberosIV/des.h>
10830 extern int des_debug;
10831
10832 int main() {
10833
10834 des_debug = 1;
10835
10836 ; return 0; }
10837 EOF
10838 if { (eval echo configure:10839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10839   rm -rf conftest*
10840   ol_cv_var_des_debug=yes
10841 else
10842   echo "configure: failed program was:" >&5
10843   cat conftest.$ac_ext >&5
10844   rm -rf conftest*
10845   ol_cv_var_des_debug=no
10846 fi
10847 rm -f conftest*
10848                                                                 LIBS="$save_LIBS"
10849                         
10850 fi
10851
10852 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10853
10854                         if test $ol_cv_var_des_debug = yes ; then
10855                                 cat >> confdefs.h <<\EOF
10856 #define HAVE_DES_DEBUG 1
10857 EOF
10858
10859                         fi
10860
10861                         LIBS="$save_LIBS"
10862                 fi
10863         fi
10864 fi
10865
10866 if test $ol_link_krb5 = yes ; then
10867         ol_with_kerberos=found
10868 fi
10869
10870 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10871         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10872
10873         for ac_hdr in krb.h des.h krb-archaeology.h 
10874 do
10875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10877 echo "configure:10878: checking for $ac_hdr" >&5
10878 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10879   echo $ac_n "(cached) $ac_c" 1>&6
10880 else
10881   cat > conftest.$ac_ext <<EOF
10882 #line 10883 "configure"
10883 #include "confdefs.h"
10884 #include <$ac_hdr>
10885 EOF
10886 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10887 { (eval echo configure:10888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10888 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10889 if test -z "$ac_err"; then
10890   rm -rf conftest*
10891   eval "ac_cv_header_$ac_safe=yes"
10892 else
10893   echo "$ac_err" >&5
10894   echo "configure: failed program was:" >&5
10895   cat conftest.$ac_ext >&5
10896   rm -rf conftest*
10897   eval "ac_cv_header_$ac_safe=no"
10898 fi
10899 rm -f conftest*
10900 fi
10901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10902   echo "$ac_t""yes" 1>&6
10903     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10904   cat >> confdefs.h <<EOF
10905 #define $ac_tr_hdr 1
10906 EOF
10907  
10908 else
10909   echo "$ac_t""no" 1>&6
10910 fi
10911 done
10912
10913
10914         if test $ac_cv_header_krb_h = yes ; then
10915                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10916 echo "configure:10917: checking for main in -lkrb" >&5
10917 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10918 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10919   echo $ac_n "(cached) $ac_c" 1>&6
10920 else
10921   ac_save_LIBS="$LIBS"
10922 LIBS="-lkrb -ldes $LIBS"
10923 cat > conftest.$ac_ext <<EOF
10924 #line 10925 "configure"
10925 #include "confdefs.h"
10926
10927 int main() {
10928 main()
10929 ; return 0; }
10930 EOF
10931 if { (eval echo configure:10932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10932   rm -rf conftest*
10933   eval "ac_cv_lib_$ac_lib_var=yes"
10934 else
10935   echo "configure: failed program was:" >&5
10936   cat conftest.$ac_ext >&5
10937   rm -rf conftest*
10938   eval "ac_cv_lib_$ac_lib_var=no"
10939 fi
10940 rm -f conftest*
10941 LIBS="$ac_save_LIBS"
10942
10943 fi
10944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10945   echo "$ac_t""yes" 1>&6
10946   have_k4=yes
10947 else
10948   echo "$ac_t""no" 1>&6
10949 have_k4=no
10950 fi
10951
10952
10953                 if test $have_k4 = yes ; then
10954                         ol_with_kerberos=found
10955                         ol_link_krb4=yes
10956
10957                         cat >> confdefs.h <<\EOF
10958 #define HAVE_KRB4 1
10959 EOF
10960
10961
10962                         KRB4_LIBS="-lkrb -ldes"
10963
10964                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10965                                 cat >> confdefs.h <<\EOF
10966 #define HAVE_KTH_KERBEROS 1
10967 EOF
10968
10969                         fi
10970                 fi
10971         fi
10972 fi
10973
10974 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10975         ol_link_kpasswd=yes
10976 fi
10977
10978 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10979         ol_link_kbind=yes
10980
10981 elif test $ol_enable_kbind = yes ; then
10982         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10983 fi
10984
10985 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10986         cat >> confdefs.h <<\EOF
10987 #define HAVE_KERBEROS 1
10988 EOF
10989
10990
10991 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10992         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10993 fi
10994
10995 ol_link_tls=no
10996 if test $ol_with_tls != no ; then
10997         for ac_hdr in openssl/ssl.h ssl.h
10998 do
10999 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11000 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11001 echo "configure:11002: checking for $ac_hdr" >&5
11002 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11003   echo $ac_n "(cached) $ac_c" 1>&6
11004 else
11005   cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008 #include <$ac_hdr>
11009 EOF
11010 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11011 { (eval echo configure:11012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11012 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11013 if test -z "$ac_err"; then
11014   rm -rf conftest*
11015   eval "ac_cv_header_$ac_safe=yes"
11016 else
11017   echo "$ac_err" >&5
11018   echo "configure: failed program was:" >&5
11019   cat conftest.$ac_ext >&5
11020   rm -rf conftest*
11021   eval "ac_cv_header_$ac_safe=no"
11022 fi
11023 rm -f conftest*
11024 fi
11025 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11026   echo "$ac_t""yes" 1>&6
11027     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11028   cat >> confdefs.h <<EOF
11029 #define $ac_tr_hdr 1
11030 EOF
11031  
11032 else
11033   echo "$ac_t""no" 1>&6
11034 fi
11035 done
11036
11037         
11038         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11039                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11040 echo "configure:11041: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11041 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11043   echo $ac_n "(cached) $ac_c" 1>&6
11044 else
11045   ac_save_LIBS="$LIBS"
11046 LIBS="-lssl -lcrypto $LIBS"
11047 cat > conftest.$ac_ext <<EOF
11048 #line 11049 "configure"
11049 #include "confdefs.h"
11050 /* Override any gcc2 internal prototype to avoid an error.  */
11051 /* We use char because int might match the return type of a gcc2
11052     builtin and then its argument prototype would still apply.  */
11053 char SSLeay_add_ssl_algorithms();
11054
11055 int main() {
11056 SSLeay_add_ssl_algorithms()
11057 ; return 0; }
11058 EOF
11059 if { (eval echo configure:11060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11060   rm -rf conftest*
11061   eval "ac_cv_lib_$ac_lib_var=yes"
11062 else
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_lib_$ac_lib_var=no"
11067 fi
11068 rm -f conftest*
11069 LIBS="$ac_save_LIBS"
11070
11071 fi
11072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074   have_ssleay=yes
11075                         need_rsaref=no
11076 else
11077   echo "$ac_t""no" 1>&6
11078 have_ssleay=no
11079 fi
11080
11081                         
11082                 if test $have_ssleay = no ; then
11083                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11084 echo "configure:11085: checking for SSL_library_init in -lssl" >&5
11085 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11086 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   ac_save_LIBS="$LIBS"
11090 LIBS="-lssl -lcrypto $LIBS"
11091 cat > conftest.$ac_ext <<EOF
11092 #line 11093 "configure"
11093 #include "confdefs.h"
11094 /* Override any gcc2 internal prototype to avoid an error.  */
11095 /* We use char because int might match the return type of a gcc2
11096     builtin and then its argument prototype would still apply.  */
11097 char SSL_library_init();
11098
11099 int main() {
11100 SSL_library_init()
11101 ; return 0; }
11102 EOF
11103 if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11104   rm -rf conftest*
11105   eval "ac_cv_lib_$ac_lib_var=yes"
11106 else
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   eval "ac_cv_lib_$ac_lib_var=no"
11111 fi
11112 rm -f conftest*
11113 LIBS="$ac_save_LIBS"
11114
11115 fi
11116 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11117   echo "$ac_t""yes" 1>&6
11118   have_ssleay=yes
11119                                 need_rsaref=no
11120 else
11121   echo "$ac_t""no" 1>&6
11122 have_ssleay=no
11123 fi
11124
11125                 fi
11126
11127                 if test $have_ssleay = no ; then
11128                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11129 echo "configure:11130: checking for ssl3_accept in -lssl" >&5
11130 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11131 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11132   echo $ac_n "(cached) $ac_c" 1>&6
11133 else
11134   ac_save_LIBS="$LIBS"
11135 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11136 cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139 /* Override any gcc2 internal prototype to avoid an error.  */
11140 /* We use char because int might match the return type of a gcc2
11141     builtin and then its argument prototype would still apply.  */
11142 char ssl3_accept();
11143
11144 int main() {
11145 ssl3_accept()
11146 ; return 0; }
11147 EOF
11148 if { (eval echo configure:11149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11149   rm -rf conftest*
11150   eval "ac_cv_lib_$ac_lib_var=yes"
11151 else
11152   echo "configure: failed program was:" >&5
11153   cat conftest.$ac_ext >&5
11154   rm -rf conftest*
11155   eval "ac_cv_lib_$ac_lib_var=no"
11156 fi
11157 rm -f conftest*
11158 LIBS="$ac_save_LIBS"
11159
11160 fi
11161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11162   echo "$ac_t""yes" 1>&6
11163   have_ssleay=yes
11164                                 need_rsaref=yes
11165 else
11166   echo "$ac_t""no" 1>&6
11167 have_ssleay=no
11168 fi
11169
11170                 fi
11171
11172                 if test $have_ssleay = yes ; then
11173                         ol_with_tls=found
11174                         ol_link_tls=yes
11175
11176                         cat >> confdefs.h <<\EOF
11177 #define HAVE_SSLEAY 1
11178 EOF
11179
11180
11181                         if test $need_rsaref = yes; then
11182                                 cat >> confdefs.h <<\EOF
11183 #define HAVE_RSAREF 1
11184 EOF
11185
11186
11187                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11188                         else
11189                                 TLS_LIBS="-lssl -lcrypto"
11190                         fi
11191                 fi
11192         fi
11193
11194 else
11195         echo "configure: warning: TLS data protection not supported!" 1>&2
11196 fi
11197
11198 if test $ol_link_tls = yes ; then
11199         cat >> confdefs.h <<\EOF
11200 #define HAVE_TLS 1
11201 EOF
11202
11203
11204 elif test $ol_with_tls = auto ; then
11205         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11206         echo "configure: warning: TLS data protection not supported!" 1>&2
11207
11208 elif test $ol_with_tls != no ; then
11209         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11210 fi
11211
11212 if test $ol_enable_lmpasswd != no; then
11213         if test $ol_link_tls != yes ; then
11214                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11215         fi
11216
11217         cat >> confdefs.h <<\EOF
11218 #define SLAPD_LMHASH 1
11219 EOF
11220
11221 fi
11222
11223 for ac_func in \
11224         ctime_r                 \
11225         gethostbyname_r gethostbyaddr_r \
11226
11227 do
11228 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_func" >&5
11230 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11231   echo $ac_n "(cached) $ac_c" 1>&6
11232 else
11233   cat > conftest.$ac_ext <<EOF
11234 #line 11235 "configure"
11235 #include "confdefs.h"
11236 /* System header to define __stub macros and hopefully few prototypes,
11237     which can conflict with char $ac_func(); below.  */
11238 #include <assert.h>
11239 /* Override any gcc2 internal prototype to avoid an error.  */
11240 /* We use char because int might match the return type of a gcc2
11241     builtin and then its argument prototype would still apply.  */
11242 char $ac_func();
11243 char (*f)();
11244
11245 int main() {
11246
11247 /* The GNU C library defines this for functions which it implements
11248     to always fail with ENOSYS.  Some functions are actually named
11249     something starting with __ and the normal name is an alias.  */
11250 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11251 choke me
11252 #else
11253 f = $ac_func;
11254 #endif
11255
11256 ; return 0; }
11257 EOF
11258 if { (eval echo configure:11259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11259   rm -rf conftest*
11260   eval "ac_cv_func_$ac_func=yes"
11261 else
11262   echo "configure: failed program was:" >&5
11263   cat conftest.$ac_ext >&5
11264   rm -rf conftest*
11265   eval "ac_cv_func_$ac_func=no"
11266 fi
11267 rm -f conftest*
11268 fi
11269
11270 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11271   echo "$ac_t""yes" 1>&6
11272     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11273   cat >> confdefs.h <<EOF
11274 #define $ac_tr_func 1
11275 EOF
11276  
11277 else
11278   echo "$ac_t""no" 1>&6
11279 fi
11280 done
11281
11282
11283 if test "$ac_cv_func_ctime_r" = no ; then
11284         ol_cv_func_ctime_r_nargs=0
11285 else
11286         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11287 echo "configure:11288: checking number of arguments of ctime_r" >&5
11288 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11289   echo $ac_n "(cached) $ac_c" 1>&6
11290 else
11291   cat > conftest.$ac_ext <<EOF
11292 #line 11293 "configure"
11293 #include "confdefs.h"
11294 #include <time.h>
11295 int main() {
11296 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11297 ; return 0; }
11298 EOF
11299 if { (eval echo configure:11300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11300   rm -rf conftest*
11301   ol_cv_func_ctime_r_nargs3=yes
11302 else
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   ol_cv_func_ctime_r_nargs3=no
11307 fi
11308 rm -f conftest*
11309
11310         cat > conftest.$ac_ext <<EOF
11311 #line 11312 "configure"
11312 #include "confdefs.h"
11313 #include <time.h>
11314 int main() {
11315 time_t ti; char *buffer; ctime_r(&ti,buffer);
11316 ; return 0; }
11317 EOF
11318 if { (eval echo configure:11319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11319   rm -rf conftest*
11320   ol_cv_func_ctime_r_nargs2=yes
11321 else
11322   echo "configure: failed program was:" >&5
11323   cat conftest.$ac_ext >&5
11324   rm -rf conftest*
11325   ol_cv_func_ctime_r_nargs2=no
11326 fi
11327 rm -f conftest*
11328
11329         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11330                 $ol_cv_func_ctime_r_nargs2 = no ; then
11331
11332                 ol_cv_func_ctime_r_nargs=3
11333
11334         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11335                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11336
11337                 ol_cv_func_ctime_r_nargs=2
11338
11339         else
11340                 ol_cv_func_ctime_r_nargs=0
11341         fi
11342   
11343 fi
11344
11345 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11346
11347   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11348         cat >> confdefs.h <<EOF
11349 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11350 EOF
11351
11352   fi
11353
11354 fi
11355
11356 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11357         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11358 echo "configure:11359: checking number of arguments of gethostbyname_r" >&5
11359 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11360   echo $ac_n "(cached) $ac_c" 1>&6
11361 else
11362   cat > conftest.$ac_ext <<EOF
11363 #line 11364 "configure"
11364 #include "confdefs.h"
11365 #include <sys/types.h>
11366 #include <sys/socket.h>
11367 #include <netinet/in.h>
11368 #include <netdb.h>
11369 #define BUFSIZE (sizeof(struct hostent)+10)
11370 int main() {
11371 struct hostent hent; char buffer[BUFSIZE];
11372                 int bufsize=BUFSIZE;int h_errno;
11373                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11374                         buffer, bufsize, &h_errno);
11375 ; return 0; }
11376 EOF
11377 if { (eval echo configure:11378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11378   rm -rf conftest*
11379   ol_cv_func_gethostbyname_r_nargs5=yes
11380 else
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   ol_cv_func_gethostbyname_r_nargs5=no
11385 fi
11386 rm -f conftest*
11387
11388         cat > conftest.$ac_ext <<EOF
11389 #line 11390 "configure"
11390 #include "confdefs.h"
11391 #include <sys/types.h>
11392 #include <sys/socket.h>
11393 #include <netinet/in.h>
11394 #include <netdb.h>
11395 #define BUFSIZE (sizeof(struct hostent)+10)
11396 int main() {
11397 struct hostent hent;struct hostent *rhent;
11398                 char buffer[BUFSIZE];
11399                 int bufsize=BUFSIZE;int h_errno;
11400                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11401                         &rhent, &h_errno);
11402 ; return 0; }
11403 EOF
11404 if { (eval echo configure:11405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11405   rm -rf conftest*
11406   ol_cv_func_gethostbyname_r_nargs6=yes
11407 else
11408   echo "configure: failed program was:" >&5
11409   cat conftest.$ac_ext >&5
11410   rm -rf conftest*
11411   ol_cv_func_gethostbyname_r_nargs6=no
11412 fi
11413 rm -f conftest*
11414
11415         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11416                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11417
11418                 ol_cv_func_gethostbyname_r_nargs=5
11419
11420         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11421                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11422
11423                 ol_cv_func_gethostbyname_r_nargs=6
11424
11425         else
11426                 ol_cv_func_gethostbyname_r_nargs=0
11427         fi
11428   
11429 fi
11430
11431 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11432   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11433         cat >> confdefs.h <<EOF
11434 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11435 EOF
11436
11437   fi
11438
11439 else
11440         ol_cv_func_gethostbyname_r_nargs=0
11441 fi
11442  
11443 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11444         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11445 echo "configure:11446: checking number of arguments of gethostbyaddr_r" >&5
11446 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11447   echo $ac_n "(cached) $ac_c" 1>&6
11448 else
11449   cat > conftest.$ac_ext <<EOF
11450 #line 11451 "configure"
11451 #include "confdefs.h"
11452 #include <sys/types.h>
11453 #include <sys/socket.h>
11454 #include <netinet/in.h>
11455 #include <netdb.h>
11456 #define BUFSIZE (sizeof(struct hostent)+10)
11457 int main() {
11458 struct hostent hent; char buffer[BUFSIZE]; 
11459             struct in_addr add;
11460             size_t alen=sizeof(struct in_addr);
11461             int bufsize=BUFSIZE;int h_errno;
11462                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11463                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11464 ; return 0; }
11465 EOF
11466 if { (eval echo configure:11467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11467   rm -rf conftest*
11468   ol_cv_func_gethostbyaddr_r_nargs7=yes
11469 else
11470   echo "configure: failed program was:" >&5
11471   cat conftest.$ac_ext >&5
11472   rm -rf conftest*
11473   ol_cv_func_gethostbyaddr_r_nargs7=no
11474 fi
11475 rm -f conftest*
11476
11477         cat > conftest.$ac_ext <<EOF
11478 #line 11479 "configure"
11479 #include "confdefs.h"
11480 #include <sys/types.h>
11481 #include <sys/socket.h>
11482 #include <netinet/in.h>
11483 #include <netdb.h>
11484 #define BUFSIZE (sizeof(struct hostent)+10)
11485 int main() {
11486 struct hostent hent;
11487                 struct hostent *rhent; char buffer[BUFSIZE]; 
11488                 struct in_addr add;
11489                 size_t alen=sizeof(struct in_addr);
11490                 int bufsize=BUFSIZE;int h_errno;
11491                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11492                         alen, AF_INET, &hent, buffer, bufsize, 
11493                         &rhent, &h_errno);
11494 ; return 0; }
11495 EOF
11496 if { (eval echo configure:11497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11497   rm -rf conftest*
11498   ol_cv_func_gethostbyaddr_r_nargs8=yes
11499 else
11500   echo "configure: failed program was:" >&5
11501   cat conftest.$ac_ext >&5
11502   rm -rf conftest*
11503   ol_cv_func_gethostbyaddr_r_nargs8=no
11504 fi
11505 rm -f conftest*
11506
11507         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11508                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11509
11510                 ol_cv_func_gethostbyaddr_r_nargs=7
11511
11512         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11513                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11514
11515                 ol_cv_func_gethostbyaddr_r_nargs=8
11516
11517         else
11518                 ol_cv_func_gethostbyaddr_r_nargs=0
11519         fi
11520   
11521 fi
11522
11523 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11524   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11525     cat >> confdefs.h <<EOF
11526 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11527 EOF
11528
11529   fi
11530
11531 else
11532         ol_cv_func_gethostbyaddr_r_nargs=0
11533 fi
11534
11535 if test "$ac_cv_func_ctime_r" = yes \
11536         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11537         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11538         -a "$ac_cv_func_gethostbyname_r" = yes \
11539         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11540         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11541         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11542         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11543         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11544         ; then
11545  
11546         cat >> confdefs.h <<\EOF
11547 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11548 EOF
11549
11550 fi
11551
11552 ol_link_threads=no
11553
11554 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11555         -o $ol_with_threads = nt ; then
11556
11557         
11558         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11559 echo "configure:11560: checking for _beginthread" >&5
11560 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11561   echo $ac_n "(cached) $ac_c" 1>&6
11562 else
11563   cat > conftest.$ac_ext <<EOF
11564 #line 11565 "configure"
11565 #include "confdefs.h"
11566 /* System header to define __stub macros and hopefully few prototypes,
11567     which can conflict with char _beginthread(); below.  */
11568 #include <assert.h>
11569 /* Override any gcc2 internal prototype to avoid an error.  */
11570 /* We use char because int might match the return type of a gcc2
11571     builtin and then its argument prototype would still apply.  */
11572 char _beginthread();
11573 char (*f)();
11574
11575 int main() {
11576
11577 /* The GNU C library defines this for functions which it implements
11578     to always fail with ENOSYS.  Some functions are actually named
11579     something starting with __ and the normal name is an alias.  */
11580 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11581 choke me
11582 #else
11583 f = _beginthread;
11584 #endif
11585
11586 ; return 0; }
11587 EOF
11588 if { (eval echo configure:11589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11589   rm -rf conftest*
11590   eval "ac_cv_func__beginthread=yes"
11591 else
11592   echo "configure: failed program was:" >&5
11593   cat conftest.$ac_ext >&5
11594   rm -rf conftest*
11595   eval "ac_cv_func__beginthread=no"
11596 fi
11597 rm -f conftest*
11598 fi
11599
11600 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11601   echo "$ac_t""yes" 1>&6
11602   :
11603 else
11604   echo "$ac_t""no" 1>&6
11605 fi
11606
11607
11608         if test $ac_cv_func__beginthread = yes ; then
11609                 cat >> confdefs.h <<\EOF
11610 #define HAVE_NT_THREADS 1
11611 EOF
11612
11613                 ol_cv_nt_threads=yes
11614         fi
11615
11616
11617         if test "$ol_cv_nt_threads" = yes ; then
11618                 ol_link_threads=nt
11619                 ol_with_threads=found
11620                 ol_with_yielding_select=yes
11621
11622                 cat >> confdefs.h <<\EOF
11623 #define HAVE_NT_SERVICE_MANAGER 1
11624 EOF
11625
11626                 cat >> confdefs.h <<\EOF
11627 #define HAVE_NT_EVENT_LOG 1
11628 EOF
11629
11630         fi
11631
11632         if test $ol_with_threads = nt ; then
11633                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11634         fi
11635 fi
11636
11637 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11638         -o $ol_with_threads = posix ; then
11639
11640         for ac_hdr in pthread.h
11641 do
11642 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11643 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11644 echo "configure:11645: checking for $ac_hdr" >&5
11645 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11646   echo $ac_n "(cached) $ac_c" 1>&6
11647 else
11648   cat > conftest.$ac_ext <<EOF
11649 #line 11650 "configure"
11650 #include "confdefs.h"
11651 #include <$ac_hdr>
11652 EOF
11653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11654 { (eval echo configure:11655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11656 if test -z "$ac_err"; then
11657   rm -rf conftest*
11658   eval "ac_cv_header_$ac_safe=yes"
11659 else
11660   echo "$ac_err" >&5
11661   echo "configure: failed program was:" >&5
11662   cat conftest.$ac_ext >&5
11663   rm -rf conftest*
11664   eval "ac_cv_header_$ac_safe=no"
11665 fi
11666 rm -f conftest*
11667 fi
11668 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11669   echo "$ac_t""yes" 1>&6
11670     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11671   cat >> confdefs.h <<EOF
11672 #define $ac_tr_hdr 1
11673 EOF
11674  
11675 else
11676   echo "$ac_t""no" 1>&6
11677 fi
11678 done
11679
11680
11681         if test $ac_cv_header_pthread_h = yes ; then
11682                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11683 echo "configure:11684: checking POSIX thread version" >&5
11684 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11685   echo $ac_n "(cached) $ac_c" 1>&6
11686 else
11687   
11688         cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691
11692 #               include <pthread.h>
11693                 /* this check could be improved */
11694 #               ifdef PTHREAD_ONCE_INIT
11695                         pthread_version_final;
11696 #               endif
11697         
11698 EOF
11699 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11700   egrep "pthread_version_final" >/dev/null 2>&1; then
11701   rm -rf conftest*
11702   ol_pthread_final=yes
11703 else
11704   rm -rf conftest*
11705   ol_pthread_final=no
11706 fi
11707 rm -f conftest*
11708
11709
11710         cat > conftest.$ac_ext <<EOF
11711 #line 11712 "configure"
11712 #include "confdefs.h"
11713
11714 #               include <pthread.h>
11715                 /* this check could be improved */
11716 #               ifdef pthread_once_init
11717                         pthread_version_draft4;
11718 #               endif
11719         
11720 EOF
11721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11722   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11723   rm -rf conftest*
11724   ol_pthread_draft4=yes
11725 else
11726   rm -rf conftest*
11727   ol_pthread_draft4=no
11728 fi
11729 rm -f conftest*
11730
11731
11732         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11733                 ol_cv_pthread_version=final
11734         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11735                 ol_cv_pthread_version=draft4
11736         else
11737                 ol_cv_pthread_version=unknown
11738         fi
11739
11740 fi
11741
11742 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11743
11744
11745                 if test $ol_cv_pthread_version = final ; then
11746                         cat >> confdefs.h <<\EOF
11747 #define HAVE_PTHREADS_FINAL 1
11748 EOF
11749
11750                 elif test $ol_cv_pthread_version = draft4 ; then
11751                         cat >> confdefs.h <<\EOF
11752 #define HAVE_PTHREADS_D4 1
11753 EOF
11754
11755                 else
11756                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11757                 fi
11758
11759                 # consider threads found
11760                 ol_with_threads=found
11761
11762                 
11763         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11764 echo "configure:11765: checking for LinuxThreads pthread.h" >&5
11765 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11766   echo $ac_n "(cached) $ac_c" 1>&6
11767 else
11768   cat > conftest.$ac_ext <<EOF
11769 #line 11770 "configure"
11770 #include "confdefs.h"
11771 #include <pthread.h>
11772 EOF
11773 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11774   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11775   rm -rf conftest*
11776   ol_cv_header_linux_threads=yes
11777 else
11778   rm -rf conftest*
11779   ol_cv_header_linux_threads=no
11780 fi
11781 rm -f conftest*
11782
11783                 
11784 fi
11785
11786 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11787         if test $ol_cv_header_linux_threads = yes; then
11788                 cat >> confdefs.h <<\EOF
11789 #define HAVE_LINUX_THREADS 1
11790 EOF
11791
11792         fi
11793
11794                 
11795         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11796 echo "configure:11797: checking for GNU Pth pthread.h" >&5
11797 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11798   echo $ac_n "(cached) $ac_c" 1>&6
11799 else
11800   cat > conftest.$ac_ext <<EOF
11801 #line 11802 "configure"
11802 #include "confdefs.h"
11803 #include <pthread.h>
11804 #ifdef _POSIX_THREAD_IS_GNU_PTH
11805         __gnu_pth__;
11806 #endif
11807
11808 EOF
11809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11810   egrep "__gnu_pth__" >/dev/null 2>&1; then
11811   rm -rf conftest*
11812   ol_cv_header_gnu_pth_pthread_h=yes
11813 else
11814   rm -rf conftest*
11815   ol_cv_header_gnu_pth_pthread_h=no
11816 fi
11817 rm -f conftest*
11818
11819                 
11820 fi
11821
11822 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11823
11824
11825                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11826                         for ac_hdr in sched.h
11827 do
11828 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11829 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11830 echo "configure:11831: checking for $ac_hdr" >&5
11831 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11832   echo $ac_n "(cached) $ac_c" 1>&6
11833 else
11834   cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837 #include <$ac_hdr>
11838 EOF
11839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11840 { (eval echo configure:11841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11842 if test -z "$ac_err"; then
11843   rm -rf conftest*
11844   eval "ac_cv_header_$ac_safe=yes"
11845 else
11846   echo "$ac_err" >&5
11847   echo "configure: failed program was:" >&5
11848   cat conftest.$ac_ext >&5
11849   rm -rf conftest*
11850   eval "ac_cv_header_$ac_safe=no"
11851 fi
11852 rm -f conftest*
11853 fi
11854 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11855   echo "$ac_t""yes" 1>&6
11856     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11857   cat >> confdefs.h <<EOF
11858 #define $ac_tr_hdr 1
11859 EOF
11860  
11861 else
11862   echo "$ac_t""no" 1>&6
11863 fi
11864 done
11865
11866                 fi
11867
11868                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11869                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11870 echo "configure:11871: checking for pthread_create in default libraries" >&5
11871 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11872   echo $ac_n "(cached) $ac_c" 1>&6
11873 else
11874   
11875                 if test "$cross_compiling" = yes; then
11876   cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 /* pthread test headers */
11880 #include <pthread.h>
11881 #ifndef NULL
11882 #define NULL (void*)0
11883 #endif
11884
11885 static void *task(p)
11886         void *p;
11887 {
11888         return (void *) (p == NULL);
11889 }
11890
11891 int main() {
11892
11893         /* pthread test function */
11894         pthread_t t;
11895         int status;
11896         int detach = 1;
11897
11898 #ifdef HAVE_PTHREADS_FINAL
11899         /* Final pthreads */
11900         pthread_attr_t attr;
11901
11902         status = pthread_attr_init(&attr);
11903         if( status ) return status;
11904
11905 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11906         if( !detach ) {
11907 #if defined( PTHREAD_CREATE_JOINABLE )
11908                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11909 #else
11910                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11911 #endif
11912
11913 #ifdef PTHREAD_CREATE_DETACHED
11914         } else {
11915                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11916 #endif
11917         }
11918         if( status ) return status;
11919 #endif
11920
11921         status = pthread_create( &t, &attr, task, NULL );
11922         if( status ) return status;
11923
11924 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11925         if( detach ) {
11926                 /* give thread a chance to complete */
11927                 /* it should remain joinable and hence detachable */
11928                 sleep( 1 );
11929
11930                 status = pthread_detach( t );
11931                 if( status ) return status;
11932         }
11933 #endif
11934
11935 #else
11936         /* Draft 4 pthreads */
11937         status = pthread_create( &t, pthread_attr_default, task, NULL );
11938         if( status ) return status;
11939
11940         if( detach ) {
11941                 /* give thread a chance to complete */
11942                 /* it should remain joinable and hence detachable */
11943                 sleep( 1 );
11944
11945                 status = pthread_detach( &t );
11946                 if( status ) return status;
11947         }
11948 #endif
11949
11950 #ifdef HAVE_LINUX_THREADS
11951         pthread_kill_other_threads_np();
11952 #endif
11953
11954         return 0;
11955
11956 ; return 0; }
11957 EOF
11958 if { (eval echo configure:11959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11959   rm -rf conftest*
11960   ol_cv_pthread_create=yes
11961 else
11962   echo "configure: failed program was:" >&5
11963   cat conftest.$ac_ext >&5
11964   rm -rf conftest*
11965   ol_cv_pthread_create=no
11966 fi
11967 rm -f conftest*
11968 else
11969   cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 /* pthread test headers */
11973 #include <pthread.h>
11974 #ifndef NULL
11975 #define NULL (void*)0
11976 #endif
11977
11978 static void *task(p)
11979         void *p;
11980 {
11981         return (void *) (p == NULL);
11982 }
11983
11984
11985 int main(argc, argv)
11986         int argc;
11987         char **argv;
11988 {
11989
11990         /* pthread test function */
11991         pthread_t t;
11992         int status;
11993         int detach = 1;
11994
11995 #ifdef HAVE_PTHREADS_FINAL
11996         /* Final pthreads */
11997         pthread_attr_t attr;
11998
11999         status = pthread_attr_init(&attr);
12000         if( status ) return status;
12001
12002 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12003         if( !detach ) {
12004 #if defined( PTHREAD_CREATE_JOINABLE )
12005                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12006 #else
12007                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12008 #endif
12009
12010 #ifdef PTHREAD_CREATE_DETACHED
12011         } else {
12012                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12013 #endif
12014         }
12015         if( status ) return status;
12016 #endif
12017
12018         status = pthread_create( &t, &attr, task, NULL );
12019         if( status ) return status;
12020
12021 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12022         if( detach ) {
12023                 /* give thread a chance to complete */
12024                 /* it should remain joinable and hence detachable */
12025                 sleep( 1 );
12026
12027                 status = pthread_detach( t );
12028                 if( status ) return status;
12029         }
12030 #endif
12031
12032 #else
12033         /* Draft 4 pthreads */
12034         status = pthread_create( &t, pthread_attr_default, task, NULL );
12035         if( status ) return status;
12036
12037         if( detach ) {
12038                 /* give thread a chance to complete */
12039                 /* it should remain joinable and hence detachable */
12040                 sleep( 1 );
12041
12042                 status = pthread_detach( &t );
12043                 if( status ) return status;
12044         }
12045 #endif
12046
12047 #ifdef HAVE_LINUX_THREADS
12048         pthread_kill_other_threads_np();
12049 #endif
12050
12051         return 0;
12052
12053 }
12054
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12057 then
12058   ol_cv_pthread_create=yes
12059 else
12060   echo "configure: failed program was:" >&5
12061   cat conftest.$ac_ext >&5
12062   rm -fr conftest*
12063   ol_cv_pthread_create=no
12064 fi
12065 rm -fr conftest*
12066 fi
12067
12068 fi
12069
12070 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12071
12072                 if test $ol_cv_pthread_create != no ; then
12073                         ol_link_threads=posix
12074                         ol_link_pthreads=""
12075                 fi
12076                 
12077                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12078 if test "$ol_link_threads" = no ; then
12079         # try -kthread
12080         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12081 echo "configure:12082: checking for pthread link with -kthread" >&5
12082 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12083   echo $ac_n "(cached) $ac_c" 1>&6
12084 else
12085   
12086                 # save the flags
12087                 ol_LIBS="$LIBS"
12088                 LIBS="-kthread $LIBS"
12089
12090                 if test "$cross_compiling" = yes; then
12091   cat > conftest.$ac_ext <<EOF
12092 #line 12093 "configure"
12093 #include "confdefs.h"
12094 /* pthread test headers */
12095 #include <pthread.h>
12096 #ifndef NULL
12097 #define NULL (void*)0
12098 #endif
12099
12100 static void *task(p)
12101         void *p;
12102 {
12103         return (void *) (p == NULL);
12104 }
12105
12106 int main() {
12107
12108         /* pthread test function */
12109         pthread_t t;
12110         int status;
12111         int detach = 1;
12112
12113 #ifdef HAVE_PTHREADS_FINAL
12114         /* Final pthreads */
12115         pthread_attr_t attr;
12116
12117         status = pthread_attr_init(&attr);
12118         if( status ) return status;
12119
12120 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12121         if( !detach ) {
12122 #if defined( PTHREAD_CREATE_JOINABLE )
12123                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12124 #else
12125                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12126 #endif
12127
12128 #ifdef PTHREAD_CREATE_DETACHED
12129         } else {
12130                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12131 #endif
12132         }
12133         if( status ) return status;
12134 #endif
12135
12136         status = pthread_create( &t, &attr, task, NULL );
12137         if( status ) return status;
12138
12139 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12140         if( detach ) {
12141                 /* give thread a chance to complete */
12142                 /* it should remain joinable and hence detachable */
12143                 sleep( 1 );
12144
12145                 status = pthread_detach( t );
12146                 if( status ) return status;
12147         }
12148 #endif
12149
12150 #else
12151         /* Draft 4 pthreads */
12152         status = pthread_create( &t, pthread_attr_default, task, NULL );
12153         if( status ) return status;
12154
12155         if( detach ) {
12156                 /* give thread a chance to complete */
12157                 /* it should remain joinable and hence detachable */
12158                 sleep( 1 );
12159
12160                 status = pthread_detach( &t );
12161                 if( status ) return status;
12162         }
12163 #endif
12164
12165 #ifdef HAVE_LINUX_THREADS
12166         pthread_kill_other_threads_np();
12167 #endif
12168
12169         return 0;
12170
12171 ; return 0; }
12172 EOF
12173 if { (eval echo configure:12174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12174   rm -rf conftest*
12175   ol_cv_pthread_kthread=yes
12176 else
12177   echo "configure: failed program was:" >&5
12178   cat conftest.$ac_ext >&5
12179   rm -rf conftest*
12180   ol_cv_pthread_kthread=no
12181 fi
12182 rm -f conftest*
12183 else
12184   cat > conftest.$ac_ext <<EOF
12185 #line 12186 "configure"
12186 #include "confdefs.h"
12187 /* pthread test headers */
12188 #include <pthread.h>
12189 #ifndef NULL
12190 #define NULL (void*)0
12191 #endif
12192
12193 static void *task(p)
12194         void *p;
12195 {
12196         return (void *) (p == NULL);
12197 }
12198
12199
12200 int main(argc, argv)
12201         int argc;
12202         char **argv;
12203 {
12204
12205         /* pthread test function */
12206         pthread_t t;
12207         int status;
12208         int detach = 1;
12209
12210 #ifdef HAVE_PTHREADS_FINAL
12211         /* Final pthreads */
12212         pthread_attr_t attr;
12213
12214         status = pthread_attr_init(&attr);
12215         if( status ) return status;
12216
12217 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12218         if( !detach ) {
12219 #if defined( PTHREAD_CREATE_JOINABLE )
12220                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12221 #else
12222                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12223 #endif
12224
12225 #ifdef PTHREAD_CREATE_DETACHED
12226         } else {
12227                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12228 #endif
12229         }
12230         if( status ) return status;
12231 #endif
12232
12233         status = pthread_create( &t, &attr, task, NULL );
12234         if( status ) return status;
12235
12236 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12237         if( detach ) {
12238                 /* give thread a chance to complete */
12239                 /* it should remain joinable and hence detachable */
12240                 sleep( 1 );
12241
12242                 status = pthread_detach( t );
12243                 if( status ) return status;
12244         }
12245 #endif
12246
12247 #else
12248         /* Draft 4 pthreads */
12249         status = pthread_create( &t, pthread_attr_default, task, NULL );
12250         if( status ) return status;
12251
12252         if( detach ) {
12253                 /* give thread a chance to complete */
12254                 /* it should remain joinable and hence detachable */
12255                 sleep( 1 );
12256
12257                 status = pthread_detach( &t );
12258                 if( status ) return status;
12259         }
12260 #endif
12261
12262 #ifdef HAVE_LINUX_THREADS
12263         pthread_kill_other_threads_np();
12264 #endif
12265
12266         return 0;
12267
12268 }
12269
12270 EOF
12271 if { (eval echo configure:12272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12272 then
12273   ol_cv_pthread_kthread=yes
12274 else
12275   echo "configure: failed program was:" >&5
12276   cat conftest.$ac_ext >&5
12277   rm -fr conftest*
12278   ol_cv_pthread_kthread=no
12279 fi
12280 rm -fr conftest*
12281 fi
12282
12283
12284                 # restore the LIBS
12285                 LIBS="$ol_LIBS"
12286         
12287 fi
12288
12289 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12290
12291         if test $ol_cv_pthread_kthread = yes ; then
12292                 ol_link_pthreads="-kthread"
12293                 ol_link_threads=posix
12294         fi
12295 fi
12296
12297                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12298 if test "$ol_link_threads" = no ; then
12299         # try -pthread
12300         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12301 echo "configure:12302: checking for pthread link with -pthread" >&5
12302 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12303   echo $ac_n "(cached) $ac_c" 1>&6
12304 else
12305   
12306                 # save the flags
12307                 ol_LIBS="$LIBS"
12308                 LIBS="-pthread $LIBS"
12309
12310                 if test "$cross_compiling" = yes; then
12311   cat > conftest.$ac_ext <<EOF
12312 #line 12313 "configure"
12313 #include "confdefs.h"
12314 /* pthread test headers */
12315 #include <pthread.h>
12316 #ifndef NULL
12317 #define NULL (void*)0
12318 #endif
12319
12320 static void *task(p)
12321         void *p;
12322 {
12323         return (void *) (p == NULL);
12324 }
12325
12326 int main() {
12327
12328         /* pthread test function */
12329         pthread_t t;
12330         int status;
12331         int detach = 1;
12332
12333 #ifdef HAVE_PTHREADS_FINAL
12334         /* Final pthreads */
12335         pthread_attr_t attr;
12336
12337         status = pthread_attr_init(&attr);
12338         if( status ) return status;
12339
12340 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12341         if( !detach ) {
12342 #if defined( PTHREAD_CREATE_JOINABLE )
12343                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12344 #else
12345                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12346 #endif
12347
12348 #ifdef PTHREAD_CREATE_DETACHED
12349         } else {
12350                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12351 #endif
12352         }
12353         if( status ) return status;
12354 #endif
12355
12356         status = pthread_create( &t, &attr, task, NULL );
12357         if( status ) return status;
12358
12359 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12360         if( detach ) {
12361                 /* give thread a chance to complete */
12362                 /* it should remain joinable and hence detachable */
12363                 sleep( 1 );
12364
12365                 status = pthread_detach( t );
12366                 if( status ) return status;
12367         }
12368 #endif
12369
12370 #else
12371         /* Draft 4 pthreads */
12372         status = pthread_create( &t, pthread_attr_default, task, NULL );
12373         if( status ) return status;
12374
12375         if( detach ) {
12376                 /* give thread a chance to complete */
12377                 /* it should remain joinable and hence detachable */
12378                 sleep( 1 );
12379
12380                 status = pthread_detach( &t );
12381                 if( status ) return status;
12382         }
12383 #endif
12384
12385 #ifdef HAVE_LINUX_THREADS
12386         pthread_kill_other_threads_np();
12387 #endif
12388
12389         return 0;
12390
12391 ; return 0; }
12392 EOF
12393 if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12394   rm -rf conftest*
12395   ol_cv_pthread_pthread=yes
12396 else
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   ol_cv_pthread_pthread=no
12401 fi
12402 rm -f conftest*
12403 else
12404   cat > conftest.$ac_ext <<EOF
12405 #line 12406 "configure"
12406 #include "confdefs.h"
12407 /* pthread test headers */
12408 #include <pthread.h>
12409 #ifndef NULL
12410 #define NULL (void*)0
12411 #endif
12412
12413 static void *task(p)
12414         void *p;
12415 {
12416         return (void *) (p == NULL);
12417 }
12418
12419
12420 int main(argc, argv)
12421         int argc;
12422         char **argv;
12423 {
12424
12425         /* pthread test function */
12426         pthread_t t;
12427         int status;
12428         int detach = 1;
12429
12430 #ifdef HAVE_PTHREADS_FINAL
12431         /* Final pthreads */
12432         pthread_attr_t attr;
12433
12434         status = pthread_attr_init(&attr);
12435         if( status ) return status;
12436
12437 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12438         if( !detach ) {
12439 #if defined( PTHREAD_CREATE_JOINABLE )
12440                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12441 #else
12442                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12443 #endif
12444
12445 #ifdef PTHREAD_CREATE_DETACHED
12446         } else {
12447                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12448 #endif
12449         }
12450         if( status ) return status;
12451 #endif
12452
12453         status = pthread_create( &t, &attr, task, NULL );
12454         if( status ) return status;
12455
12456 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12457         if( detach ) {
12458                 /* give thread a chance to complete */
12459                 /* it should remain joinable and hence detachable */
12460                 sleep( 1 );
12461
12462                 status = pthread_detach( t );
12463                 if( status ) return status;
12464         }
12465 #endif
12466
12467 #else
12468         /* Draft 4 pthreads */
12469         status = pthread_create( &t, pthread_attr_default, task, NULL );
12470         if( status ) return status;
12471
12472         if( detach ) {
12473                 /* give thread a chance to complete */
12474                 /* it should remain joinable and hence detachable */
12475                 sleep( 1 );
12476
12477                 status = pthread_detach( &t );
12478                 if( status ) return status;
12479         }
12480 #endif
12481
12482 #ifdef HAVE_LINUX_THREADS
12483         pthread_kill_other_threads_np();
12484 #endif
12485
12486         return 0;
12487
12488 }
12489
12490 EOF
12491 if { (eval echo configure:12492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12492 then
12493   ol_cv_pthread_pthread=yes
12494 else
12495   echo "configure: failed program was:" >&5
12496   cat conftest.$ac_ext >&5
12497   rm -fr conftest*
12498   ol_cv_pthread_pthread=no
12499 fi
12500 rm -fr conftest*
12501 fi
12502
12503
12504                 # restore the LIBS
12505                 LIBS="$ol_LIBS"
12506         
12507 fi
12508
12509 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12510
12511         if test $ol_cv_pthread_pthread = yes ; then
12512                 ol_link_pthreads="-pthread"
12513                 ol_link_threads=posix
12514         fi
12515 fi
12516
12517                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12518 if test "$ol_link_threads" = no ; then
12519         # try -pthreads
12520         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12521 echo "configure:12522: checking for pthread link with -pthreads" >&5
12522 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12523   echo $ac_n "(cached) $ac_c" 1>&6
12524 else
12525   
12526                 # save the flags
12527                 ol_LIBS="$LIBS"
12528                 LIBS="-pthreads $LIBS"
12529
12530                 if test "$cross_compiling" = yes; then
12531   cat > conftest.$ac_ext <<EOF
12532 #line 12533 "configure"
12533 #include "confdefs.h"
12534 /* pthread test headers */
12535 #include <pthread.h>
12536 #ifndef NULL
12537 #define NULL (void*)0
12538 #endif
12539
12540 static void *task(p)
12541         void *p;
12542 {
12543         return (void *) (p == NULL);
12544 }
12545
12546 int main() {
12547
12548         /* pthread test function */
12549         pthread_t t;
12550         int status;
12551         int detach = 1;
12552
12553 #ifdef HAVE_PTHREADS_FINAL
12554         /* Final pthreads */
12555         pthread_attr_t attr;
12556
12557         status = pthread_attr_init(&attr);
12558         if( status ) return status;
12559
12560 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12561         if( !detach ) {
12562 #if defined( PTHREAD_CREATE_JOINABLE )
12563                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12564 #else
12565                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12566 #endif
12567
12568 #ifdef PTHREAD_CREATE_DETACHED
12569         } else {
12570                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12571 #endif
12572         }
12573         if( status ) return status;
12574 #endif
12575
12576         status = pthread_create( &t, &attr, task, NULL );
12577         if( status ) return status;
12578
12579 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12580         if( detach ) {
12581                 /* give thread a chance to complete */
12582                 /* it should remain joinable and hence detachable */
12583                 sleep( 1 );
12584
12585                 status = pthread_detach( t );
12586                 if( status ) return status;
12587         }
12588 #endif
12589
12590 #else
12591         /* Draft 4 pthreads */
12592         status = pthread_create( &t, pthread_attr_default, task, NULL );
12593         if( status ) return status;
12594
12595         if( detach ) {
12596                 /* give thread a chance to complete */
12597                 /* it should remain joinable and hence detachable */
12598                 sleep( 1 );
12599
12600                 status = pthread_detach( &t );
12601                 if( status ) return status;
12602         }
12603 #endif
12604
12605 #ifdef HAVE_LINUX_THREADS
12606         pthread_kill_other_threads_np();
12607 #endif
12608
12609         return 0;
12610
12611 ; return 0; }
12612 EOF
12613 if { (eval echo configure:12614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12614   rm -rf conftest*
12615   ol_cv_pthread_pthreads=yes
12616 else
12617   echo "configure: failed program was:" >&5
12618   cat conftest.$ac_ext >&5
12619   rm -rf conftest*
12620   ol_cv_pthread_pthreads=no
12621 fi
12622 rm -f conftest*
12623 else
12624   cat > conftest.$ac_ext <<EOF
12625 #line 12626 "configure"
12626 #include "confdefs.h"
12627 /* pthread test headers */
12628 #include <pthread.h>
12629 #ifndef NULL
12630 #define NULL (void*)0
12631 #endif
12632
12633 static void *task(p)
12634         void *p;
12635 {
12636         return (void *) (p == NULL);
12637 }
12638
12639
12640 int main(argc, argv)
12641         int argc;
12642         char **argv;
12643 {
12644
12645         /* pthread test function */
12646         pthread_t t;
12647         int status;
12648         int detach = 1;
12649
12650 #ifdef HAVE_PTHREADS_FINAL
12651         /* Final pthreads */
12652         pthread_attr_t attr;
12653
12654         status = pthread_attr_init(&attr);
12655         if( status ) return status;
12656
12657 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12658         if( !detach ) {
12659 #if defined( PTHREAD_CREATE_JOINABLE )
12660                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12661 #else
12662                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12663 #endif
12664
12665 #ifdef PTHREAD_CREATE_DETACHED
12666         } else {
12667                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12668 #endif
12669         }
12670         if( status ) return status;
12671 #endif
12672
12673         status = pthread_create( &t, &attr, task, NULL );
12674         if( status ) return status;
12675
12676 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12677         if( detach ) {
12678                 /* give thread a chance to complete */
12679                 /* it should remain joinable and hence detachable */
12680                 sleep( 1 );
12681
12682                 status = pthread_detach( t );
12683                 if( status ) return status;
12684         }
12685 #endif
12686
12687 #else
12688         /* Draft 4 pthreads */
12689         status = pthread_create( &t, pthread_attr_default, task, NULL );
12690         if( status ) return status;
12691
12692         if( detach ) {
12693                 /* give thread a chance to complete */
12694                 /* it should remain joinable and hence detachable */
12695                 sleep( 1 );
12696
12697                 status = pthread_detach( &t );
12698                 if( status ) return status;
12699         }
12700 #endif
12701
12702 #ifdef HAVE_LINUX_THREADS
12703         pthread_kill_other_threads_np();
12704 #endif
12705
12706         return 0;
12707
12708 }
12709
12710 EOF
12711 if { (eval echo configure:12712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12712 then
12713   ol_cv_pthread_pthreads=yes
12714 else
12715   echo "configure: failed program was:" >&5
12716   cat conftest.$ac_ext >&5
12717   rm -fr conftest*
12718   ol_cv_pthread_pthreads=no
12719 fi
12720 rm -fr conftest*
12721 fi
12722
12723
12724                 # restore the LIBS
12725                 LIBS="$ol_LIBS"
12726         
12727 fi
12728
12729 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12730
12731         if test $ol_cv_pthread_pthreads = yes ; then
12732                 ol_link_pthreads="-pthreads"
12733                 ol_link_threads=posix
12734         fi
12735 fi
12736
12737                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12738 if test "$ol_link_threads" = no ; then
12739         # try -mthreads
12740         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12741 echo "configure:12742: checking for pthread link with -mthreads" >&5
12742 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12743   echo $ac_n "(cached) $ac_c" 1>&6
12744 else
12745   
12746                 # save the flags
12747                 ol_LIBS="$LIBS"
12748                 LIBS="-mthreads $LIBS"
12749
12750                 if test "$cross_compiling" = yes; then
12751   cat > conftest.$ac_ext <<EOF
12752 #line 12753 "configure"
12753 #include "confdefs.h"
12754 /* pthread test headers */
12755 #include <pthread.h>
12756 #ifndef NULL
12757 #define NULL (void*)0
12758 #endif
12759
12760 static void *task(p)
12761         void *p;
12762 {
12763         return (void *) (p == NULL);
12764 }
12765
12766 int main() {
12767
12768         /* pthread test function */
12769         pthread_t t;
12770         int status;
12771         int detach = 1;
12772
12773 #ifdef HAVE_PTHREADS_FINAL
12774         /* Final pthreads */
12775         pthread_attr_t attr;
12776
12777         status = pthread_attr_init(&attr);
12778         if( status ) return status;
12779
12780 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12781         if( !detach ) {
12782 #if defined( PTHREAD_CREATE_JOINABLE )
12783                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12784 #else
12785                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12786 #endif
12787
12788 #ifdef PTHREAD_CREATE_DETACHED
12789         } else {
12790                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12791 #endif
12792         }
12793         if( status ) return status;
12794 #endif
12795
12796         status = pthread_create( &t, &attr, task, NULL );
12797         if( status ) return status;
12798
12799 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12800         if( detach ) {
12801                 /* give thread a chance to complete */
12802                 /* it should remain joinable and hence detachable */
12803                 sleep( 1 );
12804
12805                 status = pthread_detach( t );
12806                 if( status ) return status;
12807         }
12808 #endif
12809
12810 #else
12811         /* Draft 4 pthreads */
12812         status = pthread_create( &t, pthread_attr_default, task, NULL );
12813         if( status ) return status;
12814
12815         if( detach ) {
12816                 /* give thread a chance to complete */
12817                 /* it should remain joinable and hence detachable */
12818                 sleep( 1 );
12819
12820                 status = pthread_detach( &t );
12821                 if( status ) return status;
12822         }
12823 #endif
12824
12825 #ifdef HAVE_LINUX_THREADS
12826         pthread_kill_other_threads_np();
12827 #endif
12828
12829         return 0;
12830
12831 ; return 0; }
12832 EOF
12833 if { (eval echo configure:12834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12834   rm -rf conftest*
12835   ol_cv_pthread_mthreads=yes
12836 else
12837   echo "configure: failed program was:" >&5
12838   cat conftest.$ac_ext >&5
12839   rm -rf conftest*
12840   ol_cv_pthread_mthreads=no
12841 fi
12842 rm -f conftest*
12843 else
12844   cat > conftest.$ac_ext <<EOF
12845 #line 12846 "configure"
12846 #include "confdefs.h"
12847 /* pthread test headers */
12848 #include <pthread.h>
12849 #ifndef NULL
12850 #define NULL (void*)0
12851 #endif
12852
12853 static void *task(p)
12854         void *p;
12855 {
12856         return (void *) (p == NULL);
12857 }
12858
12859
12860 int main(argc, argv)
12861         int argc;
12862         char **argv;
12863 {
12864
12865         /* pthread test function */
12866         pthread_t t;
12867         int status;
12868         int detach = 1;
12869
12870 #ifdef HAVE_PTHREADS_FINAL
12871         /* Final pthreads */
12872         pthread_attr_t attr;
12873
12874         status = pthread_attr_init(&attr);
12875         if( status ) return status;
12876
12877 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12878         if( !detach ) {
12879 #if defined( PTHREAD_CREATE_JOINABLE )
12880                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12881 #else
12882                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12883 #endif
12884
12885 #ifdef PTHREAD_CREATE_DETACHED
12886         } else {
12887                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12888 #endif
12889         }
12890         if( status ) return status;
12891 #endif
12892
12893         status = pthread_create( &t, &attr, task, NULL );
12894         if( status ) return status;
12895
12896 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12897         if( detach ) {
12898                 /* give thread a chance to complete */
12899                 /* it should remain joinable and hence detachable */
12900                 sleep( 1 );
12901
12902                 status = pthread_detach( t );
12903                 if( status ) return status;
12904         }
12905 #endif
12906
12907 #else
12908         /* Draft 4 pthreads */
12909         status = pthread_create( &t, pthread_attr_default, task, NULL );
12910         if( status ) return status;
12911
12912         if( detach ) {
12913                 /* give thread a chance to complete */
12914                 /* it should remain joinable and hence detachable */
12915                 sleep( 1 );
12916
12917                 status = pthread_detach( &t );
12918                 if( status ) return status;
12919         }
12920 #endif
12921
12922 #ifdef HAVE_LINUX_THREADS
12923         pthread_kill_other_threads_np();
12924 #endif
12925
12926         return 0;
12927
12928 }
12929
12930 EOF
12931 if { (eval echo configure:12932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12932 then
12933   ol_cv_pthread_mthreads=yes
12934 else
12935   echo "configure: failed program was:" >&5
12936   cat conftest.$ac_ext >&5
12937   rm -fr conftest*
12938   ol_cv_pthread_mthreads=no
12939 fi
12940 rm -fr conftest*
12941 fi
12942
12943
12944                 # restore the LIBS
12945                 LIBS="$ol_LIBS"
12946         
12947 fi
12948
12949 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12950
12951         if test $ol_cv_pthread_mthreads = yes ; then
12952                 ol_link_pthreads="-mthreads"
12953                 ol_link_threads=posix
12954         fi
12955 fi
12956
12957                 # Pthread try link: -thread (ol_cv_pthread_thread)
12958 if test "$ol_link_threads" = no ; then
12959         # try -thread
12960         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12961 echo "configure:12962: checking for pthread link with -thread" >&5
12962 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12963   echo $ac_n "(cached) $ac_c" 1>&6
12964 else
12965   
12966                 # save the flags
12967                 ol_LIBS="$LIBS"
12968                 LIBS="-thread $LIBS"
12969
12970                 if test "$cross_compiling" = yes; then
12971   cat > conftest.$ac_ext <<EOF
12972 #line 12973 "configure"
12973 #include "confdefs.h"
12974 /* pthread test headers */
12975 #include <pthread.h>
12976 #ifndef NULL
12977 #define NULL (void*)0
12978 #endif
12979
12980 static void *task(p)
12981         void *p;
12982 {
12983         return (void *) (p == NULL);
12984 }
12985
12986 int main() {
12987
12988         /* pthread test function */
12989         pthread_t t;
12990         int status;
12991         int detach = 1;
12992
12993 #ifdef HAVE_PTHREADS_FINAL
12994         /* Final pthreads */
12995         pthread_attr_t attr;
12996
12997         status = pthread_attr_init(&attr);
12998         if( status ) return status;
12999
13000 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13001         if( !detach ) {
13002 #if defined( PTHREAD_CREATE_JOINABLE )
13003                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13004 #else
13005                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13006 #endif
13007
13008 #ifdef PTHREAD_CREATE_DETACHED
13009         } else {
13010                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13011 #endif
13012         }
13013         if( status ) return status;
13014 #endif
13015
13016         status = pthread_create( &t, &attr, task, NULL );
13017         if( status ) return status;
13018
13019 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13020         if( detach ) {
13021                 /* give thread a chance to complete */
13022                 /* it should remain joinable and hence detachable */
13023                 sleep( 1 );
13024
13025                 status = pthread_detach( t );
13026                 if( status ) return status;
13027         }
13028 #endif
13029
13030 #else
13031         /* Draft 4 pthreads */
13032         status = pthread_create( &t, pthread_attr_default, task, NULL );
13033         if( status ) return status;
13034
13035         if( detach ) {
13036                 /* give thread a chance to complete */
13037                 /* it should remain joinable and hence detachable */
13038                 sleep( 1 );
13039
13040                 status = pthread_detach( &t );
13041                 if( status ) return status;
13042         }
13043 #endif
13044
13045 #ifdef HAVE_LINUX_THREADS
13046         pthread_kill_other_threads_np();
13047 #endif
13048
13049         return 0;
13050
13051 ; return 0; }
13052 EOF
13053 if { (eval echo configure:13054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13054   rm -rf conftest*
13055   ol_cv_pthread_thread=yes
13056 else
13057   echo "configure: failed program was:" >&5
13058   cat conftest.$ac_ext >&5
13059   rm -rf conftest*
13060   ol_cv_pthread_thread=no
13061 fi
13062 rm -f conftest*
13063 else
13064   cat > conftest.$ac_ext <<EOF
13065 #line 13066 "configure"
13066 #include "confdefs.h"
13067 /* pthread test headers */
13068 #include <pthread.h>
13069 #ifndef NULL
13070 #define NULL (void*)0
13071 #endif
13072
13073 static void *task(p)
13074         void *p;
13075 {
13076         return (void *) (p == NULL);
13077 }
13078
13079
13080 int main(argc, argv)
13081         int argc;
13082         char **argv;
13083 {
13084
13085         /* pthread test function */
13086         pthread_t t;
13087         int status;
13088         int detach = 1;
13089
13090 #ifdef HAVE_PTHREADS_FINAL
13091         /* Final pthreads */
13092         pthread_attr_t attr;
13093
13094         status = pthread_attr_init(&attr);
13095         if( status ) return status;
13096
13097 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13098         if( !detach ) {
13099 #if defined( PTHREAD_CREATE_JOINABLE )
13100                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13101 #else
13102                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13103 #endif
13104
13105 #ifdef PTHREAD_CREATE_DETACHED
13106         } else {
13107                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13108 #endif
13109         }
13110         if( status ) return status;
13111 #endif
13112
13113         status = pthread_create( &t, &attr, task, NULL );
13114         if( status ) return status;
13115
13116 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13117         if( detach ) {
13118                 /* give thread a chance to complete */
13119                 /* it should remain joinable and hence detachable */
13120                 sleep( 1 );
13121
13122                 status = pthread_detach( t );
13123                 if( status ) return status;
13124         }
13125 #endif
13126
13127 #else
13128         /* Draft 4 pthreads */
13129         status = pthread_create( &t, pthread_attr_default, task, NULL );
13130         if( status ) return status;
13131
13132         if( detach ) {
13133                 /* give thread a chance to complete */
13134                 /* it should remain joinable and hence detachable */
13135                 sleep( 1 );
13136
13137                 status = pthread_detach( &t );
13138                 if( status ) return status;
13139         }
13140 #endif
13141
13142 #ifdef HAVE_LINUX_THREADS
13143         pthread_kill_other_threads_np();
13144 #endif
13145
13146         return 0;
13147
13148 }
13149
13150 EOF
13151 if { (eval echo configure:13152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13152 then
13153   ol_cv_pthread_thread=yes
13154 else
13155   echo "configure: failed program was:" >&5
13156   cat conftest.$ac_ext >&5
13157   rm -fr conftest*
13158   ol_cv_pthread_thread=no
13159 fi
13160 rm -fr conftest*
13161 fi
13162
13163
13164                 # restore the LIBS
13165                 LIBS="$ol_LIBS"
13166         
13167 fi
13168
13169 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13170
13171         if test $ol_cv_pthread_thread = yes ; then
13172                 ol_link_pthreads="-thread"
13173                 ol_link_threads=posix
13174         fi
13175 fi
13176
13177
13178                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13179 if test "$ol_link_threads" = no ; then
13180         # try -lpthread -lmach -lexc -lc_r
13181         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13182 echo "configure:13183: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13183 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13184   echo $ac_n "(cached) $ac_c" 1>&6
13185 else
13186   
13187                 # save the flags
13188                 ol_LIBS="$LIBS"
13189                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13190
13191                 if test "$cross_compiling" = yes; then
13192   cat > conftest.$ac_ext <<EOF
13193 #line 13194 "configure"
13194 #include "confdefs.h"
13195 /* pthread test headers */
13196 #include <pthread.h>
13197 #ifndef NULL
13198 #define NULL (void*)0
13199 #endif
13200
13201 static void *task(p)
13202         void *p;
13203 {
13204         return (void *) (p == NULL);
13205 }
13206
13207 int main() {
13208
13209         /* pthread test function */
13210         pthread_t t;
13211         int status;
13212         int detach = 1;
13213
13214 #ifdef HAVE_PTHREADS_FINAL
13215         /* Final pthreads */
13216         pthread_attr_t attr;
13217
13218         status = pthread_attr_init(&attr);
13219         if( status ) return status;
13220
13221 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13222         if( !detach ) {
13223 #if defined( PTHREAD_CREATE_JOINABLE )
13224                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13225 #else
13226                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13227 #endif
13228
13229 #ifdef PTHREAD_CREATE_DETACHED
13230         } else {
13231                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13232 #endif
13233         }
13234         if( status ) return status;
13235 #endif
13236
13237         status = pthread_create( &t, &attr, task, NULL );
13238         if( status ) return status;
13239
13240 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13241         if( detach ) {
13242                 /* give thread a chance to complete */
13243                 /* it should remain joinable and hence detachable */
13244                 sleep( 1 );
13245
13246                 status = pthread_detach( t );
13247                 if( status ) return status;
13248         }
13249 #endif
13250
13251 #else
13252         /* Draft 4 pthreads */
13253         status = pthread_create( &t, pthread_attr_default, task, NULL );
13254         if( status ) return status;
13255
13256         if( detach ) {
13257                 /* give thread a chance to complete */
13258                 /* it should remain joinable and hence detachable */
13259                 sleep( 1 );
13260
13261                 status = pthread_detach( &t );
13262                 if( status ) return status;
13263         }
13264 #endif
13265
13266 #ifdef HAVE_LINUX_THREADS
13267         pthread_kill_other_threads_np();
13268 #endif
13269
13270         return 0;
13271
13272 ; return 0; }
13273 EOF
13274 if { (eval echo configure:13275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13275   rm -rf conftest*
13276   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13277 else
13278   echo "configure: failed program was:" >&5
13279   cat conftest.$ac_ext >&5
13280   rm -rf conftest*
13281   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13282 fi
13283 rm -f conftest*
13284 else
13285   cat > conftest.$ac_ext <<EOF
13286 #line 13287 "configure"
13287 #include "confdefs.h"
13288 /* pthread test headers */
13289 #include <pthread.h>
13290 #ifndef NULL
13291 #define NULL (void*)0
13292 #endif
13293
13294 static void *task(p)
13295         void *p;
13296 {
13297         return (void *) (p == NULL);
13298 }
13299
13300
13301 int main(argc, argv)
13302         int argc;
13303         char **argv;
13304 {
13305
13306         /* pthread test function */
13307         pthread_t t;
13308         int status;
13309         int detach = 1;
13310
13311 #ifdef HAVE_PTHREADS_FINAL
13312         /* Final pthreads */
13313         pthread_attr_t attr;
13314
13315         status = pthread_attr_init(&attr);
13316         if( status ) return status;
13317
13318 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13319         if( !detach ) {
13320 #if defined( PTHREAD_CREATE_JOINABLE )
13321                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13322 #else
13323                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13324 #endif
13325
13326 #ifdef PTHREAD_CREATE_DETACHED
13327         } else {
13328                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13329 #endif
13330         }
13331         if( status ) return status;
13332 #endif
13333
13334         status = pthread_create( &t, &attr, task, NULL );
13335         if( status ) return status;
13336
13337 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13338         if( detach ) {
13339                 /* give thread a chance to complete */
13340                 /* it should remain joinable and hence detachable */
13341                 sleep( 1 );
13342
13343                 status = pthread_detach( t );
13344                 if( status ) return status;
13345         }
13346 #endif
13347
13348 #else
13349         /* Draft 4 pthreads */
13350         status = pthread_create( &t, pthread_attr_default, task, NULL );
13351         if( status ) return status;
13352
13353         if( detach ) {
13354                 /* give thread a chance to complete */
13355                 /* it should remain joinable and hence detachable */
13356                 sleep( 1 );
13357
13358                 status = pthread_detach( &t );
13359                 if( status ) return status;
13360         }
13361 #endif
13362
13363 #ifdef HAVE_LINUX_THREADS
13364         pthread_kill_other_threads_np();
13365 #endif
13366
13367         return 0;
13368
13369 }
13370
13371 EOF
13372 if { (eval echo configure:13373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13373 then
13374   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13375 else
13376   echo "configure: failed program was:" >&5
13377   cat conftest.$ac_ext >&5
13378   rm -fr conftest*
13379   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13380 fi
13381 rm -fr conftest*
13382 fi
13383
13384
13385                 # restore the LIBS
13386                 LIBS="$ol_LIBS"
13387         
13388 fi
13389
13390 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13391
13392         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13393                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13394                 ol_link_threads=posix
13395         fi
13396 fi
13397
13398                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13399 if test "$ol_link_threads" = no ; then
13400         # try -lpthread -lmach -lexc
13401         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13402 echo "configure:13403: checking for pthread link with -lpthread -lmach -lexc" >&5
13403 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13404   echo $ac_n "(cached) $ac_c" 1>&6
13405 else
13406   
13407                 # save the flags
13408                 ol_LIBS="$LIBS"
13409                 LIBS="-lpthread -lmach -lexc $LIBS"
13410
13411                 if test "$cross_compiling" = yes; then
13412   cat > conftest.$ac_ext <<EOF
13413 #line 13414 "configure"
13414 #include "confdefs.h"
13415 /* pthread test headers */
13416 #include <pthread.h>
13417 #ifndef NULL
13418 #define NULL (void*)0
13419 #endif
13420
13421 static void *task(p)
13422         void *p;
13423 {
13424         return (void *) (p == NULL);
13425 }
13426
13427 int main() {
13428
13429         /* pthread test function */
13430         pthread_t t;
13431         int status;
13432         int detach = 1;
13433
13434 #ifdef HAVE_PTHREADS_FINAL
13435         /* Final pthreads */
13436         pthread_attr_t attr;
13437
13438         status = pthread_attr_init(&attr);
13439         if( status ) return status;
13440
13441 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13442         if( !detach ) {
13443 #if defined( PTHREAD_CREATE_JOINABLE )
13444                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13445 #else
13446                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13447 #endif
13448
13449 #ifdef PTHREAD_CREATE_DETACHED
13450         } else {
13451                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13452 #endif
13453         }
13454         if( status ) return status;
13455 #endif
13456
13457         status = pthread_create( &t, &attr, task, NULL );
13458         if( status ) return status;
13459
13460 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13461         if( detach ) {
13462                 /* give thread a chance to complete */
13463                 /* it should remain joinable and hence detachable */
13464                 sleep( 1 );
13465
13466                 status = pthread_detach( t );
13467                 if( status ) return status;
13468         }
13469 #endif
13470
13471 #else
13472         /* Draft 4 pthreads */
13473         status = pthread_create( &t, pthread_attr_default, task, NULL );
13474         if( status ) return status;
13475
13476         if( detach ) {
13477                 /* give thread a chance to complete */
13478                 /* it should remain joinable and hence detachable */
13479                 sleep( 1 );
13480
13481                 status = pthread_detach( &t );
13482                 if( status ) return status;
13483         }
13484 #endif
13485
13486 #ifdef HAVE_LINUX_THREADS
13487         pthread_kill_other_threads_np();
13488 #endif
13489
13490         return 0;
13491
13492 ; return 0; }
13493 EOF
13494 if { (eval echo configure:13495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13495   rm -rf conftest*
13496   ol_cv_pthread_lpthread_lmach_lexc=yes
13497 else
13498   echo "configure: failed program was:" >&5
13499   cat conftest.$ac_ext >&5
13500   rm -rf conftest*
13501   ol_cv_pthread_lpthread_lmach_lexc=no
13502 fi
13503 rm -f conftest*
13504 else
13505   cat > conftest.$ac_ext <<EOF
13506 #line 13507 "configure"
13507 #include "confdefs.h"
13508 /* pthread test headers */
13509 #include <pthread.h>
13510 #ifndef NULL
13511 #define NULL (void*)0
13512 #endif
13513
13514 static void *task(p)
13515         void *p;
13516 {
13517         return (void *) (p == NULL);
13518 }
13519
13520
13521 int main(argc, argv)
13522         int argc;
13523         char **argv;
13524 {
13525
13526         /* pthread test function */
13527         pthread_t t;
13528         int status;
13529         int detach = 1;
13530
13531 #ifdef HAVE_PTHREADS_FINAL
13532         /* Final pthreads */
13533         pthread_attr_t attr;
13534
13535         status = pthread_attr_init(&attr);
13536         if( status ) return status;
13537
13538 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13539         if( !detach ) {
13540 #if defined( PTHREAD_CREATE_JOINABLE )
13541                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13542 #else
13543                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13544 #endif
13545
13546 #ifdef PTHREAD_CREATE_DETACHED
13547         } else {
13548                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13549 #endif
13550         }
13551         if( status ) return status;
13552 #endif
13553
13554         status = pthread_create( &t, &attr, task, NULL );
13555         if( status ) return status;
13556
13557 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13558         if( detach ) {
13559                 /* give thread a chance to complete */
13560                 /* it should remain joinable and hence detachable */
13561                 sleep( 1 );
13562
13563                 status = pthread_detach( t );
13564                 if( status ) return status;
13565         }
13566 #endif
13567
13568 #else
13569         /* Draft 4 pthreads */
13570         status = pthread_create( &t, pthread_attr_default, task, NULL );
13571         if( status ) return status;
13572
13573         if( detach ) {
13574                 /* give thread a chance to complete */
13575                 /* it should remain joinable and hence detachable */
13576                 sleep( 1 );
13577
13578                 status = pthread_detach( &t );
13579                 if( status ) return status;
13580         }
13581 #endif
13582
13583 #ifdef HAVE_LINUX_THREADS
13584         pthread_kill_other_threads_np();
13585 #endif
13586
13587         return 0;
13588
13589 }
13590
13591 EOF
13592 if { (eval echo configure:13593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13593 then
13594   ol_cv_pthread_lpthread_lmach_lexc=yes
13595 else
13596   echo "configure: failed program was:" >&5
13597   cat conftest.$ac_ext >&5
13598   rm -fr conftest*
13599   ol_cv_pthread_lpthread_lmach_lexc=no
13600 fi
13601 rm -fr conftest*
13602 fi
13603
13604
13605                 # restore the LIBS
13606                 LIBS="$ol_LIBS"
13607         
13608 fi
13609
13610 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13611
13612         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13613                 ol_link_pthreads="-lpthread -lmach -lexc"
13614                 ol_link_threads=posix
13615         fi
13616 fi
13617
13618
13619                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13620 if test "$ol_link_threads" = no ; then
13621         # try -lpthread -Wl,-woff,85
13622         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13623 echo "configure:13624: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13624 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13625   echo $ac_n "(cached) $ac_c" 1>&6
13626 else
13627   
13628                 # save the flags
13629                 ol_LIBS="$LIBS"
13630                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13631
13632                 if test "$cross_compiling" = yes; then
13633   cat > conftest.$ac_ext <<EOF
13634 #line 13635 "configure"
13635 #include "confdefs.h"
13636 /* pthread test headers */
13637 #include <pthread.h>
13638 #ifndef NULL
13639 #define NULL (void*)0
13640 #endif
13641
13642 static void *task(p)
13643         void *p;
13644 {
13645         return (void *) (p == NULL);
13646 }
13647
13648 int main() {
13649
13650         /* pthread test function */
13651         pthread_t t;
13652         int status;
13653         int detach = 1;
13654
13655 #ifdef HAVE_PTHREADS_FINAL
13656         /* Final pthreads */
13657         pthread_attr_t attr;
13658
13659         status = pthread_attr_init(&attr);
13660         if( status ) return status;
13661
13662 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13663         if( !detach ) {
13664 #if defined( PTHREAD_CREATE_JOINABLE )
13665                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13666 #else
13667                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13668 #endif
13669
13670 #ifdef PTHREAD_CREATE_DETACHED
13671         } else {
13672                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13673 #endif
13674         }
13675         if( status ) return status;
13676 #endif
13677
13678         status = pthread_create( &t, &attr, task, NULL );
13679         if( status ) return status;
13680
13681 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13682         if( detach ) {
13683                 /* give thread a chance to complete */
13684                 /* it should remain joinable and hence detachable */
13685                 sleep( 1 );
13686
13687                 status = pthread_detach( t );
13688                 if( status ) return status;
13689         }
13690 #endif
13691
13692 #else
13693         /* Draft 4 pthreads */
13694         status = pthread_create( &t, pthread_attr_default, task, NULL );
13695         if( status ) return status;
13696
13697         if( detach ) {
13698                 /* give thread a chance to complete */
13699                 /* it should remain joinable and hence detachable */
13700                 sleep( 1 );
13701
13702                 status = pthread_detach( &t );
13703                 if( status ) return status;
13704         }
13705 #endif
13706
13707 #ifdef HAVE_LINUX_THREADS
13708         pthread_kill_other_threads_np();
13709 #endif
13710
13711         return 0;
13712
13713 ; return 0; }
13714 EOF
13715 if { (eval echo configure:13716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13716   rm -rf conftest*
13717   ol_cv_pthread_lib_lpthread_woff=yes
13718 else
13719   echo "configure: failed program was:" >&5
13720   cat conftest.$ac_ext >&5
13721   rm -rf conftest*
13722   ol_cv_pthread_lib_lpthread_woff=no
13723 fi
13724 rm -f conftest*
13725 else
13726   cat > conftest.$ac_ext <<EOF
13727 #line 13728 "configure"
13728 #include "confdefs.h"
13729 /* pthread test headers */
13730 #include <pthread.h>
13731 #ifndef NULL
13732 #define NULL (void*)0
13733 #endif
13734
13735 static void *task(p)
13736         void *p;
13737 {
13738         return (void *) (p == NULL);
13739 }
13740
13741
13742 int main(argc, argv)
13743         int argc;
13744         char **argv;
13745 {
13746
13747         /* pthread test function */
13748         pthread_t t;
13749         int status;
13750         int detach = 1;
13751
13752 #ifdef HAVE_PTHREADS_FINAL
13753         /* Final pthreads */
13754         pthread_attr_t attr;
13755
13756         status = pthread_attr_init(&attr);
13757         if( status ) return status;
13758
13759 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13760         if( !detach ) {
13761 #if defined( PTHREAD_CREATE_JOINABLE )
13762                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13763 #else
13764                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13765 #endif
13766
13767 #ifdef PTHREAD_CREATE_DETACHED
13768         } else {
13769                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13770 #endif
13771         }
13772         if( status ) return status;
13773 #endif
13774
13775         status = pthread_create( &t, &attr, task, NULL );
13776         if( status ) return status;
13777
13778 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13779         if( detach ) {
13780                 /* give thread a chance to complete */
13781                 /* it should remain joinable and hence detachable */
13782                 sleep( 1 );
13783
13784                 status = pthread_detach( t );
13785                 if( status ) return status;
13786         }
13787 #endif
13788
13789 #else
13790         /* Draft 4 pthreads */
13791         status = pthread_create( &t, pthread_attr_default, task, NULL );
13792         if( status ) return status;
13793
13794         if( detach ) {
13795                 /* give thread a chance to complete */
13796                 /* it should remain joinable and hence detachable */
13797                 sleep( 1 );
13798
13799                 status = pthread_detach( &t );
13800                 if( status ) return status;
13801         }
13802 #endif
13803
13804 #ifdef HAVE_LINUX_THREADS
13805         pthread_kill_other_threads_np();
13806 #endif
13807
13808         return 0;
13809
13810 }
13811
13812 EOF
13813 if { (eval echo configure:13814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13814 then
13815   ol_cv_pthread_lib_lpthread_woff=yes
13816 else
13817   echo "configure: failed program was:" >&5
13818   cat conftest.$ac_ext >&5
13819   rm -fr conftest*
13820   ol_cv_pthread_lib_lpthread_woff=no
13821 fi
13822 rm -fr conftest*
13823 fi
13824
13825
13826                 # restore the LIBS
13827                 LIBS="$ol_LIBS"
13828         
13829 fi
13830
13831 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13832
13833         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13834                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13835                 ol_link_threads=posix
13836         fi
13837 fi
13838
13839
13840                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13841 if test "$ol_link_threads" = no ; then
13842         # try -lpthread
13843         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13844 echo "configure:13845: checking for pthread link with -lpthread" >&5
13845 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13846   echo $ac_n "(cached) $ac_c" 1>&6
13847 else
13848   
13849                 # save the flags
13850                 ol_LIBS="$LIBS"
13851                 LIBS="-lpthread $LIBS"
13852
13853                 if test "$cross_compiling" = yes; then
13854   cat > conftest.$ac_ext <<EOF
13855 #line 13856 "configure"
13856 #include "confdefs.h"
13857 /* pthread test headers */
13858 #include <pthread.h>
13859 #ifndef NULL
13860 #define NULL (void*)0
13861 #endif
13862
13863 static void *task(p)
13864         void *p;
13865 {
13866         return (void *) (p == NULL);
13867 }
13868
13869 int main() {
13870
13871         /* pthread test function */
13872         pthread_t t;
13873         int status;
13874         int detach = 1;
13875
13876 #ifdef HAVE_PTHREADS_FINAL
13877         /* Final pthreads */
13878         pthread_attr_t attr;
13879
13880         status = pthread_attr_init(&attr);
13881         if( status ) return status;
13882
13883 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13884         if( !detach ) {
13885 #if defined( PTHREAD_CREATE_JOINABLE )
13886                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13887 #else
13888                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13889 #endif
13890
13891 #ifdef PTHREAD_CREATE_DETACHED
13892         } else {
13893                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13894 #endif
13895         }
13896         if( status ) return status;
13897 #endif
13898
13899         status = pthread_create( &t, &attr, task, NULL );
13900         if( status ) return status;
13901
13902 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13903         if( detach ) {
13904                 /* give thread a chance to complete */
13905                 /* it should remain joinable and hence detachable */
13906                 sleep( 1 );
13907
13908                 status = pthread_detach( t );
13909                 if( status ) return status;
13910         }
13911 #endif
13912
13913 #else
13914         /* Draft 4 pthreads */
13915         status = pthread_create( &t, pthread_attr_default, task, NULL );
13916         if( status ) return status;
13917
13918         if( detach ) {
13919                 /* give thread a chance to complete */
13920                 /* it should remain joinable and hence detachable */
13921                 sleep( 1 );
13922
13923                 status = pthread_detach( &t );
13924                 if( status ) return status;
13925         }
13926 #endif
13927
13928 #ifdef HAVE_LINUX_THREADS
13929         pthread_kill_other_threads_np();
13930 #endif
13931
13932         return 0;
13933
13934 ; return 0; }
13935 EOF
13936 if { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13937   rm -rf conftest*
13938   ol_cv_pthread_lpthread=yes
13939 else
13940   echo "configure: failed program was:" >&5
13941   cat conftest.$ac_ext >&5
13942   rm -rf conftest*
13943   ol_cv_pthread_lpthread=no
13944 fi
13945 rm -f conftest*
13946 else
13947   cat > conftest.$ac_ext <<EOF
13948 #line 13949 "configure"
13949 #include "confdefs.h"
13950 /* pthread test headers */
13951 #include <pthread.h>
13952 #ifndef NULL
13953 #define NULL (void*)0
13954 #endif
13955
13956 static void *task(p)
13957         void *p;
13958 {
13959         return (void *) (p == NULL);
13960 }
13961
13962
13963 int main(argc, argv)
13964         int argc;
13965         char **argv;
13966 {
13967
13968         /* pthread test function */
13969         pthread_t t;
13970         int status;
13971         int detach = 1;
13972
13973 #ifdef HAVE_PTHREADS_FINAL
13974         /* Final pthreads */
13975         pthread_attr_t attr;
13976
13977         status = pthread_attr_init(&attr);
13978         if( status ) return status;
13979
13980 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13981         if( !detach ) {
13982 #if defined( PTHREAD_CREATE_JOINABLE )
13983                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13984 #else
13985                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13986 #endif
13987
13988 #ifdef PTHREAD_CREATE_DETACHED
13989         } else {
13990                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13991 #endif
13992         }
13993         if( status ) return status;
13994 #endif
13995
13996         status = pthread_create( &t, &attr, task, NULL );
13997         if( status ) return status;
13998
13999 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14000         if( detach ) {
14001                 /* give thread a chance to complete */
14002                 /* it should remain joinable and hence detachable */
14003                 sleep( 1 );
14004
14005                 status = pthread_detach( t );
14006                 if( status ) return status;
14007         }
14008 #endif
14009
14010 #else
14011         /* Draft 4 pthreads */
14012         status = pthread_create( &t, pthread_attr_default, task, NULL );
14013         if( status ) return status;
14014
14015         if( detach ) {
14016                 /* give thread a chance to complete */
14017                 /* it should remain joinable and hence detachable */
14018                 sleep( 1 );
14019
14020                 status = pthread_detach( &t );
14021                 if( status ) return status;
14022         }
14023 #endif
14024
14025 #ifdef HAVE_LINUX_THREADS
14026         pthread_kill_other_threads_np();
14027 #endif
14028
14029         return 0;
14030
14031 }
14032
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14035 then
14036   ol_cv_pthread_lpthread=yes
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -fr conftest*
14041   ol_cv_pthread_lpthread=no
14042 fi
14043 rm -fr conftest*
14044 fi
14045
14046
14047                 # restore the LIBS
14048                 LIBS="$ol_LIBS"
14049         
14050 fi
14051
14052 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14053
14054         if test $ol_cv_pthread_lpthread = yes ; then
14055                 ol_link_pthreads="-lpthread"
14056                 ol_link_threads=posix
14057         fi
14058 fi
14059
14060                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14061 if test "$ol_link_threads" = no ; then
14062         # try -lc_r
14063         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14064 echo "configure:14065: checking for pthread link with -lc_r" >&5
14065 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14066   echo $ac_n "(cached) $ac_c" 1>&6
14067 else
14068   
14069                 # save the flags
14070                 ol_LIBS="$LIBS"
14071                 LIBS="-lc_r $LIBS"
14072
14073                 if test "$cross_compiling" = yes; then
14074   cat > conftest.$ac_ext <<EOF
14075 #line 14076 "configure"
14076 #include "confdefs.h"
14077 /* pthread test headers */
14078 #include <pthread.h>
14079 #ifndef NULL
14080 #define NULL (void*)0
14081 #endif
14082
14083 static void *task(p)
14084         void *p;
14085 {
14086         return (void *) (p == NULL);
14087 }
14088
14089 int main() {
14090
14091         /* pthread test function */
14092         pthread_t t;
14093         int status;
14094         int detach = 1;
14095
14096 #ifdef HAVE_PTHREADS_FINAL
14097         /* Final pthreads */
14098         pthread_attr_t attr;
14099
14100         status = pthread_attr_init(&attr);
14101         if( status ) return status;
14102
14103 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14104         if( !detach ) {
14105 #if defined( PTHREAD_CREATE_JOINABLE )
14106                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14107 #else
14108                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14109 #endif
14110
14111 #ifdef PTHREAD_CREATE_DETACHED
14112         } else {
14113                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14114 #endif
14115         }
14116         if( status ) return status;
14117 #endif
14118
14119         status = pthread_create( &t, &attr, task, NULL );
14120         if( status ) return status;
14121
14122 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14123         if( detach ) {
14124                 /* give thread a chance to complete */
14125                 /* it should remain joinable and hence detachable */
14126                 sleep( 1 );
14127
14128                 status = pthread_detach( t );
14129                 if( status ) return status;
14130         }
14131 #endif
14132
14133 #else
14134         /* Draft 4 pthreads */
14135         status = pthread_create( &t, pthread_attr_default, task, NULL );
14136         if( status ) return status;
14137
14138         if( detach ) {
14139                 /* give thread a chance to complete */
14140                 /* it should remain joinable and hence detachable */
14141                 sleep( 1 );
14142
14143                 status = pthread_detach( &t );
14144                 if( status ) return status;
14145         }
14146 #endif
14147
14148 #ifdef HAVE_LINUX_THREADS
14149         pthread_kill_other_threads_np();
14150 #endif
14151
14152         return 0;
14153
14154 ; return 0; }
14155 EOF
14156 if { (eval echo configure:14157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14157   rm -rf conftest*
14158   ol_cv_pthread_lc_r=yes
14159 else
14160   echo "configure: failed program was:" >&5
14161   cat conftest.$ac_ext >&5
14162   rm -rf conftest*
14163   ol_cv_pthread_lc_r=no
14164 fi
14165 rm -f conftest*
14166 else
14167   cat > conftest.$ac_ext <<EOF
14168 #line 14169 "configure"
14169 #include "confdefs.h"
14170 /* pthread test headers */
14171 #include <pthread.h>
14172 #ifndef NULL
14173 #define NULL (void*)0
14174 #endif
14175
14176 static void *task(p)
14177         void *p;
14178 {
14179         return (void *) (p == NULL);
14180 }
14181
14182
14183 int main(argc, argv)
14184         int argc;
14185         char **argv;
14186 {
14187
14188         /* pthread test function */
14189         pthread_t t;
14190         int status;
14191         int detach = 1;
14192
14193 #ifdef HAVE_PTHREADS_FINAL
14194         /* Final pthreads */
14195         pthread_attr_t attr;
14196
14197         status = pthread_attr_init(&attr);
14198         if( status ) return status;
14199
14200 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14201         if( !detach ) {
14202 #if defined( PTHREAD_CREATE_JOINABLE )
14203                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14204 #else
14205                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14206 #endif
14207
14208 #ifdef PTHREAD_CREATE_DETACHED
14209         } else {
14210                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14211 #endif
14212         }
14213         if( status ) return status;
14214 #endif
14215
14216         status = pthread_create( &t, &attr, task, NULL );
14217         if( status ) return status;
14218
14219 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14220         if( detach ) {
14221                 /* give thread a chance to complete */
14222                 /* it should remain joinable and hence detachable */
14223                 sleep( 1 );
14224
14225                 status = pthread_detach( t );
14226                 if( status ) return status;
14227         }
14228 #endif
14229
14230 #else
14231         /* Draft 4 pthreads */
14232         status = pthread_create( &t, pthread_attr_default, task, NULL );
14233         if( status ) return status;
14234
14235         if( detach ) {
14236                 /* give thread a chance to complete */
14237                 /* it should remain joinable and hence detachable */
14238                 sleep( 1 );
14239
14240                 status = pthread_detach( &t );
14241                 if( status ) return status;
14242         }
14243 #endif
14244
14245 #ifdef HAVE_LINUX_THREADS
14246         pthread_kill_other_threads_np();
14247 #endif
14248
14249         return 0;
14250
14251 }
14252
14253 EOF
14254 if { (eval echo configure:14255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14255 then
14256   ol_cv_pthread_lc_r=yes
14257 else
14258   echo "configure: failed program was:" >&5
14259   cat conftest.$ac_ext >&5
14260   rm -fr conftest*
14261   ol_cv_pthread_lc_r=no
14262 fi
14263 rm -fr conftest*
14264 fi
14265
14266
14267                 # restore the LIBS
14268                 LIBS="$ol_LIBS"
14269         
14270 fi
14271
14272 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14273
14274         if test $ol_cv_pthread_lc_r = yes ; then
14275                 ol_link_pthreads="-lc_r"
14276                 ol_link_threads=posix
14277         fi
14278 fi
14279
14280
14281                 # Pthread try link: -threads (ol_cv_pthread_threads)
14282 if test "$ol_link_threads" = no ; then
14283         # try -threads
14284         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14285 echo "configure:14286: checking for pthread link with -threads" >&5
14286 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14287   echo $ac_n "(cached) $ac_c" 1>&6
14288 else
14289   
14290                 # save the flags
14291                 ol_LIBS="$LIBS"
14292                 LIBS="-threads $LIBS"
14293
14294                 if test "$cross_compiling" = yes; then
14295   cat > conftest.$ac_ext <<EOF
14296 #line 14297 "configure"
14297 #include "confdefs.h"
14298 /* pthread test headers */
14299 #include <pthread.h>
14300 #ifndef NULL
14301 #define NULL (void*)0
14302 #endif
14303
14304 static void *task(p)
14305         void *p;
14306 {
14307         return (void *) (p == NULL);
14308 }
14309
14310 int main() {
14311
14312         /* pthread test function */
14313         pthread_t t;
14314         int status;
14315         int detach = 1;
14316
14317 #ifdef HAVE_PTHREADS_FINAL
14318         /* Final pthreads */
14319         pthread_attr_t attr;
14320
14321         status = pthread_attr_init(&attr);
14322         if( status ) return status;
14323
14324 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14325         if( !detach ) {
14326 #if defined( PTHREAD_CREATE_JOINABLE )
14327                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14328 #else
14329                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14330 #endif
14331
14332 #ifdef PTHREAD_CREATE_DETACHED
14333         } else {
14334                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14335 #endif
14336         }
14337         if( status ) return status;
14338 #endif
14339
14340         status = pthread_create( &t, &attr, task, NULL );
14341         if( status ) return status;
14342
14343 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14344         if( detach ) {
14345                 /* give thread a chance to complete */
14346                 /* it should remain joinable and hence detachable */
14347                 sleep( 1 );
14348
14349                 status = pthread_detach( t );
14350                 if( status ) return status;
14351         }
14352 #endif
14353
14354 #else
14355         /* Draft 4 pthreads */
14356         status = pthread_create( &t, pthread_attr_default, task, NULL );
14357         if( status ) return status;
14358
14359         if( detach ) {
14360                 /* give thread a chance to complete */
14361                 /* it should remain joinable and hence detachable */
14362                 sleep( 1 );
14363
14364                 status = pthread_detach( &t );
14365                 if( status ) return status;
14366         }
14367 #endif
14368
14369 #ifdef HAVE_LINUX_THREADS
14370         pthread_kill_other_threads_np();
14371 #endif
14372
14373         return 0;
14374
14375 ; return 0; }
14376 EOF
14377 if { (eval echo configure:14378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14378   rm -rf conftest*
14379   ol_cv_pthread_threads=yes
14380 else
14381   echo "configure: failed program was:" >&5
14382   cat conftest.$ac_ext >&5
14383   rm -rf conftest*
14384   ol_cv_pthread_threads=no
14385 fi
14386 rm -f conftest*
14387 else
14388   cat > conftest.$ac_ext <<EOF
14389 #line 14390 "configure"
14390 #include "confdefs.h"
14391 /* pthread test headers */
14392 #include <pthread.h>
14393 #ifndef NULL
14394 #define NULL (void*)0
14395 #endif
14396
14397 static void *task(p)
14398         void *p;
14399 {
14400         return (void *) (p == NULL);
14401 }
14402
14403
14404 int main(argc, argv)
14405         int argc;
14406         char **argv;
14407 {
14408
14409         /* pthread test function */
14410         pthread_t t;
14411         int status;
14412         int detach = 1;
14413
14414 #ifdef HAVE_PTHREADS_FINAL
14415         /* Final pthreads */
14416         pthread_attr_t attr;
14417
14418         status = pthread_attr_init(&attr);
14419         if( status ) return status;
14420
14421 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14422         if( !detach ) {
14423 #if defined( PTHREAD_CREATE_JOINABLE )
14424                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14425 #else
14426                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14427 #endif
14428
14429 #ifdef PTHREAD_CREATE_DETACHED
14430         } else {
14431                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14432 #endif
14433         }
14434         if( status ) return status;
14435 #endif
14436
14437         status = pthread_create( &t, &attr, task, NULL );
14438         if( status ) return status;
14439
14440 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14441         if( detach ) {
14442                 /* give thread a chance to complete */
14443                 /* it should remain joinable and hence detachable */
14444                 sleep( 1 );
14445
14446                 status = pthread_detach( t );
14447                 if( status ) return status;
14448         }
14449 #endif
14450
14451 #else
14452         /* Draft 4 pthreads */
14453         status = pthread_create( &t, pthread_attr_default, task, NULL );
14454         if( status ) return status;
14455
14456         if( detach ) {
14457                 /* give thread a chance to complete */
14458                 /* it should remain joinable and hence detachable */
14459                 sleep( 1 );
14460
14461                 status = pthread_detach( &t );
14462                 if( status ) return status;
14463         }
14464 #endif
14465
14466 #ifdef HAVE_LINUX_THREADS
14467         pthread_kill_other_threads_np();
14468 #endif
14469
14470         return 0;
14471
14472 }
14473
14474 EOF
14475 if { (eval echo configure:14476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14476 then
14477   ol_cv_pthread_threads=yes
14478 else
14479   echo "configure: failed program was:" >&5
14480   cat conftest.$ac_ext >&5
14481   rm -fr conftest*
14482   ol_cv_pthread_threads=no
14483 fi
14484 rm -fr conftest*
14485 fi
14486
14487
14488                 # restore the LIBS
14489                 LIBS="$ol_LIBS"
14490         
14491 fi
14492
14493 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14494
14495         if test $ol_cv_pthread_threads = yes ; then
14496                 ol_link_pthreads="-threads"
14497                 ol_link_threads=posix
14498         fi
14499 fi
14500
14501
14502                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14503 if test "$ol_link_threads" = no ; then
14504         # try -lpthreads -lmach -lexc -lc_r
14505         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14506 echo "configure:14507: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14507 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14508   echo $ac_n "(cached) $ac_c" 1>&6
14509 else
14510   
14511                 # save the flags
14512                 ol_LIBS="$LIBS"
14513                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14514
14515                 if test "$cross_compiling" = yes; then
14516   cat > conftest.$ac_ext <<EOF
14517 #line 14518 "configure"
14518 #include "confdefs.h"
14519 /* pthread test headers */
14520 #include <pthread.h>
14521 #ifndef NULL
14522 #define NULL (void*)0
14523 #endif
14524
14525 static void *task(p)
14526         void *p;
14527 {
14528         return (void *) (p == NULL);
14529 }
14530
14531 int main() {
14532
14533         /* pthread test function */
14534         pthread_t t;
14535         int status;
14536         int detach = 1;
14537
14538 #ifdef HAVE_PTHREADS_FINAL
14539         /* Final pthreads */
14540         pthread_attr_t attr;
14541
14542         status = pthread_attr_init(&attr);
14543         if( status ) return status;
14544
14545 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14546         if( !detach ) {
14547 #if defined( PTHREAD_CREATE_JOINABLE )
14548                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14549 #else
14550                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14551 #endif
14552
14553 #ifdef PTHREAD_CREATE_DETACHED
14554         } else {
14555                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14556 #endif
14557         }
14558         if( status ) return status;
14559 #endif
14560
14561         status = pthread_create( &t, &attr, task, NULL );
14562         if( status ) return status;
14563
14564 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14565         if( detach ) {
14566                 /* give thread a chance to complete */
14567                 /* it should remain joinable and hence detachable */
14568                 sleep( 1 );
14569
14570                 status = pthread_detach( t );
14571                 if( status ) return status;
14572         }
14573 #endif
14574
14575 #else
14576         /* Draft 4 pthreads */
14577         status = pthread_create( &t, pthread_attr_default, task, NULL );
14578         if( status ) return status;
14579
14580         if( detach ) {
14581                 /* give thread a chance to complete */
14582                 /* it should remain joinable and hence detachable */
14583                 sleep( 1 );
14584
14585                 status = pthread_detach( &t );
14586                 if( status ) return status;
14587         }
14588 #endif
14589
14590 #ifdef HAVE_LINUX_THREADS
14591         pthread_kill_other_threads_np();
14592 #endif
14593
14594         return 0;
14595
14596 ; return 0; }
14597 EOF
14598 if { (eval echo configure:14599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14599   rm -rf conftest*
14600   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14601 else
14602   echo "configure: failed program was:" >&5
14603   cat conftest.$ac_ext >&5
14604   rm -rf conftest*
14605   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14606 fi
14607 rm -f conftest*
14608 else
14609   cat > conftest.$ac_ext <<EOF
14610 #line 14611 "configure"
14611 #include "confdefs.h"
14612 /* pthread test headers */
14613 #include <pthread.h>
14614 #ifndef NULL
14615 #define NULL (void*)0
14616 #endif
14617
14618 static void *task(p)
14619         void *p;
14620 {
14621         return (void *) (p == NULL);
14622 }
14623
14624
14625 int main(argc, argv)
14626         int argc;
14627         char **argv;
14628 {
14629
14630         /* pthread test function */
14631         pthread_t t;
14632         int status;
14633         int detach = 1;
14634
14635 #ifdef HAVE_PTHREADS_FINAL
14636         /* Final pthreads */
14637         pthread_attr_t attr;
14638
14639         status = pthread_attr_init(&attr);
14640         if( status ) return status;
14641
14642 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14643         if( !detach ) {
14644 #if defined( PTHREAD_CREATE_JOINABLE )
14645                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14646 #else
14647                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14648 #endif
14649
14650 #ifdef PTHREAD_CREATE_DETACHED
14651         } else {
14652                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14653 #endif
14654         }
14655         if( status ) return status;
14656 #endif
14657
14658         status = pthread_create( &t, &attr, task, NULL );
14659         if( status ) return status;
14660
14661 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14662         if( detach ) {
14663                 /* give thread a chance to complete */
14664                 /* it should remain joinable and hence detachable */
14665                 sleep( 1 );
14666
14667                 status = pthread_detach( t );
14668                 if( status ) return status;
14669         }
14670 #endif
14671
14672 #else
14673         /* Draft 4 pthreads */
14674         status = pthread_create( &t, pthread_attr_default, task, NULL );
14675         if( status ) return status;
14676
14677         if( detach ) {
14678                 /* give thread a chance to complete */
14679                 /* it should remain joinable and hence detachable */
14680                 sleep( 1 );
14681
14682                 status = pthread_detach( &t );
14683                 if( status ) return status;
14684         }
14685 #endif
14686
14687 #ifdef HAVE_LINUX_THREADS
14688         pthread_kill_other_threads_np();
14689 #endif
14690
14691         return 0;
14692
14693 }
14694
14695 EOF
14696 if { (eval echo configure:14697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14697 then
14698   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14699 else
14700   echo "configure: failed program was:" >&5
14701   cat conftest.$ac_ext >&5
14702   rm -fr conftest*
14703   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14704 fi
14705 rm -fr conftest*
14706 fi
14707
14708
14709                 # restore the LIBS
14710                 LIBS="$ol_LIBS"
14711         
14712 fi
14713
14714 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14715
14716         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14717                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14718                 ol_link_threads=posix
14719         fi
14720 fi
14721
14722                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14723 if test "$ol_link_threads" = no ; then
14724         # try -lpthreads -lmach -lexc
14725         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14726 echo "configure:14727: checking for pthread link with -lpthreads -lmach -lexc" >&5
14727 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14728   echo $ac_n "(cached) $ac_c" 1>&6
14729 else
14730   
14731                 # save the flags
14732                 ol_LIBS="$LIBS"
14733                 LIBS="-lpthreads -lmach -lexc $LIBS"
14734
14735                 if test "$cross_compiling" = yes; then
14736   cat > conftest.$ac_ext <<EOF
14737 #line 14738 "configure"
14738 #include "confdefs.h"
14739 /* pthread test headers */
14740 #include <pthread.h>
14741 #ifndef NULL
14742 #define NULL (void*)0
14743 #endif
14744
14745 static void *task(p)
14746         void *p;
14747 {
14748         return (void *) (p == NULL);
14749 }
14750
14751 int main() {
14752
14753         /* pthread test function */
14754         pthread_t t;
14755         int status;
14756         int detach = 1;
14757
14758 #ifdef HAVE_PTHREADS_FINAL
14759         /* Final pthreads */
14760         pthread_attr_t attr;
14761
14762         status = pthread_attr_init(&attr);
14763         if( status ) return status;
14764
14765 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14766         if( !detach ) {
14767 #if defined( PTHREAD_CREATE_JOINABLE )
14768                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14769 #else
14770                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14771 #endif
14772
14773 #ifdef PTHREAD_CREATE_DETACHED
14774         } else {
14775                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14776 #endif
14777         }
14778         if( status ) return status;
14779 #endif
14780
14781         status = pthread_create( &t, &attr, task, NULL );
14782         if( status ) return status;
14783
14784 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14785         if( detach ) {
14786                 /* give thread a chance to complete */
14787                 /* it should remain joinable and hence detachable */
14788                 sleep( 1 );
14789
14790                 status = pthread_detach( t );
14791                 if( status ) return status;
14792         }
14793 #endif
14794
14795 #else
14796         /* Draft 4 pthreads */
14797         status = pthread_create( &t, pthread_attr_default, task, NULL );
14798         if( status ) return status;
14799
14800         if( detach ) {
14801                 /* give thread a chance to complete */
14802                 /* it should remain joinable and hence detachable */
14803                 sleep( 1 );
14804
14805                 status = pthread_detach( &t );
14806                 if( status ) return status;
14807         }
14808 #endif
14809
14810 #ifdef HAVE_LINUX_THREADS
14811         pthread_kill_other_threads_np();
14812 #endif
14813
14814         return 0;
14815
14816 ; return 0; }
14817 EOF
14818 if { (eval echo configure:14819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14819   rm -rf conftest*
14820   ol_cv_pthread_lpthreads_lmach_lexc=yes
14821 else
14822   echo "configure: failed program was:" >&5
14823   cat conftest.$ac_ext >&5
14824   rm -rf conftest*
14825   ol_cv_pthread_lpthreads_lmach_lexc=no
14826 fi
14827 rm -f conftest*
14828 else
14829   cat > conftest.$ac_ext <<EOF
14830 #line 14831 "configure"
14831 #include "confdefs.h"
14832 /* pthread test headers */
14833 #include <pthread.h>
14834 #ifndef NULL
14835 #define NULL (void*)0
14836 #endif
14837
14838 static void *task(p)
14839         void *p;
14840 {
14841         return (void *) (p == NULL);
14842 }
14843
14844
14845 int main(argc, argv)
14846         int argc;
14847         char **argv;
14848 {
14849
14850         /* pthread test function */
14851         pthread_t t;
14852         int status;
14853         int detach = 1;
14854
14855 #ifdef HAVE_PTHREADS_FINAL
14856         /* Final pthreads */
14857         pthread_attr_t attr;
14858
14859         status = pthread_attr_init(&attr);
14860         if( status ) return status;
14861
14862 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14863         if( !detach ) {
14864 #if defined( PTHREAD_CREATE_JOINABLE )
14865                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14866 #else
14867                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14868 #endif
14869
14870 #ifdef PTHREAD_CREATE_DETACHED
14871         } else {
14872                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14873 #endif
14874         }
14875         if( status ) return status;
14876 #endif
14877
14878         status = pthread_create( &t, &attr, task, NULL );
14879         if( status ) return status;
14880
14881 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14882         if( detach ) {
14883                 /* give thread a chance to complete */
14884                 /* it should remain joinable and hence detachable */
14885                 sleep( 1 );
14886
14887                 status = pthread_detach( t );
14888                 if( status ) return status;
14889         }
14890 #endif
14891
14892 #else
14893         /* Draft 4 pthreads */
14894         status = pthread_create( &t, pthread_attr_default, task, NULL );
14895         if( status ) return status;
14896
14897         if( detach ) {
14898                 /* give thread a chance to complete */
14899                 /* it should remain joinable and hence detachable */
14900                 sleep( 1 );
14901
14902                 status = pthread_detach( &t );
14903                 if( status ) return status;
14904         }
14905 #endif
14906
14907 #ifdef HAVE_LINUX_THREADS
14908         pthread_kill_other_threads_np();
14909 #endif
14910
14911         return 0;
14912
14913 }
14914
14915 EOF
14916 if { (eval echo configure:14917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14917 then
14918   ol_cv_pthread_lpthreads_lmach_lexc=yes
14919 else
14920   echo "configure: failed program was:" >&5
14921   cat conftest.$ac_ext >&5
14922   rm -fr conftest*
14923   ol_cv_pthread_lpthreads_lmach_lexc=no
14924 fi
14925 rm -fr conftest*
14926 fi
14927
14928
14929                 # restore the LIBS
14930                 LIBS="$ol_LIBS"
14931         
14932 fi
14933
14934 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14935
14936         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14937                 ol_link_pthreads="-lpthreads -lmach -lexc"
14938                 ol_link_threads=posix
14939         fi
14940 fi
14941
14942                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14943 if test "$ol_link_threads" = no ; then
14944         # try -lpthreads -lexc
14945         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14946 echo "configure:14947: checking for pthread link with -lpthreads -lexc" >&5
14947 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14948   echo $ac_n "(cached) $ac_c" 1>&6
14949 else
14950   
14951                 # save the flags
14952                 ol_LIBS="$LIBS"
14953                 LIBS="-lpthreads -lexc $LIBS"
14954
14955                 if test "$cross_compiling" = yes; then
14956   cat > conftest.$ac_ext <<EOF
14957 #line 14958 "configure"
14958 #include "confdefs.h"
14959 /* pthread test headers */
14960 #include <pthread.h>
14961 #ifndef NULL
14962 #define NULL (void*)0
14963 #endif
14964
14965 static void *task(p)
14966         void *p;
14967 {
14968         return (void *) (p == NULL);
14969 }
14970
14971 int main() {
14972
14973         /* pthread test function */
14974         pthread_t t;
14975         int status;
14976         int detach = 1;
14977
14978 #ifdef HAVE_PTHREADS_FINAL
14979         /* Final pthreads */
14980         pthread_attr_t attr;
14981
14982         status = pthread_attr_init(&attr);
14983         if( status ) return status;
14984
14985 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14986         if( !detach ) {
14987 #if defined( PTHREAD_CREATE_JOINABLE )
14988                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14989 #else
14990                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14991 #endif
14992
14993 #ifdef PTHREAD_CREATE_DETACHED
14994         } else {
14995                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14996 #endif
14997         }
14998         if( status ) return status;
14999 #endif
15000
15001         status = pthread_create( &t, &attr, task, NULL );
15002         if( status ) return status;
15003
15004 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15005         if( detach ) {
15006                 /* give thread a chance to complete */
15007                 /* it should remain joinable and hence detachable */
15008                 sleep( 1 );
15009
15010                 status = pthread_detach( t );
15011                 if( status ) return status;
15012         }
15013 #endif
15014
15015 #else
15016         /* Draft 4 pthreads */
15017         status = pthread_create( &t, pthread_attr_default, task, NULL );
15018         if( status ) return status;
15019
15020         if( detach ) {
15021                 /* give thread a chance to complete */
15022                 /* it should remain joinable and hence detachable */
15023                 sleep( 1 );
15024
15025                 status = pthread_detach( &t );
15026                 if( status ) return status;
15027         }
15028 #endif
15029
15030 #ifdef HAVE_LINUX_THREADS
15031         pthread_kill_other_threads_np();
15032 #endif
15033
15034         return 0;
15035
15036 ; return 0; }
15037 EOF
15038 if { (eval echo configure:15039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15039   rm -rf conftest*
15040   ol_cv_pthread_lpthreads_lexc=yes
15041 else
15042   echo "configure: failed program was:" >&5
15043   cat conftest.$ac_ext >&5
15044   rm -rf conftest*
15045   ol_cv_pthread_lpthreads_lexc=no
15046 fi
15047 rm -f conftest*
15048 else
15049   cat > conftest.$ac_ext <<EOF
15050 #line 15051 "configure"
15051 #include "confdefs.h"
15052 /* pthread test headers */
15053 #include <pthread.h>
15054 #ifndef NULL
15055 #define NULL (void*)0
15056 #endif
15057
15058 static void *task(p)
15059         void *p;
15060 {
15061         return (void *) (p == NULL);
15062 }
15063
15064
15065 int main(argc, argv)
15066         int argc;
15067         char **argv;
15068 {
15069
15070         /* pthread test function */
15071         pthread_t t;
15072         int status;
15073         int detach = 1;
15074
15075 #ifdef HAVE_PTHREADS_FINAL
15076         /* Final pthreads */
15077         pthread_attr_t attr;
15078
15079         status = pthread_attr_init(&attr);
15080         if( status ) return status;
15081
15082 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15083         if( !detach ) {
15084 #if defined( PTHREAD_CREATE_JOINABLE )
15085                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15086 #else
15087                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15088 #endif
15089
15090 #ifdef PTHREAD_CREATE_DETACHED
15091         } else {
15092                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15093 #endif
15094         }
15095         if( status ) return status;
15096 #endif
15097
15098         status = pthread_create( &t, &attr, task, NULL );
15099         if( status ) return status;
15100
15101 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15102         if( detach ) {
15103                 /* give thread a chance to complete */
15104                 /* it should remain joinable and hence detachable */
15105                 sleep( 1 );
15106
15107                 status = pthread_detach( t );
15108                 if( status ) return status;
15109         }
15110 #endif
15111
15112 #else
15113         /* Draft 4 pthreads */
15114         status = pthread_create( &t, pthread_attr_default, task, NULL );
15115         if( status ) return status;
15116
15117         if( detach ) {
15118                 /* give thread a chance to complete */
15119                 /* it should remain joinable and hence detachable */
15120                 sleep( 1 );
15121
15122                 status = pthread_detach( &t );
15123                 if( status ) return status;
15124         }
15125 #endif
15126
15127 #ifdef HAVE_LINUX_THREADS
15128         pthread_kill_other_threads_np();
15129 #endif
15130
15131         return 0;
15132
15133 }
15134
15135 EOF
15136 if { (eval echo configure:15137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15137 then
15138   ol_cv_pthread_lpthreads_lexc=yes
15139 else
15140   echo "configure: failed program was:" >&5
15141   cat conftest.$ac_ext >&5
15142   rm -fr conftest*
15143   ol_cv_pthread_lpthreads_lexc=no
15144 fi
15145 rm -fr conftest*
15146 fi
15147
15148
15149                 # restore the LIBS
15150                 LIBS="$ol_LIBS"
15151         
15152 fi
15153
15154 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15155
15156         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15157                 ol_link_pthreads="-lpthreads -lexc"
15158                 ol_link_threads=posix
15159         fi
15160 fi
15161
15162
15163                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15164 if test "$ol_link_threads" = no ; then
15165         # try -lpthreads
15166         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15167 echo "configure:15168: checking for pthread link with -lpthreads" >&5
15168 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15169   echo $ac_n "(cached) $ac_c" 1>&6
15170 else
15171   
15172                 # save the flags
15173                 ol_LIBS="$LIBS"
15174                 LIBS="-lpthreads $LIBS"
15175
15176                 if test "$cross_compiling" = yes; then
15177   cat > conftest.$ac_ext <<EOF
15178 #line 15179 "configure"
15179 #include "confdefs.h"
15180 /* pthread test headers */
15181 #include <pthread.h>
15182 #ifndef NULL
15183 #define NULL (void*)0
15184 #endif
15185
15186 static void *task(p)
15187         void *p;
15188 {
15189         return (void *) (p == NULL);
15190 }
15191
15192 int main() {
15193
15194         /* pthread test function */
15195         pthread_t t;
15196         int status;
15197         int detach = 1;
15198
15199 #ifdef HAVE_PTHREADS_FINAL
15200         /* Final pthreads */
15201         pthread_attr_t attr;
15202
15203         status = pthread_attr_init(&attr);
15204         if( status ) return status;
15205
15206 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15207         if( !detach ) {
15208 #if defined( PTHREAD_CREATE_JOINABLE )
15209                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15210 #else
15211                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15212 #endif
15213
15214 #ifdef PTHREAD_CREATE_DETACHED
15215         } else {
15216                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15217 #endif
15218         }
15219         if( status ) return status;
15220 #endif
15221
15222         status = pthread_create( &t, &attr, task, NULL );
15223         if( status ) return status;
15224
15225 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15226         if( detach ) {
15227                 /* give thread a chance to complete */
15228                 /* it should remain joinable and hence detachable */
15229                 sleep( 1 );
15230
15231                 status = pthread_detach( t );
15232                 if( status ) return status;
15233         }
15234 #endif
15235
15236 #else
15237         /* Draft 4 pthreads */
15238         status = pthread_create( &t, pthread_attr_default, task, NULL );
15239         if( status ) return status;
15240
15241         if( detach ) {
15242                 /* give thread a chance to complete */
15243                 /* it should remain joinable and hence detachable */
15244                 sleep( 1 );
15245
15246                 status = pthread_detach( &t );
15247                 if( status ) return status;
15248         }
15249 #endif
15250
15251 #ifdef HAVE_LINUX_THREADS
15252         pthread_kill_other_threads_np();
15253 #endif
15254
15255         return 0;
15256
15257 ; return 0; }
15258 EOF
15259 if { (eval echo configure:15260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15260   rm -rf conftest*
15261   ol_cv_pthread_lib_lpthreads=yes
15262 else
15263   echo "configure: failed program was:" >&5
15264   cat conftest.$ac_ext >&5
15265   rm -rf conftest*
15266   ol_cv_pthread_lib_lpthreads=no
15267 fi
15268 rm -f conftest*
15269 else
15270   cat > conftest.$ac_ext <<EOF
15271 #line 15272 "configure"
15272 #include "confdefs.h"
15273 /* pthread test headers */
15274 #include <pthread.h>
15275 #ifndef NULL
15276 #define NULL (void*)0
15277 #endif
15278
15279 static void *task(p)
15280         void *p;
15281 {
15282         return (void *) (p == NULL);
15283 }
15284
15285
15286 int main(argc, argv)
15287         int argc;
15288         char **argv;
15289 {
15290
15291         /* pthread test function */
15292         pthread_t t;
15293         int status;
15294         int detach = 1;
15295
15296 #ifdef HAVE_PTHREADS_FINAL
15297         /* Final pthreads */
15298         pthread_attr_t attr;
15299
15300         status = pthread_attr_init(&attr);
15301         if( status ) return status;
15302
15303 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15304         if( !detach ) {
15305 #if defined( PTHREAD_CREATE_JOINABLE )
15306                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15307 #else
15308                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15309 #endif
15310
15311 #ifdef PTHREAD_CREATE_DETACHED
15312         } else {
15313                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15314 #endif
15315         }
15316         if( status ) return status;
15317 #endif
15318
15319         status = pthread_create( &t, &attr, task, NULL );
15320         if( status ) return status;
15321
15322 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15323         if( detach ) {
15324                 /* give thread a chance to complete */
15325                 /* it should remain joinable and hence detachable */
15326                 sleep( 1 );
15327
15328                 status = pthread_detach( t );
15329                 if( status ) return status;
15330         }
15331 #endif
15332
15333 #else
15334         /* Draft 4 pthreads */
15335         status = pthread_create( &t, pthread_attr_default, task, NULL );
15336         if( status ) return status;
15337
15338         if( detach ) {
15339                 /* give thread a chance to complete */
15340                 /* it should remain joinable and hence detachable */
15341                 sleep( 1 );
15342
15343                 status = pthread_detach( &t );
15344                 if( status ) return status;
15345         }
15346 #endif
15347
15348 #ifdef HAVE_LINUX_THREADS
15349         pthread_kill_other_threads_np();
15350 #endif
15351
15352         return 0;
15353
15354 }
15355
15356 EOF
15357 if { (eval echo configure:15358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15358 then
15359   ol_cv_pthread_lib_lpthreads=yes
15360 else
15361   echo "configure: failed program was:" >&5
15362   cat conftest.$ac_ext >&5
15363   rm -fr conftest*
15364   ol_cv_pthread_lib_lpthreads=no
15365 fi
15366 rm -fr conftest*
15367 fi
15368
15369
15370                 # restore the LIBS
15371                 LIBS="$ol_LIBS"
15372         
15373 fi
15374
15375 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15376
15377         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15378                 ol_link_pthreads="-lpthreads"
15379                 ol_link_threads=posix
15380         fi
15381 fi
15382
15383
15384                 if test $ol_link_threads != no ; then
15385                         cat >> confdefs.h <<\EOF
15386 #define HAVE_PTHREADS 1
15387 EOF
15388
15389
15390                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15391
15392                                                 save_CPPFLAGS="$CPPFLAGS"
15393                         save_LIBS="$LIBS"
15394                         LIBS="$LTHREAD_LIBS $LIBS"
15395
15396                                                                                                 for ac_func in sched_yield pthread_yield
15397 do
15398 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15399 echo "configure:15400: checking for $ac_func" >&5
15400 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15401   echo $ac_n "(cached) $ac_c" 1>&6
15402 else
15403   cat > conftest.$ac_ext <<EOF
15404 #line 15405 "configure"
15405 #include "confdefs.h"
15406 /* System header to define __stub macros and hopefully few prototypes,
15407     which can conflict with char $ac_func(); below.  */
15408 #include <assert.h>
15409 /* Override any gcc2 internal prototype to avoid an error.  */
15410 /* We use char because int might match the return type of a gcc2
15411     builtin and then its argument prototype would still apply.  */
15412 char $ac_func();
15413 char (*f)();
15414
15415 int main() {
15416
15417 /* The GNU C library defines this for functions which it implements
15418     to always fail with ENOSYS.  Some functions are actually named
15419     something starting with __ and the normal name is an alias.  */
15420 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15421 choke me
15422 #else
15423 f = $ac_func;
15424 #endif
15425
15426 ; return 0; }
15427 EOF
15428 if { (eval echo configure:15429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15429   rm -rf conftest*
15430   eval "ac_cv_func_$ac_func=yes"
15431 else
15432   echo "configure: failed program was:" >&5
15433   cat conftest.$ac_ext >&5
15434   rm -rf conftest*
15435   eval "ac_cv_func_$ac_func=no"
15436 fi
15437 rm -f conftest*
15438 fi
15439
15440 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15441   echo "$ac_t""yes" 1>&6
15442     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15443   cat >> confdefs.h <<EOF
15444 #define $ac_tr_func 1
15445 EOF
15446  
15447 else
15448   echo "$ac_t""no" 1>&6
15449 fi
15450 done
15451
15452
15453                         if test $ac_cv_func_sched_yield = no -a \
15454                                 $ac_cv_func_pthread_yield = no ; then
15455                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15456 echo "configure:15457: checking for sched_yield in -lrt" >&5
15457 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15458 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15459   echo $ac_n "(cached) $ac_c" 1>&6
15460 else
15461   ac_save_LIBS="$LIBS"
15462 LIBS="-lrt  $LIBS"
15463 cat > conftest.$ac_ext <<EOF
15464 #line 15465 "configure"
15465 #include "confdefs.h"
15466 /* Override any gcc2 internal prototype to avoid an error.  */
15467 /* We use char because int might match the return type of a gcc2
15468     builtin and then its argument prototype would still apply.  */
15469 char sched_yield();
15470
15471 int main() {
15472 sched_yield()
15473 ; return 0; }
15474 EOF
15475 if { (eval echo configure:15476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15476   rm -rf conftest*
15477   eval "ac_cv_lib_$ac_lib_var=yes"
15478 else
15479   echo "configure: failed program was:" >&5
15480   cat conftest.$ac_ext >&5
15481   rm -rf conftest*
15482   eval "ac_cv_lib_$ac_lib_var=no"
15483 fi
15484 rm -f conftest*
15485 LIBS="$ac_save_LIBS"
15486
15487 fi
15488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15489   echo "$ac_t""yes" 1>&6
15490   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15491                                         cat >> confdefs.h <<\EOF
15492 #define HAVE_SCHED_YIELD 1
15493 EOF
15494
15495                                         ac_cv_func_sched_yield=yes
15496 else
15497   echo "$ac_t""no" 1>&6
15498 ac_cv_func_sched_yield=no
15499 fi
15500
15501                         fi
15502                         if test $ac_cv_func_sched_yield = no -a \
15503                                 $ac_cv_func_pthread_yield = no ; then
15504                                                                                                 for ac_func in thr_yield
15505 do
15506 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15507 echo "configure:15508: checking for $ac_func" >&5
15508 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15509   echo $ac_n "(cached) $ac_c" 1>&6
15510 else
15511   cat > conftest.$ac_ext <<EOF
15512 #line 15513 "configure"
15513 #include "confdefs.h"
15514 /* System header to define __stub macros and hopefully few prototypes,
15515     which can conflict with char $ac_func(); below.  */
15516 #include <assert.h>
15517 /* Override any gcc2 internal prototype to avoid an error.  */
15518 /* We use char because int might match the return type of a gcc2
15519     builtin and then its argument prototype would still apply.  */
15520 char $ac_func();
15521 char (*f)();
15522
15523 int main() {
15524
15525 /* The GNU C library defines this for functions which it implements
15526     to always fail with ENOSYS.  Some functions are actually named
15527     something starting with __ and the normal name is an alias.  */
15528 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15529 choke me
15530 #else
15531 f = $ac_func;
15532 #endif
15533
15534 ; return 0; }
15535 EOF
15536 if { (eval echo configure:15537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15537   rm -rf conftest*
15538   eval "ac_cv_func_$ac_func=yes"
15539 else
15540   echo "configure: failed program was:" >&5
15541   cat conftest.$ac_ext >&5
15542   rm -rf conftest*
15543   eval "ac_cv_func_$ac_func=no"
15544 fi
15545 rm -f conftest*
15546 fi
15547
15548 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15549   echo "$ac_t""yes" 1>&6
15550     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15551   cat >> confdefs.h <<EOF
15552 #define $ac_tr_func 1
15553 EOF
15554  
15555 else
15556   echo "$ac_t""no" 1>&6
15557 fi
15558 done
15559
15560                         fi
15561                         if test $ac_cv_func_sched_yield = no -a \
15562                                 $ac_cv_func_pthread_yield = no -a \
15563                                 "$ac_cv_func_thr_yield" = no ; then
15564                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15565                         fi
15566
15567                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15568 do
15569 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15570 echo "configure:15571: checking for $ac_func" >&5
15571 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15572   echo $ac_n "(cached) $ac_c" 1>&6
15573 else
15574   cat > conftest.$ac_ext <<EOF
15575 #line 15576 "configure"
15576 #include "confdefs.h"
15577 /* System header to define __stub macros and hopefully few prototypes,
15578     which can conflict with char $ac_func(); below.  */
15579 #include <assert.h>
15580 /* Override any gcc2 internal prototype to avoid an error.  */
15581 /* We use char because int might match the return type of a gcc2
15582     builtin and then its argument prototype would still apply.  */
15583 char $ac_func();
15584 char (*f)();
15585
15586 int main() {
15587
15588 /* The GNU C library defines this for functions which it implements
15589     to always fail with ENOSYS.  Some functions are actually named
15590     something starting with __ and the normal name is an alias.  */
15591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15592 choke me
15593 #else
15594 f = $ac_func;
15595 #endif
15596
15597 ; return 0; }
15598 EOF
15599 if { (eval echo configure:15600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15600   rm -rf conftest*
15601   eval "ac_cv_func_$ac_func=yes"
15602 else
15603   echo "configure: failed program was:" >&5
15604   cat conftest.$ac_ext >&5
15605   rm -rf conftest*
15606   eval "ac_cv_func_$ac_func=no"
15607 fi
15608 rm -f conftest*
15609 fi
15610
15611 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15612   echo "$ac_t""yes" 1>&6
15613     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15614   cat >> confdefs.h <<EOF
15615 #define $ac_tr_func 1
15616 EOF
15617  
15618 else
15619   echo "$ac_t""no" 1>&6
15620 fi
15621 done
15622
15623
15624                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15625 echo "configure:15626: checking for pthread_detach with <pthread.h>" >&5
15626 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15627   echo $ac_n "(cached) $ac_c" 1>&6
15628 else
15629   
15630                                                                 cat > conftest.$ac_ext <<EOF
15631 #line 15632 "configure"
15632 #include "confdefs.h"
15633
15634 #include <pthread.h>
15635 #ifndef NULL
15636 #define NULL (void*)0
15637 #endif
15638
15639 int main() {
15640 pthread_detach(NULL);
15641 ; return 0; }
15642 EOF
15643 if { (eval echo configure:15644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15644   rm -rf conftest*
15645   ol_cv_func_pthread_detach=yes
15646 else
15647   echo "configure: failed program was:" >&5
15648   cat conftest.$ac_ext >&5
15649   rm -rf conftest*
15650   ol_cv_func_pthread_detach=no
15651 fi
15652 rm -f conftest*
15653                         
15654 fi
15655
15656 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15657
15658                         if test $ol_cv_func_pthread_detach = no ; then
15659                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15660                         fi
15661
15662                         cat >> confdefs.h <<\EOF
15663 #define HAVE_PTHREAD_DETACH 1
15664 EOF
15665
15666
15667                                                 for ac_func in \
15668                                 pthread_setconcurrency \
15669                                 pthread_getconcurrency \
15670                                 thr_setconcurrency \
15671                                 thr_getconcurrency \
15672                         
15673 do
15674 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15675 echo "configure:15676: checking for $ac_func" >&5
15676 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15677   echo $ac_n "(cached) $ac_c" 1>&6
15678 else
15679   cat > conftest.$ac_ext <<EOF
15680 #line 15681 "configure"
15681 #include "confdefs.h"
15682 /* System header to define __stub macros and hopefully few prototypes,
15683     which can conflict with char $ac_func(); below.  */
15684 #include <assert.h>
15685 /* Override any gcc2 internal prototype to avoid an error.  */
15686 /* We use char because int might match the return type of a gcc2
15687     builtin and then its argument prototype would still apply.  */
15688 char $ac_func();
15689 char (*f)();
15690
15691 int main() {
15692
15693 /* The GNU C library defines this for functions which it implements
15694     to always fail with ENOSYS.  Some functions are actually named
15695     something starting with __ and the normal name is an alias.  */
15696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15697 choke me
15698 #else
15699 f = $ac_func;
15700 #endif
15701
15702 ; return 0; }
15703 EOF
15704 if { (eval echo configure:15705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15705   rm -rf conftest*
15706   eval "ac_cv_func_$ac_func=yes"
15707 else
15708   echo "configure: failed program was:" >&5
15709   cat conftest.$ac_ext >&5
15710   rm -rf conftest*
15711   eval "ac_cv_func_$ac_func=no"
15712 fi
15713 rm -f conftest*
15714 fi
15715
15716 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15717   echo "$ac_t""yes" 1>&6
15718     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15719   cat >> confdefs.h <<EOF
15720 #define $ac_tr_func 1
15721 EOF
15722  
15723 else
15724   echo "$ac_t""no" 1>&6
15725 fi
15726 done
15727
15728
15729                         
15730         for ac_func in pthread_kill_other_threads_np
15731 do
15732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15733 echo "configure:15734: checking for $ac_func" >&5
15734 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15735   echo $ac_n "(cached) $ac_c" 1>&6
15736 else
15737   cat > conftest.$ac_ext <<EOF
15738 #line 15739 "configure"
15739 #include "confdefs.h"
15740 /* System header to define __stub macros and hopefully few prototypes,
15741     which can conflict with char $ac_func(); below.  */
15742 #include <assert.h>
15743 /* Override any gcc2 internal prototype to avoid an error.  */
15744 /* We use char because int might match the return type of a gcc2
15745     builtin and then its argument prototype would still apply.  */
15746 char $ac_func();
15747 char (*f)();
15748
15749 int main() {
15750
15751 /* The GNU C library defines this for functions which it implements
15752     to always fail with ENOSYS.  Some functions are actually named
15753     something starting with __ and the normal name is an alias.  */
15754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15755 choke me
15756 #else
15757 f = $ac_func;
15758 #endif
15759
15760 ; return 0; }
15761 EOF
15762 if { (eval echo configure:15763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15763   rm -rf conftest*
15764   eval "ac_cv_func_$ac_func=yes"
15765 else
15766   echo "configure: failed program was:" >&5
15767   cat conftest.$ac_ext >&5
15768   rm -rf conftest*
15769   eval "ac_cv_func_$ac_func=no"
15770 fi
15771 rm -f conftest*
15772 fi
15773
15774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15775   echo "$ac_t""yes" 1>&6
15776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15777   cat >> confdefs.h <<EOF
15778 #define $ac_tr_func 1
15779 EOF
15780  
15781 else
15782   echo "$ac_t""no" 1>&6
15783 fi
15784 done
15785
15786         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15787 echo "configure:15788: checking for LinuxThreads implementation" >&5
15788 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15789   echo $ac_n "(cached) $ac_c" 1>&6
15790 else
15791   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15792 fi
15793
15794 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15795
15796                         
15797         
15798         
15799         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15800 echo "configure:15801: checking for LinuxThreads consistency" >&5
15801 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15802   echo $ac_n "(cached) $ac_c" 1>&6
15803 else
15804   
15805                 if test $ol_cv_header_linux_threads = yes -a \
15806                         $ol_cv_sys_linux_threads = yes; then
15807                         ol_cv_linux_threads=yes
15808                 elif test $ol_cv_header_linux_threads = no -a \
15809                         $ol_cv_sys_linux_threads = no; then
15810                         ol_cv_linux_threads=no
15811                 else
15812                         ol_cv_linux_threads=error
15813                 fi
15814         
15815 fi
15816
15817 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15818
15819
15820                         if test $ol_cv_linux_threads = error; then
15821                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15822                         fi
15823
15824                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15825 echo "configure:15826: checking if pthread_create() works" >&5
15826 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15827   echo $ac_n "(cached) $ac_c" 1>&6
15828 else
15829   
15830                         if test "$cross_compiling" = yes; then
15831                                 ol_cv_pthread_create_works=yes
15832 else
15833   cat > conftest.$ac_ext <<EOF
15834 #line 15835 "configure"
15835 #include "confdefs.h"
15836 /* pthread test headers */
15837 #include <pthread.h>
15838 #ifndef NULL
15839 #define NULL (void*)0
15840 #endif
15841
15842 static void *task(p)
15843         void *p;
15844 {
15845         return (void *) (p == NULL);
15846 }
15847
15848
15849 int main(argc, argv)
15850         int argc;
15851         char **argv;
15852 {
15853
15854         /* pthread test function */
15855         pthread_t t;
15856         int status;
15857         int detach = 1;
15858
15859 #ifdef HAVE_PTHREADS_FINAL
15860         /* Final pthreads */
15861         pthread_attr_t attr;
15862
15863         status = pthread_attr_init(&attr);
15864         if( status ) return status;
15865
15866 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15867         if( !detach ) {
15868 #if defined( PTHREAD_CREATE_JOINABLE )
15869                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15870 #else
15871                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15872 #endif
15873
15874 #ifdef PTHREAD_CREATE_DETACHED
15875         } else {
15876                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15877 #endif
15878         }
15879         if( status ) return status;
15880 #endif
15881
15882         status = pthread_create( &t, &attr, task, NULL );
15883         if( status ) return status;
15884
15885 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15886         if( detach ) {
15887                 /* give thread a chance to complete */
15888                 /* it should remain joinable and hence detachable */
15889                 sleep( 1 );
15890
15891                 status = pthread_detach( t );
15892                 if( status ) return status;
15893         }
15894 #endif
15895
15896 #else
15897         /* Draft 4 pthreads */
15898         status = pthread_create( &t, pthread_attr_default, task, NULL );
15899         if( status ) return status;
15900
15901         if( detach ) {
15902                 /* give thread a chance to complete */
15903                 /* it should remain joinable and hence detachable */
15904                 sleep( 1 );
15905
15906                 status = pthread_detach( &t );
15907                 if( status ) return status;
15908         }
15909 #endif
15910
15911 #ifdef HAVE_LINUX_THREADS
15912         pthread_kill_other_threads_np();
15913 #endif
15914
15915         return 0;
15916
15917 }
15918
15919 EOF
15920 if { (eval echo configure:15921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15921 then
15922   ol_cv_pthread_create_works=yes
15923 else
15924   echo "configure: failed program was:" >&5
15925   cat conftest.$ac_ext >&5
15926   rm -fr conftest*
15927   ol_cv_pthread_create_works=no
15928 fi
15929 rm -fr conftest*
15930 fi
15931
15932 fi
15933
15934 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15935
15936                         if test $ol_cv_pthread_create_works = no ; then
15937                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15938                         fi
15939
15940                                                 if test $ol_with_yielding_select = auto ; then
15941                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15942 echo "configure:15943: checking if select yields when using pthreads" >&5
15943 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15944   echo $ac_n "(cached) $ac_c" 1>&6
15945 else
15946   
15947                                 if test "$cross_compiling" = yes; then
15948   ol_cv_pthread_select_yields=cross
15949 else
15950   cat > conftest.$ac_ext <<EOF
15951 #line 15952 "configure"
15952 #include "confdefs.h"
15953
15954 #include <sys/types.h>
15955 #include <sys/time.h>
15956 #include <unistd.h>
15957 #include <pthread.h>
15958 #ifndef NULL
15959 #define NULL (void*) 0
15960 #endif
15961
15962 static int fildes[2];
15963
15964 static void *task(p)
15965         void *p;
15966 {
15967         int i;
15968         struct timeval tv;
15969
15970         fd_set rfds;
15971
15972         tv.tv_sec=10;
15973         tv.tv_usec=0;
15974
15975         FD_ZERO(&rfds);
15976         FD_SET(fildes[0], &rfds);
15977
15978         /* we're not interested in any fds */
15979         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15980
15981         if(i < 0) {
15982                 perror("select");
15983                 exit(10);
15984         }
15985
15986         exit(0); /* if we exit here, the select blocked the whole process */
15987 }
15988
15989 int main(argc, argv)
15990         int argc;
15991         char **argv;
15992 {
15993         pthread_t t;
15994
15995         /* create a pipe to select */
15996         if(pipe(&fildes[0])) {
15997                 perror("select");
15998                 exit(1);
15999         }
16000
16001 #ifdef HAVE_PTHREAD_SETCONCURRENCY
16002         (void) pthread_setconcurrency(2);
16003 #else
16004 #ifdef HAVE_THR_SETCONCURRENCY
16005         /* Set Solaris LWP concurrency to 2 */
16006         thr_setconcurrency(2);
16007 #endif
16008 #endif
16009
16010 #if HAVE_PTHREADS_D4
16011         pthread_create(&t, pthread_attr_default, task, NULL);
16012 #else
16013         pthread_create(&t, NULL, task, NULL);
16014 #endif
16015
16016 #if HAVE_SCHED_YIELD
16017         sched_yield();  /* make sure task runs first */
16018 #else
16019 #ifdef HAVE_PTHREAD_YIELD
16020         pthread_yield();        /* make sure task runs first */
16021 #endif
16022 #endif
16023
16024         exit(2);
16025 }
16026 EOF
16027 if { (eval echo configure:16028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16028 then
16029   ol_cv_pthread_select_yields=no
16030 else
16031   echo "configure: failed program was:" >&5
16032   cat conftest.$ac_ext >&5
16033   rm -fr conftest*
16034   ol_cv_pthread_select_yields=yes
16035 fi
16036 rm -fr conftest*
16037 fi
16038
16039 fi
16040
16041 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16042
16043                                 if test $ol_cv_pthread_select_yields = cross ; then
16044                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16045                                 fi
16046
16047                                 if test $ol_cv_pthread_select_yields = yes ; then
16048                                         ol_with_yielding_select=yes
16049                                 fi
16050                         fi
16051
16052                                                 CPPFLAGS="$save_CPPFLAGS"
16053                         LIBS="$save_LIBS"
16054                 else
16055                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16056                 fi
16057         fi
16058
16059         if test $ol_with_threads = posix ; then
16060                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16061         fi
16062 fi
16063
16064 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16065         -o $ol_with_threads = mach ; then
16066
16067                 for ac_hdr in mach/cthreads.h cthreads.h
16068 do
16069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16071 echo "configure:16072: checking for $ac_hdr" >&5
16072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16073   echo $ac_n "(cached) $ac_c" 1>&6
16074 else
16075   cat > conftest.$ac_ext <<EOF
16076 #line 16077 "configure"
16077 #include "confdefs.h"
16078 #include <$ac_hdr>
16079 EOF
16080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16081 { (eval echo configure:16082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16083 if test -z "$ac_err"; then
16084   rm -rf conftest*
16085   eval "ac_cv_header_$ac_safe=yes"
16086 else
16087   echo "$ac_err" >&5
16088   echo "configure: failed program was:" >&5
16089   cat conftest.$ac_ext >&5
16090   rm -rf conftest*
16091   eval "ac_cv_header_$ac_safe=no"
16092 fi
16093 rm -f conftest*
16094 fi
16095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16096   echo "$ac_t""yes" 1>&6
16097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16098   cat >> confdefs.h <<EOF
16099 #define $ac_tr_hdr 1
16100 EOF
16101  
16102 else
16103   echo "$ac_t""no" 1>&6
16104 fi
16105 done
16106
16107         if test $ac_cv_header_mach_cthreads_h = yes ; then
16108                 ol_with_threads=found
16109
16110                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16111 echo "configure:16112: checking for cthread_fork" >&5
16112 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16113   echo $ac_n "(cached) $ac_c" 1>&6
16114 else
16115   cat > conftest.$ac_ext <<EOF
16116 #line 16117 "configure"
16117 #include "confdefs.h"
16118 /* System header to define __stub macros and hopefully few prototypes,
16119     which can conflict with char cthread_fork(); below.  */
16120 #include <assert.h>
16121 /* Override any gcc2 internal prototype to avoid an error.  */
16122 /* We use char because int might match the return type of a gcc2
16123     builtin and then its argument prototype would still apply.  */
16124 char cthread_fork();
16125 char (*f)();
16126
16127 int main() {
16128
16129 /* The GNU C library defines this for functions which it implements
16130     to always fail with ENOSYS.  Some functions are actually named
16131     something starting with __ and the normal name is an alias.  */
16132 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16133 choke me
16134 #else
16135 f = cthread_fork;
16136 #endif
16137
16138 ; return 0; }
16139 EOF
16140 if { (eval echo configure:16141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16141   rm -rf conftest*
16142   eval "ac_cv_func_cthread_fork=yes"
16143 else
16144   echo "configure: failed program was:" >&5
16145   cat conftest.$ac_ext >&5
16146   rm -rf conftest*
16147   eval "ac_cv_func_cthread_fork=no"
16148 fi
16149 rm -f conftest*
16150 fi
16151
16152 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16153   echo "$ac_t""yes" 1>&6
16154   ol_link_threads=yes
16155 else
16156   echo "$ac_t""no" 1>&6
16157 fi
16158
16159
16160                 if test $ol_link_threads = no ; then
16161                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16162 echo "configure:16163: checking for cthread_fork with -all_load" >&5
16163 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16164   echo $ac_n "(cached) $ac_c" 1>&6
16165 else
16166   
16167                                                                 save_LIBS="$LIBS"
16168                                 LIBS="-all_load $LIBS"
16169                                 cat > conftest.$ac_ext <<EOF
16170 #line 16171 "configure"
16171 #include "confdefs.h"
16172 #include <mach/cthreads.h>
16173 int main() {
16174
16175                                         cthread_fork((void *)0, (void *)0);
16176                                         
16177 ; return 0; }
16178 EOF
16179 if { (eval echo configure:16180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16180   rm -rf conftest*
16181   ol_cv_cthread_all_load=yes
16182 else
16183   echo "configure: failed program was:" >&5
16184   cat conftest.$ac_ext >&5
16185   rm -rf conftest*
16186   ol_cv_cthread_all_load=no
16187 fi
16188 rm -f conftest*
16189                                                                 LIBS="$save_LIBS"
16190                         
16191 fi
16192
16193 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16194
16195                         if test $ol_cv_cthread_all_load = yes ; then
16196                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16197                                 ol_link_threads=mach
16198                                 ol_with_threads=found
16199                         fi
16200                 fi
16201
16202         elif test $ac_cv_header_cthreads_h = yes ; then
16203                                 
16204                 ol_with_threads=found
16205  
16206                                 save_LIBS="$LIBS"
16207                 LIBS="$LIBS -lthreads"
16208                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16209 echo "configure:16210: checking for cthread_fork" >&5
16210 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16211   echo $ac_n "(cached) $ac_c" 1>&6
16212 else
16213   cat > conftest.$ac_ext <<EOF
16214 #line 16215 "configure"
16215 #include "confdefs.h"
16216 /* System header to define __stub macros and hopefully few prototypes,
16217     which can conflict with char cthread_fork(); below.  */
16218 #include <assert.h>
16219 /* Override any gcc2 internal prototype to avoid an error.  */
16220 /* We use char because int might match the return type of a gcc2
16221     builtin and then its argument prototype would still apply.  */
16222 char cthread_fork();
16223 char (*f)();
16224
16225 int main() {
16226
16227 /* The GNU C library defines this for functions which it implements
16228     to always fail with ENOSYS.  Some functions are actually named
16229     something starting with __ and the normal name is an alias.  */
16230 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16231 choke me
16232 #else
16233 f = cthread_fork;
16234 #endif
16235
16236 ; return 0; }
16237 EOF
16238 if { (eval echo configure:16239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16239   rm -rf conftest*
16240   eval "ac_cv_func_cthread_fork=yes"
16241 else
16242   echo "configure: failed program was:" >&5
16243   cat conftest.$ac_ext >&5
16244   rm -rf conftest*
16245   eval "ac_cv_func_cthread_fork=no"
16246 fi
16247 rm -f conftest*
16248 fi
16249
16250 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16251   echo "$ac_t""yes" 1>&6
16252   ol_link_threads=yes
16253 else
16254   echo "$ac_t""no" 1>&6
16255 fi
16256
16257                 LIBS="$save_LIBS"
16258
16259                 if test $ol_link_threads = yes ; then
16260                         LTHREAD_LIBS="-lthreads"
16261                         ol_link_threads=mach
16262                         ol_with_threads=found
16263                 else
16264                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16265                 fi
16266
16267         elif test $ol_with_threads = mach ; then
16268                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16269         fi
16270
16271         if test $ol_link_threads = mach ; then
16272                 cat >> confdefs.h <<\EOF
16273 #define HAVE_MACH_CTHREADS 1
16274 EOF
16275
16276         elif test $ol_with_threads = found ; then
16277                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16278         fi
16279 fi
16280
16281 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16282         -o $ol_with_threads = pth ; then
16283
16284         for ac_hdr in pth.h
16285 do
16286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16288 echo "configure:16289: checking for $ac_hdr" >&5
16289 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16290   echo $ac_n "(cached) $ac_c" 1>&6
16291 else
16292   cat > conftest.$ac_ext <<EOF
16293 #line 16294 "configure"
16294 #include "confdefs.h"
16295 #include <$ac_hdr>
16296 EOF
16297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16298 { (eval echo configure:16299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16300 if test -z "$ac_err"; then
16301   rm -rf conftest*
16302   eval "ac_cv_header_$ac_safe=yes"
16303 else
16304   echo "$ac_err" >&5
16305   echo "configure: failed program was:" >&5
16306   cat conftest.$ac_ext >&5
16307   rm -rf conftest*
16308   eval "ac_cv_header_$ac_safe=no"
16309 fi
16310 rm -f conftest*
16311 fi
16312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16313   echo "$ac_t""yes" 1>&6
16314     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16315   cat >> confdefs.h <<EOF
16316 #define $ac_tr_hdr 1
16317 EOF
16318  
16319 else
16320   echo "$ac_t""no" 1>&6
16321 fi
16322 done
16323
16324
16325         if test $ac_cv_header_pth_h = yes ; then
16326                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16327 echo "configure:16328: checking for pth_version in -lpth" >&5
16328 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16329 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16330   echo $ac_n "(cached) $ac_c" 1>&6
16331 else
16332   ac_save_LIBS="$LIBS"
16333 LIBS="-lpth  $LIBS"
16334 cat > conftest.$ac_ext <<EOF
16335 #line 16336 "configure"
16336 #include "confdefs.h"
16337 /* Override any gcc2 internal prototype to avoid an error.  */
16338 /* We use char because int might match the return type of a gcc2
16339     builtin and then its argument prototype would still apply.  */
16340 char pth_version();
16341
16342 int main() {
16343 pth_version()
16344 ; return 0; }
16345 EOF
16346 if { (eval echo configure:16347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16347   rm -rf conftest*
16348   eval "ac_cv_lib_$ac_lib_var=yes"
16349 else
16350   echo "configure: failed program was:" >&5
16351   cat conftest.$ac_ext >&5
16352   rm -rf conftest*
16353   eval "ac_cv_lib_$ac_lib_var=no"
16354 fi
16355 rm -f conftest*
16356 LIBS="$ac_save_LIBS"
16357
16358 fi
16359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16360   echo "$ac_t""yes" 1>&6
16361   have_pth=yes
16362 else
16363   echo "$ac_t""no" 1>&6
16364 have_pth=no
16365 fi
16366
16367
16368                 if test $have_pth = yes ; then
16369                         cat >> confdefs.h <<\EOF
16370 #define HAVE_GNU_PTH 1
16371 EOF
16372
16373                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16374                         ol_link_threads=pth
16375                         ol_with_threads=found
16376
16377                         if test $ol_with_yielding_select = auto ; then
16378                                 ol_with_yielding_select=yes
16379                         fi
16380                 fi
16381         fi
16382 fi
16383
16384 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16385         -o $ol_with_threads = lwp ; then
16386
16387                 for ac_hdr in thread.h synch.h
16388 do
16389 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16390 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16391 echo "configure:16392: checking for $ac_hdr" >&5
16392 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16393   echo $ac_n "(cached) $ac_c" 1>&6
16394 else
16395   cat > conftest.$ac_ext <<EOF
16396 #line 16397 "configure"
16397 #include "confdefs.h"
16398 #include <$ac_hdr>
16399 EOF
16400 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16401 { (eval echo configure:16402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16402 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16403 if test -z "$ac_err"; then
16404   rm -rf conftest*
16405   eval "ac_cv_header_$ac_safe=yes"
16406 else
16407   echo "$ac_err" >&5
16408   echo "configure: failed program was:" >&5
16409   cat conftest.$ac_ext >&5
16410   rm -rf conftest*
16411   eval "ac_cv_header_$ac_safe=no"
16412 fi
16413 rm -f conftest*
16414 fi
16415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16416   echo "$ac_t""yes" 1>&6
16417     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16418   cat >> confdefs.h <<EOF
16419 #define $ac_tr_hdr 1
16420 EOF
16421  
16422 else
16423   echo "$ac_t""no" 1>&6
16424 fi
16425 done
16426
16427         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16428                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16429 echo "configure:16430: checking for thr_create in -lthread" >&5
16430 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16432   echo $ac_n "(cached) $ac_c" 1>&6
16433 else
16434   ac_save_LIBS="$LIBS"
16435 LIBS="-lthread  $LIBS"
16436 cat > conftest.$ac_ext <<EOF
16437 #line 16438 "configure"
16438 #include "confdefs.h"
16439 /* Override any gcc2 internal prototype to avoid an error.  */
16440 /* We use char because int might match the return type of a gcc2
16441     builtin and then its argument prototype would still apply.  */
16442 char thr_create();
16443
16444 int main() {
16445 thr_create()
16446 ; return 0; }
16447 EOF
16448 if { (eval echo configure:16449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16449   rm -rf conftest*
16450   eval "ac_cv_lib_$ac_lib_var=yes"
16451 else
16452   echo "configure: failed program was:" >&5
16453   cat conftest.$ac_ext >&5
16454   rm -rf conftest*
16455   eval "ac_cv_lib_$ac_lib_var=no"
16456 fi
16457 rm -f conftest*
16458 LIBS="$ac_save_LIBS"
16459
16460 fi
16461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16462   echo "$ac_t""yes" 1>&6
16463   have_thr=yes
16464 else
16465   echo "$ac_t""no" 1>&6
16466 have_thr=no
16467 fi
16468
16469
16470                 if test $have_thr = yes ; then
16471                         cat >> confdefs.h <<\EOF
16472 #define HAVE_THR 1
16473 EOF
16474
16475                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16476                         ol_link_threads=thr
16477
16478                         if test $ol_with_yielding_select = auto ; then
16479                                 ol_with_yielding_select=yes
16480                         fi
16481
16482                                                 for ac_func in \
16483                                 thr_setconcurrency \
16484                                 thr_getconcurrency \
16485                         
16486 do
16487 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16488 echo "configure:16489: checking for $ac_func" >&5
16489 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16490   echo $ac_n "(cached) $ac_c" 1>&6
16491 else
16492   cat > conftest.$ac_ext <<EOF
16493 #line 16494 "configure"
16494 #include "confdefs.h"
16495 /* System header to define __stub macros and hopefully few prototypes,
16496     which can conflict with char $ac_func(); below.  */
16497 #include <assert.h>
16498 /* Override any gcc2 internal prototype to avoid an error.  */
16499 /* We use char because int might match the return type of a gcc2
16500     builtin and then its argument prototype would still apply.  */
16501 char $ac_func();
16502 char (*f)();
16503
16504 int main() {
16505
16506 /* The GNU C library defines this for functions which it implements
16507     to always fail with ENOSYS.  Some functions are actually named
16508     something starting with __ and the normal name is an alias.  */
16509 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16510 choke me
16511 #else
16512 f = $ac_func;
16513 #endif
16514
16515 ; return 0; }
16516 EOF
16517 if { (eval echo configure:16518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16518   rm -rf conftest*
16519   eval "ac_cv_func_$ac_func=yes"
16520 else
16521   echo "configure: failed program was:" >&5
16522   cat conftest.$ac_ext >&5
16523   rm -rf conftest*
16524   eval "ac_cv_func_$ac_func=no"
16525 fi
16526 rm -f conftest*
16527 fi
16528
16529 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16530   echo "$ac_t""yes" 1>&6
16531     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16532   cat >> confdefs.h <<EOF
16533 #define $ac_tr_func 1
16534 EOF
16535  
16536 else
16537   echo "$ac_t""no" 1>&6
16538 fi
16539 done
16540
16541                 fi
16542         fi
16543
16544                 for ac_hdr in lwp/lwp.h
16545 do
16546 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16547 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16548 echo "configure:16549: checking for $ac_hdr" >&5
16549 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16550   echo $ac_n "(cached) $ac_c" 1>&6
16551 else
16552   cat > conftest.$ac_ext <<EOF
16553 #line 16554 "configure"
16554 #include "confdefs.h"
16555 #include <$ac_hdr>
16556 EOF
16557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16558 { (eval echo configure:16559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16560 if test -z "$ac_err"; then
16561   rm -rf conftest*
16562   eval "ac_cv_header_$ac_safe=yes"
16563 else
16564   echo "$ac_err" >&5
16565   echo "configure: failed program was:" >&5
16566   cat conftest.$ac_ext >&5
16567   rm -rf conftest*
16568   eval "ac_cv_header_$ac_safe=no"
16569 fi
16570 rm -f conftest*
16571 fi
16572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16573   echo "$ac_t""yes" 1>&6
16574     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16575   cat >> confdefs.h <<EOF
16576 #define $ac_tr_hdr 1
16577 EOF
16578  
16579 else
16580   echo "$ac_t""no" 1>&6
16581 fi
16582 done
16583
16584         if test $ac_cv_header_lwp_lwp_h = yes ; then
16585                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16586 echo "configure:16587: checking for lwp_create in -llwp" >&5
16587 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16589   echo $ac_n "(cached) $ac_c" 1>&6
16590 else
16591   ac_save_LIBS="$LIBS"
16592 LIBS="-llwp  $LIBS"
16593 cat > conftest.$ac_ext <<EOF
16594 #line 16595 "configure"
16595 #include "confdefs.h"
16596 /* Override any gcc2 internal prototype to avoid an error.  */
16597 /* We use char because int might match the return type of a gcc2
16598     builtin and then its argument prototype would still apply.  */
16599 char lwp_create();
16600
16601 int main() {
16602 lwp_create()
16603 ; return 0; }
16604 EOF
16605 if { (eval echo configure:16606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16606   rm -rf conftest*
16607   eval "ac_cv_lib_$ac_lib_var=yes"
16608 else
16609   echo "configure: failed program was:" >&5
16610   cat conftest.$ac_ext >&5
16611   rm -rf conftest*
16612   eval "ac_cv_lib_$ac_lib_var=no"
16613 fi
16614 rm -f conftest*
16615 LIBS="$ac_save_LIBS"
16616
16617 fi
16618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16619   echo "$ac_t""yes" 1>&6
16620   have_lwp=yes
16621 else
16622   echo "$ac_t""no" 1>&6
16623 have_lwp=no
16624 fi
16625
16626
16627                 if test $have_lwp = yes ; then
16628                         cat >> confdefs.h <<\EOF
16629 #define HAVE_LWP 1
16630 EOF
16631
16632                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16633                         ol_link_threads=lwp
16634
16635                         if test $ol_with_yielding_select = auto ; then
16636                                 ol_with_yielding_select=no
16637                         fi
16638                 fi
16639         fi
16640 fi
16641
16642 if test $ol_with_yielding_select = yes ; then
16643         cat >> confdefs.h <<\EOF
16644 #define HAVE_YIELDING_SELECT 1
16645 EOF
16646
16647 fi
16648
16649 if test $ol_with_threads = manual ; then
16650                 ol_link_threads=yes
16651
16652         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16653
16654         for ac_hdr in pthread.h sched.h
16655 do
16656 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16657 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16658 echo "configure:16659: checking for $ac_hdr" >&5
16659 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16660   echo $ac_n "(cached) $ac_c" 1>&6
16661 else
16662   cat > conftest.$ac_ext <<EOF
16663 #line 16664 "configure"
16664 #include "confdefs.h"
16665 #include <$ac_hdr>
16666 EOF
16667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16668 { (eval echo configure:16669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16670 if test -z "$ac_err"; then
16671   rm -rf conftest*
16672   eval "ac_cv_header_$ac_safe=yes"
16673 else
16674   echo "$ac_err" >&5
16675   echo "configure: failed program was:" >&5
16676   cat conftest.$ac_ext >&5
16677   rm -rf conftest*
16678   eval "ac_cv_header_$ac_safe=no"
16679 fi
16680 rm -f conftest*
16681 fi
16682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16683   echo "$ac_t""yes" 1>&6
16684     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16685   cat >> confdefs.h <<EOF
16686 #define $ac_tr_hdr 1
16687 EOF
16688  
16689 else
16690   echo "$ac_t""no" 1>&6
16691 fi
16692 done
16693
16694         for ac_func in sched_yield pthread_yield
16695 do
16696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16697 echo "configure:16698: checking for $ac_func" >&5
16698 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16699   echo $ac_n "(cached) $ac_c" 1>&6
16700 else
16701   cat > conftest.$ac_ext <<EOF
16702 #line 16703 "configure"
16703 #include "confdefs.h"
16704 /* System header to define __stub macros and hopefully few prototypes,
16705     which can conflict with char $ac_func(); below.  */
16706 #include <assert.h>
16707 /* Override any gcc2 internal prototype to avoid an error.  */
16708 /* We use char because int might match the return type of a gcc2
16709     builtin and then its argument prototype would still apply.  */
16710 char $ac_func();
16711 char (*f)();
16712
16713 int main() {
16714
16715 /* The GNU C library defines this for functions which it implements
16716     to always fail with ENOSYS.  Some functions are actually named
16717     something starting with __ and the normal name is an alias.  */
16718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16719 choke me
16720 #else
16721 f = $ac_func;
16722 #endif
16723
16724 ; return 0; }
16725 EOF
16726 if { (eval echo configure:16727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16727   rm -rf conftest*
16728   eval "ac_cv_func_$ac_func=yes"
16729 else
16730   echo "configure: failed program was:" >&5
16731   cat conftest.$ac_ext >&5
16732   rm -rf conftest*
16733   eval "ac_cv_func_$ac_func=no"
16734 fi
16735 rm -f conftest*
16736 fi
16737
16738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16739   echo "$ac_t""yes" 1>&6
16740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16741   cat >> confdefs.h <<EOF
16742 #define $ac_tr_func 1
16743 EOF
16744  
16745 else
16746   echo "$ac_t""no" 1>&6
16747 fi
16748 done
16749
16750         
16751         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16752 echo "configure:16753: checking for LinuxThreads pthread.h" >&5
16753 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16754   echo $ac_n "(cached) $ac_c" 1>&6
16755 else
16756   cat > conftest.$ac_ext <<EOF
16757 #line 16758 "configure"
16758 #include "confdefs.h"
16759 #include <pthread.h>
16760 EOF
16761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16762   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16763   rm -rf conftest*
16764   ol_cv_header_linux_threads=yes
16765 else
16766   rm -rf conftest*
16767   ol_cv_header_linux_threads=no
16768 fi
16769 rm -f conftest*
16770
16771                 
16772 fi
16773
16774 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16775         if test $ol_cv_header_linux_threads = yes; then
16776                 cat >> confdefs.h <<\EOF
16777 #define HAVE_LINUX_THREADS 1
16778 EOF
16779
16780         fi
16781
16782
16783         for ac_hdr in mach/cthreads.h
16784 do
16785 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16786 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16787 echo "configure:16788: checking for $ac_hdr" >&5
16788 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16789   echo $ac_n "(cached) $ac_c" 1>&6
16790 else
16791   cat > conftest.$ac_ext <<EOF
16792 #line 16793 "configure"
16793 #include "confdefs.h"
16794 #include <$ac_hdr>
16795 EOF
16796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16797 { (eval echo configure:16798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16799 if test -z "$ac_err"; then
16800   rm -rf conftest*
16801   eval "ac_cv_header_$ac_safe=yes"
16802 else
16803   echo "$ac_err" >&5
16804   echo "configure: failed program was:" >&5
16805   cat conftest.$ac_ext >&5
16806   rm -rf conftest*
16807   eval "ac_cv_header_$ac_safe=no"
16808 fi
16809 rm -f conftest*
16810 fi
16811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16812   echo "$ac_t""yes" 1>&6
16813     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16814   cat >> confdefs.h <<EOF
16815 #define $ac_tr_hdr 1
16816 EOF
16817  
16818 else
16819   echo "$ac_t""no" 1>&6
16820 fi
16821 done
16822
16823         for ac_hdr in lwp/lwp.h
16824 do
16825 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16826 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16827 echo "configure:16828: checking for $ac_hdr" >&5
16828 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16829   echo $ac_n "(cached) $ac_c" 1>&6
16830 else
16831   cat > conftest.$ac_ext <<EOF
16832 #line 16833 "configure"
16833 #include "confdefs.h"
16834 #include <$ac_hdr>
16835 EOF
16836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16837 { (eval echo configure:16838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16839 if test -z "$ac_err"; then
16840   rm -rf conftest*
16841   eval "ac_cv_header_$ac_safe=yes"
16842 else
16843   echo "$ac_err" >&5
16844   echo "configure: failed program was:" >&5
16845   cat conftest.$ac_ext >&5
16846   rm -rf conftest*
16847   eval "ac_cv_header_$ac_safe=no"
16848 fi
16849 rm -f conftest*
16850 fi
16851 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16852   echo "$ac_t""yes" 1>&6
16853     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16854   cat >> confdefs.h <<EOF
16855 #define $ac_tr_hdr 1
16856 EOF
16857  
16858 else
16859   echo "$ac_t""no" 1>&6
16860 fi
16861 done
16862
16863         for ac_hdr in thread.h synch.h
16864 do
16865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16867 echo "configure:16868: checking for $ac_hdr" >&5
16868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16869   echo $ac_n "(cached) $ac_c" 1>&6
16870 else
16871   cat > conftest.$ac_ext <<EOF
16872 #line 16873 "configure"
16873 #include "confdefs.h"
16874 #include <$ac_hdr>
16875 EOF
16876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16877 { (eval echo configure:16878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16879 if test -z "$ac_err"; then
16880   rm -rf conftest*
16881   eval "ac_cv_header_$ac_safe=yes"
16882 else
16883   echo "$ac_err" >&5
16884   echo "configure: failed program was:" >&5
16885   cat conftest.$ac_ext >&5
16886   rm -rf conftest*
16887   eval "ac_cv_header_$ac_safe=no"
16888 fi
16889 rm -f conftest*
16890 fi
16891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16892   echo "$ac_t""yes" 1>&6
16893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16894   cat >> confdefs.h <<EOF
16895 #define $ac_tr_hdr 1
16896 EOF
16897  
16898 else
16899   echo "$ac_t""no" 1>&6
16900 fi
16901 done
16902
16903 fi
16904
16905 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16906                         cat >> confdefs.h <<\EOF
16907 #define REENTRANT 1
16908 EOF
16909
16910         cat >> confdefs.h <<\EOF
16911 #define _REENTRANT 1
16912 EOF
16913
16914         cat >> confdefs.h <<\EOF
16915 #define THREAD_SAFE 1
16916 EOF
16917
16918         cat >> confdefs.h <<\EOF
16919 #define _THREAD_SAFE 1
16920 EOF
16921
16922         cat >> confdefs.h <<\EOF
16923 #define THREADSAFE 1
16924 EOF
16925
16926         cat >> confdefs.h <<\EOF
16927 #define _THREADSAFE 1
16928 EOF
16929
16930         cat >> confdefs.h <<\EOF
16931 #define _SGI_MP_SOURCE 1
16932 EOF
16933
16934
16935                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16936 echo "configure:16937: checking for thread specific errno" >&5
16937 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16938   echo $ac_n "(cached) $ac_c" 1>&6
16939 else
16940   
16941                 cat > conftest.$ac_ext <<EOF
16942 #line 16943 "configure"
16943 #include "confdefs.h"
16944 #include <errno.h>
16945 int main() {
16946 errno = 0;
16947 ; return 0; }
16948 EOF
16949 if { (eval echo configure:16950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16950   rm -rf conftest*
16951   ol_cv_errno_thread_specific=yes
16952 else
16953   echo "configure: failed program was:" >&5
16954   cat conftest.$ac_ext >&5
16955   rm -rf conftest*
16956   ol_cv_errno_thread_specific=no
16957 fi
16958 rm -f conftest*
16959         
16960 fi
16961
16962 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16963
16964                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16965 echo "configure:16966: checking for thread specific h_errno" >&5
16966 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16967   echo $ac_n "(cached) $ac_c" 1>&6
16968 else
16969   
16970                 cat > conftest.$ac_ext <<EOF
16971 #line 16972 "configure"
16972 #include "confdefs.h"
16973 #include <netdb.h>
16974 int main() {
16975 h_errno = 0;
16976 ; return 0; }
16977 EOF
16978 if { (eval echo configure:16979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16979   rm -rf conftest*
16980   ol_cv_h_errno_thread_specific=yes
16981 else
16982   echo "configure: failed program was:" >&5
16983   cat conftest.$ac_ext >&5
16984   rm -rf conftest*
16985   ol_cv_h_errno_thread_specific=no
16986 fi
16987 rm -f conftest*
16988         
16989 fi
16990
16991 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16992
16993         if test $ol_cv_errno_thread_specific != yes \
16994                 -o $ol_cv_h_errno_thread_specific != yes ; then
16995                 LIBS="$LTHREAD_LIBS $LIBS"
16996                 LTHREAD_LIBS=""
16997         fi
16998
16999 fi  
17000
17001 if test $ol_link_threads = no ; then
17002         if test $ol_with_threads = yes ; then
17003                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
17004         fi
17005
17006         if test $ol_with_threads = auto ; then
17007                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
17008                 ol_with_threads=no
17009         fi
17010
17011         cat >> confdefs.h <<\EOF
17012 #define NO_THREADS 1
17013 EOF
17014
17015         LTHREAD_LIBS=""
17016 fi
17017
17018 if test $ol_link_threads != no ; then
17019         cat >> confdefs.h <<\EOF
17020 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17021 EOF
17022
17023 fi
17024
17025 ol_link_ldbm=no 
17026
17027 if test $ol_with_ldbm_api = auto \
17028         -o $ol_with_ldbm_api = berkeley \
17029         -o $ol_with_ldbm_api = bcompat ; then
17030
17031         if test $ol_with_ldbm_api = bcompat; then \
17032                 for ac_hdr in db_185.h db.h
17033 do
17034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17036 echo "configure:17037: checking for $ac_hdr" >&5
17037 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17038   echo $ac_n "(cached) $ac_c" 1>&6
17039 else
17040   cat > conftest.$ac_ext <<EOF
17041 #line 17042 "configure"
17042 #include "confdefs.h"
17043 #include <$ac_hdr>
17044 EOF
17045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17046 { (eval echo configure:17047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17048 if test -z "$ac_err"; then
17049   rm -rf conftest*
17050   eval "ac_cv_header_$ac_safe=yes"
17051 else
17052   echo "$ac_err" >&5
17053   echo "configure: failed program was:" >&5
17054   cat conftest.$ac_ext >&5
17055   rm -rf conftest*
17056   eval "ac_cv_header_$ac_safe=no"
17057 fi
17058 rm -f conftest*
17059 fi
17060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17061   echo "$ac_t""yes" 1>&6
17062     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17063   cat >> confdefs.h <<EOF
17064 #define $ac_tr_hdr 1
17065 EOF
17066  
17067 else
17068   echo "$ac_t""no" 1>&6
17069 fi
17070 done
17071
17072 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17073         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17074 echo "configure:17075: checking if Berkeley DB header compatibility" >&5
17075 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17076   echo $ac_n "(cached) $ac_c" 1>&6
17077 else
17078   
17079                 cat > conftest.$ac_ext <<EOF
17080 #line 17081 "configure"
17081 #include "confdefs.h"
17082
17083 #if HAVE_DB_185_H
17084 #       include <db_185.h>
17085 #else
17086 #       include <db.h>
17087 #endif
17088
17089  /* this check could be improved */
17090 #ifndef DB_VERSION_MAJOR
17091 #       define DB_VERSION_MAJOR 1
17092 #endif
17093
17094 #if DB_VERSION_MAJOR == 1 
17095         __db_version_1
17096 #endif
17097
17098 EOF
17099 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17100   egrep "__db_version_1" >/dev/null 2>&1; then
17101   rm -rf conftest*
17102   ol_cv_header_db1=yes
17103 else
17104   rm -rf conftest*
17105   ol_cv_header_db1=no
17106 fi
17107 rm -f conftest*
17108
17109 fi
17110
17111 echo "$ac_t""$ol_cv_header_db1" 1>&6
17112
17113         if test $ol_cv_header_db1 = yes ; then
17114                 ol_cv_lib_db=no
17115 if test $ol_cv_lib_db = no ; then
17116         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17117 echo "configure:17118: checking for Berkeley DB link (default)" >&5
17118 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17119   echo $ac_n "(cached) $ac_c" 1>&6
17120 else
17121   
17122         ol_DB_LIB=
17123         ol_LIBS=$LIBS
17124         LIBS="$ol_DB_LIB $LIBS"
17125
17126         cat > conftest.$ac_ext <<EOF
17127 #line 17128 "configure"
17128 #include "confdefs.h"
17129
17130 #ifdef HAVE_DB_185_H
17131 # include <db_185.h>
17132 #else
17133 # include <db.h>
17134 #endif
17135
17136 #ifndef DB_VERSION_MAJOR
17137 # define DB_VERSION_MAJOR 1
17138 #endif
17139
17140 #ifndef NULL
17141 #define NULL ((void*)0)
17142 #endif
17143
17144 int main() {
17145
17146 #if DB_VERSION_MAJOR > 1
17147         {
17148                 char *version;
17149                 int major, minor, patch;
17150
17151                 version = db_version( &major, &minor, &patch );
17152
17153                 if( major != DB_VERSION_MAJOR ||
17154                         minor < DB_VERSION_MINOR )
17155                 {
17156                         printf("Berkeley DB version mismatch\n"
17157                                 "\texpected: %s\n\tgot: %s\n",
17158                                 DB_VERSION_STRING, version);
17159                         return 1;
17160                 }
17161         }
17162 #endif
17163
17164 #if DB_VERSION_MAJOR > 2
17165         db_env_create( NULL, 0 );
17166 #elif DB_VERSION_MAJOR > 1
17167         db_appexit( NULL );
17168 #else
17169         (void) dbopen( NULL, 0, 0, 0, NULL);
17170 #endif
17171
17172 ; return 0; }
17173 EOF
17174 if { (eval echo configure:17175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17175   rm -rf conftest*
17176   ol_cv_db_none=yes
17177 else
17178   echo "configure: failed program was:" >&5
17179   cat conftest.$ac_ext >&5
17180   rm -rf conftest*
17181   ol_cv_db_none=no
17182 fi
17183 rm -f conftest*
17184
17185         LIBS="$ol_LIBS"
17186
17187 fi
17188
17189 echo "$ac_t""$ol_cv_db_none" 1>&6
17190
17191         if test $ol_cv_db_none = yes ; then
17192                 ol_cv_lib_db=yes
17193         fi
17194 fi
17195
17196 if test $ol_cv_lib_db = no ; then
17197         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17198 echo "configure:17199: checking for Berkeley DB link (-ldb4)" >&5
17199 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17200   echo $ac_n "(cached) $ac_c" 1>&6
17201 else
17202   
17203         ol_DB_LIB=-ldb4
17204         ol_LIBS=$LIBS
17205         LIBS="$ol_DB_LIB $LIBS"
17206
17207         cat > conftest.$ac_ext <<EOF
17208 #line 17209 "configure"
17209 #include "confdefs.h"
17210
17211 #ifdef HAVE_DB_185_H
17212 # include <db_185.h>
17213 #else
17214 # include <db.h>
17215 #endif
17216
17217 #ifndef DB_VERSION_MAJOR
17218 # define DB_VERSION_MAJOR 1
17219 #endif
17220
17221 #ifndef NULL
17222 #define NULL ((void*)0)
17223 #endif
17224
17225 int main() {
17226
17227 #if DB_VERSION_MAJOR > 1
17228         {
17229                 char *version;
17230                 int major, minor, patch;
17231
17232                 version = db_version( &major, &minor, &patch );
17233
17234                 if( major != DB_VERSION_MAJOR ||
17235                         minor < DB_VERSION_MINOR )
17236                 {
17237                         printf("Berkeley DB version mismatch\n"
17238                                 "\texpected: %s\n\tgot: %s\n",
17239                                 DB_VERSION_STRING, version);
17240                         return 1;
17241                 }
17242         }
17243 #endif
17244
17245 #if DB_VERSION_MAJOR > 2
17246         db_env_create( NULL, 0 );
17247 #elif DB_VERSION_MAJOR > 1
17248         db_appexit( NULL );
17249 #else
17250         (void) dbopen( NULL, 0, 0, 0, NULL);
17251 #endif
17252
17253 ; return 0; }
17254 EOF
17255 if { (eval echo configure:17256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17256   rm -rf conftest*
17257   ol_cv_db_db4=yes
17258 else
17259   echo "configure: failed program was:" >&5
17260   cat conftest.$ac_ext >&5
17261   rm -rf conftest*
17262   ol_cv_db_db4=no
17263 fi
17264 rm -f conftest*
17265
17266         LIBS="$ol_LIBS"
17267
17268 fi
17269
17270 echo "$ac_t""$ol_cv_db_db4" 1>&6
17271
17272         if test $ol_cv_db_db4 = yes ; then
17273                 ol_cv_lib_db=-ldb4
17274         fi
17275 fi
17276
17277 if test $ol_cv_lib_db = no ; then
17278         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17279 echo "configure:17280: checking for Berkeley DB link (-ldb)" >&5
17280 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17281   echo $ac_n "(cached) $ac_c" 1>&6
17282 else
17283   
17284         ol_DB_LIB=-ldb
17285         ol_LIBS=$LIBS
17286         LIBS="$ol_DB_LIB $LIBS"
17287
17288         cat > conftest.$ac_ext <<EOF
17289 #line 17290 "configure"
17290 #include "confdefs.h"
17291
17292 #ifdef HAVE_DB_185_H
17293 # include <db_185.h>
17294 #else
17295 # include <db.h>
17296 #endif
17297
17298 #ifndef DB_VERSION_MAJOR
17299 # define DB_VERSION_MAJOR 1
17300 #endif
17301
17302 #ifndef NULL
17303 #define NULL ((void*)0)
17304 #endif
17305
17306 int main() {
17307
17308 #if DB_VERSION_MAJOR > 1
17309         {
17310                 char *version;
17311                 int major, minor, patch;
17312
17313                 version = db_version( &major, &minor, &patch );
17314
17315                 if( major != DB_VERSION_MAJOR ||
17316                         minor < DB_VERSION_MINOR )
17317                 {
17318                         printf("Berkeley DB version mismatch\n"
17319                                 "\texpected: %s\n\tgot: %s\n",
17320                                 DB_VERSION_STRING, version);
17321                         return 1;
17322                 }
17323         }
17324 #endif
17325
17326 #if DB_VERSION_MAJOR > 2
17327         db_env_create( NULL, 0 );
17328 #elif DB_VERSION_MAJOR > 1
17329         db_appexit( NULL );
17330 #else
17331         (void) dbopen( NULL, 0, 0, 0, NULL);
17332 #endif
17333
17334 ; return 0; }
17335 EOF
17336 if { (eval echo configure:17337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17337   rm -rf conftest*
17338   ol_cv_db_db=yes
17339 else
17340   echo "configure: failed program was:" >&5
17341   cat conftest.$ac_ext >&5
17342   rm -rf conftest*
17343   ol_cv_db_db=no
17344 fi
17345 rm -f conftest*
17346
17347         LIBS="$ol_LIBS"
17348
17349 fi
17350
17351 echo "$ac_t""$ol_cv_db_db" 1>&6
17352
17353         if test $ol_cv_db_db = yes ; then
17354                 ol_cv_lib_db=-ldb
17355         fi
17356 fi
17357
17358 if test $ol_cv_lib_db = no ; then
17359         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17360 echo "configure:17361: checking for Berkeley DB link (-ldb3)" >&5
17361 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17362   echo $ac_n "(cached) $ac_c" 1>&6
17363 else
17364   
17365         ol_DB_LIB=-ldb3
17366         ol_LIBS=$LIBS
17367         LIBS="$ol_DB_LIB $LIBS"
17368
17369         cat > conftest.$ac_ext <<EOF
17370 #line 17371 "configure"
17371 #include "confdefs.h"
17372
17373 #ifdef HAVE_DB_185_H
17374 # include <db_185.h>
17375 #else
17376 # include <db.h>
17377 #endif
17378
17379 #ifndef DB_VERSION_MAJOR
17380 # define DB_VERSION_MAJOR 1
17381 #endif
17382
17383 #ifndef NULL
17384 #define NULL ((void*)0)
17385 #endif
17386
17387 int main() {
17388
17389 #if DB_VERSION_MAJOR > 1
17390         {
17391                 char *version;
17392                 int major, minor, patch;
17393
17394                 version = db_version( &major, &minor, &patch );
17395
17396                 if( major != DB_VERSION_MAJOR ||
17397                         minor < DB_VERSION_MINOR )
17398                 {
17399                         printf("Berkeley DB version mismatch\n"
17400                                 "\texpected: %s\n\tgot: %s\n",
17401                                 DB_VERSION_STRING, version);
17402                         return 1;
17403                 }
17404         }
17405 #endif
17406
17407 #if DB_VERSION_MAJOR > 2
17408         db_env_create( NULL, 0 );
17409 #elif DB_VERSION_MAJOR > 1
17410         db_appexit( NULL );
17411 #else
17412         (void) dbopen( NULL, 0, 0, 0, NULL);
17413 #endif
17414
17415 ; return 0; }
17416 EOF
17417 if { (eval echo configure:17418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17418   rm -rf conftest*
17419   ol_cv_db_db3=yes
17420 else
17421   echo "configure: failed program was:" >&5
17422   cat conftest.$ac_ext >&5
17423   rm -rf conftest*
17424   ol_cv_db_db3=no
17425 fi
17426 rm -f conftest*
17427
17428         LIBS="$ol_LIBS"
17429
17430 fi
17431
17432 echo "$ac_t""$ol_cv_db_db3" 1>&6
17433
17434         if test $ol_cv_db_db3 = yes ; then
17435                 ol_cv_lib_db=-ldb3
17436         fi
17437 fi
17438
17439 if test $ol_cv_lib_db = no ; then
17440         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17441 echo "configure:17442: checking for Berkeley DB link (-ldb2)" >&5
17442 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17443   echo $ac_n "(cached) $ac_c" 1>&6
17444 else
17445   
17446         ol_DB_LIB=-ldb2
17447         ol_LIBS=$LIBS
17448         LIBS="$ol_DB_LIB $LIBS"
17449
17450         cat > conftest.$ac_ext <<EOF
17451 #line 17452 "configure"
17452 #include "confdefs.h"
17453
17454 #ifdef HAVE_DB_185_H
17455 # include <db_185.h>
17456 #else
17457 # include <db.h>
17458 #endif
17459
17460 #ifndef DB_VERSION_MAJOR
17461 # define DB_VERSION_MAJOR 1
17462 #endif
17463
17464 #ifndef NULL
17465 #define NULL ((void*)0)
17466 #endif
17467
17468 int main() {
17469
17470 #if DB_VERSION_MAJOR > 1
17471         {
17472                 char *version;
17473                 int major, minor, patch;
17474
17475                 version = db_version( &major, &minor, &patch );
17476
17477                 if( major != DB_VERSION_MAJOR ||
17478                         minor < DB_VERSION_MINOR )
17479                 {
17480                         printf("Berkeley DB version mismatch\n"
17481                                 "\texpected: %s\n\tgot: %s\n",
17482                                 DB_VERSION_STRING, version);
17483                         return 1;
17484                 }
17485         }
17486 #endif
17487
17488 #if DB_VERSION_MAJOR > 2
17489         db_env_create( NULL, 0 );
17490 #elif DB_VERSION_MAJOR > 1
17491         db_appexit( NULL );
17492 #else
17493         (void) dbopen( NULL, 0, 0, 0, NULL);
17494 #endif
17495
17496 ; return 0; }
17497 EOF
17498 if { (eval echo configure:17499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17499   rm -rf conftest*
17500   ol_cv_db_db2=yes
17501 else
17502   echo "configure: failed program was:" >&5
17503   cat conftest.$ac_ext >&5
17504   rm -rf conftest*
17505   ol_cv_db_db2=no
17506 fi
17507 rm -f conftest*
17508
17509         LIBS="$ol_LIBS"
17510
17511 fi
17512
17513 echo "$ac_t""$ol_cv_db_db2" 1>&6
17514
17515         if test $ol_cv_db_db2 = yes ; then
17516                 ol_cv_lib_db=-ldb2
17517         fi
17518 fi
17519
17520 if test $ol_cv_lib_db = no ; then
17521         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17522 echo "configure:17523: checking for Berkeley DB link (-ldb1)" >&5
17523 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17524   echo $ac_n "(cached) $ac_c" 1>&6
17525 else
17526   
17527         ol_DB_LIB=-ldb1
17528         ol_LIBS=$LIBS
17529         LIBS="$ol_DB_LIB $LIBS"
17530
17531         cat > conftest.$ac_ext <<EOF
17532 #line 17533 "configure"
17533 #include "confdefs.h"
17534
17535 #ifdef HAVE_DB_185_H
17536 # include <db_185.h>
17537 #else
17538 # include <db.h>
17539 #endif
17540
17541 #ifndef DB_VERSION_MAJOR
17542 # define DB_VERSION_MAJOR 1
17543 #endif
17544
17545 #ifndef NULL
17546 #define NULL ((void*)0)
17547 #endif
17548
17549 int main() {
17550
17551 #if DB_VERSION_MAJOR > 1
17552         {
17553                 char *version;
17554                 int major, minor, patch;
17555
17556                 version = db_version( &major, &minor, &patch );
17557
17558                 if( major != DB_VERSION_MAJOR ||
17559                         minor < DB_VERSION_MINOR )
17560                 {
17561                         printf("Berkeley DB version mismatch\n"
17562                                 "\texpected: %s\n\tgot: %s\n",
17563                                 DB_VERSION_STRING, version);
17564                         return 1;
17565                 }
17566         }
17567 #endif
17568
17569 #if DB_VERSION_MAJOR > 2
17570         db_env_create( NULL, 0 );
17571 #elif DB_VERSION_MAJOR > 1
17572         db_appexit( NULL );
17573 #else
17574         (void) dbopen( NULL, 0, 0, 0, NULL);
17575 #endif
17576
17577 ; return 0; }
17578 EOF
17579 if { (eval echo configure:17580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17580   rm -rf conftest*
17581   ol_cv_db_db1=yes
17582 else
17583   echo "configure: failed program was:" >&5
17584   cat conftest.$ac_ext >&5
17585   rm -rf conftest*
17586   ol_cv_db_db1=no
17587 fi
17588 rm -f conftest*
17589
17590         LIBS="$ol_LIBS"
17591
17592 fi
17593
17594 echo "$ac_t""$ol_cv_db_db1" 1>&6
17595
17596         if test $ol_cv_db_db1 = yes ; then
17597                 ol_cv_lib_db=-ldb1
17598         fi
17599 fi
17600
17601
17602                 if test "$ol_cv_lib_db" != no ; then
17603                         ol_cv_berkeley_db=yes
17604                 fi
17605         fi
17606 fi
17607
17608         else
17609                 ol_cv_berkeley_db=no
17610 for ac_hdr in db.h
17611 do
17612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17614 echo "configure:17615: checking for $ac_hdr" >&5
17615 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17616   echo $ac_n "(cached) $ac_c" 1>&6
17617 else
17618   cat > conftest.$ac_ext <<EOF
17619 #line 17620 "configure"
17620 #include "confdefs.h"
17621 #include <$ac_hdr>
17622 EOF
17623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17624 { (eval echo configure:17625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17626 if test -z "$ac_err"; then
17627   rm -rf conftest*
17628   eval "ac_cv_header_$ac_safe=yes"
17629 else
17630   echo "$ac_err" >&5
17631   echo "configure: failed program was:" >&5
17632   cat conftest.$ac_ext >&5
17633   rm -rf conftest*
17634   eval "ac_cv_header_$ac_safe=no"
17635 fi
17636 rm -f conftest*
17637 fi
17638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17639   echo "$ac_t""yes" 1>&6
17640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17641   cat >> confdefs.h <<EOF
17642 #define $ac_tr_hdr 1
17643 EOF
17644  
17645 else
17646   echo "$ac_t""no" 1>&6
17647 fi
17648 done
17649
17650 if test $ac_cv_header_db_h = yes; then
17651         ol_cv_lib_db=no
17652 if test $ol_cv_lib_db = no ; then
17653         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17654 echo "configure:17655: checking for Berkeley DB link (default)" >&5
17655 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17656   echo $ac_n "(cached) $ac_c" 1>&6
17657 else
17658   
17659         ol_DB_LIB=
17660         ol_LIBS=$LIBS
17661         LIBS="$ol_DB_LIB $LIBS"
17662
17663         cat > conftest.$ac_ext <<EOF
17664 #line 17665 "configure"
17665 #include "confdefs.h"
17666
17667 #ifdef HAVE_DB_185_H
17668 # include <db_185.h>
17669 #else
17670 # include <db.h>
17671 #endif
17672
17673 #ifndef DB_VERSION_MAJOR
17674 # define DB_VERSION_MAJOR 1
17675 #endif
17676
17677 #ifndef NULL
17678 #define NULL ((void*)0)
17679 #endif
17680
17681 int main() {
17682
17683 #if DB_VERSION_MAJOR > 1
17684         {
17685                 char *version;
17686                 int major, minor, patch;
17687
17688                 version = db_version( &major, &minor, &patch );
17689
17690                 if( major != DB_VERSION_MAJOR ||
17691                         minor < DB_VERSION_MINOR )
17692                 {
17693                         printf("Berkeley DB version mismatch\n"
17694                                 "\texpected: %s\n\tgot: %s\n",
17695                                 DB_VERSION_STRING, version);
17696                         return 1;
17697                 }
17698         }
17699 #endif
17700
17701 #if DB_VERSION_MAJOR > 2
17702         db_env_create( NULL, 0 );
17703 #elif DB_VERSION_MAJOR > 1
17704         db_appexit( NULL );
17705 #else
17706         (void) dbopen( NULL, 0, 0, 0, NULL);
17707 #endif
17708
17709 ; return 0; }
17710 EOF
17711 if { (eval echo configure:17712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17712   rm -rf conftest*
17713   ol_cv_db_none=yes
17714 else
17715   echo "configure: failed program was:" >&5
17716   cat conftest.$ac_ext >&5
17717   rm -rf conftest*
17718   ol_cv_db_none=no
17719 fi
17720 rm -f conftest*
17721
17722         LIBS="$ol_LIBS"
17723
17724 fi
17725
17726 echo "$ac_t""$ol_cv_db_none" 1>&6
17727
17728         if test $ol_cv_db_none = yes ; then
17729                 ol_cv_lib_db=yes
17730         fi
17731 fi
17732
17733 if test $ol_cv_lib_db = no ; then
17734         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17735 echo "configure:17736: checking for Berkeley DB link (-ldb4)" >&5
17736 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17737   echo $ac_n "(cached) $ac_c" 1>&6
17738 else
17739   
17740         ol_DB_LIB=-ldb4
17741         ol_LIBS=$LIBS
17742         LIBS="$ol_DB_LIB $LIBS"
17743
17744         cat > conftest.$ac_ext <<EOF
17745 #line 17746 "configure"
17746 #include "confdefs.h"
17747
17748 #ifdef HAVE_DB_185_H
17749 # include <db_185.h>
17750 #else
17751 # include <db.h>
17752 #endif
17753
17754 #ifndef DB_VERSION_MAJOR
17755 # define DB_VERSION_MAJOR 1
17756 #endif
17757
17758 #ifndef NULL
17759 #define NULL ((void*)0)
17760 #endif
17761
17762 int main() {
17763
17764 #if DB_VERSION_MAJOR > 1
17765         {
17766                 char *version;
17767                 int major, minor, patch;
17768
17769                 version = db_version( &major, &minor, &patch );
17770
17771                 if( major != DB_VERSION_MAJOR ||
17772                         minor < DB_VERSION_MINOR )
17773                 {
17774                         printf("Berkeley DB version mismatch\n"
17775                                 "\texpected: %s\n\tgot: %s\n",
17776                                 DB_VERSION_STRING, version);
17777                         return 1;
17778                 }
17779         }
17780 #endif
17781
17782 #if DB_VERSION_MAJOR > 2
17783         db_env_create( NULL, 0 );
17784 #elif DB_VERSION_MAJOR > 1
17785         db_appexit( NULL );
17786 #else
17787         (void) dbopen( NULL, 0, 0, 0, NULL);
17788 #endif
17789
17790 ; return 0; }
17791 EOF
17792 if { (eval echo configure:17793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17793   rm -rf conftest*
17794   ol_cv_db_db4=yes
17795 else
17796   echo "configure: failed program was:" >&5
17797   cat conftest.$ac_ext >&5
17798   rm -rf conftest*
17799   ol_cv_db_db4=no
17800 fi
17801 rm -f conftest*
17802
17803         LIBS="$ol_LIBS"
17804
17805 fi
17806
17807 echo "$ac_t""$ol_cv_db_db4" 1>&6
17808
17809         if test $ol_cv_db_db4 = yes ; then
17810                 ol_cv_lib_db=-ldb4
17811         fi
17812 fi
17813
17814 if test $ol_cv_lib_db = no ; then
17815         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17816 echo "configure:17817: checking for Berkeley DB link (-ldb)" >&5
17817 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17818   echo $ac_n "(cached) $ac_c" 1>&6
17819 else
17820   
17821         ol_DB_LIB=-ldb
17822         ol_LIBS=$LIBS
17823         LIBS="$ol_DB_LIB $LIBS"
17824
17825         cat > conftest.$ac_ext <<EOF
17826 #line 17827 "configure"
17827 #include "confdefs.h"
17828
17829 #ifdef HAVE_DB_185_H
17830 # include <db_185.h>
17831 #else
17832 # include <db.h>
17833 #endif
17834
17835 #ifndef DB_VERSION_MAJOR
17836 # define DB_VERSION_MAJOR 1
17837 #endif
17838
17839 #ifndef NULL
17840 #define NULL ((void*)0)
17841 #endif
17842
17843 int main() {
17844
17845 #if DB_VERSION_MAJOR > 1
17846         {
17847                 char *version;
17848                 int major, minor, patch;
17849
17850                 version = db_version( &major, &minor, &patch );
17851
17852                 if( major != DB_VERSION_MAJOR ||
17853                         minor < DB_VERSION_MINOR )
17854                 {
17855                         printf("Berkeley DB version mismatch\n"
17856                                 "\texpected: %s\n\tgot: %s\n",
17857                                 DB_VERSION_STRING, version);
17858                         return 1;
17859                 }
17860         }
17861 #endif
17862
17863 #if DB_VERSION_MAJOR > 2
17864         db_env_create( NULL, 0 );
17865 #elif DB_VERSION_MAJOR > 1
17866         db_appexit( NULL );
17867 #else
17868         (void) dbopen( NULL, 0, 0, 0, NULL);
17869 #endif
17870
17871 ; return 0; }
17872 EOF
17873 if { (eval echo configure:17874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17874   rm -rf conftest*
17875   ol_cv_db_db=yes
17876 else
17877   echo "configure: failed program was:" >&5
17878   cat conftest.$ac_ext >&5
17879   rm -rf conftest*
17880   ol_cv_db_db=no
17881 fi
17882 rm -f conftest*
17883
17884         LIBS="$ol_LIBS"
17885
17886 fi
17887
17888 echo "$ac_t""$ol_cv_db_db" 1>&6
17889
17890         if test $ol_cv_db_db = yes ; then
17891                 ol_cv_lib_db=-ldb
17892         fi
17893 fi
17894
17895 if test $ol_cv_lib_db = no ; then
17896         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17897 echo "configure:17898: checking for Berkeley DB link (-ldb3)" >&5
17898 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17899   echo $ac_n "(cached) $ac_c" 1>&6
17900 else
17901   
17902         ol_DB_LIB=-ldb3
17903         ol_LIBS=$LIBS
17904         LIBS="$ol_DB_LIB $LIBS"
17905
17906         cat > conftest.$ac_ext <<EOF
17907 #line 17908 "configure"
17908 #include "confdefs.h"
17909
17910 #ifdef HAVE_DB_185_H
17911 # include <db_185.h>
17912 #else
17913 # include <db.h>
17914 #endif
17915
17916 #ifndef DB_VERSION_MAJOR
17917 # define DB_VERSION_MAJOR 1
17918 #endif
17919
17920 #ifndef NULL
17921 #define NULL ((void*)0)
17922 #endif
17923
17924 int main() {
17925
17926 #if DB_VERSION_MAJOR > 1
17927         {
17928                 char *version;
17929                 int major, minor, patch;
17930
17931                 version = db_version( &major, &minor, &patch );
17932
17933                 if( major != DB_VERSION_MAJOR ||
17934                         minor < DB_VERSION_MINOR )
17935                 {
17936                         printf("Berkeley DB version mismatch\n"
17937                                 "\texpected: %s\n\tgot: %s\n",
17938                                 DB_VERSION_STRING, version);
17939                         return 1;
17940                 }
17941         }
17942 #endif
17943
17944 #if DB_VERSION_MAJOR > 2
17945         db_env_create( NULL, 0 );
17946 #elif DB_VERSION_MAJOR > 1
17947         db_appexit( NULL );
17948 #else
17949         (void) dbopen( NULL, 0, 0, 0, NULL);
17950 #endif
17951
17952 ; return 0; }
17953 EOF
17954 if { (eval echo configure:17955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17955   rm -rf conftest*
17956   ol_cv_db_db3=yes
17957 else
17958   echo "configure: failed program was:" >&5
17959   cat conftest.$ac_ext >&5
17960   rm -rf conftest*
17961   ol_cv_db_db3=no
17962 fi
17963 rm -f conftest*
17964
17965         LIBS="$ol_LIBS"
17966
17967 fi
17968
17969 echo "$ac_t""$ol_cv_db_db3" 1>&6
17970
17971         if test $ol_cv_db_db3 = yes ; then
17972                 ol_cv_lib_db=-ldb3
17973         fi
17974 fi
17975
17976 if test $ol_cv_lib_db = no ; then
17977         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17978 echo "configure:17979: checking for Berkeley DB link (-ldb2)" >&5
17979 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17980   echo $ac_n "(cached) $ac_c" 1>&6
17981 else
17982   
17983         ol_DB_LIB=-ldb2
17984         ol_LIBS=$LIBS
17985         LIBS="$ol_DB_LIB $LIBS"
17986
17987         cat > conftest.$ac_ext <<EOF
17988 #line 17989 "configure"
17989 #include "confdefs.h"
17990
17991 #ifdef HAVE_DB_185_H
17992 # include <db_185.h>
17993 #else
17994 # include <db.h>
17995 #endif
17996
17997 #ifndef DB_VERSION_MAJOR
17998 # define DB_VERSION_MAJOR 1
17999 #endif
18000
18001 #ifndef NULL
18002 #define NULL ((void*)0)
18003 #endif
18004
18005 int main() {
18006
18007 #if DB_VERSION_MAJOR > 1
18008         {
18009                 char *version;
18010                 int major, minor, patch;
18011
18012                 version = db_version( &major, &minor, &patch );
18013
18014                 if( major != DB_VERSION_MAJOR ||
18015                         minor < DB_VERSION_MINOR )
18016                 {
18017                         printf("Berkeley DB version mismatch\n"
18018                                 "\texpected: %s\n\tgot: %s\n",
18019                                 DB_VERSION_STRING, version);
18020                         return 1;
18021                 }
18022         }
18023 #endif
18024
18025 #if DB_VERSION_MAJOR > 2
18026         db_env_create( NULL, 0 );
18027 #elif DB_VERSION_MAJOR > 1
18028         db_appexit( NULL );
18029 #else
18030         (void) dbopen( NULL, 0, 0, 0, NULL);
18031 #endif
18032
18033 ; return 0; }
18034 EOF
18035 if { (eval echo configure:18036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18036   rm -rf conftest*
18037   ol_cv_db_db2=yes
18038 else
18039   echo "configure: failed program was:" >&5
18040   cat conftest.$ac_ext >&5
18041   rm -rf conftest*
18042   ol_cv_db_db2=no
18043 fi
18044 rm -f conftest*
18045
18046         LIBS="$ol_LIBS"
18047
18048 fi
18049
18050 echo "$ac_t""$ol_cv_db_db2" 1>&6
18051
18052         if test $ol_cv_db_db2 = yes ; then
18053                 ol_cv_lib_db=-ldb2
18054         fi
18055 fi
18056
18057 if test $ol_cv_lib_db = no ; then
18058         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18059 echo "configure:18060: checking for Berkeley DB link (-ldb1)" >&5
18060 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18061   echo $ac_n "(cached) $ac_c" 1>&6
18062 else
18063   
18064         ol_DB_LIB=-ldb1
18065         ol_LIBS=$LIBS
18066         LIBS="$ol_DB_LIB $LIBS"
18067
18068         cat > conftest.$ac_ext <<EOF
18069 #line 18070 "configure"
18070 #include "confdefs.h"
18071
18072 #ifdef HAVE_DB_185_H
18073 # include <db_185.h>
18074 #else
18075 # include <db.h>
18076 #endif
18077
18078 #ifndef DB_VERSION_MAJOR
18079 # define DB_VERSION_MAJOR 1
18080 #endif
18081
18082 #ifndef NULL
18083 #define NULL ((void*)0)
18084 #endif
18085
18086 int main() {
18087
18088 #if DB_VERSION_MAJOR > 1
18089         {
18090                 char *version;
18091                 int major, minor, patch;
18092
18093                 version = db_version( &major, &minor, &patch );
18094
18095                 if( major != DB_VERSION_MAJOR ||
18096                         minor < DB_VERSION_MINOR )
18097                 {
18098                         printf("Berkeley DB version mismatch\n"
18099                                 "\texpected: %s\n\tgot: %s\n",
18100                                 DB_VERSION_STRING, version);
18101                         return 1;
18102                 }
18103         }
18104 #endif
18105
18106 #if DB_VERSION_MAJOR > 2
18107         db_env_create( NULL, 0 );
18108 #elif DB_VERSION_MAJOR > 1
18109         db_appexit( NULL );
18110 #else
18111         (void) dbopen( NULL, 0, 0, 0, NULL);
18112 #endif
18113
18114 ; return 0; }
18115 EOF
18116 if { (eval echo configure:18117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18117   rm -rf conftest*
18118   ol_cv_db_db1=yes
18119 else
18120   echo "configure: failed program was:" >&5
18121   cat conftest.$ac_ext >&5
18122   rm -rf conftest*
18123   ol_cv_db_db1=no
18124 fi
18125 rm -f conftest*
18126
18127         LIBS="$ol_LIBS"
18128
18129 fi
18130
18131 echo "$ac_t""$ol_cv_db_db1" 1>&6
18132
18133         if test $ol_cv_db_db1 = yes ; then
18134                 ol_cv_lib_db=-ldb1
18135         fi
18136 fi
18137
18138
18139         if test "$ol_cv_lib_db" != no ; then
18140                 ol_cv_berkeley_db=yes
18141                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18142 echo "configure:18143: checking for Berkeley DB thread support" >&5
18143 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18144   echo $ac_n "(cached) $ac_c" 1>&6
18145 else
18146   
18147         ol_LIBS="$LIBS"
18148         if test $ol_cv_lib_db != yes ; then
18149                 LIBS="$ol_cv_lib_db"
18150         fi
18151
18152         if test "$cross_compiling" = yes; then
18153   ol_cv_berkeley_db_thread=cross
18154 else
18155   cat > conftest.$ac_ext <<EOF
18156 #line 18157 "configure"
18157 #include "confdefs.h"
18158
18159 #ifdef HAVE_DB_185_H
18160         choke me;
18161 #else
18162 #include <db.h>
18163 #endif
18164 #ifndef NULL
18165 #define NULL ((void *)0)
18166 #endif
18167 main()
18168 {
18169         int rc;
18170         u_int32_t flags = DB_CREATE |
18171 #ifdef DB_PRIVATE
18172                 DB_PRIVATE |
18173 #endif
18174                 DB_THREAD;
18175
18176 #if DB_VERSION_MAJOR > 2
18177         DB_ENV *env = NULL;
18178
18179         rc = db_env_create( &env, 0 );
18180
18181         flags |= DB_INIT_MPOOL;
18182 #ifdef DB_MPOOL_PRIVATE
18183         flags |= DB_MPOOL_PRIVATE;
18184 #endif
18185
18186         if( rc ) {
18187                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18188                 return rc;
18189         }
18190
18191 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18192         rc = env->open( env, NULL, flags, 0 );
18193 #else
18194         rc = env->open( env, NULL, NULL, flags, 0 );
18195 #endif
18196
18197         if ( rc == 0 ) {
18198                 rc = env->close( env, 0 );
18199         }
18200
18201         if( rc ) {
18202                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18203                 return rc;
18204         }
18205
18206 #else
18207         DB_ENV env;
18208         memset( &env, '\0', sizeof(env) );
18209
18210         rc = db_appinit( NULL, NULL, &env, flags );
18211
18212         if( rc == 0 ) {
18213                 db_appexit( &env );
18214         }
18215
18216         unlink("__db_mpool.share");
18217         unlink("__db_lock.share");
18218 #endif
18219
18220         return rc;
18221 }
18222 EOF
18223 if { (eval echo configure:18224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18224 then
18225   ol_cv_berkeley_db_thread=yes
18226 else
18227   echo "configure: failed program was:" >&5
18228   cat conftest.$ac_ext >&5
18229   rm -fr conftest*
18230   ol_cv_berkeley_db_thread=no
18231 fi
18232 rm -fr conftest*
18233 fi
18234
18235
18236         LIBS="$ol_LIBS"
18237
18238         if test $ol_cv_berkeley_db_thread != no ; then
18239                 cat >> confdefs.h <<\EOF
18240 #define HAVE_BERKELEY_DB_THREAD 1
18241 EOF
18242
18243         fi
18244
18245 fi
18246
18247 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18248         fi
18249 fi
18250
18251         fi
18252
18253         if test $ol_cv_berkeley_db != no ; then
18254                 cat >> confdefs.h <<\EOF
18255 #define HAVE_BERKELEY_DB 1
18256 EOF
18257
18258
18259                 ol_link_ldbm=berkeley
18260                 ol_with_ldbm_api=berkeley
18261
18262                 if test $ol_with_ldbm_type = hash ; then
18263                         cat >> confdefs.h <<\EOF
18264 #define LDBM_USE_DBHASH 1
18265 EOF
18266
18267                 else
18268                         cat >> confdefs.h <<\EOF
18269 #define LDBM_USE_DBBTREE 1
18270 EOF
18271
18272                 fi
18273
18274                                                 if test $ol_cv_lib_db != yes ; then
18275                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18276                 fi
18277         fi
18278 fi
18279
18280 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18281         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18282 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18283         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18284 echo "configure:18285: checking Berkeley DB version for BDB backend" >&5
18285 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18286   echo $ac_n "(cached) $ac_c" 1>&6
18287 else
18288   
18289         cat > conftest.$ac_ext <<EOF
18290 #line 18291 "configure"
18291 #include "confdefs.h"
18292
18293 #include <db.h>
18294
18295  /* this check could be improved */
18296 #ifndef DB_VERSION_MAJOR
18297 #       define DB_VERSION_MAJOR 1
18298 #endif
18299
18300 /* require 4.0 or later */
18301 #if DB_VERSION_MAJOR >= 4 
18302         __db_version_compat
18303 #endif
18304         
18305 EOF
18306 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18307   egrep "__db_version_compat" >/dev/null 2>&1; then
18308   rm -rf conftest*
18309   ol_cv_bdb_compat=yes
18310 else
18311   rm -rf conftest*
18312   ol_cv_bdb_compat=no
18313 fi
18314 rm -f conftest*
18315
18316 fi
18317
18318 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18319
18320
18321         if test $ol_cv_bdb_compat = yes ; then
18322                 ol_enable_bdb=yes
18323         elif test $ol_enable_bdb = yes ; then
18324                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18325         else
18326                 ol_enable_bdb=no
18327         fi
18328 fi
18329
18330 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18331         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18332         ol_with_ldbm_api=none
18333 fi
18334
18335 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18336         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18337 echo "configure:18338: checking for MDBM library" >&5
18338 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18339   echo $ac_n "(cached) $ac_c" 1>&6
18340 else
18341         ol_LIBS="$LIBS"
18342         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18343 echo "configure:18344: checking for mdbm_set_chain" >&5
18344 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18345   echo $ac_n "(cached) $ac_c" 1>&6
18346 else
18347   cat > conftest.$ac_ext <<EOF
18348 #line 18349 "configure"
18349 #include "confdefs.h"
18350 /* System header to define __stub macros and hopefully few prototypes,
18351     which can conflict with char mdbm_set_chain(); below.  */
18352 #include <assert.h>
18353 /* Override any gcc2 internal prototype to avoid an error.  */
18354 /* We use char because int might match the return type of a gcc2
18355     builtin and then its argument prototype would still apply.  */
18356 char mdbm_set_chain();
18357 char (*f)();
18358
18359 int main() {
18360
18361 /* The GNU C library defines this for functions which it implements
18362     to always fail with ENOSYS.  Some functions are actually named
18363     something starting with __ and the normal name is an alias.  */
18364 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18365 choke me
18366 #else
18367 f = mdbm_set_chain;
18368 #endif
18369
18370 ; return 0; }
18371 EOF
18372 if { (eval echo configure:18373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18373   rm -rf conftest*
18374   eval "ac_cv_func_mdbm_set_chain=yes"
18375 else
18376   echo "configure: failed program was:" >&5
18377   cat conftest.$ac_ext >&5
18378   rm -rf conftest*
18379   eval "ac_cv_func_mdbm_set_chain=no"
18380 fi
18381 rm -f conftest*
18382 fi
18383
18384 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18385   echo "$ac_t""yes" 1>&6
18386   ol_cv_lib_mdbm=yes
18387 else
18388   echo "$ac_t""no" 1>&6
18389
18390                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18391 echo "configure:18392: checking for mdbm_set_chain in -lmdbm" >&5
18392 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18394   echo $ac_n "(cached) $ac_c" 1>&6
18395 else
18396   ac_save_LIBS="$LIBS"
18397 LIBS="-lmdbm  $LIBS"
18398 cat > conftest.$ac_ext <<EOF
18399 #line 18400 "configure"
18400 #include "confdefs.h"
18401 /* Override any gcc2 internal prototype to avoid an error.  */
18402 /* We use char because int might match the return type of a gcc2
18403     builtin and then its argument prototype would still apply.  */
18404 char mdbm_set_chain();
18405
18406 int main() {
18407 mdbm_set_chain()
18408 ; return 0; }
18409 EOF
18410 if { (eval echo configure:18411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18411   rm -rf conftest*
18412   eval "ac_cv_lib_$ac_lib_var=yes"
18413 else
18414   echo "configure: failed program was:" >&5
18415   cat conftest.$ac_ext >&5
18416   rm -rf conftest*
18417   eval "ac_cv_lib_$ac_lib_var=no"
18418 fi
18419 rm -f conftest*
18420 LIBS="$ac_save_LIBS"
18421
18422 fi
18423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18424   echo "$ac_t""yes" 1>&6
18425   ol_cv_lib_mdbm=-lmdbm
18426 else
18427   echo "$ac_t""no" 1>&6
18428 ol_cv_lib_mdbm=no
18429 fi
18430
18431         
18432 fi
18433
18434         LIBS="$ol_LIBS"
18435
18436 fi
18437
18438 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18439
18440
18441  for ac_hdr in mdbm.h
18442 do
18443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18445 echo "configure:18446: checking for $ac_hdr" >&5
18446 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18447   echo $ac_n "(cached) $ac_c" 1>&6
18448 else
18449   cat > conftest.$ac_ext <<EOF
18450 #line 18451 "configure"
18451 #include "confdefs.h"
18452 #include <$ac_hdr>
18453 EOF
18454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18455 { (eval echo configure:18456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18457 if test -z "$ac_err"; then
18458   rm -rf conftest*
18459   eval "ac_cv_header_$ac_safe=yes"
18460 else
18461   echo "$ac_err" >&5
18462   echo "configure: failed program was:" >&5
18463   cat conftest.$ac_ext >&5
18464   rm -rf conftest*
18465   eval "ac_cv_header_$ac_safe=no"
18466 fi
18467 rm -f conftest*
18468 fi
18469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18470   echo "$ac_t""yes" 1>&6
18471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18472   cat >> confdefs.h <<EOF
18473 #define $ac_tr_hdr 1
18474 EOF
18475  
18476 else
18477   echo "$ac_t""no" 1>&6
18478 fi
18479 done
18480
18481  echo $ac_n "checking for db""... $ac_c" 1>&6
18482 echo "configure:18483: checking for db" >&5
18483 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18484   echo $ac_n "(cached) $ac_c" 1>&6
18485 else
18486   
18487         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18488                 ol_cv_mdbm=no
18489         else
18490                 ol_cv_mdbm=yes
18491         fi
18492
18493 fi
18494
18495 echo "$ac_t""$ol_cv_mdbm" 1>&6
18496  if test $ol_cv_mdbm = yes ; then
18497         cat >> confdefs.h <<\EOF
18498 #define HAVE_MDBM 1
18499 EOF
18500
18501  fi
18502
18503
18504         if test $ol_cv_mdbm = yes ; then
18505                 ol_link_ldbm=mdbm
18506                 ol_with_ldbm_api=mdbm
18507                 if test $ol_cv_lib_mdbm != yes ; then
18508                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18509                 fi
18510         fi
18511 fi
18512
18513 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18514         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18515 echo "configure:18516: checking for GDBM library" >&5
18516 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18517   echo $ac_n "(cached) $ac_c" 1>&6
18518 else
18519         ol_LIBS="$LIBS"
18520         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18521 echo "configure:18522: checking for gdbm_open" >&5
18522 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18523   echo $ac_n "(cached) $ac_c" 1>&6
18524 else
18525   cat > conftest.$ac_ext <<EOF
18526 #line 18527 "configure"
18527 #include "confdefs.h"
18528 /* System header to define __stub macros and hopefully few prototypes,
18529     which can conflict with char gdbm_open(); below.  */
18530 #include <assert.h>
18531 /* Override any gcc2 internal prototype to avoid an error.  */
18532 /* We use char because int might match the return type of a gcc2
18533     builtin and then its argument prototype would still apply.  */
18534 char gdbm_open();
18535 char (*f)();
18536
18537 int main() {
18538
18539 /* The GNU C library defines this for functions which it implements
18540     to always fail with ENOSYS.  Some functions are actually named
18541     something starting with __ and the normal name is an alias.  */
18542 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18543 choke me
18544 #else
18545 f = gdbm_open;
18546 #endif
18547
18548 ; return 0; }
18549 EOF
18550 if { (eval echo configure:18551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18551   rm -rf conftest*
18552   eval "ac_cv_func_gdbm_open=yes"
18553 else
18554   echo "configure: failed program was:" >&5
18555   cat conftest.$ac_ext >&5
18556   rm -rf conftest*
18557   eval "ac_cv_func_gdbm_open=no"
18558 fi
18559 rm -f conftest*
18560 fi
18561
18562 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18563   echo "$ac_t""yes" 1>&6
18564   ol_cv_lib_gdbm=yes
18565 else
18566   echo "$ac_t""no" 1>&6
18567
18568                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18569 echo "configure:18570: checking for gdbm_open in -lgdbm" >&5
18570 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18572   echo $ac_n "(cached) $ac_c" 1>&6
18573 else
18574   ac_save_LIBS="$LIBS"
18575 LIBS="-lgdbm  $LIBS"
18576 cat > conftest.$ac_ext <<EOF
18577 #line 18578 "configure"
18578 #include "confdefs.h"
18579 /* Override any gcc2 internal prototype to avoid an error.  */
18580 /* We use char because int might match the return type of a gcc2
18581     builtin and then its argument prototype would still apply.  */
18582 char gdbm_open();
18583
18584 int main() {
18585 gdbm_open()
18586 ; return 0; }
18587 EOF
18588 if { (eval echo configure:18589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18589   rm -rf conftest*
18590   eval "ac_cv_lib_$ac_lib_var=yes"
18591 else
18592   echo "configure: failed program was:" >&5
18593   cat conftest.$ac_ext >&5
18594   rm -rf conftest*
18595   eval "ac_cv_lib_$ac_lib_var=no"
18596 fi
18597 rm -f conftest*
18598 LIBS="$ac_save_LIBS"
18599
18600 fi
18601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18602   echo "$ac_t""yes" 1>&6
18603   ol_cv_lib_gdbm=-lgdbm
18604 else
18605   echo "$ac_t""no" 1>&6
18606 ol_cv_lib_gdbm=no
18607 fi
18608
18609         
18610 fi
18611
18612         LIBS="$ol_LIBS"
18613
18614 fi
18615
18616 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18617
18618
18619  for ac_hdr in gdbm.h
18620 do
18621 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18622 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18623 echo "configure:18624: checking for $ac_hdr" >&5
18624 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18625   echo $ac_n "(cached) $ac_c" 1>&6
18626 else
18627   cat > conftest.$ac_ext <<EOF
18628 #line 18629 "configure"
18629 #include "confdefs.h"
18630 #include <$ac_hdr>
18631 EOF
18632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18633 { (eval echo configure:18634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18635 if test -z "$ac_err"; then
18636   rm -rf conftest*
18637   eval "ac_cv_header_$ac_safe=yes"
18638 else
18639   echo "$ac_err" >&5
18640   echo "configure: failed program was:" >&5
18641   cat conftest.$ac_ext >&5
18642   rm -rf conftest*
18643   eval "ac_cv_header_$ac_safe=no"
18644 fi
18645 rm -f conftest*
18646 fi
18647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18648   echo "$ac_t""yes" 1>&6
18649     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18650   cat >> confdefs.h <<EOF
18651 #define $ac_tr_hdr 1
18652 EOF
18653  
18654 else
18655   echo "$ac_t""no" 1>&6
18656 fi
18657 done
18658
18659  echo $ac_n "checking for db""... $ac_c" 1>&6
18660 echo "configure:18661: checking for db" >&5
18661 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18662   echo $ac_n "(cached) $ac_c" 1>&6
18663 else
18664   
18665         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18666                 ol_cv_gdbm=no
18667         else
18668                 ol_cv_gdbm=yes
18669         fi
18670
18671 fi
18672
18673 echo "$ac_t""$ol_cv_gdbm" 1>&6
18674  if test $ol_cv_gdbm = yes ; then
18675         cat >> confdefs.h <<\EOF
18676 #define HAVE_GDBM 1
18677 EOF
18678
18679  fi
18680
18681
18682         if test $ol_cv_gdbm = yes ; then
18683                 ol_link_ldbm=gdbm
18684                 ol_with_ldbm_api=gdbm
18685
18686                 if test $ol_cv_lib_gdbm != yes ; then
18687                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18688                 fi
18689         fi
18690 fi
18691
18692 if test $ol_with_ldbm_api = ndbm ; then
18693         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18694 echo "configure:18695: checking for NDBM library" >&5
18695 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18696   echo $ac_n "(cached) $ac_c" 1>&6
18697 else
18698         ol_LIBS="$LIBS"
18699         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18700 echo "configure:18701: checking for dbm_open" >&5
18701 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18702   echo $ac_n "(cached) $ac_c" 1>&6
18703 else
18704   cat > conftest.$ac_ext <<EOF
18705 #line 18706 "configure"
18706 #include "confdefs.h"
18707 /* System header to define __stub macros and hopefully few prototypes,
18708     which can conflict with char dbm_open(); below.  */
18709 #include <assert.h>
18710 /* Override any gcc2 internal prototype to avoid an error.  */
18711 /* We use char because int might match the return type of a gcc2
18712     builtin and then its argument prototype would still apply.  */
18713 char dbm_open();
18714 char (*f)();
18715
18716 int main() {
18717
18718 /* The GNU C library defines this for functions which it implements
18719     to always fail with ENOSYS.  Some functions are actually named
18720     something starting with __ and the normal name is an alias.  */
18721 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18722 choke me
18723 #else
18724 f = dbm_open;
18725 #endif
18726
18727 ; return 0; }
18728 EOF
18729 if { (eval echo configure:18730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18730   rm -rf conftest*
18731   eval "ac_cv_func_dbm_open=yes"
18732 else
18733   echo "configure: failed program was:" >&5
18734   cat conftest.$ac_ext >&5
18735   rm -rf conftest*
18736   eval "ac_cv_func_dbm_open=no"
18737 fi
18738 rm -f conftest*
18739 fi
18740
18741 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18742   echo "$ac_t""yes" 1>&6
18743   ol_cv_lib_ndbm=yes
18744 else
18745   echo "$ac_t""no" 1>&6
18746
18747                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18748 echo "configure:18749: checking for dbm_open in -lndbm" >&5
18749 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18750 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18751   echo $ac_n "(cached) $ac_c" 1>&6
18752 else
18753   ac_save_LIBS="$LIBS"
18754 LIBS="-lndbm  $LIBS"
18755 cat > conftest.$ac_ext <<EOF
18756 #line 18757 "configure"
18757 #include "confdefs.h"
18758 /* Override any gcc2 internal prototype to avoid an error.  */
18759 /* We use char because int might match the return type of a gcc2
18760     builtin and then its argument prototype would still apply.  */
18761 char dbm_open();
18762
18763 int main() {
18764 dbm_open()
18765 ; return 0; }
18766 EOF
18767 if { (eval echo configure:18768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18768   rm -rf conftest*
18769   eval "ac_cv_lib_$ac_lib_var=yes"
18770 else
18771   echo "configure: failed program was:" >&5
18772   cat conftest.$ac_ext >&5
18773   rm -rf conftest*
18774   eval "ac_cv_lib_$ac_lib_var=no"
18775 fi
18776 rm -f conftest*
18777 LIBS="$ac_save_LIBS"
18778
18779 fi
18780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18781   echo "$ac_t""yes" 1>&6
18782   ol_cv_lib_ndbm=-lndbm
18783 else
18784   echo "$ac_t""no" 1>&6
18785
18786                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18787 echo "configure:18788: checking for dbm_open in -ldbm" >&5
18788 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18789 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18790   echo $ac_n "(cached) $ac_c" 1>&6
18791 else
18792   ac_save_LIBS="$LIBS"
18793 LIBS="-ldbm  $LIBS"
18794 cat > conftest.$ac_ext <<EOF
18795 #line 18796 "configure"
18796 #include "confdefs.h"
18797 /* Override any gcc2 internal prototype to avoid an error.  */
18798 /* We use char because int might match the return type of a gcc2
18799     builtin and then its argument prototype would still apply.  */
18800 char dbm_open();
18801
18802 int main() {
18803 dbm_open()
18804 ; return 0; }
18805 EOF
18806 if { (eval echo configure:18807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18807   rm -rf conftest*
18808   eval "ac_cv_lib_$ac_lib_var=yes"
18809 else
18810   echo "configure: failed program was:" >&5
18811   cat conftest.$ac_ext >&5
18812   rm -rf conftest*
18813   eval "ac_cv_lib_$ac_lib_var=no"
18814 fi
18815 rm -f conftest*
18816 LIBS="$ac_save_LIBS"
18817
18818 fi
18819 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18820   echo "$ac_t""yes" 1>&6
18821   ol_cv_lib_ndbm=-ldbm
18822 else
18823   echo "$ac_t""no" 1>&6
18824 ol_cv_lib_ndbm=no
18825 fi
18826                 
18827 fi
18828
18829         
18830 fi
18831
18832         LIBS="$ol_LIBS"
18833
18834 fi
18835
18836 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18837
18838
18839  for ac_hdr in ndbm.h
18840 do
18841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18843 echo "configure:18844: checking for $ac_hdr" >&5
18844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18845   echo $ac_n "(cached) $ac_c" 1>&6
18846 else
18847   cat > conftest.$ac_ext <<EOF
18848 #line 18849 "configure"
18849 #include "confdefs.h"
18850 #include <$ac_hdr>
18851 EOF
18852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18853 { (eval echo configure:18854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18855 if test -z "$ac_err"; then
18856   rm -rf conftest*
18857   eval "ac_cv_header_$ac_safe=yes"
18858 else
18859   echo "$ac_err" >&5
18860   echo "configure: failed program was:" >&5
18861   cat conftest.$ac_ext >&5
18862   rm -rf conftest*
18863   eval "ac_cv_header_$ac_safe=no"
18864 fi
18865 rm -f conftest*
18866 fi
18867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18868   echo "$ac_t""yes" 1>&6
18869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18870   cat >> confdefs.h <<EOF
18871 #define $ac_tr_hdr 1
18872 EOF
18873  
18874 else
18875   echo "$ac_t""no" 1>&6
18876 fi
18877 done
18878
18879  echo $ac_n "checking for db""... $ac_c" 1>&6
18880 echo "configure:18881: checking for db" >&5
18881 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18882   echo $ac_n "(cached) $ac_c" 1>&6
18883 else
18884   
18885         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18886                 ol_cv_ndbm=no
18887         else
18888                 ol_cv_ndbm=yes
18889         fi
18890
18891 fi
18892
18893 echo "$ac_t""$ol_cv_ndbm" 1>&6
18894  if test $ol_cv_ndbm = yes ; then
18895         cat >> confdefs.h <<\EOF
18896 #define HAVE_NDBM 1
18897 EOF
18898
18899  fi
18900
18901
18902         if test $ol_cv_ndbm = yes ; then
18903                 ol_link_ldbm=ndbm
18904                 ol_with_ldbm_api=ndbm
18905
18906                 if test $ol_cv_lib_ndbm != yes ; then
18907                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18908                 fi
18909         fi
18910 fi
18911
18912 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18913         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18914         if test $ol_enable_ldbm = yes ; then
18915                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18916         fi
18917
18918         echo "configure: warning: disabling LDBM" 1>&2
18919         ol_enable_ldbm=no
18920 fi
18921
18922 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18923         BUILD_LIBS_DYNAMIC=shared
18924         cat >> confdefs.h <<\EOF
18925 #define LDAP_LIBS_DYNAMIC 1
18926 EOF
18927
18928 else
18929         BUILD_LIBS_DYNAMIC=static
18930 fi
18931
18932 if test $ol_enable_wrappers != no ; then
18933         for ac_hdr in tcpd.h
18934 do
18935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18937 echo "configure:18938: checking for $ac_hdr" >&5
18938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18939   echo $ac_n "(cached) $ac_c" 1>&6
18940 else
18941   cat > conftest.$ac_ext <<EOF
18942 #line 18943 "configure"
18943 #include "confdefs.h"
18944 #include <$ac_hdr>
18945 EOF
18946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18947 { (eval echo configure:18948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18949 if test -z "$ac_err"; then
18950   rm -rf conftest*
18951   eval "ac_cv_header_$ac_safe=yes"
18952 else
18953   echo "$ac_err" >&5
18954   echo "configure: failed program was:" >&5
18955   cat conftest.$ac_ext >&5
18956   rm -rf conftest*
18957   eval "ac_cv_header_$ac_safe=no"
18958 fi
18959 rm -f conftest*
18960 fi
18961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18962   echo "$ac_t""yes" 1>&6
18963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18964   cat >> confdefs.h <<EOF
18965 #define $ac_tr_hdr 1
18966 EOF
18967  
18968                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18969 echo "configure:18970: checking for TCP wrappers library" >&5
18970                 save_LIBS="$LIBS"
18971                 LIBS="$LIBS -lwrap"
18972                 cat > conftest.$ac_ext <<EOF
18973 #line 18974 "configure"
18974 #include "confdefs.h"
18975
18976 #include <tcpd.h>
18977 int allow_severity = 0;
18978 int deny_severity  = 0;
18979
18980 struct request_info *req;
18981                 
18982 int main() {
18983
18984 hosts_access(req)
18985                 
18986 ; return 0; }
18987 EOF
18988 if { (eval echo configure:18989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18989   rm -rf conftest*
18990   echo "$ac_t""-lwrap" 1>&6
18991                 have_wrappers=yes
18992                 LIBS="$save_LIBS"
18993 else
18994   echo "configure: failed program was:" >&5
18995   cat conftest.$ac_ext >&5
18996   rm -rf conftest*
18997   
18998                                 LIBS="$LIBS -lnsl"
18999                 cat > conftest.$ac_ext <<EOF
19000 #line 19001 "configure"
19001 #include "confdefs.h"
19002
19003 #include <tcpd.h>
19004 int allow_severity = 0;
19005 int deny_severity  = 0;
19006
19007 struct request_info *req;
19008                 
19009 int main() {
19010
19011 hosts_access(req)
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   echo "$ac_t""-lwrap -lnsl" 1>&6
19018                 have_wrappers=yes
19019                 LIBS="$save_LIBS -lnsl"
19020 else
19021   echo "configure: failed program was:" >&5
19022   cat conftest.$ac_ext >&5
19023   rm -rf conftest*
19024   
19025                 echo "$ac_t""no" 1>&6
19026                 have_wrappers=no
19027                 LIBS=$save_LIBS
19028 fi
19029 rm -f conftest*
19030 fi
19031 rm -f conftest*
19032 else
19033   echo "$ac_t""no" 1>&6
19034 have_wrappers=no
19035 fi
19036 done
19037
19038
19039         if test $have_wrappers = yes ; then
19040                 cat >> confdefs.h <<\EOF
19041 #define HAVE_TCPD 1
19042 EOF
19043
19044                 WRAP_LIBS="-lwrap"
19045         elif test $ol_enable_wrappers = yes ; then
19046                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19047         else
19048                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19049                 WRAP_LIBS=""
19050         fi
19051 fi
19052
19053 if test $ol_enable_syslog != no ; then
19054         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19055 echo "configure:19056: checking for openlog" >&5
19056 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19057   echo $ac_n "(cached) $ac_c" 1>&6
19058 else
19059   cat > conftest.$ac_ext <<EOF
19060 #line 19061 "configure"
19061 #include "confdefs.h"
19062 /* System header to define __stub macros and hopefully few prototypes,
19063     which can conflict with char openlog(); below.  */
19064 #include <assert.h>
19065 /* Override any gcc2 internal prototype to avoid an error.  */
19066 /* We use char because int might match the return type of a gcc2
19067     builtin and then its argument prototype would still apply.  */
19068 char openlog();
19069 char (*f)();
19070
19071 int main() {
19072
19073 /* The GNU C library defines this for functions which it implements
19074     to always fail with ENOSYS.  Some functions are actually named
19075     something starting with __ and the normal name is an alias.  */
19076 #if defined (__stub_openlog) || defined (__stub___openlog)
19077 choke me
19078 #else
19079 f = openlog;
19080 #endif
19081
19082 ; return 0; }
19083 EOF
19084 if { (eval echo configure:19085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19085   rm -rf conftest*
19086   eval "ac_cv_func_openlog=yes"
19087 else
19088   echo "configure: failed program was:" >&5
19089   cat conftest.$ac_ext >&5
19090   rm -rf conftest*
19091   eval "ac_cv_func_openlog=no"
19092 fi
19093 rm -f conftest*
19094 fi
19095
19096 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19097   echo "$ac_t""yes" 1>&6
19098   :
19099 else
19100   echo "$ac_t""no" 1>&6
19101 fi
19102
19103         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19104                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19105         fi
19106         ol_enable_syslog=$ac_cv_func_openlog
19107 fi
19108
19109
19110 ol_link_sql=no
19111 if test $ol_enable_sql != no ; then
19112         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19113 echo "configure:19114: checking for SQLDriverConnect in -liodbc" >&5
19114 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19116   echo $ac_n "(cached) $ac_c" 1>&6
19117 else
19118   ac_save_LIBS="$LIBS"
19119 LIBS="-liodbc  $LIBS"
19120 cat > conftest.$ac_ext <<EOF
19121 #line 19122 "configure"
19122 #include "confdefs.h"
19123 /* Override any gcc2 internal prototype to avoid an error.  */
19124 /* We use char because int might match the return type of a gcc2
19125     builtin and then its argument prototype would still apply.  */
19126 char SQLDriverConnect();
19127
19128 int main() {
19129 SQLDriverConnect()
19130 ; return 0; }
19131 EOF
19132 if { (eval echo configure:19133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19133   rm -rf conftest*
19134   eval "ac_cv_lib_$ac_lib_var=yes"
19135 else
19136   echo "configure: failed program was:" >&5
19137   cat conftest.$ac_ext >&5
19138   rm -rf conftest*
19139   eval "ac_cv_lib_$ac_lib_var=no"
19140 fi
19141 rm -f conftest*
19142 LIBS="$ac_save_LIBS"
19143
19144 fi
19145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19146   echo "$ac_t""yes" 1>&6
19147   have_iodbc=yes
19148 else
19149   echo "$ac_t""no" 1>&6
19150 have_iodbc=no
19151 fi
19152
19153         if test $have_iodbc = yes ; then
19154                 ol_link_sql="-liodbc"
19155         else
19156                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19157 echo "configure:19158: checking for SQLDriverConnect in -lodbc" >&5
19158 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19159 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19160   echo $ac_n "(cached) $ac_c" 1>&6
19161 else
19162   ac_save_LIBS="$LIBS"
19163 LIBS="-lodbc  $LIBS"
19164 cat > conftest.$ac_ext <<EOF
19165 #line 19166 "configure"
19166 #include "confdefs.h"
19167 /* Override any gcc2 internal prototype to avoid an error.  */
19168 /* We use char because int might match the return type of a gcc2
19169     builtin and then its argument prototype would still apply.  */
19170 char SQLDriverConnect();
19171
19172 int main() {
19173 SQLDriverConnect()
19174 ; return 0; }
19175 EOF
19176 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19177   rm -rf conftest*
19178   eval "ac_cv_lib_$ac_lib_var=yes"
19179 else
19180   echo "configure: failed program was:" >&5
19181   cat conftest.$ac_ext >&5
19182   rm -rf conftest*
19183   eval "ac_cv_lib_$ac_lib_var=no"
19184 fi
19185 rm -f conftest*
19186 LIBS="$ac_save_LIBS"
19187
19188 fi
19189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19190   echo "$ac_t""yes" 1>&6
19191   have_odbc=yes
19192 else
19193   echo "$ac_t""no" 1>&6
19194 have_odbc=no
19195 fi
19196
19197                 if test $have_odbc = yes ; then
19198                         ol_link_sql="-lodbc"
19199                 fi
19200         fi
19201
19202         if test $ol_link_sql != no ; then
19203                 SLAPD_SQL_LIBS="$ol_link_sql"
19204
19205         elif test $ol_enable_sql != auto ; then
19206                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19207         fi
19208 fi
19209
19210 if test $ol_enable_tcl != no ; then
19211         for ac_hdr in tcl.h
19212 do
19213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19215 echo "configure:19216: checking for $ac_hdr" >&5
19216 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19217   echo $ac_n "(cached) $ac_c" 1>&6
19218 else
19219   cat > conftest.$ac_ext <<EOF
19220 #line 19221 "configure"
19221 #include "confdefs.h"
19222 #include <$ac_hdr>
19223 EOF
19224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19225 { (eval echo configure:19226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19227 if test -z "$ac_err"; then
19228   rm -rf conftest*
19229   eval "ac_cv_header_$ac_safe=yes"
19230 else
19231   echo "$ac_err" >&5
19232   echo "configure: failed program was:" >&5
19233   cat conftest.$ac_ext >&5
19234   rm -rf conftest*
19235   eval "ac_cv_header_$ac_safe=no"
19236 fi
19237 rm -f conftest*
19238 fi
19239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19240   echo "$ac_t""yes" 1>&6
19241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19242   cat >> confdefs.h <<EOF
19243 #define $ac_tr_hdr 1
19244 EOF
19245  
19246 else
19247   echo "$ac_t""no" 1>&6
19248 fi
19249 done
19250
19251
19252         if test $ac_cv_header_tcl_h != yes ; then
19253                 have_tcl=no
19254         else
19255                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19256                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19257 echo "configure:19258: checking for main in -l$lib" >&5
19258 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19259 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19260   echo $ac_n "(cached) $ac_c" 1>&6
19261 else
19262   ac_save_LIBS="$LIBS"
19263 LIBS="-l$lib  $LIBS"
19264 cat > conftest.$ac_ext <<EOF
19265 #line 19266 "configure"
19266 #include "confdefs.h"
19267
19268 int main() {
19269 main()
19270 ; return 0; }
19271 EOF
19272 if { (eval echo configure:19273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19273   rm -rf conftest*
19274   eval "ac_cv_lib_$ac_lib_var=yes"
19275 else
19276   echo "configure: failed program was:" >&5
19277   cat conftest.$ac_ext >&5
19278   rm -rf conftest*
19279   eval "ac_cv_lib_$ac_lib_var=no"
19280 fi
19281 rm -f conftest*
19282 LIBS="$ac_save_LIBS"
19283
19284 fi
19285 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19286   echo "$ac_t""yes" 1>&6
19287   have_tcl=yes
19288                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19289                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19290                            else
19291                                         MOD_TCL_LIB="-l${lib}"
19292                            fi;break
19293 else
19294   echo "$ac_t""no" 1>&6
19295 have_tcl=no
19296 fi
19297
19298                 done
19299         fi
19300
19301         if test $have_tcl != yes ; then
19302                 echo "configure: warning: could not find -ltcl" 1>&2
19303                 if test $ol_enable_tcl = yes ; then
19304                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19305                 fi
19306
19307                 ol_enable_tcl=no
19308         fi
19309 fi
19310
19311 ol_link_termcap=no
19312 for ac_hdr in termcap.h ncurses.h
19313 do
19314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19316 echo "configure:19317: checking for $ac_hdr" >&5
19317 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19318   echo $ac_n "(cached) $ac_c" 1>&6
19319 else
19320   cat > conftest.$ac_ext <<EOF
19321 #line 19322 "configure"
19322 #include "confdefs.h"
19323 #include <$ac_hdr>
19324 EOF
19325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19326 { (eval echo configure:19327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19328 if test -z "$ac_err"; then
19329   rm -rf conftest*
19330   eval "ac_cv_header_$ac_safe=yes"
19331 else
19332   echo "$ac_err" >&5
19333   echo "configure: failed program was:" >&5
19334   cat conftest.$ac_ext >&5
19335   rm -rf conftest*
19336   eval "ac_cv_header_$ac_safe=no"
19337 fi
19338 rm -f conftest*
19339 fi
19340 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19341   echo "$ac_t""yes" 1>&6
19342     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19343   cat >> confdefs.h <<EOF
19344 #define $ac_tr_hdr 1
19345 EOF
19346  
19347 else
19348   echo "$ac_t""no" 1>&6
19349 fi
19350 done
19351
19352
19353 if test $ol_link_termcap = no ; then
19354         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19355 echo "configure:19356: checking for tputs in -ltermcap" >&5
19356 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19357 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19358   echo $ac_n "(cached) $ac_c" 1>&6
19359 else
19360   ac_save_LIBS="$LIBS"
19361 LIBS="-ltermcap  $LIBS"
19362 cat > conftest.$ac_ext <<EOF
19363 #line 19364 "configure"
19364 #include "confdefs.h"
19365 /* Override any gcc2 internal prototype to avoid an error.  */
19366 /* We use char because int might match the return type of a gcc2
19367     builtin and then its argument prototype would still apply.  */
19368 char tputs();
19369
19370 int main() {
19371 tputs()
19372 ; return 0; }
19373 EOF
19374 if { (eval echo configure:19375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19375   rm -rf conftest*
19376   eval "ac_cv_lib_$ac_lib_var=yes"
19377 else
19378   echo "configure: failed program was:" >&5
19379   cat conftest.$ac_ext >&5
19380   rm -rf conftest*
19381   eval "ac_cv_lib_$ac_lib_var=no"
19382 fi
19383 rm -f conftest*
19384 LIBS="$ac_save_LIBS"
19385
19386 fi
19387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19388   echo "$ac_t""yes" 1>&6
19389   have_termcap=yes
19390 else
19391   echo "$ac_t""no" 1>&6
19392 have_termcap=no
19393 fi
19394
19395         if test $have_termcap = yes ; then
19396                 cat >> confdefs.h <<\EOF
19397 #define HAVE_TERMCAP 1
19398 EOF
19399
19400                 ol_link_termcap=yes
19401                 TERMCAP_LIBS=-ltermcap
19402         fi
19403 fi
19404
19405 if test $ol_link_termcap = no ; then
19406         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19407 echo "configure:19408: checking for initscr in -lncurses" >&5
19408 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19410   echo $ac_n "(cached) $ac_c" 1>&6
19411 else
19412   ac_save_LIBS="$LIBS"
19413 LIBS="-lncurses  $LIBS"
19414 cat > conftest.$ac_ext <<EOF
19415 #line 19416 "configure"
19416 #include "confdefs.h"
19417 /* Override any gcc2 internal prototype to avoid an error.  */
19418 /* We use char because int might match the return type of a gcc2
19419     builtin and then its argument prototype would still apply.  */
19420 char initscr();
19421
19422 int main() {
19423 initscr()
19424 ; return 0; }
19425 EOF
19426 if { (eval echo configure:19427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19427   rm -rf conftest*
19428   eval "ac_cv_lib_$ac_lib_var=yes"
19429 else
19430   echo "configure: failed program was:" >&5
19431   cat conftest.$ac_ext >&5
19432   rm -rf conftest*
19433   eval "ac_cv_lib_$ac_lib_var=no"
19434 fi
19435 rm -f conftest*
19436 LIBS="$ac_save_LIBS"
19437
19438 fi
19439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19440   echo "$ac_t""yes" 1>&6
19441   have_ncurses=yes
19442 else
19443   echo "$ac_t""no" 1>&6
19444 have_ncurses=no
19445 fi
19446
19447         if test $have_ncurses = yes ; then
19448                 cat >> confdefs.h <<\EOF
19449 #define HAVE_NCURSES 1
19450 EOF
19451
19452                 ol_link_termcap=yes
19453                 TERMCAP_LIBS=-lncurses
19454         fi
19455 fi
19456
19457 if test $ol_link_termcap = no ; then
19458         cat >> confdefs.h <<\EOF
19459 #define NO_TERMCAP 1
19460 EOF
19461
19462         TERMCAP_LIBS=
19463 fi
19464
19465 ol_link_sasl=no
19466 ol_link_spasswd=no
19467 if test $ol_with_cyrus_sasl != no ; then
19468         for ac_hdr in sasl/sasl.h sasl.h
19469 do
19470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19471 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19472 echo "configure:19473: checking for $ac_hdr" >&5
19473 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19474   echo $ac_n "(cached) $ac_c" 1>&6
19475 else
19476   cat > conftest.$ac_ext <<EOF
19477 #line 19478 "configure"
19478 #include "confdefs.h"
19479 #include <$ac_hdr>
19480 EOF
19481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19482 { (eval echo configure:19483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19484 if test -z "$ac_err"; then
19485   rm -rf conftest*
19486   eval "ac_cv_header_$ac_safe=yes"
19487 else
19488   echo "$ac_err" >&5
19489   echo "configure: failed program was:" >&5
19490   cat conftest.$ac_ext >&5
19491   rm -rf conftest*
19492   eval "ac_cv_header_$ac_safe=no"
19493 fi
19494 rm -f conftest*
19495 fi
19496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19497   echo "$ac_t""yes" 1>&6
19498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19499   cat >> confdefs.h <<EOF
19500 #define $ac_tr_hdr 1
19501 EOF
19502  
19503 else
19504   echo "$ac_t""no" 1>&6
19505 fi
19506 done
19507
19508
19509         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19510                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19511 echo "configure:19512: checking for sasl_client_init in -lsasl2" >&5
19512 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19513 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19514   echo $ac_n "(cached) $ac_c" 1>&6
19515 else
19516   ac_save_LIBS="$LIBS"
19517 LIBS="-lsasl2  $LIBS"
19518 cat > conftest.$ac_ext <<EOF
19519 #line 19520 "configure"
19520 #include "confdefs.h"
19521 /* Override any gcc2 internal prototype to avoid an error.  */
19522 /* We use char because int might match the return type of a gcc2
19523     builtin and then its argument prototype would still apply.  */
19524 char sasl_client_init();
19525
19526 int main() {
19527 sasl_client_init()
19528 ; return 0; }
19529 EOF
19530 if { (eval echo configure:19531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19531   rm -rf conftest*
19532   eval "ac_cv_lib_$ac_lib_var=yes"
19533 else
19534   echo "configure: failed program was:" >&5
19535   cat conftest.$ac_ext >&5
19536   rm -rf conftest*
19537   eval "ac_cv_lib_$ac_lib_var=no"
19538 fi
19539 rm -f conftest*
19540 LIBS="$ac_save_LIBS"
19541
19542 fi
19543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19544   echo "$ac_t""yes" 1>&6
19545   ol_link_sasl="-lsasl2"
19546 else
19547   echo "$ac_t""no" 1>&6
19548 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19549 echo "configure:19550: checking for sasl_client_init in -lsasl" >&5
19550 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19551 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19552   echo $ac_n "(cached) $ac_c" 1>&6
19553 else
19554   ac_save_LIBS="$LIBS"
19555 LIBS="-lsasl  $LIBS"
19556 cat > conftest.$ac_ext <<EOF
19557 #line 19558 "configure"
19558 #include "confdefs.h"
19559 /* Override any gcc2 internal prototype to avoid an error.  */
19560 /* We use char because int might match the return type of a gcc2
19561     builtin and then its argument prototype would still apply.  */
19562 char sasl_client_init();
19563
19564 int main() {
19565 sasl_client_init()
19566 ; return 0; }
19567 EOF
19568 if { (eval echo configure:19569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19569   rm -rf conftest*
19570   eval "ac_cv_lib_$ac_lib_var=yes"
19571 else
19572   echo "configure: failed program was:" >&5
19573   cat conftest.$ac_ext >&5
19574   rm -rf conftest*
19575   eval "ac_cv_lib_$ac_lib_var=no"
19576 fi
19577 rm -f conftest*
19578 LIBS="$ac_save_LIBS"
19579
19580 fi
19581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19582   echo "$ac_t""yes" 1>&6
19583   ol_link_sasl="-lsasl"
19584 else
19585   echo "$ac_t""no" 1>&6
19586 fi
19587
19588 fi
19589
19590         fi
19591
19592         if test $ol_link_sasl = no ; then
19593                 if test $ol_with_cyrus_sasl != auto ; then
19594                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19595                 else
19596                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19597                         echo "configure: warning: SASL authentication not supported!" 1>&2
19598                         if test $ol_link_tls = no ; then
19599                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19600                         fi
19601                 fi
19602         else
19603                 cat >> confdefs.h <<\EOF
19604 #define HAVE_CYRUS_SASL 1
19605 EOF
19606
19607                 SASL_LIBS="$ol_link_sasl"
19608                 if test $ol_enable_spasswd != no ; then
19609                         ol_link_spasswd=yes
19610                 fi
19611         fi
19612
19613 else
19614         echo "configure: warning: SASL authentication not supported!" 1>&2
19615         if test $ol_link_tls = no ; then
19616                 echo "configure: warning: Strong authentication not supported!" 1>&2
19617         fi
19618 fi
19619
19620 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19621         dev=no
19622         if test -r /dev/urandom ; then
19623                 dev="/dev/urandom";
19624         elif test -r /idev/urandom ; then
19625                 dev="/idev/urandom";
19626         elif test -r /dev/srandom ; then
19627                 dev="/dev/srandom";
19628         elif test -r /dev/random ; then
19629                 dev="/dev/random";
19630         elif test -r /idev/random ; then
19631                 dev="/idev/random";
19632         fi
19633
19634         if test $dev != no ; then
19635                 cat >> confdefs.h <<EOF
19636 #define URANDOM_DEVICE "$dev"
19637 EOF
19638
19639         fi
19640 fi
19641
19642 ol_link_fetch=no
19643 if test $ol_with_fetch != no ; then
19644         ol_LIBS=$LIBS
19645 LIBS="-lfetch -lcom_err $LIBS"
19646 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19647 echo "configure:19648: checking fetch(3) library" >&5
19648 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19649   echo $ac_n "(cached) $ac_c" 1>&6
19650 else
19651   
19652         cat > conftest.$ac_ext <<EOF
19653 #line 19654 "configure"
19654 #include "confdefs.h"
19655
19656 #include <sys/param.h>
19657 #include <stdio.h>
19658 #include <fetch.h>
19659 int main() {
19660 struct url *u = fetchParseURL("file:///"); 
19661 ; return 0; }
19662 EOF
19663 if { (eval echo configure:19664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19664   rm -rf conftest*
19665   ol_cv_lib_fetch=yes
19666 else
19667   echo "configure: failed program was:" >&5
19668   cat conftest.$ac_ext >&5
19669   rm -rf conftest*
19670   ol_cv_lib_fetch=no
19671 fi
19672 rm -f conftest*
19673 fi
19674
19675 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19676 LIBS=$ol_LIBS
19677 if test $ol_cv_lib_fetch != no ; then
19678         ol_link_fetch="-lfetch -lcom_err"
19679         cat >> confdefs.h <<\EOF
19680 #define HAVE_FETCH 1
19681 EOF
19682
19683 fi
19684
19685
19686         if test $ol_cv_lib_fetch != no ; then
19687                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19688                 ol_link_fetch=freebsd
19689
19690         elif test $ol_with_fetch != auto ; then
19691                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19692         fi 
19693 fi
19694
19695 ol_link_readline=no
19696 if test $ol_with_readline != no ; then
19697         for ac_hdr in readline/readline.h readline/history.h
19698 do
19699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19701 echo "configure:19702: checking for $ac_hdr" >&5
19702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19703   echo $ac_n "(cached) $ac_c" 1>&6
19704 else
19705   cat > conftest.$ac_ext <<EOF
19706 #line 19707 "configure"
19707 #include "confdefs.h"
19708 #include <$ac_hdr>
19709 EOF
19710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19711 { (eval echo configure:19712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19713 if test -z "$ac_err"; then
19714   rm -rf conftest*
19715   eval "ac_cv_header_$ac_safe=yes"
19716 else
19717   echo "$ac_err" >&5
19718   echo "configure: failed program was:" >&5
19719   cat conftest.$ac_ext >&5
19720   rm -rf conftest*
19721   eval "ac_cv_header_$ac_safe=no"
19722 fi
19723 rm -f conftest*
19724 fi
19725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19726   echo "$ac_t""yes" 1>&6
19727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19728   cat >> confdefs.h <<EOF
19729 #define $ac_tr_hdr 1
19730 EOF
19731  
19732 else
19733   echo "$ac_t""no" 1>&6
19734 fi
19735 done
19736
19737
19738         if test $ac_cv_header_readline_readline_h = yes ; then
19739                 save_LIBS="$LIBS"
19740                 LIBS="$TERMCAP_LIBS $LIBS"
19741                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19742 echo "configure:19743: checking for readline in -lreadline" >&5
19743 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19744 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19745   echo $ac_n "(cached) $ac_c" 1>&6
19746 else
19747   ac_save_LIBS="$LIBS"
19748 LIBS="-lreadline  $LIBS"
19749 cat > conftest.$ac_ext <<EOF
19750 #line 19751 "configure"
19751 #include "confdefs.h"
19752 /* Override any gcc2 internal prototype to avoid an error.  */
19753 /* We use char because int might match the return type of a gcc2
19754     builtin and then its argument prototype would still apply.  */
19755 char readline();
19756
19757 int main() {
19758 readline()
19759 ; return 0; }
19760 EOF
19761 if { (eval echo configure:19762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19762   rm -rf conftest*
19763   eval "ac_cv_lib_$ac_lib_var=yes"
19764 else
19765   echo "configure: failed program was:" >&5
19766   cat conftest.$ac_ext >&5
19767   rm -rf conftest*
19768   eval "ac_cv_lib_$ac_lib_var=no"
19769 fi
19770 rm -f conftest*
19771 LIBS="$ac_save_LIBS"
19772
19773 fi
19774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19775   echo "$ac_t""yes" 1>&6
19776   have_readline=yes
19777 else
19778   echo "$ac_t""no" 1>&6
19779 have_readline=no
19780 fi
19781
19782                 LIBS="$save_LIBS"
19783                         
19784                 if test $have_readline = yes ; then
19785                         ol_with_readline=found
19786                         ol_link_readline=yes
19787
19788                         READLINE_LIBS="-lreadline"
19789                 fi
19790         fi
19791 fi
19792
19793 if test $ol_link_readline = yes ; then
19794         cat >> confdefs.h <<\EOF
19795 #define HAVE_READLINE 1
19796 EOF
19797
19798 fi
19799
19800
19801 if test $ol_enable_crypt != no ; then
19802         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19803 echo "configure:19804: checking for crypt" >&5
19804 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19805   echo $ac_n "(cached) $ac_c" 1>&6
19806 else
19807   cat > conftest.$ac_ext <<EOF
19808 #line 19809 "configure"
19809 #include "confdefs.h"
19810 /* System header to define __stub macros and hopefully few prototypes,
19811     which can conflict with char crypt(); below.  */
19812 #include <assert.h>
19813 /* Override any gcc2 internal prototype to avoid an error.  */
19814 /* We use char because int might match the return type of a gcc2
19815     builtin and then its argument prototype would still apply.  */
19816 char crypt();
19817 char (*f)();
19818
19819 int main() {
19820
19821 /* The GNU C library defines this for functions which it implements
19822     to always fail with ENOSYS.  Some functions are actually named
19823     something starting with __ and the normal name is an alias.  */
19824 #if defined (__stub_crypt) || defined (__stub___crypt)
19825 choke me
19826 #else
19827 f = crypt;
19828 #endif
19829
19830 ; return 0; }
19831 EOF
19832 if { (eval echo configure:19833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19833   rm -rf conftest*
19834   eval "ac_cv_func_crypt=yes"
19835 else
19836   echo "configure: failed program was:" >&5
19837   cat conftest.$ac_ext >&5
19838   rm -rf conftest*
19839   eval "ac_cv_func_crypt=no"
19840 fi
19841 rm -f conftest*
19842 fi
19843
19844 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19845   echo "$ac_t""yes" 1>&6
19846   have_crypt=yes
19847 else
19848   echo "$ac_t""no" 1>&6
19849
19850                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19851 echo "configure:19852: checking for crypt in -lcrypt" >&5
19852 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19853 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19854   echo $ac_n "(cached) $ac_c" 1>&6
19855 else
19856   ac_save_LIBS="$LIBS"
19857 LIBS="-lcrypt  $LIBS"
19858 cat > conftest.$ac_ext <<EOF
19859 #line 19860 "configure"
19860 #include "confdefs.h"
19861 /* Override any gcc2 internal prototype to avoid an error.  */
19862 /* We use char because int might match the return type of a gcc2
19863     builtin and then its argument prototype would still apply.  */
19864 char crypt();
19865
19866 int main() {
19867 crypt()
19868 ; return 0; }
19869 EOF
19870 if { (eval echo configure:19871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19871   rm -rf conftest*
19872   eval "ac_cv_lib_$ac_lib_var=yes"
19873 else
19874   echo "configure: failed program was:" >&5
19875   cat conftest.$ac_ext >&5
19876   rm -rf conftest*
19877   eval "ac_cv_lib_$ac_lib_var=no"
19878 fi
19879 rm -f conftest*
19880 LIBS="$ac_save_LIBS"
19881
19882 fi
19883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19884   echo "$ac_t""yes" 1>&6
19885   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19886                         have_crypt=yes
19887 else
19888   echo "$ac_t""no" 1>&6
19889 have_crypt=no
19890 fi
19891
19892 fi
19893
19894
19895         if test $have_crypt = yes ; then
19896                 cat >> confdefs.h <<\EOF
19897 #define HAVE_CRYPT 1
19898 EOF
19899
19900         else
19901                 echo "configure: warning: could not find crypt" 1>&2
19902                 if test $ol_enable_crypt = yes ; then
19903                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19904                 fi
19905
19906                 echo "configure: warning: disabling crypt support" 1>&2
19907                 ol_enable_crypt=no
19908         fi
19909 fi
19910
19911 if test $ol_enable_proctitle != no ; then
19912         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19913 echo "configure:19914: checking for setproctitle" >&5
19914 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19915   echo $ac_n "(cached) $ac_c" 1>&6
19916 else
19917   cat > conftest.$ac_ext <<EOF
19918 #line 19919 "configure"
19919 #include "confdefs.h"
19920 /* System header to define __stub macros and hopefully few prototypes,
19921     which can conflict with char setproctitle(); below.  */
19922 #include <assert.h>
19923 /* Override any gcc2 internal prototype to avoid an error.  */
19924 /* We use char because int might match the return type of a gcc2
19925     builtin and then its argument prototype would still apply.  */
19926 char setproctitle();
19927 char (*f)();
19928
19929 int main() {
19930
19931 /* The GNU C library defines this for functions which it implements
19932     to always fail with ENOSYS.  Some functions are actually named
19933     something starting with __ and the normal name is an alias.  */
19934 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19935 choke me
19936 #else
19937 f = setproctitle;
19938 #endif
19939
19940 ; return 0; }
19941 EOF
19942 if { (eval echo configure:19943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19943   rm -rf conftest*
19944   eval "ac_cv_func_setproctitle=yes"
19945 else
19946   echo "configure: failed program was:" >&5
19947   cat conftest.$ac_ext >&5
19948   rm -rf conftest*
19949   eval "ac_cv_func_setproctitle=no"
19950 fi
19951 rm -f conftest*
19952 fi
19953
19954 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19955   echo "$ac_t""yes" 1>&6
19956   have_setproctitle=yes
19957 else
19958   echo "$ac_t""no" 1>&6
19959
19960                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19961 echo "configure:19962: checking for setproctitle in -lutil" >&5
19962 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19963 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19964   echo $ac_n "(cached) $ac_c" 1>&6
19965 else
19966   ac_save_LIBS="$LIBS"
19967 LIBS="-lutil  $LIBS"
19968 cat > conftest.$ac_ext <<EOF
19969 #line 19970 "configure"
19970 #include "confdefs.h"
19971 /* Override any gcc2 internal prototype to avoid an error.  */
19972 /* We use char because int might match the return type of a gcc2
19973     builtin and then its argument prototype would still apply.  */
19974 char setproctitle();
19975
19976 int main() {
19977 setproctitle()
19978 ; return 0; }
19979 EOF
19980 if { (eval echo configure:19981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19981   rm -rf conftest*
19982   eval "ac_cv_lib_$ac_lib_var=yes"
19983 else
19984   echo "configure: failed program was:" >&5
19985   cat conftest.$ac_ext >&5
19986   rm -rf conftest*
19987   eval "ac_cv_lib_$ac_lib_var=no"
19988 fi
19989 rm -f conftest*
19990 LIBS="$ac_save_LIBS"
19991
19992 fi
19993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19994   echo "$ac_t""yes" 1>&6
19995   have_setproctitle=yes
19996                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19997 else
19998   echo "$ac_t""no" 1>&6
19999 have_setproctitle=no
20000                         LIBOBJS="$LIBOBJS setproctitle.o"
20001                         LIBSRCS="$LIBSRCS setproctitle.c"
20002 fi
20003
20004 fi
20005
20006
20007         if test $have_setproctitle = yes ; then
20008                 cat >> confdefs.h <<\EOF
20009 #define HAVE_SETPROCTITLE 1
20010 EOF
20011
20012         fi
20013 fi
20014
20015 if test $ol_enable_slp != no ; then
20016         for ac_hdr in slp.h 
20017 do
20018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20020 echo "configure:20021: checking for $ac_hdr" >&5
20021 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20022   echo $ac_n "(cached) $ac_c" 1>&6
20023 else
20024   cat > conftest.$ac_ext <<EOF
20025 #line 20026 "configure"
20026 #include "confdefs.h"
20027 #include <$ac_hdr>
20028 EOF
20029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20030 { (eval echo configure:20031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20032 if test -z "$ac_err"; then
20033   rm -rf conftest*
20034   eval "ac_cv_header_$ac_safe=yes"
20035 else
20036   echo "$ac_err" >&5
20037   echo "configure: failed program was:" >&5
20038   cat conftest.$ac_ext >&5
20039   rm -rf conftest*
20040   eval "ac_cv_header_$ac_safe=no"
20041 fi
20042 rm -f conftest*
20043 fi
20044 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20045   echo "$ac_t""yes" 1>&6
20046     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20047   cat >> confdefs.h <<EOF
20048 #define $ac_tr_hdr 1
20049 EOF
20050  
20051 else
20052   echo "$ac_t""no" 1>&6
20053 fi
20054 done
20055
20056
20057         if test $ac_cv_header_slp_h = yes ; then
20058                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20059 echo "configure:20060: checking for SLPOpen in -lslp" >&5
20060 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20061 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20062   echo $ac_n "(cached) $ac_c" 1>&6
20063 else
20064   ac_save_LIBS="$LIBS"
20065 LIBS="-lslp  $LIBS"
20066 cat > conftest.$ac_ext <<EOF
20067 #line 20068 "configure"
20068 #include "confdefs.h"
20069 /* Override any gcc2 internal prototype to avoid an error.  */
20070 /* We use char because int might match the return type of a gcc2
20071     builtin and then its argument prototype would still apply.  */
20072 char SLPOpen();
20073
20074 int main() {
20075 SLPOpen()
20076 ; return 0; }
20077 EOF
20078 if { (eval echo configure:20079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20079   rm -rf conftest*
20080   eval "ac_cv_lib_$ac_lib_var=yes"
20081 else
20082   echo "configure: failed program was:" >&5
20083   cat conftest.$ac_ext >&5
20084   rm -rf conftest*
20085   eval "ac_cv_lib_$ac_lib_var=no"
20086 fi
20087 rm -f conftest*
20088 LIBS="$ac_save_LIBS"
20089
20090 fi
20091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20092   echo "$ac_t""yes" 1>&6
20093   have_slp=yes
20094 else
20095   echo "$ac_t""no" 1>&6
20096 have_slp=no
20097 fi
20098
20099                 if test $have_slp = yes ; then
20100                         cat >> confdefs.h <<\EOF
20101 #define HAVE_SLP 1
20102 EOF
20103
20104                         SLAPD_SLP_LIBS=-lslp
20105                 fi
20106
20107         elif test $ol_enable_slp = yes ; then
20108                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20109         fi
20110 fi
20111
20112 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20113 echo "configure:20114: checking for ANSI C header files" >&5
20114 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20115   echo $ac_n "(cached) $ac_c" 1>&6
20116 else
20117   cat > conftest.$ac_ext <<EOF
20118 #line 20119 "configure"
20119 #include "confdefs.h"
20120 #include <stdlib.h>
20121 #include <stdarg.h>
20122 #include <string.h>
20123 #include <float.h>
20124 EOF
20125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20126 { (eval echo configure:20127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20128 if test -z "$ac_err"; then
20129   rm -rf conftest*
20130   ac_cv_header_stdc=yes
20131 else
20132   echo "$ac_err" >&5
20133   echo "configure: failed program was:" >&5
20134   cat conftest.$ac_ext >&5
20135   rm -rf conftest*
20136   ac_cv_header_stdc=no
20137 fi
20138 rm -f conftest*
20139
20140 if test $ac_cv_header_stdc = yes; then
20141   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20142 cat > conftest.$ac_ext <<EOF
20143 #line 20144 "configure"
20144 #include "confdefs.h"
20145 #include <string.h>
20146 EOF
20147 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20148   egrep "memchr" >/dev/null 2>&1; then
20149   :
20150 else
20151   rm -rf conftest*
20152   ac_cv_header_stdc=no
20153 fi
20154 rm -f conftest*
20155
20156 fi
20157
20158 if test $ac_cv_header_stdc = yes; then
20159   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20160 cat > conftest.$ac_ext <<EOF
20161 #line 20162 "configure"
20162 #include "confdefs.h"
20163 #include <stdlib.h>
20164 EOF
20165 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20166   egrep "free" >/dev/null 2>&1; then
20167   :
20168 else
20169   rm -rf conftest*
20170   ac_cv_header_stdc=no
20171 fi
20172 rm -f conftest*
20173
20174 fi
20175
20176 if test $ac_cv_header_stdc = yes; then
20177   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20178 if test "$cross_compiling" = yes; then
20179   :
20180 else
20181   cat > conftest.$ac_ext <<EOF
20182 #line 20183 "configure"
20183 #include "confdefs.h"
20184 #include <ctype.h>
20185 #if ((' ' & 0x0FF) == 0x020)
20186 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20187 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20188 #else
20189 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20190  || ('j' <= (c) && (c) <= 'r') \
20191  || ('s' <= (c) && (c) <= 'z'))
20192 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20193 #endif
20194 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20195 int main () { int i; for (i = 0; i < 256; i++)
20196 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20197 exit (0); }
20198
20199 EOF
20200 if { (eval echo configure:20201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20201 then
20202   :
20203 else
20204   echo "configure: failed program was:" >&5
20205   cat conftest.$ac_ext >&5
20206   rm -fr conftest*
20207   ac_cv_header_stdc=no
20208 fi
20209 rm -fr conftest*
20210 fi
20211
20212 fi
20213 fi
20214
20215 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20216 if test $ac_cv_header_stdc = yes; then
20217   cat >> confdefs.h <<\EOF
20218 #define STDC_HEADERS 1
20219 EOF
20220
20221 fi
20222
20223 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20224 echo "configure:20225: checking for mode_t" >&5
20225 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20226   echo $ac_n "(cached) $ac_c" 1>&6
20227 else
20228   cat > conftest.$ac_ext <<EOF
20229 #line 20230 "configure"
20230 #include "confdefs.h"
20231 #include <sys/types.h>
20232 #if STDC_HEADERS
20233 #include <stdlib.h>
20234 #include <stddef.h>
20235 #endif
20236
20237 EOF
20238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20239   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20240   rm -rf conftest*
20241   eval "ac_cv_type_mode_t=yes"
20242 else
20243   rm -rf conftest*
20244   eval "ac_cv_type_mode_t=no"
20245 fi
20246 rm -f conftest*
20247
20248 fi
20249 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20250   echo "$ac_t""yes" 1>&6
20251 else
20252   echo "$ac_t""no" 1>&6
20253   cat >> confdefs.h <<EOF
20254 #define mode_t int
20255 EOF
20256
20257 fi
20258
20259 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20260 echo "configure:20261: checking for off_t" >&5
20261 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20262   echo $ac_n "(cached) $ac_c" 1>&6
20263 else
20264   cat > conftest.$ac_ext <<EOF
20265 #line 20266 "configure"
20266 #include "confdefs.h"
20267 #include <sys/types.h>
20268 #if STDC_HEADERS
20269 #include <stdlib.h>
20270 #include <stddef.h>
20271 #endif
20272
20273 EOF
20274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20275   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20276   rm -rf conftest*
20277   eval "ac_cv_type_off_t=yes"
20278 else
20279   rm -rf conftest*
20280   eval "ac_cv_type_off_t=no"
20281 fi
20282 rm -f conftest*
20283
20284 fi
20285 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20286   echo "$ac_t""yes" 1>&6
20287 else
20288   echo "$ac_t""no" 1>&6
20289   cat >> confdefs.h <<EOF
20290 #define off_t long
20291 EOF
20292
20293 fi
20294
20295 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20296 echo "configure:20297: checking for pid_t" >&5
20297 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20298   echo $ac_n "(cached) $ac_c" 1>&6
20299 else
20300   cat > conftest.$ac_ext <<EOF
20301 #line 20302 "configure"
20302 #include "confdefs.h"
20303 #include <sys/types.h>
20304 #if STDC_HEADERS
20305 #include <stdlib.h>
20306 #include <stddef.h>
20307 #endif
20308
20309 EOF
20310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20311   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20312   rm -rf conftest*
20313   eval "ac_cv_type_pid_t=yes"
20314 else
20315   rm -rf conftest*
20316   eval "ac_cv_type_pid_t=no"
20317 fi
20318 rm -f conftest*
20319
20320 fi
20321 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20322   echo "$ac_t""yes" 1>&6
20323 else
20324   echo "$ac_t""no" 1>&6
20325   cat >> confdefs.h <<EOF
20326 #define pid_t int
20327 EOF
20328
20329 fi
20330
20331 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20332 echo "configure:20333: checking for ptrdiff_t" >&5
20333 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20334   echo $ac_n "(cached) $ac_c" 1>&6
20335 else
20336   cat > conftest.$ac_ext <<EOF
20337 #line 20338 "configure"
20338 #include "confdefs.h"
20339 #include <stddef.h>
20340 int main() {
20341 ptrdiff_t p
20342 ; return 0; }
20343 EOF
20344 if { (eval echo configure:20345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20345   rm -rf conftest*
20346   am_cv_type_ptrdiff_t=yes
20347 else
20348   echo "configure: failed program was:" >&5
20349   cat conftest.$ac_ext >&5
20350   rm -rf conftest*
20351   am_cv_type_ptrdiff_t=no
20352 fi
20353 rm -f conftest*
20354 fi
20355
20356 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20357    if test $am_cv_type_ptrdiff_t = yes; then
20358      cat >> confdefs.h <<\EOF
20359 #define HAVE_PTRDIFF_T 1
20360 EOF
20361
20362    fi
20363
20364 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20365 echo "configure:20366: checking return type of signal handlers" >&5
20366 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20367   echo $ac_n "(cached) $ac_c" 1>&6
20368 else
20369   cat > conftest.$ac_ext <<EOF
20370 #line 20371 "configure"
20371 #include "confdefs.h"
20372 #include <sys/types.h>
20373 #include <signal.h>
20374 #ifdef signal
20375 #undef signal
20376 #endif
20377 #ifdef __cplusplus
20378 extern "C" void (*signal (int, void (*)(int)))(int);
20379 #else
20380 void (*signal ()) ();
20381 #endif
20382
20383 int main() {
20384 int i;
20385 ; return 0; }
20386 EOF
20387 if { (eval echo configure:20388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20388   rm -rf conftest*
20389   ac_cv_type_signal=void
20390 else
20391   echo "configure: failed program was:" >&5
20392   cat conftest.$ac_ext >&5
20393   rm -rf conftest*
20394   ac_cv_type_signal=int
20395 fi
20396 rm -f conftest*
20397 fi
20398
20399 echo "$ac_t""$ac_cv_type_signal" 1>&6
20400 cat >> confdefs.h <<EOF
20401 #define RETSIGTYPE $ac_cv_type_signal
20402 EOF
20403
20404
20405 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20406 echo "configure:20407: checking for size_t" >&5
20407 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20408   echo $ac_n "(cached) $ac_c" 1>&6
20409 else
20410   cat > conftest.$ac_ext <<EOF
20411 #line 20412 "configure"
20412 #include "confdefs.h"
20413 #include <sys/types.h>
20414 #if STDC_HEADERS
20415 #include <stdlib.h>
20416 #include <stddef.h>
20417 #endif
20418
20419 EOF
20420 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20421   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20422   rm -rf conftest*
20423   eval "ac_cv_type_size_t=yes"
20424 else
20425   rm -rf conftest*
20426   eval "ac_cv_type_size_t=no"
20427 fi
20428 rm -f conftest*
20429
20430 fi
20431 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20432   echo "$ac_t""yes" 1>&6
20433 else
20434   echo "$ac_t""no" 1>&6
20435   cat >> confdefs.h <<EOF
20436 #define size_t unsigned
20437 EOF
20438
20439 fi
20440
20441
20442 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20443 echo "configure:20444: checking for ssize_t" >&5
20444 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20445   echo $ac_n "(cached) $ac_c" 1>&6
20446 else
20447   cat > conftest.$ac_ext <<EOF
20448 #line 20449 "configure"
20449 #include "confdefs.h"
20450 #include <sys/types.h>
20451 #if STDC_HEADERS
20452 #include <stdlib.h>
20453 #include <stddef.h>
20454 #endif
20455
20456 EOF
20457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20458   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20459   rm -rf conftest*
20460   eval "ac_cv_type_ssize_t=yes"
20461 else
20462   rm -rf conftest*
20463   eval "ac_cv_type_ssize_t=no"
20464 fi
20465 rm -f conftest*
20466
20467 fi
20468 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20469   echo "$ac_t""yes" 1>&6
20470 else
20471   echo "$ac_t""no" 1>&6
20472   cat >> confdefs.h <<EOF
20473 #define ssize_t signed int
20474 EOF
20475
20476 fi
20477
20478 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20479 echo "configure:20480: checking for caddr_t" >&5
20480 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20481   echo $ac_n "(cached) $ac_c" 1>&6
20482 else
20483   cat > conftest.$ac_ext <<EOF
20484 #line 20485 "configure"
20485 #include "confdefs.h"
20486 #include <sys/types.h>
20487 #if STDC_HEADERS
20488 #include <stdlib.h>
20489 #include <stddef.h>
20490 #endif
20491
20492 EOF
20493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20494   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20495   rm -rf conftest*
20496   eval "ac_cv_type_caddr_t=yes"
20497 else
20498   rm -rf conftest*
20499   eval "ac_cv_type_caddr_t=no"
20500 fi
20501 rm -f conftest*
20502
20503 fi
20504 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20505   echo "$ac_t""yes" 1>&6
20506 else
20507   echo "$ac_t""no" 1>&6
20508   cat >> confdefs.h <<EOF
20509 #define caddr_t char *
20510 EOF
20511
20512 fi
20513
20514
20515 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20516 echo "configure:20517: checking for socklen_t" >&5
20517 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20518   echo $ac_n "(cached) $ac_c" 1>&6
20519 else
20520   cat > conftest.$ac_ext <<EOF
20521 #line 20522 "configure"
20522 #include "confdefs.h"
20523
20524 #ifdef HAVE_SYS_TYPES_H
20525 #include <sys/types.h>
20526 #endif
20527 #ifdef HAVE_SYS_SOCKET_H
20528 #include <sys/socket.h>
20529 #endif
20530
20531 int main() {
20532 socklen_t len;
20533 ; return 0; }
20534 EOF
20535 if { (eval echo configure:20536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20536   rm -rf conftest*
20537   ol_cv_type_socklen_t=yes
20538 else
20539   echo "configure: failed program was:" >&5
20540   cat conftest.$ac_ext >&5
20541   rm -rf conftest*
20542   ol_cv_type_socklen_t=no
20543 fi
20544 rm -f conftest*
20545 fi
20546
20547 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20548   if test $ol_cv_type_socklen_t = no; then
20549     cat >> confdefs.h <<\EOF
20550 #define socklen_t int
20551 EOF
20552
20553   fi
20554  
20555 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20556 echo "configure:20557: checking for member st_blksize in aggregate type struct stat" >&5
20557 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20558   echo $ac_n "(cached) $ac_c" 1>&6
20559 else
20560   cat > conftest.$ac_ext <<EOF
20561 #line 20562 "configure"
20562 #include "confdefs.h"
20563 #include <sys/types.h>
20564 #include <sys/stat.h>
20565 int main() {
20566 struct stat foo; foo.st_blksize;
20567 ; return 0; }
20568 EOF
20569 if { (eval echo configure:20570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20570   rm -rf conftest*
20571   ac_cv_c_struct_member_st_blksize=yes
20572 else
20573   echo "configure: failed program was:" >&5
20574   cat conftest.$ac_ext >&5
20575   rm -rf conftest*
20576   ac_cv_c_struct_member_st_blksize=no
20577 fi
20578 rm -f conftest*
20579 fi
20580
20581 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20582 st_blksize="$ac_cv_c_struct_member_st_blksize"
20583 if test $ac_cv_c_struct_member_st_blksize = yes; then
20584   cat >> confdefs.h <<\EOF
20585 #define HAVE_ST_BLKSIZE 1
20586 EOF
20587
20588 fi
20589
20590 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20591 echo "configure:20592: checking whether time.h and sys/time.h may both be included" >&5
20592 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20593   echo $ac_n "(cached) $ac_c" 1>&6
20594 else
20595   cat > conftest.$ac_ext <<EOF
20596 #line 20597 "configure"
20597 #include "confdefs.h"
20598 #include <sys/types.h>
20599 #include <sys/time.h>
20600 #include <time.h>
20601 int main() {
20602 struct tm *tp;
20603 ; return 0; }
20604 EOF
20605 if { (eval echo configure:20606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20606   rm -rf conftest*
20607   ac_cv_header_time=yes
20608 else
20609   echo "configure: failed program was:" >&5
20610   cat conftest.$ac_ext >&5
20611   rm -rf conftest*
20612   ac_cv_header_time=no
20613 fi
20614 rm -f conftest*
20615 fi
20616
20617 echo "$ac_t""$ac_cv_header_time" 1>&6
20618 if test $ac_cv_header_time = yes; then
20619   cat >> confdefs.h <<\EOF
20620 #define TIME_WITH_SYS_TIME 1
20621 EOF
20622
20623 fi
20624
20625 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20626 echo "configure:20627: checking whether struct tm is in sys/time.h or time.h" >&5
20627 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20628   echo $ac_n "(cached) $ac_c" 1>&6
20629 else
20630   cat > conftest.$ac_ext <<EOF
20631 #line 20632 "configure"
20632 #include "confdefs.h"
20633 #include <sys/types.h>
20634 #include <time.h>
20635 int main() {
20636 struct tm *tp; tp->tm_sec;
20637 ; return 0; }
20638 EOF
20639 if { (eval echo configure:20640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20640   rm -rf conftest*
20641   ac_cv_struct_tm=time.h
20642 else
20643   echo "configure: failed program was:" >&5
20644   cat conftest.$ac_ext >&5
20645   rm -rf conftest*
20646   ac_cv_struct_tm=sys/time.h
20647 fi
20648 rm -f conftest*
20649 fi
20650
20651 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20652 if test $ac_cv_struct_tm = sys/time.h; then
20653   cat >> confdefs.h <<\EOF
20654 #define TM_IN_SYS_TIME 1
20655 EOF
20656
20657 fi
20658
20659 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20660 echo "configure:20661: checking for uid_t in sys/types.h" >&5
20661 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20662   echo $ac_n "(cached) $ac_c" 1>&6
20663 else
20664   cat > conftest.$ac_ext <<EOF
20665 #line 20666 "configure"
20666 #include "confdefs.h"
20667 #include <sys/types.h>
20668 EOF
20669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20670   egrep "uid_t" >/dev/null 2>&1; then
20671   rm -rf conftest*
20672   ac_cv_type_uid_t=yes
20673 else
20674   rm -rf conftest*
20675   ac_cv_type_uid_t=no
20676 fi
20677 rm -f conftest*
20678
20679 fi
20680
20681 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20682 if test $ac_cv_type_uid_t = no; then
20683   cat >> confdefs.h <<\EOF
20684 #define uid_t int
20685 EOF
20686
20687   cat >> confdefs.h <<\EOF
20688 #define gid_t int
20689 EOF
20690
20691 fi
20692
20693 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20694 echo "configure:20695: checking for sig_atomic_t" >&5
20695 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20696   echo $ac_n "(cached) $ac_c" 1>&6
20697 else
20698   cat > conftest.$ac_ext <<EOF
20699 #line 20700 "configure"
20700 #include "confdefs.h"
20701 #include <signal.h>
20702 int main() {
20703 sig_atomic_t atomic;
20704 ; return 0; }
20705 EOF
20706 if { (eval echo configure:20707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20707   rm -rf conftest*
20708   ol_cv_type_sig_atomic_t=yes
20709 else
20710   echo "configure: failed program was:" >&5
20711   cat conftest.$ac_ext >&5
20712   rm -rf conftest*
20713   ol_cv_type_sig_atomic_t=no
20714 fi
20715 rm -f conftest*
20716 fi
20717
20718 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20719   if test $ol_cv_type_sig_atomic_t = no; then
20720     cat >> confdefs.h <<\EOF
20721 #define sig_atomic_t int
20722 EOF
20723
20724   fi
20725  
20726
20727
20728 # test for pw_gecos in struct passwd
20729 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20730 echo "configure:20731: checking struct passwd for pw_gecos" >&5
20731 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20732   echo $ac_n "(cached) $ac_c" 1>&6
20733 else
20734   
20735         cat > conftest.$ac_ext <<EOF
20736 #line 20737 "configure"
20737 #include "confdefs.h"
20738 #include <pwd.h>
20739 int main() {
20740
20741         struct passwd pwd;
20742         pwd.pw_gecos = pwd.pw_name;
20743
20744 ; return 0; }
20745 EOF
20746 if { (eval echo configure:20747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20747   rm -rf conftest*
20748   ol_cv_struct_passwd_pw_gecos=yes
20749 else
20750   echo "configure: failed program was:" >&5
20751   cat conftest.$ac_ext >&5
20752   rm -rf conftest*
20753   ol_cv_struct_passwd_pw_gecos=no
20754 fi
20755 rm -f conftest*
20756 fi
20757
20758 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20759 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20760         cat >> confdefs.h <<\EOF
20761 #define HAVE_PW_GECOS 1
20762 EOF
20763
20764 fi
20765
20766 # test for pw_passwd in struct passwd
20767 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20768 echo "configure:20769: checking struct passwd for pw_passwd" >&5
20769 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20770   echo $ac_n "(cached) $ac_c" 1>&6
20771 else
20772   
20773         cat > conftest.$ac_ext <<EOF
20774 #line 20775 "configure"
20775 #include "confdefs.h"
20776 #include <pwd.h>
20777 int main() {
20778
20779         struct passwd pwd;
20780         pwd.pw_passwd = pwd.pw_name;
20781
20782 ; return 0; }
20783 EOF
20784 if { (eval echo configure:20785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20785   rm -rf conftest*
20786   ol_cv_struct_passwd_pw_passwd=yes
20787 else
20788   echo "configure: failed program was:" >&5
20789   cat conftest.$ac_ext >&5
20790   rm -rf conftest*
20791   ol_cv_struct_passwd_pw_passwd=no
20792 fi
20793 rm -f conftest*
20794 fi
20795
20796 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20797 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20798         cat >> confdefs.h <<\EOF
20799 #define HAVE_PW_PASSWD 1
20800 EOF
20801
20802 fi
20803
20804
20805 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20806 echo "configure:20807: checking if toupper() requires islower()" >&5
20807 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20808   echo $ac_n "(cached) $ac_c" 1>&6
20809 else
20810   
20811         if test "$cross_compiling" = yes; then
20812   ol_cv_c_upper_lower=safe
20813 else
20814   cat > conftest.$ac_ext <<EOF
20815 #line 20816 "configure"
20816 #include "confdefs.h"
20817
20818 #include <ctype.h>
20819 main()
20820 {
20821         if ('C' == toupper('C'))
20822                 exit(0);
20823         else
20824                 exit(1);
20825 }
20826 EOF
20827 if { (eval echo configure:20828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20828 then
20829   ol_cv_c_upper_lower=no
20830 else
20831   echo "configure: failed program was:" >&5
20832   cat conftest.$ac_ext >&5
20833   rm -fr conftest*
20834   ol_cv_c_upper_lower=yes
20835 fi
20836 rm -fr conftest*
20837 fi
20838
20839 fi
20840
20841 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20842 if test $ol_cv_c_upper_lower != no ; then
20843         cat >> confdefs.h <<\EOF
20844 #define C_UPPER_LOWER 1
20845 EOF
20846
20847 fi
20848
20849 echo $ac_n "checking for working const""... $ac_c" 1>&6
20850 echo "configure:20851: checking for working const" >&5
20851 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20852   echo $ac_n "(cached) $ac_c" 1>&6
20853 else
20854   cat > conftest.$ac_ext <<EOF
20855 #line 20856 "configure"
20856 #include "confdefs.h"
20857
20858 int main() {
20859
20860 /* Ultrix mips cc rejects this.  */
20861 typedef int charset[2]; const charset x;
20862 /* SunOS 4.1.1 cc rejects this.  */
20863 char const *const *ccp;
20864 char **p;
20865 /* NEC SVR4.0.2 mips cc rejects this.  */
20866 struct point {int x, y;};
20867 static struct point const zero = {0,0};
20868 /* AIX XL C 1.02.0.0 rejects this.
20869    It does not let you subtract one const X* pointer from another in an arm
20870    of an if-expression whose if-part is not a constant expression */
20871 const char *g = "string";
20872 ccp = &g + (g ? g-g : 0);
20873 /* HPUX 7.0 cc rejects these. */
20874 ++ccp;
20875 p = (char**) ccp;
20876 ccp = (char const *const *) p;
20877 { /* SCO 3.2v4 cc rejects this.  */
20878   char *t;
20879   char const *s = 0 ? (char *) 0 : (char const *) 0;
20880
20881   *t++ = 0;
20882 }
20883 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20884   int x[] = {25, 17};
20885   const int *foo = &x[0];
20886   ++foo;
20887 }
20888 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20889   typedef const int *iptr;
20890   iptr p = 0;
20891   ++p;
20892 }
20893 { /* AIX XL C 1.02.0.0 rejects this saying
20894      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20895   struct s { int j; const int *ap[3]; };
20896   struct s *b; b->j = 5;
20897 }
20898 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20899   const int foo = 10;
20900 }
20901
20902 ; return 0; }
20903 EOF
20904 if { (eval echo configure:20905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20905   rm -rf conftest*
20906   ac_cv_c_const=yes
20907 else
20908   echo "configure: failed program was:" >&5
20909   cat conftest.$ac_ext >&5
20910   rm -rf conftest*
20911   ac_cv_c_const=no
20912 fi
20913 rm -f conftest*
20914 fi
20915
20916 echo "$ac_t""$ac_cv_c_const" 1>&6
20917 if test $ac_cv_c_const = no; then
20918   cat >> confdefs.h <<\EOF
20919 #define const 
20920 EOF
20921
20922 fi
20923
20924 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20925 echo "configure:20926: checking if compiler understands volatile" >&5
20926 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20927   echo $ac_n "(cached) $ac_c" 1>&6
20928 else
20929   cat > conftest.$ac_ext <<EOF
20930 #line 20931 "configure"
20931 #include "confdefs.h"
20932 int x, y, z;
20933 int main() {
20934 volatile int a; int * volatile b = x ? &y : &z;
20935       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20936       *b = 0;
20937 ; return 0; }
20938 EOF
20939 if { (eval echo configure:20940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20940   rm -rf conftest*
20941   ol_cv_c_volatile=yes
20942 else
20943   echo "configure: failed program was:" >&5
20944   cat conftest.$ac_ext >&5
20945   rm -rf conftest*
20946   ol_cv_c_volatile=no
20947 fi
20948 rm -f conftest*
20949 fi
20950
20951 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20952   if test $ol_cv_c_volatile = yes; then
20953     : 
20954   else
20955     cat >> confdefs.h <<\EOF
20956 #define volatile 
20957 EOF
20958
20959   fi
20960  
20961
20962 if test $cross_compiling = yes ; then
20963         cat >> confdefs.h <<\EOF
20964 #define CROSS_COMPILING 1
20965 EOF
20966
20967 else
20968         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20969 echo "configure:20970: checking whether byte ordering is bigendian" >&5
20970 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20971   echo $ac_n "(cached) $ac_c" 1>&6
20972 else
20973   ac_cv_c_bigendian=unknown
20974 # See if sys/param.h defines the BYTE_ORDER macro.
20975 cat > conftest.$ac_ext <<EOF
20976 #line 20977 "configure"
20977 #include "confdefs.h"
20978 #include <sys/types.h>
20979 #include <sys/param.h>
20980 int main() {
20981
20982 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20983  bogus endian macros
20984 #endif
20985 ; return 0; }
20986 EOF
20987 if { (eval echo configure:20988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20988   rm -rf conftest*
20989   # It does; now see whether it defined to BIG_ENDIAN or not.
20990 cat > conftest.$ac_ext <<EOF
20991 #line 20992 "configure"
20992 #include "confdefs.h"
20993 #include <sys/types.h>
20994 #include <sys/param.h>
20995 int main() {
20996
20997 #if BYTE_ORDER != BIG_ENDIAN
20998  not big endian
20999 #endif
21000 ; return 0; }
21001 EOF
21002 if { (eval echo configure:21003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21003   rm -rf conftest*
21004   ac_cv_c_bigendian=yes
21005 else
21006   echo "configure: failed program was:" >&5
21007   cat conftest.$ac_ext >&5
21008   rm -rf conftest*
21009   ac_cv_c_bigendian=no
21010 fi
21011 rm -f conftest*
21012 else
21013   echo "configure: failed program was:" >&5
21014   cat conftest.$ac_ext >&5
21015 fi
21016 rm -f conftest*
21017 if test $ac_cv_c_bigendian = unknown; then
21018 if test "$cross_compiling" = yes; then
21019     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21020 else
21021   cat > conftest.$ac_ext <<EOF
21022 #line 21023 "configure"
21023 #include "confdefs.h"
21024 main () {
21025   /* Are we little or big endian?  From Harbison&Steele.  */
21026   union
21027   {
21028     long l;
21029     char c[sizeof (long)];
21030   } u;
21031   u.l = 1;
21032   exit (u.c[sizeof (long) - 1] == 1);
21033 }
21034 EOF
21035 if { (eval echo configure:21036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21036 then
21037   ac_cv_c_bigendian=no
21038 else
21039   echo "configure: failed program was:" >&5
21040   cat conftest.$ac_ext >&5
21041   rm -fr conftest*
21042   ac_cv_c_bigendian=yes
21043 fi
21044 rm -fr conftest*
21045 fi
21046
21047 fi
21048 fi
21049
21050 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21051 if test $ac_cv_c_bigendian = yes; then
21052   cat >> confdefs.h <<\EOF
21053 #define WORDS_BIGENDIAN 1
21054 EOF
21055
21056 fi
21057
21058 fi
21059
21060 echo $ac_n "checking size of short""... $ac_c" 1>&6
21061 echo "configure:21062: checking size of short" >&5 
21062 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21063   echo $ac_n "(cached) $ac_c" 1>&6
21064 else
21065   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21066   cat > conftest.$ac_ext <<EOF
21067 #line 21068 "configure"
21068 #include "confdefs.h"
21069 #include "confdefs.h" 
21070 #include <sys/types.h> 
21071  
21072
21073 int main() {
21074 switch (0) case 0: case (sizeof (short) == $ac_size):;
21075 ; return 0; }
21076 EOF
21077 if { (eval echo configure:21078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21078   rm -rf conftest*
21079   ac_cv_sizeof_short=$ac_size
21080 else
21081   echo "configure: failed program was:" >&5
21082   cat conftest.$ac_ext >&5
21083 fi
21084 rm -f conftest* 
21085   if test x$ac_cv_sizeof_short != x ; then break; fi 
21086 done 
21087
21088 fi
21089  
21090 if test x$ac_cv_sizeof_short = x ; then 
21091   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21092 fi 
21093 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21094 cat >> confdefs.h <<EOF
21095 #define SIZEOF_SHORT $ac_cv_sizeof_short
21096 EOF
21097  
21098  
21099 echo $ac_n "checking size of int""... $ac_c" 1>&6
21100 echo "configure:21101: checking size of int" >&5 
21101 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21102   echo $ac_n "(cached) $ac_c" 1>&6
21103 else
21104   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21105   cat > conftest.$ac_ext <<EOF
21106 #line 21107 "configure"
21107 #include "confdefs.h"
21108 #include "confdefs.h" 
21109 #include <sys/types.h> 
21110  
21111
21112 int main() {
21113 switch (0) case 0: case (sizeof (int) == $ac_size):;
21114 ; return 0; }
21115 EOF
21116 if { (eval echo configure:21117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21117   rm -rf conftest*
21118   ac_cv_sizeof_int=$ac_size
21119 else
21120   echo "configure: failed program was:" >&5
21121   cat conftest.$ac_ext >&5
21122 fi
21123 rm -f conftest* 
21124   if test x$ac_cv_sizeof_int != x ; then break; fi 
21125 done 
21126
21127 fi
21128  
21129 if test x$ac_cv_sizeof_int = x ; then 
21130   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21131 fi 
21132 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21133 cat >> confdefs.h <<EOF
21134 #define SIZEOF_INT $ac_cv_sizeof_int
21135 EOF
21136  
21137  
21138 echo $ac_n "checking size of long""... $ac_c" 1>&6
21139 echo "configure:21140: checking size of long" >&5 
21140 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21141   echo $ac_n "(cached) $ac_c" 1>&6
21142 else
21143   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21144   cat > conftest.$ac_ext <<EOF
21145 #line 21146 "configure"
21146 #include "confdefs.h"
21147 #include "confdefs.h" 
21148 #include <sys/types.h> 
21149  
21150
21151 int main() {
21152 switch (0) case 0: case (sizeof (long) == $ac_size):;
21153 ; return 0; }
21154 EOF
21155 if { (eval echo configure:21156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21156   rm -rf conftest*
21157   ac_cv_sizeof_long=$ac_size
21158 else
21159   echo "configure: failed program was:" >&5
21160   cat conftest.$ac_ext >&5
21161 fi
21162 rm -f conftest* 
21163   if test x$ac_cv_sizeof_long != x ; then break; fi 
21164 done 
21165
21166 fi
21167  
21168 if test x$ac_cv_sizeof_long = x ; then 
21169   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21170 fi 
21171 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21172 cat >> confdefs.h <<EOF
21173 #define SIZEOF_LONG $ac_cv_sizeof_long
21174 EOF
21175  
21176
21177
21178 if test "$ac_cv_sizeof_int" -lt 4 ; then
21179         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21180
21181         cat >> confdefs.h <<\EOF
21182 #define LBER_INT_T long
21183 EOF
21184
21185 else
21186         cat >> confdefs.h <<\EOF
21187 #define LBER_INT_T int
21188 EOF
21189
21190 fi
21191
21192 cat >> confdefs.h <<\EOF
21193 #define LBER_LEN_T long
21194 EOF
21195
21196 cat >> confdefs.h <<\EOF
21197 #define LBER_SOCKET_T int
21198 EOF
21199
21200 cat >> confdefs.h <<\EOF
21201 #define LBER_TAG_T long
21202 EOF
21203
21204
21205 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21206 echo "configure:21207: checking for 8-bit clean memcmp" >&5
21207 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21208   echo $ac_n "(cached) $ac_c" 1>&6
21209 else
21210   if test "$cross_compiling" = yes; then
21211   ac_cv_func_memcmp_clean=no
21212 else
21213   cat > conftest.$ac_ext <<EOF
21214 #line 21215 "configure"
21215 #include "confdefs.h"
21216
21217 main()
21218 {
21219   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21220   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21221 }
21222
21223 EOF
21224 if { (eval echo configure:21225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21225 then
21226   ac_cv_func_memcmp_clean=yes
21227 else
21228   echo "configure: failed program was:" >&5
21229   cat conftest.$ac_ext >&5
21230   rm -fr conftest*
21231   ac_cv_func_memcmp_clean=no
21232 fi
21233 rm -fr conftest*
21234 fi
21235
21236 fi
21237
21238 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21239 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21240
21241 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21242 echo "configure:21243: checking for strftime" >&5
21243 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21244   echo $ac_n "(cached) $ac_c" 1>&6
21245 else
21246   cat > conftest.$ac_ext <<EOF
21247 #line 21248 "configure"
21248 #include "confdefs.h"
21249 /* System header to define __stub macros and hopefully few prototypes,
21250     which can conflict with char strftime(); below.  */
21251 #include <assert.h>
21252 /* Override any gcc2 internal prototype to avoid an error.  */
21253 /* We use char because int might match the return type of a gcc2
21254     builtin and then its argument prototype would still apply.  */
21255 char strftime();
21256 char (*f)();
21257
21258 int main() {
21259
21260 /* The GNU C library defines this for functions which it implements
21261     to always fail with ENOSYS.  Some functions are actually named
21262     something starting with __ and the normal name is an alias.  */
21263 #if defined (__stub_strftime) || defined (__stub___strftime)
21264 choke me
21265 #else
21266 f = strftime;
21267 #endif
21268
21269 ; return 0; }
21270 EOF
21271 if { (eval echo configure:21272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21272   rm -rf conftest*
21273   eval "ac_cv_func_strftime=yes"
21274 else
21275   echo "configure: failed program was:" >&5
21276   cat conftest.$ac_ext >&5
21277   rm -rf conftest*
21278   eval "ac_cv_func_strftime=no"
21279 fi
21280 rm -f conftest*
21281 fi
21282
21283 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21284   echo "$ac_t""yes" 1>&6
21285   cat >> confdefs.h <<\EOF
21286 #define HAVE_STRFTIME 1
21287 EOF
21288
21289 else
21290   echo "$ac_t""no" 1>&6
21291 # strftime is in -lintl on SCO UNIX.
21292 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21293 echo "configure:21294: checking for strftime in -lintl" >&5
21294 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21295 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21296   echo $ac_n "(cached) $ac_c" 1>&6
21297 else
21298   ac_save_LIBS="$LIBS"
21299 LIBS="-lintl  $LIBS"
21300 cat > conftest.$ac_ext <<EOF
21301 #line 21302 "configure"
21302 #include "confdefs.h"
21303 /* Override any gcc2 internal prototype to avoid an error.  */
21304 /* We use char because int might match the return type of a gcc2
21305     builtin and then its argument prototype would still apply.  */
21306 char strftime();
21307
21308 int main() {
21309 strftime()
21310 ; return 0; }
21311 EOF
21312 if { (eval echo configure:21313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21313   rm -rf conftest*
21314   eval "ac_cv_lib_$ac_lib_var=yes"
21315 else
21316   echo "configure: failed program was:" >&5
21317   cat conftest.$ac_ext >&5
21318   rm -rf conftest*
21319   eval "ac_cv_lib_$ac_lib_var=no"
21320 fi
21321 rm -f conftest*
21322 LIBS="$ac_save_LIBS"
21323
21324 fi
21325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21326   echo "$ac_t""yes" 1>&6
21327   cat >> confdefs.h <<\EOF
21328 #define HAVE_STRFTIME 1
21329 EOF
21330
21331 LIBS="-lintl $LIBS"
21332 else
21333   echo "$ac_t""no" 1>&6
21334 fi
21335
21336 fi
21337
21338
21339 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21340 echo "configure:21341: checking for inet_aton()" >&5
21341 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21342   echo $ac_n "(cached) $ac_c" 1>&6
21343 else
21344   cat > conftest.$ac_ext <<EOF
21345 #line 21346 "configure"
21346 #include "confdefs.h"
21347
21348 #ifdef HAVE_SYS_TYPES_H
21349 #       include <sys/types.h>
21350 #endif
21351 #ifdef HAVE_SYS_SOCKET_H
21352 #       include <sys/socket.h>
21353 #       ifdef HAVE_SYS_SELECT_H
21354 #               include <sys/select.h>
21355 #       endif
21356 #       include <netinet/in.h>
21357 #       ifdef HAVE_ARPA_INET_H
21358 #               include <arpa/inet.h>
21359 #       endif
21360 #endif
21361
21362 int main() {
21363 struct in_addr in;
21364 int rc = inet_aton( "255.255.255.255", &in );
21365 ; return 0; }
21366 EOF
21367 if { (eval echo configure:21368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21368   rm -rf conftest*
21369   ol_cv_func_inet_aton=yes
21370 else
21371   echo "configure: failed program was:" >&5
21372   cat conftest.$ac_ext >&5
21373   rm -rf conftest*
21374   ol_cv_func_inet_aton=no
21375 fi
21376 rm -f conftest*
21377 fi
21378
21379 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21380   if test $ol_cv_func_inet_aton != no; then
21381     cat >> confdefs.h <<\EOF
21382 #define HAVE_INET_ATON 1
21383 EOF
21384
21385   fi
21386  
21387
21388 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21389 echo "configure:21390: checking for _spawnlp" >&5
21390 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21391   echo $ac_n "(cached) $ac_c" 1>&6
21392 else
21393   cat > conftest.$ac_ext <<EOF
21394 #line 21395 "configure"
21395 #include "confdefs.h"
21396 /* System header to define __stub macros and hopefully few prototypes,
21397     which can conflict with char _spawnlp(); below.  */
21398 #include <assert.h>
21399 /* Override any gcc2 internal prototype to avoid an error.  */
21400 /* We use char because int might match the return type of a gcc2
21401     builtin and then its argument prototype would still apply.  */
21402 char _spawnlp();
21403 char (*f)();
21404
21405 int main() {
21406
21407 /* The GNU C library defines this for functions which it implements
21408     to always fail with ENOSYS.  Some functions are actually named
21409     something starting with __ and the normal name is an alias.  */
21410 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21411 choke me
21412 #else
21413 f = _spawnlp;
21414 #endif
21415
21416 ; return 0; }
21417 EOF
21418 if { (eval echo configure:21419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21419   rm -rf conftest*
21420   eval "ac_cv_func__spawnlp=yes"
21421 else
21422   echo "configure: failed program was:" >&5
21423   cat conftest.$ac_ext >&5
21424   rm -rf conftest*
21425   eval "ac_cv_func__spawnlp=no"
21426 fi
21427 rm -f conftest*
21428 fi
21429
21430 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21431   echo "$ac_t""yes" 1>&6
21432   cat >> confdefs.h <<\EOF
21433 #define HAVE_SPAWNLP 1
21434 EOF
21435
21436 else
21437   echo "$ac_t""no" 1>&6
21438 fi
21439
21440
21441 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21442 echo "configure:21443: checking for _snprintf" >&5
21443 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21444   echo $ac_n "(cached) $ac_c" 1>&6
21445 else
21446   cat > conftest.$ac_ext <<EOF
21447 #line 21448 "configure"
21448 #include "confdefs.h"
21449 /* System header to define __stub macros and hopefully few prototypes,
21450     which can conflict with char _snprintf(); below.  */
21451 #include <assert.h>
21452 /* Override any gcc2 internal prototype to avoid an error.  */
21453 /* We use char because int might match the return type of a gcc2
21454     builtin and then its argument prototype would still apply.  */
21455 char _snprintf();
21456 char (*f)();
21457
21458 int main() {
21459
21460 /* The GNU C library defines this for functions which it implements
21461     to always fail with ENOSYS.  Some functions are actually named
21462     something starting with __ and the normal name is an alias.  */
21463 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21464 choke me
21465 #else
21466 f = _snprintf;
21467 #endif
21468
21469 ; return 0; }
21470 EOF
21471 if { (eval echo configure:21472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21472   rm -rf conftest*
21473   eval "ac_cv_func__snprintf=yes"
21474 else
21475   echo "configure: failed program was:" >&5
21476   cat conftest.$ac_ext >&5
21477   rm -rf conftest*
21478   eval "ac_cv_func__snprintf=no"
21479 fi
21480 rm -f conftest*
21481 fi
21482
21483 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21484   echo "$ac_t""yes" 1>&6
21485   ac_cv_func_snprintf=yes
21486         cat >> confdefs.h <<\EOF
21487 #define snprintf _snprintf
21488 EOF
21489
21490
21491 else
21492   echo "$ac_t""no" 1>&6
21493 fi
21494
21495
21496 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21497 echo "configure:21498: checking for _vsnprintf" >&5
21498 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21499   echo $ac_n "(cached) $ac_c" 1>&6
21500 else
21501   cat > conftest.$ac_ext <<EOF
21502 #line 21503 "configure"
21503 #include "confdefs.h"
21504 /* System header to define __stub macros and hopefully few prototypes,
21505     which can conflict with char _vsnprintf(); below.  */
21506 #include <assert.h>
21507 /* Override any gcc2 internal prototype to avoid an error.  */
21508 /* We use char because int might match the return type of a gcc2
21509     builtin and then its argument prototype would still apply.  */
21510 char _vsnprintf();
21511 char (*f)();
21512
21513 int main() {
21514
21515 /* The GNU C library defines this for functions which it implements
21516     to always fail with ENOSYS.  Some functions are actually named
21517     something starting with __ and the normal name is an alias.  */
21518 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21519 choke me
21520 #else
21521 f = _vsnprintf;
21522 #endif
21523
21524 ; return 0; }
21525 EOF
21526 if { (eval echo configure:21527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21527   rm -rf conftest*
21528   eval "ac_cv_func__vsnprintf=yes"
21529 else
21530   echo "configure: failed program was:" >&5
21531   cat conftest.$ac_ext >&5
21532   rm -rf conftest*
21533   eval "ac_cv_func__vsnprintf=no"
21534 fi
21535 rm -f conftest*
21536 fi
21537
21538 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21539   echo "$ac_t""yes" 1>&6
21540   ac_cv_func_vsnprintf=yes
21541         cat >> confdefs.h <<\EOF
21542 #define vsnprintf _vsnprintf
21543 EOF
21544
21545
21546 else
21547   echo "$ac_t""no" 1>&6
21548 fi
21549
21550
21551 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21552 echo "configure:21553: checking for vprintf" >&5
21553 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21554   echo $ac_n "(cached) $ac_c" 1>&6
21555 else
21556   cat > conftest.$ac_ext <<EOF
21557 #line 21558 "configure"
21558 #include "confdefs.h"
21559 /* System header to define __stub macros and hopefully few prototypes,
21560     which can conflict with char vprintf(); below.  */
21561 #include <assert.h>
21562 /* Override any gcc2 internal prototype to avoid an error.  */
21563 /* We use char because int might match the return type of a gcc2
21564     builtin and then its argument prototype would still apply.  */
21565 char vprintf();
21566 char (*f)();
21567
21568 int main() {
21569
21570 /* The GNU C library defines this for functions which it implements
21571     to always fail with ENOSYS.  Some functions are actually named
21572     something starting with __ and the normal name is an alias.  */
21573 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21574 choke me
21575 #else
21576 f = vprintf;
21577 #endif
21578
21579 ; return 0; }
21580 EOF
21581 if { (eval echo configure:21582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21582   rm -rf conftest*
21583   eval "ac_cv_func_vprintf=yes"
21584 else
21585   echo "configure: failed program was:" >&5
21586   cat conftest.$ac_ext >&5
21587   rm -rf conftest*
21588   eval "ac_cv_func_vprintf=no"
21589 fi
21590 rm -f conftest*
21591 fi
21592
21593 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21594   echo "$ac_t""yes" 1>&6
21595   cat >> confdefs.h <<\EOF
21596 #define HAVE_VPRINTF 1
21597 EOF
21598
21599 else
21600   echo "$ac_t""no" 1>&6
21601 fi
21602
21603 if test "$ac_cv_func_vprintf" != yes; then
21604 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21605 echo "configure:21606: checking for _doprnt" >&5
21606 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21607   echo $ac_n "(cached) $ac_c" 1>&6
21608 else
21609   cat > conftest.$ac_ext <<EOF
21610 #line 21611 "configure"
21611 #include "confdefs.h"
21612 /* System header to define __stub macros and hopefully few prototypes,
21613     which can conflict with char _doprnt(); below.  */
21614 #include <assert.h>
21615 /* Override any gcc2 internal prototype to avoid an error.  */
21616 /* We use char because int might match the return type of a gcc2
21617     builtin and then its argument prototype would still apply.  */
21618 char _doprnt();
21619 char (*f)();
21620
21621 int main() {
21622
21623 /* The GNU C library defines this for functions which it implements
21624     to always fail with ENOSYS.  Some functions are actually named
21625     something starting with __ and the normal name is an alias.  */
21626 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21627 choke me
21628 #else
21629 f = _doprnt;
21630 #endif
21631
21632 ; return 0; }
21633 EOF
21634 if { (eval echo configure:21635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21635   rm -rf conftest*
21636   eval "ac_cv_func__doprnt=yes"
21637 else
21638   echo "configure: failed program was:" >&5
21639   cat conftest.$ac_ext >&5
21640   rm -rf conftest*
21641   eval "ac_cv_func__doprnt=no"
21642 fi
21643 rm -f conftest*
21644 fi
21645
21646 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21647   echo "$ac_t""yes" 1>&6
21648   cat >> confdefs.h <<\EOF
21649 #define HAVE_DOPRNT 1
21650 EOF
21651
21652 else
21653   echo "$ac_t""no" 1>&6
21654 fi
21655
21656 fi
21657
21658
21659 if test $ac_cv_func_vprintf = yes ; then
21660                 for ac_func in vsnprintf vsprintf
21661 do
21662 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21663 echo "configure:21664: checking for $ac_func" >&5
21664 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21665   echo $ac_n "(cached) $ac_c" 1>&6
21666 else
21667   cat > conftest.$ac_ext <<EOF
21668 #line 21669 "configure"
21669 #include "confdefs.h"
21670 /* System header to define __stub macros and hopefully few prototypes,
21671     which can conflict with char $ac_func(); below.  */
21672 #include <assert.h>
21673 /* Override any gcc2 internal prototype to avoid an error.  */
21674 /* We use char because int might match the return type of a gcc2
21675     builtin and then its argument prototype would still apply.  */
21676 char $ac_func();
21677 char (*f)();
21678
21679 int main() {
21680
21681 /* The GNU C library defines this for functions which it implements
21682     to always fail with ENOSYS.  Some functions are actually named
21683     something starting with __ and the normal name is an alias.  */
21684 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21685 choke me
21686 #else
21687 f = $ac_func;
21688 #endif
21689
21690 ; return 0; }
21691 EOF
21692 if { (eval echo configure:21693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21693   rm -rf conftest*
21694   eval "ac_cv_func_$ac_func=yes"
21695 else
21696   echo "configure: failed program was:" >&5
21697   cat conftest.$ac_ext >&5
21698   rm -rf conftest*
21699   eval "ac_cv_func_$ac_func=no"
21700 fi
21701 rm -f conftest*
21702 fi
21703
21704 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21705   echo "$ac_t""yes" 1>&6
21706     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21707   cat >> confdefs.h <<EOF
21708 #define $ac_tr_func 1
21709 EOF
21710  
21711 else
21712   echo "$ac_t""no" 1>&6
21713 fi
21714 done
21715
21716 fi
21717
21718 for ac_func in \
21719         bcopy                   \
21720         closesocket             \
21721         chroot                  \
21722         endgrent                \
21723         endpwent                \
21724         fcntl                   \
21725         flock                   \
21726         getdtablesize   \
21727         getgrgid                \
21728         gethostname             \
21729         getpass                 \
21730         getpassphrase   \
21731         getpwuid                \
21732         getpwnam                \
21733         getspnam                \
21734         gettimeofday    \
21735         initgroups              \
21736         lockf                   \
21737         memcpy                  \
21738         memmove                 \
21739         mkstemp                 \
21740         mktemp                  \
21741         pipe                    \
21742         read                    \
21743         recv                    \
21744         recvfrom                \
21745         setpwfile               \
21746         setgid                  \
21747         setegid                 \
21748         setsid                  \
21749         setuid                  \
21750         seteuid                 \
21751         sigaction               \
21752         signal                  \
21753         sigset                  \
21754         strdup                  \
21755         strerror                \
21756         strpbrk                 \
21757         strrchr                 \
21758         strsep                  \
21759         strstr                  \
21760         strtol                  \
21761         strtoul                 \
21762         strspn                  \
21763         sysconf                 \
21764         usleep                  \
21765         waitpid                 \
21766         wait4                   \
21767         write                   \
21768         send                    \
21769         sendto                  \
21770
21771 do
21772 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21773 echo "configure:21774: checking for $ac_func" >&5
21774 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21775   echo $ac_n "(cached) $ac_c" 1>&6
21776 else
21777   cat > conftest.$ac_ext <<EOF
21778 #line 21779 "configure"
21779 #include "confdefs.h"
21780 /* System header to define __stub macros and hopefully few prototypes,
21781     which can conflict with char $ac_func(); below.  */
21782 #include <assert.h>
21783 /* Override any gcc2 internal prototype to avoid an error.  */
21784 /* We use char because int might match the return type of a gcc2
21785     builtin and then its argument prototype would still apply.  */
21786 char $ac_func();
21787 char (*f)();
21788
21789 int main() {
21790
21791 /* The GNU C library defines this for functions which it implements
21792     to always fail with ENOSYS.  Some functions are actually named
21793     something starting with __ and the normal name is an alias.  */
21794 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21795 choke me
21796 #else
21797 f = $ac_func;
21798 #endif
21799
21800 ; return 0; }
21801 EOF
21802 if { (eval echo configure:21803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21803   rm -rf conftest*
21804   eval "ac_cv_func_$ac_func=yes"
21805 else
21806   echo "configure: failed program was:" >&5
21807   cat conftest.$ac_ext >&5
21808   rm -rf conftest*
21809   eval "ac_cv_func_$ac_func=no"
21810 fi
21811 rm -f conftest*
21812 fi
21813
21814 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21815   echo "$ac_t""yes" 1>&6
21816     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21817   cat >> confdefs.h <<EOF
21818 #define $ac_tr_func 1
21819 EOF
21820  
21821 else
21822   echo "$ac_t""no" 1>&6
21823 fi
21824 done
21825
21826
21827 for ac_func in getopt
21828 do
21829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21830 echo "configure:21831: checking for $ac_func" >&5
21831 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21832   echo $ac_n "(cached) $ac_c" 1>&6
21833 else
21834   cat > conftest.$ac_ext <<EOF
21835 #line 21836 "configure"
21836 #include "confdefs.h"
21837 /* System header to define __stub macros and hopefully few prototypes,
21838     which can conflict with char $ac_func(); below.  */
21839 #include <assert.h>
21840 /* Override any gcc2 internal prototype to avoid an error.  */
21841 /* We use char because int might match the return type of a gcc2
21842     builtin and then its argument prototype would still apply.  */
21843 char $ac_func();
21844 char (*f)();
21845
21846 int main() {
21847
21848 /* The GNU C library defines this for functions which it implements
21849     to always fail with ENOSYS.  Some functions are actually named
21850     something starting with __ and the normal name is an alias.  */
21851 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21852 choke me
21853 #else
21854 f = $ac_func;
21855 #endif
21856
21857 ; return 0; }
21858 EOF
21859 if { (eval echo configure:21860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21860   rm -rf conftest*
21861   eval "ac_cv_func_$ac_func=yes"
21862 else
21863   echo "configure: failed program was:" >&5
21864   cat conftest.$ac_ext >&5
21865   rm -rf conftest*
21866   eval "ac_cv_func_$ac_func=no"
21867 fi
21868 rm -f conftest*
21869 fi
21870
21871 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21872   echo "$ac_t""yes" 1>&6
21873     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21874   cat >> confdefs.h <<EOF
21875 #define $ac_tr_func 1
21876 EOF
21877  
21878 else
21879   echo "$ac_t""no" 1>&6
21880 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21881 fi
21882 done
21883
21884
21885
21886 if test "$ac_cv_func_getopt" != yes; then
21887         LIBSRCS="$LIBSRCS getopt.c"
21888 fi
21889
21890 # Check Configuration
21891 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21892 echo "configure:21893: checking declaration of sys_errlist" >&5
21893 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21894   echo $ac_n "(cached) $ac_c" 1>&6
21895 else
21896   
21897         cat > conftest.$ac_ext <<EOF
21898 #line 21899 "configure"
21899 #include "confdefs.h"
21900
21901 #include <stdio.h>
21902 #include <sys/types.h>
21903 #include <errno.h>
21904 #ifdef WINNT
21905 #include <stdlib.h>
21906 #endif 
21907 int main() {
21908 char *c = (char *) *sys_errlist
21909 ; return 0; }
21910 EOF
21911 if { (eval echo configure:21912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21912   rm -rf conftest*
21913   ol_cv_dcl_sys_errlist=yes
21914         ol_cv_have_sys_errlist=yes
21915 else
21916   echo "configure: failed program was:" >&5
21917   cat conftest.$ac_ext >&5
21918   rm -rf conftest*
21919   ol_cv_dcl_sys_errlist=no
21920 fi
21921 rm -f conftest*
21922 fi
21923
21924 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21925 #
21926 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21927 if test $ol_cv_dcl_sys_errlist = no ; then
21928         cat >> confdefs.h <<\EOF
21929 #define DECL_SYS_ERRLIST 1
21930 EOF
21931
21932
21933         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21934 echo "configure:21935: checking existence of sys_errlist" >&5
21935 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21936   echo $ac_n "(cached) $ac_c" 1>&6
21937 else
21938   
21939                 cat > conftest.$ac_ext <<EOF
21940 #line 21941 "configure"
21941 #include "confdefs.h"
21942 #include <errno.h>
21943 int main() {
21944 char *c = (char *) *sys_errlist
21945 ; return 0; }
21946 EOF
21947 if { (eval echo configure:21948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21948   rm -rf conftest*
21949   ol_cv_have_sys_errlist=yes
21950 else
21951   echo "configure: failed program was:" >&5
21952   cat conftest.$ac_ext >&5
21953   rm -rf conftest*
21954   ol_cv_have_sys_errlist=no
21955 fi
21956 rm -f conftest*
21957 fi
21958
21959 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21960 fi
21961 if test $ol_cv_have_sys_errlist = yes ; then
21962         cat >> confdefs.h <<\EOF
21963 #define HAVE_SYS_ERRLIST 1
21964 EOF
21965
21966 fi
21967
21968
21969
21970 if test "$ol_enable_debug" != no ; then
21971         cat >> confdefs.h <<\EOF
21972 #define LDAP_DEBUG 1
21973 EOF
21974
21975 fi
21976 if test "$ol_enable_syslog" = yes ; then
21977         cat >> confdefs.h <<\EOF
21978 #define LDAP_SYSLOG 1
21979 EOF
21980
21981 fi
21982 if test "$ol_enable_cache" = no ; then
21983         cat >> confdefs.h <<\EOF
21984 #define LDAP_NOCACHE 1
21985 EOF
21986
21987 fi
21988 if test "$ol_link_kbind" != no ; then
21989         cat >> confdefs.h <<\EOF
21990 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21991 EOF
21992
21993 fi
21994 if test "$ol_enable_proctitle" != no ; then
21995         cat >> confdefs.h <<\EOF
21996 #define LDAP_PROCTITLE 1
21997 EOF
21998
21999 fi
22000 if test "$ol_enable_referrals" != no ; then
22001         cat >> confdefs.h <<\EOF
22002 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22003 EOF
22004
22005 fi
22006 if test "$ol_enable_local" != no; then
22007         cat >> confdefs.h <<\EOF
22008 #define LDAP_PF_LOCAL 1
22009 EOF
22010
22011 fi
22012 if test "$ol_link_ipv6" != no; then
22013         cat >> confdefs.h <<\EOF
22014 #define LDAP_PF_INET6 1
22015 EOF
22016
22017 fi
22018 if test "$ol_enable_cleartext" != no ; then
22019         cat >> confdefs.h <<\EOF
22020 #define SLAPD_CLEARTEXT 1
22021 EOF
22022
22023 fi
22024 if test "$ol_enable_crypt" != no ; then
22025         cat >> confdefs.h <<\EOF
22026 #define SLAPD_CRYPT 1
22027 EOF
22028
22029 fi
22030 if test "$ol_link_kpasswd" != no ; then
22031         cat >> confdefs.h <<\EOF
22032 #define SLAPD_KPASSWD 1
22033 EOF
22034
22035 fi
22036 if test "$ol_link_spasswd" != no ; then
22037         cat >> confdefs.h <<\EOF
22038 #define SLAPD_SPASSWD 1
22039 EOF
22040
22041 fi
22042 if test "$ol_enable_phonetic" != no ; then
22043         cat >> confdefs.h <<\EOF
22044 #define SLAPD_PHONETIC 1
22045 EOF
22046
22047 fi
22048 if test "$ol_enable_rlookups" != no ; then
22049         cat >> confdefs.h <<\EOF
22050 #define SLAPD_RLOOKUPS 1
22051 EOF
22052
22053 fi
22054 if test "$ol_enable_aci" != no ; then
22055         cat >> confdefs.h <<\EOF
22056 #define SLAPD_ACI_ENABLED 1
22057 EOF
22058
22059 fi
22060
22061 if test "$ol_link_modules" != no ; then
22062         cat >> confdefs.h <<\EOF
22063 #define SLAPD_MODULES 1
22064 EOF
22065
22066         BUILD_SLAPD=yes
22067         SLAPD_MODULES_LDFLAGS="-dlopen self"
22068 fi
22069
22070 if test "$ol_enable_bdb" != no ; then
22071         cat >> confdefs.h <<\EOF
22072 #define SLAPD_BDB 1
22073 EOF
22074
22075         BUILD_SLAPD=yes
22076         BUILD_BDB=yes
22077         if test "$ol_with_bdb_module" != static ; then
22078                 cat >> confdefs.h <<\EOF
22079 #define SLAPD_BDB_DYNAMIC 1
22080 EOF
22081
22082                 BUILD_BDB=mod
22083                 BUILD_BDB_DYNAMIC=shared
22084                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
22085                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22086         else
22087                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22088         fi
22089 fi
22090
22091 if test "$ol_link_dnssrv" != no ; then
22092         cat >> confdefs.h <<\EOF
22093 #define SLAPD_DNSSRV 1
22094 EOF
22095
22096         BUILD_SLAPD=yes
22097         BUILD_DNSSRV=yes
22098         if test "$ol_with_dnssrv_module" != static ; then
22099                 cat >> confdefs.h <<\EOF
22100 #define SLAPD_DNSSRV_DYNAMIC 1
22101 EOF
22102
22103                 BUILD_DNSSRV=mod
22104                 BUILD_DNSSRV_DYNAMIC=shared
22105                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
22106                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22107         else
22108                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22109         fi
22110 fi
22111
22112 if test "$ol_enable_ldap" != no ; then
22113         cat >> confdefs.h <<\EOF
22114 #define SLAPD_LDAP 1
22115 EOF
22116
22117         BUILD_SLAPD=yes
22118         BUILD_LDAP=yes
22119         if test "$ol_with_ldap_module" != static ; then
22120                 cat >> confdefs.h <<\EOF
22121 #define SLAPD_LDAP_DYNAMIC 1
22122 EOF
22123
22124                 BUILD_LDAP=mod
22125                 BUILD_LDAP_DYNAMIC=shared
22126                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
22127                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22128         else
22129                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22130         fi
22131 fi
22132
22133 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22134         cat >> confdefs.h <<\EOF
22135 #define SLAPD_LDBM 1
22136 EOF
22137
22138         BUILD_SLAPD=yes
22139         BUILD_LDBM=yes
22140         LDBM_LIB="-lldbm"
22141         if test "$ol_with_ldbm_module" != static ; then
22142                 cat >> confdefs.h <<\EOF
22143 #define SLAPD_LDBM_DYNAMIC 1
22144 EOF
22145
22146                 BUILD_LDBM=mod
22147                 BUILD_LDBM_DYNAMIC=shared
22148                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
22149                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22150         else
22151                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22152         fi
22153 fi
22154
22155 if test "$ol_enable_meta" != no ; then
22156         if test "$ol_enable_ldap" = no ; then
22157                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22158         fi
22159         if test "$ol_enable_rewrite" = no ; then
22160                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22161         fi
22162         cat >> confdefs.h <<\EOF
22163 #define SLAPD_META 1
22164 EOF
22165
22166         BUILD_SLAPD=yes
22167         BUILD_META=yes
22168         if test "$ol_with_meta_module" != static ; then
22169                 cat >> confdefs.h <<\EOF
22170 #define SLAPD_META_DYNAMIC 1
22171 EOF
22172
22173                 BUILD_META=mod
22174                 BUILD_META_DYNAMIC=shared
22175                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
22176                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22177         else
22178                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22179         fi
22180 fi
22181
22182 if test "$ol_enable_monitor" != no ; then
22183         cat >> confdefs.h <<\EOF
22184 #define SLAPD_MONITOR 1
22185 EOF
22186
22187         BUILD_SLAPD=yes
22188         BUILD_MONITOR=yes
22189         if test "$ol_with_monitor_module" != static ; then
22190                 cat >> confdefs.h <<\EOF
22191 #define SLAPD_MONITOR_DYNAMIC 1
22192 EOF
22193
22194                 BUILD_MONITOR=mod
22195                 BUILD_MONITOR_DYNAMIC=shared
22196                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
22197                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22198         else
22199                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22200         fi
22201 fi
22202
22203 if test "$ol_enable_null" != no ; then
22204         cat >> confdefs.h <<\EOF
22205 #define SLAPD_NULL 1
22206 EOF
22207
22208         BUILD_SLAPD=yes
22209         BUILD_NULL=yes
22210         if test "$ol_with_null_module" != static ; then
22211                 cat >> confdefs.h <<\EOF
22212 #define SLAPD_NULL_DYNAMIC 1
22213 EOF
22214
22215                 BUILD_NULL=mod
22216                 BUILD_NULL_DYNAMIC=shared
22217                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-null/back_null.la"
22218                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22219         else
22220                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22221         fi
22222 fi
22223
22224 if test "$ol_enable_passwd" != no ; then
22225         cat >> confdefs.h <<\EOF
22226 #define SLAPD_PASSWD 1
22227 EOF
22228
22229         BUILD_SLAPD=yes
22230         BUILD_PASSWD=yes
22231         if test "$ol_with_passwd_module" != static ; then
22232                 cat >> confdefs.h <<\EOF
22233 #define SLAPD_PASSWD_DYNAMIC 1
22234 EOF
22235
22236                 BUILD_PASSWD=mod
22237                 BUILD_PASSWD_DYNAMIC=shared
22238                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22239                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22240         else
22241                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22242         fi
22243 fi
22244
22245 if test "$ol_link_perl" != no ; then
22246         cat >> confdefs.h <<\EOF
22247 #define SLAPD_PERL 1
22248 EOF
22249
22250         BUILD_SLAPD=yes
22251         BUILD_PERL=yes
22252         if test "$ol_with_perl_module" != static ; then
22253                 cat >> confdefs.h <<\EOF
22254 #define SLAPD_PERL_DYNAMIC 1
22255 EOF
22256
22257                 BUILD_PERL=mod
22258                 BUILD_PERL_DYNAMIC=shared
22259                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22260                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22261         else
22262                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22263         fi
22264 fi
22265
22266 if test "$ol_enable_shell" != no ; then
22267         cat >> confdefs.h <<\EOF
22268 #define SLAPD_SHELL 1
22269 EOF
22270
22271         BUILD_SLAPD=yes
22272         BUILD_SHELL=yes
22273         if test "$ol_with_shell_module" != static ; then
22274                 cat >> confdefs.h <<\EOF
22275 #define SLAPD_SHELL_DYNAMIC 1
22276 EOF
22277
22278                 BUILD_SHELL=mod
22279                 BUILD_SHELL_DYNAMIC=shared
22280                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22281                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22282         else
22283                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22284         fi
22285 fi
22286
22287 if test "$ol_enable_tcl" != no ; then
22288         cat >> confdefs.h <<\EOF
22289 #define SLAPD_TCL 1
22290 EOF
22291
22292         BUILD_SLAPD=yes
22293         BUILD_TCL=yes
22294         if test "$ol_with_tcl_module" != static; then
22295                 cat >> confdefs.h <<\EOF
22296 #define SLAPD_TCL_DYNAMIC 1
22297 EOF
22298
22299                 BUILD_TCL=mod
22300                 BUILD_TCL_DYNAMIC=shared
22301                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22302                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22303         else
22304                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22305         fi
22306 fi
22307
22308 if test "$ol_link_sql" != no ; then
22309         cat >> confdefs.h <<\EOF
22310 #define SLAPD_SQL 1
22311 EOF
22312
22313         BUILD_SLAPD=yes
22314         BUILD_SQL=yes
22315         if test "$ol_with_sql_module" != static; then
22316                 cat >> confdefs.h <<\EOF
22317 #define SLAPD_SQL_DYNAMIC 1
22318 EOF
22319
22320                 BUILD_SQL=mod
22321                 BUILD_SQL_DYNAMIC=shared
22322                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22323                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22324         else
22325                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22326         fi
22327 fi
22328
22329 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22330         $BUILD_SLAPD = yes ; then
22331         BUILD_SLURPD=yes
22332 fi
22333
22334 if test "$ol_enable_rewrite" != no ; then
22335         cat >> confdefs.h <<\EOF
22336 #define ENABLE_REWRITE 1
22337 EOF
22338
22339         BUILD_REWRITE=yes
22340 fi
22341
22342
22343
22344 if test "$ac_cv_mingw32" = yes ; then
22345         PLAT=NT
22346         SLAPD_MODULES_LDFLAGS=
22347         SLAPD_MODULES_LIST=
22348 else
22349         PLAT=UNIX
22350 fi
22351
22352
22353
22354
22355
22356
22357   
22358   
22359   
22360   
22361   
22362   
22363   
22364   
22365   
22366   
22367   
22368   
22369   
22370   
22371   
22372   
22373   
22374   
22375   
22376   
22377   
22378   
22379   
22380   
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421 # Check whether --with-xxinstall or --without-xxinstall was given.
22422 if test "${with_xxinstall+set}" = set; then
22423   withval="$with_xxinstall"
22424   :
22425 fi
22426
22427
22428
22429 trap '' 1 2 15
22430
22431 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22432
22433 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22434 # Let make expand exec_prefix.
22435 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22436
22437 # Any assignment to VPATH causes Sun make to only execute
22438 # the first set of double-colon rules, so remove it if not needed.
22439 # If there is a colon in the path, we need to keep it.
22440 if test "x$srcdir" = x.; then
22441   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22442 fi
22443
22444 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22445
22446 DEFS=-DHAVE_CONFIG_H
22447
22448 # Without the "./", some shells look in PATH for config.status.
22449 : ${CONFIG_STATUS=./config.status}
22450
22451 echo creating $CONFIG_STATUS
22452 rm -f $CONFIG_STATUS
22453 cat > $CONFIG_STATUS <<EOF
22454 #! /bin/sh
22455 # Generated automatically by configure.
22456 # Run this file to recreate the current configuration.
22457 # This directory was configured as follows,
22458 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22459 #
22460 # $0 $ac_configure_args
22461 #
22462 # Compiler output produced by configure, useful for debugging
22463 # configure, is in ./config.log if it exists.
22464
22465 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22466 for ac_option
22467 do
22468   case "\$ac_option" in
22469   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22470     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22471     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22472   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22473     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22474     exit 0 ;;
22475   -help | --help | --hel | --he | --h)
22476     echo "\$ac_cs_usage"; exit 0 ;;
22477   *) echo "\$ac_cs_usage"; exit 1 ;;
22478   esac
22479 done
22480
22481 ac_given_srcdir=$srcdir
22482 ac_given_INSTALL="$INSTALL"
22483
22484 trap 'rm -fr `echo "\
22485 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22486 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22487 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22488 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22489 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22490 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22491 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22492 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22493 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22494 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22495 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22496 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22497 include/Makefile:build/top.mk:include/Makefile.in \
22498 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22499 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22500 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22501 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22502 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22503 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22504 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22505 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22506 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22507 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22508 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22509 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22510 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22511 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22512 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22513 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22514 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22515 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22516 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22517 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22518 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22519 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22520 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22521 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22522 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22523 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22524 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22525 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22526 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22527  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22528 EOF
22529 cat >> $CONFIG_STATUS <<EOF
22530
22531 # Protect against being on the right side of a sed subst in config.status.
22532 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22533  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22534 $ac_vpsub
22535 $extrasub
22536 s%@SHELL@%$SHELL%g
22537 s%@CFLAGS@%$CFLAGS%g
22538 s%@CPPFLAGS@%$CPPFLAGS%g
22539 s%@CXXFLAGS@%$CXXFLAGS%g
22540 s%@FFLAGS@%$FFLAGS%g
22541 s%@DEFS@%$DEFS%g
22542 s%@LDFLAGS@%$LDFLAGS%g
22543 s%@LIBS@%$LIBS%g
22544 s%@exec_prefix@%$exec_prefix%g
22545 s%@prefix@%$prefix%g
22546 s%@program_transform_name@%$program_transform_name%g
22547 s%@bindir@%$bindir%g
22548 s%@sbindir@%$sbindir%g
22549 s%@libexecdir@%$libexecdir%g
22550 s%@datadir@%$datadir%g
22551 s%@sysconfdir@%$sysconfdir%g
22552 s%@sharedstatedir@%$sharedstatedir%g
22553 s%@localstatedir@%$localstatedir%g
22554 s%@libdir@%$libdir%g
22555 s%@includedir@%$includedir%g
22556 s%@oldincludedir@%$oldincludedir%g
22557 s%@infodir@%$infodir%g
22558 s%@mandir@%$mandir%g
22559 s%@host@%$host%g
22560 s%@host_alias@%$host_alias%g
22561 s%@host_cpu@%$host_cpu%g
22562 s%@host_vendor@%$host_vendor%g
22563 s%@host_os@%$host_os%g
22564 s%@target@%$target%g
22565 s%@target_alias@%$target_alias%g
22566 s%@target_cpu@%$target_cpu%g
22567 s%@target_vendor@%$target_vendor%g
22568 s%@target_os@%$target_os%g
22569 s%@build@%$build%g
22570 s%@build_alias@%$build_alias%g
22571 s%@build_cpu@%$build_cpu%g
22572 s%@build_vendor@%$build_vendor%g
22573 s%@build_os@%$build_os%g
22574 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22575 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22576 s%@INSTALL_DATA@%$INSTALL_DATA%g
22577 s%@PACKAGE@%$PACKAGE%g
22578 s%@VERSION@%$VERSION%g
22579 s%@ACLOCAL@%$ACLOCAL%g
22580 s%@AUTOCONF@%$AUTOCONF%g
22581 s%@AUTOMAKE@%$AUTOMAKE%g
22582 s%@AUTOHEADER@%$AUTOHEADER%g
22583 s%@MAKEINFO@%$MAKEINFO%g
22584 s%@install_sh@%$install_sh%g
22585 s%@AMTAR@%$AMTAR%g
22586 s%@AWK@%$AWK%g
22587 s%@AMTARFLAGS@%$AMTARFLAGS%g
22588 s%@SET_MAKE@%$SET_MAKE%g
22589 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22590 s%@top_builddir@%$top_builddir%g
22591 s%@ldap_subdir@%$ldap_subdir%g
22592 s%@CC@%$CC%g
22593 s%@AR@%$AR%g
22594 s%@LN_S@%$LN_S%g
22595 s%@OBJEXT@%$OBJEXT%g
22596 s%@EXEEXT@%$EXEEXT%g
22597 s%@ECHO@%$ECHO%g
22598 s%@RANLIB@%$RANLIB%g
22599 s%@STRIP@%$STRIP%g
22600 s%@DLLTOOL@%$DLLTOOL%g
22601 s%@AS@%$AS%g
22602 s%@OBJDUMP@%$OBJDUMP%g
22603 s%@CPP@%$CPP%g
22604 s%@LIBTOOL@%$LIBTOOL%g
22605 s%@LN_H@%$LN_H%g
22606 s%@SENDMAIL@%$SENDMAIL%g
22607 s%@EDITOR@%$EDITOR%g
22608 s%@PERLBIN@%$PERLBIN%g
22609 s%@OL_MKDEP@%$OL_MKDEP%g
22610 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22611 s%@LIBOBJS@%$LIBOBJS%g
22612 s%@LIBSRCS@%$LIBSRCS%g
22613 s%@PLAT@%$PLAT%g
22614 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22615 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22616 s%@BUILD_BDB@%$BUILD_BDB%g
22617 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22618 s%@BUILD_LDAP@%$BUILD_LDAP%g
22619 s%@BUILD_LDBM@%$BUILD_LDBM%g
22620 s%@BUILD_META@%$BUILD_META%g
22621 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22622 s%@BUILD_NULL@%$BUILD_NULL%g
22623 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22624 s%@BUILD_PERL@%$BUILD_PERL%g
22625 s%@BUILD_SHELL@%$BUILD_SHELL%g
22626 s%@BUILD_SQL@%$BUILD_SQL%g
22627 s%@BUILD_TCL@%$BUILD_TCL%g
22628 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22629 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22630 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22631 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22632 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22633 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22634 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22635 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22636 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22637 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22638 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22639 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22640 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22641 s%@LDBM_LIB@%$LDBM_LIB%g
22642 s%@LDAP_LIBS@%$LDAP_LIBS%g
22643 s%@LDIF_LIBS@%$LDIF_LIBS%g
22644 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22645 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22646 s%@LDBM_LIBS@%$LDBM_LIBS%g
22647 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22648 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22649 s%@WRAP_LIBS@%$WRAP_LIBS%g
22650 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22651 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22652 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22653 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22654 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22655 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22656 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22657 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22658 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22659 s%@KRB4_LIBS@%$KRB4_LIBS%g
22660 s%@KRB5_LIBS@%$KRB5_LIBS%g
22661 s%@READLINE_LIBS@%$READLINE_LIBS%g
22662 s%@SASL_LIBS@%$SASL_LIBS%g
22663 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22664 s%@TLS_LIBS@%$TLS_LIBS%g
22665 s%@MODULES_LIBS@%$MODULES_LIBS%g
22666 s%@AUTH_LIBS@%$AUTH_LIBS%g
22667 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22668 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22669 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22670 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22671
22672 CEOF
22673 EOF
22674
22675 cat >> $CONFIG_STATUS <<\EOF
22676
22677 # Split the substitutions into bite-sized pieces for seds with
22678 # small command number limits, like on Digital OSF/1 and HP-UX.
22679 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22680 ac_file=1 # Number of current file.
22681 ac_beg=1 # First line for current file.
22682 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22683 ac_more_lines=:
22684 ac_sed_cmds=""
22685 while $ac_more_lines; do
22686   if test $ac_beg -gt 1; then
22687     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22688   else
22689     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22690   fi
22691   if test ! -s conftest.s$ac_file; then
22692     ac_more_lines=false
22693     rm -f conftest.s$ac_file
22694   else
22695     if test -z "$ac_sed_cmds"; then
22696       ac_sed_cmds="sed -f conftest.s$ac_file"
22697     else
22698       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22699     fi
22700     ac_file=`expr $ac_file + 1`
22701     ac_beg=$ac_end
22702     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22703   fi
22704 done
22705 if test -z "$ac_sed_cmds"; then
22706   ac_sed_cmds=cat
22707 fi
22708 EOF
22709
22710 cat >> $CONFIG_STATUS <<EOF
22711
22712 CONFIG_FILES=\${CONFIG_FILES-"\
22713 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22714 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22715 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22716 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22717 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22718 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22719 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22720 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22721 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22722 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22723 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22724 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22725 include/Makefile:build/top.mk:include/Makefile.in \
22726 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22727 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22728 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22729 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22730 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22731 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22732 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22733 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22734 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22735 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22736 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22737 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22738 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22739 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22740 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22741 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22742 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22743 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22744 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22745 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22746 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22747 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22748 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22749 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22750 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22751 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22752 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22753 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22754 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22755 "}
22756 EOF
22757 cat >> $CONFIG_STATUS <<\EOF
22758 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22759   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22760   case "$ac_file" in
22761   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22762        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22763   *) ac_file_in="${ac_file}.in" ;;
22764   esac
22765
22766   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22767
22768   # Remove last slash and all that follows it.  Not all systems have dirname.
22769   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22770   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22771     # The file is in a subdirectory.
22772     test ! -d "$ac_dir" && mkdir "$ac_dir"
22773     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22774     # A "../" for each directory in $ac_dir_suffix.
22775     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22776   else
22777     ac_dir_suffix= ac_dots=
22778   fi
22779
22780   case "$ac_given_srcdir" in
22781   .)  srcdir=.
22782       if test -z "$ac_dots"; then top_srcdir=.
22783       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22784   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22785   *) # Relative path.
22786     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22787     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22788   esac
22789
22790   case "$ac_given_INSTALL" in
22791   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22792   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22793   esac
22794
22795   echo creating "$ac_file"
22796   rm -f "$ac_file"
22797   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22798   case "$ac_file" in
22799   *[Mm]akefile*) ac_comsub="1i\\
22800 # $configure_input" ;;
22801   *) ac_comsub= ;;
22802   esac
22803
22804   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22805   sed -e "$ac_comsub
22806 s%@configure_input@%$configure_input%g
22807 s%@srcdir@%$srcdir%g
22808 s%@top_srcdir@%$top_srcdir%g
22809 s%@INSTALL@%$INSTALL%g
22810 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22811 fi; done
22812 rm -f conftest.s*
22813
22814 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22815 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22816 #
22817 # ac_d sets the value in "#define NAME VALUE" lines.
22818 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22819 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22820 ac_dC='\3'
22821 ac_dD='%g'
22822 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22823 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22824 ac_uB='\([      ]\)%\1#\2define\3'
22825 ac_uC=' '
22826 ac_uD='\4%g'
22827 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22828 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22829 ac_eB='$%\1#\2define\3'
22830 ac_eC=' '
22831 ac_eD='%g'
22832
22833 if test "${CONFIG_HEADERS+set}" != set; then
22834 EOF
22835 cat >> $CONFIG_STATUS <<EOF
22836   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22837 EOF
22838 cat >> $CONFIG_STATUS <<\EOF
22839 fi
22840 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22841   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22842   case "$ac_file" in
22843   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22844        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22845   *) ac_file_in="${ac_file}.in" ;;
22846   esac
22847
22848   echo creating $ac_file
22849
22850   rm -f conftest.frag conftest.in conftest.out
22851   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22852   cat $ac_file_inputs > conftest.in
22853
22854 EOF
22855
22856 # Transform confdefs.h into a sed script conftest.vals that substitutes
22857 # the proper values into config.h.in to produce config.h.  And first:
22858 # Protect against being on the right side of a sed subst in config.status.
22859 # Protect against being in an unquoted here document in config.status.
22860 rm -f conftest.vals
22861 cat > conftest.hdr <<\EOF
22862 s/[\\&%]/\\&/g
22863 s%[\\$`]%\\&%g
22864 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22865 s%ac_d%ac_u%gp
22866 s%ac_u%ac_e%gp
22867 EOF
22868 sed -n -f conftest.hdr confdefs.h > conftest.vals
22869 rm -f conftest.hdr
22870
22871 # This sed command replaces #undef with comments.  This is necessary, for
22872 # example, in the case of _POSIX_SOURCE, which is predefined and required
22873 # on some systems where configure will not decide to define it.
22874 cat >> conftest.vals <<\EOF
22875 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22876 EOF
22877
22878 # Break up conftest.vals because some shells have a limit on
22879 # the size of here documents, and old seds have small limits too.
22880
22881 rm -f conftest.tail
22882 while :
22883 do
22884   ac_lines=`grep -c . conftest.vals`
22885   # grep -c gives empty output for an empty file on some AIX systems.
22886   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22887   # Write a limited-size here document to conftest.frag.
22888   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22889   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22890   echo 'CEOF
22891   sed -f conftest.frag conftest.in > conftest.out
22892   rm -f conftest.in
22893   mv conftest.out conftest.in
22894 ' >> $CONFIG_STATUS
22895   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22896   rm -f conftest.vals
22897   mv conftest.tail conftest.vals
22898 done
22899 rm -f conftest.vals
22900
22901 cat >> $CONFIG_STATUS <<\EOF
22902   rm -f conftest.frag conftest.h
22903   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22904   cat conftest.in >> conftest.h
22905   rm -f conftest.in
22906   if cmp -s $ac_file conftest.h 2>/dev/null; then
22907     echo "$ac_file is unchanged"
22908     rm -f conftest.h
22909   else
22910     # Remove last slash and all that follows it.  Not all systems have dirname.
22911       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22912       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22913       # The file is in a subdirectory.
22914       test ! -d "$ac_dir" && mkdir "$ac_dir"
22915     fi
22916     rm -f $ac_file
22917     mv conftest.h $ac_file
22918   fi
22919 fi; done
22920
22921 EOF
22922 cat >> $CONFIG_STATUS <<EOF
22923
22924 EOF
22925 cat >> $CONFIG_STATUS <<\EOF
22926
22927 date > stamp-h
22928 echo Please run \"make depend\" to build dependencies
22929
22930 exit 0
22931 EOF
22932 chmod +x $CONFIG_STATUS
22933 rm -fr confdefs* $ac_clean_files
22934 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22935